File: /var/www/design.system/node_modules/antd/dist/antd-with-locales.js
/*!
*
* antd v5.24.4
*
* Copyright 2015-present, Alipay, Inc.
* All rights reserved.
*
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"), require("dayjs"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom", "dayjs"], factory);
else if(typeof exports === 'object')
exports["antd"] = factory(require("react"), require("react-dom"), require("dayjs"));
else
root["antd"] = factory(root["React"], root["ReactDOM"], root["dayjs"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_dayjs__) {
return /******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./alias/cssinjs.js":
/*!**************************!*\
!*** ./alias/cssinjs.js ***!
\**************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
/* eslint-disable no-restricted-globals */
// This is a alias proxy, which will use global `@ant-design/cssinjs` first.
// Use local if global not found.
let cssinjs;
if (typeof window !== 'undefined' && window.antdCssinjs) {
// Use window UMD version
cssinjs = window.antdCssinjs;
} else if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.antdCssinjs) {
// Use global UMD version
cssinjs = __webpack_require__.g.antdCssinjs;
} else {
// Use local version.
// Use relative path since webpack will also replace module here.
// eslint-disable-next-line antfu/no-import-node-modules-by-path
cssinjs = __webpack_require__(/*! ../node_modules/@ant-design/cssinjs */ "./node_modules/@ant-design/cssinjs/es/index.js");
}
module.exports = cssinjs;
/***/ }),
/***/ "./components sync recursive ^\\.\\/locale\\/[A-Za-z]+_[A-Za-z]+\\.tsx?$":
/*!******************************************************************!*\
!*** ./components/ sync ^\.\/locale\/[A-Za-z]+_[A-Za-z]+\.tsx?$ ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var map = {
"./locale/ar_EG.ts": "./components/locale/ar_EG.ts",
"./locale/az_AZ.ts": "./components/locale/az_AZ.ts",
"./locale/bg_BG.ts": "./components/locale/bg_BG.ts",
"./locale/bn_BD.ts": "./components/locale/bn_BD.ts",
"./locale/by_BY.ts": "./components/locale/by_BY.ts",
"./locale/ca_ES.ts": "./components/locale/ca_ES.ts",
"./locale/cs_CZ.ts": "./components/locale/cs_CZ.ts",
"./locale/da_DK.ts": "./components/locale/da_DK.ts",
"./locale/de_DE.ts": "./components/locale/de_DE.ts",
"./locale/el_GR.ts": "./components/locale/el_GR.ts",
"./locale/en_GB.ts": "./components/locale/en_GB.ts",
"./locale/en_US.ts": "./components/locale/en_US.ts",
"./locale/es_ES.ts": "./components/locale/es_ES.ts",
"./locale/et_EE.ts": "./components/locale/et_EE.ts",
"./locale/eu_ES.ts": "./components/locale/eu_ES.ts",
"./locale/fa_IR.ts": "./components/locale/fa_IR.ts",
"./locale/fi_FI.ts": "./components/locale/fi_FI.ts",
"./locale/fr_BE.ts": "./components/locale/fr_BE.ts",
"./locale/fr_CA.ts": "./components/locale/fr_CA.ts",
"./locale/fr_FR.ts": "./components/locale/fr_FR.ts",
"./locale/ga_IE.ts": "./components/locale/ga_IE.ts",
"./locale/gl_ES.ts": "./components/locale/gl_ES.ts",
"./locale/he_IL.ts": "./components/locale/he_IL.ts",
"./locale/hi_IN.ts": "./components/locale/hi_IN.ts",
"./locale/hr_HR.ts": "./components/locale/hr_HR.ts",
"./locale/hu_HU.ts": "./components/locale/hu_HU.ts",
"./locale/hy_AM.ts": "./components/locale/hy_AM.ts",
"./locale/id_ID.ts": "./components/locale/id_ID.ts",
"./locale/is_IS.ts": "./components/locale/is_IS.ts",
"./locale/it_IT.ts": "./components/locale/it_IT.ts",
"./locale/ja_JP.ts": "./components/locale/ja_JP.ts",
"./locale/ka_GE.ts": "./components/locale/ka_GE.ts",
"./locale/kk_KZ.ts": "./components/locale/kk_KZ.ts",
"./locale/km_KH.ts": "./components/locale/km_KH.ts",
"./locale/kmr_IQ.ts": "./components/locale/kmr_IQ.ts",
"./locale/kn_IN.ts": "./components/locale/kn_IN.ts",
"./locale/ko_KR.ts": "./components/locale/ko_KR.ts",
"./locale/ku_IQ.ts": "./components/locale/ku_IQ.ts",
"./locale/lt_LT.ts": "./components/locale/lt_LT.ts",
"./locale/lv_LV.ts": "./components/locale/lv_LV.ts",
"./locale/mk_MK.ts": "./components/locale/mk_MK.ts",
"./locale/ml_IN.ts": "./components/locale/ml_IN.ts",
"./locale/mn_MN.ts": "./components/locale/mn_MN.ts",
"./locale/ms_MY.ts": "./components/locale/ms_MY.ts",
"./locale/my_MM.ts": "./components/locale/my_MM.ts",
"./locale/nb_NO.ts": "./components/locale/nb_NO.ts",
"./locale/ne_NP.ts": "./components/locale/ne_NP.ts",
"./locale/nl_BE.ts": "./components/locale/nl_BE.ts",
"./locale/nl_NL.ts": "./components/locale/nl_NL.ts",
"./locale/pl_PL.ts": "./components/locale/pl_PL.ts",
"./locale/pt_BR.ts": "./components/locale/pt_BR.ts",
"./locale/pt_PT.ts": "./components/locale/pt_PT.ts",
"./locale/ro_RO.ts": "./components/locale/ro_RO.ts",
"./locale/ru_RU.ts": "./components/locale/ru_RU.ts",
"./locale/si_LK.ts": "./components/locale/si_LK.ts",
"./locale/sk_SK.ts": "./components/locale/sk_SK.ts",
"./locale/sl_SI.ts": "./components/locale/sl_SI.ts",
"./locale/sr_RS.ts": "./components/locale/sr_RS.ts",
"./locale/sv_SE.ts": "./components/locale/sv_SE.ts",
"./locale/ta_IN.ts": "./components/locale/ta_IN.ts",
"./locale/th_TH.ts": "./components/locale/th_TH.ts",
"./locale/tk_TK.ts": "./components/locale/tk_TK.ts",
"./locale/tr_TR.ts": "./components/locale/tr_TR.ts",
"./locale/uk_UA.ts": "./components/locale/uk_UA.ts",
"./locale/ur_PK.ts": "./components/locale/ur_PK.ts",
"./locale/uz_UZ.ts": "./components/locale/uz_UZ.ts",
"./locale/vi_VN.ts": "./components/locale/vi_VN.ts",
"./locale/zh_CN.ts": "./components/locale/zh_CN.ts",
"./locale/zh_HK.ts": "./components/locale/zh_HK.ts",
"./locale/zh_TW.ts": "./components/locale/zh_TW.ts"
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
if(!__webpack_require__.o(map, req)) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return map[req];
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./components sync recursive ^\\.\\/locale\\/[A-Za-z]+_[A-Za-z]+\\.tsx?$";
/***/ }),
/***/ "./components/_util/hooks/useZIndex.ts":
/*!*********************************************!*\
!*** ./components/_util/hooks/useZIndex.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ CONTAINER_MAX_OFFSET: function() { return /* binding */ CONTAINER_MAX_OFFSET; },
/* harmony export */ useZIndex: function() { return /* binding */ useZIndex; }
/* harmony export */ });
/* unused harmony exports containerBaseZIndexOffset, consumerBaseZIndexOffset */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _theme_useToken__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/useToken */ "./components/theme/useToken.ts");
/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../warning */ "./components/_util/warning.ts");
/* harmony import */ var _zindexContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../zindexContext */ "./components/_util/zindexContext.ts");
// Z-Index control range
// Container: 1000 + offset 100 (max base + 10 * offset = 2000)
// Popover: offset 50
// Notification: Container Max zIndex + componentOffset
const CONTAINER_OFFSET = 100;
const CONTAINER_OFFSET_MAX_COUNT = 10;
const CONTAINER_MAX_OFFSET = CONTAINER_OFFSET * CONTAINER_OFFSET_MAX_COUNT;
/**
* Static function will default be the `CONTAINER_MAX_OFFSET`.
* But it still may have children component like Select, Dropdown.
* So the warning zIndex should exceed the `CONTAINER_MAX_OFFSET`.
*/
const CONTAINER_MAX_OFFSET_WITH_CHILDREN = CONTAINER_MAX_OFFSET + CONTAINER_OFFSET;
const containerBaseZIndexOffset = {
Modal: CONTAINER_OFFSET,
Drawer: CONTAINER_OFFSET,
Popover: CONTAINER_OFFSET,
Popconfirm: CONTAINER_OFFSET,
Tooltip: CONTAINER_OFFSET,
Tour: CONTAINER_OFFSET,
FloatButton: CONTAINER_OFFSET
};
const consumerBaseZIndexOffset = {
SelectLike: 50,
Dropdown: 50,
DatePicker: 50,
Menu: 50,
ImagePreview: 1
};
function isContainerType(type) {
return type in containerBaseZIndexOffset;
}
const useZIndex = (componentType, customZIndex) => {
const [, token] = (0,_theme_useToken__WEBPACK_IMPORTED_MODULE_1__["default"])();
const parentZIndex = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_zindexContext__WEBPACK_IMPORTED_MODULE_2__["default"]);
const isContainer = isContainerType(componentType);
let result;
if (customZIndex !== undefined) {
result = [customZIndex, customZIndex];
} else {
let zIndex = parentZIndex !== null && parentZIndex !== void 0 ? parentZIndex : 0;
if (isContainer) {
zIndex +=
// Use preset token zIndex by default but not stack when has parent container
(parentZIndex ? 0 : token.zIndexPopupBase) +
// Container offset
containerBaseZIndexOffset[componentType];
} else {
zIndex += consumerBaseZIndexOffset[componentType];
}
result = [parentZIndex === undefined ? customZIndex : zIndex, zIndex];
}
if (true) {
const warning = (0,_warning__WEBPACK_IMPORTED_MODULE_3__.devUseWarning)(componentType);
const maxZIndex = token.zIndexPopupBase + CONTAINER_MAX_OFFSET_WITH_CHILDREN;
const currentZIndex = result[0] || 0;
true ? warning(customZIndex !== undefined || currentZIndex <= maxZIndex, 'usage', '`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.') : 0;
}
return result;
};
/***/ }),
/***/ "./components/_util/motion.ts":
/*!************************************!*\
!*** ./components/_util/motion.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ getTransitionName: function() { return /* binding */ getTransitionName; }
/* harmony export */ });
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/context.ts");
// ================== Collapse Motion ==================
const getCollapsedHeight = () => ({
height: 0,
opacity: 0
});
const getRealHeight = node => {
const {
scrollHeight
} = node;
return {
height: scrollHeight,
opacity: 1
};
};
const getCurrentHeight = node => ({
height: node ? node.offsetHeight : 0
});
const skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
const initCollapseMotion = function () {
let rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _config_provider__WEBPACK_IMPORTED_MODULE_0__.defaultPrefixCls;
return {
motionName: `${rootCls}-motion-collapse`,
onAppearStart: getCollapsedHeight,
onEnterStart: getCollapsedHeight,
onAppearActive: getRealHeight,
onEnterActive: getRealHeight,
onLeaveStart: getCurrentHeight,
onLeaveActive: getCollapsedHeight,
onAppearEnd: skipOpacityTransition,
onEnterEnd: skipOpacityTransition,
onLeaveEnd: skipOpacityTransition,
motionDeadline: 500
};
};
const _SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];
const getTransitionName = (rootPrefixCls, motion, transitionName) => {
if (transitionName !== undefined) {
return transitionName;
}
return `${rootPrefixCls}-${motion}`;
};
/* harmony default export */ __webpack_exports__["default"] = (initCollapseMotion);
/***/ }),
/***/ "./components/_util/reactNode.ts":
/*!***************************************!*\
!*** ./components/_util/reactNode.ts ***!
\***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ cloneElement: function() { return /* binding */ cloneElement; },
/* harmony export */ isFragment: function() { return /* binding */ isFragment; },
/* harmony export */ replaceElement: function() { return /* binding */ replaceElement; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function isFragment(child) {
return child && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(child) && child.type === (react__WEBPACK_IMPORTED_MODULE_0___default().Fragment);
}
const replaceElement = (element, replacement, props) => {
if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(element)) {
return replacement;
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
};
function cloneElement(element, props) {
return replaceElement(element, element, props);
}
/***/ }),
/***/ "./components/_util/warning.ts":
/*!*************************************!*\
!*** ./components/_util/warning.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ WarningContext: function() { return /* binding */ WarningContext; },
/* harmony export */ devUseWarning: function() { return /* binding */ devUseWarning; }
/* harmony export */ });
/* unused harmony exports noop, resetWarned */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/rc-util/es/warning.js");
function noop() {}
let deprecatedWarnList = null;
function resetWarned() {
deprecatedWarnList = null;
(0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__.resetWarned)();
}
// eslint-disable-next-line import/no-mutable-exports
let warning = noop;
if (true) {
warning = (valid, component, message) => {
(0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(valid, `[antd: ${component}] ${message}`);
// StrictMode will inject console which will not throw warning in React 17.
if (false) {}
};
}
const WarningContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});
/**
* This is a hook but we not named as `useWarning`
* since this is only used in development.
* We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition
*/
const devUseWarning = true ? component => {
const {
strict
} = react__WEBPACK_IMPORTED_MODULE_0__.useContext(WarningContext);
const typeWarning = (valid, type, message) => {
if (!valid) {
if (strict === false && type === 'deprecated') {
const existWarning = deprecatedWarnList;
if (!deprecatedWarnList) {
deprecatedWarnList = {};
}
deprecatedWarnList[component] = deprecatedWarnList[component] || [];
if (!deprecatedWarnList[component].includes(message || '')) {
deprecatedWarnList[component].push(message || '');
}
// Warning for the first time
if (!existWarning) {
console.warn('[antd] There exists deprecated usage in your code:', deprecatedWarnList);
}
} else {
true ? warning(valid, component, message) : 0;
}
}
};
typeWarning.deprecated = (valid, oldProp, newProp, message) => {
typeWarning(valid, 'deprecated', `\`${oldProp}\` is deprecated. Please use \`${newProp}\` instead.${message ? ` ${message}` : ''}`);
};
return typeWarning;
} : 0;
/* harmony default export */ __webpack_exports__["default"] = (warning);
/***/ }),
/***/ "./components/_util/zindexContext.ts":
/*!*******************************************!*\
!*** ./components/_util/zindexContext.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
const zIndexContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(undefined);
if (true) {
zIndexContext.displayName = 'zIndexContext';
}
/* harmony default export */ __webpack_exports__["default"] = (zIndexContext);
/***/ }),
/***/ "./components/affix/style/index.ts":
/*!*****************************************!*\
!*** ./components/affix/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
// ============================== Shared ==============================
const genSharedAffixStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
position: 'fixed',
zIndex: token.zIndexPopup
}
};
};
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexBase + 10
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('Affix', genSharedAffixStyle, prepareComponentToken));
/***/ }),
/***/ "./components/alert/style/index.ts":
/*!*****************************************!*\
!*** ./components/alert/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony exports genBaseStyle, genTypeStyle, genActionStyle, prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({
background: bgColor,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${borderColor}`,
[`${alertCls}-icon`]: {
color: iconColor
}
});
const genBaseStyle = token => {
const {
componentCls,
motionDurationSlow: duration,
marginXS,
marginSM,
fontSize,
fontSizeLG,
lineHeight,
borderRadiusLG: borderRadius,
motionEaseInOutCirc,
withDescriptionIconSize,
colorText,
colorTextHeading,
withDescriptionPadding,
defaultPadding
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'relative',
display: 'flex',
alignItems: 'center',
padding: defaultPadding,
wordWrap: 'break-word',
borderRadius,
[`&${componentCls}-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-content`]: {
flex: 1,
minWidth: 0
},
[`${componentCls}-icon`]: {
marginInlineEnd: marginXS,
lineHeight: 0
},
'&-description': {
display: 'none',
fontSize,
lineHeight
},
'&-message': {
color: colorTextHeading
},
[`&${componentCls}-motion-leave`]: {
overflow: 'hidden',
opacity: 1,
transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
margin-bottom ${duration} ${motionEaseInOutCirc}`
},
[`&${componentCls}-motion-leave-active`]: {
maxHeight: 0,
marginBottom: '0 !important',
paddingTop: 0,
paddingBottom: 0,
opacity: 0
}
}),
[`${componentCls}-with-description`]: {
alignItems: 'flex-start',
padding: withDescriptionPadding,
[`${componentCls}-icon`]: {
marginInlineEnd: marginSM,
fontSize: withDescriptionIconSize,
lineHeight: 0
},
[`${componentCls}-message`]: {
display: 'block',
marginBottom: marginXS,
color: colorTextHeading,
fontSize: fontSizeLG
},
[`${componentCls}-description`]: {
display: 'block',
color: colorText
}
},
[`${componentCls}-banner`]: {
marginBottom: 0,
border: '0 !important',
borderRadius: 0
}
};
};
const genTypeStyle = token => {
const {
componentCls,
colorSuccess,
colorSuccessBorder,
colorSuccessBg,
colorWarning,
colorWarningBorder,
colorWarningBg,
colorError,
colorErrorBorder,
colorErrorBg,
colorInfo,
colorInfoBorder,
colorInfoBg
} = token;
return {
[componentCls]: {
'&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),
'&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),
'&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),
'&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {
[`${componentCls}-description > pre`]: {
margin: 0,
padding: 0
}
})
}
};
};
const genActionStyle = token => {
const {
componentCls,
iconCls,
motionDurationMid,
marginXS,
fontSizeIcon,
colorIcon,
colorIconHover
} = token;
return {
[componentCls]: {
'&-action': {
marginInlineStart: marginXS
},
[`${componentCls}-close-icon`]: {
marginInlineStart: marginXS,
padding: 0,
overflow: 'hidden',
fontSize: fontSizeIcon,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(fontSizeIcon),
backgroundColor: 'transparent',
border: 'none',
outline: 'none',
cursor: 'pointer',
[`${iconCls}-close`]: {
color: colorIcon,
transition: `color ${motionDurationMid}`,
'&:hover': {
color: colorIconHover
}
}
},
'&-close-text': {
color: colorIcon,
transition: `color ${motionDurationMid}`,
'&:hover': {
color: colorIconHover
}
}
}
};
};
const prepareComponentToken = token => {
const paddingHorizontal = 12; // Fixed value here.
return {
withDescriptionIconSize: token.fontSizeHeading3,
defaultPadding: `${token.paddingContentVerticalSM}px ${paddingHorizontal}px`,
withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Alert', token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)], prepareComponentToken));
/***/ }),
/***/ "./components/anchor/style/index.ts":
/*!******************************************!*\
!*** ./components/anchor/style/index.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Shared ==============================
const genSharedAnchorStyle = token => {
const {
componentCls,
holderOffsetBlock,
motionDurationSlow,
lineWidthBold,
colorPrimary,
lineType,
colorSplit,
calc
} = token;
return {
[`${componentCls}-wrapper`]: {
marginBlockStart: calc(holderOffsetBlock).mul(-1).equal(),
paddingBlockStart: holderOffsetBlock,
// delete overflow: auto
// overflow: 'auto',
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'relative',
paddingInlineStart: lineWidthBold,
[`${componentCls}-link`]: {
paddingBlock: token.linkPaddingBlock,
paddingInline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.linkPaddingInlineStart)} 0`,
'&-title': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_0__.textEllipsis), {
position: 'relative',
display: 'block',
marginBlockEnd: token.anchorTitleBlock,
color: token.colorText,
transition: `all ${token.motionDurationSlow}`,
'&:only-child': {
marginBlockEnd: 0
}
}),
[`&-active > ${componentCls}-link-title`]: {
color: token.colorPrimary
},
// link link
[`${componentCls}-link`]: {
paddingBlock: token.anchorPaddingBlockSecondary
}
}
}),
[`&:not(${componentCls}-wrapper-horizontal)`]: {
[componentCls]: {
'&::before': {
position: 'absolute',
insetInlineStart: 0,
top: 0,
height: '100%',
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidthBold)} ${lineType} ${colorSplit}`,
content: '" "'
},
[`${componentCls}-ink`]: {
position: 'absolute',
insetInlineStart: 0,
display: 'none',
transform: 'translateY(-50%)',
transition: `top ${motionDurationSlow} ease-in-out`,
width: lineWidthBold,
backgroundColor: colorPrimary,
[`&${componentCls}-ink-visible`]: {
display: 'inline-block'
}
}
}
},
[`${componentCls}-fixed ${componentCls}-ink ${componentCls}-ink`]: {
display: 'none'
}
}
};
};
const genSharedAnchorHorizontalStyle = token => {
const {
componentCls,
motionDurationSlow,
lineWidthBold,
colorPrimary
} = token;
return {
[`${componentCls}-wrapper-horizontal`]: {
position: 'relative',
'&::before': {
position: 'absolute',
left: {
_skip_check_: true,
value: 0
},
right: {
_skip_check_: true,
value: 0
},
bottom: 0,
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
content: '" "'
},
[componentCls]: {
overflowX: 'scroll',
position: 'relative',
display: 'flex',
scrollbarWidth: 'none' /* Firefox */,
'&::-webkit-scrollbar': {
display: 'none' /* Safari and Chrome */
},
[`${componentCls}-link:first-of-type`]: {
paddingInline: 0
},
[`${componentCls}-ink`]: {
position: 'absolute',
bottom: 0,
transition: `left ${motionDurationSlow} ease-in-out, width ${motionDurationSlow} ease-in-out`,
height: lineWidthBold,
backgroundColor: colorPrimary
}
}
}
};
};
const prepareComponentToken = token => ({
linkPaddingBlock: token.paddingXXS,
linkPaddingInlineStart: token.padding
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Anchor', token => {
const {
fontSize,
fontSizeLG,
paddingXXS,
calc
} = token;
const anchorToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
holderOffsetBlock: paddingXXS,
anchorPaddingBlockSecondary: calc(paddingXXS).div(2).equal(),
anchorTitleBlock: calc(fontSize).div(14).mul(3).equal(),
anchorBallSize: calc(fontSizeLG).div(2).equal()
});
return [genSharedAnchorStyle(anchorToken), genSharedAnchorHorizontalStyle(anchorToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/app/style/index.ts":
/*!***************************************!*\
!*** ./components/app/style/index.ts ***!
\***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
colorText,
fontSize,
lineHeight,
fontFamily
} = token;
return {
[componentCls]: {
color: colorText,
fontSize,
lineHeight,
fontFamily,
[`&${componentCls}-rtl`]: {
direction: 'rtl'
}
}
};
};
const prepareComponentToken = () => ({});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('App', genBaseStyle, prepareComponentToken));
/***/ }),
/***/ "./components/avatar/style/index.ts":
/*!******************************************!*\
!*** ./components/avatar/style/index.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBaseStyle = token => {
const {
antCls,
componentCls,
iconCls,
avatarBg,
avatarColor,
containerSize,
containerSizeLG,
containerSizeSM,
textFontSize,
textFontSizeLG,
textFontSizeSM,
borderRadius,
borderRadiusLG,
borderRadiusSM,
lineWidth,
lineType
} = token;
// Avatar size style
const avatarSizeStyle = (size, fontSize, radius) => ({
width: size,
height: size,
borderRadius: '50%',
[`&${componentCls}-square`]: {
borderRadius: radius
},
[`&${componentCls}-icon`]: {
fontSize,
[`> ${iconCls}`]: {
margin: 0
}
}
});
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'relative',
display: 'inline-flex',
justifyContent: 'center',
alignItems: 'center',
overflow: 'hidden',
color: avatarColor,
whiteSpace: 'nowrap',
textAlign: 'center',
verticalAlign: 'middle',
background: avatarBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} transparent`,
'&-image': {
background: 'transparent'
},
[`${antCls}-image-img`]: {
display: 'block'
}
}), avatarSizeStyle(containerSize, textFontSize, borderRadius)), {
'&-lg': Object.assign({}, avatarSizeStyle(containerSizeLG, textFontSizeLG, borderRadiusLG)),
'&-sm': Object.assign({}, avatarSizeStyle(containerSizeSM, textFontSizeSM, borderRadiusSM)),
'> img': {
display: 'block',
width: '100%',
height: '100%',
objectFit: 'cover'
}
})
};
};
const genGroupStyle = token => {
const {
componentCls,
groupBorderColor,
groupOverlapping,
groupSpace
} = token;
return {
[`${componentCls}-group`]: {
display: 'inline-flex',
[componentCls]: {
borderColor: groupBorderColor
},
'> *:not(:first-child)': {
marginInlineStart: groupOverlapping
}
},
[`${componentCls}-group-popover`]: {
[`${componentCls} + ${componentCls}`]: {
marginInlineStart: groupSpace
}
}
};
};
const prepareComponentToken = token => {
const {
controlHeight,
controlHeightLG,
controlHeightSM,
fontSize,
fontSizeLG,
fontSizeXL,
fontSizeHeading3,
marginXS,
marginXXS,
colorBorderBg
} = token;
return {
containerSize: controlHeight,
containerSizeLG: controlHeightLG,
containerSizeSM: controlHeightSM,
textFontSize: Math.round((fontSizeLG + fontSizeXL) / 2),
textFontSizeLG: fontSizeHeading3,
textFontSizeSM: fontSize,
groupSpace: marginXXS,
groupOverlapping: -marginXS,
groupBorderColor: colorBorderBg
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Avatar', token => {
const {
colorTextLightSolid,
colorTextPlaceholder
} = token;
const avatarToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
avatarBg: colorTextPlaceholder,
avatarColor: colorTextLightSolid
});
return [genBaseStyle(avatarToken), genGroupStyle(avatarToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/back-top/style/index.ts":
/*!********************************************!*\
!*** ./components/back-top/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Shared ==============================
const genSharedBackTopStyle = token => {
const {
componentCls,
backTopFontSize,
backTopSize,
zIndexPopup
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'fixed',
insetInlineEnd: token.backTopInlineEnd,
insetBlockEnd: token.backTopBlockEnd,
zIndex: zIndexPopup,
width: 40,
height: 40,
cursor: 'pointer',
'&:empty': {
display: 'none'
},
[`${componentCls}-content`]: {
width: backTopSize,
height: backTopSize,
overflow: 'hidden',
color: token.backTopColor,
textAlign: 'center',
backgroundColor: token.backTopBackground,
borderRadius: backTopSize,
transition: `all ${token.motionDurationMid}`,
'&:hover': {
backgroundColor: token.backTopHoverBackground,
transition: `all ${token.motionDurationMid}`
}
},
// change to .backtop .backtop-icon
[`${componentCls}-icon`]: {
fontSize: backTopFontSize,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(backTopSize)
}
})
};
};
const genMediaBackTopStyle = token => {
const {
componentCls,
screenMD,
screenXS,
backTopInlineEndMD,
backTopInlineEndXS
} = token;
return {
[`@media (max-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(screenMD)})`]: {
[componentCls]: {
insetInlineEnd: backTopInlineEndMD
}
},
[`@media (max-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(screenXS)})`]: {
[componentCls]: {
insetInlineEnd: backTopInlineEndXS
}
}
};
};
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexBase + 10
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('BackTop', token => {
const {
fontSizeHeading3,
colorTextDescription,
colorTextLightSolid,
colorText,
controlHeightLG,
calc
} = token;
const backTopToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
backTopBackground: colorTextDescription,
backTopColor: colorTextLightSolid,
backTopHoverBackground: colorText,
backTopFontSize: fontSizeHeading3,
backTopSize: controlHeightLG,
backTopBlockEnd: calc(controlHeightLG).mul(1.25).equal(),
backTopInlineEnd: calc(controlHeightLG).mul(2.5).equal(),
backTopInlineEndMD: calc(controlHeightLG).mul(1.5).equal(),
backTopInlineEndXS: calc(controlHeightLG).mul(0.5).equal()
});
return [genSharedBackTopStyle(backTopToken), genMediaBackTopStyle(backTopToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/badge/style/index.ts":
/*!*****************************************!*\
!*** ./components/badge/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
/* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genPresetColor.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const antStatusProcessing = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antStatusProcessing', {
'0%': {
transform: 'scale(0.8)',
opacity: 0.5
},
'100%': {
transform: 'scale(2.4)',
opacity: 0
}
});
const antZoomBadgeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBadgeIn', {
'0%': {
transform: 'scale(0) translate(50%, -50%)',
opacity: 0
},
'100%': {
transform: 'scale(1) translate(50%, -50%)'
}
});
const antZoomBadgeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBadgeOut', {
'0%': {
transform: 'scale(1) translate(50%, -50%)'
},
'100%': {
transform: 'scale(0) translate(50%, -50%)',
opacity: 0
}
});
const antNoWrapperZoomBadgeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antNoWrapperZoomBadgeIn', {
'0%': {
transform: 'scale(0)',
opacity: 0
},
'100%': {
transform: 'scale(1)'
}
});
const antNoWrapperZoomBadgeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antNoWrapperZoomBadgeOut', {
'0%': {
transform: 'scale(1)'
},
'100%': {
transform: 'scale(0)',
opacity: 0
}
});
const antBadgeLoadingCircle = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antBadgeLoadingCircle', {
'0%': {
transformOrigin: '50%'
},
'100%': {
transform: 'translate(50%, -50%) rotate(360deg)',
transformOrigin: '50%'
}
});
const genSharedBadgeStyle = token => {
const {
componentCls,
iconCls,
antCls,
badgeShadowSize,
textFontSize,
textFontSizeSM,
statusSize,
dotSize,
textFontWeight,
indicatorHeight,
indicatorHeightSM,
marginXS,
calc
} = token;
const numberPrefixCls = `${antCls}-scroll-number`;
const colorPreset = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__["default"])(token, (colorKey, _ref) => {
let {
darkColor
} = _ref;
return {
[`&${componentCls} ${componentCls}-color-${colorKey}`]: {
background: darkColor,
[`&:not(${componentCls}-count)`]: {
color: darkColor
},
'a:hover &': {
background: darkColor
}
}
};
});
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
position: 'relative',
display: 'inline-block',
width: 'fit-content',
lineHeight: 1,
[`${componentCls}-count`]: {
display: 'inline-flex',
justifyContent: 'center',
zIndex: token.indicatorZIndex,
minWidth: indicatorHeight,
height: indicatorHeight,
color: token.badgeTextColor,
fontWeight: textFontWeight,
fontSize: textFontSize,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(indicatorHeight),
whiteSpace: 'nowrap',
textAlign: 'center',
background: token.badgeColor,
borderRadius: calc(indicatorHeight).div(2).equal(),
boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(badgeShadowSize)} ${token.badgeShadowColor}`,
transition: `background ${token.motionDurationMid}`,
a: {
color: token.badgeTextColor
},
'a:hover': {
color: token.badgeTextColor
},
'a:hover &': {
background: token.badgeColorHover
}
},
[`${componentCls}-count-sm`]: {
minWidth: indicatorHeightSM,
height: indicatorHeightSM,
fontSize: textFontSizeSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(indicatorHeightSM),
borderRadius: calc(indicatorHeightSM).div(2).equal()
},
[`${componentCls}-multiple-words`]: {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)}`,
bdi: {
unicodeBidi: 'plaintext'
}
},
[`${componentCls}-dot`]: {
zIndex: token.indicatorZIndex,
width: dotSize,
minWidth: dotSize,
height: dotSize,
background: token.badgeColor,
borderRadius: '100%',
boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(badgeShadowSize)} ${token.badgeShadowColor}`
},
[`${componentCls}-count, ${componentCls}-dot, ${numberPrefixCls}-custom-component`]: {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
transform: 'translate(50%, -50%)',
transformOrigin: '100% 0%',
[`&${iconCls}-spin`]: {
animationName: antBadgeLoadingCircle,
animationDuration: '1s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear'
}
},
[`&${componentCls}-status`]: {
lineHeight: 'inherit',
verticalAlign: 'baseline',
[`${componentCls}-status-dot`]: {
position: 'relative',
top: -1,
// Magic number, but seems better experience
display: 'inline-block',
width: statusSize,
height: statusSize,
verticalAlign: 'middle',
borderRadius: '50%'
},
[`${componentCls}-status-success`]: {
backgroundColor: token.colorSuccess
},
[`${componentCls}-status-processing`]: {
overflow: 'visible',
color: token.colorInfo,
backgroundColor: token.colorInfo,
borderColor: 'currentcolor',
'&::after': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: '100%',
height: '100%',
borderWidth: badgeShadowSize,
borderStyle: 'solid',
borderColor: 'inherit',
borderRadius: '50%',
animationName: antStatusProcessing,
animationDuration: token.badgeProcessingDuration,
animationIterationCount: 'infinite',
animationTimingFunction: 'ease-in-out',
content: '""'
}
},
[`${componentCls}-status-default`]: {
backgroundColor: token.colorTextPlaceholder
},
[`${componentCls}-status-error`]: {
backgroundColor: token.colorError
},
[`${componentCls}-status-warning`]: {
backgroundColor: token.colorWarning
},
[`${componentCls}-status-text`]: {
marginInlineStart: marginXS,
color: token.colorText,
fontSize: token.fontSize
}
}
}), colorPreset), {
[`${componentCls}-zoom-appear, ${componentCls}-zoom-enter`]: {
animationName: antZoomBadgeIn,
animationDuration: token.motionDurationSlow,
animationTimingFunction: token.motionEaseOutBack,
animationFillMode: 'both'
},
[`${componentCls}-zoom-leave`]: {
animationName: antZoomBadgeOut,
animationDuration: token.motionDurationSlow,
animationTimingFunction: token.motionEaseOutBack,
animationFillMode: 'both'
},
[`&${componentCls}-not-a-wrapper`]: {
[`${componentCls}-zoom-appear, ${componentCls}-zoom-enter`]: {
animationName: antNoWrapperZoomBadgeIn,
animationDuration: token.motionDurationSlow,
animationTimingFunction: token.motionEaseOutBack
},
[`${componentCls}-zoom-leave`]: {
animationName: antNoWrapperZoomBadgeOut,
animationDuration: token.motionDurationSlow,
animationTimingFunction: token.motionEaseOutBack
},
[`&:not(${componentCls}-status)`]: {
verticalAlign: 'middle'
},
[`${numberPrefixCls}-custom-component, ${componentCls}-count`]: {
transform: 'none'
},
[`${numberPrefixCls}-custom-component, ${numberPrefixCls}`]: {
position: 'relative',
top: 'auto',
display: 'block',
transformOrigin: '50% 50%'
}
},
[numberPrefixCls]: {
overflow: 'hidden',
transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack}`,
[`${numberPrefixCls}-only`]: {
position: 'relative',
display: 'inline-block',
height: indicatorHeight,
transition: `all ${token.motionDurationSlow} ${token.motionEaseOutBack}`,
WebkitTransformStyle: 'preserve-3d',
WebkitBackfaceVisibility: 'hidden',
[`> p${numberPrefixCls}-only-unit`]: {
height: indicatorHeight,
margin: 0,
WebkitTransformStyle: 'preserve-3d',
WebkitBackfaceVisibility: 'hidden'
}
},
[`${numberPrefixCls}-symbol`]: {
verticalAlign: 'top'
}
},
// ====================== RTL =======================
'&-rtl': {
direction: 'rtl',
[`${componentCls}-count, ${componentCls}-dot, ${numberPrefixCls}-custom-component`]: {
transform: 'translate(-50%, -50%)'
}
}
})
};
};
// ============================== Export ==============================
const prepareToken = token => {
const {
fontHeight,
lineWidth,
marginXS,
colorBorderBg
} = token;
const badgeFontHeight = fontHeight;
const badgeShadowSize = lineWidth;
const badgeTextColor = token.colorTextLightSolid;
const badgeColor = token.colorError;
const badgeColorHover = token.colorErrorHover;
const badgeToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
badgeFontHeight,
badgeShadowSize,
badgeTextColor,
badgeColor,
badgeColorHover,
badgeShadowColor: colorBorderBg,
badgeProcessingDuration: '1.2s',
badgeRibbonOffset: marginXS,
// Follow token just by Design. Not related with token
badgeRibbonCornerTransform: 'scaleY(0.75)',
badgeRibbonCornerFilter: `brightness(75%)`
});
return badgeToken;
};
const prepareComponentToken = token => {
const {
fontSize,
lineHeight,
fontSizeSM,
lineWidth
} = token;
return {
indicatorZIndex: 'auto',
indicatorHeight: Math.round(fontSize * lineHeight) - 2 * lineWidth,
indicatorHeightSM: fontSize,
dotSize: fontSizeSM / 2,
textFontSize: fontSizeSM,
textFontSizeSM: fontSizeSM,
textFontWeight: 'normal',
statusSize: fontSizeSM / 2
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Badge', token => {
const badgeToken = prepareToken(token);
return genSharedBadgeStyle(badgeToken);
}, prepareComponentToken));
/***/ }),
/***/ "./components/breadcrumb/style/index.ts":
/*!**********************************************!*\
!*** ./components/breadcrumb/style/index.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBreadcrumbStyle = token => {
const {
componentCls,
iconCls,
calc
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
color: token.itemColor,
fontSize: token.fontSize,
[iconCls]: {
fontSize: token.iconFontSize
},
ol: {
display: 'flex',
flexWrap: 'wrap',
margin: 0,
padding: 0,
listStyle: 'none'
},
a: Object.assign({
color: token.linkColor,
transition: `color ${token.motionDurationMid}`,
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingXXS)}`,
borderRadius: token.borderRadiusSM,
height: token.fontHeight,
display: 'inline-block',
marginInline: calc(token.marginXXS).mul(-1).equal(),
'&:hover': {
color: token.linkHoverColor,
backgroundColor: token.colorBgTextHover
}
}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.genFocusStyle)(token)),
'li:last-child': {
color: token.lastItemColor
},
[`${componentCls}-separator`]: {
marginInline: token.separatorMargin,
color: token.separatorColor
},
[`${componentCls}-link`]: {
[`
> ${iconCls} + span,
> ${iconCls} + a
`]: {
marginInlineStart: token.marginXXS
}
},
[`${componentCls}-overlay-link`]: {
borderRadius: token.borderRadiusSM,
height: token.fontHeight,
display: 'inline-block',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingXXS)}`,
marginInline: calc(token.marginXXS).mul(-1).equal(),
[`> ${iconCls}`]: {
marginInlineStart: token.marginXXS,
fontSize: token.fontSizeIcon
},
'&:hover': {
color: token.linkHoverColor,
backgroundColor: token.colorBgTextHover,
a: {
color: token.linkHoverColor
}
},
a: {
'&:hover': {
backgroundColor: 'transparent'
}
}
},
// rtl style
[`&${token.componentCls}-rtl`]: {
direction: 'rtl'
}
})
};
};
const prepareComponentToken = token => ({
itemColor: token.colorTextDescription,
lastItemColor: token.colorText,
iconFontSize: token.fontSize,
linkColor: token.colorTextDescription,
linkHoverColor: token.colorText,
separatorColor: token.colorTextDescription,
separatorMargin: token.marginXS
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Breadcrumb', token => {
const breadcrumbToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {});
return genBreadcrumbStyle(breadcrumbToken);
}, prepareComponentToken));
/***/ }),
/***/ "./components/button/style/index.ts":
/*!******************************************************!*\
!*** ./components/button/style/index.ts + 1 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ button_style; }
});
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/theme/interface/presetColors.ts
var presetColors = __webpack_require__("./components/theme/interface/presetColors.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
;// ./components/button/style/group.ts
const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
// Border
[`> span, > ${buttonTypeCls}`]: {
'&:not(:last-child)': {
[`&, & > ${buttonTypeCls}`]: {
'&:not(:disabled)': {
borderInlineEndColor: borderColor
}
}
},
'&:not(:first-child)': {
[`&, & > ${buttonTypeCls}`]: {
'&:not(:disabled)': {
borderInlineStartColor: borderColor
}
}
}
}
});
const genGroupStyle = token => {
const {
componentCls,
fontSize,
lineWidth,
groupBorderColor,
colorErrorHover
} = token;
return {
[`${componentCls}-group`]: [{
position: 'relative',
display: 'inline-flex',
// Border
[`> span, > ${componentCls}`]: {
'&:not(:last-child)': {
[`&, & > ${componentCls}`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
'&:not(:first-child)': {
marginInlineStart: token.calc(lineWidth).mul(-1).equal(),
[`&, & > ${componentCls}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
}
},
[componentCls]: {
position: 'relative',
zIndex: 1,
'&:hover, &:focus, &:active': {
zIndex: 2
},
'&[disabled]': {
zIndex: 0
}
},
[`${componentCls}-icon-only`]: {
fontSize
}
},
// Border Color
genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
};
};
/* harmony default export */ var group = (genGroupStyle);
// EXTERNAL MODULE: ./components/button/style/token.ts
var style_token = __webpack_require__("./components/button/style/token.ts");
;// ./components/button/style/index.ts
// ============================== Shared ==============================
const genSharedButtonStyle = token => {
const {
componentCls,
iconCls,
fontWeight,
opacityLoading,
motionDurationSlow,
motionEaseInOut,
marginXS,
calc
} = token;
return {
[componentCls]: {
outline: 'none',
position: 'relative',
display: 'inline-flex',
gap: token.marginXS,
alignItems: 'center',
justifyContent: 'center',
fontWeight,
whiteSpace: 'nowrap',
textAlign: 'center',
backgroundImage: 'none',
background: 'transparent',
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
cursor: 'pointer',
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
userSelect: 'none',
touchAction: 'manipulation',
color: token.colorText,
'&:disabled > *': {
pointerEvents: 'none'
},
// https://github.com/ant-design/ant-design/issues/51380
[`${componentCls}-icon > svg`]: (0,style.resetIcon)(),
'> a': {
color: 'currentColor'
},
'&:not(:disabled)': (0,style.genFocusStyle)(token),
[`&${componentCls}-two-chinese-chars::first-letter`]: {
letterSpacing: '0.34em'
},
[`&${componentCls}-two-chinese-chars > *:not(${iconCls})`]: {
marginInlineEnd: '-0.34em',
letterSpacing: '0.34em'
},
[`&${componentCls}-icon-only`]: {
paddingInline: 0,
// make `btn-icon-only` not too narrow
[`&${componentCls}-compact-item`]: {
flex: 'none'
},
[`&${componentCls}-round`]: {
width: 'auto'
}
},
// Loading
[`&${componentCls}-loading`]: {
opacity: opacityLoading,
cursor: 'default'
},
[`${componentCls}-loading-icon`]: {
transition: ['width', 'opacity', 'margin'].map(transition => `${transition} ${motionDurationSlow} ${motionEaseInOut}`).join(',')
},
// iconPosition
[`&:not(${componentCls}-icon-end)`]: {
[`${componentCls}-loading-icon-motion`]: {
'&-appear-start, &-enter-start': {
marginInlineEnd: calc(marginXS).mul(-1).equal()
},
'&-appear-active, &-enter-active': {
marginInlineEnd: 0
},
'&-leave-start': {
marginInlineEnd: 0
},
'&-leave-active': {
marginInlineEnd: calc(marginXS).mul(-1).equal()
}
}
},
'&-icon-end': {
flexDirection: 'row-reverse',
[`${componentCls}-loading-icon-motion`]: {
'&-appear-start, &-enter-start': {
marginInlineStart: calc(marginXS).mul(-1).equal()
},
'&-appear-active, &-enter-active': {
marginInlineStart: 0
},
'&-leave-start': {
marginInlineStart: 0
},
'&-leave-active': {
marginInlineStart: calc(marginXS).mul(-1).equal()
}
}
}
}
};
};
const genHoverActiveButtonStyle = (btnCls, hoverStyle, activeStyle) => ({
[`&:not(:disabled):not(${btnCls}-disabled)`]: {
'&:hover': hoverStyle,
'&:active': activeStyle
}
});
// ============================== Shape ===============================
const genCircleButtonStyle = token => ({
minWidth: token.controlHeight,
paddingInlineStart: 0,
paddingInlineEnd: 0,
borderRadius: '50%'
});
const genRoundButtonStyle = token => ({
borderRadius: token.controlHeight,
paddingInlineStart: token.calc(token.controlHeight).div(2).equal(),
paddingInlineEnd: token.calc(token.controlHeight).div(2).equal()
});
const genDisabledStyle = token => ({
cursor: 'not-allowed',
borderColor: token.borderColorDisabled,
color: token.colorTextDisabled,
background: token.colorBgContainerDisabled,
boxShadow: 'none'
});
const genGhostButtonStyle = (btnCls, background, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) => ({
[`&${btnCls}-background-ghost`]: Object.assign(Object.assign({
color: textColor || undefined,
background,
borderColor: borderColor || undefined,
boxShadow: 'none'
}, genHoverActiveButtonStyle(btnCls, Object.assign({
background
}, hoverStyle), Object.assign({
background
}, activeStyle))), {
'&:disabled': {
cursor: 'not-allowed',
color: textColorDisabled || undefined,
borderColor: borderColorDisabled || undefined
}
})
});
const genSolidDisabledButtonStyle = token => ({
[`&:disabled, &${token.componentCls}-disabled`]: Object.assign({}, genDisabledStyle(token))
});
const genPureDisabledButtonStyle = token => ({
[`&:disabled, &${token.componentCls}-disabled`]: {
cursor: 'not-allowed',
color: token.colorTextDisabled
}
});
// ============================== Variant =============================
const genVariantButtonStyle = (token, hoverStyle, activeStyle, variant) => {
const isPureDisabled = variant && ['link', 'text'].includes(variant);
const genDisabledButtonStyle = isPureDisabled ? genPureDisabledButtonStyle : genSolidDisabledButtonStyle;
return Object.assign(Object.assign({}, genDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, hoverStyle, activeStyle));
};
const genSolidButtonStyle = (token, textColor, background, hoverStyle, activeStyle) => ({
[`&${token.componentCls}-variant-solid`]: Object.assign({
color: textColor,
background
}, genVariantButtonStyle(token, hoverStyle, activeStyle))
});
const genOutlinedDashedButtonStyle = (token, borderColor, background, hoverStyle, activeStyle) => ({
[`&${token.componentCls}-variant-outlined, &${token.componentCls}-variant-dashed`]: Object.assign({
borderColor,
background
}, genVariantButtonStyle(token, hoverStyle, activeStyle))
});
const genDashedButtonStyle = token => ({
[`&${token.componentCls}-variant-dashed`]: {
borderStyle: 'dashed'
}
});
const genFilledButtonStyle = (token, background, hoverStyle, activeStyle) => ({
[`&${token.componentCls}-variant-filled`]: Object.assign({
boxShadow: 'none',
background
}, genVariantButtonStyle(token, hoverStyle, activeStyle))
});
const genTextLinkButtonStyle = (token, textColor, variant, hoverStyle, activeStyle) => ({
[`&${token.componentCls}-variant-${variant}`]: Object.assign({
color: textColor,
boxShadow: 'none'
}, genVariantButtonStyle(token, hoverStyle, activeStyle, variant))
});
// =============================== Color ==============================
const genPresetColorStyle = token => {
const {
componentCls
} = token;
return presetColors.PresetColors.reduce((prev, colorKey) => {
const darkColor = token[`${colorKey}6`];
const lightColor = token[`${colorKey}1`];
const hoverColor = token[`${colorKey}5`];
const lightHoverColor = token[`${colorKey}2`];
const lightBorderColor = token[`${colorKey}3`];
const activeColor = token[`${colorKey}7`];
return Object.assign(Object.assign({}, prev), {
[`&${componentCls}-color-${colorKey}`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
color: darkColor,
boxShadow: token[`${colorKey}ShadowColor`]
}, genSolidButtonStyle(token, token.colorTextLightSolid, darkColor, {
background: hoverColor
}, {
background: activeColor
})), genOutlinedDashedButtonStyle(token, darkColor, token.colorBgContainer, {
color: hoverColor,
borderColor: hoverColor,
background: token.colorBgContainer
}, {
color: activeColor,
borderColor: activeColor,
background: token.colorBgContainer
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, lightColor, {
background: lightHoverColor
}, {
background: lightBorderColor
})), genTextLinkButtonStyle(token, darkColor, 'link', {
color: hoverColor
}, {
color: activeColor
})), genTextLinkButtonStyle(token, darkColor, 'text', {
color: hoverColor,
background: lightColor
}, {
color: activeColor,
background: lightBorderColor
}))
});
}, {});
};
const genDefaultButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
color: token.defaultColor,
boxShadow: token.defaultShadow
}, genSolidButtonStyle(token, token.solidTextColor, token.colorBgSolid, {
color: token.solidTextColor,
background: token.colorBgSolidHover
}, {
color: token.solidTextColor,
background: token.colorBgSolidActive
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {
background: token.colorFillSecondary
}, {
background: token.colorFill
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
color: token.colorLinkHover,
background: token.linkHoverBg
}, {
color: token.colorLinkActive
}));
const genPrimaryButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
color: token.colorPrimary,
boxShadow: token.primaryShadow
}, genOutlinedDashedButtonStyle(token, token.colorPrimary, token.colorBgContainer, {
color: token.colorPrimaryTextHover,
borderColor: token.colorPrimaryHover,
background: token.colorBgContainer
}, {
color: token.colorPrimaryTextActive,
borderColor: token.colorPrimaryActive,
background: token.colorBgContainer
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorPrimaryBg, {
background: token.colorPrimaryBgHover
}, {
background: token.colorPrimaryBorder
})), genTextLinkButtonStyle(token, token.colorPrimaryText, 'text', {
color: token.colorPrimaryTextHover,
background: token.colorPrimaryBg
}, {
color: token.colorPrimaryTextActive,
background: token.colorPrimaryBorder
})), genTextLinkButtonStyle(token, token.colorPrimaryText, 'link', {
color: token.colorPrimaryTextHover,
background: token.linkHoverBg
}, {
color: token.colorPrimaryTextActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {
color: token.colorPrimaryHover,
borderColor: token.colorPrimaryHover
}, {
color: token.colorPrimaryActive,
borderColor: token.colorPrimaryActive
}));
const genDangerousStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
color: token.colorError,
boxShadow: token.dangerShadow
}, genSolidButtonStyle(token, token.dangerColor, token.colorError, {
background: token.colorErrorHover
}, {
background: token.colorErrorActive
})), genOutlinedDashedButtonStyle(token, token.colorError, token.colorBgContainer, {
color: token.colorErrorHover,
borderColor: token.colorErrorBorderHover
}, {
color: token.colorErrorActive,
borderColor: token.colorErrorActive
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorErrorBg, {
background: token.colorErrorBgFilledHover
}, {
background: token.colorErrorBgActive
})), genTextLinkButtonStyle(token, token.colorError, 'text', {
color: token.colorErrorHover,
background: token.colorErrorBg
}, {
color: token.colorErrorHover,
background: token.colorErrorBgActive
})), genTextLinkButtonStyle(token, token.colorError, 'link', {
color: token.colorErrorHover
}, {
color: token.colorErrorActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {
color: token.colorErrorHover,
borderColor: token.colorErrorHover
}, {
color: token.colorErrorActive,
borderColor: token.colorErrorActive
}));
const genLinkStyle = token => Object.assign(Object.assign({}, genTextLinkButtonStyle(token, token.colorLink, 'link', {
color: token.colorLinkHover
}, {
color: token.colorLinkActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorInfo, token.colorInfo, token.colorTextDisabled, token.colorBorder, {
color: token.colorInfoHover,
borderColor: token.colorInfoHover
}, {
color: token.colorInfoActive,
borderColor: token.colorInfoActive
}));
const genColorButtonStyle = token => {
const {
componentCls
} = token;
return Object.assign({
[`${componentCls}-color-default`]: genDefaultButtonStyle(token),
[`${componentCls}-color-primary`]: genPrimaryButtonStyle(token),
[`${componentCls}-color-dangerous`]: genDangerousStyle(token),
[`${componentCls}-color-link`]: genLinkStyle(token)
}, genPresetColorStyle(token));
};
// =========== Compatible with versions earlier than 5.21.0 ===========
const genCompatibleButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedDashedButtonStyle(token, token.defaultBorderColor, token.defaultBg, {
color: token.defaultHoverColor,
borderColor: token.defaultHoverBorderColor,
background: token.defaultHoverBg
}, {
color: token.defaultActiveColor,
borderColor: token.defaultActiveBorderColor,
background: token.defaultActiveBg
})), genTextLinkButtonStyle(token, token.textTextColor, 'text', {
color: token.textTextHoverColor,
background: token.textHoverBg
}, {
color: token.textTextActiveColor,
background: token.colorBgTextActive
})), genSolidButtonStyle(token, token.primaryColor, token.colorPrimary, {
background: token.colorPrimaryHover,
color: token.primaryColor
}, {
background: token.colorPrimaryActive,
color: token.primaryColor
})), genTextLinkButtonStyle(token, token.colorLink, 'link', {
color: token.colorLinkHover,
background: token.linkHoverBg
}, {
color: token.colorLinkActive
}));
// =============================== Size ===============================
const genButtonStyle = function (token) {
let prefixCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
const {
componentCls,
controlHeight,
fontSize,
borderRadius,
buttonPaddingHorizontal,
iconCls,
buttonPaddingVertical,
buttonIconOnlyFontSize
} = token;
return [{
[prefixCls]: {
fontSize,
height: controlHeight,
padding: `${(0,cssinjs.unit)(buttonPaddingVertical)} ${(0,cssinjs.unit)(buttonPaddingHorizontal)}`,
borderRadius,
[`&${componentCls}-icon-only`]: {
width: controlHeight,
[iconCls]: {
fontSize: buttonIconOnlyFontSize
}
}
}
},
// Shape - patch prefixCls again to override solid border radius style
{
[`${componentCls}${componentCls}-circle${prefixCls}`]: genCircleButtonStyle(token)
}, {
[`${componentCls}${componentCls}-round${prefixCls}`]: genRoundButtonStyle(token)
}];
};
const genSizeBaseButtonStyle = token => {
const baseToken = (0,es.mergeToken)(token, {
fontSize: token.contentFontSize
});
return genButtonStyle(baseToken, token.componentCls);
};
const genSizeSmallButtonStyle = token => {
const smallToken = (0,es.mergeToken)(token, {
controlHeight: token.controlHeightSM,
fontSize: token.contentFontSizeSM,
padding: token.paddingXS,
buttonPaddingHorizontal: token.paddingInlineSM,
buttonPaddingVertical: 0,
borderRadius: token.borderRadiusSM,
buttonIconOnlyFontSize: token.onlyIconSizeSM
});
return genButtonStyle(smallToken, `${token.componentCls}-sm`);
};
const genSizeLargeButtonStyle = token => {
const largeToken = (0,es.mergeToken)(token, {
controlHeight: token.controlHeightLG,
fontSize: token.contentFontSizeLG,
buttonPaddingHorizontal: token.paddingInlineLG,
buttonPaddingVertical: 0,
borderRadius: token.borderRadiusLG,
buttonIconOnlyFontSize: token.onlyIconSizeLG
});
return genButtonStyle(largeToken, `${token.componentCls}-lg`);
};
const genBlockButtonStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
[`&${componentCls}-block`]: {
width: '100%'
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var button_style = ((0,genStyleUtils.genStyleHooks)('Button', token => {
const buttonToken = (0,style_token.prepareToken)(token);
return [
// Shared
genSharedButtonStyle(buttonToken),
// Size
genSizeBaseButtonStyle(buttonToken), genSizeSmallButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),
// Block
genBlockButtonStyle(buttonToken),
// Color
genColorButtonStyle(buttonToken),
// https://github.com/ant-design/ant-design/issues/50969
genCompatibleButtonStyle(buttonToken),
// Button Group
group(buttonToken)];
}, style_token.prepareComponentToken, {
unitless: {
fontWeight: true,
contentLineHeight: true,
contentLineHeightSM: true,
contentLineHeightLG: true
}
}));
/***/ }),
/***/ "./components/button/style/token.ts":
/*!******************************************!*\
!*** ./components/button/style/token.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
/* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _color_picker_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../color-picker/color */ "./components/color-picker/color.ts");
/* harmony import */ var _color_picker_components_ColorPresets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../color-picker/components/ColorPresets */ "./components/color-picker/components/ColorPresets.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/themes/shared/genFontSizes.ts");
/* harmony import */ var _theme_interface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/interface */ "./components/theme/interface/presetColors.ts");
/* harmony import */ var _theme_util_getAlphaColor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/util/getAlphaColor */ "./components/theme/util/getAlphaColor.ts");
const prepareToken = token => {
const {
paddingInline,
onlyIconSize
} = token;
const buttonToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.mergeToken)(token, {
buttonPaddingHorizontal: paddingInline,
buttonPaddingVertical: 0,
buttonIconOnlyFontSize: onlyIconSize
});
return buttonToken;
};
const prepareComponentToken = token => {
var _a, _b, _c, _d, _e, _f;
const contentFontSize = (_a = token.contentFontSize) !== null && _a !== void 0 ? _a : token.fontSize;
const contentFontSizeSM = (_b = token.contentFontSizeSM) !== null && _b !== void 0 ? _b : token.fontSize;
const contentFontSizeLG = (_c = token.contentFontSizeLG) !== null && _c !== void 0 ? _c : token.fontSizeLG;
const contentLineHeight = (_d = token.contentLineHeight) !== null && _d !== void 0 ? _d : (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.getLineHeight)(contentFontSize);
const contentLineHeightSM = (_e = token.contentLineHeightSM) !== null && _e !== void 0 ? _e : (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.getLineHeight)(contentFontSizeSM);
const contentLineHeightLG = (_f = token.contentLineHeightLG) !== null && _f !== void 0 ? _f : (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.getLineHeight)(contentFontSizeLG);
const solidTextColor = (0,_color_picker_components_ColorPresets__WEBPACK_IMPORTED_MODULE_2__.isBright)(new _color_picker_color__WEBPACK_IMPORTED_MODULE_3__.AggregationColor(token.colorBgSolid), '#fff') ? '#000' : '#fff';
const shadowColorTokens = _theme_interface__WEBPACK_IMPORTED_MODULE_4__.PresetColors.reduce((prev, colorKey) => Object.assign(Object.assign({}, prev), {
[`${colorKey}ShadowColor`]: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5__.unit)(token.controlOutlineWidth)} 0 ${(0,_theme_util_getAlphaColor__WEBPACK_IMPORTED_MODULE_6__["default"])(token[`${colorKey}1`], token.colorBgContainer)}`
}), {});
return Object.assign(Object.assign({}, shadowColorTokens), {
fontWeight: 400,
defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,
primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,
dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,
primaryColor: token.colorTextLightSolid,
dangerColor: token.colorTextLightSolid,
borderColorDisabled: token.colorBorder,
defaultGhostColor: token.colorBgContainer,
ghostBg: 'transparent',
defaultGhostBorderColor: token.colorBgContainer,
paddingInline: token.paddingContentHorizontal - token.lineWidth,
paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,
paddingInlineSM: 8 - token.lineWidth,
onlyIconSize: 'inherit',
onlyIconSizeSM: 'inherit',
onlyIconSizeLG: 'inherit',
groupBorderColor: token.colorPrimaryHover,
linkHoverBg: 'transparent',
textTextColor: token.colorText,
textTextHoverColor: token.colorText,
textTextActiveColor: token.colorText,
textHoverBg: token.colorFillTertiary,
defaultColor: token.colorText,
defaultBg: token.colorBgContainer,
defaultBorderColor: token.colorBorder,
defaultBorderColorDisabled: token.colorBorder,
defaultHoverBg: token.colorBgContainer,
defaultHoverColor: token.colorPrimaryHover,
defaultHoverBorderColor: token.colorPrimaryHover,
defaultActiveBg: token.colorBgContainer,
defaultActiveColor: token.colorPrimaryActive,
defaultActiveBorderColor: token.colorPrimaryActive,
solidTextColor,
contentFontSize,
contentFontSizeSM,
contentFontSizeLG,
contentLineHeight,
contentLineHeightSM,
contentLineHeightLG,
paddingBlock: Math.max((token.controlHeight - contentFontSize * contentLineHeight) / 2 - token.lineWidth, 0),
paddingBlockSM: Math.max((token.controlHeightSM - contentFontSizeSM * contentLineHeightSM) / 2 - token.lineWidth, 0),
paddingBlockLG: Math.max((token.controlHeightLG - contentFontSizeLG * contentLineHeightLG) / 2 - token.lineWidth, 0)
});
};
/***/ }),
/***/ "./components/calendar/locale/en_US.ts":
/*!*********************************************!*\
!*** ./components/calendar/locale/en_US.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.ts");
/* harmony default export */ __webpack_exports__["default"] = (_date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./components/calendar/locale/kmr_IQ.ts":
/*!**********************************************!*\
!*** ./components/calendar/locale/kmr_IQ.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _date_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../date-picker/locale/kmr_IQ */ "./components/date-picker/locale/kmr_IQ.ts");
/* harmony default export */ __webpack_exports__["default"] = (_date_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./components/calendar/locale/zh_TW.ts":
/*!*********************************************!*\
!*** ./components/calendar/locale/zh_TW.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _date_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../date-picker/locale/zh_TW */ "./components/date-picker/locale/zh_TW.ts");
/* harmony default export */ __webpack_exports__["default"] = (_date_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./components/calendar/style/index.ts":
/*!********************************************!*\
!*** ./components/calendar/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony exports genCalendarStyles, prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _date_picker_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../date-picker/style */ "./components/date-picker/style/panel.ts");
/* harmony import */ var _date_picker_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../date-picker/style */ "./components/date-picker/style/token.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genCalendarStyles = token => {
const {
calendarCls,
componentCls,
fullBg,
fullPanelBg,
itemActiveBg
} = token;
return {
[calendarCls]: Object.assign(Object.assign(Object.assign({}, (0,_date_picker_style__WEBPACK_IMPORTED_MODULE_0__.genPanelStyle)(token)), (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
background: fullBg,
'&-rtl': {
direction: 'rtl'
},
[`${calendarCls}-header`]: {
display: 'flex',
justifyContent: 'flex-end',
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingSM)} 0`,
[`${calendarCls}-year-select`]: {
minWidth: token.yearControlWidth
},
[`${calendarCls}-month-select`]: {
minWidth: token.monthControlWidth,
marginInlineStart: token.marginXS
},
[`${calendarCls}-mode-switch`]: {
marginInlineStart: token.marginXS
}
}
}),
[`${calendarCls} ${componentCls}-panel`]: {
background: fullPanelBg,
border: 0,
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
borderRadius: 0,
[`${componentCls}-month-panel, ${componentCls}-date-panel`]: {
width: 'auto'
},
[`${componentCls}-body`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingXS)} 0`
},
[`${componentCls}-content`]: {
width: '100%'
}
},
[`${calendarCls}-mini`]: {
borderRadius: token.borderRadiusLG,
[`${calendarCls}-header`]: {
paddingInlineEnd: token.paddingXS,
paddingInlineStart: token.paddingXS
},
[`${componentCls}-panel`]: {
borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.borderRadiusLG)}`
},
[`${componentCls}-content`]: {
height: token.miniContentHeight,
th: {
height: 'auto',
padding: 0,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.weekHeight)
}
},
[`${componentCls}-cell::before`]: {
pointerEvents: 'none'
}
},
[`${calendarCls}${calendarCls}-full`]: {
[`${componentCls}-panel`]: {
display: 'block',
width: '100%',
textAlign: 'end',
background: fullBg,
border: 0,
[`${componentCls}-body`]: {
'th, td': {
padding: 0
},
th: {
height: 'auto',
paddingInlineEnd: token.paddingSM,
paddingBottom: token.paddingXXS,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.weekHeight)
}
}
},
[`${componentCls}-cell-week ${componentCls}-cell-inner`]: {
display: 'block',
borderRadius: 0,
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,
width: '100%',
height: token.calc(token.dateValueHeight).add(token.dateContentHeight).add(token.calc(token.paddingXS).div(2)).add(token.lineWidthBold).equal()
},
[`${componentCls}-cell`]: {
'&::before': {
display: 'none'
},
'&:hover': {
[`${calendarCls}-date`]: {
background: token.controlItemBgHover
}
},
[`${calendarCls}-date-today::before`]: {
display: 'none'
},
// >>> Selected
[`&-in-view${componentCls}-cell-selected`]: {
[`${calendarCls}-date, ${calendarCls}-date-today`]: {
background: itemActiveBg
}
},
'&-selected, &-selected:hover': {
[`${calendarCls}-date, ${calendarCls}-date-today`]: {
[`${calendarCls}-date-value`]: {
color: token.colorPrimary
}
}
}
},
[`${calendarCls}-date`]: {
display: 'block',
width: 'auto',
height: 'auto',
margin: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.calc(token.marginXS).div(2).equal())}`,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.calc(token.paddingXS).div(2).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingXS)} 0`,
border: 0,
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,
borderRadius: 0,
transition: `background ${token.motionDurationSlow}`,
'&-value': {
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.dateValueHeight),
transition: `color ${token.motionDurationSlow}`
},
'&-content': {
position: 'static',
width: 'auto',
height: token.dateContentHeight,
overflowY: 'auto',
color: token.colorText,
lineHeight: token.lineHeight,
textAlign: 'start'
},
'&-today': {
borderColor: token.colorPrimary,
[`${calendarCls}-date-value`]: {
color: token.colorText
}
}
}
},
[`@media only screen and (max-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.screenXS)}) `]: {
[calendarCls]: {
[`${calendarCls}-header`]: {
display: 'block',
[`${calendarCls}-year-select`]: {
width: '50%'
},
[`${calendarCls}-month-select`]: {
width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingXS)})`
},
[`${calendarCls}-mode-switch`]: {
width: '100%',
marginTop: token.marginXS,
marginInlineStart: 0,
'> label': {
width: '50%',
textAlign: 'center'
}
}
}
}
}
};
};
const prepareComponentToken = token => Object.assign({
fullBg: token.colorBgContainer,
fullPanelBg: token.colorBgContainer,
itemActiveBg: token.controlItemBgActive,
yearControlWidth: 80,
monthControlWidth: 70,
miniContentHeight: 256
}, (0,_date_picker_style__WEBPACK_IMPORTED_MODULE_3__.initPanelComponentToken)(token));
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Calendar', token => {
const calendarCls = `${token.componentCls}-calendar`;
const calendarToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, (0,_date_picker_style__WEBPACK_IMPORTED_MODULE_3__.initPickerPanelToken)(token), {
calendarCls,
pickerCellInnerCls: `${token.componentCls}-cell-inner`,
dateValueHeight: token.controlHeightSM,
weekHeight: token.calc(token.controlHeightSM).mul(0.75).equal(),
dateContentHeight: token.calc(token.calc(token.fontHeightSM).add(token.marginXS)).mul(3).add(token.calc(token.lineWidth).mul(2)).equal()
});
return [genCalendarStyles(calendarToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/card/style/index.ts":
/*!****************************************!*\
!*** ./components/card/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Styles ==============================
// ============================== Head ==============================
const genCardHeadStyle = token => {
const {
antCls,
componentCls,
headerHeight,
headerPadding,
tabsMarginBottom
} = token;
return Object.assign(Object.assign({
display: 'flex',
justifyContent: 'center',
flexDirection: 'column',
minHeight: headerHeight,
marginBottom: -1,
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerPadding)}`,
color: token.colorTextHeading,
fontWeight: token.fontWeightStrong,
fontSize: token.headerFontSize,
background: token.headerBg,
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} 0 0`
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
'&-wrapper': {
width: '100%',
display: 'flex',
alignItems: 'center'
},
'&-title': Object.assign(Object.assign({
display: 'inline-block',
flex: 1
}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
[`
> ${componentCls}-typography,
> ${componentCls}-typography-edit-content
`]: {
insetInlineStart: 0,
marginTop: 0,
marginBottom: 0
}
}),
[`${antCls}-tabs-top`]: {
clear: 'both',
marginBottom: tabsMarginBottom,
color: token.colorText,
fontWeight: 'normal',
fontSize: token.fontSize,
'&-bar': {
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`
}
}
});
};
// ============================== Grid ==============================
const genCardGridStyle = token => {
const {
cardPaddingBase,
colorBorderSecondary,
cardShadow,
lineWidth
} = token;
return {
width: '33.33%',
padding: cardPaddingBase,
border: 0,
borderRadius: 0,
boxShadow: `
${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 0 ${colorBorderSecondary},
0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 ${colorBorderSecondary},
${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 ${colorBorderSecondary},
${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 0 ${colorBorderSecondary} inset,
0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 ${colorBorderSecondary} inset;
`,
transition: `all ${token.motionDurationMid}`,
'&-hoverable:hover': {
position: 'relative',
zIndex: 1,
boxShadow: cardShadow
}
};
};
// ============================== Actions ==============================
const genCardActionsStyle = token => {
const {
componentCls,
iconCls,
actionsLiMargin,
cardActionsIconSize,
colorBorderSecondary,
actionsBg
} = token;
return Object.assign(Object.assign({
margin: 0,
padding: 0,
listStyle: 'none',
background: actionsBg,
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
display: 'flex',
borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)}`
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
'& > li': {
margin: actionsLiMargin,
color: token.colorTextDescription,
textAlign: 'center',
'> span': {
position: 'relative',
display: 'block',
minWidth: token.calc(token.cardActionsIconSize).mul(2).equal(),
fontSize: token.fontSize,
lineHeight: token.lineHeight,
cursor: 'pointer',
'&:hover': {
color: token.colorPrimary,
transition: `color ${token.motionDurationMid}`
},
[`a:not(${componentCls}-btn), > ${iconCls}`]: {
display: 'inline-block',
width: '100%',
color: token.colorTextDescription,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.fontHeight),
transition: `color ${token.motionDurationMid}`,
'&:hover': {
color: token.colorPrimary
}
},
[`> ${iconCls}`]: {
fontSize: cardActionsIconSize,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(cardActionsIconSize).mul(token.lineHeight).equal())
}
},
'&:not(:last-child)': {
borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`
}
}
});
};
// ============================== Meta ==============================
const genCardMetaStyle = token => Object.assign(Object.assign({
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.marginXXS).mul(-1).equal())} 0`,
display: 'flex'
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
'&-avatar': {
paddingInlineEnd: token.padding
},
'&-detail': {
overflow: 'hidden',
flex: 1,
'> div:not(:last-child)': {
marginBottom: token.marginXS
}
},
'&-title': Object.assign({
color: token.colorTextHeading,
fontWeight: token.fontWeightStrong,
fontSize: token.fontSizeLG
}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis),
'&-description': {
color: token.colorTextDescription
}
});
// ============================== Inner ==============================
const genCardTypeInnerStyle = token => {
const {
componentCls,
colorFillAlter,
headerPadding,
bodyPadding
} = token;
return {
[`${componentCls}-head`]: {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerPadding)}`,
background: colorFillAlter,
'&-title': {
fontSize: token.fontSize
}
},
[`${componentCls}-body`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(bodyPadding)}`
}
};
};
// ============================== Loading ==============================
const genCardLoadingStyle = token => {
const {
componentCls
} = token;
return {
overflow: 'hidden',
[`${componentCls}-body`]: {
userSelect: 'none'
}
};
};
// ============================== Basic ==============================
const genCardStyle = token => {
const {
componentCls,
cardShadow,
cardHeadPadding,
colorBorderSecondary,
boxShadowTertiary,
bodyPadding,
extraColor
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'relative',
background: token.colorBgContainer,
borderRadius: token.borderRadiusLG,
[`&:not(${componentCls}-bordered)`]: {
boxShadow: boxShadowTertiary
},
[`${componentCls}-head`]: genCardHeadStyle(token),
[`${componentCls}-extra`]: {
// https://stackoverflow.com/a/22429853/3040605
marginInlineStart: 'auto',
color: extraColor,
fontWeight: 'normal',
fontSize: token.fontSize
},
[`${componentCls}-body`]: Object.assign({
padding: bodyPadding,
borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)}`
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()),
[`${componentCls}-grid`]: genCardGridStyle(token),
[`${componentCls}-cover`]: {
'> *': {
display: 'block',
width: '100%',
borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} 0 0`
}
},
[`${componentCls}-actions`]: genCardActionsStyle(token),
[`${componentCls}-meta`]: genCardMetaStyle(token)
}),
[`${componentCls}-bordered`]: {
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
[`${componentCls}-cover`]: {
marginTop: -1,
marginInlineStart: -1,
marginInlineEnd: -1
}
},
[`${componentCls}-hoverable`]: {
cursor: 'pointer',
transition: `box-shadow ${token.motionDurationMid}, border-color ${token.motionDurationMid}`,
'&:hover': {
borderColor: 'transparent',
boxShadow: cardShadow
}
},
[`${componentCls}-contain-grid`]: {
borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} 0 0 `,
[`${componentCls}-body`]: {
display: 'flex',
flexWrap: 'wrap'
},
[`&:not(${componentCls}-loading) ${componentCls}-body`]: {
marginBlockStart: token.calc(token.lineWidth).mul(-1).equal(),
marginInlineStart: token.calc(token.lineWidth).mul(-1).equal(),
padding: 0
}
},
[`${componentCls}-contain-tabs`]: {
[`> div${componentCls}-head`]: {
minHeight: 0,
[`${componentCls}-head-title, ${componentCls}-extra`]: {
paddingTop: cardHeadPadding
}
}
},
[`${componentCls}-type-inner`]: genCardTypeInnerStyle(token),
[`${componentCls}-loading`]: genCardLoadingStyle(token),
[`${componentCls}-rtl`]: {
direction: 'rtl'
}
};
};
// ============================== Size ==============================
const genCardSizeStyle = token => {
const {
componentCls,
bodyPaddingSM,
headerPaddingSM,
headerHeightSM,
headerFontSizeSM
} = token;
return {
[`${componentCls}-small`]: {
[`> ${componentCls}-head`]: {
minHeight: headerHeightSM,
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerPaddingSM)}`,
fontSize: headerFontSizeSM,
[`> ${componentCls}-head-wrapper`]: {
[`> ${componentCls}-extra`]: {
fontSize: token.fontSize
}
}
},
[`> ${componentCls}-body`]: {
padding: bodyPaddingSM
}
},
[`${componentCls}-small${componentCls}-contain-tabs`]: {
[`> ${componentCls}-head`]: {
[`${componentCls}-head-title, ${componentCls}-extra`]: {
paddingTop: 0,
display: 'flex',
alignItems: 'center'
}
}
}
};
};
const prepareComponentToken = token => {
var _a, _b;
return {
headerBg: 'transparent',
headerFontSize: token.fontSizeLG,
headerFontSizeSM: token.fontSize,
headerHeight: token.fontSizeLG * token.lineHeightLG + token.padding * 2,
headerHeightSM: token.fontSize * token.lineHeight + token.paddingXS * 2,
actionsBg: token.colorBgContainer,
actionsLiMargin: `${token.paddingSM}px 0`,
tabsMarginBottom: -token.padding - token.lineWidth,
extraColor: token.colorText,
bodyPaddingSM: 12,
// Fixed padding.
headerPaddingSM: 12,
bodyPadding: (_a = token.bodyPadding) !== null && _a !== void 0 ? _a : token.paddingLG,
headerPadding: (_b = token.headerPadding) !== null && _b !== void 0 ? _b : token.paddingLG
};
};
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Card', token => {
const cardToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
cardShadow: token.boxShadowCard,
cardHeadPadding: token.padding,
cardPaddingBase: token.paddingLG,
cardActionsIconSize: token.fontSize
});
return [
// Style
genCardStyle(cardToken),
// Size
genCardSizeStyle(cardToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/carousel/style/index.ts":
/*!********************************************!*\
!*** ./components/carousel/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ DotDuration: function() { return /* binding */ DotDuration; }
/* harmony export */ });
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const DotDuration = '--dot-duration';
const genCarouselStyle = token => {
const {
componentCls,
antCls
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
'.slick-slider': {
position: 'relative',
display: 'block',
boxSizing: 'border-box',
touchAction: 'pan-y',
WebkitTouchCallout: 'none',
WebkitTapHighlightColor: 'transparent',
'.slick-track, .slick-list': {
transform: 'translate3d(0, 0, 0)',
touchAction: 'pan-y'
}
},
'.slick-list': {
position: 'relative',
display: 'block',
margin: 0,
padding: 0,
overflow: 'hidden',
'&:focus': {
outline: 'none'
},
'&.dragging': {
cursor: 'pointer'
},
'.slick-slide': {
pointerEvents: 'none',
// https://github.com/ant-design/ant-design/issues/23294
[`input${antCls}-radio-input, input${antCls}-checkbox-input`]: {
visibility: 'hidden'
},
'&.slick-active': {
pointerEvents: 'auto',
[`input${antCls}-radio-input, input${antCls}-checkbox-input`]: {
visibility: 'visible'
}
},
// fix Carousel content height not match parent node
// when children is empty node
// https://github.com/ant-design/ant-design/issues/25878
'> div > div': {
verticalAlign: 'bottom'
}
}
},
'.slick-track': {
position: 'relative',
top: 0,
insetInlineStart: 0,
display: 'block',
'&::before, &::after': {
display: 'table',
content: '""'
},
'&::after': {
clear: 'both'
}
},
'.slick-slide': {
display: 'none',
float: 'left',
height: '100%',
minHeight: 1,
img: {
display: 'block'
},
'&.dragging img': {
pointerEvents: 'none'
}
},
'.slick-initialized .slick-slide': {
display: 'block'
},
'.slick-vertical .slick-slide': {
display: 'block',
height: 'auto'
}
})
};
};
const genArrowsStyle = token => {
const {
componentCls,
motionDurationSlow,
arrowSize,
arrowOffset
} = token;
const arrowLength = token.calc(arrowSize).div(Math.SQRT2).equal();
return {
[componentCls]: {
// Arrows
'.slick-prev, .slick-next': {
position: 'absolute',
top: '50%',
width: arrowSize,
height: arrowSize,
transform: 'translateY(-50%)',
color: '#fff',
opacity: 0.4,
background: 'transparent',
padding: 0,
lineHeight: 0,
border: 0,
outline: 'none',
cursor: 'pointer',
zIndex: 1,
transition: `opacity ${motionDurationSlow}`,
'&:hover, &:focus': {
opacity: 1
},
'&.slick-disabled': {
pointerEvents: 'none',
opacity: 0
},
'&::after': {
boxSizing: 'border-box',
position: 'absolute',
top: token.calc(arrowSize).sub(arrowLength).div(2).equal(),
insetInlineStart: token.calc(arrowSize).sub(arrowLength).div(2).equal(),
display: 'inline-block',
width: arrowLength,
height: arrowLength,
border: `0 solid currentcolor`,
borderInlineWidth: '2px 0',
borderBlockWidth: '2px 0',
borderRadius: 1,
content: '""'
}
},
'.slick-prev': {
insetInlineStart: arrowOffset,
'&::after': {
transform: 'rotate(-45deg)'
}
},
'.slick-next': {
insetInlineEnd: arrowOffset,
'&::after': {
transform: 'rotate(135deg)'
}
}
}
};
};
const genDotsStyle = token => {
const {
componentCls,
dotOffset,
dotWidth,
dotHeight,
dotGap,
colorBgContainer,
motionDurationSlow
} = token;
return {
[componentCls]: {
'.slick-dots': {
position: 'absolute',
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
zIndex: 15,
display: 'flex !important',
justifyContent: 'center',
paddingInlineStart: 0,
margin: 0,
listStyle: 'none',
'&-bottom': {
bottom: dotOffset
},
'&-top': {
top: dotOffset,
bottom: 'auto'
},
li: {
position: 'relative',
display: 'inline-block',
flex: '0 1 auto',
boxSizing: 'content-box',
width: dotWidth,
height: dotHeight,
marginInline: dotGap,
padding: 0,
textAlign: 'center',
textIndent: -999,
verticalAlign: 'top',
transition: `all ${motionDurationSlow}`,
borderRadius: dotHeight,
overflow: 'hidden',
'&::after': {
display: 'block',
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: '100%',
height: dotHeight,
content: '""',
background: colorBgContainer,
borderRadius: dotHeight,
opacity: 1,
outline: 'none',
cursor: 'pointer',
overflow: 'hidden',
transform: 'translate3d(-100%, 0, 0)'
},
button: {
position: 'relative',
display: 'block',
width: '100%',
height: dotHeight,
padding: 0,
color: 'transparent',
fontSize: 0,
background: colorBgContainer,
border: 0,
borderRadius: dotHeight,
outline: 'none',
cursor: 'pointer',
opacity: 0.2,
transition: `all ${motionDurationSlow}`,
overflow: 'hidden',
'&:hover': {
opacity: 0.75
},
'&::after': {
position: 'absolute',
inset: token.calc(dotGap).mul(-1).equal(),
content: '""'
}
},
'&.slick-active': {
width: token.dotActiveWidth,
position: 'relative',
'&:hover': {
opacity: 1
},
'&::after': {
transform: 'translate3d(0, 0, 0)',
transition: `transform var(${DotDuration}) ease-out`
}
}
}
}
}
};
};
const genCarouselVerticalStyle = token => {
const {
componentCls,
dotOffset,
arrowOffset,
marginXXS
} = token;
const reverseSizeOfDot = {
width: token.dotHeight,
height: token.dotWidth
};
return {
[`${componentCls}-vertical`]: {
'.slick-prev, .slick-next': {
insetInlineStart: '50%',
marginBlockStart: 'unset',
transform: 'translateX(-50%)'
},
'.slick-prev': {
insetBlockStart: arrowOffset,
insetInlineStart: '50%',
'&::after': {
transform: 'rotate(45deg)'
}
},
'.slick-next': {
insetBlockStart: 'auto',
insetBlockEnd: arrowOffset,
'&::after': {
transform: 'rotate(-135deg)'
}
},
'.slick-dots': {
top: '50%',
bottom: 'auto',
flexDirection: 'column',
width: token.dotHeight,
height: 'auto',
margin: 0,
transform: 'translateY(-50%)',
'&-left': {
insetInlineEnd: 'auto',
insetInlineStart: dotOffset
},
'&-right': {
insetInlineEnd: dotOffset,
insetInlineStart: 'auto'
},
li: Object.assign(Object.assign({}, reverseSizeOfDot), {
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(marginXXS)} 0`,
verticalAlign: 'baseline',
button: reverseSizeOfDot,
'&::after': Object.assign(Object.assign({}, reverseSizeOfDot), {
height: 0
}),
'&.slick-active': Object.assign(Object.assign({}, reverseSizeOfDot), {
button: reverseSizeOfDot,
'&::after': Object.assign(Object.assign({}, reverseSizeOfDot), {
transition: `height var(${DotDuration}) ease-out`
})
})
})
}
}
};
};
const genCarouselRtlStyle = token => {
const {
componentCls
} = token;
return [{
[`${componentCls}-rtl`]: {
direction: 'rtl',
// Dots
'.slick-dots': {
[`${componentCls}-rtl&`]: {
flexDirection: 'row-reverse'
}
}
}
}, {
[`${componentCls}-vertical`]: {
'.slick-dots': {
[`${componentCls}-rtl&`]: {
flexDirection: 'column'
}
}
}
}];
};
const prepareComponentToken = token => {
const dotActiveWidth = 24;
return {
arrowSize: 16,
arrowOffset: token.marginXS,
dotWidth: 16,
dotHeight: 3,
dotGap: token.marginXXS,
dotOffset: 12,
dotWidthActive: dotActiveWidth,
dotActiveWidth
};
};
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Carousel', token => [genCarouselStyle(token), genArrowsStyle(token), genDotsStyle(token), genCarouselVerticalStyle(token), genCarouselRtlStyle(token)], prepareComponentToken, {
deprecatedTokens: [['dotWidthActive', 'dotActiveWidth']]
}));
/***/ }),
/***/ "./components/cascader/style/columns.ts":
/*!**********************************************!*\
!*** ./components/cascader/style/columns.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../checkbox/style */ "./components/checkbox/style/index.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
const getColumnsStyle = token => {
const {
prefixCls,
componentCls
} = token;
const cascaderMenuItemCls = `${componentCls}-menu-item`;
const iconCls = `
&${cascaderMenuItemCls}-expand ${cascaderMenuItemCls}-expand-icon,
${cascaderMenuItemCls}-loading-icon
`;
return [
// ==================== Checkbox ====================
(0,_checkbox_style__WEBPACK_IMPORTED_MODULE_0__.getStyle)(`${prefixCls}-checkbox`, token), {
[componentCls]: {
// ================== Checkbox ==================
'&-checkbox': {
top: 0,
marginInlineEnd: token.paddingXS,
pointerEvents: 'unset'
},
// ==================== Menu ====================
// >>> Menus
'&-menus': {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'flex-start',
[`&${componentCls}-menu-empty`]: {
[`${componentCls}-menu`]: {
width: '100%',
height: 'auto',
[cascaderMenuItemCls]: {
color: token.colorTextDisabled
}
}
}
},
// >>> Menu
'&-menu': {
flexGrow: 1,
flexShrink: 0,
minWidth: token.controlItemWidth,
height: token.dropdownHeight,
margin: 0,
padding: token.menuPadding,
overflow: 'auto',
verticalAlign: 'top',
listStyle: 'none',
'-ms-overflow-style': '-ms-autohiding-scrollbar',
// https://github.com/ant-design/ant-design/issues/11857
'&:not(:last-child)': {
borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
'&-item': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_2__.textEllipsis), {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'center',
padding: token.optionPadding,
lineHeight: token.lineHeight,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`,
borderRadius: token.borderRadiusSM,
'&:hover': {
background: token.controlItemBgHover
},
'&-disabled': {
color: token.colorTextDisabled,
cursor: 'not-allowed',
'&:hover': {
background: 'transparent'
},
[iconCls]: {
color: token.colorTextDisabled
}
},
[`&-active:not(${cascaderMenuItemCls}-disabled)`]: {
'&, &:hover': {
color: token.optionSelectedColor,
fontWeight: token.optionSelectedFontWeight,
backgroundColor: token.optionSelectedBg
}
},
'&-content': {
flex: 'auto'
},
[iconCls]: {
marginInlineStart: token.paddingXXS,
color: token.colorTextDescription,
fontSize: token.fontSizeIcon
},
'&-keyword': {
color: token.colorHighlight
}
})
}
}
}];
};
/* harmony default export */ __webpack_exports__["default"] = (getColumnsStyle);
/***/ }),
/***/ "./components/cascader/style/index.ts":
/*!********************************************!*\
!*** ./components/cascader/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
/* harmony export */ });
/* harmony import */ var _style_compact_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/compact-item */ "./components/style/compact-item.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _columns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./columns */ "./components/cascader/style/columns.ts");
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
antCls
} = token;
return [
// =====================================================
// == Control ==
// =====================================================
{
[componentCls]: {
width: token.controlWidth
}
},
// =====================================================
// == Popup ==
// =====================================================
{
[`${componentCls}-dropdown`]: [{
[`&${antCls}-select-dropdown`]: {
padding: 0
}
}, (0,_columns__WEBPACK_IMPORTED_MODULE_0__["default"])(token)]
},
// =====================================================
// == RTL ==
// =====================================================
{
[`${componentCls}-dropdown-rtl`]: {
direction: 'rtl'
}
},
// =====================================================
// == Space Compact ==
// =====================================================
(0,_style_compact_item__WEBPACK_IMPORTED_MODULE_1__.genCompactItemStyle)(token)];
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const itemPaddingVertical = Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2);
return {
controlWidth: 184,
controlItemWidth: 111,
dropdownHeight: 180,
optionSelectedBg: token.controlItemBgActive,
optionSelectedFontWeight: token.fontWeightStrong,
optionPadding: `${itemPaddingVertical}px ${token.paddingSM}px`,
menuPadding: token.paddingXXS,
optionSelectedColor: token.colorText
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Cascader', token => [genBaseStyle(token)], prepareComponentToken));
/***/ }),
/***/ "./components/checkbox/style/index.ts":
/*!********************************************!*\
!*** ./components/checkbox/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ getStyle: function() { return /* binding */ getStyle; }
/* harmony export */ });
/* unused harmony export genCheckboxStyle */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
// ============================== Styles ==============================
const genCheckboxStyle = token => {
const {
checkboxCls
} = token;
const wrapperCls = `${checkboxCls}-wrapper`;
return [
// ===================== Basic =====================
{
// Group
[`${checkboxCls}-group`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
display: 'inline-flex',
flexWrap: 'wrap',
columnGap: token.marginXS,
// Group > Grid
[`> ${token.antCls}-row`]: {
flex: 1
}
}),
// Wrapper
[wrapperCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
display: 'inline-flex',
alignItems: 'baseline',
cursor: 'pointer',
// Fix checkbox & radio in flex align #30260
'&:after': {
display: 'inline-block',
width: 0,
overflow: 'hidden',
content: "'\\a0'"
},
// Checkbox near checkbox
[`& + ${wrapperCls}`]: {
marginInlineStart: 0
},
[`&${wrapperCls}-in-form-item`]: {
'input[type="checkbox"]': {
width: 14,
// FIXME: magic
height: 14 // FIXME: magic
}
}
}),
// Wrapper > Checkbox
[checkboxCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'relative',
whiteSpace: 'nowrap',
lineHeight: 1,
cursor: 'pointer',
borderRadius: token.borderRadiusSM,
// To make alignment right when `controlHeight` is changed
// Ref: https://github.com/ant-design/ant-design/issues/41564
alignSelf: 'center',
// Wrapper > Checkbox > input
[`${checkboxCls}-input`]: {
position: 'absolute',
// Since baseline align will get additional space offset,
// we need to move input to top to make it align with text.
// Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
inset: 0,
zIndex: 1,
cursor: 'pointer',
opacity: 0,
margin: 0,
[`&:focus-visible + ${checkboxCls}-inner`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.genFocusOutline)(token))
},
// Wrapper > Checkbox > inner
[`${checkboxCls}-inner`]: {
boxSizing: 'border-box',
display: 'block',
width: token.checkboxSize,
height: token.checkboxSize,
direction: 'ltr',
backgroundColor: token.colorBgContainer,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadiusSM,
borderCollapse: 'separate',
transition: `all ${token.motionDurationSlow}`,
'&:after': {
boxSizing: 'border-box',
position: 'absolute',
top: '50%',
insetInlineStart: '25%',
display: 'table',
width: token.calc(token.checkboxSize).div(14).mul(5).equal(),
height: token.calc(token.checkboxSize).div(14).mul(8).equal(),
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidthBold)} solid ${token.colorWhite}`,
borderTop: 0,
borderInlineStart: 0,
transform: 'rotate(45deg) scale(0) translate(-50%,-50%)',
opacity: 0,
content: '""',
transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}`
}
},
// Wrapper > Checkbox + Text
'& + span': {
paddingInlineStart: token.paddingXS,
paddingInlineEnd: token.paddingXS
}
})
},
// ===================== Hover =====================
{
// Wrapper & Wrapper > Checkbox
[`
${wrapperCls}:not(${wrapperCls}-disabled),
${checkboxCls}:not(${checkboxCls}-disabled)
`]: {
[`&:hover ${checkboxCls}-inner`]: {
borderColor: token.colorPrimary
}
},
[`${wrapperCls}:not(${wrapperCls}-disabled)`]: {
[`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled) ${checkboxCls}-inner`]: {
backgroundColor: token.colorPrimaryHover,
borderColor: 'transparent'
},
[`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled):after`]: {
borderColor: token.colorPrimaryHover
}
}
},
// ==================== Checked ====================
{
// Wrapper > Checkbox
[`${checkboxCls}-checked`]: {
[`${checkboxCls}-inner`]: {
backgroundColor: token.colorPrimary,
borderColor: token.colorPrimary,
'&:after': {
opacity: 1,
transform: 'rotate(45deg) scale(1) translate(-50%,-50%)',
transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`
}
}
},
[`
${wrapperCls}-checked:not(${wrapperCls}-disabled),
${checkboxCls}-checked:not(${checkboxCls}-disabled)
`]: {
[`&:hover ${checkboxCls}-inner`]: {
backgroundColor: token.colorPrimaryHover,
borderColor: 'transparent'
}
}
},
// ================= Indeterminate =================
{
[checkboxCls]: {
'&-indeterminate': {
// Wrapper > Checkbox > inner
[`${checkboxCls}-inner`]: {
backgroundColor: `${token.colorBgContainer} !important`,
borderColor: `${token.colorBorder} !important`,
'&:after': {
top: '50%',
insetInlineStart: '50%',
width: token.calc(token.fontSizeLG).div(2).equal(),
height: token.calc(token.fontSizeLG).div(2).equal(),
backgroundColor: token.colorPrimary,
border: 0,
transform: 'translate(-50%, -50%) scale(1)',
opacity: 1,
content: '""'
}
},
// https://github.com/ant-design/ant-design/issues/50074
[`&:hover ${checkboxCls}-inner`]: {
backgroundColor: `${token.colorBgContainer} !important`,
borderColor: `${token.colorPrimary} !important`
}
}
}
},
// ==================== Disable ====================
{
// Wrapper
[`${wrapperCls}-disabled`]: {
cursor: 'not-allowed'
},
// Wrapper > Checkbox
[`${checkboxCls}-disabled`]: {
// Wrapper > Checkbox > input
[`&, ${checkboxCls}-input`]: {
cursor: 'not-allowed',
// Disabled for native input to enable Tooltip event handler
// ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
pointerEvents: 'none'
},
// Wrapper > Checkbox > inner
[`${checkboxCls}-inner`]: {
background: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
'&:after': {
borderColor: token.colorTextDisabled
}
},
'&:after': {
display: 'none'
},
'& + span': {
color: token.colorTextDisabled
},
[`&${checkboxCls}-indeterminate ${checkboxCls}-inner::after`]: {
background: token.colorTextDisabled
}
}
}];
};
// ============================== Export ==============================
function getStyle(prefixCls, token) {
const checkboxToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
checkboxCls: `.${prefixCls}`,
checkboxSize: token.controlInteractiveSize
});
return [genCheckboxStyle(checkboxToken)];
}
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Checkbox', (token, _ref) => {
let {
prefixCls
} = _ref;
return [getStyle(prefixCls, token)];
}));
/***/ }),
/***/ "./components/collapse/index.tsx":
/*!***************************************************!*\
!*** ./components/collapse/index.tsx + 7 modules ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ collapse; }
});
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
var RightOutlined = __webpack_require__("./node_modules/@ant-design/icons/es/icons/RightOutlined.js");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("./node_modules/classnames/index.js");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__("./node_modules/rc-util/es/hooks/useMergedState.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__("./node_modules/rc-util/es/Children/toArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 13 modules
var es = __webpack_require__("./node_modules/rc-motion/es/index.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
var KeyCode = __webpack_require__("./node_modules/rc-util/es/KeyCode.js");
;// ./node_modules/rc-collapse/es/PanelContent.js
var PanelContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
forceRender = props.forceRender,
className = props.className,
style = props.style,
children = props.children,
isActive = props.isActive,
role = props.role,
customizeClassNames = props.classNames,
styles = props.styles;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(isActive || forceRender),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
rendered = _React$useState2[0],
setRendered = _React$useState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
if (forceRender || isActive) {
setRendered(true);
}
}, [forceRender, isActive]);
if (!rendered) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: ref,
className: classnames_default()("".concat(prefixCls, "-content"), (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-content-active"), isActive), "".concat(prefixCls, "-content-inactive"), !isActive), className),
style: style,
role: role
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-content-box"), customizeClassNames === null || customizeClassNames === void 0 ? void 0 : customizeClassNames.body),
style: styles === null || styles === void 0 ? void 0 : styles.body
}, children));
});
PanelContent.displayName = 'PanelContent';
/* harmony default export */ var es_PanelContent = (PanelContent);
;// ./node_modules/rc-collapse/es/Panel.js
var _excluded = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "classNames", "styles", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"];
var CollapsePanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
var _props$showArrow = props.showArrow,
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
headerClass = props.headerClass,
isActive = props.isActive,
onItemClick = props.onItemClick,
forceRender = props.forceRender,
className = props.className,
_props$classNames = props.classNames,
customizeClassNames = _props$classNames === void 0 ? {} : _props$classNames,
_props$styles = props.styles,
styles = _props$styles === void 0 ? {} : _props$styles,
prefixCls = props.prefixCls,
collapsible = props.collapsible,
accordion = props.accordion,
panelKey = props.panelKey,
extra = props.extra,
header = props.header,
expandIcon = props.expandIcon,
openMotion = props.openMotion,
destroyInactivePanel = props.destroyInactivePanel,
children = props.children,
resetProps = (0,objectWithoutProperties["default"])(props, _excluded);
var disabled = collapsible === 'disabled';
var ifExtraExist = extra !== null && extra !== undefined && typeof extra !== 'boolean';
var collapsibleProps = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({
onClick: function onClick() {
onItemClick === null || onItemClick === void 0 || onItemClick(panelKey);
},
onKeyDown: function onKeyDown(e) {
if (e.key === 'Enter' || e.keyCode === KeyCode["default"].ENTER || e.which === KeyCode["default"].ENTER) {
onItemClick === null || onItemClick === void 0 || onItemClick(panelKey);
}
},
role: accordion ? 'tab' : 'button'
}, 'aria-expanded', isActive), 'aria-disabled', disabled), "tabIndex", disabled ? -1 : 0);
// ======================== Icon ========================
var iconNodeInner = typeof expandIcon === 'function' ? expandIcon(props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", {
className: "arrow"
});
var iconNode = iconNodeInner && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
className: "".concat(prefixCls, "-expand-icon")
}, ['header', 'icon'].includes(collapsible) ? collapsibleProps : {}), iconNodeInner);
var collapsePanelClassNames = classnames_default()("".concat(prefixCls, "-item"), (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-item-active"), isActive), "".concat(prefixCls, "-item-disabled"), disabled), className);
var headerClassName = classnames_default()(headerClass, "".concat(prefixCls, "-header"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-collapsible-").concat(collapsible), !!collapsible), customizeClassNames.header);
// ======================== HeaderProps ========================
var headerProps = (0,objectSpread2["default"])({
className: headerClassName,
style: styles.header
}, ['header', 'icon'].includes(collapsible) ? {} : collapsibleProps);
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({}, resetProps, {
ref: ref,
className: collapsePanelClassNames
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", headerProps, showArrow && iconNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", (0,esm_extends["default"])({
className: "".concat(prefixCls, "-header-text")
}, collapsible === 'header' ? collapsibleProps : {}), header), ifExtraExist && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-extra")
}, extra)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es["default"], (0,esm_extends["default"])({
visible: isActive,
leavedClassName: "".concat(prefixCls, "-content-hidden")
}, openMotion, {
forceRender: forceRender,
removeOnLeave: destroyInactivePanel
}), function (_ref, motionRef) {
var motionClassName = _ref.className,
motionStyle = _ref.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_PanelContent, {
ref: motionRef,
prefixCls: prefixCls,
className: motionClassName,
classNames: customizeClassNames,
style: motionStyle,
styles: styles,
isActive: isActive,
forceRender: forceRender,
role: accordion ? 'tabpanel' : void 0
}, children);
}));
});
/* harmony default export */ var Panel = (CollapsePanel);
;// ./node_modules/rc-collapse/es/hooks/useItems.js
var useItems_excluded = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"];
var convertItemsToNodes = function convertItemsToNodes(items, props) {
var prefixCls = props.prefixCls,
accordion = props.accordion,
collapsible = props.collapsible,
destroyInactivePanel = props.destroyInactivePanel,
onItemClick = props.onItemClick,
activeKey = props.activeKey,
openMotion = props.openMotion,
expandIcon = props.expandIcon;
return items.map(function (item, index) {
var children = item.children,
label = item.label,
rawKey = item.key,
rawCollapsible = item.collapsible,
rawOnItemClick = item.onItemClick,
rawDestroyInactivePanel = item.destroyInactivePanel,
restProps = (0,objectWithoutProperties["default"])(item, useItems_excluded);
// You may be puzzled why you want to convert them all into strings, me too.
// Maybe: https://github.com/react-component/collapse/blob/aac303a8b6ff30e35060b4f8fecde6f4556fcbe2/src/Collapse.tsx#L15
var key = String(rawKey !== null && rawKey !== void 0 ? rawKey : index);
var mergeCollapsible = rawCollapsible !== null && rawCollapsible !== void 0 ? rawCollapsible : collapsible;
var mergeDestroyInactivePanel = rawDestroyInactivePanel !== null && rawDestroyInactivePanel !== void 0 ? rawDestroyInactivePanel : destroyInactivePanel;
var handleItemClick = function handleItemClick(value) {
if (mergeCollapsible === 'disabled') return;
onItemClick(value);
rawOnItemClick === null || rawOnItemClick === void 0 || rawOnItemClick(value);
};
var isActive = false;
if (accordion) {
isActive = activeKey[0] === key;
} else {
isActive = activeKey.indexOf(key) > -1;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Panel, (0,esm_extends["default"])({}, restProps, {
prefixCls: prefixCls,
key: key,
panelKey: key,
isActive: isActive,
accordion: accordion,
openMotion: openMotion,
expandIcon: expandIcon,
header: label,
collapsible: mergeCollapsible,
onItemClick: handleItemClick,
destroyInactivePanel: mergeDestroyInactivePanel
}), children);
});
};
/**
* @deprecated The next major version will be removed
*/
var getNewChild = function getNewChild(child, index, props) {
if (!child) return null;
var prefixCls = props.prefixCls,
accordion = props.accordion,
collapsible = props.collapsible,
destroyInactivePanel = props.destroyInactivePanel,
onItemClick = props.onItemClick,
activeKey = props.activeKey,
openMotion = props.openMotion,
expandIcon = props.expandIcon;
var key = child.key || String(index);
var _child$props = child.props,
header = _child$props.header,
headerClass = _child$props.headerClass,
childDestroyInactivePanel = _child$props.destroyInactivePanel,
childCollapsible = _child$props.collapsible,
childOnItemClick = _child$props.onItemClick;
var isActive = false;
if (accordion) {
isActive = activeKey[0] === key;
} else {
isActive = activeKey.indexOf(key) > -1;
}
var mergeCollapsible = childCollapsible !== null && childCollapsible !== void 0 ? childCollapsible : collapsible;
var handleItemClick = function handleItemClick(value) {
if (mergeCollapsible === 'disabled') return;
onItemClick(value);
childOnItemClick === null || childOnItemClick === void 0 || childOnItemClick(value);
};
var childProps = {
key: key,
panelKey: key,
header: header,
headerClass: headerClass,
isActive: isActive,
prefixCls: prefixCls,
destroyInactivePanel: childDestroyInactivePanel !== null && childDestroyInactivePanel !== void 0 ? childDestroyInactivePanel : destroyInactivePanel,
openMotion: openMotion,
accordion: accordion,
children: child.props.children,
onItemClick: handleItemClick,
expandIcon: expandIcon,
collapsible: mergeCollapsible
};
// https://github.com/ant-design/ant-design/issues/20479
if (typeof child.type === 'string') {
return child;
}
Object.keys(childProps).forEach(function (propName) {
if (typeof childProps[propName] === 'undefined') {
delete childProps[propName];
}
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, childProps);
};
function useItems(items, rawChildren, props) {
if (Array.isArray(items)) {
return convertItemsToNodes(items, props);
}
return (0,toArray["default"])(rawChildren).map(function (child, index) {
return getNewChild(child, index, props);
});
}
/* harmony default export */ var hooks_useItems = (useItems);
// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
var pickAttrs = __webpack_require__("./node_modules/rc-util/es/pickAttrs.js");
;// ./node_modules/rc-collapse/es/Collapse.js
function getActiveKeysArray(activeKey) {
var currentActiveKey = activeKey;
if (!Array.isArray(currentActiveKey)) {
var activeKeyType = (0,esm_typeof["default"])(currentActiveKey);
currentActiveKey = activeKeyType === 'number' || activeKeyType === 'string' ? [currentActiveKey] : [];
}
return currentActiveKey.map(function (key) {
return String(key);
});
}
var Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-collapse' : _props$prefixCls,
_props$destroyInactiv = props.destroyInactivePanel,
destroyInactivePanel = _props$destroyInactiv === void 0 ? false : _props$destroyInactiv,
style = props.style,
accordion = props.accordion,
className = props.className,
children = props.children,
collapsible = props.collapsible,
openMotion = props.openMotion,
expandIcon = props.expandIcon,
rawActiveKey = props.activeKey,
defaultActiveKey = props.defaultActiveKey,
_onChange = props.onChange,
items = props.items;
var collapseClassName = classnames_default()(prefixCls, className);
var _useMergedState = (0,useMergedState["default"])([], {
value: rawActiveKey,
onChange: function onChange(v) {
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(v);
},
defaultValue: defaultActiveKey,
postState: getActiveKeysArray
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
activeKey = _useMergedState2[0],
setActiveKey = _useMergedState2[1];
var onItemClick = function onItemClick(key) {
return setActiveKey(function () {
if (accordion) {
return activeKey[0] === key ? [] : [key];
}
var index = activeKey.indexOf(key);
var isActive = index > -1;
if (isActive) {
return activeKey.filter(function (item) {
return item !== key;
});
}
return [].concat((0,toConsumableArray["default"])(activeKey), [key]);
});
};
// ======================== Children ========================
(0,warning["default"])(!children, '[rc-collapse] `children` will be removed in next major version. Please use `items` instead.');
var mergedChildren = hooks_useItems(items, children, {
prefixCls: prefixCls,
accordion: accordion,
openMotion: openMotion,
expandIcon: expandIcon,
collapsible: collapsible,
destroyInactivePanel: destroyInactivePanel,
onItemClick: onItemClick,
activeKey: activeKey
});
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
ref: ref,
className: collapseClassName,
style: style,
role: accordion ? 'tablist' : undefined
}, (0,pickAttrs["default"])(props, {
aria: true,
data: true
})), mergedChildren);
});
/* harmony default export */ var es_Collapse = (Object.assign(Collapse, {
/**
* @deprecated use `items` instead, will be removed in `v4.0.0`
*/
Panel: Panel
}));
;// ./node_modules/rc-collapse/es/index.js
/* harmony default export */ var rc_collapse_es = (es_Collapse);
/**
* @deprecated use `items` instead, will be removed in `v4.0.0`
*/
var es_Panel = es_Collapse.Panel;
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
var omit = __webpack_require__("./node_modules/rc-util/es/omit.js");
// EXTERNAL MODULE: ./components/_util/motion.ts
var motion = __webpack_require__("./components/_util/motion.ts");
// EXTERNAL MODULE: ./components/_util/reactNode.ts
var reactNode = __webpack_require__("./components/_util/reactNode.ts");
// EXTERNAL MODULE: ./components/_util/warning.ts
var _util_warning = __webpack_require__("./components/_util/warning.ts");
// EXTERNAL MODULE: ./components/config-provider/context.ts
var context = __webpack_require__("./components/config-provider/context.ts");
// EXTERNAL MODULE: ./components/config-provider/hooks/useSize.ts
var useSize = __webpack_require__("./components/config-provider/hooks/useSize.ts");
;// ./components/collapse/CollapsePanel.tsx
const CollapsePanel_CollapsePanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
if (true) {
const warning = (0,_util_warning.devUseWarning)('Collapse.Panel');
warning.deprecated(!('disabled' in props), 'disabled', 'collapsible="disabled"');
}
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context.ConfigContext);
const {
prefixCls: customizePrefixCls,
className,
showArrow = true
} = props;
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
const collapsePanelClassName = classnames_default()({
[`${prefixCls}-no-arrow`]: !showArrow
}, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_collapse_es.Panel, Object.assign({
ref: ref
}, props, {
prefixCls: prefixCls,
className: collapsePanelClassName
}));
});
/* harmony default export */ var collapse_CollapsePanel = (CollapsePanel_CollapsePanel);
// EXTERNAL MODULE: ./components/collapse/style/index.ts
var collapse_style = __webpack_require__("./components/collapse/style/index.ts");
;// ./components/collapse/Collapse.tsx
const Collapse_Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
getPrefixCls,
direction,
expandIcon: contextExpandIcon,
className: contextClassName,
style: contextStyle
} = (0,context.useComponentConfig)('collapse');
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
bordered = true,
ghost,
size: customizeSize,
expandIconPosition = 'start',
children,
expandIcon
} = props;
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : ctx) !== null && _a !== void 0 ? _a : 'middle';
});
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const [wrapCSSVar, hashId, cssVarCls] = (0,collapse_style["default"])(prefixCls);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Collapse');
// Warning if use legacy type `expandIconPosition`
true ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'deprecated', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : 0;
}
// Align with logic position
const mergedExpandIconPosition = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (expandIconPosition === 'left') {
return 'start';
}
return expandIconPosition === 'right' ? 'end' : expandIconPosition;
}, [expandIconPosition]);
const mergedExpandIcon = expandIcon !== null && expandIcon !== void 0 ? expandIcon : contextExpandIcon;
const renderExpandIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
let panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const icon = typeof mergedExpandIcon === 'function' ? mergedExpandIcon(panelProps) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], {
rotate: panelProps.isActive ? direction === 'rtl' ? -90 : 90 : undefined,
"aria-label": panelProps.isActive ? 'expanded' : 'collapsed'
}));
return (0,reactNode.cloneElement)(icon, () => {
var _a;
return {
className: classnames_default()((_a = icon === null || icon === void 0 ? void 0 : icon.props) === null || _a === void 0 ? void 0 : _a.className, `${prefixCls}-arrow`)
};
});
}, [mergedExpandIcon, prefixCls]);
const collapseClassName = classnames_default()(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {
[`${prefixCls}-borderless`]: !bordered,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-ghost`]: !!ghost,
[`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'
}, contextClassName, className, rootClassName, hashId, cssVarCls);
const openMotion = Object.assign(Object.assign({}, (0,motion["default"])(rootPrefixCls)), {
motionAppear: false,
leavedClassName: `${prefixCls}-content-hidden`
});
const items = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (children) {
return (0,toArray["default"])(children).map((child, index) => {
var _a, _b;
const childProps = child.props;
if (childProps === null || childProps === void 0 ? void 0 : childProps.disabled) {
const key = (_a = child.key) !== null && _a !== void 0 ? _a : String(index);
const mergedChildProps = Object.assign(Object.assign({}, (0,omit["default"])(child.props, ['disabled'])), {
key,
collapsible: (_b = childProps.collapsible) !== null && _b !== void 0 ? _b : 'disabled'
});
return (0,reactNode.cloneElement)(child, mergedChildProps);
}
return child;
});
}
return null;
}, [children]);
return wrapCSSVar(
/*#__PURE__*/
// @ts-ignore
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_collapse_es, Object.assign({
ref: ref,
openMotion: openMotion
}, (0,omit["default"])(props, ['rootClassName']), {
expandIcon: renderExpandIcon,
prefixCls: prefixCls,
className: collapseClassName,
style: Object.assign(Object.assign({}, contextStyle), style)
}), items));
});
if (true) {
Collapse_Collapse.displayName = 'Collapse';
}
/* harmony default export */ var collapse_Collapse = (Object.assign(Collapse_Collapse, {
Panel: collapse_CollapsePanel
}));
;// ./components/collapse/index.tsx
/* harmony default export */ var collapse = (collapse_Collapse);
/***/ }),
/***/ "./components/collapse/style/index.ts":
/*!********************************************!*\
!*** ./components/collapse/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony exports genBaseStyle, prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/collapse.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBaseStyle = token => {
const {
componentCls,
contentBg,
padding,
headerBg,
headerPadding,
collapseHeaderPaddingSM,
collapseHeaderPaddingLG,
collapsePanelBorderRadius,
lineWidth,
lineType,
colorBorder,
colorText,
colorTextHeading,
colorTextDisabled,
fontSizeLG,
lineHeight,
lineHeightLG,
marginSM,
paddingSM,
paddingLG,
paddingXS,
motionDurationSlow,
fontSizeIcon,
contentPadding,
fontHeight,
fontHeightLG
} = token;
const borderBase = `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorBorder}`;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
backgroundColor: headerBg,
border: borderBase,
borderRadius: collapsePanelBorderRadius,
'&-rtl': {
direction: 'rtl'
},
[`& > ${componentCls}-item`]: {
borderBottom: borderBase,
'&:first-child': {
[`
&,
& > ${componentCls}-header`]: {
borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} 0 0`
}
},
'&:last-child': {
[`
&,
& > ${componentCls}-header`]: {
borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)}`
}
},
[`> ${componentCls}-header`]: Object.assign(Object.assign({
position: 'relative',
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'flex-start',
padding: headerPadding,
color: colorTextHeading,
lineHeight,
cursor: 'pointer',
transition: `all ${motionDurationSlow}, visibility 0s`
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusStyle)(token)), {
[`> ${componentCls}-header-text`]: {
flex: 'auto'
},
// >>>>> Arrow
[`${componentCls}-expand-icon`]: {
height: fontHeight,
display: 'flex',
alignItems: 'center',
paddingInlineEnd: marginSM
},
[`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetIcon)()), {
fontSize: fontSizeIcon,
// when `transform: rotate()` is applied to icon's root element
transition: `transform ${motionDurationSlow}`,
// when `transform: rotate()` is applied to icon's child element
svg: {
transition: `transform ${motionDurationSlow}`
}
}),
// >>>>> Text
[`${componentCls}-header-text`]: {
marginInlineEnd: 'auto'
}
}),
[`${componentCls}-collapsible-header`]: {
cursor: 'default',
[`${componentCls}-header-text`]: {
flex: 'none',
cursor: 'pointer'
}
},
[`${componentCls}-collapsible-icon`]: {
cursor: 'unset',
[`${componentCls}-expand-icon`]: {
cursor: 'pointer'
}
}
},
[`${componentCls}-content`]: {
color: colorText,
backgroundColor: contentBg,
borderTop: borderBase,
[`& > ${componentCls}-content-box`]: {
padding: contentPadding
},
'&-hidden': {
display: 'none'
}
},
'&-small': {
[`> ${componentCls}-item`]: {
[`> ${componentCls}-header`]: {
padding: collapseHeaderPaddingSM,
paddingInlineStart: paddingXS,
[`> ${componentCls}-expand-icon`]: {
// Arrow offset
marginInlineStart: token.calc(paddingSM).sub(paddingXS).equal()
}
},
[`> ${componentCls}-content > ${componentCls}-content-box`]: {
padding: paddingSM
}
}
},
'&-large': {
[`> ${componentCls}-item`]: {
fontSize: fontSizeLG,
lineHeight: lineHeightLG,
[`> ${componentCls}-header`]: {
padding: collapseHeaderPaddingLG,
paddingInlineStart: padding,
[`> ${componentCls}-expand-icon`]: {
height: fontHeightLG,
// Arrow offset
marginInlineStart: token.calc(paddingLG).sub(padding).equal()
}
},
[`> ${componentCls}-content > ${componentCls}-content-box`]: {
padding: paddingLG
}
}
},
[`${componentCls}-item:last-child`]: {
borderBottom: 0,
[`> ${componentCls}-content`]: {
borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)}`
}
},
[`& ${componentCls}-item-disabled > ${componentCls}-header`]: {
[`
&,
& > .arrow
`]: {
color: colorTextDisabled,
cursor: 'not-allowed'
}
},
// ========================== Icon Position ==========================
[`&${componentCls}-icon-position-end`]: {
[`& > ${componentCls}-item`]: {
[`> ${componentCls}-header`]: {
[`${componentCls}-expand-icon`]: {
order: 1,
paddingInlineEnd: 0,
paddingInlineStart: marginSM
}
}
}
}
})
};
};
const genArrowStyle = token => {
const {
componentCls
} = token;
const fixedSelector = `> ${componentCls}-item > ${componentCls}-header ${componentCls}-arrow`;
return {
[`${componentCls}-rtl`]: {
[fixedSelector]: {
transform: `rotate(180deg)`
}
}
};
};
const genBorderlessStyle = token => {
const {
componentCls,
headerBg,
paddingXXS,
colorBorder
} = token;
return {
[`${componentCls}-borderless`]: {
backgroundColor: headerBg,
border: 0,
[`> ${componentCls}-item`]: {
borderBottom: `1px solid ${colorBorder}`
},
[`
> ${componentCls}-item:last-child,
> ${componentCls}-item:last-child ${componentCls}-header
`]: {
borderRadius: 0
},
[`> ${componentCls}-item:last-child`]: {
borderBottom: 0
},
[`> ${componentCls}-item > ${componentCls}-content`]: {
backgroundColor: 'transparent',
borderTop: 0
},
[`> ${componentCls}-item > ${componentCls}-content > ${componentCls}-content-box`]: {
paddingTop: paddingXXS
}
}
};
};
const genGhostStyle = token => {
const {
componentCls,
paddingSM
} = token;
return {
[`${componentCls}-ghost`]: {
backgroundColor: 'transparent',
border: 0,
[`> ${componentCls}-item`]: {
borderBottom: 0,
[`> ${componentCls}-content`]: {
backgroundColor: 'transparent',
border: 0,
[`> ${componentCls}-content-box`]: {
paddingBlock: paddingSM
}
}
}
}
};
};
const prepareComponentToken = token => ({
headerPadding: `${token.paddingSM}px ${token.padding}px`,
headerBg: token.colorFillAlter,
contentPadding: `${token.padding}px 16px`,
// Fixed Value
contentBg: token.colorBgContainer
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Collapse', token => {
const collapseToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
collapseHeaderPaddingSM: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingSM)}`,
collapseHeaderPaddingLG: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingLG)}`,
collapsePanelBorderRadius: token.borderRadiusLG
});
return [genBaseStyle(collapseToken), genBorderlessStyle(collapseToken), genGhostStyle(collapseToken), genArrowStyle(collapseToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_4__["default"])(collapseToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/color-picker/color.ts":
/*!******************************************!*\
!*** ./components/color-picker/color.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AggregationColor: function() { return /* binding */ AggregationColor; },
/* harmony export */ toHexFormat: function() { return /* binding */ toHexFormat; }
/* harmony export */ });
/* unused harmony export getHex */
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
/* harmony import */ var _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @rc-component/color-picker */ "./node_modules/@rc-component/color-picker/es/index.js");
const toHexFormat = (value, alpha) => (value === null || value === void 0 ? void 0 : value.replace(/[^\w/]/g, '').slice(0, alpha ? 8 : 6)) || '';
const getHex = (value, alpha) => value ? toHexFormat(value, alpha) : '';
let AggregationColor = /*#__PURE__*/function () {
function AggregationColor(color) {
(0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, AggregationColor);
var _a;
this.cleared = false;
// Clone from another AggregationColor
if (color instanceof AggregationColor) {
this.metaColor = color.metaColor.clone();
this.colors = (_a = color.colors) === null || _a === void 0 ? void 0 : _a.map(info => ({
color: new AggregationColor(info.color),
percent: info.percent
}));
this.cleared = color.cleared;
return;
}
const isArray = Array.isArray(color);
if (isArray && color.length) {
this.colors = color.map(_ref => {
let {
color: c,
percent
} = _ref;
return {
color: new AggregationColor(c),
percent
};
});
this.metaColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_2__.Color(this.colors[0].color.metaColor);
} else {
this.metaColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_2__.Color(isArray ? '' : color);
}
if (!color || isArray && !this.colors) {
this.metaColor = this.metaColor.setA(0);
this.cleared = true;
}
}
return (0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(AggregationColor, [{
key: "toHsb",
value: function toHsb() {
return this.metaColor.toHsb();
}
}, {
key: "toHsbString",
value: function toHsbString() {
return this.metaColor.toHsbString();
}
}, {
key: "toHex",
value: function toHex() {
return getHex(this.toHexString(), this.metaColor.a < 1);
}
}, {
key: "toHexString",
value: function toHexString() {
return this.metaColor.toHexString();
}
}, {
key: "toRgb",
value: function toRgb() {
return this.metaColor.toRgb();
}
}, {
key: "toRgbString",
value: function toRgbString() {
return this.metaColor.toRgbString();
}
}, {
key: "isGradient",
value: function isGradient() {
return !!this.colors && !this.cleared;
}
}, {
key: "getColors",
value: function getColors() {
return this.colors || [{
color: this,
percent: 0
}];
}
}, {
key: "toCssString",
value: function toCssString() {
const {
colors
} = this;
// CSS line-gradient
if (colors) {
const colorsStr = colors.map(c => `${c.color.toRgbString()} ${c.percent}%`).join(', ');
return `linear-gradient(90deg, ${colorsStr})`;
}
return this.metaColor.toRgbString();
}
}, {
key: "equals",
value: function equals(color) {
if (!color || this.isGradient() !== color.isGradient()) {
return false;
}
if (!this.isGradient()) {
return this.toHexString() === color.toHexString();
}
return this.colors.length === color.colors.length && this.colors.every((c, i) => {
const target = color.colors[i];
return c.percent === target.percent && c.color.equals(target.color);
});
}
}]);
}();
/***/ }),
/***/ "./components/color-picker/components/ColorPresets.tsx":
/*!*************************************************************!*\
!*** ./components/color-picker/components/ColorPresets.tsx ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ isBright: function() { return /* binding */ isBright; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rc-component/color-picker */ "./node_modules/@rc-component/color-picker/es/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js");
/* harmony import */ var _collapse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../collapse */ "./components/collapse/index.tsx");
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../locale */ "./components/locale/useLocale.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/useToken.ts");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util */ "./components/color-picker/util.ts");
const genPresetColor = list => list.map(value => {
value.colors = value.colors.map(_util__WEBPACK_IMPORTED_MODULE_4__.generateColor);
return value;
});
const isBright = (value, bgColorToken) => {
const {
r,
g,
b,
a
} = value.toRgb();
const hsv = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.Color(value.toRgbString()).onBackground(bgColorToken).toHsv();
if (a <= 0.5) {
// Adapted to dark mode
return hsv.v > 0.5;
}
return r * 0.299 + g * 0.587 + b * 0.114 > 192;
};
const genCollapsePanelKey = (preset, index) => {
var _a;
const mergedKey = (_a = preset.key) !== null && _a !== void 0 ? _a : index;
return `panel-${mergedKey}`;
};
const ColorPresets = _ref => {
let {
prefixCls,
presets,
value: color,
onChange
} = _ref;
const [locale] = (0,_locale__WEBPACK_IMPORTED_MODULE_5__["default"])('ColorPicker');
const [, token] = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__["default"])();
const [presetsValue] = (0,rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_3__["default"])(genPresetColor(presets), {
value: genPresetColor(presets),
postState: genPresetColor
});
const colorPresetsPrefixCls = `${prefixCls}-presets`;
const activeKeys = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => presetsValue.reduce((acc, preset, index) => {
const {
defaultOpen = true
} = preset;
if (defaultOpen) {
acc.push(genCollapsePanelKey(preset, index));
}
return acc;
}, []), [presetsValue]);
const handleClick = colorValue => {
onChange === null || onChange === void 0 ? void 0 : onChange(colorValue);
};
const items = presetsValue.map((preset, index) => {
var _a;
return {
key: genCollapsePanelKey(preset, index),
label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: `${colorPresetsPrefixCls}-label`
}, preset === null || preset === void 0 ? void 0 : preset.label),
children: (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: `${colorPresetsPrefixCls}-items`
}, Array.isArray(preset === null || preset === void 0 ? void 0 : preset.colors) && ((_a = preset.colors) === null || _a === void 0 ? void 0 : _a.length) > 0 ? preset.colors.map((presetColor, index) => (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.ColorBlock
// eslint-disable-next-line react/no-array-index-key
, {
// eslint-disable-next-line react/no-array-index-key
key: `preset-${index}-${presetColor.toHexString()}`,
color: (0,_util__WEBPACK_IMPORTED_MODULE_4__.generateColor)(presetColor).toRgbString(),
prefixCls: prefixCls,
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(`${colorPresetsPrefixCls}-color`, {
[`${colorPresetsPrefixCls}-color-checked`]: presetColor.toHexString() === (color === null || color === void 0 ? void 0 : color.toHexString()),
[`${colorPresetsPrefixCls}-color-bright`]: isBright(presetColor, token.colorBgElevated)
}),
onClick: () => handleClick(presetColor)
}))) : (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: `${colorPresetsPrefixCls}-empty`
}, locale.presetEmpty))))
};
});
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: colorPresetsPrefixCls
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_collapse__WEBPACK_IMPORTED_MODULE_7__["default"], {
defaultActiveKey: activeKeys,
ghost: true,
items: items
}));
};
/* harmony default export */ __webpack_exports__["default"] = (ColorPresets);
/***/ }),
/***/ "./components/color-picker/style/index.ts":
/*!************************************************************!*\
!*** ./components/color-picker/style/index.ts + 5 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ style; }
});
// UNUSED EXPORTS: genActiveStyle
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/compact-item.ts
var compact_item = __webpack_require__("./components/style/compact-item.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/color-picker/style/color-block.ts
/**
* @private Internal usage only
*/
const getTransBg = (size, colorFill) => ({
backgroundImage: `conic-gradient(${colorFill} 0 25%, transparent 0 50%, ${colorFill} 0 75%, transparent 0)`,
backgroundSize: `${size} ${size}`
});
const genColorBlockStyle = (token, size) => {
const {
componentCls,
borderRadiusSM,
colorPickerInsetShadow,
lineWidth,
colorFillSecondary
} = token;
return {
[`${componentCls}-color-block`]: Object.assign(Object.assign({
position: 'relative',
borderRadius: borderRadiusSM,
width: size,
height: size,
boxShadow: colorPickerInsetShadow,
flex: 'none'
}, getTransBg('50%', token.colorFillSecondary)), {
[`${componentCls}-color-block-inner`]: {
width: '100%',
height: '100%',
boxShadow: `inset 0 0 0 ${(0,cssinjs.unit)(lineWidth)} ${colorFillSecondary}`,
borderRadius: 'inherit'
}
})
};
};
/* harmony default export */ var color_block = (genColorBlockStyle);
;// ./components/color-picker/style/input.ts
const genInputStyle = token => {
const {
componentCls,
antCls,
fontSizeSM,
lineHeightSM,
colorPickerAlphaInputWidth,
marginXXS,
paddingXXS,
controlHeightSM,
marginXS,
fontSizeIcon,
paddingXS,
colorTextPlaceholder,
colorPickerInputNumberHandleWidth,
lineWidth
} = token;
return {
[`${componentCls}-input-container`]: {
display: 'flex',
[`${componentCls}-steppers${antCls}-input-number`]: {
fontSize: fontSizeSM,
lineHeight: lineHeightSM,
[`${antCls}-input-number-input`]: {
paddingInlineStart: paddingXXS,
paddingInlineEnd: 0
},
[`${antCls}-input-number-handler-wrap`]: {
width: colorPickerInputNumberHandleWidth
}
},
[`${componentCls}-steppers${componentCls}-alpha-input`]: {
flex: `0 0 ${(0,cssinjs.unit)(colorPickerAlphaInputWidth)}`,
marginInlineStart: marginXXS
},
[`${componentCls}-format-select${antCls}-select`]: {
marginInlineEnd: marginXS,
width: 'auto',
'&-single': {
[`${antCls}-select-selector`]: {
padding: 0,
border: 0
},
[`${antCls}-select-arrow`]: {
insetInlineEnd: 0
},
[`${antCls}-select-selection-item`]: {
paddingInlineEnd: token.calc(fontSizeIcon).add(marginXXS).equal(),
fontSize: fontSizeSM,
lineHeight: (0,cssinjs.unit)(controlHeightSM)
},
[`${antCls}-select-item-option-content`]: {
fontSize: fontSizeSM,
lineHeight: lineHeightSM
},
[`${antCls}-select-dropdown`]: {
[`${antCls}-select-item`]: {
minHeight: 'auto'
}
}
}
},
[`${componentCls}-input`]: {
gap: marginXXS,
alignItems: 'center',
flex: 1,
width: 0,
[`${componentCls}-hsb-input,${componentCls}-rgb-input`]: {
display: 'flex',
gap: marginXXS,
alignItems: 'center'
},
[`${componentCls}-steppers`]: {
flex: 1
},
[`${componentCls}-hex-input${antCls}-input-affix-wrapper`]: {
flex: 1,
padding: `0 ${(0,cssinjs.unit)(paddingXS)}`,
[`${antCls}-input`]: {
fontSize: fontSizeSM,
textTransform: 'uppercase',
lineHeight: (0,cssinjs.unit)(token.calc(controlHeightSM).sub(token.calc(lineWidth).mul(2)).equal())
},
[`${antCls}-input-prefix`]: {
color: colorTextPlaceholder
}
}
}
}
};
};
/* harmony default export */ var input = (genInputStyle);
;// ./components/color-picker/style/picker.ts
const genPickerStyle = token => {
const {
componentCls,
controlHeightLG,
borderRadiusSM,
colorPickerInsetShadow,
marginSM,
colorBgElevated,
colorFillSecondary,
lineWidthBold,
colorPickerHandlerSize
} = token;
return {
userSelect: 'none',
[`${componentCls}-select`]: {
[`${componentCls}-palette`]: {
minHeight: token.calc(controlHeightLG).mul(4).equal(),
overflow: 'hidden',
borderRadius: borderRadiusSM
},
[`${componentCls}-saturation`]: {
position: 'absolute',
borderRadius: 'inherit',
boxShadow: colorPickerInsetShadow,
inset: 0
},
marginBottom: marginSM
},
// ======================== Panel =========================
[`${componentCls}-handler`]: {
width: colorPickerHandlerSize,
height: colorPickerHandlerSize,
border: `${(0,cssinjs.unit)(lineWidthBold)} solid ${colorBgElevated}`,
position: 'relative',
borderRadius: '50%',
cursor: 'pointer',
boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`
}
};
};
/* harmony default export */ var picker = (genPickerStyle);
;// ./components/color-picker/style/presets.ts
const genPresetsStyle = token => {
const {
componentCls,
antCls,
colorTextQuaternary,
paddingXXS,
colorPickerPresetColorSize,
fontSizeSM,
colorText,
lineHeightSM,
lineWidth,
borderRadius,
colorFill,
colorWhite,
marginXXS,
paddingXS,
fontHeightSM
} = token;
return {
[`${componentCls}-presets`]: {
[`${antCls}-collapse-item > ${antCls}-collapse-header`]: {
padding: 0,
[`${antCls}-collapse-expand-icon`]: {
height: fontHeightSM,
color: colorTextQuaternary,
paddingInlineEnd: paddingXXS
}
},
[`${antCls}-collapse`]: {
display: 'flex',
flexDirection: 'column',
gap: marginXXS
},
[`${antCls}-collapse-item > ${antCls}-collapse-content > ${antCls}-collapse-content-box`]: {
padding: `${(0,cssinjs.unit)(paddingXS)} 0`
},
'&-label': {
fontSize: fontSizeSM,
color: colorText,
lineHeight: lineHeightSM
},
'&-items': {
display: 'flex',
flexWrap: 'wrap',
gap: token.calc(marginXXS).mul(1.5).equal(),
[`${componentCls}-presets-color`]: {
position: 'relative',
cursor: 'pointer',
width: colorPickerPresetColorSize,
height: colorPickerPresetColorSize,
'&::before': {
content: '""',
pointerEvents: 'none',
width: token.calc(colorPickerPresetColorSize).add(token.calc(lineWidth).mul(4)).equal(),
height: token.calc(colorPickerPresetColorSize).add(token.calc(lineWidth).mul(4)).equal(),
position: 'absolute',
top: token.calc(lineWidth).mul(-2).equal(),
insetInlineStart: token.calc(lineWidth).mul(-2).equal(),
borderRadius,
border: `${(0,cssinjs.unit)(lineWidth)} solid transparent`,
transition: `border-color ${token.motionDurationMid} ${token.motionEaseInBack}`
},
'&:hover::before': {
borderColor: colorFill
},
'&::after': {
boxSizing: 'border-box',
position: 'absolute',
top: '50%',
insetInlineStart: '21.5%',
display: 'table',
width: token.calc(colorPickerPresetColorSize).div(13).mul(5).equal(),
height: token.calc(colorPickerPresetColorSize).div(13).mul(8).equal(),
border: `${(0,cssinjs.unit)(token.lineWidthBold)} solid ${token.colorWhite}`,
borderTop: 0,
borderInlineStart: 0,
transform: 'rotate(45deg) scale(0) translate(-50%,-50%)',
opacity: 0,
content: '""',
transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}`
},
[`&${componentCls}-presets-color-checked`]: {
'&::after': {
opacity: 1,
borderColor: colorWhite,
transform: 'rotate(45deg) scale(1) translate(-50%,-50%)',
transition: `transform ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`
},
[`&${componentCls}-presets-color-bright`]: {
'&::after': {
borderColor: 'rgba(0, 0, 0, 0.45)'
}
}
}
}
},
'&-empty': {
fontSize: fontSizeSM,
color: colorTextQuaternary
}
}
};
};
/* harmony default export */ var presets = (genPresetsStyle);
;// ./components/color-picker/style/slider.ts
const genSliderStyle = token => {
const {
componentCls,
colorPickerInsetShadow,
colorBgElevated,
colorFillSecondary,
lineWidthBold,
colorPickerHandlerSizeSM,
colorPickerSliderHeight,
marginSM,
marginXS
} = token;
const handleInnerSize = token.calc(colorPickerHandlerSizeSM).sub(token.calc(lineWidthBold).mul(2).equal()).equal();
const handleHoverSize = token.calc(colorPickerHandlerSizeSM).add(token.calc(lineWidthBold).mul(2).equal()).equal();
const activeHandleStyle = {
'&:after': {
transform: 'scale(1)',
boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${token.colorPrimaryActive}`
}
};
return {
// ======================== Slider ========================
[`${componentCls}-slider`]: [getTransBg((0,cssinjs.unit)(colorPickerSliderHeight), token.colorFillSecondary), {
margin: 0,
padding: 0,
height: colorPickerSliderHeight,
borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
'&-rail': {
height: colorPickerSliderHeight,
borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
boxShadow: colorPickerInsetShadow
},
[`& ${componentCls}-slider-handle`]: {
width: handleInnerSize,
height: handleInnerSize,
top: 0,
borderRadius: '100%',
'&:before': {
display: 'block',
position: 'absolute',
background: 'transparent',
left: {
_skip_check_: true,
value: '50%'
},
top: '50%',
transform: 'translate(-50%, -50%)',
width: handleHoverSize,
height: handleHoverSize,
borderRadius: '100%'
},
'&:after': {
width: colorPickerHandlerSizeSM,
height: colorPickerHandlerSizeSM,
border: `${(0,cssinjs.unit)(lineWidthBold)} solid ${colorBgElevated}`,
boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`,
outline: 'none',
insetInlineStart: token.calc(lineWidthBold).mul(-1).equal(),
top: token.calc(lineWidthBold).mul(-1).equal(),
background: 'transparent',
transition: 'none'
},
'&:focus': activeHandleStyle
}
}],
// ======================== Layout ========================
[`${componentCls}-slider-container`]: {
display: 'flex',
gap: marginSM,
marginBottom: marginSM,
// Group
[`${componentCls}-slider-group`]: {
flex: 1,
flexDirection: 'column',
justifyContent: 'space-between',
display: 'flex',
'&-disabled-alpha': {
justifyContent: 'center'
}
}
},
[`${componentCls}-gradient-slider`]: {
marginBottom: marginXS,
[`& ${componentCls}-slider-handle`]: {
'&:after': {
transform: 'scale(0.8)'
},
'&-active, &:focus': activeHandleStyle
}
}
};
};
/* harmony default export */ var slider = (genSliderStyle);
;// ./components/color-picker/style/index.ts
const genActiveStyle = (token, borderColor, outlineColor) => ({
borderInlineEndWidth: token.lineWidth,
borderColor,
boxShadow: `0 0 0 ${(0,cssinjs.unit)(token.controlOutlineWidth)} ${outlineColor}`,
outline: 0
});
const genRtlStyle = token => {
const {
componentCls
} = token;
return {
'&-rtl': {
[`${componentCls}-presets-color`]: {
'&::after': {
direction: 'ltr'
}
},
[`${componentCls}-clear`]: {
'&::after': {
direction: 'ltr'
}
}
}
};
};
const genClearStyle = (token, size, extraStyle) => {
const {
componentCls,
borderRadiusSM,
lineWidth,
colorSplit,
colorBorder,
red6
} = token;
return {
[`${componentCls}-clear`]: Object.assign(Object.assign({
width: size,
height: size,
borderRadius: borderRadiusSM,
border: `${(0,cssinjs.unit)(lineWidth)} solid ${colorSplit}`,
position: 'relative',
overflow: 'hidden',
cursor: 'inherit',
transition: `all ${token.motionDurationFast}`
}, extraStyle), {
'&::after': {
content: '""',
position: 'absolute',
insetInlineEnd: token.calc(lineWidth).mul(-1).equal(),
top: token.calc(lineWidth).mul(-1).equal(),
display: 'block',
width: 40,
// maximum
height: 2,
// fixed
transformOrigin: `calc(100% - 1px) 1px`,
transform: 'rotate(-45deg)',
backgroundColor: red6
},
'&:hover': {
borderColor: colorBorder
}
})
};
};
const genStatusStyle = token => {
const {
componentCls,
colorError,
colorWarning,
colorErrorHover,
colorWarningHover,
colorErrorOutline,
colorWarningOutline
} = token;
return {
[`&${componentCls}-status-error`]: {
borderColor: colorError,
'&:hover': {
borderColor: colorErrorHover
},
[`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorError, colorErrorOutline))
},
[`&${componentCls}-status-warning`]: {
borderColor: colorWarning,
'&:hover': {
borderColor: colorWarningHover
},
[`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorWarning, colorWarningOutline))
}
};
};
const genSizeStyle = token => {
const {
componentCls,
controlHeightLG,
controlHeightSM,
controlHeight,
controlHeightXS,
borderRadius,
borderRadiusSM,
borderRadiusXS,
borderRadiusLG,
fontSizeLG
} = token;
return {
[`&${componentCls}-lg`]: {
minWidth: controlHeightLG,
minHeight: controlHeightLG,
borderRadius: borderRadiusLG,
[`${componentCls}-color-block, ${componentCls}-clear`]: {
width: controlHeight,
height: controlHeight,
borderRadius
},
[`${componentCls}-trigger-text`]: {
fontSize: fontSizeLG
}
},
[`&${componentCls}-sm`]: {
minWidth: controlHeightSM,
minHeight: controlHeightSM,
borderRadius: borderRadiusSM,
[`${componentCls}-color-block, ${componentCls}-clear`]: {
width: controlHeightXS,
height: controlHeightXS,
borderRadius: borderRadiusXS
},
[`${componentCls}-trigger-text`]: {
lineHeight: (0,cssinjs.unit)(controlHeightXS)
}
}
};
};
const genColorPickerStyle = token => {
const {
antCls,
componentCls,
colorPickerWidth,
colorPrimary,
motionDurationMid,
colorBgElevated,
colorTextDisabled,
colorText,
colorBgContainerDisabled,
borderRadius,
marginXS,
marginSM,
controlHeight,
controlHeightSM,
colorBgTextActive,
colorPickerPresetColorSize,
colorPickerPreviewSize,
lineWidth,
colorBorder,
paddingXXS,
fontSize,
colorPrimaryHover,
controlOutline
} = token;
return [{
[componentCls]: Object.assign({
[`${componentCls}-inner`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
'&-content': {
display: 'flex',
flexDirection: 'column',
width: colorPickerWidth,
[`& > ${antCls}-divider`]: {
margin: `${(0,cssinjs.unit)(marginSM)} 0 ${(0,cssinjs.unit)(marginXS)}`
}
},
[`${componentCls}-panel`]: Object.assign({}, picker(token))
}, slider(token)), color_block(token, colorPickerPreviewSize)), input(token)), presets(token)), genClearStyle(token, colorPickerPresetColorSize, {
marginInlineStart: 'auto'
})), {
// Operation bar
[`${componentCls}-operation`]: {
display: 'flex',
justifyContent: 'space-between',
marginBottom: marginXS
}
}),
'&-trigger': Object.assign(Object.assign(Object.assign(Object.assign({
minWidth: controlHeight,
minHeight: controlHeight,
borderRadius,
border: `${(0,cssinjs.unit)(lineWidth)} solid ${colorBorder}`,
cursor: 'pointer',
display: 'inline-flex',
alignItems: 'flex-start',
justifyContent: 'center',
transition: `all ${motionDurationMid}`,
background: colorBgElevated,
padding: token.calc(paddingXXS).sub(lineWidth).equal(),
[`${componentCls}-trigger-text`]: {
marginInlineStart: marginXS,
marginInlineEnd: token.calc(marginXS).sub(token.calc(paddingXXS).sub(lineWidth)).equal(),
fontSize,
color: colorText,
alignSelf: 'center',
'&-cell': {
'&:not(:last-child):after': {
content: '", "'
},
'&-inactive': {
color: colorTextDisabled
}
}
},
'&:hover': {
borderColor: colorPrimaryHover
},
[`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorPrimary, controlOutline)),
'&-disabled': {
color: colorTextDisabled,
background: colorBgContainerDisabled,
cursor: 'not-allowed',
'&:hover': {
borderColor: colorBgTextActive
},
[`${componentCls}-trigger-text`]: {
color: colorTextDisabled
}
}
}, genClearStyle(token, controlHeightSM)), color_block(token, controlHeightSM)), genStatusStyle(token)), genSizeStyle(token))
}, genRtlStyle(token))
}, (0,compact_item.genCompactItemStyle)(token, {
focusElCls: `${componentCls}-trigger-active`
})];
};
/* harmony default export */ var style = ((0,genStyleUtils.genStyleHooks)('ColorPicker', token => {
const {
colorTextQuaternary,
marginSM
} = token;
const colorPickerSliderHeight = 8;
const colorPickerToken = (0,es.mergeToken)(token, {
colorPickerWidth: 234,
colorPickerHandlerSize: 16,
colorPickerHandlerSizeSM: 12,
colorPickerAlphaInputWidth: 44,
colorPickerInputNumberHandleWidth: 16,
colorPickerPresetColorSize: 24,
colorPickerInsetShadow: `inset 0 0 1px 0 ${colorTextQuaternary}`,
colorPickerSliderHeight,
colorPickerPreviewSize: token.calc(colorPickerSliderHeight).mul(2).add(marginSM).equal()
});
return [genColorPickerStyle(colorPickerToken)];
}));
/***/ }),
/***/ "./components/color-picker/util.ts":
/*!*****************************************!*\
!*** ./components/color-picker/util.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genAlphaColor: function() { return /* binding */ genAlphaColor; },
/* harmony export */ generateColor: function() { return /* binding */ generateColor; },
/* harmony export */ getColorAlpha: function() { return /* binding */ getColorAlpha; },
/* harmony export */ getGradientPercentColor: function() { return /* binding */ getGradientPercentColor; },
/* harmony export */ getRoundNumber: function() { return /* binding */ getRoundNumber; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
/* harmony import */ var _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rc-component/color-picker */ "./node_modules/@rc-component/color-picker/es/index.js");
/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./color */ "./components/color-picker/color.ts");
const generateColor = color => {
if (color instanceof _color__WEBPACK_IMPORTED_MODULE_2__.AggregationColor) {
return color;
}
return new _color__WEBPACK_IMPORTED_MODULE_2__.AggregationColor(color);
};
const getRoundNumber = value => Math.round(Number(value || 0));
const getColorAlpha = color => getRoundNumber(color.toHsb().a * 100);
/** Return the color whose `alpha` is 1 */
const genAlphaColor = (color, alpha) => {
const rgba = color.toRgb();
// Color from hsb input may get `rgb` is (0/0/0) when `hsb.b` is 0
// So if rgb is empty, we should get from hsb
if (!rgba.r && !rgba.g && !rgba.b) {
const hsba = color.toHsb();
hsba.a = alpha || 1;
return generateColor(hsba);
}
rgba.a = alpha || 1;
return generateColor(rgba);
};
/**
* Get percent position color. e.g. [10%-#fff, 20%-#000], 15% => #888
*/
const getGradientPercentColor = (colors, percent) => {
const filledColors = [{
percent: 0,
color: colors[0].color
}].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(colors), [{
percent: 100,
color: colors[colors.length - 1].color
}]);
for (let i = 0; i < filledColors.length - 1; i += 1) {
const startPtg = filledColors[i].percent;
const endPtg = filledColors[i + 1].percent;
const startColor = filledColors[i].color;
const endColor = filledColors[i + 1].color;
if (startPtg <= percent && percent <= endPtg) {
const dist = endPtg - startPtg;
if (dist === 0) {
return startColor;
}
const ratio = (percent - startPtg) / dist * 100;
const startRcColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.Color(startColor);
const endRcColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.Color(endColor);
return startRcColor.mix(endRcColor, ratio).toRgbString();
}
}
// This will never reach
/* istanbul ignore next */
return '';
};
/***/ }),
/***/ "./components/config-provider/SizeContext.tsx":
/*!****************************************************!*\
!*** ./components/config-provider/SizeContext.tsx ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ SizeContextProvider: function() { return /* binding */ SizeContextProvider; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
const SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(undefined);
const SizeContextProvider = _ref => {
let {
children,
size
} = _ref;
const originSize = react__WEBPACK_IMPORTED_MODULE_0__.useContext(SizeContext);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(SizeContext.Provider, {
value: size || originSize
}, children);
};
/* harmony default export */ __webpack_exports__["default"] = (SizeContext);
/***/ }),
/***/ "./components/config-provider/context.ts":
/*!***********************************************!*\
!*** ./components/config-provider/context.ts ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ConfigContext: function() { return /* binding */ ConfigContext; },
/* harmony export */ Variants: function() { return /* binding */ Variants; },
/* harmony export */ defaultIconPrefixCls: function() { return /* binding */ defaultIconPrefixCls; },
/* harmony export */ defaultPrefixCls: function() { return /* binding */ defaultPrefixCls; },
/* harmony export */ useComponentConfig: function() { return /* binding */ useComponentConfig; }
/* harmony export */ });
/* unused harmony export ConfigConsumer */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
const defaultPrefixCls = 'ant';
const defaultIconPrefixCls = 'anticon';
const Variants = ['outlined', 'borderless', 'filled', 'underlined'];
const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
if (customizePrefixCls) {
return customizePrefixCls;
}
return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls;
};
// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.
const ConfigContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({
// We provide a default function for Context without provider
getPrefixCls: defaultGetPrefixCls,
iconPrefixCls: defaultIconPrefixCls
});
const {
Consumer: ConfigConsumer
} = ConfigContext;
const EMPTY_OBJECT = {};
/**
* Get ConfigProvider configured component props.
* This help to reduce bundle size for saving `?.` operator.
* Do not use as `useMemo` deps since we do not cache the object here.
*
* NOTE: not refactor this with `useMemo` since memo will cost another memory space,
* which will waste both compare calculation & memory.
*/
function useComponentConfig(propName) {
const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(ConfigContext);
const {
getPrefixCls,
direction,
getPopupContainer
} = context;
const propValue = context[propName];
return Object.assign(Object.assign({
classNames: EMPTY_OBJECT,
styles: EMPTY_OBJECT
}, propValue), {
getPrefixCls,
direction,
getPopupContainer
});
}
/***/ }),
/***/ "./components/config-provider/hooks/useSize.ts":
/*!*****************************************************!*\
!*** ./components/config-provider/hooks/useSize.ts ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _SizeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SizeContext */ "./components/config-provider/SizeContext.tsx");
const useSize = customSize => {
const size = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_SizeContext__WEBPACK_IMPORTED_MODULE_1__["default"]);
const mergedSize = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => {
if (!customSize) {
return size;
}
if (typeof customSize === 'string') {
return customSize !== null && customSize !== void 0 ? customSize : size;
}
if (typeof customSize === 'function') {
return customSize(size);
}
return size;
}, [customSize, size]);
return mergedSize;
};
/* harmony default export */ __webpack_exports__["default"] = (useSize);
/***/ }),
/***/ "./components/date-picker/locale/en_US.ts":
/*!************************************************************!*\
!*** ./components/date-picker/locale/en_US.ts + 1 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ date_picker_locale_en_US; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/en_US.js
var locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'en_US',
today: 'Today',
now: 'Now',
backToToday: 'Back to today',
ok: 'OK',
clear: 'Clear',
week: 'Week',
month: 'Month',
year: 'Year',
timeSelect: 'select time',
dateSelect: 'select date',
weekSelect: 'Choose a week',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
nextYear: 'Next year (Control + right)',
previousDecade: 'Last decade',
nextDecade: 'Next decade',
previousCentury: 'Last century',
nextCentury: 'Next century'
});
/* harmony default export */ var en_US = (locale);
// EXTERNAL MODULE: ./components/time-picker/locale/en_US.ts
var locale_en_US = __webpack_require__("./components/time-picker/locale/en_US.ts");
;// ./components/date-picker/locale/en_US.ts
// Merge into a locale object
const en_US_locale = {
lang: Object.assign({
placeholder: 'Select date',
yearPlaceholder: 'Select year',
quarterPlaceholder: 'Select quarter',
monthPlaceholder: 'Select month',
weekPlaceholder: 'Select week',
rangePlaceholder: ['Start date', 'End date'],
rangeYearPlaceholder: ['Start year', 'End year'],
rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],
rangeMonthPlaceholder: ['Start month', 'End month'],
rangeWeekPlaceholder: ['Start week', 'End week']
}, en_US),
timePickerLocale: Object.assign({}, locale_en_US["default"])
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_en_US = (en_US_locale);
/***/ }),
/***/ "./components/date-picker/locale/kmr_IQ.ts":
/*!*************************************************************!*\
!*** ./components/date-picker/locale/kmr_IQ.ts + 1 modules ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ date_picker_locale_kmr_IQ; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/kmr_IQ.js
var locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ku',
today: 'Îro',
now: 'Niha',
backToToday: 'Vegere îro',
ok: 'Temam',
clear: 'Paqij bike',
week: 'Sêbê',
month: 'Meh',
year: 'Sal',
timeSelect: 'Demê hilbijêre',
dateSelect: 'Dîrok hilbijêre',
monthSelect: 'Meh hilbijêre',
yearSelect: 'Sal hilbijêre',
decadeSelect: 'Dehsal hilbijêre',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Meha peş (PageUp))',
nextMonth: 'Meha paş (PageDown)',
previousYear: 'Sala peş (Control + şep)',
nextYear: 'Sala paş (Control + rast)',
previousDecade: 'Dehsalen peş',
nextDecade: 'Dehsalen paş',
previousCentury: 'Sedsalen peş',
nextCentury: 'Sedsalen paş'
});
/* harmony default export */ var kmr_IQ = (locale);
// EXTERNAL MODULE: ./components/time-picker/locale/kmr_IQ.ts
var locale_kmr_IQ = __webpack_require__("./components/time-picker/locale/kmr_IQ.ts");
;// ./components/date-picker/locale/kmr_IQ.ts
// Merge into a locale object
const kmr_IQ_locale = {
lang: Object.assign({
placeholder: 'Dîrok hilbijêre',
rangePlaceholder: ['Dîroka destpêkê', 'Dîroka dawîn']
}, kmr_IQ),
timePickerLocale: Object.assign({}, locale_kmr_IQ["default"])
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_kmr_IQ = (kmr_IQ_locale);
/***/ }),
/***/ "./components/date-picker/locale/zh_TW.ts":
/*!************************************************************!*\
!*** ./components/date-picker/locale/zh_TW.ts + 1 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ date_picker_locale_zh_TW; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/zh_TW.js
var locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'zh_TW',
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '確定',
timeSelect: '選擇時間',
dateSelect: '選擇日期',
weekSelect: '選擇周',
clear: '清除',
week: '週',
month: '月',
year: '年',
previousMonth: '上個月 (翻頁上鍵)',
nextMonth: '下個月 (翻頁下鍵)',
monthSelect: '選擇月份',
yearSelect: '選擇年份',
decadeSelect: '選擇年代',
yearFormat: 'YYYY年',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒',
previousYear: '上一年 (Control鍵加左方向鍵)',
nextYear: '下一年 (Control鍵加右方向鍵)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世紀',
nextCentury: '下一世紀',
cellDateFormat: 'D',
monthBeforeYear: false
});
/* harmony default export */ var zh_TW = (locale);
// EXTERNAL MODULE: ./components/time-picker/locale/zh_TW.ts
var locale_zh_TW = __webpack_require__("./components/time-picker/locale/zh_TW.ts");
;// ./components/date-picker/locale/zh_TW.ts
// 统一合并为完整的 Locale
const zh_TW_locale = {
lang: Object.assign({
placeholder: '請選擇日期',
yearPlaceholder: '請選擇年份',
quarterPlaceholder: '請選擇季度',
monthPlaceholder: '請選擇月份',
weekPlaceholder: '請選擇周',
rangePlaceholder: ['開始日期', '結束日期'],
rangeYearPlaceholder: ['開始年份', '結束年份'],
rangeMonthPlaceholder: ['開始月份', '結束月份'],
rangeQuarterPlaceholder: ['開始季度', '結束季度'],
rangeWeekPlaceholder: ['開始周', '結束周']
}, zh_TW),
timePickerLocale: Object.assign({}, locale_zh_TW["default"])
};
zh_TW_locale.lang.ok = '確 定';
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_zh_TW = (zh_TW_locale);
/***/ }),
/***/ "./components/date-picker/style/index.ts":
/*!***********************************************************!*\
!*** ./components/date-picker/style/index.ts + 2 modules ***!
\***********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ date_picker_style; }
});
// UNUSED EXPORTS: genPanelStyle, initPanelComponentToken, initPickerPanelToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/input/style/index.ts
var style = __webpack_require__("./components/input/style/index.ts");
// EXTERNAL MODULE: ./components/input/style/token.ts
var style_token = __webpack_require__("./components/input/style/token.ts");
// EXTERNAL MODULE: ./components/style/index.tsx
var components_style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/compact-item.ts
var compact_item = __webpack_require__("./components/style/compact-item.ts");
// EXTERNAL MODULE: ./components/style/motion/slide.ts
var slide = __webpack_require__("./components/style/motion/slide.ts");
// EXTERNAL MODULE: ./components/style/motion/move.ts
var move = __webpack_require__("./components/style/motion/move.ts");
// EXTERNAL MODULE: ./components/style/roundedArrow.ts
var roundedArrow = __webpack_require__("./components/style/roundedArrow.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/select/style/multiple.ts
var multiple = __webpack_require__("./components/select/style/multiple.ts");
;// ./components/date-picker/style/multiple.ts
const genSize = (token, suffix) => {
const {
componentCls,
controlHeight
} = token;
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
const multipleSelectorUnit = (0,multiple.getMultipleSelectorUnit)(token);
return [
// genSelectionStyle(token, suffix),
{
[`${componentCls}-multiple${suffixCls}`]: {
paddingBlock: multipleSelectorUnit.containerPadding,
paddingInlineStart: multipleSelectorUnit.basePadding,
minHeight: controlHeight,
// ======================== Selections ========================
[`${componentCls}-selection-item`]: {
height: multipleSelectorUnit.itemHeight,
lineHeight: (0,cssinjs.unit)(multipleSelectorUnit.itemLineHeight)
}
}
}];
};
const genPickerMultipleStyle = token => {
const {
componentCls,
calc,
lineWidth
} = token;
const smallToken = (0,es.mergeToken)(token, {
fontHeight: token.fontSize,
selectHeight: token.controlHeightSM,
multipleSelectItemHeight: token.multipleItemHeightSM,
borderRadius: token.borderRadiusSM,
borderRadiusSM: token.borderRadiusXS,
controlHeight: token.controlHeightSM
});
const largeToken = (0,es.mergeToken)(token, {
fontHeight: calc(token.multipleItemHeightLG).sub(calc(lineWidth).mul(2).equal()).equal(),
fontSize: token.fontSizeLG,
selectHeight: token.controlHeightLG,
multipleSelectItemHeight: token.multipleItemHeightLG,
borderRadius: token.borderRadiusLG,
borderRadiusSM: token.borderRadius,
controlHeight: token.controlHeightLG
});
return [
// ======================== Size ========================
genSize(smallToken, 'small'), genSize(token), genSize(largeToken, 'large'),
// ====================== Selection ======================
{
[`${componentCls}${componentCls}-multiple`]: Object.assign(Object.assign({
width: '100%',
cursor: 'text',
// ==================== Selector =====================
[`${componentCls}-selector`]: {
flex: 'auto',
padding: 0,
position: 'relative',
'&:after': {
margin: 0
},
// ================== placeholder ==================
[`${componentCls}-selection-placeholder`]: {
position: 'absolute',
top: '50%',
insetInlineStart: token.inputPaddingHorizontalBase,
insetInlineEnd: 0,
transform: 'translateY(-50%)',
transition: `all ${token.motionDurationSlow}`,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
flex: 1,
color: token.colorTextPlaceholder,
pointerEvents: 'none'
}
}
}, (0,multiple.genOverflowStyle)(token)), {
// ====================== Input ======================
// Input is `readonly`, which is used for a11y only
[`${componentCls}-multiple-input`]: {
width: 0,
height: 0,
border: 0,
visibility: 'hidden',
position: 'absolute',
zIndex: -1
}
})
}];
};
/* harmony default export */ var style_multiple = (genPickerMultipleStyle);
// EXTERNAL MODULE: ./components/date-picker/style/panel.ts
var panel = __webpack_require__("./components/date-picker/style/panel.ts");
// EXTERNAL MODULE: ./components/date-picker/style/token.ts
var date_picker_style_token = __webpack_require__("./components/date-picker/style/token.ts");
// EXTERNAL MODULE: ./components/input/style/variants.ts
var variants = __webpack_require__("./components/input/style/variants.ts");
;// ./components/date-picker/style/variants.ts
const genVariantsStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: [Object.assign(Object.assign(Object.assign(Object.assign({}, (0,variants.genOutlinedStyle)(token)), (0,variants.genUnderlinedStyle)(token)), (0,variants.genFilledStyle)(token)), (0,variants.genBorderlessStyle)(token)),
// ========================= Multiple =========================
{
'&-outlined': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
},
'&-filled': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.colorBgContainer,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
},
'&-borderless': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
},
'&-underlined': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
}
}]
};
};
/* harmony default export */ var style_variants = (genVariantsStyle);
;// ./components/date-picker/style/index.ts
const genPickerPadding = (token, inputHeight, fontHeight, paddingHorizontal) => {
const height = token.calc(fontHeight).add(2).equal();
const paddingTop = token.max(token.calc(inputHeight).sub(height).div(2).equal(), 0);
const paddingBottom = token.max(token.calc(inputHeight).sub(height).sub(paddingTop).equal(), 0);
return {
padding: `${(0,cssinjs.unit)(paddingTop)} ${(0,cssinjs.unit)(paddingHorizontal)} ${(0,cssinjs.unit)(paddingBottom)}`
};
};
const genPickerStatusStyle = token => {
const {
componentCls,
colorError,
colorWarning
} = token;
return {
[`${componentCls}:not(${componentCls}-disabled):not([disabled])`]: {
[`&${componentCls}-status-error`]: {
[`${componentCls}-active-bar`]: {
background: colorError
}
},
[`&${componentCls}-status-warning`]: {
[`${componentCls}-active-bar`]: {
background: colorWarning
}
}
}
};
};
const genPickerStyle = token => {
const {
componentCls,
antCls,
controlHeight,
paddingInline,
lineWidth,
lineType,
colorBorder,
borderRadius,
motionDurationMid,
colorTextDisabled,
colorTextPlaceholder,
controlHeightLG,
fontSizeLG,
controlHeightSM,
paddingInlineSM,
paddingXS,
marginXS,
colorTextDescription,
lineWidthBold,
colorPrimary,
motionDurationSlow,
zIndexPopup,
paddingXXS,
sizePopupArrow,
colorBgElevated,
borderRadiusLG,
boxShadowSecondary,
borderRadiusSM,
colorSplit,
cellHoverBg,
presetsWidth,
presetsMaxWidth,
boxShadowPopoverArrow,
fontHeight,
fontHeightLG,
lineHeightLG
} = token;
return [{
[componentCls]: Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), genPickerPadding(token, controlHeight, fontHeight, paddingInline)), {
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
lineHeight: 1,
borderRadius,
transition: `border ${motionDurationMid}, box-shadow ${motionDurationMid}, background ${motionDurationMid}`,
[`${componentCls}-prefix`]: {
flex: '0 0 auto',
marginInlineEnd: token.inputAffixPadding
},
// ======================== Input =========================
[`${componentCls}-input`]: {
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
width: '100%',
'> input': Object.assign(Object.assign({
position: 'relative',
display: 'inline-block',
width: '100%',
color: 'inherit',
fontSize: token.fontSize,
lineHeight: token.lineHeight,
transition: `all ${motionDurationMid}`
}, (0,style.genPlaceholderStyle)(colorTextPlaceholder)), {
flex: 'auto',
// Fix Firefox flex not correct:
// https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
minWidth: 1,
height: 'auto',
padding: 0,
background: 'transparent',
border: 0,
fontFamily: 'inherit',
'&:focus': {
boxShadow: 'none',
outline: 0
},
'&[disabled]': {
background: 'transparent',
color: colorTextDisabled,
cursor: 'not-allowed'
}
}),
'&-placeholder': {
'> input': {
color: colorTextPlaceholder
}
}
},
// Size
'&-large': Object.assign(Object.assign({}, genPickerPadding(token, controlHeightLG, fontHeightLG, paddingInline)), {
[`${componentCls}-input > input`]: {
fontSize: fontSizeLG,
lineHeight: lineHeightLG
}
}),
'&-small': Object.assign({}, genPickerPadding(token, controlHeightSM, fontHeight, paddingInlineSM)),
[`${componentCls}-suffix`]: {
display: 'flex',
flex: 'none',
alignSelf: 'center',
marginInlineStart: token.calc(paddingXS).div(2).equal(),
color: colorTextDisabled,
lineHeight: 1,
pointerEvents: 'none',
transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
'> *': {
verticalAlign: 'top',
'&:not(:last-child)': {
marginInlineEnd: marginXS
}
}
},
[`${componentCls}-clear`]: {
position: 'absolute',
top: '50%',
insetInlineEnd: 0,
color: colorTextDisabled,
lineHeight: 1,
transform: 'translateY(-50%)',
cursor: 'pointer',
opacity: 0,
transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
'> *': {
verticalAlign: 'top'
},
'&:hover': {
color: colorTextDescription
}
},
'&:hover': {
[`${componentCls}-clear`]: {
opacity: 1
},
// Should use the following selector, but since `:has` has poor compatibility,
// we use `:not(:last-child)` instead, which may cause some problems in some cases.
// [`${componentCls}-suffix:has(+ ${componentCls}-clear)`]: {
[`${componentCls}-suffix:not(:last-child)`]: {
opacity: 0
}
},
[`${componentCls}-separator`]: {
position: 'relative',
display: 'inline-block',
width: '1em',
height: fontSizeLG,
color: colorTextDisabled,
fontSize: fontSizeLG,
verticalAlign: 'top',
cursor: 'default',
[`${componentCls}-focused &`]: {
color: colorTextDescription
},
[`${componentCls}-range-separator &`]: {
[`${componentCls}-disabled &`]: {
cursor: 'not-allowed'
}
}
},
// ======================== Range =========================
'&-range': {
position: 'relative',
display: 'inline-flex',
// Active bar
[`${componentCls}-active-bar`]: {
bottom: token.calc(lineWidth).mul(-1).equal(),
height: lineWidthBold,
background: colorPrimary,
opacity: 0,
transition: `all ${motionDurationSlow} ease-out`,
pointerEvents: 'none'
},
[`&${componentCls}-focused`]: {
[`${componentCls}-active-bar`]: {
opacity: 1
}
},
[`${componentCls}-range-separator`]: {
alignItems: 'center',
padding: `0 ${(0,cssinjs.unit)(paddingXS)}`,
lineHeight: 1
}
},
// ======================== Clear =========================
'&-range, &-multiple': {
// Clear
[`${componentCls}-clear`]: {
insetInlineEnd: paddingInline
},
[`&${componentCls}-small`]: {
[`${componentCls}-clear`]: {
insetInlineEnd: paddingInlineSM
}
}
},
// ======================= Dropdown =======================
'&-dropdown': Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), (0,panel.genPanelStyle)(token)), {
pointerEvents: 'none',
position: 'absolute',
// Fix incorrect position of picker popup
// https://github.com/ant-design/ant-design/issues/35590
top: -9999,
left: {
_skip_check_: true,
value: -9999
},
zIndex: zIndexPopup,
[`&${componentCls}-dropdown-hidden`]: {
display: 'none'
},
'&-rtl': {
direction: 'rtl'
},
[`&${componentCls}-dropdown-placement-bottomLeft,
&${componentCls}-dropdown-placement-bottomRight`]: {
[`${componentCls}-range-arrow`]: {
top: 0,
display: 'block',
transform: 'translateY(-100%)'
}
},
[`&${componentCls}-dropdown-placement-topLeft,
&${componentCls}-dropdown-placement-topRight`]: {
[`${componentCls}-range-arrow`]: {
bottom: 0,
display: 'block',
transform: 'translateY(100%) rotate(180deg)'
}
},
[`&${antCls}-slide-up-appear, &${antCls}-slide-up-enter`]: {
[`${componentCls}-range-arrow${componentCls}-range-arrow`]: {
transition: 'none'
}
},
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topRight,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topRight`]: {
animationName: slide.slideDownIn
},
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomRight,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomRight`]: {
animationName: slide.slideUpIn
},
// https://github.com/ant-design/ant-design/issues/48727
[`&${antCls}-slide-up-leave ${componentCls}-panel-container`]: {
pointerEvents: 'none'
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topRight`]: {
animationName: slide.slideDownOut
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomRight`]: {
animationName: slide.slideUpOut
},
// Time picker with additional style
[`${componentCls}-panel > ${componentCls}-time-panel`]: {
paddingTop: paddingXXS
},
// ======================== Ranges ========================
[`${componentCls}-range-wrapper`]: {
display: 'flex',
position: 'relative'
},
[`${componentCls}-range-arrow`]: Object.assign(Object.assign({
position: 'absolute',
zIndex: 1,
display: 'none',
paddingInline: token.calc(paddingInline).mul(1.5).equal(),
boxSizing: 'content-box',
transition: `all ${motionDurationSlow} ease-out`
}, (0,roundedArrow.genRoundedArrow)(token, colorBgElevated, boxShadowPopoverArrow)), {
'&:before': {
insetInlineStart: token.calc(paddingInline).mul(1.5).equal()
}
}),
[`${componentCls}-panel-container`]: {
overflow: 'hidden',
verticalAlign: 'top',
background: colorBgElevated,
borderRadius: borderRadiusLG,
boxShadow: boxShadowSecondary,
transition: `margin ${motionDurationSlow}`,
display: 'inline-block',
pointerEvents: 'auto',
// ======================== Layout ========================
[`${componentCls}-panel-layout`]: {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'stretch'
},
// ======================== Preset ========================
[`${componentCls}-presets`]: {
display: 'flex',
flexDirection: 'column',
minWidth: presetsWidth,
maxWidth: presetsMaxWidth,
ul: {
height: 0,
flex: 'auto',
listStyle: 'none',
overflow: 'auto',
margin: 0,
padding: paddingXS,
borderInlineEnd: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
li: Object.assign(Object.assign({}, components_style.textEllipsis), {
borderRadius: borderRadiusSM,
paddingInline: paddingXS,
paddingBlock: token.calc(controlHeightSM).sub(fontHeight).div(2).equal(),
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
'+ li': {
marginTop: marginXS
},
'&:hover': {
background: cellHoverBg
}
})
}
},
// ======================== Panels ========================
[`${componentCls}-panels`]: {
display: 'inline-flex',
flexWrap: 'nowrap',
// [`${componentCls}-panel`]: {
// borderWidth: `0 0 ${unit(lineWidth)}`,
// },
'&:last-child': {
[`${componentCls}-panel`]: {
borderWidth: 0
}
}
},
[`${componentCls}-panel`]: {
verticalAlign: 'top',
background: 'transparent',
borderRadius: 0,
borderWidth: 0,
[`${componentCls}-content, table`]: {
textAlign: 'center'
},
'&-focused': {
borderColor: colorBorder
}
}
}
}),
'&-dropdown-range': {
padding: `${(0,cssinjs.unit)(token.calc(sizePopupArrow).mul(2).div(3).equal())} 0`,
'&-hidden': {
display: 'none'
}
},
'&-rtl': {
direction: 'rtl',
[`${componentCls}-separator`]: {
transform: 'scale(-1, 1)'
},
[`${componentCls}-footer`]: {
'&-extra': {
direction: 'rtl'
}
}
}
})
},
// Follow code may reuse in other components
(0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down'), (0,move.initMoveMotion)(token, 'move-up'), (0,move.initMoveMotion)(token, 'move-down')];
};
// ============================== Export ==============================
/* harmony default export */ var date_picker_style = ((0,genStyleUtils.genStyleHooks)('DatePicker', token => {
const pickerToken = (0,es.mergeToken)((0,style_token.initInputToken)(token), (0,date_picker_style_token.initPickerPanelToken)(token), {
inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),
multipleSelectItemHeight: token.multipleItemHeight,
selectHeight: token.controlHeight
});
return [(0,panel["default"])(pickerToken), genPickerStyle(pickerToken), style_variants(pickerToken), genPickerStatusStyle(pickerToken), style_multiple(pickerToken),
// =====================================================
// == Space Compact ==
// =====================================================
(0,compact_item.genCompactItemStyle)(token, {
focusElCls: `${token.componentCls}-focused`
})];
}, date_picker_style_token.prepareComponentToken));
/***/ }),
/***/ "./components/date-picker/style/panel.ts":
/*!***********************************************!*\
!*** ./components/date-picker/style/panel.ts ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genPanelStyle: function() { return /* binding */ genPanelStyle; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
const genPickerCellInnerStyle = token => {
const {
pickerCellCls,
pickerCellInnerCls,
cellHeight,
borderRadiusSM,
motionDurationMid,
cellHoverBg,
lineWidth,
lineType,
colorPrimary,
cellActiveWithRangeBg,
colorTextLightSolid,
colorTextDisabled,
cellBgDisabled,
colorFillSecondary
} = token;
return {
'&::before': {
position: 'absolute',
top: '50%',
insetInlineStart: 0,
insetInlineEnd: 0,
zIndex: 1,
height: cellHeight,
transform: 'translateY(-50%)',
content: '""',
pointerEvents: 'none'
},
// >>> Default
[pickerCellInnerCls]: {
position: 'relative',
zIndex: 2,
display: 'inline-block',
minWidth: cellHeight,
height: cellHeight,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(cellHeight),
borderRadius: borderRadiusSM,
transition: `background ${motionDurationMid}`
},
// >>> Hover
[`&:hover:not(${pickerCellCls}-in-view):not(${pickerCellCls}-disabled),
&:hover:not(${pickerCellCls}-selected):not(${pickerCellCls}-range-start):not(${pickerCellCls}-range-end):not(${pickerCellCls}-disabled)`]: {
[pickerCellInnerCls]: {
background: cellHoverBg
}
},
// >>> Today
[`&-in-view${pickerCellCls}-today ${pickerCellInnerCls}`]: {
'&::before': {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
zIndex: 1,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorPrimary}`,
borderRadius: borderRadiusSM,
content: '""'
}
},
// >>> In Range
[`&-in-view${pickerCellCls}-in-range,
&-in-view${pickerCellCls}-range-start,
&-in-view${pickerCellCls}-range-end`]: {
position: 'relative',
[`&:not(${pickerCellCls}-disabled):before`]: {
background: cellActiveWithRangeBg
}
},
// >>> Selected
[`&-in-view${pickerCellCls}-selected,
&-in-view${pickerCellCls}-range-start,
&-in-view${pickerCellCls}-range-end`]: {
[`&:not(${pickerCellCls}-disabled) ${pickerCellInnerCls}`]: {
color: colorTextLightSolid,
background: colorPrimary
},
[`&${pickerCellCls}-disabled ${pickerCellInnerCls}`]: {
background: colorFillSecondary
}
},
[`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-disabled):before`]: {
insetInlineStart: '50%'
},
[`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-disabled):before`]: {
insetInlineEnd: '50%'
},
// range start border-radius
[`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-range-end) ${pickerCellInnerCls}`]: {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM,
borderStartEndRadius: 0,
borderEndEndRadius: 0
},
// range end border-radius
[`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-range-start) ${pickerCellInnerCls}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0,
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM
},
// >>> Disabled
'&-disabled': {
color: colorTextDisabled,
cursor: 'not-allowed',
[pickerCellInnerCls]: {
background: 'transparent'
},
'&::before': {
background: cellBgDisabled
}
},
[`&-disabled${pickerCellCls}-today ${pickerCellInnerCls}::before`]: {
borderColor: colorTextDisabled
}
};
};
const genPanelStyle = token => {
const {
componentCls,
pickerCellCls,
pickerCellInnerCls,
pickerYearMonthCellWidth,
pickerControlIconSize,
cellWidth,
paddingSM,
paddingXS,
paddingXXS,
colorBgContainer,
lineWidth,
lineType,
borderRadiusLG,
colorPrimary,
colorTextHeading,
colorSplit,
pickerControlIconBorderWidth,
colorIcon,
textHeight,
motionDurationMid,
colorIconHover,
fontWeightStrong,
cellHeight,
pickerCellPaddingVertical,
colorTextDisabled,
colorText,
fontSize,
motionDurationSlow,
withoutTimeCellHeight,
pickerQuarterPanelContentHeight,
borderRadiusSM,
colorTextLightSolid,
cellHoverBg,
timeColumnHeight,
timeColumnWidth,
timeCellHeight,
controlItemBgActive,
marginXXS,
pickerDatePanelPaddingHorizontal,
pickerControlIconMargin
} = token;
const pickerPanelWidth = token.calc(cellWidth).mul(7).add(token.calc(pickerDatePanelPaddingHorizontal).mul(2)).equal();
return {
[componentCls]: {
'&-panel': {
display: 'inline-flex',
flexDirection: 'column',
textAlign: 'center',
background: colorBgContainer,
borderRadius: borderRadiusLG,
outline: 'none',
'&-focused': {
borderColor: colorPrimary
},
'&-rtl': {
[`${componentCls}-prev-icon,
${componentCls}-super-prev-icon`]: {
transform: 'rotate(45deg)'
},
[`${componentCls}-next-icon,
${componentCls}-super-next-icon`]: {
transform: 'rotate(-135deg)'
},
[`${componentCls}-time-panel`]: {
[`${componentCls}-content`]: {
direction: 'ltr',
'> *': {
direction: 'rtl'
}
}
}
}
},
// ========================================================
// = Shared Panel =
// ========================================================
[`&-decade-panel,
&-year-panel,
&-quarter-panel,
&-month-panel,
&-week-panel,
&-date-panel,
&-time-panel`]: {
display: 'flex',
flexDirection: 'column',
width: pickerPanelWidth
},
// ======================= Header =======================
'&-header': {
display: 'flex',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXS)}`,
color: colorTextHeading,
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
'> *': {
flex: 'none'
},
button: {
padding: 0,
color: colorIcon,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(textHeight),
background: 'transparent',
border: 0,
cursor: 'pointer',
transition: `color ${motionDurationMid}`,
fontSize: 'inherit',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
'&:empty': {
display: 'none'
}
},
'> button': {
minWidth: '1.6em',
fontSize,
'&:hover': {
color: colorIconHover
},
'&:disabled': {
opacity: 0.25,
pointerEvents: 'none'
}
},
'&-view': {
flex: 'auto',
fontWeight: fontWeightStrong,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(textHeight),
'> button': {
color: 'inherit',
fontWeight: 'inherit',
verticalAlign: 'top',
'&:not(:first-child)': {
marginInlineStart: paddingXS
},
'&:hover': {
color: colorPrimary
}
}
}
},
// Arrow button
[`&-prev-icon,
&-next-icon,
&-super-prev-icon,
&-super-next-icon`]: {
position: 'relative',
width: pickerControlIconSize,
height: pickerControlIconSize,
'&::before': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: pickerControlIconSize,
height: pickerControlIconSize,
border: `0 solid currentcolor`,
borderBlockWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(pickerControlIconBorderWidth)} 0`,
borderInlineWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(pickerControlIconBorderWidth)} 0`,
content: '""'
}
},
[`&-super-prev-icon,
&-super-next-icon`]: {
'&::after': {
position: 'absolute',
top: pickerControlIconMargin,
insetInlineStart: pickerControlIconMargin,
display: 'inline-block',
width: pickerControlIconSize,
height: pickerControlIconSize,
border: '0 solid currentcolor',
borderBlockWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(pickerControlIconBorderWidth)} 0`,
borderInlineWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(pickerControlIconBorderWidth)} 0`,
content: '""'
}
},
'&-prev-icon, &-super-prev-icon': {
transform: 'rotate(-45deg)'
},
'&-next-icon, &-super-next-icon': {
transform: 'rotate(135deg)'
},
// ======================== Body ========================
'&-content': {
width: '100%',
tableLayout: 'fixed',
borderCollapse: 'collapse',
'th, td': {
position: 'relative',
minWidth: cellHeight,
fontWeight: 'normal'
},
th: {
height: token.calc(cellHeight).add(token.calc(pickerCellPaddingVertical).mul(2)).equal(),
color: colorText,
verticalAlign: 'middle'
}
},
'&-cell': Object.assign({
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(pickerCellPaddingVertical)} 0`,
color: colorTextDisabled,
cursor: 'pointer',
// In view
'&-in-view': {
color: colorText
}
}, genPickerCellInnerStyle(token)),
[`&-decade-panel,
&-year-panel,
&-quarter-panel,
&-month-panel`]: {
[`${componentCls}-content`]: {
height: token.calc(withoutTimeCellHeight).mul(4).equal()
},
[pickerCellInnerCls]: {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXS)}`
}
},
'&-quarter-panel': {
[`${componentCls}-content`]: {
height: pickerQuarterPanelContentHeight
}
},
// ========================================================
// = Special =
// ========================================================
// ===================== Decade Panel =====================
'&-decade-panel': {
[pickerCellInnerCls]: {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(paddingXS).div(2).equal())}`
},
[`${componentCls}-cell::before`]: {
display: 'none'
}
},
// ============= Year & Quarter & Month Panel =============
[`&-year-panel,
&-quarter-panel,
&-month-panel`]: {
[`${componentCls}-body`]: {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXS)}`
},
[pickerCellInnerCls]: {
width: pickerYearMonthCellWidth
}
},
// ====================== Date Panel ======================
'&-date-panel': {
[`${componentCls}-body`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(pickerDatePanelPaddingHorizontal)}`
},
[`${componentCls}-content th`]: {
boxSizing: 'border-box',
padding: 0
}
},
// ====================== Week Panel ======================
'&-week-panel': {
// Clear cell style
[`${componentCls}-cell`]: {
[`&:hover ${pickerCellInnerCls},
&-selected ${pickerCellInnerCls},
${pickerCellInnerCls}`]: {
background: 'transparent !important'
}
},
'&-row': {
td: {
'&:before': {
transition: `background ${motionDurationMid}`
},
'&:first-child:before': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM
},
'&:last-child:before': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM
}
},
'&:hover td:before': {
background: cellHoverBg
},
'&-range-start td, &-range-end td, &-selected td, &-hover td': {
// Rise priority to override hover style
[`&${pickerCellCls}`]: {
'&:before': {
background: colorPrimary
},
[`&${componentCls}-cell-week`]: {
color: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(colorTextLightSolid).setA(0.5).toHexString()
},
[pickerCellInnerCls]: {
color: colorTextLightSolid
}
}
},
'&-range-hover td:before': {
background: controlItemBgActive
}
}
},
// >>> ShowWeek
'&-week-panel, &-date-panel-show-week': {
[`${componentCls}-body`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingSM)}`
},
[`${componentCls}-content th`]: {
width: 'auto'
}
},
// ==================== Datetime Panel ====================
'&-datetime-panel': {
display: 'flex',
[`${componentCls}-time-panel`]: {
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorSplit}`
},
[`${componentCls}-date-panel,
${componentCls}-time-panel`]: {
transition: `opacity ${motionDurationSlow}`
},
// Keyboard
'&-active': {
[`${componentCls}-date-panel,
${componentCls}-time-panel`]: {
opacity: 0.3,
'&-active': {
opacity: 1
}
}
}
},
// ====================== Time Panel ======================
'&-time-panel': {
width: 'auto',
minWidth: 'auto',
[`${componentCls}-content`]: {
display: 'flex',
flex: 'auto',
height: timeColumnHeight
},
'&-column': {
flex: '1 0 auto',
width: timeColumnWidth,
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXXS)} 0`,
padding: 0,
overflowY: 'hidden',
textAlign: 'start',
listStyle: 'none',
transition: `background ${motionDurationMid}`,
overflowX: 'hidden',
'&::-webkit-scrollbar': {
width: 8,
backgroundColor: 'transparent'
},
'&::-webkit-scrollbar-thumb': {
backgroundColor: token.colorTextTertiary,
borderRadius: token.borderRadiusSM
},
// For Firefox
'&': {
scrollbarWidth: 'thin',
scrollbarColor: `${token.colorTextTertiary} transparent`
},
'&::after': {
display: 'block',
height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(timeCellHeight)})`,
content: '""'
},
'&:not(:first-child)': {
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorSplit}`
},
'&-active': {
background: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(controlItemBgActive).setA(0.2).toHexString()
},
'&:hover': {
overflowY: 'auto'
},
'> li': {
margin: 0,
padding: 0,
[`&${componentCls}-time-panel-cell`]: {
marginInline: marginXXS,
[`${componentCls}-time-panel-cell-inner`]: {
display: 'block',
width: token.calc(timeColumnWidth).sub(token.calc(marginXXS).mul(2)).equal(),
height: timeCellHeight,
margin: 0,
paddingBlock: 0,
paddingInlineEnd: 0,
paddingInlineStart: token.calc(timeColumnWidth).sub(timeCellHeight).div(2).equal(),
color: colorText,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(timeCellHeight),
borderRadius: borderRadiusSM,
cursor: 'pointer',
transition: `background ${motionDurationMid}`,
'&:hover': {
background: cellHoverBg
}
},
'&-selected': {
[`${componentCls}-time-panel-cell-inner`]: {
background: controlItemBgActive
}
},
'&-disabled': {
[`${componentCls}-time-panel-cell-inner`]: {
color: colorTextDisabled,
background: 'transparent',
cursor: 'not-allowed'
}
}
}
}
}
}
}
};
};
const genPickerPanelStyle = token => {
const {
componentCls,
textHeight,
lineWidth,
paddingSM,
antCls,
colorPrimary,
cellActiveWithRangeBg,
colorPrimaryBorder,
lineType,
colorSplit
} = token;
return {
[`${componentCls}-dropdown`]: {
// ======================== Footer ========================
[`${componentCls}-footer`]: {
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
'&-extra': {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingSM)}`,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),
textAlign: 'start',
'&:not(:last-child)': {
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorSplit}`
}
}
},
// ==================== Footer > Ranges ===================
[`${componentCls}-panels + ${componentCls}-footer ${componentCls}-ranges`]: {
justifyContent: 'space-between'
},
[`${componentCls}-ranges`]: {
marginBlock: 0,
paddingInline: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingSM),
overflow: 'hidden',
textAlign: 'start',
listStyle: 'none',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
'> li': {
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),
display: 'inline-block'
},
[`${componentCls}-now-btn-disabled`]: {
pointerEvents: 'none',
color: token.colorTextDisabled
},
// https://github.com/ant-design/ant-design/issues/23687
[`${componentCls}-preset > ${antCls}-tag-blue`]: {
color: colorPrimary,
background: cellActiveWithRangeBg,
borderColor: colorPrimaryBorder,
cursor: 'pointer'
},
[`${componentCls}-ok`]: {
paddingBlock: token.calc(lineWidth).mul(2).equal(),
marginInlineStart: 'auto'
}
}
}
};
};
/* harmony default export */ __webpack_exports__["default"] = (genPickerPanelStyle);
/***/ }),
/***/ "./components/date-picker/style/token.ts":
/*!***********************************************!*\
!*** ./components/date-picker/style/token.ts ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initPanelComponentToken: function() { return /* binding */ initPanelComponentToken; },
/* harmony export */ initPickerPanelToken: function() { return /* binding */ initPickerPanelToken; },
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _input_style_token__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/style/token */ "./components/input/style/token.ts");
/* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
const initPickerPanelToken = token => {
const {
componentCls,
controlHeightLG,
paddingXXS,
padding
} = token;
return {
pickerCellCls: `${componentCls}-cell`,
pickerCellInnerCls: `${componentCls}-cell-inner`,
pickerYearMonthCellWidth: token.calc(controlHeightLG).mul(1.5).equal(),
pickerQuarterPanelContentHeight: token.calc(controlHeightLG).mul(1.4).equal(),
pickerCellPaddingVertical: token.calc(paddingXXS).add(token.calc(paddingXXS).div(2)).equal(),
pickerCellBorderGap: 2,
// Magic for gap between cells
pickerControlIconSize: 7,
pickerControlIconMargin: 4,
pickerControlIconBorderWidth: 1.5,
pickerDatePanelPaddingHorizontal: token.calc(padding).add(token.calc(paddingXXS).div(2)).equal() // 18 in normal
};
};
const initPanelComponentToken = token => {
const {
colorBgContainerDisabled,
controlHeight,
controlHeightSM,
controlHeightLG,
paddingXXS,
lineWidth
} = token;
// Item height default use `controlHeight - 2 * paddingXXS`,
// but some case `paddingXXS=0`.
// Let's fallback it.
const dblPaddingXXS = paddingXXS * 2;
const dblLineWidth = lineWidth * 2;
const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);
const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);
const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);
// FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding
const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);
const filledToken = {
INTERNAL_FIXED_ITEM_MARGIN,
cellHoverBg: token.controlItemBgHover,
cellActiveWithRangeBg: token.controlItemBgActive,
cellHoverWithRangeBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorPrimary).lighten(35).toHexString(),
cellRangeBorderColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorPrimary).lighten(20).toHexString(),
cellBgDisabled: colorBgContainerDisabled,
timeColumnWidth: controlHeightLG * 1.4,
timeColumnHeight: 28 * 8,
timeCellHeight: 28,
cellWidth: controlHeightSM * 1.5,
cellHeight: controlHeightSM,
textHeight: controlHeightLG,
withoutTimeCellHeight: controlHeightLG * 1.65,
multipleItemBg: token.colorFillSecondary,
multipleItemBorderColor: 'transparent',
multipleItemHeight,
multipleItemHeightSM,
multipleItemHeightLG,
multipleSelectorBgDisabled: colorBgContainerDisabled,
multipleItemColorDisabled: token.colorTextDisabled,
multipleItemBorderColorDisabled: 'transparent'
};
return filledToken;
};
const prepareComponentToken = token => Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_input_style_token__WEBPACK_IMPORTED_MODULE_1__.initComponentToken)(token)), initPanelComponentToken(token)), (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_2__.getArrowToken)(token)), {
presetsWidth: 120,
presetsMaxWidth: 200,
zIndexPopup: token.zIndexPopupBase + 50
});
/***/ }),
/***/ "./components/descriptions/style/index.ts":
/*!************************************************!*\
!*** ./components/descriptions/style/index.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBorderedStyle = token => {
const {
componentCls,
labelBg
} = token;
return {
[`&${componentCls}-bordered`]: {
[`> ${componentCls}-view`]: {
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
'> table': {
tableLayout: 'auto'
},
[`${componentCls}-row`]: {
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
'&:last-child': {
borderBottom: 'none'
},
[`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingLG)}`,
borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
'&:last-child': {
borderInlineEnd: 'none'
}
},
[`> ${componentCls}-item-label`]: {
color: token.colorTextSecondary,
backgroundColor: labelBg,
'&::after': {
display: 'none'
}
}
}
},
[`&${componentCls}-middle`]: {
[`${componentCls}-row`]: {
[`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingLG)}`
}
}
},
[`&${componentCls}-small`]: {
[`${componentCls}-row`]: {
[`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)}`
}
}
}
}
};
};
const genDescriptionStyles = token => {
const {
componentCls,
extraColor,
itemPaddingBottom,
itemPaddingEnd,
colonMarginRight,
colonMarginLeft,
titleMarginBottom
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), genBorderedStyle(token)), {
'&-rtl': {
direction: 'rtl'
},
[`${componentCls}-header`]: {
display: 'flex',
alignItems: 'center',
marginBottom: titleMarginBottom
},
[`${componentCls}-title`]: Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
flex: 'auto',
color: token.titleColor,
fontWeight: token.fontWeightStrong,
fontSize: token.fontSizeLG,
lineHeight: token.lineHeightLG
}),
[`${componentCls}-extra`]: {
marginInlineStart: 'auto',
color: extraColor,
fontSize: token.fontSize
},
[`${componentCls}-view`]: {
width: '100%',
borderRadius: token.borderRadiusLG,
table: {
width: '100%',
tableLayout: 'fixed',
borderCollapse: 'collapse'
}
},
[`${componentCls}-row`]: {
'> th, > td': {
paddingBottom: itemPaddingBottom,
paddingInlineEnd: itemPaddingEnd
},
'> th:last-child, > td:last-child': {
paddingInlineEnd: 0
},
'&:last-child': {
borderBottom: 'none',
'> th, > td': {
paddingBottom: 0
}
}
},
[`${componentCls}-item-label`]: {
color: token.labelColor,
fontWeight: 'normal',
fontSize: token.fontSize,
lineHeight: token.lineHeight,
textAlign: 'start',
'&::after': {
content: '":"',
position: 'relative',
top: -0.5,
// magic for position
marginInline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(colonMarginLeft)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(colonMarginRight)}`
},
[`&${componentCls}-item-no-colon::after`]: {
content: '""'
}
},
[`${componentCls}-item-no-label`]: {
'&::after': {
margin: 0,
content: '""'
}
},
[`${componentCls}-item-content`]: {
display: 'table-cell',
flex: 1,
color: token.contentColor,
fontSize: token.fontSize,
lineHeight: token.lineHeight,
wordBreak: 'break-word',
overflowWrap: 'break-word'
},
[`${componentCls}-item`]: {
paddingBottom: 0,
verticalAlign: 'top',
'&-container': {
display: 'flex',
[`${componentCls}-item-label`]: {
display: 'inline-flex',
alignItems: 'baseline'
},
[`${componentCls}-item-content`]: {
display: 'inline-flex',
alignItems: 'baseline',
minWidth: '1em'
}
}
},
'&-middle': {
[`${componentCls}-row`]: {
'> th, > td': {
paddingBottom: token.paddingSM
}
}
},
'&-small': {
[`${componentCls}-row`]: {
'> th, > td': {
paddingBottom: token.paddingXS
}
}
}
})
};
};
const prepareComponentToken = token => ({
labelBg: token.colorFillAlter,
labelColor: token.colorTextTertiary,
titleColor: token.colorText,
titleMarginBottom: token.fontSizeSM * token.lineHeightSM,
itemPaddingBottom: token.padding,
itemPaddingEnd: token.padding,
colonMarginRight: token.marginXS,
colonMarginLeft: token.marginXXS / 2,
contentColor: token.colorText,
extraColor: token.colorText
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Descriptions', token => {
const descriptionToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {});
return genDescriptionStyles(descriptionToken);
}, prepareComponentToken));
/***/ }),
/***/ "./components/divider/style/index.ts":
/*!*******************************************!*\
!*** ./components/divider/style/index.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Shared ==============================
const genSharedDividerStyle = token => {
const {
componentCls,
sizePaddingEdgeHorizontal,
colorSplit,
lineWidth,
textPaddingInline,
orientationMargin,
verticalMarginInline
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
borderBlockStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} solid ${colorSplit}`,
// vertical
'&-vertical': {
position: 'relative',
top: '-0.06em',
display: 'inline-block',
height: '0.9em',
marginInline: verticalMarginInline,
marginBlock: 0,
verticalAlign: 'middle',
borderTop: 0,
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} solid ${colorSplit}`
},
'&-horizontal': {
display: 'flex',
clear: 'both',
width: '100%',
minWidth: '100%',
// Fix https://github.com/ant-design/ant-design/issues/10914
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.dividerHorizontalGutterMargin)} 0`
},
[`&-horizontal${componentCls}-with-text`]: {
display: 'flex',
alignItems: 'center',
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.dividerHorizontalWithTextGutterMargin)} 0`,
color: token.colorTextHeading,
fontWeight: 500,
fontSize: token.fontSizeLG,
whiteSpace: 'nowrap',
textAlign: 'center',
borderBlockStart: `0 ${colorSplit}`,
'&::before, &::after': {
position: 'relative',
width: '50%',
borderBlockStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} solid transparent`,
// Chrome not accept `inherit` in `border-top`
borderBlockStartColor: 'inherit',
borderBlockEnd: 0,
transform: 'translateY(50%)',
content: "''"
}
},
[`&-horizontal${componentCls}-with-text-start`]: {
'&::before': {
width: `calc(${orientationMargin} * 100%)`
},
'&::after': {
width: `calc(100% - ${orientationMargin} * 100%)`
}
},
[`&-horizontal${componentCls}-with-text-end`]: {
'&::before': {
width: `calc(100% - ${orientationMargin} * 100%)`
},
'&::after': {
width: `calc(${orientationMargin} * 100%)`
}
},
[`${componentCls}-inner-text`]: {
display: 'inline-block',
paddingBlock: 0,
paddingInline: textPaddingInline
},
'&-dashed': {
background: 'none',
borderColor: colorSplit,
borderStyle: 'dashed',
borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} 0 0`
},
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
'&::before, &::after': {
borderStyle: 'dashed none none'
}
},
[`&-vertical${componentCls}-dashed`]: {
borderInlineStartWidth: lineWidth,
borderInlineEnd: 0,
borderBlockStart: 0,
borderBlockEnd: 0
},
'&-dotted': {
background: 'none',
borderColor: colorSplit,
borderStyle: 'dotted',
borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} 0 0`
},
[`&-horizontal${componentCls}-with-text${componentCls}-dotted`]: {
'&::before, &::after': {
borderStyle: 'dotted none none'
}
},
[`&-vertical${componentCls}-dotted`]: {
borderInlineStartWidth: lineWidth,
borderInlineEnd: 0,
borderBlockStart: 0,
borderBlockEnd: 0
},
[`&-plain${componentCls}-with-text`]: {
color: token.colorText,
fontWeight: 'normal',
fontSize: token.fontSize
},
[`&-horizontal${componentCls}-with-text-start${componentCls}-no-default-orientation-margin-start`]: {
'&::before': {
width: 0
},
'&::after': {
width: '100%'
},
[`${componentCls}-inner-text`]: {
paddingInlineStart: sizePaddingEdgeHorizontal
}
},
[`&-horizontal${componentCls}-with-text-end${componentCls}-no-default-orientation-margin-end`]: {
'&::before': {
width: '100%'
},
'&::after': {
width: 0
},
[`${componentCls}-inner-text`]: {
paddingInlineEnd: sizePaddingEdgeHorizontal
}
}
})
};
};
const prepareComponentToken = token => ({
textPaddingInline: '1em',
orientationMargin: 0.05,
verticalMarginInline: token.marginXS
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Divider', token => {
const dividerToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
dividerHorizontalWithTextGutterMargin: token.margin,
dividerHorizontalGutterMargin: token.marginLG,
sizePaddingEdgeHorizontal: 0
});
return [genSharedDividerStyle(dividerToken)];
}, prepareComponentToken, {
unitless: {
orientationMargin: true
}
}));
/***/ }),
/***/ "./components/drawer/style/index.ts":
/*!******************************************************!*\
!*** ./components/drawer/style/index.ts + 1 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ drawer_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/drawer/style/motion.ts
const getMoveTranslate = direction => {
const value = '100%';
return {
left: `translateX(-${value})`,
right: `translateX(${value})`,
top: `translateY(-${value})`,
bottom: `translateY(${value})`
}[direction];
};
const getEnterLeaveStyle = (startStyle, endStyle) => ({
'&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {
'&-active': endStyle
}),
'&-leave': Object.assign(Object.assign({}, endStyle), {
'&-active': startStyle
})
});
const getFadeStyle = (from, duration) => Object.assign({
'&-enter, &-appear, &-leave': {
'&-start': {
transition: 'none'
},
'&-active': {
transition: `all ${duration}`
}
}
}, getEnterLeaveStyle({
opacity: from
}, {
opacity: 1
}));
const getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({
transform: getMoveTranslate(direction)
}, {
transform: 'none'
})];
const genMotionStyle = token => {
const {
componentCls,
motionDurationSlow
} = token;
return {
[componentCls]: {
// ======================== Mask ========================
[`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),
// ======================= Panel ========================
[`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {
[`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)
}), {})
}
};
};
/* harmony default export */ var motion = (genMotionStyle);
;// ./components/drawer/style/index.ts
// =============================== Base ===============================
const genDrawerStyle = token => {
const {
borderRadiusSM,
componentCls,
zIndexPopup,
colorBgMask,
colorBgElevated,
motionDurationSlow,
motionDurationMid,
paddingXS,
padding,
paddingLG,
fontSizeLG,
lineHeightLG,
lineWidth,
lineType,
colorSplit,
marginXS,
colorIcon,
colorIconHover,
colorBgTextHover,
colorBgTextActive,
colorText,
fontWeightStrong,
footerPaddingBlock,
footerPaddingInline,
calc
} = token;
const wrapperCls = `${componentCls}-content-wrapper`;
return {
[componentCls]: {
position: 'fixed',
inset: 0,
zIndex: zIndexPopup,
pointerEvents: 'none',
color: colorText,
'&-pure': {
position: 'relative',
background: colorBgElevated,
display: 'flex',
flexDirection: 'column',
[`&${componentCls}-left`]: {
boxShadow: token.boxShadowDrawerLeft
},
[`&${componentCls}-right`]: {
boxShadow: token.boxShadowDrawerRight
},
[`&${componentCls}-top`]: {
boxShadow: token.boxShadowDrawerUp
},
[`&${componentCls}-bottom`]: {
boxShadow: token.boxShadowDrawerDown
}
},
'&-inline': {
position: 'absolute'
},
// ====================== Mask ======================
[`${componentCls}-mask`]: {
position: 'absolute',
inset: 0,
zIndex: zIndexPopup,
background: colorBgMask,
pointerEvents: 'auto'
},
// ==================== Content =====================
[wrapperCls]: {
position: 'absolute',
zIndex: zIndexPopup,
maxWidth: '100vw',
transition: `all ${motionDurationSlow}`,
'&-hidden': {
display: 'none'
}
},
// Placement
[`&-left > ${wrapperCls}`]: {
top: 0,
bottom: 0,
left: {
_skip_check_: true,
value: 0
},
boxShadow: token.boxShadowDrawerLeft
},
[`&-right > ${wrapperCls}`]: {
top: 0,
right: {
_skip_check_: true,
value: 0
},
bottom: 0,
boxShadow: token.boxShadowDrawerRight
},
[`&-top > ${wrapperCls}`]: {
top: 0,
insetInline: 0,
boxShadow: token.boxShadowDrawerUp
},
[`&-bottom > ${wrapperCls}`]: {
bottom: 0,
insetInline: 0,
boxShadow: token.boxShadowDrawerDown
},
[`${componentCls}-content`]: {
display: 'flex',
flexDirection: 'column',
width: '100%',
height: '100%',
overflow: 'auto',
background: colorBgElevated,
pointerEvents: 'auto'
},
// Header
[`${componentCls}-header`]: {
display: 'flex',
flex: 0,
alignItems: 'center',
padding: `${(0,cssinjs.unit)(padding)} ${(0,cssinjs.unit)(paddingLG)}`,
fontSize: fontSizeLG,
lineHeight: lineHeightLG,
borderBottom: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
'&-title': {
display: 'flex',
flex: 1,
alignItems: 'center',
minWidth: 0,
minHeight: 0
}
},
[`${componentCls}-extra`]: {
flex: 'none'
},
[`${componentCls}-close`]: Object.assign({
display: 'inline-flex',
width: calc(fontSizeLG).add(paddingXS).equal(),
height: calc(fontSizeLG).add(paddingXS).equal(),
borderRadius: borderRadiusSM,
justifyContent: 'center',
alignItems: 'center',
marginInlineEnd: marginXS,
color: colorIcon,
fontWeight: fontWeightStrong,
fontSize: fontSizeLG,
fontStyle: 'normal',
lineHeight: 1,
textAlign: 'center',
textTransform: 'none',
textDecoration: 'none',
background: 'transparent',
border: 0,
cursor: 'pointer',
transition: `all ${motionDurationMid}`,
textRendering: 'auto',
'&:hover': {
color: colorIconHover,
backgroundColor: colorBgTextHover,
textDecoration: 'none'
},
'&:active': {
backgroundColor: colorBgTextActive
}
}, (0,style.genFocusStyle)(token)),
[`${componentCls}-title`]: {
flex: 1,
margin: 0,
fontWeight: token.fontWeightStrong,
fontSize: fontSizeLG,
lineHeight: lineHeightLG
},
// Body
[`${componentCls}-body`]: {
flex: 1,
minWidth: 0,
minHeight: 0,
padding: paddingLG,
overflow: 'auto',
[`${componentCls}-body-skeleton`]: {
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center'
}
},
// Footer
[`${componentCls}-footer`]: {
flexShrink: 0,
padding: `${(0,cssinjs.unit)(footerPaddingBlock)} ${(0,cssinjs.unit)(footerPaddingInline)}`,
borderTop: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`
},
// ====================== RTL =======================
'&-rtl': {
direction: 'rtl'
}
}
};
};
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexPopupBase,
footerPaddingBlock: token.paddingXS,
footerPaddingInline: token.padding
});
// ============================== Export ==============================
/* harmony default export */ var drawer_style = ((0,genStyleUtils.genStyleHooks)('Drawer', token => {
const drawerToken = (0,es.mergeToken)(token, {});
return [genDrawerStyle(drawerToken), motion(drawerToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/dropdown/style/index.ts":
/*!********************************************************!*\
!*** ./components/dropdown/style/index.ts + 1 modules ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ dropdown_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/motion/slide.ts
var slide = __webpack_require__("./components/style/motion/slide.ts");
// EXTERNAL MODULE: ./components/style/motion/move.ts
var move = __webpack_require__("./components/style/motion/move.ts");
// EXTERNAL MODULE: ./components/style/motion/zoom.ts
var zoom = __webpack_require__("./components/style/motion/zoom.ts");
// EXTERNAL MODULE: ./components/style/placementArrow.ts
var placementArrow = __webpack_require__("./components/style/placementArrow.ts");
// EXTERNAL MODULE: ./components/style/roundedArrow.ts
var roundedArrow = __webpack_require__("./components/style/roundedArrow.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/dropdown/style/status.ts
const genStatusStyle = token => {
const {
componentCls,
menuCls,
colorError,
colorTextLightSolid
} = token;
const itemCls = `${menuCls}-item`;
return {
[`${componentCls}, ${componentCls}-menu-submenu`]: {
[`${menuCls} ${itemCls}`]: {
[`&${itemCls}-danger:not(${itemCls}-disabled)`]: {
color: colorError,
'&:hover': {
color: colorTextLightSolid,
backgroundColor: colorError
}
}
}
}
};
};
/* harmony default export */ var style_status = (genStatusStyle);
;// ./components/dropdown/style/index.ts
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
menuCls,
zIndexPopup,
dropdownArrowDistance,
sizePopupArrow,
antCls,
iconCls,
motionDurationMid,
paddingBlock,
fontSize,
dropdownEdgeChildPadding,
colorTextDisabled,
fontSizeIcon,
controlPaddingHorizontal,
colorBgElevated
} = token;
return [{
[componentCls]: {
position: 'absolute',
top: -9999,
left: {
_skip_check_: true,
value: -9999
},
zIndex: zIndexPopup,
display: 'block',
// A placeholder out of dropdown visible range to avoid close when user moving
'&::before': {
position: 'absolute',
insetBlock: token.calc(sizePopupArrow).div(2).sub(dropdownArrowDistance).equal(),
// insetInlineStart: -7, // FIXME: Seems not work for hidden element
zIndex: -9999,
opacity: 0.0001,
content: '""'
},
// Makes vertical dropdowns have a scrollbar once they become taller than the viewport.
'&-menu-vertical': {
maxHeight: '100vh',
overflowY: 'auto'
},
[`&-trigger${antCls}-btn`]: {
[`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {
fontSize: fontSizeIcon
}
},
[`${componentCls}-wrap`]: {
position: 'relative',
[`${antCls}-btn > ${iconCls}-down`]: {
fontSize: fontSizeIcon
},
[`${iconCls}-down::before`]: {
transition: `transform ${motionDurationMid}`
}
},
[`${componentCls}-wrap-open`]: {
[`${iconCls}-down::before`]: {
transform: `rotate(180deg)`
}
},
[`
&-hidden,
&-menu-hidden,
&-menu-submenu-hidden
`]: {
display: 'none'
},
// =============================================================
// == Motion ==
// =============================================================
// When position is not enough for dropdown, the placement will revert.
// We will handle this with revert motion name.
[`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {
animationName: slide.slideUpIn
},
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {
animationName: slide.slideDownIn
},
[`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottom,
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomRight`]: {
animationName: slide.slideUpOut
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topLeft,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-top,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topRight`]: {
animationName: slide.slideDownOut
}
}
},
// =============================================================
// == Arrow style ==
// =============================================================
(0,placementArrow["default"])(token, colorBgElevated, {
arrowPlacement: {
top: true,
bottom: true
}
}), {
// =============================================================
// == Menu ==
// =============================================================
[`${componentCls} ${menuCls}`]: {
position: 'relative',
margin: 0
},
[`${menuCls}-submenu-popup`]: {
position: 'absolute',
zIndex: zIndexPopup,
background: 'transparent',
boxShadow: 'none',
transformOrigin: '0 0',
'ul, li': {
listStyle: 'none',
margin: 0
}
},
[`${componentCls}, ${componentCls}-menu-submenu`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
[menuCls]: Object.assign(Object.assign({
padding: dropdownEdgeChildPadding,
listStyleType: 'none',
backgroundColor: colorBgElevated,
backgroundClip: 'padding-box',
borderRadius: token.borderRadiusLG,
outline: 'none',
boxShadow: token.boxShadowSecondary
}, (0,style.genFocusStyle)(token)), {
'&:empty': {
padding: 0,
boxShadow: 'none'
},
[`${menuCls}-item-group-title`]: {
padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(controlPaddingHorizontal)}`,
color: token.colorTextDescription,
transition: `all ${motionDurationMid}`
},
// ======================= Item Content =======================
[`${menuCls}-item`]: {
position: 'relative',
display: 'flex',
alignItems: 'center'
},
[`${menuCls}-item-icon`]: {
minWidth: fontSize,
marginInlineEnd: token.marginXS,
fontSize: token.fontSizeSM
},
[`${menuCls}-title-content`]: {
flex: 'auto',
'&-with-extra': {
display: 'inline-flex',
alignItems: 'center',
width: '100%'
},
'> a': {
color: 'inherit',
transition: `all ${motionDurationMid}`,
'&:hover': {
color: 'inherit'
},
'&::after': {
position: 'absolute',
inset: 0,
content: '""'
}
},
[`${menuCls}-item-extra`]: {
paddingInlineStart: token.padding,
marginInlineStart: 'auto',
fontSize: token.fontSizeSM,
color: token.colorTextDescription
}
},
// =========================== Item ===========================
[`${menuCls}-item, ${menuCls}-submenu-title`]: Object.assign(Object.assign({
display: 'flex',
margin: 0,
padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(controlPaddingHorizontal)}`,
color: token.colorText,
fontWeight: 'normal',
fontSize,
lineHeight: token.lineHeight,
cursor: 'pointer',
transition: `all ${motionDurationMid}`,
borderRadius: token.borderRadiusSM,
'&:hover, &-active': {
backgroundColor: token.controlItemBgHover
}
}, (0,style.genFocusStyle)(token)), {
'&-selected': {
color: token.colorPrimary,
backgroundColor: token.controlItemBgActive,
'&:hover, &-active': {
backgroundColor: token.controlItemBgActiveHover
}
},
'&-disabled': {
color: colorTextDisabled,
cursor: 'not-allowed',
'&:hover': {
color: colorTextDisabled,
backgroundColor: colorBgElevated,
cursor: 'not-allowed'
},
a: {
pointerEvents: 'none'
}
},
'&-divider': {
height: 1,
// By design
margin: `${(0,cssinjs.unit)(token.marginXXS)} 0`,
overflow: 'hidden',
lineHeight: 0,
backgroundColor: token.colorSplit
},
[`${componentCls}-menu-submenu-expand-icon`]: {
position: 'absolute',
insetInlineEnd: token.paddingXS,
[`${componentCls}-menu-submenu-arrow-icon`]: {
marginInlineEnd: '0 !important',
color: token.colorTextDescription,
fontSize: fontSizeIcon,
fontStyle: 'normal'
}
}
}),
[`${menuCls}-item-group-list`]: {
margin: `0 ${(0,cssinjs.unit)(token.marginXS)}`,
padding: 0,
listStyle: 'none'
},
[`${menuCls}-submenu-title`]: {
paddingInlineEnd: token.calc(controlPaddingHorizontal).add(token.fontSizeSM).equal()
},
[`${menuCls}-submenu-vertical`]: {
position: 'relative'
},
[`${menuCls}-submenu${menuCls}-submenu-disabled ${componentCls}-menu-submenu-title`]: {
[`&, ${componentCls}-menu-submenu-arrow-icon`]: {
color: colorTextDisabled,
backgroundColor: colorBgElevated,
cursor: 'not-allowed'
}
},
// https://github.com/ant-design/ant-design/issues/19264
[`${menuCls}-submenu-selected ${componentCls}-menu-submenu-title`]: {
color: token.colorPrimary
}
})
})
},
// Follow code may reuse in other components
[(0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down'), (0,move.initMoveMotion)(token, 'move-up'), (0,move.initMoveMotion)(token, 'move-down'), (0,zoom.initZoomMotion)(token, 'zoom-big')]];
};
// ============================== Export ==============================
const prepareComponentToken = token => Object.assign(Object.assign({
zIndexPopup: token.zIndexPopupBase + 50,
paddingBlock: (token.controlHeight - token.fontSize * token.lineHeight) / 2
}, (0,placementArrow.getArrowOffsetToken)({
contentRadius: token.borderRadiusLG,
limitVerticalRadius: true
})), (0,roundedArrow.getArrowToken)(token));
/* harmony default export */ var dropdown_style = ((0,genStyleUtils.genStyleHooks)('Dropdown', token => {
const {
marginXXS,
sizePopupArrow,
paddingXXS,
componentCls
} = token;
const dropdownToken = (0,es.mergeToken)(token, {
menuCls: `${componentCls}-menu`,
dropdownArrowDistance: token.calc(sizePopupArrow).div(2).add(marginXXS).equal(),
dropdownEdgeChildPadding: paddingXXS
});
return [genBaseStyle(dropdownToken), style_status(dropdownToken)];
}, prepareComponentToken, {
resetStyle: false
}));
/***/ }),
/***/ "./components/empty/style/index.ts":
/*!*****************************************!*\
!*** ./components/empty/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Shared ==============================
const genSharedEmptyStyle = token => {
const {
componentCls,
margin,
marginXS,
marginXL,
fontSize,
lineHeight
} = token;
return {
[componentCls]: {
marginInline: marginXS,
fontSize,
lineHeight,
textAlign: 'center',
// 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
[`${componentCls}-image`]: {
height: token.emptyImgHeight,
marginBottom: marginXS,
opacity: token.opacityImage,
img: {
height: '100%'
},
svg: {
maxWidth: '100%',
height: '100%',
margin: 'auto'
}
},
[`${componentCls}-description`]: {
color: token.colorTextDescription
},
// 原来 &-footer 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
[`${componentCls}-footer`]: {
marginTop: margin
},
'&-normal': {
marginBlock: marginXL,
color: token.colorTextDescription,
[`${componentCls}-description`]: {
color: token.colorTextDescription
},
[`${componentCls}-image`]: {
height: token.emptyImgHeightMD
}
},
'&-small': {
marginBlock: marginXS,
color: token.colorTextDescription,
[`${componentCls}-image`]: {
height: token.emptyImgHeightSM
}
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('Empty', token => {
const {
componentCls,
controlHeightLG,
calc
} = token;
const emptyToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.mergeToken)(token, {
emptyImgCls: `${componentCls}-img`,
emptyImgHeight: calc(controlHeightLG).mul(2.5).equal(),
emptyImgHeightMD: controlHeightLG,
emptyImgHeightSM: calc(controlHeightLG).mul(0.875).equal()
});
return [genSharedEmptyStyle(emptyToken)];
}));
/***/ }),
/***/ "./components/flex/style/index.ts":
/*!****************************************!*\
!*** ./components/flex/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./components/flex/utils.ts");
const genFlexStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
display: 'flex',
margin: 0,
padding: 0,
'&-vertical': {
flexDirection: 'column'
},
'&-rtl': {
direction: 'rtl'
},
'&:empty': {
display: 'none'
}
}
};
};
const genFlexGapStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
'&-gap-small': {
gap: token.flexGapSM
},
'&-gap-middle': {
gap: token.flexGap
},
'&-gap-large': {
gap: token.flexGapLG
}
}
};
};
const genFlexWrapStyle = token => {
const {
componentCls
} = token;
const wrapStyle = {};
_utils__WEBPACK_IMPORTED_MODULE_0__.flexWrapValues.forEach(value => {
wrapStyle[`${componentCls}-wrap-${value}`] = {
flexWrap: value
};
});
return wrapStyle;
};
const genAlignItemsStyle = token => {
const {
componentCls
} = token;
const alignStyle = {};
_utils__WEBPACK_IMPORTED_MODULE_0__.alignItemsValues.forEach(value => {
alignStyle[`${componentCls}-align-${value}`] = {
alignItems: value
};
});
return alignStyle;
};
const genJustifyContentStyle = token => {
const {
componentCls
} = token;
const justifyStyle = {};
_utils__WEBPACK_IMPORTED_MODULE_0__.justifyContentValues.forEach(value => {
justifyStyle[`${componentCls}-justify-${value}`] = {
justifyContent: value
};
});
return justifyStyle;
};
const prepareComponentToken = () => ({});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Flex', token => {
const {
paddingXS,
padding,
paddingLG
} = token;
const flexToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
flexGapSM: paddingXS,
flexGap: padding,
flexGapLG: paddingLG
});
return [genFlexStyle(flexToken), genFlexGapStyle(flexToken), genFlexWrapStyle(flexToken), genAlignItemsStyle(flexToken), genJustifyContentStyle(flexToken)];
}, prepareComponentToken, {
// Flex component don't apply extra font style
// https://github.com/ant-design/ant-design/issues/46403
resetStyle: false
}));
/***/ }),
/***/ "./components/flex/utils.ts":
/*!**********************************!*\
!*** ./components/flex/utils.ts ***!
\**********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ alignItemsValues: function() { return /* binding */ alignItemsValues; },
/* harmony export */ flexWrapValues: function() { return /* binding */ flexWrapValues; },
/* harmony export */ justifyContentValues: function() { return /* binding */ justifyContentValues; }
/* harmony export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
const flexWrapValues = ['wrap', 'nowrap', 'wrap-reverse'];
const justifyContentValues = ['flex-start', 'flex-end', 'start', 'end', 'center', 'space-between', 'space-around', 'space-evenly', 'stretch', 'normal', 'left', 'right'];
const alignItemsValues = ['center', 'start', 'end', 'flex-start', 'flex-end', 'self-start', 'self-end', 'baseline', 'normal', 'stretch'];
const genClsWrap = (prefixCls, props) => {
const wrap = props.wrap === true ? 'wrap' : props.wrap;
return {
[`${prefixCls}-wrap-${wrap}`]: wrap && flexWrapValues.includes(wrap)
};
};
const genClsAlign = (prefixCls, props) => {
const alignCls = {};
alignItemsValues.forEach(cssKey => {
alignCls[`${prefixCls}-align-${cssKey}`] = props.align === cssKey;
});
alignCls[`${prefixCls}-align-stretch`] = !props.align && !!props.vertical;
return alignCls;
};
const genClsJustify = (prefixCls, props) => {
const justifyCls = {};
justifyContentValues.forEach(cssKey => {
justifyCls[`${prefixCls}-justify-${cssKey}`] = props.justify === cssKey;
});
return justifyCls;
};
function createFlexClassNames(prefixCls, props) {
return classnames__WEBPACK_IMPORTED_MODULE_0___default()(Object.assign(Object.assign(Object.assign({}, genClsWrap(prefixCls, props)), genClsAlign(prefixCls, props)), genClsJustify(prefixCls, props)));
}
/* harmony default export */ __webpack_exports__["default"] = (createFlexClassNames);
/***/ }),
/***/ "./components/float-button/style/index.ts":
/*!************************************************************!*\
!*** ./components/float-button/style/index.ts + 2 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ float_button_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/motion/fade.ts
var fade = __webpack_require__("./components/style/motion/fade.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/float-button/util.ts
const getOffset = radius => {
if (radius === 0) {
return 0;
}
// 如果要考虑通用性,这里应该用三角函数 Math.sin(45)
// 但是这个场景比较特殊,始终是等腰直角三角形,所以直接用 Math.sqrt() 开方即可
return radius - Math.sqrt(Math.pow(radius, 2) / 2);
};
/* harmony default export */ var util = (getOffset);
// EXTERNAL MODULE: ./components/style/motion/motion.ts
var motion = __webpack_require__("./components/style/motion/motion.ts");
;// ./components/float-button/style/keyframes.ts
const floatButtonGroupMotion = token => {
const {
componentCls,
floatButtonSize,
motionDurationSlow,
motionEaseInOutCirc,
calc
} = token;
const moveTopIn = new cssinjs.Keyframes('antFloatButtonMoveTopIn', {
'0%': {
transform: `translate3d(0, ${(0,cssinjs.unit)(floatButtonSize)}, 0)`,
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveTopOut = new cssinjs.Keyframes('antFloatButtonMoveTopOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: `translate3d(0, ${(0,cssinjs.unit)(floatButtonSize)}, 0)`,
transformOrigin: '0 0',
opacity: 0
}
});
const moveRightIn = new cssinjs.Keyframes('antFloatButtonMoveRightIn', {
'0%': {
transform: `translate3d(${calc(floatButtonSize).mul(-1).equal()}, 0, 0)`,
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveRightOut = new cssinjs.Keyframes('antFloatButtonMoveRightOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: `translate3d(${calc(floatButtonSize).mul(-1).equal()}, 0, 0)`,
transformOrigin: '0 0',
opacity: 0
}
});
const moveBottomIn = new cssinjs.Keyframes('antFloatButtonMoveBottomIn', {
'0%': {
transform: `translate3d(0, ${calc(floatButtonSize).mul(-1).equal()}, 0)`,
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveBottomOut = new cssinjs.Keyframes('antFloatButtonMoveBottomOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: `translate3d(0, ${calc(floatButtonSize).mul(-1).equal()}, 0)`,
transformOrigin: '0 0',
opacity: 0
}
});
const moveLeftIn = new cssinjs.Keyframes('antFloatButtonMoveLeftIn', {
'0%': {
transform: `translate3d(${(0,cssinjs.unit)(floatButtonSize)}, 0, 0)`,
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveLeftOut = new cssinjs.Keyframes('antFloatButtonMoveLeftOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: `translate3d(${(0,cssinjs.unit)(floatButtonSize)}, 0, 0)`,
transformOrigin: '0 0',
opacity: 0
}
});
const groupPrefixCls = `${componentCls}-group`;
return [{
[groupPrefixCls]: {
[`&${groupPrefixCls}-top ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveTopIn, moveTopOut, motionDurationSlow, true),
[`&${groupPrefixCls}-bottom ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveBottomIn, moveBottomOut, motionDurationSlow, true),
[`&${groupPrefixCls}-left ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveLeftIn, moveLeftOut, motionDurationSlow, true),
[`&${groupPrefixCls}-right ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveRightIn, moveRightOut, motionDurationSlow, true)
}
}, {
[`${groupPrefixCls}-wrap`]: {
[`&${groupPrefixCls}-wrap-enter, &${groupPrefixCls}-wrap-appear`]: {
opacity: 0,
animationTimingFunction: motionEaseInOutCirc
},
[`&${groupPrefixCls}-wrap-leave`]: {
opacity: 1,
animationTimingFunction: motionEaseInOutCirc
}
}
}];
};
/* harmony default export */ var keyframes = (floatButtonGroupMotion);
;// ./components/float-button/style/index.ts
// ============================== Group ==============================
const floatButtonGroupStyle = token => {
const {
antCls,
componentCls,
floatButtonSize,
margin,
borderRadiusLG,
borderRadiusSM,
badgeOffset,
floatButtonBodyPadding,
zIndexPopupBase,
calc
} = token;
const groupPrefixCls = `${componentCls}-group`;
return {
[groupPrefixCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
zIndex: zIndexPopupBase,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
border: 'none',
position: 'fixed',
height: 'auto',
boxShadow: 'none',
minWidth: floatButtonSize,
minHeight: floatButtonSize,
insetInlineEnd: token.floatButtonInsetInlineEnd,
bottom: token.floatButtonInsetBlockEnd,
borderRadius: borderRadiusLG,
[`${groupPrefixCls}-wrap`]: {
zIndex: -1,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
position: 'absolute'
},
[`&${groupPrefixCls}-rtl`]: {
direction: 'rtl'
},
[componentCls]: {
position: 'static'
}
}),
[`${groupPrefixCls}-top > ${groupPrefixCls}-wrap`]: {
flexDirection: 'column',
top: 'auto',
bottom: calc(floatButtonSize).add(margin).equal(),
'&::after': {
content: '""',
position: 'absolute',
width: '100%',
height: margin,
bottom: calc(margin).mul(-1).equal()
}
},
[`${groupPrefixCls}-bottom > ${groupPrefixCls}-wrap`]: {
flexDirection: 'column',
top: calc(floatButtonSize).add(margin).equal(),
bottom: 'auto',
'&::after': {
content: '""',
position: 'absolute',
width: '100%',
height: margin,
top: calc(margin).mul(-1).equal()
}
},
[`${groupPrefixCls}-right > ${groupPrefixCls}-wrap`]: {
flexDirection: 'row',
left: {
_skip_check_: true,
value: calc(floatButtonSize).add(margin).equal()
},
right: {
_skip_check_: true,
value: 'auto'
},
'&::after': {
content: '""',
position: 'absolute',
width: margin,
height: '100%',
left: {
_skip_check_: true,
value: calc(margin).mul(-1).equal()
}
}
},
[`${groupPrefixCls}-left > ${groupPrefixCls}-wrap`]: {
flexDirection: 'row',
left: {
_skip_check_: true,
value: 'auto'
},
right: {
_skip_check_: true,
value: calc(floatButtonSize).add(margin).equal()
},
'&::after': {
content: '""',
position: 'absolute',
width: margin,
height: '100%',
right: {
_skip_check_: true,
value: calc(margin).mul(-1).equal()
}
}
},
[`${groupPrefixCls}-circle`]: {
gap: margin,
[`${groupPrefixCls}-wrap`]: {
gap: margin
}
},
[`${groupPrefixCls}-square`]: {
[`${componentCls}-square`]: {
padding: 0,
borderRadius: 0,
[`&${groupPrefixCls}-trigger`]: {
borderRadius: borderRadiusLG
},
'&:first-child': {
borderStartStartRadius: borderRadiusLG,
borderStartEndRadius: borderRadiusLG
},
'&:last-child': {
borderEndStartRadius: borderRadiusLG,
borderEndEndRadius: borderRadiusLG
},
'&:not(:last-child)': {
borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
[`${antCls}-badge`]: {
[`${antCls}-badge-count`]: {
top: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal(),
insetInlineEnd: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal()
}
}
},
[`${groupPrefixCls}-wrap`]: {
borderRadius: borderRadiusLG,
boxShadow: token.boxShadowSecondary,
[`${componentCls}-square`]: {
boxShadow: 'none',
borderRadius: 0,
padding: floatButtonBodyPadding,
[`${componentCls}-body`]: {
width: token.floatButtonBodySize,
height: token.floatButtonBodySize,
borderRadius: borderRadiusSM
}
}
}
},
[`${groupPrefixCls}-top > ${groupPrefixCls}-wrap, ${groupPrefixCls}-bottom > ${groupPrefixCls}-wrap`]: {
[`> ${componentCls}-square`]: {
'&:first-child': {
borderStartStartRadius: borderRadiusLG,
borderStartEndRadius: borderRadiusLG
},
'&:last-child': {
borderEndStartRadius: borderRadiusLG,
borderEndEndRadius: borderRadiusLG
},
'&:not(:last-child)': {
borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
}
},
[`${groupPrefixCls}-left > ${groupPrefixCls}-wrap, ${groupPrefixCls}-right > ${groupPrefixCls}-wrap`]: {
[`> ${componentCls}-square`]: {
'&:first-child': {
borderStartStartRadius: borderRadiusLG,
borderEndStartRadius: borderRadiusLG
},
'&:last-child': {
borderStartEndRadius: borderRadiusLG,
borderEndEndRadius: borderRadiusLG
},
'&:not(:last-child)': {
borderInlineEnd: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
}
},
[`${groupPrefixCls}-circle-shadow`]: {
boxShadow: 'none'
},
[`${groupPrefixCls}-square-shadow`]: {
boxShadow: token.boxShadowSecondary,
[`${componentCls}-square`]: {
boxShadow: 'none',
padding: floatButtonBodyPadding,
[`${componentCls}-body`]: {
width: token.floatButtonBodySize,
height: token.floatButtonBodySize,
borderRadius: borderRadiusSM
}
}
}
};
};
// ============================== Shared ==============================
const sharedFloatButtonStyle = token => {
const {
antCls,
componentCls,
floatButtonBodyPadding,
floatButtonIconSize,
floatButtonSize,
borderRadiusLG,
badgeOffset,
dotOffsetInSquare,
dotOffsetInCircle,
zIndexPopupBase,
calc
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
border: 'none',
position: 'fixed',
cursor: 'pointer',
zIndex: zIndexPopupBase,
// Do not remove the 'display: block' here.
// Deleting it will cause marginBottom to become ineffective.
// Ref: https://github.com/ant-design/ant-design/issues/44700
display: 'block',
width: floatButtonSize,
height: floatButtonSize,
insetInlineEnd: token.floatButtonInsetInlineEnd,
bottom: token.floatButtonInsetBlockEnd,
boxShadow: token.boxShadowSecondary,
// Pure Panel
'&-pure': {
position: 'relative',
inset: 'auto'
},
'&:empty': {
display: 'none'
},
[`${antCls}-badge`]: {
width: '100%',
height: '100%',
[`${antCls}-badge-count`]: {
transform: 'translate(0, 0)',
transformOrigin: 'center',
top: calc(badgeOffset).mul(-1).equal(),
insetInlineEnd: calc(badgeOffset).mul(-1).equal()
}
},
[`${componentCls}-body`]: {
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
transition: `all ${token.motionDurationMid}`,
[`${componentCls}-content`]: {
overflow: 'hidden',
textAlign: 'center',
minHeight: floatButtonSize,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
padding: `${(0,cssinjs.unit)(calc(floatButtonBodyPadding).div(2).equal())} ${(0,cssinjs.unit)(floatButtonBodyPadding)}`,
[`${componentCls}-icon`]: {
textAlign: 'center',
margin: 'auto',
width: floatButtonIconSize,
fontSize: floatButtonIconSize,
lineHeight: 1
}
}
}
}),
[`${componentCls}-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-circle`]: {
height: floatButtonSize,
borderRadius: '50%',
[`${antCls}-badge`]: {
[`${antCls}-badge-dot`]: {
top: dotOffsetInCircle,
insetInlineEnd: dotOffsetInCircle
}
},
[`${componentCls}-body`]: {
borderRadius: '50%'
}
},
[`${componentCls}-square`]: {
height: 'auto',
minHeight: floatButtonSize,
borderRadius: borderRadiusLG,
[`${antCls}-badge`]: {
[`${antCls}-badge-dot`]: {
top: dotOffsetInSquare,
insetInlineEnd: dotOffsetInSquare
}
},
[`${componentCls}-body`]: {
height: 'auto',
borderRadius: borderRadiusLG
}
},
[`${componentCls}-default`]: {
backgroundColor: token.floatButtonBackgroundColor,
transition: `background-color ${token.motionDurationMid}`,
[`${componentCls}-body`]: {
backgroundColor: token.floatButtonBackgroundColor,
transition: `background-color ${token.motionDurationMid}`,
'&:hover': {
backgroundColor: token.colorFillContent
},
[`${componentCls}-content`]: {
[`${componentCls}-icon`]: {
color: token.colorText
},
[`${componentCls}-description`]: {
display: 'flex',
alignItems: 'center',
lineHeight: (0,cssinjs.unit)(token.fontSizeLG),
color: token.colorText,
fontSize: token.fontSizeSM
}
}
}
},
[`${componentCls}-primary`]: {
backgroundColor: token.colorPrimary,
[`${componentCls}-body`]: {
backgroundColor: token.colorPrimary,
transition: `background-color ${token.motionDurationMid}`,
'&:hover': {
backgroundColor: token.colorPrimaryHover
},
[`${componentCls}-content`]: {
[`${componentCls}-icon`]: {
color: token.colorTextLightSolid
},
[`${componentCls}-description`]: {
display: 'flex',
alignItems: 'center',
lineHeight: (0,cssinjs.unit)(token.fontSizeLG),
color: token.colorTextLightSolid,
fontSize: token.fontSizeSM
}
}
}
}
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
dotOffsetInCircle: util(token.controlHeightLG / 2),
dotOffsetInSquare: util(token.borderRadiusLG)
});
/* harmony default export */ var float_button_style = ((0,genStyleUtils.genStyleHooks)('FloatButton', token => {
const {
colorTextLightSolid,
colorBgElevated,
controlHeightLG,
marginXXL,
marginLG,
fontSize,
fontSizeIcon,
controlItemBgHover,
paddingXXS,
calc
} = token;
const floatButtonToken = (0,es.mergeToken)(token, {
floatButtonBackgroundColor: colorBgElevated,
floatButtonColor: colorTextLightSolid,
floatButtonHoverBackgroundColor: controlItemBgHover,
floatButtonFontSize: fontSize,
floatButtonIconSize: calc(fontSizeIcon).mul(1.5).equal(),
floatButtonSize: controlHeightLG,
floatButtonInsetBlockEnd: marginXXL,
floatButtonInsetInlineEnd: marginLG,
floatButtonBodySize: calc(controlHeightLG).sub(calc(paddingXXS).mul(2)).equal(),
// 这里的 paddingXXS 是简写,完整逻辑是 (controlHeightLG - (controlHeightLG - paddingXXS * 2)) / 2,
floatButtonBodyPadding: paddingXXS,
badgeOffset: calc(paddingXXS).mul(1.5).equal()
});
return [floatButtonGroupStyle(floatButtonToken), sharedFloatButtonStyle(floatButtonToken), (0,fade.initFadeMotion)(token), keyframes(floatButtonToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/form/style/index.ts":
/*!****************************************************!*\
!*** ./components/form/style/index.ts + 1 modules ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ form_style; },
prepareToken: function() { return /* binding */ prepareToken; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/motion/zoom.ts
var zoom = __webpack_require__("./components/style/motion/zoom.ts");
// EXTERNAL MODULE: ./components/style/motion/collapse.ts
var collapse = __webpack_require__("./components/style/motion/collapse.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
;// ./components/form/style/explain.ts
const genFormValidateMotionStyle = token => {
const {
componentCls
} = token;
const helpCls = `${componentCls}-show-help`;
const helpItemCls = `${componentCls}-show-help-item`;
return {
[helpCls]: {
// Explain holder
transition: `opacity ${token.motionDurationFast} ${token.motionEaseInOut}`,
'&-appear, &-enter': {
opacity: 0,
'&-active': {
opacity: 1
}
},
'&-leave': {
opacity: 1,
'&-active': {
opacity: 0
}
},
// Explain
[helpItemCls]: {
overflow: 'hidden',
transition: `height ${token.motionDurationFast} ${token.motionEaseInOut},
opacity ${token.motionDurationFast} ${token.motionEaseInOut},
transform ${token.motionDurationFast} ${token.motionEaseInOut} !important`,
[`&${helpItemCls}-appear, &${helpItemCls}-enter`]: {
transform: `translateY(-5px)`,
opacity: 0,
'&-active': {
transform: 'translateY(0)',
opacity: 1
}
},
[`&${helpItemCls}-leave-active`]: {
transform: `translateY(-5px)`
}
}
}
};
};
/* harmony default export */ var explain = (genFormValidateMotionStyle);
;// ./components/form/style/index.ts
const resetForm = token => ({
legend: {
display: 'block',
width: '100%',
marginBottom: token.marginLG,
padding: 0,
color: token.colorTextDescription,
fontSize: token.fontSizeLG,
lineHeight: 'inherit',
border: 0,
borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
},
'input[type="search"]': {
boxSizing: 'border-box'
},
// Position radios and checkboxes better
'input[type="radio"], input[type="checkbox"]': {
lineHeight: 'normal'
},
'input[type="file"]': {
display: 'block'
},
// Make range inputs behave like textual form controls
'input[type="range"]': {
display: 'block',
width: '100%'
},
// Make multiple select elements height not fixed
'select[multiple], select[size]': {
height: 'auto'
},
// Focus for file, radio, and checkbox
[`input[type='file']:focus,
input[type='radio']:focus,
input[type='checkbox']:focus`]: {
outline: 0,
boxShadow: `0 0 0 ${(0,cssinjs.unit)(token.controlOutlineWidth)} ${token.controlOutline}`
},
// Adjust output element
output: {
display: 'block',
paddingTop: 15,
color: token.colorText,
fontSize: token.fontSize,
lineHeight: token.lineHeight
}
});
const genFormSize = (token, height) => {
const {
formItemCls
} = token;
return {
[formItemCls]: {
[`${formItemCls}-label > label`]: {
height
},
[`${formItemCls}-control-input`]: {
minHeight: height
}
}
};
};
const genFormStyle = token => {
const {
componentCls
} = token;
return {
[token.componentCls]: Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), resetForm(token)), {
[`${componentCls}-text`]: {
display: 'inline-block',
paddingInlineEnd: token.paddingSM
},
// ================================================================
// = Size =
// ================================================================
'&-small': Object.assign({}, genFormSize(token, token.controlHeightSM)),
'&-large': Object.assign({}, genFormSize(token, token.controlHeightLG))
})
};
};
const genFormItemStyle = token => {
const {
formItemCls,
iconCls,
rootPrefixCls,
antCls,
labelRequiredMarkColor,
labelColor,
labelFontSize,
labelHeight,
labelColonMarginInlineStart,
labelColonMarginInlineEnd,
itemMarginBottom
} = token;
return {
[formItemCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
marginBottom: itemMarginBottom,
verticalAlign: 'top',
'&-with-help': {
transition: 'none'
},
[`&-hidden,
&-hidden${antCls}-row`]: {
// https://github.com/ant-design/ant-design/issues/26141
display: 'none'
},
'&-has-warning': {
[`${formItemCls}-split`]: {
color: token.colorError
}
},
'&-has-error': {
[`${formItemCls}-split`]: {
color: token.colorWarning
}
},
// ==============================================================
// = Label =
// ==============================================================
[`${formItemCls}-label`]: {
flexGrow: 0,
overflow: 'hidden',
whiteSpace: 'nowrap',
textAlign: 'end',
verticalAlign: 'middle',
'&-left': {
textAlign: 'start'
},
'&-wrap': {
overflow: 'unset',
lineHeight: token.lineHeight,
whiteSpace: 'unset'
},
'> label': {
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
maxWidth: '100%',
height: labelHeight,
color: labelColor,
fontSize: labelFontSize,
[`> ${iconCls}`]: {
fontSize: token.fontSize,
verticalAlign: 'top'
},
[`&${formItemCls}-required`]: {
'&::before': {
display: 'inline-block',
marginInlineEnd: token.marginXXS,
color: labelRequiredMarkColor,
fontSize: token.fontSize,
fontFamily: 'SimSun, sans-serif',
lineHeight: 1,
content: '"*"'
},
[`&${formItemCls}-required-mark-hidden, &${formItemCls}-required-mark-optional`]: {
'&::before': {
display: 'none'
}
}
},
// Optional mark
[`${formItemCls}-optional`]: {
display: 'inline-block',
marginInlineStart: token.marginXXS,
color: token.colorTextDescription,
[`&.${formItemCls}-required-mark-hidden`]: {
display: 'none'
}
},
// Optional mark
[`${formItemCls}-tooltip`]: {
color: token.colorTextDescription,
cursor: 'help',
writingMode: 'horizontal-tb',
marginInlineStart: token.marginXXS
},
'&::after': {
content: '":"',
position: 'relative',
marginBlock: 0,
marginInlineStart: labelColonMarginInlineStart,
marginInlineEnd: labelColonMarginInlineEnd
},
[`&${formItemCls}-no-colon::after`]: {
content: '"\\a0"'
}
}
},
// ==============================================================
// = Input =
// ==============================================================
[`${formItemCls}-control`]: {
['--ant-display']: 'flex',
flexDirection: 'column',
flexGrow: 1,
[`&:first-child:not([class^="'${rootPrefixCls}-col-'"]):not([class*="' ${rootPrefixCls}-col-'"])`]: {
width: '100%'
},
'&-input': {
position: 'relative',
display: 'flex',
alignItems: 'center',
minHeight: token.controlHeight,
'&-content': {
flex: 'auto',
maxWidth: '100%'
}
}
},
// ==============================================================
// = Explain =
// ==============================================================
[formItemCls]: {
'&-additional': {
display: 'flex',
flexDirection: 'column'
},
'&-explain, &-extra': {
clear: 'both',
color: token.colorTextDescription,
fontSize: token.fontSize,
lineHeight: token.lineHeight
},
'&-explain-connected': {
width: '100%'
},
'&-extra': {
minHeight: token.controlHeightSM,
transition: `color ${token.motionDurationMid} ${token.motionEaseOut}` // sync input color transition
},
'&-explain': {
'&-error': {
color: token.colorError
},
'&-warning': {
color: token.colorWarning
}
}
},
[`&-with-help ${formItemCls}-explain`]: {
height: 'auto',
opacity: 1
},
// ==============================================================
// = Feedback Icon =
// ==============================================================
[`${formItemCls}-feedback-icon`]: {
fontSize: token.fontSize,
textAlign: 'center',
visibility: 'visible',
animationName: zoom.zoomIn,
animationDuration: token.motionDurationMid,
animationTimingFunction: token.motionEaseOutBack,
pointerEvents: 'none',
'&-success': {
color: token.colorSuccess
},
'&-error': {
color: token.colorError
},
'&-warning': {
color: token.colorWarning
},
'&-validating': {
color: token.colorPrimary
}
}
})
};
};
const genHorizontalStyle = (token, className) => {
const {
formItemCls
} = token;
return {
[`${className}-horizontal`]: {
[`${formItemCls}-label`]: {
flexGrow: 0
},
[`${formItemCls}-control`]: {
flex: '1 1 0',
// https://github.com/ant-design/ant-design/issues/32777
// https://github.com/ant-design/ant-design/issues/33773
minWidth: 0
},
// Do not change this to `ant-col-24`! `-24` match all the responsive rules
// https://github.com/ant-design/ant-design/issues/32980
// https://github.com/ant-design/ant-design/issues/34903
// https://github.com/ant-design/ant-design/issues/44538
[`${formItemCls}-label[class$='-24'], ${formItemCls}-label[class*='-24 ']`]: {
[`& + ${formItemCls}-control`]: {
minWidth: 'unset'
}
}
}
};
};
const genInlineStyle = token => {
const {
componentCls,
formItemCls,
inlineItemMarginBottom
} = token;
return {
[`${componentCls}-inline`]: {
display: 'flex',
flexWrap: 'wrap',
[formItemCls]: {
flex: 'none',
marginInlineEnd: token.margin,
marginBottom: inlineItemMarginBottom,
'&-row': {
flexWrap: 'nowrap'
},
[`> ${formItemCls}-label,
> ${formItemCls}-control`]: {
display: 'inline-block',
verticalAlign: 'top'
},
[`> ${formItemCls}-label`]: {
flex: 'none'
},
[`${componentCls}-text`]: {
display: 'inline-block'
},
[`${formItemCls}-has-feedback`]: {
display: 'inline-block'
}
}
}
};
};
const makeVerticalLayoutLabel = token => ({
padding: token.verticalLabelPadding,
margin: token.verticalLabelMargin,
whiteSpace: 'initial',
textAlign: 'start',
'> label': {
margin: 0,
'&::after': {
// https://github.com/ant-design/ant-design/issues/43538
visibility: 'hidden'
}
}
});
const makeVerticalLayout = token => {
const {
componentCls,
formItemCls,
rootPrefixCls
} = token;
return {
[`${formItemCls} ${formItemCls}-label`]: makeVerticalLayoutLabel(token),
// ref: https://github.com/ant-design/ant-design/issues/45122
[`${componentCls}:not(${componentCls}-inline)`]: {
[formItemCls]: {
flexWrap: 'wrap',
[`${formItemCls}-label, ${formItemCls}-control`]: {
// When developer pass `xs: { span }`,
// It should follow the `xs` screen config
// ref: https://github.com/ant-design/ant-design/issues/44386
[`&:not([class*=" ${rootPrefixCls}-col-xs"])`]: {
flex: '0 0 100%',
maxWidth: '100%'
}
}
}
}
};
};
const genVerticalStyle = token => {
const {
componentCls,
formItemCls,
antCls
} = token;
return {
[`${componentCls}-vertical`]: {
[`${formItemCls}:not(${formItemCls}-horizontal)`]: {
[`${formItemCls}-row`]: {
flexDirection: 'column'
},
[`${formItemCls}-label > label`]: {
height: 'auto'
},
[`${formItemCls}-control`]: {
width: '100%'
},
[`${formItemCls}-label,
${antCls}-col-24${formItemCls}-label,
${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
},
[`@media (max-width: ${(0,cssinjs.unit)(token.screenXSMax)})`]: [makeVerticalLayout(token), {
[componentCls]: {
[`${formItemCls}:not(${formItemCls}-horizontal)`]: {
[`${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
}
}],
[`@media (max-width: ${(0,cssinjs.unit)(token.screenSMMax)})`]: {
[componentCls]: {
[`${formItemCls}:not(${formItemCls}-horizontal)`]: {
[`${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
}
},
[`@media (max-width: ${(0,cssinjs.unit)(token.screenMDMax)})`]: {
[componentCls]: {
[`${formItemCls}:not(${formItemCls}-horizontal)`]: {
[`${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
}
},
[`@media (max-width: ${(0,cssinjs.unit)(token.screenLGMax)})`]: {
[componentCls]: {
[`${formItemCls}:not(${formItemCls}-horizontal)`]: {
[`${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
}
}
};
};
const genItemVerticalStyle = token => {
const {
formItemCls,
antCls
} = token;
return {
[`${formItemCls}-vertical`]: {
[`${formItemCls}-row`]: {
flexDirection: 'column'
},
[`${formItemCls}-label > label`]: {
height: 'auto'
},
[`${formItemCls}-control`]: {
width: '100%'
}
},
[`${formItemCls}-vertical ${formItemCls}-label,
${antCls}-col-24${formItemCls}-label,
${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token),
[`@media (max-width: ${(0,cssinjs.unit)(token.screenXSMax)})`]: [makeVerticalLayout(token), {
[formItemCls]: {
[`${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
}],
[`@media (max-width: ${(0,cssinjs.unit)(token.screenSMMax)})`]: {
[formItemCls]: {
[`${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
},
[`@media (max-width: ${(0,cssinjs.unit)(token.screenMDMax)})`]: {
[formItemCls]: {
[`${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
},
[`@media (max-width: ${(0,cssinjs.unit)(token.screenLGMax)})`]: {
[formItemCls]: {
[`${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
}
}
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
labelRequiredMarkColor: token.colorError,
labelColor: token.colorTextHeading,
labelFontSize: token.fontSize,
labelHeight: token.controlHeight,
labelColonMarginInlineStart: token.marginXXS / 2,
labelColonMarginInlineEnd: token.marginXS,
itemMarginBottom: token.marginLG,
verticalLabelPadding: `0 0 ${token.paddingXS}px`,
verticalLabelMargin: 0,
inlineItemMarginBottom: 0
});
const prepareToken = (token, rootPrefixCls) => {
const formToken = (0,es.mergeToken)(token, {
formItemCls: `${token.componentCls}-item`,
rootPrefixCls
});
return formToken;
};
/* harmony default export */ var form_style = ((0,genStyleUtils.genStyleHooks)('Form', (token, _ref) => {
let {
rootPrefixCls
} = _ref;
const formToken = prepareToken(token, rootPrefixCls);
return [genFormStyle(formToken), genFormItemStyle(formToken), explain(formToken), genHorizontalStyle(formToken, formToken.componentCls), genHorizontalStyle(formToken, formToken.formItemCls), genInlineStyle(formToken), genVerticalStyle(formToken), genItemVerticalStyle(formToken), (0,collapse["default"])(formToken), zoom.zoomIn];
}, prepareComponentToken, {
// Let From style before the Grid
// ref https://github.com/ant-design/ant-design/issues/44386
order: -1000
}));
/***/ }),
/***/ "./components/grid/style/index.ts":
/*!****************************************!*\
!*** ./components/grid/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ getMediaSize: function() { return /* binding */ getMediaSize; },
/* harmony export */ useColStyle: function() { return /* binding */ useColStyle; },
/* harmony export */ useRowStyle: function() { return /* binding */ useRowStyle; }
/* harmony export */ });
/* unused harmony exports prepareRowComponentToken, prepareColComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Row-Shared ==============================
const genGridRowStyle = token => {
const {
componentCls
} = token;
return {
// Grid system
[componentCls]: {
display: 'flex',
flexFlow: 'row wrap',
minWidth: 0,
'&::before, &::after': {
display: 'flex'
},
'&-no-wrap': {
flexWrap: 'nowrap'
},
// The origin of the X-axis
'&-start': {
justifyContent: 'flex-start'
},
// The center of the X-axis
'&-center': {
justifyContent: 'center'
},
// The opposite of the X-axis
'&-end': {
justifyContent: 'flex-end'
},
'&-space-between': {
justifyContent: 'space-between'
},
'&-space-around': {
justifyContent: 'space-around'
},
'&-space-evenly': {
justifyContent: 'space-evenly'
},
// Align at the top
'&-top': {
alignItems: 'flex-start'
},
// Align at the center
'&-middle': {
alignItems: 'center'
},
'&-bottom': {
alignItems: 'flex-end'
}
}
};
};
// ============================== Col-Shared ==============================
const genGridColStyle = token => {
const {
componentCls
} = token;
return {
// Grid system
[componentCls]: {
position: 'relative',
maxWidth: '100%',
// Prevent columns from collapsing when empty
minHeight: 1
}
};
};
const genLoopGridColumnsStyle = (token, sizeCls) => {
const {
prefixCls,
componentCls,
gridColumns
} = token;
const gridColumnsStyle = {};
for (let i = gridColumns; i >= 0; i--) {
if (i === 0) {
gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = {
display: 'none'
};
gridColumnsStyle[`${componentCls}-push-${i}`] = {
insetInlineStart: 'auto'
};
gridColumnsStyle[`${componentCls}-pull-${i}`] = {
insetInlineEnd: 'auto'
};
gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {
insetInlineStart: 'auto'
};
gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {
insetInlineEnd: 'auto'
};
gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {
marginInlineStart: 0
};
gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {
order: 0
};
} else {
gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = [
// https://github.com/ant-design/ant-design/issues/44456
// Form set `display: flex` on Col which will override `display: block`.
// Let's get it from css variable to support override.
{
['--ant-display']: 'block',
// Fallback to display if variable not support
display: 'block'
}, {
display: 'var(--ant-display)',
flex: `0 0 ${i / gridColumns * 100}%`,
maxWidth: `${i / gridColumns * 100}%`
}];
gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {
insetInlineStart: `${i / gridColumns * 100}%`
};
gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {
insetInlineEnd: `${i / gridColumns * 100}%`
};
gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {
marginInlineStart: `${i / gridColumns * 100}%`
};
gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {
order: i
};
}
}
// Flex CSS Var
gridColumnsStyle[`${componentCls}${sizeCls}-flex`] = {
flex: `var(--${prefixCls}${sizeCls}-flex)`
};
return gridColumnsStyle;
};
const genGridStyle = (token, sizeCls) => genLoopGridColumnsStyle(token, sizeCls);
const genGridMediaStyle = (token, screenSize, sizeCls) => ({
[`@media (min-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(screenSize)})`]: Object.assign({}, genGridStyle(token, sizeCls))
});
const prepareRowComponentToken = () => ({});
const prepareColComponentToken = () => ({});
// ============================== Export ==============================
const useRowStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Grid', genGridRowStyle, prepareRowComponentToken);
const getMediaSize = token => {
const mediaSizesMap = {
xs: token.screenXSMin,
sm: token.screenSMMin,
md: token.screenMDMin,
lg: token.screenLGMin,
xl: token.screenXLMin,
xxl: token.screenXXLMin
};
return mediaSizesMap;
};
const useColStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Grid', token => {
const gridToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
gridColumns: 24 // Row is divided into 24 parts in Grid
});
const gridMediaSizesMap = getMediaSize(gridToken);
delete gridMediaSizesMap.xs;
return [genGridColStyle(gridToken), genGridStyle(gridToken, ''), genGridStyle(gridToken, '-xs'), Object.keys(gridMediaSizesMap).map(key => genGridMediaStyle(gridToken, gridMediaSizesMap[key], `-${key}`)).reduce((pre, cur) => Object.assign(Object.assign({}, pre), cur), {})];
}, prepareColComponentToken);
/***/ }),
/***/ "./components/image/style/index.ts":
/*!*****************************************!*\
!*** ./components/image/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony exports genBoxStyle, genImageMaskStyle, genPreviewOperationsStyle, genPreviewSwitchStyle, genImagePreviewStyle, prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _modal_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../modal/style */ "./components/modal/style/index.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/fade.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBoxStyle = position => ({
position: position || 'absolute',
inset: 0
});
const genImageMaskStyle = token => {
const {
iconCls,
motionDurationSlow,
paddingXXS,
marginXXS,
prefixCls,
colorTextLightSolid
} = token;
return {
position: 'absolute',
inset: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
color: colorTextLightSolid,
background: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('#000').setA(0.5).toRgbString(),
cursor: 'pointer',
opacity: 0,
transition: `opacity ${motionDurationSlow}`,
[`.${prefixCls}-mask-info`]: Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(paddingXXS)}`,
[iconCls]: {
marginInlineEnd: marginXXS,
svg: {
verticalAlign: 'baseline'
}
}
})
};
};
const genPreviewOperationsStyle = token => {
const {
previewCls,
modalMaskBg,
paddingSM,
marginXL,
margin,
paddingLG,
previewOperationColorDisabled,
previewOperationHoverColor,
motionDurationSlow,
iconCls,
colorTextLightSolid
} = token;
const operationBg = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(modalMaskBg).setA(0.1);
const operationBgHover = operationBg.clone().setA(0.2);
return {
[`${previewCls}-footer`]: {
position: 'fixed',
bottom: marginXL,
left: {
_skip_check_: true,
value: '50%'
},
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
color: token.previewOperationColor,
transform: 'translateX(-50%)'
},
[`${previewCls}-progress`]: {
marginBottom: margin
},
[`${previewCls}-close`]: {
position: 'fixed',
top: marginXL,
right: {
_skip_check_: true,
value: marginXL
},
display: 'flex',
color: colorTextLightSolid,
backgroundColor: operationBg.toRgbString(),
borderRadius: '50%',
padding: paddingSM,
outline: 0,
border: 0,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
'&:hover': {
backgroundColor: operationBgHover.toRgbString()
},
[`& > ${iconCls}`]: {
fontSize: token.previewOperationSize
}
},
[`${previewCls}-operations`]: {
display: 'flex',
alignItems: 'center',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(paddingLG)}`,
backgroundColor: operationBg.toRgbString(),
borderRadius: 100,
'&-operation': {
marginInlineStart: paddingSM,
padding: paddingSM,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
userSelect: 'none',
[`&:not(${previewCls}-operations-operation-disabled):hover > ${iconCls}`]: {
color: previewOperationHoverColor
},
'&-disabled': {
color: previewOperationColorDisabled,
cursor: 'not-allowed'
},
'&:first-of-type': {
marginInlineStart: 0
},
[`& > ${iconCls}`]: {
fontSize: token.previewOperationSize
}
}
}
};
};
const genPreviewSwitchStyle = token => {
const {
modalMaskBg,
iconCls,
previewOperationColorDisabled,
previewCls,
zIndexPopup,
motionDurationSlow
} = token;
const operationBg = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(modalMaskBg).setA(0.1);
const operationBgHover = operationBg.clone().setA(0.2);
return {
[`${previewCls}-switch-left, ${previewCls}-switch-right`]: {
position: 'fixed',
insetBlockStart: '50%',
zIndex: token.calc(zIndexPopup).add(1).equal(),
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: token.imagePreviewSwitchSize,
height: token.imagePreviewSwitchSize,
marginTop: token.calc(token.imagePreviewSwitchSize).mul(-1).div(2).equal(),
color: token.previewOperationColor,
background: operationBg.toRgbString(),
borderRadius: '50%',
transform: `translateY(-50%)`,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
userSelect: 'none',
'&:hover': {
background: operationBgHover.toRgbString()
},
'&-disabled': {
'&, &:hover': {
color: previewOperationColorDisabled,
background: 'transparent',
cursor: 'not-allowed',
[`> ${iconCls}`]: {
cursor: 'not-allowed'
}
}
},
[`> ${iconCls}`]: {
fontSize: token.previewOperationSize
}
},
[`${previewCls}-switch-left`]: {
insetInlineStart: token.marginSM
},
[`${previewCls}-switch-right`]: {
insetInlineEnd: token.marginSM
}
};
};
const genImagePreviewStyle = token => {
const {
motionEaseOut,
previewCls,
motionDurationSlow,
componentCls
} = token;
return [{
[`${componentCls}-preview-root`]: {
[previewCls]: {
height: '100%',
textAlign: 'center',
pointerEvents: 'none'
},
[`${previewCls}-body`]: Object.assign(Object.assign({}, genBoxStyle()), {
overflow: 'hidden'
}),
[`${previewCls}-img`]: {
maxWidth: '100%',
maxHeight: '70%',
verticalAlign: 'middle',
transform: 'scale3d(1, 1, 1)',
cursor: 'grab',
transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,
userSelect: 'none',
'&-wrapper': Object.assign(Object.assign({}, genBoxStyle()), {
transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,
// https://github.com/ant-design/ant-design/issues/39913
// TailwindCSS will reset img default style.
// Let's set back.
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
'& > *': {
pointerEvents: 'auto'
},
'&::before': {
display: 'inline-block',
width: 1,
height: '50%',
marginInlineEnd: -1,
content: '""'
}
})
},
[`${previewCls}-moving`]: {
[`${previewCls}-preview-img`]: {
cursor: 'grabbing',
'&-wrapper': {
transitionDuration: '0s'
}
}
}
}
},
// Override
{
[`${componentCls}-preview-root`]: {
[`${previewCls}-wrap`]: {
zIndex: token.zIndexPopup
}
}
},
// Preview operations & switch
{
[`${componentCls}-preview-operations-wrapper`]: {
position: 'fixed',
zIndex: token.calc(token.zIndexPopup).add(1).equal()
},
'&': [genPreviewOperationsStyle(token), genPreviewSwitchStyle(token)]
}];
};
const genImageStyle = token => {
const {
componentCls
} = token;
return {
// ============================== image ==============================
[componentCls]: {
position: 'relative',
display: 'inline-block',
[`${componentCls}-img`]: {
width: '100%',
height: 'auto',
verticalAlign: 'middle'
},
[`${componentCls}-img-placeholder`]: {
backgroundColor: token.colorBgContainerDisabled,
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center center',
backgroundSize: '30%'
},
[`${componentCls}-mask`]: Object.assign({}, genImageMaskStyle(token)),
[`${componentCls}-mask:hover`]: {
opacity: 1
},
[`${componentCls}-placeholder`]: Object.assign({}, genBoxStyle())
}
};
};
const genPreviewMotion = token => {
const {
previewCls
} = token;
return {
[`${previewCls}-root`]: (0,_style_motion__WEBPACK_IMPORTED_MODULE_3__.initZoomMotion)(token, 'zoom'),
'&': (0,_style_motion__WEBPACK_IMPORTED_MODULE_4__.initFadeMotion)(token, true)
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexPopupBase + 80,
previewOperationColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorTextLightSolid).setA(0.65).toRgbString(),
previewOperationHoverColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorTextLightSolid).setA(0.85).toRgbString(),
previewOperationColorDisabled: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorTextLightSolid).setA(0.25).toRgbString(),
previewOperationSize: token.fontSizeIcon * 1.5 // FIXME: fontSizeIconLG
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.genStyleHooks)('Image', token => {
const previewCls = `${token.componentCls}-preview`;
const imageToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(token, {
previewCls,
modalMaskBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('#000').setA(0.45).toRgbString(),
// FIXME: Shared Token
imagePreviewSwitchSize: token.controlHeightLG
});
return [genImageStyle(imageToken), genImagePreviewStyle(imageToken), (0,_modal_style__WEBPACK_IMPORTED_MODULE_7__.genModalMaskStyle)((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(imageToken, {
componentCls: previewCls
})), genPreviewMotion(imageToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/index.ts":
/*!********************************************!*\
!*** ./components/index.ts + 1005 modules ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Affix: function() { return /* reexport */ components_affix; },
Alert: function() { return /* reexport */ components_alert; },
Anchor: function() { return /* reexport */ components_anchor; },
App: function() { return /* reexport */ app; },
AutoComplete: function() { return /* reexport */ auto_complete; },
Avatar: function() { return /* reexport */ avatar; },
BackTop: function() { return /* reexport */ back_top; },
Badge: function() { return /* reexport */ components_badge; },
Breadcrumb: function() { return /* reexport */ breadcrumb; },
Button: function() { return /* reexport */ components_button; },
Calendar: function() { return /* reexport */ calendar; },
Card: function() { return /* reexport */ card; },
Carousel: function() { return /* reexport */ carousel; },
Cascader: function() { return /* reexport */ cascader; },
Checkbox: function() { return /* reexport */ components_checkbox; },
Col: function() { return /* reexport */ components_col; },
Collapse: function() { return /* reexport */ collapse["default"]; },
ColorPicker: function() { return /* reexport */ color_picker; },
ConfigProvider: function() { return /* reexport */ config_provider; },
DatePicker: function() { return /* reexport */ date_picker; },
Descriptions: function() { return /* reexport */ descriptions; },
Divider: function() { return /* reexport */ divider; },
Drawer: function() { return /* reexport */ drawer; },
Dropdown: function() { return /* reexport */ components_dropdown; },
Empty: function() { return /* reexport */ components_empty; },
Flex: function() { return /* reexport */ flex; },
FloatButton: function() { return /* reexport */ float_button; },
Form: function() { return /* reexport */ components_form; },
Grid: function() { return /* reexport */ grid; },
Image: function() { return /* reexport */ components_image; },
Input: function() { return /* reexport */ input; },
InputNumber: function() { return /* reexport */ input_number; },
Layout: function() { return /* reexport */ components_layout; },
List: function() { return /* reexport */ list; },
Mentions: function() { return /* reexport */ mentions; },
Menu: function() { return /* reexport */ components_menu; },
Modal: function() { return /* reexport */ modal; },
Pagination: function() { return /* reexport */ components_pagination; },
Popconfirm: function() { return /* reexport */ popconfirm; },
Popover: function() { return /* reexport */ popover; },
Progress: function() { return /* reexport */ components_progress; },
QRCode: function() { return /* reexport */ qr_code; },
Radio: function() { return /* reexport */ components_radio; },
Rate: function() { return /* reexport */ rate; },
Result: function() { return /* reexport */ result; },
Row: function() { return /* reexport */ components_row; },
Segmented: function() { return /* reexport */ segmented; },
Select: function() { return /* reexport */ components_select; },
Skeleton: function() { return /* reexport */ skeleton; },
Slider: function() { return /* reexport */ slider; },
Space: function() { return /* reexport */ space; },
Spin: function() { return /* reexport */ spin; },
Splitter: function() { return /* reexport */ splitter; },
Statistic: function() { return /* reexport */ statistic; },
Steps: function() { return /* reexport */ steps; },
Switch: function() { return /* reexport */ components_switch; },
Table: function() { return /* reexport */ table; },
Tabs: function() { return /* reexport */ components_tabs; },
Tag: function() { return /* reexport */ tag; },
TimePicker: function() { return /* reexport */ time_picker; },
Timeline: function() { return /* reexport */ timeline; },
Tooltip: function() { return /* reexport */ components_tooltip; },
Tour: function() { return /* reexport */ tour; },
Transfer: function() { return /* reexport */ transfer; },
Tree: function() { return /* reexport */ tree; },
TreeSelect: function() { return /* reexport */ tree_select; },
Typography: function() { return /* reexport */ typography; },
Upload: function() { return /* reexport */ components_upload; },
Watermark: function() { return /* reexport */ watermark; },
message: function() { return /* reexport */ components_message; },
notification: function() { return /* reexport */ components_notification; },
theme: function() { return /* reexport */ theme; },
unstableSetRender: function() { return /* reexport */ unstableSetRender; },
version: function() { return /* reexport */ components_version["default"]; }
});
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("./node_modules/classnames/index.js");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__("./node_modules/rc-util/es/Children/toArray.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
var findDOMNode = __webpack_require__("./node_modules/rc-util/es/Dom/findDOMNode.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__("./node_modules/rc-util/es/ref.js");
;// ./node_modules/rc-resize-observer/es/Collection.js
var CollectionContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/**
* Collect all the resize event from children ResizeObserver
*/
function Collection(_ref) {
var children = _ref.children,
onBatchResize = _ref.onBatchResize;
var resizeIdRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
var resizeInfosRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
var onCollectionResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(CollectionContext);
var onResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (size, element, data) {
resizeIdRef.current += 1;
var currentId = resizeIdRef.current;
resizeInfosRef.current.push({
size: size,
element: element,
data: data
});
Promise.resolve().then(function () {
if (currentId === resizeIdRef.current) {
onBatchResize === null || onBatchResize === void 0 || onBatchResize(resizeInfosRef.current);
resizeInfosRef.current = [];
}
});
// Continue bubbling if parent exist
onCollectionResize === null || onCollectionResize === void 0 || onCollectionResize(size, element, data);
}, [onBatchResize, onCollectionResize]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CollectionContext.Provider, {
value: onResize
}, children);
}
;// ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
/**
* A collection of shims that provide minimal functionality of the ES6 collections.
*
* These implementations are not meant to be used outside of the ResizeObserver
* modules as they cover only a limited range of use cases.
*/
/* eslint-disable require-jsdoc, valid-jsdoc */
var MapShim = (function () {
if (typeof Map !== 'undefined') {
return Map;
}
/**
* Returns index in provided array that matches the specified key.
*
* @param {Array<Array>} arr
* @param {*} key
* @returns {number}
*/
function getIndex(arr, key) {
var result = -1;
arr.some(function (entry, index) {
if (entry[0] === key) {
result = index;
return true;
}
return false;
});
return result;
}
return /** @class */ (function () {
function class_1() {
this.__entries__ = [];
}
Object.defineProperty(class_1.prototype, "size", {
/**
* @returns {boolean}
*/
get: function () {
return this.__entries__.length;
},
enumerable: true,
configurable: true
});
/**
* @param {*} key
* @returns {*}
*/
class_1.prototype.get = function (key) {
var index = getIndex(this.__entries__, key);
var entry = this.__entries__[index];
return entry && entry[1];
};
/**
* @param {*} key
* @param {*} value
* @returns {void}
*/
class_1.prototype.set = function (key, value) {
var index = getIndex(this.__entries__, key);
if (~index) {
this.__entries__[index][1] = value;
}
else {
this.__entries__.push([key, value]);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.delete = function (key) {
var entries = this.__entries__;
var index = getIndex(entries, key);
if (~index) {
entries.splice(index, 1);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.has = function (key) {
return !!~getIndex(this.__entries__, key);
};
/**
* @returns {void}
*/
class_1.prototype.clear = function () {
this.__entries__.splice(0);
};
/**
* @param {Function} callback
* @param {*} [ctx=null]
* @returns {void}
*/
class_1.prototype.forEach = function (callback, ctx) {
if (ctx === void 0) { ctx = null; }
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
var entry = _a[_i];
callback.call(ctx, entry[1], entry[0]);
}
};
return class_1;
}());
})();
/**
* Detects whether window and document objects are available in current environment.
*/
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
// Returns global object of a current environment.
var global$1 = (function () {
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
return __webpack_require__.g;
}
if (typeof self !== 'undefined' && self.Math === Math) {
return self;
}
if (typeof window !== 'undefined' && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-new-func
return Function('return this')();
})();
/**
* A shim for the requestAnimationFrame which falls back to the setTimeout if
* first one is not supported.
*
* @returns {number} Requests' identifier.
*/
var requestAnimationFrame$1 = (function () {
if (typeof requestAnimationFrame === 'function') {
// It's required to use a bounded function because IE sometimes throws
// an "Invalid calling object" error if rAF is invoked without the global
// object on the left hand side.
return requestAnimationFrame.bind(global$1);
}
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
})();
// Defines minimum timeout before adding a trailing call.
var trailingTimeout = 2;
/**
* Creates a wrapper function which ensures that provided callback will be
* invoked only once during the specified delay period.
*
* @param {Function} callback - Function to be invoked after the delay period.
* @param {number} delay - Delay after which to invoke callback.
* @returns {Function}
*/
function throttle (callback, delay) {
var leadingCall = false, trailingCall = false, lastCallTime = 0;
/**
* Invokes the original callback function and schedules new invocation if
* the "proxy" was called during current request.
*
* @returns {void}
*/
function resolvePending() {
if (leadingCall) {
leadingCall = false;
callback();
}
if (trailingCall) {
proxy();
}
}
/**
* Callback invoked after the specified delay. It will further postpone
* invocation of the original function delegating it to the
* requestAnimationFrame.
*
* @returns {void}
*/
function timeoutCallback() {
requestAnimationFrame$1(resolvePending);
}
/**
* Schedules invocation of the original function.
*
* @returns {void}
*/
function proxy() {
var timeStamp = Date.now();
if (leadingCall) {
// Reject immediately following calls.
if (timeStamp - lastCallTime < trailingTimeout) {
return;
}
// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
trailingCall = true;
}
else {
leadingCall = true;
trailingCall = false;
setTimeout(timeoutCallback, delay);
}
lastCallTime = timeStamp;
}
return proxy;
}
// Minimum delay before invoking the update of observers.
var REFRESH_DELAY = 20;
// A list of substrings of CSS properties used to find transition events that
// might affect dimensions of observed elements.
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
// Check if MutationObserver is available.
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
/**
* Singleton controller class which handles updates of ResizeObserver instances.
*/
var ResizeObserverController = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserverController.
*
* @private
*/
function ResizeObserverController() {
/**
* Indicates whether DOM listeners have been added.
*
* @private {boolean}
*/
this.connected_ = false;
/**
* Tells that controller has subscribed for Mutation Events.
*
* @private {boolean}
*/
this.mutationEventsAdded_ = false;
/**
* Keeps reference to the instance of MutationObserver.
*
* @private {MutationObserver}
*/
this.mutationsObserver_ = null;
/**
* A list of connected observers.
*
* @private {Array<ResizeObserverSPI>}
*/
this.observers_ = [];
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
}
/**
* Adds observer to observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be added.
* @returns {void}
*/
ResizeObserverController.prototype.addObserver = function (observer) {
if (!~this.observers_.indexOf(observer)) {
this.observers_.push(observer);
}
// Add listeners if they haven't been added yet.
if (!this.connected_) {
this.connect_();
}
};
/**
* Removes observer from observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be removed.
* @returns {void}
*/
ResizeObserverController.prototype.removeObserver = function (observer) {
var observers = this.observers_;
var index = observers.indexOf(observer);
// Remove observer if it's present in registry.
if (~index) {
observers.splice(index, 1);
}
// Remove listeners if controller has no connected observers.
if (!observers.length && this.connected_) {
this.disconnect_();
}
};
/**
* Invokes the update of observers. It will continue running updates insofar
* it detects changes.
*
* @returns {void}
*/
ResizeObserverController.prototype.refresh = function () {
var changesDetected = this.updateObservers_();
// Continue running updates if changes have been detected as there might
// be future ones caused by CSS transitions.
if (changesDetected) {
this.refresh();
}
};
/**
* Updates every observer from observers list and notifies them of queued
* entries.
*
* @private
* @returns {boolean} Returns "true" if any observer has detected changes in
* dimensions of it's elements.
*/
ResizeObserverController.prototype.updateObservers_ = function () {
// Collect observers that have active observations.
var activeObservers = this.observers_.filter(function (observer) {
return observer.gatherActive(), observer.hasActive();
});
// Deliver notifications in a separate cycle in order to avoid any
// collisions between observers, e.g. when multiple instances of
// ResizeObserver are tracking the same element and the callback of one
// of them changes content dimensions of the observed target. Sometimes
// this may result in notifications being blocked for the rest of observers.
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
return activeObservers.length > 0;
};
/**
* Initializes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.connect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already added.
if (!isBrowser || this.connected_) {
return;
}
// Subscription to the "Transitionend" event is used as a workaround for
// delayed transitions. This way it's possible to capture at least the
// final state of an element.
document.addEventListener('transitionend', this.onTransitionEnd_);
window.addEventListener('resize', this.refresh);
if (mutationObserverSupported) {
this.mutationsObserver_ = new MutationObserver(this.refresh);
this.mutationsObserver_.observe(document, {
attributes: true,
childList: true,
characterData: true,
subtree: true
});
}
else {
document.addEventListener('DOMSubtreeModified', this.refresh);
this.mutationEventsAdded_ = true;
}
this.connected_ = true;
};
/**
* Removes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.disconnect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already removed.
if (!isBrowser || !this.connected_) {
return;
}
document.removeEventListener('transitionend', this.onTransitionEnd_);
window.removeEventListener('resize', this.refresh);
if (this.mutationsObserver_) {
this.mutationsObserver_.disconnect();
}
if (this.mutationEventsAdded_) {
document.removeEventListener('DOMSubtreeModified', this.refresh);
}
this.mutationsObserver_ = null;
this.mutationEventsAdded_ = false;
this.connected_ = false;
};
/**
* "Transitionend" event handler.
*
* @private
* @param {TransitionEvent} event
* @returns {void}
*/
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
// Detect whether transition may affect dimensions of an element.
var isReflowProperty = transitionKeys.some(function (key) {
return !!~propertyName.indexOf(key);
});
if (isReflowProperty) {
this.refresh();
}
};
/**
* Returns instance of the ResizeObserverController.
*
* @returns {ResizeObserverController}
*/
ResizeObserverController.getInstance = function () {
if (!this.instance_) {
this.instance_ = new ResizeObserverController();
}
return this.instance_;
};
/**
* Holds reference to the controller's instance.
*
* @private {ResizeObserverController}
*/
ResizeObserverController.instance_ = null;
return ResizeObserverController;
}());
/**
* Defines non-writable/enumerable properties of the provided target object.
*
* @param {Object} target - Object for which to define properties.
* @param {Object} props - Properties to be defined.
* @returns {Object} Target object.
*/
var defineConfigurable = (function (target, props) {
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
var key = _a[_i];
Object.defineProperty(target, key, {
value: props[key],
enumerable: false,
writable: false,
configurable: true
});
}
return target;
});
/**
* Returns the global object associated with provided element.
*
* @param {Object} target
* @returns {Object}
*/
var getWindowOf = (function (target) {
// Assume that the element is an instance of Node, which means that it
// has the "ownerDocument" property from which we can retrieve a
// corresponding global object.
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
// Return the local global object if it's not possible extract one from
// provided element.
return ownerGlobal || global$1;
});
// Placeholder of an empty content rectangle.
var emptyRect = createRectInit(0, 0, 0, 0);
/**
* Converts provided string to a number.
*
* @param {number|string} value
* @returns {number}
*/
function toFloat(value) {
return parseFloat(value) || 0;
}
/**
* Extracts borders size from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @param {...string} positions - Borders positions (top, right, ...)
* @returns {number}
*/
function getBordersSize(styles) {
var positions = [];
for (var _i = 1; _i < arguments.length; _i++) {
positions[_i - 1] = arguments[_i];
}
return positions.reduce(function (size, position) {
var value = styles['border-' + position + '-width'];
return size + toFloat(value);
}, 0);
}
/**
* Extracts paddings sizes from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @returns {Object} Paddings box.
*/
function getPaddings(styles) {
var positions = ['top', 'right', 'bottom', 'left'];
var paddings = {};
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
var position = positions_1[_i];
var value = styles['padding-' + position];
paddings[position] = toFloat(value);
}
return paddings;
}
/**
* Calculates content rectangle of provided SVG element.
*
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
* to be calculated.
* @returns {DOMRectInit}
*/
function getSVGContentRect(target) {
var bbox = target.getBBox();
return createRectInit(0, 0, bbox.width, bbox.height);
}
/**
* Calculates content rectangle of provided HTMLElement.
*
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
* @returns {DOMRectInit}
*/
function getHTMLElementContentRect(target) {
// Client width & height properties can't be
// used exclusively as they provide rounded values.
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
// By this condition we can catch all non-replaced inline, hidden and
// detached elements. Though elements with width & height properties less
// than 0.5 will be discarded as well.
//
// Without it we would need to implement separate methods for each of
// those cases and it's not possible to perform a precise and performance
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
// gives wrong results for elements with width & height less than 0.5.
if (!clientWidth && !clientHeight) {
return emptyRect;
}
var styles = getWindowOf(target).getComputedStyle(target);
var paddings = getPaddings(styles);
var horizPad = paddings.left + paddings.right;
var vertPad = paddings.top + paddings.bottom;
// Computed styles of width & height are being used because they are the
// only dimensions available to JS that contain non-rounded values. It could
// be possible to utilize the getBoundingClientRect if only it's data wasn't
// affected by CSS transformations let alone paddings, borders and scroll bars.
var width = toFloat(styles.width), height = toFloat(styles.height);
// Width & height include paddings and borders when the 'border-box' box
// model is applied (except for IE).
if (styles.boxSizing === 'border-box') {
// Following conditions are required to handle Internet Explorer which
// doesn't include paddings and borders to computed CSS dimensions.
//
// We can say that if CSS dimensions + paddings are equal to the "client"
// properties then it's either IE, and thus we don't need to subtract
// anything, or an element merely doesn't have paddings/borders styles.
if (Math.round(width + horizPad) !== clientWidth) {
width -= getBordersSize(styles, 'left', 'right') + horizPad;
}
if (Math.round(height + vertPad) !== clientHeight) {
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
}
}
// Following steps can't be applied to the document's root element as its
// client[Width/Height] properties represent viewport area of the window.
// Besides, it's as well not necessary as the <html> itself neither has
// rendered scroll bars nor it can be clipped.
if (!isDocumentElement(target)) {
// In some browsers (only in Firefox, actually) CSS width & height
// include scroll bars size which can be removed at this step as scroll
// bars are the only difference between rounded dimensions + paddings
// and "client" properties, though that is not always true in Chrome.
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
// Chrome has a rather weird rounding of "client" properties.
// E.g. for an element with content width of 314.2px it sometimes gives
// the client width of 315px and for the width of 314.7px it may give
// 314px. And it doesn't happen all the time. So just ignore this delta
// as a non-relevant.
if (Math.abs(vertScrollbar) !== 1) {
width -= vertScrollbar;
}
if (Math.abs(horizScrollbar) !== 1) {
height -= horizScrollbar;
}
}
return createRectInit(paddings.left, paddings.top, width, height);
}
/**
* Checks whether provided element is an instance of the SVGGraphicsElement.
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
var isSVGGraphicsElement = (function () {
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
// interface.
if (typeof SVGGraphicsElement !== 'undefined') {
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
}
// If it's so, then check that element is at least an instance of the
// SVGElement and that it has the "getBBox" method.
// eslint-disable-next-line no-extra-parens
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
typeof target.getBBox === 'function'); };
})();
/**
* Checks whether provided element is a document element (<html>).
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
function isDocumentElement(target) {
return target === getWindowOf(target).document.documentElement;
}
/**
* Calculates an appropriate content rectangle for provided html or svg element.
*
* @param {Element} target - Element content rectangle of which needs to be calculated.
* @returns {DOMRectInit}
*/
function getContentRect(target) {
if (!isBrowser) {
return emptyRect;
}
if (isSVGGraphicsElement(target)) {
return getSVGContentRect(target);
}
return getHTMLElementContentRect(target);
}
/**
* Creates rectangle with an interface of the DOMRectReadOnly.
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
*
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
* @returns {DOMRectReadOnly}
*/
function createReadOnlyRect(_a) {
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
var rect = Object.create(Constr.prototype);
// Rectangle's properties are not writable and non-enumerable.
defineConfigurable(rect, {
x: x, y: y, width: width, height: height,
top: y,
right: x + width,
bottom: height + y,
left: x
});
return rect;
}
/**
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
*
* @param {number} x - X coordinate.
* @param {number} y - Y coordinate.
* @param {number} width - Rectangle's width.
* @param {number} height - Rectangle's height.
* @returns {DOMRectInit}
*/
function createRectInit(x, y, width, height) {
return { x: x, y: y, width: width, height: height };
}
/**
* Class that is responsible for computations of the content rectangle of
* provided DOM element and for keeping track of it's changes.
*/
var ResizeObservation = /** @class */ (function () {
/**
* Creates an instance of ResizeObservation.
*
* @param {Element} target - Element to be observed.
*/
function ResizeObservation(target) {
/**
* Broadcasted width of content rectangle.
*
* @type {number}
*/
this.broadcastWidth = 0;
/**
* Broadcasted height of content rectangle.
*
* @type {number}
*/
this.broadcastHeight = 0;
/**
* Reference to the last observed content rectangle.
*
* @private {DOMRectInit}
*/
this.contentRect_ = createRectInit(0, 0, 0, 0);
this.target = target;
}
/**
* Updates content rectangle and tells whether it's width or height properties
* have changed since the last broadcast.
*
* @returns {boolean}
*/
ResizeObservation.prototype.isActive = function () {
var rect = getContentRect(this.target);
this.contentRect_ = rect;
return (rect.width !== this.broadcastWidth ||
rect.height !== this.broadcastHeight);
};
/**
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
* from the corresponding properties of the last observed content rectangle.
*
* @returns {DOMRectInit} Last observed content rectangle.
*/
ResizeObservation.prototype.broadcastRect = function () {
var rect = this.contentRect_;
this.broadcastWidth = rect.width;
this.broadcastHeight = rect.height;
return rect;
};
return ResizeObservation;
}());
var ResizeObserverEntry = /** @class */ (function () {
/**
* Creates an instance of ResizeObserverEntry.
*
* @param {Element} target - Element that is being observed.
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
*/
function ResizeObserverEntry(target, rectInit) {
var contentRect = createReadOnlyRect(rectInit);
// According to the specification following properties are not writable
// and are also not enumerable in the native implementation.
//
// Property accessors are not being used as they'd require to define a
// private WeakMap storage which may cause memory leaks in browsers that
// don't support this type of collections.
defineConfigurable(this, { target: target, contentRect: contentRect });
}
return ResizeObserverEntry;
}());
var ResizeObserverSPI = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback function that is invoked
* when one of the observed elements changes it's content dimensions.
* @param {ResizeObserverController} controller - Controller instance which
* is responsible for the updates of observer.
* @param {ResizeObserver} callbackCtx - Reference to the public
* ResizeObserver instance which will be passed to callback function.
*/
function ResizeObserverSPI(callback, controller, callbackCtx) {
/**
* Collection of resize observations that have detected changes in dimensions
* of elements.
*
* @private {Array<ResizeObservation>}
*/
this.activeObservations_ = [];
/**
* Registry of the ResizeObservation instances.
*
* @private {Map<Element, ResizeObservation>}
*/
this.observations_ = new MapShim();
if (typeof callback !== 'function') {
throw new TypeError('The callback provided as parameter 1 is not a function.');
}
this.callback_ = callback;
this.controller_ = controller;
this.callbackCtx_ = callbackCtx;
}
/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/
ResizeObserverSPI.prototype.observe = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is already being observed.
if (observations.has(target)) {
return;
}
observations.set(target, new ResizeObservation(target));
this.controller_.addObserver(this);
// Force the update of observations.
this.controller_.refresh();
};
/**
* Stops observing provided element.
*
* @param {Element} target - Element to stop observing.
* @returns {void}
*/
ResizeObserverSPI.prototype.unobserve = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is not being observed.
if (!observations.has(target)) {
return;
}
observations.delete(target);
if (!observations.size) {
this.controller_.removeObserver(this);
}
};
/**
* Stops observing all elements.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.disconnect = function () {
this.clearActive();
this.observations_.clear();
this.controller_.removeObserver(this);
};
/**
* Collects observation instances the associated element of which has changed
* it's content rectangle.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.gatherActive = function () {
var _this = this;
this.clearActive();
this.observations_.forEach(function (observation) {
if (observation.isActive()) {
_this.activeObservations_.push(observation);
}
});
};
/**
* Invokes initial callback function with a list of ResizeObserverEntry
* instances collected from active resize observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.broadcastActive = function () {
// Do nothing if observer doesn't have active observations.
if (!this.hasActive()) {
return;
}
var ctx = this.callbackCtx_;
// Create ResizeObserverEntry instance for every active observation.
var entries = this.activeObservations_.map(function (observation) {
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
});
this.callback_.call(ctx, entries, ctx);
this.clearActive();
};
/**
* Clears the collection of active observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.clearActive = function () {
this.activeObservations_.splice(0);
};
/**
* Tells whether observer has active observations.
*
* @returns {boolean}
*/
ResizeObserverSPI.prototype.hasActive = function () {
return this.activeObservations_.length > 0;
};
return ResizeObserverSPI;
}());
// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
/**
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
* exposing only those methods and properties that are defined in the spec.
*/
var ResizeObserver_es_ResizeObserver = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/
function ResizeObserver(callback) {
if (!(this instanceof ResizeObserver)) {
throw new TypeError('Cannot call a class as a function.');
}
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
var controller = ResizeObserverController.getInstance();
var observer = new ResizeObserverSPI(callback, controller, this);
observers.set(this, observer);
}
return ResizeObserver;
}());
// Expose public methods of ResizeObserver.
[
'observe',
'unobserve',
'disconnect'
].forEach(function (method) {
ResizeObserver_es_ResizeObserver.prototype[method] = function () {
var _a;
return (_a = observers.get(this))[method].apply(_a, arguments);
};
});
var index = (function () {
// Export existing implementation if available.
if (typeof global$1.ResizeObserver !== 'undefined') {
return global$1.ResizeObserver;
}
return ResizeObserver_es_ResizeObserver;
})();
/* harmony default export */ var ResizeObserver_es = (index);
;// ./node_modules/rc-resize-observer/es/utils/observerUtil.js
// =============================== Const ===============================
var elementListeners = new Map();
function onResize(entities) {
entities.forEach(function (entity) {
var _elementListeners$get;
var target = entity.target;
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 || _elementListeners$get.forEach(function (listener) {
return listener(target);
});
});
}
// Note: ResizeObserver polyfill not support option to measure border-box resize
var resizeObserver = new ResizeObserver_es(onResize);
// Dev env only
var _el = true ? elementListeners : 0; // eslint-disable-line
var _rs = true ? onResize : 0; // eslint-disable-line
// ============================== Observe ==============================
function observe(element, callback) {
if (!elementListeners.has(element)) {
elementListeners.set(element, new Set());
resizeObserver.observe(element);
}
elementListeners.get(element).add(callback);
}
function unobserve(element, callback) {
if (elementListeners.has(element)) {
elementListeners.get(element).delete(callback);
if (!elementListeners.get(element).size) {
resizeObserver.unobserve(element);
elementListeners.delete(element);
}
}
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
;// ./node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js
/**
* Fallback to findDOMNode if origin ref do not provide any dom element
*/
var DomWrapper = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(DomWrapper, _React$Component);
var _super = (0,createSuper["default"])(DomWrapper);
function DomWrapper() {
(0,classCallCheck["default"])(this, DomWrapper);
return _super.apply(this, arguments);
}
(0,createClass["default"])(DomWrapper, [{
key: "render",
value: function render() {
return this.props.children;
}
}]);
return DomWrapper;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
;// ./node_modules/rc-resize-observer/es/SingleObserver/index.js
function SingleObserver(props, ref) {
var children = props.children,
disabled = props.disabled;
var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var onCollectionResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(CollectionContext);
// =========================== Children ===========================
var isRenderProps = typeof children === 'function';
var mergedChildren = isRenderProps ? children(elementRef) : children;
// ============================= Size =============================
var sizeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
width: -1,
height: -1,
offsetWidth: -1,
offsetHeight: -1
});
// ============================= Ref ==============================
var canRef = !isRenderProps && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedChildren) && (0,es_ref.supportRef)(mergedChildren);
var originRef = canRef ? (0,es_ref.getNodeRef)(mergedChildren) : null;
var mergedRef = (0,es_ref.useComposeRef)(originRef, elementRef);
var getDom = function getDom() {
var _elementRef$current;
return (0,findDOMNode["default"])(elementRef.current) || (
// Support `nativeElement` format
elementRef.current && (0,esm_typeof["default"])(elementRef.current) === 'object' ? (0,findDOMNode["default"])((_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.nativeElement) : null) || (0,findDOMNode["default"])(wrapperRef.current);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return getDom();
});
// =========================== Observe ============================
var propsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(props);
propsRef.current = props;
// Handler
var onInternalResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (target) {
var _propsRef$current = propsRef.current,
onResize = _propsRef$current.onResize,
data = _propsRef$current.data;
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 (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
var size = {
width: fixedWidth,
height: fixedHeight,
offsetWidth: offsetWidth,
offsetHeight: offsetHeight
};
sizeRef.current = size;
// IE is strange, right?
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
var sizeInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, size), {}, {
offsetWidth: mergedOffsetWidth,
offsetHeight: mergedOffsetHeight
});
// Let collection know what happened
onCollectionResize === null || onCollectionResize === void 0 || onCollectionResize(sizeInfo, target, data);
if (onResize) {
// defer the callback but not defer to next frame
Promise.resolve().then(function () {
onResize(sizeInfo, target);
});
}
}
}, []);
// Dynamic observe
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var currentElement = getDom();
if (currentElement && !disabled) {
observe(currentElement, onInternalResize);
}
return function () {
return unobserve(currentElement, onInternalResize);
};
}, [elementRef.current, disabled]);
// ============================ Render ============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DomWrapper, {
ref: wrapperRef
}, canRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(mergedChildren, {
ref: mergedRef
}) : mergedChildren);
}
var RefSingleObserver = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SingleObserver);
if (true) {
RefSingleObserver.displayName = 'SingleObserver';
}
/* harmony default export */ var es_SingleObserver = (RefSingleObserver);
;// ./node_modules/rc-resize-observer/es/index.js
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
function es_ResizeObserver(props, ref) {
var children = props.children;
var childNodes = typeof children === 'function' ? [children] : (0,toArray["default"])(children);
if (true) {
if (childNodes.length > 1) {
(0,warning.warning)(false, 'Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.');
} else if (childNodes.length === 0) {
(0,warning.warning)(false, '`children` of ResizeObserver is empty. Nothing is in observe.');
}
}
return childNodes.map(function (child, index) {
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SingleObserver, (0,esm_extends["default"])({}, props, {
key: key,
ref: index === 0 ? ref : undefined
}), child);
});
}
var RefResizeObserver = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(es_ResizeObserver);
if (true) {
RefResizeObserver.displayName = 'ResizeObserver';
}
RefResizeObserver.Collection = Collection;
/* harmony default export */ var es = (RefResizeObserver);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js
var raf = __webpack_require__("./node_modules/rc-util/es/raf.js");
;// ./components/_util/throttleByAnimationFrame.ts
function throttleByAnimationFrame(fn) {
let requestId;
const later = args => () => {
requestId = null;
fn.apply(void 0, (0,toConsumableArray["default"])(args));
};
const throttled = function () {
if (requestId == null) {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
requestId = (0,raf["default"])(later(args));
}
};
throttled.cancel = () => {
raf["default"].cancel(requestId);
requestId = null;
};
return throttled;
}
/* harmony default export */ var _util_throttleByAnimationFrame = (throttleByAnimationFrame);
// EXTERNAL MODULE: ./components/config-provider/context.ts
var config_provider_context = __webpack_require__("./components/config-provider/context.ts");
// EXTERNAL MODULE: ./components/affix/style/index.ts
var affix_style = __webpack_require__("./components/affix/style/index.ts");
;// ./components/affix/utils.ts
function getTargetRect(target) {
return target !== window ? target.getBoundingClientRect() : {
top: 0,
bottom: window.innerHeight
};
}
function getFixedTop(placeholderRect, targetRect, offsetTop) {
if (offsetTop !== undefined && Math.round(targetRect.top) > Math.round(placeholderRect.top) - offsetTop) {
return offsetTop + targetRect.top;
}
return undefined;
}
function getFixedBottom(placeholderRect, targetRect, offsetBottom) {
if (offsetBottom !== undefined && Math.round(targetRect.bottom) < Math.round(placeholderRect.bottom) + offsetBottom) {
const targetBottomOffset = window.innerHeight - targetRect.bottom;
return offsetBottom + targetBottomOffset;
}
return undefined;
}
;// ./components/affix/index.tsx
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;
};
const TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
function getDefaultTarget() {
return typeof window !== 'undefined' ? window : null;
}
const AFFIX_STATUS_NONE = 0;
const AFFIX_STATUS_PREPARE = 1;
const Affix = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
var _a;
const {
style,
offsetTop,
offsetBottom,
prefixCls,
className,
rootClassName,
children,
target,
onChange,
onTestUpdatePosition
} = props,
restProps = __rest(props, ["style", "offsetTop", "offsetBottom", "prefixCls", "className", "rootClassName", "children", "target", "onChange", "onTestUpdatePosition"]);
const {
getPrefixCls,
getTargetContainer
} = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
const affixPrefixCls = getPrefixCls('affix', prefixCls);
const [lastAffix, setLastAffix] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false);
const [affixStyle, setAffixStyle] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState();
const [placeholderStyle, setPlaceholderStyle] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState();
const status = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(AFFIX_STATUS_NONE);
const prevTarget = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const prevListener = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const placeholderNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const fixedNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const timer = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const targetFunc = (_a = target !== null && target !== void 0 ? target : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultTarget;
const internalOffsetTop = offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
// =================== Measure ===================
const measure = () => {
if (status.current !== AFFIX_STATUS_PREPARE || !fixedNodeRef.current || !placeholderNodeRef.current || !targetFunc) {
return;
}
const targetNode = targetFunc();
if (targetNode) {
const newState = {
status: AFFIX_STATUS_NONE
};
const placeholderRect = getTargetRect(placeholderNodeRef.current);
if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {
return;
}
const targetRect = getTargetRect(targetNode);
const fixedTop = getFixedTop(placeholderRect, targetRect, internalOffsetTop);
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
if (fixedTop !== undefined) {
newState.affixStyle = {
position: 'fixed',
top: fixedTop,
width: placeholderRect.width,
height: placeholderRect.height
};
newState.placeholderStyle = {
width: placeholderRect.width,
height: placeholderRect.height
};
} else if (fixedBottom !== undefined) {
newState.affixStyle = {
position: 'fixed',
bottom: fixedBottom,
width: placeholderRect.width,
height: placeholderRect.height
};
newState.placeholderStyle = {
width: placeholderRect.width,
height: placeholderRect.height
};
}
newState.lastAffix = !!newState.affixStyle;
if (lastAffix !== newState.lastAffix) {
onChange === null || onChange === void 0 ? void 0 : onChange(newState.lastAffix);
}
status.current = newState.status;
setAffixStyle(newState.affixStyle);
setPlaceholderStyle(newState.placeholderStyle);
setLastAffix(newState.lastAffix);
}
};
const prepareMeasure = () => {
status.current = AFFIX_STATUS_PREPARE;
measure();
if (false) {}
};
const updatePosition = _util_throttleByAnimationFrame(() => {
prepareMeasure();
});
const lazyUpdatePosition = _util_throttleByAnimationFrame(() => {
// Check position change before measure to make Safari smooth
if (targetFunc && affixStyle) {
const targetNode = targetFunc();
if (targetNode && placeholderNodeRef.current) {
const targetRect = getTargetRect(targetNode);
const placeholderRect = getTargetRect(placeholderNodeRef.current);
const fixedTop = getFixedTop(placeholderRect, targetRect, internalOffsetTop);
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {
return;
}
}
}
// Directly call prepare measure since it's already throttled.
prepareMeasure();
});
const addListeners = () => {
const listenerTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
if (!listenerTarget) {
return;
}
TRIGGER_EVENTS.forEach(eventName => {
var _a;
if (prevListener.current) {
(_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);
}
listenerTarget === null || listenerTarget === void 0 ? void 0 : listenerTarget.addEventListener(eventName, lazyUpdatePosition);
});
prevTarget.current = listenerTarget;
prevListener.current = lazyUpdatePosition;
};
const removeListeners = () => {
if (timer.current) {
clearTimeout(timer.current);
timer.current = null;
}
const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
TRIGGER_EVENTS.forEach(eventName => {
var _a;
newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, lazyUpdatePosition);
if (prevListener.current) {
(_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);
}
});
updatePosition.cancel();
lazyUpdatePosition.cancel();
};
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => ({
updatePosition
}));
// mount & unmount
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
// [Legacy] Wait for parent component ref has its value.
// We should use target as directly element instead of function which makes element check hard.
timer.current = setTimeout(addListeners);
return () => removeListeners();
}, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
addListeners();
}, [target, affixStyle, lastAffix]);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
updatePosition();
}, [target, offsetTop, offsetBottom]);
const [wrapCSSVar, hashId, cssVarCls] = (0,affix_style["default"])(affixPrefixCls);
const rootCls = classnames_default()(rootClassName, hashId, affixPrefixCls, cssVarCls);
const mergedCls = classnames_default()({
[rootCls]: affixStyle
});
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es, {
onResize: updatePosition
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
style: style,
className: className,
ref: placeholderNodeRef
}, restProps), affixStyle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
style: placeholderStyle,
"aria-hidden": "true"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: mergedCls,
ref: fixedNodeRef,
style: affixStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es, {
onResize: updatePosition
}, children)))));
});
if (true) {
Affix.displayName = 'Affix';
}
/* harmony default export */ var components_affix = (Affix);
;// ./node_modules/@ant-design/icons-svg/es/asn/CheckCircleFilled.js
// This icon file is generated automatically.
var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" };
/* harmony default export */ var asn_CheckCircleFilled = (CheckCircleFilled);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__("./node_modules/@ant-design/icons/es/components/AntdIcon.js");
;// ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CheckCircleFilled_CheckCircleFilled = function CheckCircleFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CheckCircleFilled
}));
};
/** */
var RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CheckCircleFilled_CheckCircleFilled);
if (true) {
RefIcon.displayName = 'CheckCircleFilled';
}
/* harmony default export */ var icons_CheckCircleFilled = (RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleFilled.js
// This icon file is generated automatically.
var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
/* harmony default export */ var asn_CloseCircleFilled = (CloseCircleFilled);
;// ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CloseCircleFilled_CloseCircleFilled = function CloseCircleFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CloseCircleFilled
}));
};
/** */
var CloseCircleFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CloseCircleFilled_CloseCircleFilled);
if (true) {
CloseCircleFilled_RefIcon.displayName = 'CloseCircleFilled';
}
/* harmony default export */ var icons_CloseCircleFilled = (CloseCircleFilled_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/CloseOutlined.js
// This icon file is generated automatically.
var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
/* harmony default export */ var asn_CloseOutlined = (CloseOutlined);
;// ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CloseOutlined_CloseOutlined = function CloseOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CloseOutlined
}));
};
/** */
var CloseOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CloseOutlined_CloseOutlined);
if (true) {
CloseOutlined_RefIcon.displayName = 'CloseOutlined';
}
/* harmony default export */ var icons_CloseOutlined = (CloseOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleFilled.js
// This icon file is generated automatically.
var ExclamationCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
/* harmony default export */ var asn_ExclamationCircleFilled = (ExclamationCircleFilled);
;// ./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleFilled_ExclamationCircleFilled = function ExclamationCircleFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_ExclamationCircleFilled
}));
};
/** */
var ExclamationCircleFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ExclamationCircleFilled_ExclamationCircleFilled);
if (true) {
ExclamationCircleFilled_RefIcon.displayName = 'ExclamationCircleFilled';
}
/* harmony default export */ var icons_ExclamationCircleFilled = (ExclamationCircleFilled_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/InfoCircleFilled.js
// This icon file is generated automatically.
var InfoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
/* harmony default export */ var asn_InfoCircleFilled = (InfoCircleFilled);
;// ./node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InfoCircleFilled_InfoCircleFilled = function InfoCircleFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_InfoCircleFilled
}));
};
/** */
var InfoCircleFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InfoCircleFilled_InfoCircleFilled);
if (true) {
InfoCircleFilled_RefIcon.displayName = 'InfoCircleFilled';
}
/* harmony default export */ var icons_InfoCircleFilled = (InfoCircleFilled_RefIcon);
// EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 13 modules
var rc_motion_es = __webpack_require__("./node_modules/rc-motion/es/index.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
var pickAttrs = __webpack_require__("./node_modules/rc-util/es/pickAttrs.js");
// EXTERNAL MODULE: ./components/_util/reactNode.ts
var reactNode = __webpack_require__("./components/_util/reactNode.ts");
// EXTERNAL MODULE: ./components/_util/warning.ts
var _util_warning = __webpack_require__("./components/_util/warning.ts");
// EXTERNAL MODULE: ./components/alert/style/index.ts
var alert_style = __webpack_require__("./components/alert/style/index.ts");
;// ./components/alert/Alert.tsx
var Alert_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;
};
const iconMapFilled = {
success: icons_CheckCircleFilled,
info: icons_InfoCircleFilled,
error: icons_CloseCircleFilled,
warning: icons_ExclamationCircleFilled
};
const IconNode = props => {
const {
icon,
prefixCls,
type
} = props;
const iconType = iconMapFilled[type] || null;
if (icon) {
return (0,reactNode.replaceElement)(icon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-icon`
}, icon), () => ({
className: classnames_default()(`${prefixCls}-icon`, icon.props.className)
}));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(iconType, {
className: `${prefixCls}-icon`
});
};
const CloseIconNode = props => {
const {
isClosable,
prefixCls,
closeIcon,
handleClose,
ariaProps
} = props;
const mergedCloseIcon = closeIcon === true || closeIcon === undefined ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null) : closeIcon;
return isClosable ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", Object.assign({
type: "button",
onClick: handleClose,
className: `${prefixCls}-close-icon`,
tabIndex: 0
}, ariaProps), mergedCloseIcon)) : null;
};
const Alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
description,
prefixCls: customizePrefixCls,
message,
banner,
className,
rootClassName,
style,
onMouseEnter,
onMouseLeave,
onClick,
afterClose,
showIcon,
closable,
closeText,
closeIcon,
action,
id
} = props,
otherProps = Alert_rest(props, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]);
const [closed, setClosed] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Alert');
warning.deprecated(!closeText, 'closeText', 'closable.closeIcon');
}
const internalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
nativeElement: internalRef.current
}));
const {
getPrefixCls,
direction,
closable: contextClosable,
closeIcon: contextCloseIcon,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('alert');
const prefixCls = getPrefixCls('alert', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,alert_style["default"])(prefixCls);
const handleClose = e => {
var _a;
setClosed(true);
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
};
const type = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (props.type !== undefined) {
return props.type;
}
// banner mode defaults to 'warning'
return banner ? 'warning' : 'info';
}, [props.type, banner]);
// closeable when closeText or closeIcon is assigned
const isClosable = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (typeof closable === 'object' && closable.closeIcon) return true;
if (closeText) {
return true;
}
if (typeof closable === 'boolean') {
return closable;
}
// should be true when closeIcon is 0 or ''
if (closeIcon !== false && closeIcon !== null && closeIcon !== undefined) {
return true;
}
return !!contextClosable;
}, [closeText, closeIcon, closable, contextClosable]);
// banner mode defaults to Icon
const isShowIcon = banner && showIcon === undefined ? true : showIcon;
const alertCls = classnames_default()(prefixCls, `${prefixCls}-${type}`, {
[`${prefixCls}-with-description`]: !!description,
[`${prefixCls}-no-icon`]: !isShowIcon,
[`${prefixCls}-banner`]: !!banner,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, cssVarCls, hashId);
const restProps = (0,pickAttrs["default"])(otherProps, {
aria: true,
data: true
});
const mergedCloseIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (typeof closable === 'object' && closable.closeIcon) {
return closable.closeIcon;
}
if (closeText) {
return closeText;
}
if (closeIcon !== undefined) {
return closeIcon;
}
if (typeof contextClosable === 'object' && contextClosable.closeIcon) {
return contextClosable.closeIcon;
}
return contextCloseIcon;
}, [closeIcon, closable, closeText, contextCloseIcon]);
const mergedAriaProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const merged = closable !== null && closable !== void 0 ? closable : contextClosable;
if (typeof merged === 'object') {
const {
closeIcon: _
} = merged,
ariaProps = Alert_rest(merged, ["closeIcon"]);
return ariaProps;
}
return {};
}, [closable, contextClosable]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: !closed,
motionName: `${prefixCls}-motion`,
motionAppear: false,
motionEnter: false,
onLeaveStart: node => ({
maxHeight: node.offsetHeight
}),
onLeaveEnd: afterClose
}, (_ref, setRef) => {
let {
className: motionClassName,
style: motionStyle
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
id: id,
ref: (0,es_ref.composeRef)(internalRef, setRef),
"data-show": !closed,
className: classnames_default()(alertCls, motionClassName),
style: Object.assign(Object.assign(Object.assign({}, contextStyle), style), motionStyle),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onClick: onClick,
role: "alert"
}, restProps), isShowIcon ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IconNode, {
description: description,
icon: props.icon,
prefixCls: prefixCls,
type: type
})) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-content`
}, message ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-message`
}, message) : null, description ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-description`
}, description) : null), action ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-action`
}, action) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CloseIconNode, {
isClosable: isClosable,
prefixCls: prefixCls,
closeIcon: mergedCloseIcon,
handleClose: handleClose,
ariaProps: mergedAriaProps
}));
}));
});
if (true) {
Alert.displayName = 'Alert';
}
/* harmony default export */ var alert_Alert = (Alert);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
var isNativeReflectConstruct = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
;// ./node_modules/@babel/runtime/helpers/esm/callSuper.js
function _callSuper(t, o, e) {
return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e));
}
;// ./components/alert/ErrorBoundary.tsx
let ErrorBoundary = /*#__PURE__*/function (_React$Component) {
function ErrorBoundary() {
var _this;
(0,classCallCheck["default"])(this, ErrorBoundary);
_this = _callSuper(this, ErrorBoundary, arguments);
_this.state = {
error: undefined,
info: {
componentStack: ''
}
};
return _this;
}
(0,inherits["default"])(ErrorBoundary, _React$Component);
return (0,createClass["default"])(ErrorBoundary, [{
key: "componentDidCatch",
value: function componentDidCatch(error, info) {
this.setState({
error,
info
});
}
}, {
key: "render",
value: function render() {
const {
message,
description,
id,
children
} = this.props;
const {
error,
info
} = this.state;
const componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;
const errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;
const errorDescription = typeof description === 'undefined' ? componentStack : description;
if (error) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(alert_Alert, {
id: id,
type: "error",
message: errorMessage,
description: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("pre", {
style: {
fontSize: '0.9em',
overflowX: 'auto'
}
}, errorDescription)
});
}
return children;
}
}]);
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
/* harmony default export */ var alert_ErrorBoundary = (ErrorBoundary);
;// ./components/alert/index.tsx
const components_alert_Alert = alert_Alert;
components_alert_Alert.ErrorBoundary = alert_ErrorBoundary;
/* harmony default export */ var components_alert = (components_alert_Alert);
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useEvent.js
var useEvent = __webpack_require__("./node_modules/rc-util/es/hooks/useEvent.js");
;// ./node_modules/compute-scroll-into-view/dist/index.js
const t=t=>"object"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||"hidden"!==t)&&("visible"!==t&&"clip"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},dist_r=(e,r)=>{var i,s,d,h;if("undefined"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p="function"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k="start"===f||"nearest"===f?x-T:"end"===f?I+F:x+v/2-T+F,D="center"===u?R+E/2-V+B:"end"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:l,width:r,top:i,right:s,bottom:d,left:h}=e.getBoundingClientRect();if("if-needed"===c&&x>=0&&R>=0&&I<=H&&C<=b&&(e===m&&!n(e)||x>=i&&I<=d&&R>=h&&C<=s))return L;const a=getComputedStyle(e),g=parseInt(a.borderLeftWidth,10),p=parseInt(a.borderTopWidth,10),W=parseInt(a.borderRightWidth,10),T=parseInt(a.borderBottomWidth,10);let B=0,F=0;const V="offsetWidth"in e?e.offsetWidth-e.clientWidth-g-W:0,S="offsetHeight"in e?e.offsetHeight-e.clientHeight-p-T:0,X="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,Y="offsetHeight"in e?0===e.offsetHeight?0:l/e.offsetHeight:0;if(m===e)B="start"===f?k:"end"===f?k-H:"nearest"===f?o(M,M+H,H,p,T,M+k,M+k+v,v):k-H/2,F="start"===u?D:"center"===u?D-b/2:"end"===u?D-b:o(y,y+b,b,g,W,y+D,y+D+E,E),B=Math.max(0,B+M),F=Math.max(0,F+y);else{B="start"===f?k-i-p:"end"===f?k-d+T+S:"nearest"===f?o(i,d,l,p,T+S,k,k+v,v):k-(i+l/2)+S/2,F="start"===u?D-h-g:"center"===u?D-(h+r/2)+V/2:"end"===u?D-s+W+V:o(h,s,r,g,W+V,D,D+E,E);const{scrollLeft:t,scrollTop:n}=e;B=0===Y?0:Math.max(0,Math.min(n+B/Y,e.scrollHeight-l/Y+S)),F=0===X?0:Math.max(0,Math.min(t+F/X,e.scrollWidth-r/X+V)),k+=n-B,D+=t-F}L.push({el:e,top:B,left:F})}return L};//# sourceMappingURL=index.js.map
;// ./node_modules/scroll-into-view-if-needed/dist/index.js
const dist_o=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function dist_e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(r))return r.behavior(dist_r(e,r));const l="boolean"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of dist_r(e,dist_o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}//# sourceMappingURL=index.js.map
;// ./components/_util/getScroll.ts
function isWindow(obj) {
return obj !== null && obj !== undefined && obj === obj.window;
}
const getScroll = target => {
var _a, _b;
if (typeof window === 'undefined') {
return 0;
}
let result = 0;
if (isWindow(target)) {
result = target.pageYOffset;
} else if (target instanceof Document) {
result = target.documentElement.scrollTop;
} else if (target instanceof HTMLElement) {
result = target.scrollTop;
} else if (target) {
// According to the type inference, the `target` is `never` type.
// Since we configured the loose mode type checking, and supports mocking the target with such shape below::
// `{ documentElement: { scrollLeft: 200, scrollTop: 400 } }`,
// the program may falls into this branch.
// Check the corresponding tests for details. Don't sure what is the real scenario this happens.
/* biome-ignore lint/complexity/useLiteralKeys: target is a never type */ /* eslint-disable-next-line dot-notation */
result = target['scrollTop'];
}
if (target && !isWindow(target) && typeof result !== 'number') {
result = (_b = ((_a = target.ownerDocument) !== null && _a !== void 0 ? _a : target).documentElement) === null || _b === void 0 ? void 0 : _b.scrollTop;
}
return result;
};
/* harmony default export */ var _util_getScroll = (getScroll);
;// ./components/_util/easings.ts
function easeInOutCubic(t, b, c, d) {
const cc = c - b;
// biome-ignore lint: it is a common easing function
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
// biome-ignore lint: it is a common easing function
return cc / 2 * ((t -= 2) * t * t + 2) + b;
}
;// ./components/_util/scrollTo.ts
function scrollTo(y) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const {
getContainer = () => window,
callback,
duration = 450
} = options;
const container = getContainer();
const scrollTop = _util_getScroll(container);
const startTime = Date.now();
const frameFunc = () => {
const timestamp = Date.now();
const time = timestamp - startTime;
const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
if (isWindow(container)) {
container.scrollTo(window.pageXOffset, nextScrollTop);
} else if (container instanceof Document || container.constructor.name === 'HTMLDocument') {
container.documentElement.scrollTop = nextScrollTop;
} else {
container.scrollTop = nextScrollTop;
}
if (time < duration) {
(0,raf["default"])(frameFunc);
} else if (typeof callback === 'function') {
callback();
}
};
(0,raf["default"])(frameFunc);
}
// EXTERNAL MODULE: ./components/theme/useToken.ts
var useToken = __webpack_require__("./components/theme/useToken.ts");
;// ./components/config-provider/hooks/useCSSVarCls.ts
/**
* This hook is only for cssVar to add root className for components.
* If root ClassName is needed, this hook could be refactored with `-root`
* @param prefixCls
*/
const useCSSVarCls = prefixCls => {
const [,,,, cssVar] = (0,useToken["default"])();
return cssVar ? `${prefixCls}-css-var` : '';
};
/* harmony default export */ var hooks_useCSSVarCls = (useCSSVarCls);
;// ./components/anchor/context.ts
const AnchorContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
/* harmony default export */ var anchor_context = (AnchorContext);
;// ./components/anchor/AnchorLink.tsx
const AnchorLink = props => {
const {
href,
title,
prefixCls: customizePrefixCls,
children,
className,
target,
replace
} = props;
const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(anchor_context);
const {
registerLink,
unregisterLink,
scrollTo,
onClick,
activeLink,
direction
} = context || {};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
registerLink === null || registerLink === void 0 ? void 0 : registerLink(href);
return () => {
unregisterLink === null || unregisterLink === void 0 ? void 0 : unregisterLink(href);
};
}, [href]);
const handleClick = e => {
onClick === null || onClick === void 0 ? void 0 : onClick(e, {
title,
href
});
scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
if (replace) {
e.preventDefault();
window.location.replace(href);
}
};
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Anchor.Link');
true ? warning(!children || direction !== 'horizontal', 'usage', '`Anchor.Link children` is not supported when `Anchor` direction is horizontal') : 0;
}
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('anchor', customizePrefixCls);
const active = activeLink === href;
const wrapperClassName = classnames_default()(`${prefixCls}-link`, className, {
[`${prefixCls}-link-active`]: active
});
const titleClassName = classnames_default()(`${prefixCls}-link-title`, {
[`${prefixCls}-link-title-active`]: active
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: wrapperClassName
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
className: titleClassName,
href: href,
title: typeof title === 'string' ? title : '',
target: target,
onClick: handleClick
}, title), direction !== 'horizontal' ? children : null);
};
/* harmony default export */ var anchor_AnchorLink = (AnchorLink);
// EXTERNAL MODULE: ./components/anchor/style/index.ts
var anchor_style = __webpack_require__("./components/anchor/style/index.ts");
;// ./components/anchor/Anchor.tsx
function getDefaultContainer() {
return window;
}
function getOffsetTop(element, container) {
if (!element.getClientRects().length) {
return 0;
}
const rect = element.getBoundingClientRect();
if (rect.width || rect.height) {
if (container === window) {
return rect.top - element.ownerDocument.documentElement.clientTop;
}
return rect.top - container.getBoundingClientRect().top;
}
return rect.top;
}
const sharpMatcherRegex = /#([\S ]+)$/;
const Anchor = props => {
var _a;
const {
rootClassName,
prefixCls: customPrefixCls,
className,
style,
offsetTop,
affix = true,
showInkInFixed = false,
children,
items,
direction: anchorDirection = 'vertical',
bounds,
targetOffset,
onClick,
onChange,
getContainer,
getCurrentAnchor,
replace
} = props;
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Anchor');
warning.deprecated(!children, 'Anchor children', 'items');
true ? warning(!(anchorDirection === 'horizontal' && (items === null || items === void 0 ? void 0 : items.some(n => 'children' in n))), 'usage', '`Anchor items#children` is not supported when `Anchor` direction is horizontal.') : 0;
}
const [links, setLinks] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
const [activeLink, setActiveLink] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
const activeLinkRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(activeLink);
const wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const spanLinkNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const animating = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
const {
direction,
getPrefixCls,
className: anchorClassName,
style: anchorStyle
} = (0,config_provider_context.useComponentConfig)('anchor');
const {
getTargetContainer
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('anchor', customPrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,anchor_style["default"])(prefixCls, rootCls);
const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;
const dependencyListItem = JSON.stringify(links);
const registerLink = (0,useEvent["default"])(link => {
if (!links.includes(link)) {
setLinks(prev => [].concat((0,toConsumableArray["default"])(prev), [link]));
}
});
const unregisterLink = (0,useEvent["default"])(link => {
if (links.includes(link)) {
setLinks(prev => prev.filter(i => i !== link));
}
});
const updateInk = () => {
var _a;
const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);
if (linkNode && spanLinkNode.current) {
const {
style: inkStyle
} = spanLinkNode.current;
const horizontalAnchor = anchorDirection === 'horizontal';
inkStyle.top = horizontalAnchor ? '' : `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;
inkStyle.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;
inkStyle.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';
inkStyle.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';
if (horizontalAnchor) {
dist_e(linkNode, {
scrollMode: 'if-needed',
block: 'nearest'
});
}
}
};
const getInternalCurrentAnchor = function (_links) {
let _offsetTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
let _bounds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
const linkSections = [];
const container = getCurrentContainer();
_links.forEach(link => {
const sharpLinkMatch = sharpMatcherRegex.exec(link === null || link === void 0 ? void 0 : link.toString());
if (!sharpLinkMatch) {
return;
}
const target = document.getElementById(sharpLinkMatch[1]);
if (target) {
const top = getOffsetTop(target, container);
if (top <= _offsetTop + _bounds) {
linkSections.push({
link,
top
});
}
}
});
if (linkSections.length) {
const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
return maxSection.link;
}
return '';
};
const setCurrentActiveLink = (0,useEvent["default"])(link => {
// FIXME: Seems a bug since this compare is not equals
// `activeLinkRef` is parsed value which will always trigger `onChange` event.
if (activeLinkRef.current === link) {
return;
}
// https://github.com/ant-design/ant-design/issues/30584
const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;
setActiveLink(newLink);
activeLinkRef.current = newLink;
// onChange should respect the original link (which may caused by
// window scroll or user click), not the new link
onChange === null || onChange === void 0 ? void 0 : onChange(link);
});
const handleScroll = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(() => {
if (animating.current) {
return;
}
const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);
setCurrentActiveLink(currentActiveLink);
}, [dependencyListItem, targetOffset, offsetTop]);
const handleScrollTo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(link => {
setCurrentActiveLink(link);
const sharpLinkMatch = sharpMatcherRegex.exec(link);
if (!sharpLinkMatch) {
return;
}
const targetElement = document.getElementById(sharpLinkMatch[1]);
if (!targetElement) {
return;
}
const container = getCurrentContainer();
const scrollTop = _util_getScroll(container);
const eleOffsetTop = getOffsetTop(targetElement, container);
let y = scrollTop + eleOffsetTop;
y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;
animating.current = true;
scrollTo(y, {
getContainer: getCurrentContainer,
callback() {
animating.current = false;
}
});
}, [targetOffset, offsetTop]);
const wrapperClass = classnames_default()(hashId, cssVarCls, rootCls, rootClassName, `${prefixCls}-wrapper`, {
[`${prefixCls}-wrapper-horizontal`]: anchorDirection === 'horizontal',
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, anchorClassName);
const anchorClass = classnames_default()(prefixCls, {
[`${prefixCls}-fixed`]: !affix && !showInkInFixed
});
const inkClass = classnames_default()(`${prefixCls}-ink`, {
[`${prefixCls}-ink-visible`]: activeLink
});
const wrapperStyle = Object.assign(Object.assign({
maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'
}, anchorStyle), style);
const createNestedLink = options => Array.isArray(options) ? options.map(item => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(anchor_AnchorLink, Object.assign({
replace: replace
}, item, {
key: item.key
}), anchorDirection === 'vertical' && createNestedLink(item.children)))) : null;
const anchorContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: wrapperRef,
className: wrapperClass,
style: wrapperStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: anchorClass
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: inkClass,
ref: spanLinkNode
}), 'items' in props ? createNestedLink(items) : children));
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const scrollContainer = getCurrentContainer();
handleScroll();
scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);
return () => {
scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);
};
}, [dependencyListItem]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (typeof getCurrentAnchor === 'function') {
setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));
}
}, [getCurrentAnchor]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
updateInk();
}, [anchorDirection, getCurrentAnchor, dependencyListItem, activeLink]);
const memoizedContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
registerLink,
unregisterLink,
scrollTo: handleScrollTo,
activeLink,
onClick,
direction: anchorDirection
}), [activeLink, onClick, handleScrollTo, anchorDirection]);
const affixProps = affix && typeof affix === 'object' ? affix : undefined;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(anchor_context.Provider, {
value: memoizedContextValue
}, affix ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_affix, Object.assign({
offsetTop: offsetTop,
target: getCurrentContainer
}, affixProps), anchorContent)) : anchorContent));
};
if (true) {
Anchor.displayName = 'Anchor';
}
/* harmony default export */ var anchor_Anchor = (Anchor);
;// ./components/anchor/index.tsx
const components_anchor_Anchor = anchor_Anchor;
components_anchor_Anchor.Link = anchor_AnchorLink;
/* harmony default export */ var components_anchor = (components_anchor_Anchor);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
// EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__("react-dom");
var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
var KeyCode = __webpack_require__("./node_modules/rc-util/es/KeyCode.js");
;// ./node_modules/rc-notification/es/Notice.js
var Notify = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
style = props.style,
className = props.className,
_props$duration = props.duration,
duration = _props$duration === void 0 ? 4.5 : _props$duration,
showProgress = props.showProgress,
_props$pauseOnHover = props.pauseOnHover,
pauseOnHover = _props$pauseOnHover === void 0 ? true : _props$pauseOnHover,
eventKey = props.eventKey,
content = props.content,
closable = props.closable,
_props$closeIcon = props.closeIcon,
closeIcon = _props$closeIcon === void 0 ? 'x' : _props$closeIcon,
divProps = props.props,
onClick = props.onClick,
onNoticeClose = props.onNoticeClose,
times = props.times,
forcedHovering = props.hovering;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
hovering = _React$useState2[0],
setHovering = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
percent = _React$useState4[0],
setPercent = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
spentTime = _React$useState6[0],
setSpentTime = _React$useState6[1];
var mergedHovering = forcedHovering || hovering;
var mergedShowProgress = duration > 0 && showProgress;
// ======================== Close =========================
var onInternalClose = function onInternalClose() {
onNoticeClose(eventKey);
};
var onCloseKeyDown = function onCloseKeyDown(e) {
if (e.key === 'Enter' || e.code === 'Enter' || e.keyCode === KeyCode["default"].ENTER) {
onInternalClose();
}
};
// ======================== Effect ========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!mergedHovering && duration > 0) {
var start = Date.now() - spentTime;
var timeout = setTimeout(function () {
onInternalClose();
}, duration * 1000 - spentTime);
return function () {
if (pauseOnHover) {
clearTimeout(timeout);
}
setSpentTime(Date.now() - start);
};
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [duration, mergedHovering, times]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!mergedHovering && mergedShowProgress && (pauseOnHover || spentTime === 0)) {
var start = performance.now();
var animationFrame;
var calculate = function calculate() {
cancelAnimationFrame(animationFrame);
animationFrame = requestAnimationFrame(function (timestamp) {
var runtime = timestamp + spentTime - start;
var progress = Math.min(runtime / (duration * 1000), 1);
setPercent(progress * 100);
if (progress < 1) {
calculate();
}
});
};
calculate();
return function () {
if (pauseOnHover) {
cancelAnimationFrame(animationFrame);
}
};
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [duration, spentTime, mergedHovering, mergedShowProgress, times]);
// ======================== Closable ========================
var closableObj = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if ((0,esm_typeof["default"])(closable) === 'object' && closable !== null) {
return closable;
}
if (closable) {
return {
closeIcon: closeIcon
};
}
return {};
}, [closable, closeIcon]);
var ariaProps = (0,pickAttrs["default"])(closableObj, true);
// ======================== Progress ========================
var validPercent = 100 - (!percent || percent < 0 ? 0 : percent > 100 ? 100 : percent);
// ======================== Render ========================
var noticePrefixCls = "".concat(prefixCls, "-notice");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, divProps, {
ref: ref,
className: classnames_default()(noticePrefixCls, className, (0,defineProperty["default"])({}, "".concat(noticePrefixCls, "-closable"), closable)),
style: style,
onMouseEnter: function onMouseEnter(e) {
var _divProps$onMouseEnte;
setHovering(true);
divProps === null || divProps === void 0 || (_divProps$onMouseEnte = divProps.onMouseEnter) === null || _divProps$onMouseEnte === void 0 || _divProps$onMouseEnte.call(divProps, e);
},
onMouseLeave: function onMouseLeave(e) {
var _divProps$onMouseLeav;
setHovering(false);
divProps === null || divProps === void 0 || (_divProps$onMouseLeav = divProps.onMouseLeave) === null || _divProps$onMouseLeav === void 0 || _divProps$onMouseLeav.call(divProps, e);
},
onClick: onClick
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(noticePrefixCls, "-content")
}, content), closable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", (0,esm_extends["default"])({
tabIndex: 0,
className: "".concat(noticePrefixCls, "-close"),
onKeyDown: onCloseKeyDown,
"aria-label": "Close"
}, ariaProps, {
onClick: function onClick(e) {
e.preventDefault();
e.stopPropagation();
onInternalClose();
}
}), closableObj.closeIcon), mergedShowProgress && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("progress", {
className: "".concat(noticePrefixCls, "-progress"),
max: "100",
value: validPercent
}, validPercent + '%'));
});
/* harmony default export */ var Notice = (Notify);
;// ./node_modules/rc-notification/es/NotificationProvider.js
var NotificationContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
var NotificationProvider = function NotificationProvider(_ref) {
var children = _ref.children,
classNames = _ref.classNames;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NotificationContext.Provider, {
value: {
classNames: classNames
}
}, children);
};
/* harmony default export */ var es_NotificationProvider = (NotificationProvider);
;// ./node_modules/rc-notification/es/hooks/useStack.js
var DEFAULT_OFFSET = 8;
var DEFAULT_THRESHOLD = 3;
var DEFAULT_GAP = 16;
var useStack = function useStack(config) {
var result = {
offset: DEFAULT_OFFSET,
threshold: DEFAULT_THRESHOLD,
gap: DEFAULT_GAP
};
if (config && (0,esm_typeof["default"])(config) === 'object') {
var _config$offset, _config$threshold, _config$gap;
result.offset = (_config$offset = config.offset) !== null && _config$offset !== void 0 ? _config$offset : DEFAULT_OFFSET;
result.threshold = (_config$threshold = config.threshold) !== null && _config$threshold !== void 0 ? _config$threshold : DEFAULT_THRESHOLD;
result.gap = (_config$gap = config.gap) !== null && _config$gap !== void 0 ? _config$gap : DEFAULT_GAP;
}
return [!!config, result];
};
/* harmony default export */ var hooks_useStack = (useStack);
;// ./node_modules/rc-notification/es/NoticeList.js
var _excluded = ["className", "style", "classNames", "styles"];
var NoticeList = function NoticeList(props) {
var configList = props.configList,
placement = props.placement,
prefixCls = props.prefixCls,
className = props.className,
style = props.style,
motion = props.motion,
onAllNoticeRemoved = props.onAllNoticeRemoved,
onNoticeClose = props.onNoticeClose,
stackConfig = props.stack;
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NotificationContext),
ctxCls = _useContext.classNames;
var dictRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
latestNotice = _useState2[0],
setLatestNotice = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
hoverKeys = _useState4[0],
setHoverKeys = _useState4[1];
var keys = configList.map(function (config) {
return {
config: config,
key: String(config.key)
};
});
var _useStack = hooks_useStack(stackConfig),
_useStack2 = (0,slicedToArray["default"])(_useStack, 2),
stack = _useStack2[0],
_useStack2$ = _useStack2[1],
offset = _useStack2$.offset,
threshold = _useStack2$.threshold,
gap = _useStack2$.gap;
var expanded = stack && (hoverKeys.length > 0 || keys.length <= threshold);
var placementMotion = typeof motion === 'function' ? motion(placement) : motion;
// Clean hover key
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (stack && hoverKeys.length > 1) {
setHoverKeys(function (prev) {
return prev.filter(function (key) {
return keys.some(function (_ref) {
var dataKey = _ref.key;
return key === dataKey;
});
});
});
}
}, [hoverKeys, keys, stack]);
// Force update latest notice
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var _keys;
if (stack && dictRef.current[(_keys = keys[keys.length - 1]) === null || _keys === void 0 ? void 0 : _keys.key]) {
var _keys2;
setLatestNotice(dictRef.current[(_keys2 = keys[keys.length - 1]) === null || _keys2 === void 0 ? void 0 : _keys2.key]);
}
}, [keys, stack]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es.CSSMotionList, (0,esm_extends["default"])({
key: placement,
className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), ctxCls === null || ctxCls === void 0 ? void 0 : ctxCls.list, className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-stack"), !!stack), "".concat(prefixCls, "-stack-expanded"), expanded)),
style: style,
keys: keys,
motionAppear: true
}, placementMotion, {
onAllRemoved: function onAllRemoved() {
onAllNoticeRemoved(placement);
}
}), function (_ref2, nodeRef) {
var config = _ref2.config,
motionClassName = _ref2.className,
motionStyle = _ref2.style,
motionIndex = _ref2.index;
var _ref3 = config,
key = _ref3.key,
times = _ref3.times;
var strKey = String(key);
var _ref4 = config,
configClassName = _ref4.className,
configStyle = _ref4.style,
configClassNames = _ref4.classNames,
configStyles = _ref4.styles,
restConfig = (0,objectWithoutProperties["default"])(_ref4, _excluded);
var dataIndex = keys.findIndex(function (item) {
return item.key === strKey;
});
// If dataIndex is -1, that means this notice has been removed in data, but still in dom
// Should minus (motionIndex - 1) to get the correct index because keys.length is not the same as dom length
var stackStyle = {};
if (stack) {
var index = keys.length - 1 - (dataIndex > -1 ? dataIndex : motionIndex - 1);
var transformX = placement === 'top' || placement === 'bottom' ? '-50%' : '0';
if (index > 0) {
var _dictRef$current$strK, _dictRef$current$strK2, _dictRef$current$strK3;
stackStyle.height = expanded ? (_dictRef$current$strK = dictRef.current[strKey]) === null || _dictRef$current$strK === void 0 ? void 0 : _dictRef$current$strK.offsetHeight : latestNotice === null || latestNotice === void 0 ? void 0 : latestNotice.offsetHeight;
// Transform
var verticalOffset = 0;
for (var i = 0; i < index; i++) {
var _dictRef$current$keys;
verticalOffset += ((_dictRef$current$keys = dictRef.current[keys[keys.length - 1 - i].key]) === null || _dictRef$current$keys === void 0 ? void 0 : _dictRef$current$keys.offsetHeight) + gap;
}
var transformY = (expanded ? verticalOffset : index * offset) * (placement.startsWith('top') ? 1 : -1);
var scaleX = !expanded && latestNotice !== null && latestNotice !== void 0 && latestNotice.offsetWidth && (_dictRef$current$strK2 = dictRef.current[strKey]) !== null && _dictRef$current$strK2 !== void 0 && _dictRef$current$strK2.offsetWidth ? ((latestNotice === null || latestNotice === void 0 ? void 0 : latestNotice.offsetWidth) - offset * 2 * (index < 3 ? index : 3)) / ((_dictRef$current$strK3 = dictRef.current[strKey]) === null || _dictRef$current$strK3 === void 0 ? void 0 : _dictRef$current$strK3.offsetWidth) : 1;
stackStyle.transform = "translate3d(".concat(transformX, ", ").concat(transformY, "px, 0) scaleX(").concat(scaleX, ")");
} else {
stackStyle.transform = "translate3d(".concat(transformX, ", 0, 0)");
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: nodeRef,
className: classnames_default()("".concat(prefixCls, "-notice-wrapper"), motionClassName, configClassNames === null || configClassNames === void 0 ? void 0 : configClassNames.wrapper),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), stackStyle), configStyles === null || configStyles === void 0 ? void 0 : configStyles.wrapper),
onMouseEnter: function onMouseEnter() {
return setHoverKeys(function (prev) {
return prev.includes(strKey) ? prev : [].concat((0,toConsumableArray["default"])(prev), [strKey]);
});
},
onMouseLeave: function onMouseLeave() {
return setHoverKeys(function (prev) {
return prev.filter(function (k) {
return k !== strKey;
});
});
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Notice, (0,esm_extends["default"])({}, restConfig, {
ref: function ref(node) {
if (dataIndex > -1) {
dictRef.current[strKey] = node;
} else {
delete dictRef.current[strKey];
}
},
prefixCls: prefixCls,
classNames: configClassNames,
styles: configStyles,
className: classnames_default()(configClassName, ctxCls === null || ctxCls === void 0 ? void 0 : ctxCls.notice),
style: configStyle,
times: times,
key: key,
eventKey: key,
onNoticeClose: onNoticeClose,
hovering: stack && hoverKeys.length > 0
})));
});
};
if (true) {
NoticeList.displayName = 'NoticeList';
}
/* harmony default export */ var es_NoticeList = (NoticeList);
;// ./node_modules/rc-notification/es/Notifications.js
// ant-notification ant-notification-topRight
var Notifications = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-notification' : _props$prefixCls,
container = props.container,
motion = props.motion,
maxCount = props.maxCount,
className = props.className,
style = props.style,
onAllRemoved = props.onAllRemoved,
stack = props.stack,
renderNotifications = props.renderNotifications;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
configList = _React$useState2[0],
setConfigList = _React$useState2[1];
// ======================== Close =========================
var onNoticeClose = function onNoticeClose(key) {
var _config$onClose;
// Trigger close event
var config = configList.find(function (item) {
return item.key === key;
});
config === null || config === void 0 || (_config$onClose = config.onClose) === null || _config$onClose === void 0 || _config$onClose.call(config);
setConfigList(function (list) {
return list.filter(function (item) {
return item.key !== key;
});
});
};
// ========================= Refs =========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
open: function open(config) {
setConfigList(function (list) {
var clone = (0,toConsumableArray["default"])(list);
// Replace if exist
var index = clone.findIndex(function (item) {
return item.key === config.key;
});
var innerConfig = (0,objectSpread2["default"])({}, config);
if (index >= 0) {
var _list$index;
innerConfig.times = (((_list$index = list[index]) === null || _list$index === void 0 ? void 0 : _list$index.times) || 0) + 1;
clone[index] = innerConfig;
} else {
innerConfig.times = 0;
clone.push(innerConfig);
}
if (maxCount > 0 && clone.length > maxCount) {
clone = clone.slice(-maxCount);
}
return clone;
});
},
close: function close(key) {
onNoticeClose(key);
},
destroy: function destroy() {
setConfigList([]);
}
};
});
// ====================== Placements ======================
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
placements = _React$useState4[0],
setPlacements = _React$useState4[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var nextPlacements = {};
configList.forEach(function (config) {
var _config$placement = config.placement,
placement = _config$placement === void 0 ? 'topRight' : _config$placement;
if (placement) {
nextPlacements[placement] = nextPlacements[placement] || [];
nextPlacements[placement].push(config);
}
});
// Fill exist placements to avoid empty list causing remove without motion
Object.keys(placements).forEach(function (placement) {
nextPlacements[placement] = nextPlacements[placement] || [];
});
setPlacements(nextPlacements);
}, [configList]);
// Clean up container if all notices fade out
var onAllNoticeRemoved = function onAllNoticeRemoved(placement) {
setPlacements(function (originPlacements) {
var clone = (0,objectSpread2["default"])({}, originPlacements);
var list = clone[placement] || [];
if (!list.length) {
delete clone[placement];
}
return clone;
});
};
// Effect tell that placements is empty now
var emptyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (Object.keys(placements).length > 0) {
emptyRef.current = true;
} else if (emptyRef.current) {
// Trigger only when from exist to empty
onAllRemoved === null || onAllRemoved === void 0 || onAllRemoved();
emptyRef.current = false;
}
}, [placements]);
// ======================== Render ========================
if (!container) {
return null;
}
var placementList = Object.keys(placements);
return /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, placementList.map(function (placement) {
var placementConfigList = placements[placement];
var list = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_NoticeList, {
key: placement,
configList: placementConfigList,
placement: placement,
prefixCls: prefixCls,
className: className === null || className === void 0 ? void 0 : className(placement),
style: style === null || style === void 0 ? void 0 : style(placement),
motion: motion,
onNoticeClose: onNoticeClose,
onAllNoticeRemoved: onAllNoticeRemoved,
stack: stack
});
return renderNotifications ? renderNotifications(list, {
prefixCls: prefixCls,
key: placement
}) : list;
})), container);
});
if (true) {
Notifications.displayName = 'Notifications';
}
/* harmony default export */ var es_Notifications = (Notifications);
;// ./node_modules/rc-notification/es/hooks/useNotification.js
var useNotification_excluded = ["getContainer", "motion", "prefixCls", "maxCount", "className", "style", "onAllRemoved", "stack", "renderNotifications"];
var defaultGetContainer = function defaultGetContainer() {
return document.body;
};
var uniqueKey = 0;
function mergeConfig() {
var clone = {};
for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {
objList[_key] = arguments[_key];
}
objList.forEach(function (obj) {
if (obj) {
Object.keys(obj).forEach(function (key) {
var val = obj[key];
if (val !== undefined) {
clone[key] = val;
}
});
}
});
return clone;
}
function useNotification() {
var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _rootConfig$getContai = rootConfig.getContainer,
getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai,
motion = rootConfig.motion,
prefixCls = rootConfig.prefixCls,
maxCount = rootConfig.maxCount,
className = rootConfig.className,
style = rootConfig.style,
onAllRemoved = rootConfig.onAllRemoved,
stack = rootConfig.stack,
renderNotifications = rootConfig.renderNotifications,
shareConfig = (0,objectWithoutProperties["default"])(rootConfig, useNotification_excluded);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
container = _React$useState2[0],
setContainer = _React$useState2[1];
var notificationsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var contextHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Notifications, {
container: container,
ref: notificationsRef,
prefixCls: prefixCls,
motion: motion,
maxCount: maxCount,
className: className,
style: style,
onAllRemoved: onAllRemoved,
stack: stack,
renderNotifications: renderNotifications
});
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
taskQueue = _React$useState4[0],
setTaskQueue = _React$useState4[1];
// ========================= Refs =========================
var api = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
open: function open(config) {
var mergedConfig = mergeConfig(shareConfig, config);
if (mergedConfig.key === null || mergedConfig.key === undefined) {
mergedConfig.key = "rc-notification-".concat(uniqueKey);
uniqueKey += 1;
}
setTaskQueue(function (queue) {
return [].concat((0,toConsumableArray["default"])(queue), [{
type: 'open',
config: mergedConfig
}]);
});
},
close: function close(key) {
setTaskQueue(function (queue) {
return [].concat((0,toConsumableArray["default"])(queue), [{
type: 'close',
key: key
}]);
});
},
destroy: function destroy() {
setTaskQueue(function (queue) {
return [].concat((0,toConsumableArray["default"])(queue), [{
type: 'destroy'
}]);
});
}
};
}, []);
// ======================= Container ======================
// React 18 should all in effect that we will check container in each render
// Which means getContainer should be stable.
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setContainer(getContainer());
});
// ======================== Effect ========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
// Flush task when node ready
if (notificationsRef.current && taskQueue.length) {
taskQueue.forEach(function (task) {
switch (task.type) {
case 'open':
notificationsRef.current.open(task.config);
break;
case 'close':
notificationsRef.current.close(task.key);
break;
case 'destroy':
notificationsRef.current.destroy();
break;
}
});
// https://github.com/ant-design/ant-design/issues/52590
// React `startTransition` will run once `useEffect` but many times `setState`,
// So `setTaskQueue` with filtered array will cause infinite loop.
// We cache the first match queue instead.
var oriTaskQueue;
var tgtTaskQueue;
// React 17 will mix order of effect & setState in async
// - open: setState[0]
// - effect[0]
// - open: setState[1]
// - effect setState([]) * here will clean up [0, 1] in React 17
setTaskQueue(function (oriQueue) {
if (oriTaskQueue !== oriQueue || !tgtTaskQueue) {
oriTaskQueue = oriQueue;
tgtTaskQueue = oriQueue.filter(function (task) {
return !taskQueue.includes(task);
});
}
return tgtTaskQueue;
});
}
}, [taskQueue]);
// ======================== Return ========================
return [api, contextHolder];
}
;// ./node_modules/rc-notification/es/index.js
;// ./node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js
// This icon file is generated automatically.
var LoadingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
/* harmony default export */ var asn_LoadingOutlined = (LoadingOutlined);
;// ./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var LoadingOutlined_LoadingOutlined = function LoadingOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_LoadingOutlined
}));
};
/** */
var LoadingOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(LoadingOutlined_LoadingOutlined);
if (true) {
LoadingOutlined_RefIcon.displayName = 'LoadingOutlined';
}
/* harmony default export */ var icons_LoadingOutlined = (LoadingOutlined_RefIcon);
// EXTERNAL MODULE: ./components/message/style/index.ts
var style = __webpack_require__("./components/message/style/index.ts");
;// ./components/message/PurePanel.tsx
var PurePanel_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;
};
const TypeIcon = {
info: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_InfoCircleFilled, null),
success: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null),
error: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null),
warning: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
loading: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null)
};
const PureContent = _ref => {
let {
prefixCls,
type,
icon,
children
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-custom-content`, `${prefixCls}-${type}`)
}, icon || TypeIcon[type], /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children));
};
/** @private Internal Component. Do not use in your production. */
const PurePanel = props => {
const {
prefixCls: staticPrefixCls,
className,
type,
icon,
content
} = props,
restProps = PurePanel_rest(props, ["prefixCls", "className", "type", "icon", "content"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = staticPrefixCls || getPrefixCls('message');
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,style["default"])(prefixCls, rootCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Notice, Object.assign({}, restProps, {
prefixCls: prefixCls,
className: classnames_default()(className, hashId, `${prefixCls}-notice-pure-panel`, cssVarCls, rootCls),
eventKey: "pure",
duration: null,
content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureContent, {
prefixCls: prefixCls,
type: type,
icon: icon
}, content)
})));
};
/* harmony default export */ var message_PurePanel = (PurePanel);
;// ./components/message/util.ts
function getMotion(prefixCls, transitionName) {
return {
motionName: transitionName !== null && transitionName !== void 0 ? transitionName : `${prefixCls}-move-up`
};
}
/** Wrap message open with promise like function */
function wrapPromiseFn(openFn) {
let closeFn;
const closePromise = new Promise(resolve => {
closeFn = openFn(() => {
resolve(true);
});
});
const result = () => {
closeFn === null || closeFn === void 0 ? void 0 : closeFn();
};
result.then = (filled, rejected) => closePromise.then(filled, rejected);
result.promise = closePromise;
return result;
}
;// ./components/message/useMessage.tsx
var useMessage_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;
};
const useMessage_DEFAULT_OFFSET = 8;
const DEFAULT_DURATION = 3;
const Wrapper = _ref => {
let {
children,
prefixCls
} = _ref;
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,style["default"])(prefixCls, rootCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_NotificationProvider, {
classNames: {
list: classnames_default()(hashId, cssVarCls, rootCls)
}
}, children));
};
const renderNotifications = (node, _ref2) => {
let {
prefixCls,
key
} = _ref2;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Wrapper, {
prefixCls: prefixCls,
key: key
}, node);
};
const Holder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
top,
prefixCls: staticPrefixCls,
getContainer: staticGetContainer,
maxCount,
duration = DEFAULT_DURATION,
rtl,
transitionName,
onAllRemoved
} = props;
const {
getPrefixCls,
getPopupContainer,
message,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = staticPrefixCls || getPrefixCls('message');
// =============================== Style ===============================
const getStyle = () => ({
left: '50%',
transform: 'translateX(-50%)',
top: top !== null && top !== void 0 ? top : useMessage_DEFAULT_OFFSET
});
const getClassName = () => classnames_default()({
[`${prefixCls}-rtl`]: rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl'
});
// ============================== Motion ===============================
const getNotificationMotion = () => getMotion(prefixCls, transitionName);
// ============================ Close Icon =============================
const mergedCloseIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-close-x`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
className: `${prefixCls}-close-icon`
}));
// ============================== Origin ===============================
const [api, holder] = useNotification({
prefixCls,
style: getStyle,
className: getClassName,
motion: getNotificationMotion,
closable: false,
closeIcon: mergedCloseIcon,
duration,
getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,
maxCount,
onAllRemoved,
renderNotifications
});
// ================================ Ref ================================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {
prefixCls,
message
}));
return holder;
});
// ==============================================================================
// == Hook ==
// ==============================================================================
let keyIndex = 0;
function useInternalMessage(messageConfig) {
const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const warning = (0,_util_warning.devUseWarning)('Message');
// ================================ API ================================
const wrapAPI = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
// Wrap with notification content
// >>> close
const close = key => {
var _a;
(_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);
};
// >>> Open
const open = config => {
if (!holderRef.current) {
true ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : 0;
const fakeResult = () => {};
fakeResult.then = () => {};
return fakeResult;
}
const {
open: originOpen,
prefixCls,
message
} = holderRef.current;
const noticePrefixCls = `${prefixCls}-notice`;
const {
content,
icon,
type,
key,
className,
style,
onClose
} = config,
restConfig = useMessage_rest(config, ["content", "icon", "type", "key", "className", "style", "onClose"]);
let mergedKey = key;
if (mergedKey === undefined || mergedKey === null) {
keyIndex += 1;
mergedKey = `antd-message-${keyIndex}`;
}
return wrapPromiseFn(resolve => {
originOpen(Object.assign(Object.assign({}, restConfig), {
key: mergedKey,
content: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureContent, {
prefixCls: prefixCls,
type: type,
icon: icon
}, content)),
placement: 'top',
className: classnames_default()(type && `${noticePrefixCls}-${type}`, className, message === null || message === void 0 ? void 0 : message.className),
style: Object.assign(Object.assign({}, message === null || message === void 0 ? void 0 : message.style), style),
onClose: () => {
onClose === null || onClose === void 0 ? void 0 : onClose();
resolve();
}
}));
// Return close function
return () => {
close(mergedKey);
};
});
};
// >>> destroy
const destroy = key => {
var _a;
if (key !== undefined) {
close(key);
} else {
(_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
}
};
const clone = {
open,
destroy
};
const keys = ['info', 'success', 'warning', 'error', 'loading'];
keys.forEach(type => {
const typeOpen = (jointContent, duration, onClose) => {
let config;
if (jointContent && typeof jointContent === 'object' && 'content' in jointContent) {
config = jointContent;
} else {
config = {
content: jointContent
};
}
// Params
let mergedDuration;
let mergedOnClose;
if (typeof duration === 'function') {
mergedOnClose = duration;
} else {
mergedDuration = duration;
mergedOnClose = onClose;
}
const mergedConfig = Object.assign(Object.assign({
onClose: mergedOnClose,
duration: mergedDuration
}, config), {
type
});
return open(mergedConfig);
};
clone[type] = typeOpen;
});
return clone;
}, []);
// ============================== Return ===============================
return [wrapAPI, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Holder, Object.assign({
key: "message-holder"
}, messageConfig, {
ref: holderRef
}))];
}
function useMessage(messageConfig) {
return useInternalMessage(messageConfig);
}
;// ./components/_util/hooks/usePatchElement.ts
function usePatchElement() {
const [elements, setElements] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
const patchElement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(element => {
// append a new element to elements (and create a new ref)
setElements(originElements => [].concat((0,toConsumableArray["default"])(originElements), [element]));
// return a function that removes the new element out of elements (and create a new ref)
// it works a little like useEffect
return () => {
setElements(originElements => originElements.filter(ele => ele !== element));
};
}, []);
return [elements, patchElement];
}
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/Context.js
var Context = __webpack_require__("./node_modules/@ant-design/icons/es/components/Context.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js
var useMemo = __webpack_require__("./node_modules/rc-util/es/hooks/useMemo.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/utils/set.js
var set = __webpack_require__("./node_modules/rc-util/es/utils/set.js");
;// ./components/form/validateMessagesContext.tsx
// ZombieJ: We export single file here since
// ConfigProvider use this which will make loop deps
// to import whole `rc-field-form`
/* harmony default export */ var validateMessagesContext = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(undefined));
// EXTERNAL MODULE: ./components/locale/en_US.ts
var en_US = __webpack_require__("./components/locale/en_US.ts");
;// ./components/modal/locale.ts
let runtimeLocale = Object.assign({}, en_US["default"].Modal);
let localeList = [];
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), en_US["default"].Modal);
function changeConfirmLocale(newLocale) {
if (newLocale) {
const cloneLocale = Object.assign({}, newLocale);
localeList.push(cloneLocale);
runtimeLocale = generateLocale();
return () => {
localeList = localeList.filter(locale => locale !== cloneLocale);
runtimeLocale = generateLocale();
};
}
runtimeLocale = Object.assign({}, en_US["default"].Modal);
}
function getConfirmLocale() {
return runtimeLocale;
}
// EXTERNAL MODULE: ./components/locale/context.ts
var locale_context = __webpack_require__("./components/locale/context.ts");
;// ./components/locale/index.tsx
const ANT_MARK = 'internalMark';
const LocaleProvider = props => {
const {
locale = {},
children,
_ANT_MARK__
} = props;
if (true) {
const warning = (0,_util_warning.devUseWarning)('LocaleProvider');
true ? warning(_ANT_MARK__ === ANT_MARK, 'deprecated', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale') : 0;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const clearLocale = changeConfirmLocale(locale === null || locale === void 0 ? void 0 : locale.Modal);
return clearLocale;
}, [locale]);
const getMemoizedContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, locale), {
exist: true
}), [locale]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(locale_context["default"].Provider, {
value: getMemoizedContextValue
}, children);
};
if (true) {
LocaleProvider.displayName = 'LocaleProvider';
}
/* harmony default export */ var components_locale = (LocaleProvider);
// EXTERNAL MODULE: ./components/theme/themes/default/theme.ts
var default_theme = __webpack_require__("./components/theme/themes/default/theme.ts");
// EXTERNAL MODULE: ./components/theme/context.ts
var context = __webpack_require__("./components/theme/context.ts");
// EXTERNAL MODULE: ./components/theme/themes/seed.ts
var seed = __webpack_require__("./components/theme/themes/seed.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 3 modules
var colors_es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var fast_color_es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
;// ./components/config-provider/cssVariables.ts
const dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;
function getStyle(globalPrefixCls, theme) {
const variables = {};
const formatColor = (color, updater) => {
let clone = color.clone();
clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;
return clone.toRgbString();
};
const fillColor = (colorVal, type) => {
const baseColor = new fast_color_es.FastColor(colorVal);
const colorPalettes = (0,colors_es.generate)(baseColor.toRgbString());
variables[`${type}-color`] = formatColor(baseColor);
variables[`${type}-color-disabled`] = colorPalettes[1];
variables[`${type}-color-hover`] = colorPalettes[4];
variables[`${type}-color-active`] = colorPalettes[6];
variables[`${type}-color-outline`] = baseColor.clone().setA(0.2).toRgbString();
variables[`${type}-color-deprecated-bg`] = colorPalettes[0];
variables[`${type}-color-deprecated-border`] = colorPalettes[2];
};
// ================ Primary Color ================
if (theme.primaryColor) {
fillColor(theme.primaryColor, 'primary');
const primaryColor = new fast_color_es.FastColor(theme.primaryColor);
const primaryColors = (0,colors_es.generate)(primaryColor.toRgbString());
// Legacy - We should use semantic naming standard
primaryColors.forEach((color, index) => {
variables[`primary-${index + 1}`] = color;
});
// Deprecated
variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));
variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));
variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));
variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));
variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setA(c.a * 0.12));
const primaryActiveColor = new fast_color_es.FastColor(primaryColors[0]);
variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setA(c.a * 0.3));
variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));
}
// ================ Success Color ================
if (theme.successColor) {
fillColor(theme.successColor, 'success');
}
// ================ Warning Color ================
if (theme.warningColor) {
fillColor(theme.warningColor, 'warning');
}
// ================= Error Color =================
if (theme.errorColor) {
fillColor(theme.errorColor, 'error');
}
// ================= Info Color ==================
if (theme.infoColor) {
fillColor(theme.infoColor, 'info');
}
// Convert to css variables
const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);
return `
:root {
${cssList.join('\n')}
}
`.trim();
}
function registerTheme(globalPrefixCls, theme) {
const style = getStyle(globalPrefixCls, theme);
if ((0,canUseDom["default"])()) {
(0,dynamicCSS.updateCSS)(style, `${dynamicStyleMark}-dynamic-theme`);
} else {
true ? (0,_util_warning["default"])(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : 0;
}
}
;// ./components/config-provider/DisabledContext.tsx
const DisabledContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(false);
const DisabledContextProvider = _ref => {
let {
children,
disabled
} = _ref;
const originDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(DisabledContext);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DisabledContext.Provider, {
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
}, children);
};
/* harmony default export */ var config_provider_DisabledContext = (DisabledContext);
// EXTERNAL MODULE: ./components/config-provider/SizeContext.tsx
var SizeContext = __webpack_require__("./components/config-provider/SizeContext.tsx");
;// ./components/config-provider/hooks/useConfig.ts
function useConfig() {
const componentDisabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_DisabledContext);
const componentSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(SizeContext["default"]);
return {
componentDisabled,
componentSize
};
}
/* harmony default export */ var hooks_useConfig = (useConfig);
// EXTERNAL MODULE: ./node_modules/rc-util/es/isEqual.js
var isEqual = __webpack_require__("./node_modules/rc-util/es/isEqual.js");
;// ./components/config-provider/hooks/useThemeKey.ts
const fullClone = Object.assign({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
const {
useId
} = fullClone;
const useEmptyId = () => '';
const useThemeKey = typeof useId === 'undefined' ? useEmptyId : useId;
/* harmony default export */ var hooks_useThemeKey = (useThemeKey);
;// ./components/config-provider/hooks/useTheme.ts
function useTheme(theme, parentTheme, config) {
var _a, _b;
const warning = (0,_util_warning.devUseWarning)('ConfigProvider');
const themeConfig = theme || {};
const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? Object.assign(Object.assign({}, context.defaultConfig), {
hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : context.defaultConfig.hashed,
cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar
}) : parentTheme;
const themeKey = hooks_useThemeKey();
if (true) {
const cssVarEnabled = themeConfig.cssVar || parentThemeConfig.cssVar;
const validKey = !!(typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || themeKey);
true ? warning(!cssVarEnabled || validKey, 'breaking', 'Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.') : 0;
}
return (0,useMemo["default"])(() => {
var _a, _b;
if (!theme) {
return parentTheme;
}
// Override
const mergedComponents = Object.assign({}, parentThemeConfig.components);
Object.keys(theme.components || {}).forEach(componentName => {
mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);
});
const cssVarKey = `css-var-${themeKey.replace(/:/g, '')}`;
const mergedCssVar = ((_a = themeConfig.cssVar) !== null && _a !== void 0 ? _a : parentThemeConfig.cssVar) && Object.assign(Object.assign(Object.assign({
prefix: config === null || config === void 0 ? void 0 : config.prefixCls
}, typeof parentThemeConfig.cssVar === 'object' ? parentThemeConfig.cssVar : {}), typeof themeConfig.cssVar === 'object' ? themeConfig.cssVar : {}), {
key: typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || cssVarKey
});
// Base token
return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {
token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),
components: mergedComponents,
cssVar: mergedCssVar
});
}, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {
const nextTheme = next[index];
return !(0,isEqual["default"])(prevTheme, nextTheme, true);
}));
}
;// ./components/config-provider/MotionWrapper.tsx
function MotionWrapper(props) {
const {
children
} = props;
const [, token] = (0,useToken["default"])();
const {
motion
} = token;
const needWrapMotionProviderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
needWrapMotionProviderRef.current = needWrapMotionProviderRef.current || motion === false;
if (needWrapMotionProviderRef.current) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es.Provider, {
motion: motion
}, children);
}
return children;
}
;// ./components/config-provider/PropWarning.tsx
/**
* Warning for ConfigProviderProps.
* This will be empty function in production.
*/
const PropWarning = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(_ref => {
let {
dropdownMatchSelectWidth
} = _ref;
const warning = (0,_util_warning.devUseWarning)('ConfigProvider');
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
return null;
});
if (true) {
PropWarning.displayName = 'PropWarning';
}
/* harmony default export */ var config_provider_PropWarning = ( true ? PropWarning : 0);
// EXTERNAL MODULE: ./components/theme/util/useResetIconStyle.ts
var useResetIconStyle = __webpack_require__("./components/theme/util/useResetIconStyle.ts");
;// ./components/config-provider/index.tsx
var config_provider_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;
};
/**
* Since too many feedback using static method like `Modal.confirm` not getting theme, we record the
* theme register info here to help developer get warning info.
*/
let existThemeConfig = false;
const warnContext = true ? componentName => {
true ? (0,_util_warning["default"])(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) : 0;
} : /* istanbul ignore next */
0;
const configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale'];
// These props is used by `useContext` directly in sub component
const PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];
let globalPrefixCls;
let globalIconPrefixCls;
let globalTheme;
let globalHolderRender;
function getGlobalPrefixCls() {
return globalPrefixCls || config_provider_context.defaultPrefixCls;
}
function getGlobalIconPrefixCls() {
return globalIconPrefixCls || config_provider_context.defaultIconPrefixCls;
}
function isLegacyTheme(theme) {
return Object.keys(theme).some(key => key.endsWith('Color'));
}
const setGlobalConfig = props => {
const {
prefixCls,
iconPrefixCls,
theme,
holderRender
} = props;
if (prefixCls !== undefined) {
globalPrefixCls = prefixCls;
}
if (iconPrefixCls !== undefined) {
globalIconPrefixCls = iconPrefixCls;
}
if ('holderRender' in props) {
globalHolderRender = holderRender;
}
if (theme) {
if (isLegacyTheme(theme)) {
true ? (0,_util_warning["default"])(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : 0;
registerTheme(getGlobalPrefixCls(), theme);
} else {
globalTheme = theme;
}
}
};
const globalConfig = () => ({
getPrefixCls: (suffixCls, customizePrefixCls) => {
if (customizePrefixCls) {
return customizePrefixCls;
}
return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();
},
getIconPrefixCls: getGlobalIconPrefixCls,
getRootPrefixCls: () => {
// If Global prefixCls provided, use this
if (globalPrefixCls) {
return globalPrefixCls;
}
// Fallback to default prefixCls
return getGlobalPrefixCls();
},
getTheme: () => globalTheme,
holderRender: globalHolderRender
});
const ProviderChildren = props => {
const {
children,
csp: customCsp,
autoInsertSpaceInButton,
alert,
anchor,
form,
locale,
componentSize,
direction,
space,
splitter,
virtual,
dropdownMatchSelectWidth,
popupMatchSelectWidth,
popupOverflow,
legacyLocale,
parentContext,
iconPrefixCls: customIconPrefixCls,
theme,
componentDisabled,
segmented,
statistic,
spin,
calendar,
carousel,
cascader,
collapse,
typography,
checkbox,
descriptions,
divider,
drawer,
skeleton,
steps,
image,
layout,
list,
mentions,
modal,
progress,
result,
slider,
breadcrumb,
menu,
pagination,
input,
textArea,
empty,
badge,
radio,
rate,
switch: SWITCH,
transfer,
avatar,
message,
tag,
table,
card,
tabs,
timeline,
timePicker,
upload,
notification,
tree,
colorPicker,
datePicker,
rangePicker,
flex,
wave,
dropdown,
warning: warningConfig,
tour,
tooltip,
popover,
popconfirm,
floatButtonGroup,
variant,
inputNumber,
treeSelect
} = props;
// =================================== Context ===================================
const getPrefixCls = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((suffixCls, customizePrefixCls) => {
const {
prefixCls
} = props;
if (customizePrefixCls) {
return customizePrefixCls;
}
const mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');
return suffixCls ? `${mergedPrefixCls}-${suffixCls}` : mergedPrefixCls;
}, [parentContext.getPrefixCls, props.prefixCls]);
const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || config_provider_context.defaultIconPrefixCls;
const csp = customCsp || parentContext.csp;
(0,useResetIconStyle["default"])(iconPrefixCls, csp);
const mergedTheme = useTheme(theme, parentContext.theme, {
prefixCls: getPrefixCls('')
});
if (true) {
existThemeConfig = existThemeConfig || !!mergedTheme;
}
const baseConfig = {
csp,
autoInsertSpaceInButton,
alert,
anchor,
locale: locale || legacyLocale,
direction,
space,
splitter,
virtual,
popupMatchSelectWidth: popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth,
popupOverflow,
getPrefixCls,
iconPrefixCls,
theme: mergedTheme,
segmented,
statistic,
spin,
calendar,
carousel,
cascader,
collapse,
typography,
checkbox,
descriptions,
divider,
drawer,
skeleton,
steps,
image,
input,
textArea,
layout,
list,
mentions,
modal,
progress,
result,
slider,
breadcrumb,
menu,
pagination,
empty,
badge,
radio,
rate,
switch: SWITCH,
transfer,
avatar,
message,
tag,
table,
card,
tabs,
timeline,
timePicker,
upload,
notification,
tree,
colorPicker,
datePicker,
rangePicker,
flex,
wave,
dropdown,
warning: warningConfig,
tour,
tooltip,
popover,
popconfirm,
floatButtonGroup,
variant,
inputNumber,
treeSelect
};
if (true) {
const warningFn = (0,_util_warning.devUseWarning)('ConfigProvider');
warningFn(!('autoInsertSpaceInButton' in props), 'deprecated', '`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.');
}
const config = Object.assign({}, parentContext);
Object.keys(baseConfig).forEach(key => {
if (baseConfig[key] !== undefined) {
config[key] = baseConfig[key];
}
});
// Pass the props used by `useContext` directly with child component.
// These props should merged into `config`.
PASSED_PROPS.forEach(propName => {
const propValue = props[propName];
if (propValue) {
config[propName] = propValue;
}
});
if (typeof autoInsertSpaceInButton !== 'undefined') {
// merge deprecated api
config.button = Object.assign({
autoInsertSpace: autoInsertSpaceInButton
}, config.button);
}
// https://github.com/ant-design/ant-design/issues/27617
const memoedConfig = (0,useMemo["default"])(() => config, config, (prevConfig, currentConfig) => {
const prevKeys = Object.keys(prevConfig);
const currentKeys = Object.keys(currentConfig);
return prevKeys.length !== currentKeys.length || prevKeys.some(key => prevConfig[key] !== currentConfig[key]);
});
const {
layer
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(cssinjs.StyleContext);
const memoIconContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
prefixCls: iconPrefixCls,
csp,
layer: layer ? 'antd' : undefined
}), [iconPrefixCls, csp, layer]);
let childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider_PropWarning, {
dropdownMatchSelectWidth: dropdownMatchSelectWidth
}), children);
const validateMessages = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b, _c, _d;
return (0,set.merge)(((_a = en_US["default"].Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});
}, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);
if (Object.keys(validateMessages).length > 0) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(validateMessagesContext.Provider, {
value: validateMessages
}, childNode);
}
if (locale) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_locale, {
locale: locale,
_ANT_MARK__: ANT_MARK
}, childNode);
}
if (iconPrefixCls || csp) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Context["default"].Provider, {
value: memoIconContextValue
}, childNode);
}
if (componentSize) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SizeContext.SizeContextProvider, {
size: componentSize
}, childNode);
}
// =================================== Motion ===================================
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MotionWrapper, null, childNode);
// ================================ Dynamic theme ================================
const memoTheme = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const _a = mergedTheme || {},
{
algorithm,
token,
components,
cssVar
} = _a,
rest = config_provider_rest(_a, ["algorithm", "token", "components", "cssVar"]);
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? (0,cssinjs.createTheme)(algorithm) : default_theme["default"];
const parsedComponents = {};
Object.entries(components || {}).forEach(_ref => {
let [componentName, componentToken] = _ref;
const parsedToken = Object.assign({}, componentToken);
if ('algorithm' in parsedToken) {
if (parsedToken.algorithm === true) {
parsedToken.theme = themeObj;
} else if (Array.isArray(parsedToken.algorithm) || typeof parsedToken.algorithm === 'function') {
parsedToken.theme = (0,cssinjs.createTheme)(parsedToken.algorithm);
}
delete parsedToken.algorithm;
}
parsedComponents[componentName] = parsedToken;
});
const mergedToken = Object.assign(Object.assign({}, seed["default"]), token);
return Object.assign(Object.assign({}, rest), {
theme: themeObj,
token: mergedToken,
components: parsedComponents,
override: Object.assign({
override: mergedToken
}, parsedComponents),
cssVar: cssVar
});
}, [mergedTheme]);
if (theme) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context.DesignTokenContext.Provider, {
value: memoTheme
}, childNode);
}
// ================================== Warning ===================================
if (memoedConfig.warning) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_warning.WarningContext.Provider, {
value: memoedConfig.warning
}, childNode);
}
// =================================== Render ===================================
if (componentDisabled !== undefined) {
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DisabledContextProvider, {
disabled: componentDisabled
}, childNode);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider_context.ConfigContext.Provider, {
value: memoedConfig
}, childNode);
};
const ConfigProvider = props => {
const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const antLocale = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(locale_context["default"]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ProviderChildren, Object.assign({
parentContext: context,
legacyLocale: antLocale
}, props));
};
ConfigProvider.ConfigContext = config_provider_context.ConfigContext;
ConfigProvider.SizeContext = SizeContext["default"];
ConfigProvider.config = setGlobalConfig;
ConfigProvider.useConfig = hooks_useConfig;
Object.defineProperty(ConfigProvider, 'SizeContext', {
get: () => {
true ? (0,_util_warning["default"])(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : 0;
return SizeContext["default"];
}
});
if (true) {
ConfigProvider.displayName = 'ConfigProvider';
}
/* harmony default export */ var config_provider = (ConfigProvider);
;// ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
function _regeneratorRuntime() {
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
_regeneratorRuntime = function _regeneratorRuntime() {
return e;
};
var t,
e = {},
r = Object.prototype,
n = r.hasOwnProperty,
o = Object.defineProperty || function (t, e, r) {
t[e] = r.value;
},
i = "function" == typeof Symbol ? Symbol : {},
a = i.iterator || "@@iterator",
c = i.asyncIterator || "@@asyncIterator",
u = i.toStringTag || "@@toStringTag";
function define(t, e, r) {
return Object.defineProperty(t, e, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}), t[e];
}
try {
define({}, "");
} catch (t) {
define = function define(t, e, r) {
return t[e] = r;
};
}
function wrap(t, e, r, n) {
var i = e && e.prototype instanceof Generator ? e : Generator,
a = Object.create(i.prototype),
c = new Context(n || []);
return o(a, "_invoke", {
value: makeInvokeMethod(t, r, c)
}), a;
}
function tryCatch(t, e, r) {
try {
return {
type: "normal",
arg: t.call(e, r)
};
} catch (t) {
return {
type: "throw",
arg: t
};
}
}
e.wrap = wrap;
var h = "suspendedStart",
l = "suspendedYield",
f = "executing",
s = "completed",
y = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var p = {};
define(p, a, function () {
return this;
});
var d = Object.getPrototypeOf,
v = d && d(d(values([])));
v && v !== r && n.call(v, a) && (p = v);
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
function defineIteratorMethods(t) {
["next", "throw", "return"].forEach(function (e) {
define(t, e, function (t) {
return this._invoke(e, t);
});
});
}
function AsyncIterator(t, e) {
function invoke(r, o, i, a) {
var c = tryCatch(t[r], t, o);
if ("throw" !== c.type) {
var u = c.arg,
h = u.value;
return h && "object" == (0,esm_typeof["default"])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
invoke("next", t, i, a);
}, function (t) {
invoke("throw", t, i, a);
}) : e.resolve(h).then(function (t) {
u.value = t, i(u);
}, function (t) {
return invoke("throw", t, i, a);
});
}
a(c.arg);
}
var r;
o(this, "_invoke", {
value: function value(t, n) {
function callInvokeWithMethodAndArg() {
return new e(function (e, r) {
invoke(t, n, e, r);
});
}
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
});
}
function makeInvokeMethod(e, r, n) {
var o = h;
return function (i, a) {
if (o === f) throw Error("Generator is already running");
if (o === s) {
if ("throw" === i) throw a;
return {
value: t,
done: !0
};
}
for (n.method = i, n.arg = a;;) {
var c = n.delegate;
if (c) {
var u = maybeInvokeDelegate(c, n);
if (u) {
if (u === y) continue;
return u;
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
if (o === h) throw o = s, n.arg;
n.dispatchException(n.arg);
} else "return" === n.method && n.abrupt("return", n.arg);
o = f;
var p = tryCatch(e, r, n);
if ("normal" === p.type) {
if (o = n.done ? s : l, p.arg === y) continue;
return {
value: p.arg,
done: n.done
};
}
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
}
};
}
function maybeInvokeDelegate(e, r) {
var n = r.method,
o = e.iterator[n];
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
var i = tryCatch(o, e.iterator, r.arg);
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
var a = i.arg;
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
}
function pushTryEntry(t) {
var e = {
tryLoc: t[0]
};
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
}
function resetTryEntry(t) {
var e = t.completion || {};
e.type = "normal", delete e.arg, t.completion = e;
}
function Context(t) {
this.tryEntries = [{
tryLoc: "root"
}], t.forEach(pushTryEntry, this), this.reset(!0);
}
function values(e) {
if (e || "" === e) {
var r = e[a];
if (r) return r.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var o = -1,
i = function next() {
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
return next.value = t, next.done = !0, next;
};
return i.next = i;
}
}
throw new TypeError((0,esm_typeof["default"])(e) + " is not iterable");
}
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
value: GeneratorFunctionPrototype,
configurable: !0
}), o(GeneratorFunctionPrototype, "constructor", {
value: GeneratorFunction,
configurable: !0
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
var e = "function" == typeof t && t.constructor;
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
}, e.mark = function (t) {
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
}, e.awrap = function (t) {
return {
__await: t
};
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
return this;
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
void 0 === i && (i = Promise);
var a = new AsyncIterator(wrap(t, r, n, o), i);
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
return t.done ? t.value : a.next();
});
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
return this;
}), define(g, "toString", function () {
return "[object Generator]";
}), e.keys = function (t) {
var e = Object(t),
r = [];
for (var n in e) r.push(n);
return r.reverse(), function next() {
for (; r.length;) {
var t = r.pop();
if (t in e) return next.value = t, next.done = !1, next;
}
return next.done = !0, next;
};
}, e.values = values, Context.prototype = {
constructor: Context,
reset: function reset(e) {
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
},
stop: function stop() {
this.done = !0;
var t = this.tryEntries[0].completion;
if ("throw" === t.type) throw t.arg;
return this.rval;
},
dispatchException: function dispatchException(e) {
if (this.done) throw e;
var r = this;
function handle(n, o) {
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
}
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
var i = this.tryEntries[o],
a = i.completion;
if ("root" === i.tryLoc) return handle("end");
if (i.tryLoc <= this.prev) {
var c = n.call(i, "catchLoc"),
u = n.call(i, "finallyLoc");
if (c && u) {
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
} else if (c) {
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
} else {
if (!u) throw Error("try statement without catch or finally");
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
}
}
}
},
abrupt: function abrupt(t, e) {
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
var o = this.tryEntries[r];
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
var i = o;
break;
}
}
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
var a = i ? i.completion : {};
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
},
complete: function complete(t, e) {
if ("throw" === t.type) throw t.arg;
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
},
finish: function finish(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var r = this.tryEntries[e];
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
}
},
"catch": function _catch(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var r = this.tryEntries[e];
if (r.tryLoc === t) {
var n = r.completion;
if ("throw" === n.type) {
var o = n.arg;
resetTryEntry(r);
}
return o;
}
}
throw Error("illegal catch attempt");
},
delegateYield: function delegateYield(e, r, n) {
return this.delegate = {
iterator: values(e),
resultName: r,
nextLoc: n
}, "next" === this.method && (this.arg = t), y;
}
}, e;
}
;// ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
function asyncGeneratorStep(n, t, e, r, o, a, c) {
try {
var i = n[a](c),
u = i.value;
} catch (n) {
return void e(n);
}
i.done ? t(u) : Promise.resolve(u).then(r, o);
}
function _asyncToGenerator(n) {
return function () {
var t = this,
e = arguments;
return new Promise(function (r, o) {
var a = n.apply(t, e);
function _next(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
}
function _throw(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
}
_next(void 0);
});
};
}
;// ./node_modules/rc-util/es/React/render.js
// Let compiler not to search module usage
var render_fullClone = (0,objectSpread2["default"])({}, external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
var version = render_fullClone.version,
reactRender = render_fullClone.render,
unmountComponentAtNode = render_fullClone.unmountComponentAtNode;
var createRoot;
try {
var mainVersion = Number((version || '').split('.')[0]);
if (mainVersion >= 18) {
createRoot = render_fullClone.createRoot;
}
} catch (e) {
// Do nothing;
}
function toggleWarning(skip) {
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = render_fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (0,esm_typeof["default"])(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
}
}
var MARK = '__rc_react_root__';
// ========================== Render ==========================
function modernRender(node, container) {
toggleWarning(true);
var root = container[MARK] || createRoot(container);
toggleWarning(false);
root.render(node);
container[MARK] = root;
}
function legacyRender(node, container) {
reactRender === null || reactRender === void 0 || reactRender(node, container);
}
/** @private Test usage. Not work in prod */
function _r(node, container) {
if (true) {
return legacyRender(node, container);
}
}
function render(node, container) {
if (createRoot) {
modernRender(node, container);
return;
}
legacyRender(node, container);
}
// ========================= Unmount ==========================
function modernUnmount(_x) {
return _modernUnmount.apply(this, arguments);
}
function _modernUnmount() {
_modernUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Promise.resolve().then(function () {
var _container$MARK;
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();
delete container[MARK];
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _modernUnmount.apply(this, arguments);
}
function legacyUnmount(container) {
unmountComponentAtNode(container);
}
/** @private Test usage. Not work in prod */
function _u(container) {
if (true) {
return legacyUnmount(container);
}
}
function unmount(_x2) {
return _unmount.apply(this, arguments);
}
function _unmount() {
_unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(createRoot !== undefined)) {
_context2.next = 2;
break;
}
return _context2.abrupt("return", modernUnmount(container));
case 2:
legacyUnmount(container);
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _unmount.apply(this, arguments);
}
;// ./components/config-provider/UnstableContext.tsx
const defaultReactRender = (node, container) => {
// TODO: Remove in v6
// Warning for React 19
if (true) {
const majorVersion = parseInt(external_root_React_commonjs2_react_commonjs_react_amd_react_.version.split('.')[0], 10);
const fullKeys = Object.keys(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
true ? (0,_util_warning["default"])(majorVersion < 19 || fullKeys.includes('createRoot'), 'compatible', 'antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.') : 0;
}
render(node, container);
return () => {
return unmount(container);
};
};
let unstableRender = defaultReactRender;
/**
* @deprecated Set React render function for compatible usage.
* This is internal usage only compatible with React 19.
* And will be removed in next major version.
*/
function unstableSetRender(render) {
unstableRender = render;
}
function getReactRender() {
return unstableRender;
}
// EXTERNAL MODULE: ./components/_util/hooks/useZIndex.ts
var useZIndex = __webpack_require__("./components/_util/hooks/useZIndex.ts");
// EXTERNAL MODULE: ./components/_util/motion.ts
var _util_motion = __webpack_require__("./components/_util/motion.ts");
// EXTERNAL MODULE: ./components/locale/useLocale.ts
var useLocale = __webpack_require__("./components/locale/useLocale.ts");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useState.js
var useState = __webpack_require__("./node_modules/rc-util/es/hooks/useState.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
var omit = __webpack_require__("./node_modules/rc-util/es/omit.js");
;// ./node_modules/rc-util/es/Dom/isVisible.js
/* harmony default export */ var isVisible = (function (element) {
if (!element) {
return false;
}
if (element instanceof Element) {
if (element.offsetParent) {
return true;
}
if (element.getBBox) {
var _getBBox = element.getBBox(),
width = _getBBox.width,
height = _getBBox.height;
if (width || height) {
return true;
}
}
if (element.getBoundingClientRect) {
var _element$getBoundingC = element.getBoundingClientRect(),
_width = _element$getBoundingC.width,
_height = _element$getBoundingC.height;
if (_width || _height) {
return true;
}
}
}
return false;
});
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
;// ./components/_util/wave/style.ts
const genWaveStyle = token => {
const {
componentCls,
colorPrimary
} = token;
return {
[componentCls]: {
position: 'absolute',
background: 'transparent',
pointerEvents: 'none',
boxSizing: 'border-box',
color: `var(--wave-color, ${colorPrimary})`,
boxShadow: `0 0 0 0 currentcolor`,
opacity: 0.2,
// =================== Motion ===================
'&.wave-motion-appear': {
transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),
'&-active': {
boxShadow: `0 0 0 6px currentcolor`,
opacity: 0
},
'&.wave-quick': {
transition: [`box-shadow ${token.motionDurationSlow} ${token.motionEaseInOut}`, `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`].join(',')
}
}
}
};
};
/* harmony default export */ var wave_style = ((0,genStyleUtils.genComponentStyleHook)('Wave', token => [genWaveStyle(token)]));
;// ./components/_util/wave/interface.ts
const TARGET_CLS = `${config_provider_context.defaultPrefixCls}-wave-target`;
;// ./components/_util/wave/util.ts
function isValidWaveColor(color) {
return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && !/rgba\((?:\d*, ){3}0\)/.test(color) &&
// any transparent rgba color
color !== 'transparent';
}
function getTargetWaveColor(node) {
const {
borderTopColor,
borderColor,
backgroundColor
} = getComputedStyle(node);
if (isValidWaveColor(borderTopColor)) {
return borderTopColor;
}
if (isValidWaveColor(borderColor)) {
return borderColor;
}
if (isValidWaveColor(backgroundColor)) {
return backgroundColor;
}
return null;
}
;// ./components/_util/wave/WaveEffect.tsx
function validateNum(value) {
return Number.isNaN(value) ? 0 : value;
}
const WaveEffect = props => {
const {
className,
target,
component,
registerUnmount
} = props;
const divRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ====================== Refs ======================
const unmountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
unmountRef.current = registerUnmount();
}, []);
// ===================== Effect =====================
const [color, setWaveColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
const [borderRadius, setBorderRadius] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
const [left, setLeft] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [top, setTop] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [width, setWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [height, setHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [enabled, setEnabled] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const waveStyle = {
left,
top,
width,
height,
borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')
};
if (color) {
waveStyle['--wave-color'] = color;
}
function syncPos() {
const nodeStyle = getComputedStyle(target);
// Get wave color from target
setWaveColor(getTargetWaveColor(target));
const isStatic = nodeStyle.position === 'static';
// Rect
const {
borderLeftWidth,
borderTopWidth
} = nodeStyle;
setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));
setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));
setWidth(target.offsetWidth);
setHeight(target.offsetHeight);
// Get border radius
const {
borderTopLeftRadius,
borderTopRightRadius,
borderBottomLeftRadius,
borderBottomRightRadius
} = nodeStyle;
setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (target) {
// We need delay to check position here
// since UI may change after click
const id = (0,raf["default"])(() => {
syncPos();
setEnabled(true);
});
// Add resize observer to follow size
let resizeObserver;
if (typeof ResizeObserver !== 'undefined') {
resizeObserver = new ResizeObserver(syncPos);
resizeObserver.observe(target);
}
return () => {
raf["default"].cancel(id);
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
};
}
}, []);
if (!enabled) {
return null;
}
const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(TARGET_CLS));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: true,
motionAppear: true,
motionName: "wave-motion",
motionDeadline: 5000,
onAppearEnd: (_, event) => {
var _a, _b;
if (event.deadline || event.propertyName === 'opacity') {
const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
(_b = unmountRef.current) === null || _b === void 0 ? void 0 : _b.call(unmountRef).then(() => {
holder === null || holder === void 0 ? void 0 : holder.remove();
});
}
return false;
}
}, (_ref, ref) => {
let {
className: motionClassName
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: (0,es_ref.composeRef)(divRef, ref),
className: classnames_default()(className, motionClassName, {
'wave-quick': isSmallComponent
}),
style: waveStyle
});
});
};
const showWaveEffect = (target, info) => {
var _a;
const {
component
} = info;
// Skip for unchecked checkbox
if (component === 'Checkbox' && !((_a = target.querySelector('input')) === null || _a === void 0 ? void 0 : _a.checked)) {
return;
}
// Create holder
const holder = document.createElement('div');
holder.style.position = 'absolute';
holder.style.left = '0px';
holder.style.top = '0px';
target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);
const reactRender = getReactRender();
let unmountCallback = null;
function registerUnmount() {
return unmountCallback;
}
unmountCallback = reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WaveEffect, Object.assign({}, info, {
target: target,
registerUnmount: registerUnmount
})), holder);
};
/* harmony default export */ var wave_WaveEffect = (showWaveEffect);
;// ./components/_util/wave/useWave.ts
const useWave = (nodeRef, className, component) => {
const {
wave
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [, token, hashId] = (0,useToken["default"])();
const showWave = (0,useEvent["default"])(event => {
const node = nodeRef.current;
if ((wave === null || wave === void 0 ? void 0 : wave.disabled) || !node) {
return;
}
const targetNode = node.querySelector(`.${TARGET_CLS}`) || node;
const {
showEffect
} = wave || {};
// Customize wave effect
(showEffect || wave_WaveEffect)(targetNode, {
className,
token,
component,
event,
hashId
});
});
const rafId = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// Merge trigger event into one for each frame
const showDebounceWave = event => {
raf["default"].cancel(rafId.current);
rafId.current = (0,raf["default"])(() => {
showWave(event);
});
};
return showDebounceWave;
};
/* harmony default export */ var wave_useWave = (useWave);
;// ./components/_util/wave/index.ts
const Wave = props => {
const {
children,
disabled,
component
} = props;
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// ============================== Style ===============================
const prefixCls = getPrefixCls('wave');
const [, hashId] = wave_style(prefixCls);
// =============================== Wave ===============================
const showWave = wave_useWave(containerRef, classnames_default()(prefixCls, hashId), component);
// ============================== Effect ==============================
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
const node = containerRef.current;
if (!node || node.nodeType !== 1 || disabled) {
return;
}
// Click handler
const onClick = e => {
// Fix radio button click twice
if (!isVisible(e.target) ||
// No need wave
!node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {
return;
}
showWave(e);
};
// Bind events
node.addEventListener('click', onClick, true);
return () => {
node.removeEventListener('click', onClick, true);
};
}, [disabled]);
// ============================== Render ==============================
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children)) {
return children !== null && children !== void 0 ? children : null;
}
const ref = (0,es_ref.supportRef)(children) ? (0,es_ref.composeRef)((0,es_ref.getNodeRef)(children), containerRef) : containerRef;
return (0,reactNode.cloneElement)(children, {
ref
});
};
if (true) {
Wave.displayName = 'Wave';
}
/* harmony default export */ var wave = (Wave);
// EXTERNAL MODULE: ./components/config-provider/hooks/useSize.ts
var useSize = __webpack_require__("./components/config-provider/hooks/useSize.ts");
// EXTERNAL MODULE: ./components/space/style/index.ts + 1 modules
var space_style = __webpack_require__("./components/space/style/index.ts");
;// ./components/space/Compact.tsx
var Compact_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;
};
const SpaceCompactItemContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
const useCompactItemContext = (prefixCls, direction) => {
const compactItemContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SpaceCompactItemContext);
const compactItemClassnames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!compactItemContext) {
return '';
}
const {
compactDirection,
isFirstItem,
isLastItem
} = compactItemContext;
const separator = compactDirection === 'vertical' ? '-vertical-' : '-';
return classnames_default()(`${prefixCls}-compact${separator}item`, {
[`${prefixCls}-compact${separator}first-item`]: isFirstItem,
[`${prefixCls}-compact${separator}last-item`]: isLastItem,
[`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'
});
}, [prefixCls, direction, compactItemContext]);
return {
compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,
compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,
compactItemClassnames
};
};
const NoCompactStyle = props => {
const {
children
} = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SpaceCompactItemContext.Provider, {
value: null
}, children);
};
const CompactItem = props => {
const {
children
} = props,
others = Compact_rest(props, ["children"]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SpaceCompactItemContext.Provider, {
value: external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => others, [others])
}, children);
};
const Compact = props => {
const {
getPrefixCls,
direction: directionConfig
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
size,
direction,
block,
prefixCls: customizePrefixCls,
className,
rootClassName,
children
} = props,
restProps = Compact_rest(props, ["size", "direction", "block", "prefixCls", "className", "rootClassName", "children"]);
const mergedSize = (0,useSize["default"])(ctx => size !== null && size !== void 0 ? size : ctx);
const prefixCls = getPrefixCls('space-compact', customizePrefixCls);
const [wrapCSSVar, hashId] = (0,space_style["default"])(prefixCls);
const clx = classnames_default()(prefixCls, hashId, {
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
[`${prefixCls}-block`]: block,
[`${prefixCls}-vertical`]: direction === 'vertical'
}, className, rootClassName);
const compactItemContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SpaceCompactItemContext);
const childNodes = (0,toArray["default"])(children);
const nodes = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => childNodes.map((child, i) => {
const key = (child === null || child === void 0 ? void 0 : child.key) || `${prefixCls}-item-${i}`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CompactItem, {
key: key,
compactSize: mergedSize,
compactDirection: direction,
isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),
isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))
}, child);
}), [size, childNodes, compactItemContext]);
// =========================== Render ===========================
if (childNodes.length === 0) {
return null;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
className: clx
}, restProps), nodes));
};
/* harmony default export */ var space_Compact = (Compact);
;// ./components/button/button-group.tsx
var button_group_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;
};
const GroupSizeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
const ButtonGroup = props => {
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
size,
className
} = props,
others = button_group_rest(props, ["prefixCls", "size", "className"]);
const prefixCls = getPrefixCls('btn-group', customizePrefixCls);
const [,, hashId] = (0,useToken["default"])();
const sizeCls = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
switch (size) {
case 'large':
return 'lg';
case 'small':
return 'sm';
default:
return '';
}
}, [size]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Button.Group');
warning.deprecated(false, 'Button.Group', 'Space.Compact');
true ? warning(!size || ['large', 'small', 'middle'].includes(size), 'usage', 'Invalid prop `size`.') : 0;
}
const classes = classnames_default()(prefixCls, {
[`${prefixCls}-${sizeCls}`]: sizeCls,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, hashId);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GroupSizeContext.Provider, {
value: size
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
className: classes
})));
};
/* harmony default export */ var button_group = (ButtonGroup);
// EXTERNAL MODULE: ./components/theme/interface/presetColors.ts
var presetColors = __webpack_require__("./components/theme/interface/presetColors.ts");
;// ./components/button/buttonHelpers.tsx
const rxTwoCNChar = /^[\u4E00-\u9FA5]{2}$/;
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
function convertLegacyProps(type) {
if (type === 'danger') {
return {
danger: true
};
}
return {
type
};
}
function isString(str) {
return typeof str === 'string';
}
function isUnBorderedButtonVariant(type) {
return type === 'text' || type === 'link';
}
function splitCNCharsBySpace(child, needInserted) {
if (child === null || child === undefined) {
return;
}
const SPACE = needInserted ? ' ' : '';
if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
return (0,reactNode.cloneElement)(child, {
children: child.props.children.split('').join(SPACE)
});
}
if (isString(child)) {
return isTwoCNChar(child) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, child);
}
if ((0,reactNode.isFragment)(child)) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, child);
}
return child;
}
function spaceChildren(children, needInserted) {
let isPrevChildPure = false;
const childList = [];
external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, child => {
const type = typeof child;
const isCurrentChildPure = type === 'string' || type === 'number';
if (isPrevChildPure && isCurrentChildPure) {
const lastIndex = childList.length - 1;
const lastChild = childList[lastIndex];
childList[lastIndex] = `${lastChild}${child}`;
} else {
childList.push(child);
}
isPrevChildPure = isCurrentChildPure;
});
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
}
const _ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'];
const _ButtonShapes = ['default', 'circle', 'round'];
const _ButtonHTMLTypes = ['submit', 'button', 'reset'];
const _ButtonVariantTypes = ['outlined', 'dashed', 'solid', 'filled', 'text', 'link'];
const _ButtonColorTypes = ['default', 'primary', 'danger'].concat((0,toConsumableArray["default"])(presetColors.PresetColors));
;// ./components/button/IconWrapper.tsx
const IconWrapper = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
const {
className,
style,
children,
prefixCls
} = props;
const iconWrapperCls = classnames_default()(`${prefixCls}-icon`, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
ref: ref,
className: iconWrapperCls,
style: style
}, children);
});
/* harmony default export */ var button_IconWrapper = (IconWrapper);
;// ./components/button/DefaultLoadingIcon.tsx
const InnerLoadingIcon = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
const {
prefixCls,
className,
style,
iconClassName
} = props;
const mergedIconCls = classnames_default()(`${prefixCls}-loading-icon`, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_IconWrapper, {
prefixCls: prefixCls,
className: mergedIconCls,
style: style,
ref: ref
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_LoadingOutlined, {
className: iconClassName
}));
});
const getCollapsedWidth = () => ({
width: 0,
opacity: 0,
transform: 'scale(0)'
});
const getRealWidth = node => ({
width: node.scrollWidth,
opacity: 1,
transform: 'scale(1)'
});
const DefaultLoadingIcon = props => {
const {
prefixCls,
loading,
existIcon,
className,
style,
mount
} = props;
const visible = !!loading;
if (existIcon) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InnerLoadingIcon, {
prefixCls: prefixCls,
className: className,
style: style
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es["default"], {
visible: visible,
// Used for minus flex gap style only
motionName: `${prefixCls}-loading-icon-motion`,
motionAppear: !mount,
motionEnter: !mount,
motionLeave: !mount,
removeOnLeave: true,
onAppearStart: getCollapsedWidth,
onAppearActive: getRealWidth,
onEnterStart: getCollapsedWidth,
onEnterActive: getRealWidth,
onLeaveStart: getRealWidth,
onLeaveActive: getCollapsedWidth
}, (_ref, ref) => {
let {
className: motionCls,
style: motionStyle
} = _ref;
const mergedStyle = Object.assign(Object.assign({}, style), motionStyle);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InnerLoadingIcon, {
prefixCls: prefixCls,
className: classnames_default()(className, motionCls),
style: mergedStyle,
ref: ref
});
});
};
/* harmony default export */ var button_DefaultLoadingIcon = (DefaultLoadingIcon);
// EXTERNAL MODULE: ./components/button/style/index.ts + 1 modules
var button_style = __webpack_require__("./components/button/style/index.ts");
// EXTERNAL MODULE: ./components/style/compact-item.ts
var compact_item = __webpack_require__("./components/style/compact-item.ts");
;// ./components/style/compact-item-vertical.ts
function compactItemVerticalBorder(token, parentCls) {
return {
// border collapse
[`&-item:not(${parentCls}-last-item)`]: {
marginBottom: token.calc(token.lineWidth).mul(-1).equal()
},
'&-item': {
'&:hover,&:focus,&:active': {
zIndex: 2
},
'&[disabled]': {
zIndex: 0
}
}
};
}
function compactItemBorderVerticalRadius(prefixCls, parentCls) {
return {
[`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {
borderRadius: 0
},
[`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {
[`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
borderEndEndRadius: 0,
borderEndStartRadius: 0
}
},
[`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {
[`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
borderStartStartRadius: 0,
borderStartEndRadius: 0
}
}
};
}
function genCompactItemVerticalStyle(token) {
const compactCls = `${token.componentCls}-compact-vertical`;
return {
[compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))
};
}
// EXTERNAL MODULE: ./components/button/style/token.ts
var style_token = __webpack_require__("./components/button/style/token.ts");
;// ./components/button/style/compact.ts
const genButtonCompactStyle = token => {
const {
componentCls,
colorPrimaryHover,
lineWidth,
calc
} = token;
const insetOffset = calc(lineWidth).mul(-1).equal();
const getCompactBorderStyle = vertical => {
const selector = `${componentCls}-compact${vertical ? '-vertical' : ''}-item${componentCls}-primary:not([disabled])`;
return {
[`${selector} + ${selector}::before`]: {
position: 'absolute',
top: vertical ? insetOffset : 0,
insetInlineStart: vertical ? 0 : insetOffset,
backgroundColor: colorPrimaryHover,
content: '""',
width: vertical ? '100%' : lineWidth,
height: vertical ? lineWidth : '100%'
}
};
};
// Special styles for Primary Button
return Object.assign(Object.assign({}, getCompactBorderStyle()), getCompactBorderStyle(true));
};
// ============================== Export ==============================
/* harmony default export */ var compact = ((0,genStyleUtils.genSubStyleComponent)(['Button', 'compact'], token => {
const buttonToken = (0,style_token.prepareToken)(token);
return [
// Space Compact
(0,compact_item.genCompactItemStyle)(buttonToken), genCompactItemVerticalStyle(buttonToken), genButtonCompactStyle(buttonToken)];
}, style_token.prepareComponentToken));
;// ./components/button/button.tsx
var button_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 getLoadingConfig(loading) {
if (typeof loading === 'object' && loading) {
let delay = loading === null || loading === void 0 ? void 0 : loading.delay;
delay = !Number.isNaN(delay) && typeof delay === 'number' ? delay : 0;
return {
loading: delay <= 0,
delay
};
}
return {
loading: !!loading,
delay: 0
};
}
const ButtonTypeMap = {
default: ['default', 'outlined'],
primary: ['primary', 'solid'],
dashed: ['default', 'dashed'],
// `link` is not a real color but we should compatible with it
link: ['link', 'link'],
text: ['default', 'text']
};
const InternalCompoundedButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
var _a, _b;
const {
loading = false,
prefixCls: customizePrefixCls,
color,
variant,
type,
danger = false,
shape = 'default',
size: customizeSize,
styles,
disabled: customDisabled,
className,
rootClassName,
children,
icon,
iconPosition = 'start',
ghost = false,
block = false,
// React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
htmlType = 'button',
classNames: customClassNames,
style: customStyle = {},
autoInsertSpace,
autoFocus
} = props,
rest = button_rest(props, ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"]);
// https://github.com/ant-design/ant-design/issues/47605
// Compatible with original `type` behavior
const mergedType = type || 'default';
const [mergedColor, mergedVariant] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (color && variant) {
return [color, variant];
}
const colorVariantPair = ButtonTypeMap[mergedType] || [];
if (danger) {
return ['danger', colorVariantPair[1]];
}
return colorVariantPair;
}, [type, color, variant, danger]);
const isDanger = mergedColor === 'danger';
const mergedColorText = isDanger ? 'dangerous' : mergedColor;
const {
getPrefixCls,
direction,
autoInsertSpace: contextAutoInsertSpace,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('button');
const mergedInsertSpace = (_a = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : contextAutoInsertSpace) !== null && _a !== void 0 ? _a : true;
const prefixCls = getPrefixCls('btn', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,button_style["default"])(prefixCls);
const disabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const groupSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(GroupSizeContext);
const loadingOrDelay = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => getLoadingConfig(loading), [loading]);
const [innerLoading, setLoading] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(loadingOrDelay.loading);
const [hasTwoCNChar, setHasTwoCNChar] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
const buttonRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
const mergedRef = (0,es_ref.useComposeRef)(ref, buttonRef);
const needInserted = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(children) === 1 && !icon && !isUnBorderedButtonVariant(mergedVariant);
// ========================= Mount ==========================
// Record for mount status.
// This will help to no to show the animation of loading on the first mount.
const isMountRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
isMountRef.current = false;
return () => {
isMountRef.current = true;
};
}, []);
// ========================= Effect =========================
// Loading
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
let delayTimer = null;
if (loadingOrDelay.delay > 0) {
delayTimer = setTimeout(() => {
delayTimer = null;
setLoading(true);
}, loadingOrDelay.delay);
} else {
setLoading(loadingOrDelay.loading);
}
function cleanupTimer() {
if (delayTimer) {
clearTimeout(delayTimer);
delayTimer = null;
}
}
return cleanupTimer;
}, [loadingOrDelay]);
// Two chinese characters check
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
// FIXME: for HOC usage like <FormatMessage />
if (!buttonRef.current || !mergedInsertSpace) {
return;
}
const buttonText = buttonRef.current.textContent || '';
if (needInserted && isTwoCNChar(buttonText)) {
if (!hasTwoCNChar) {
setHasTwoCNChar(true);
}
} else if (hasTwoCNChar) {
setHasTwoCNChar(false);
}
});
// Auto focus
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (autoFocus && buttonRef.current) {
buttonRef.current.focus();
}
}, []);
// ========================= Events =========================
const handleClick = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(e => {
var _a;
// FIXME: https://github.com/ant-design/ant-design/issues/30207
if (innerLoading || mergedDisabled) {
e.preventDefault();
return;
}
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, 'href' in props ? e : e);
}, [props.onClick, innerLoading, mergedDisabled]);
// ========================== Warn ==========================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Button');
true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
true ? warning(!(ghost && isUnBorderedButtonVariant(mergedVariant)), 'usage', "`link` or `text` button can't be a `ghost` button.") : 0;
}
// ========================== Size ==========================
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const sizeClassNameMap = {
large: 'lg',
small: 'sm',
middle: undefined
};
const sizeFullName = (0,useSize["default"])(ctxSize => {
var _a, _b;
return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;
});
const sizeCls = sizeFullName ? (_b = sizeClassNameMap[sizeFullName]) !== null && _b !== void 0 ? _b : '' : '';
const iconType = innerLoading ? 'loading' : icon;
const linkButtonRestProps = (0,omit["default"])(rest, ['navigate']);
// ========================= Render =========================
const classes = classnames_default()(prefixCls, hashId, cssVarCls, {
[`${prefixCls}-${shape}`]: shape !== 'default' && shape,
// line(253 - 254): Compatible with versions earlier than 5.21.0
[`${prefixCls}-${mergedType}`]: mergedType,
[`${prefixCls}-dangerous`]: danger,
[`${prefixCls}-color-${mergedColorText}`]: mergedColorText,
[`${prefixCls}-variant-${mergedVariant}`]: mergedVariant,
[`${prefixCls}-${sizeCls}`]: sizeCls,
[`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,
[`${prefixCls}-background-ghost`]: ghost && !isUnBorderedButtonVariant(mergedVariant),
[`${prefixCls}-loading`]: innerLoading,
[`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && mergedInsertSpace && !innerLoading,
[`${prefixCls}-block`]: block,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-icon-end`]: iconPosition === 'end'
}, compactItemClassnames, className, rootClassName, contextClassName);
const fullStyle = Object.assign(Object.assign({}, contextStyle), customStyle);
const iconClasses = classnames_default()(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, contextClassNames.icon);
const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), contextStyles.icon || {});
const iconNode = icon && !innerLoading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_IconWrapper, {
prefixCls: prefixCls,
className: iconClasses,
style: iconStyle
}, icon)) : loading && typeof loading === 'object' && loading.icon ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_IconWrapper, {
prefixCls: prefixCls,
className: iconClasses,
style: iconStyle
}, loading.icon)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_DefaultLoadingIcon, {
existIcon: !!icon,
prefixCls: prefixCls,
loading: innerLoading,
mount: isMountRef.current
}));
const kids = children || children === 0 ? spaceChildren(children, needInserted && mergedInsertSpace) : null;
if (linkButtonRestProps.href !== undefined) {
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", Object.assign({}, linkButtonRestProps, {
className: classnames_default()(classes, {
[`${prefixCls}-disabled`]: mergedDisabled
}),
href: mergedDisabled ? undefined : linkButtonRestProps.href,
style: fullStyle,
onClick: handleClick,
ref: mergedRef,
tabIndex: mergedDisabled ? -1 : 0
}), iconNode, kids));
}
let buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", Object.assign({}, rest, {
type: htmlType,
className: classes,
style: fullStyle,
onClick: handleClick,
disabled: mergedDisabled,
ref: mergedRef
}), iconNode, kids, compactItemClassnames && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(compact, {
prefixCls: prefixCls
}));
if (!isUnBorderedButtonVariant(mergedVariant)) {
buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(wave, {
component: "Button",
disabled: innerLoading
}, buttonNode);
}
return wrapCSSVar(buttonNode);
});
const Button = InternalCompoundedButton;
Button.Group = button_group;
Button.__ANT_BUTTON = true;
if (true) {
Button.displayName = 'Button';
}
/* harmony default export */ var button_button = (Button);
;// ./components/button/index.tsx
/* harmony default export */ var components_button = (button_button);
;// ./components/_util/ActionButton.tsx
function isThenable(thing) {
return !!(thing === null || thing === void 0 ? void 0 : thing.then);
}
const ActionButton = props => {
const {
type,
children,
prefixCls,
buttonProps,
close,
autoFocus,
emitEvent,
isSilent,
quitOnNullishReturnValue,
actionFn
} = props;
const clickedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
const buttonRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const [loading, setLoading] = (0,useState["default"])(false);
const onInternalClose = function () {
close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
let timeoutId = null;
if (autoFocus) {
timeoutId = setTimeout(() => {
var _a;
(_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus({
preventScroll: true
});
});
}
return () => {
if (timeoutId) {
clearTimeout(timeoutId);
}
};
}, []);
const handlePromiseOnOk = returnValueOfOnOk => {
if (!isThenable(returnValueOfOnOk)) {
return;
}
setLoading(true);
returnValueOfOnOk.then(function () {
setLoading(false, true);
onInternalClose.apply(void 0, arguments);
clickedRef.current = false;
}, e => {
// See: https://github.com/ant-design/ant-design/issues/6183
setLoading(false, true);
clickedRef.current = false;
// Do not throw if is `await` mode
if (isSilent === null || isSilent === void 0 ? void 0 : isSilent()) {
return;
}
return Promise.reject(e);
});
};
const onClick = e => {
if (clickedRef.current) {
return;
}
clickedRef.current = true;
if (!actionFn) {
onInternalClose();
return;
}
let returnValueOfOnOk;
if (emitEvent) {
returnValueOfOnOk = actionFn(e);
if (quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {
clickedRef.current = false;
onInternalClose(e);
return;
}
} else if (actionFn.length) {
returnValueOfOnOk = actionFn(close);
// https://github.com/ant-design/ant-design/issues/23358
clickedRef.current = false;
} else {
returnValueOfOnOk = actionFn();
if (!isThenable(returnValueOfOnOk)) {
onInternalClose();
return;
}
}
handlePromiseOnOk(returnValueOfOnOk);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({}, convertLegacyProps(type), {
onClick: onClick,
loading: loading,
prefixCls: prefixCls
}, buttonProps, {
ref: buttonRef
}), children);
};
/* harmony default export */ var _util_ActionButton = (ActionButton);
;// ./components/modal/context.ts
const ModalContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
const {
Provider: ModalContextProvider
} = ModalContext;
;// ./components/modal/components/ConfirmCancelBtn.tsx
const ConfirmCancelBtn = () => {
const {
autoFocusButton,
cancelButtonProps,
cancelTextLocale,
isSilent,
mergedOkCancel,
rootPrefixCls,
close,
onCancel,
onConfirm
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
return mergedOkCancel ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ActionButton, {
isSilent: isSilent,
actionFn: onCancel,
close: function () {
close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
},
autoFocus: autoFocusButton === 'cancel',
buttonProps: cancelButtonProps,
prefixCls: `${rootPrefixCls}-btn`
}, cancelTextLocale)) : null;
};
/* harmony default export */ var components_ConfirmCancelBtn = (ConfirmCancelBtn);
;// ./components/modal/components/ConfirmOkBtn.tsx
const ConfirmOkBtn = () => {
const {
autoFocusButton,
close,
isSilent,
okButtonProps,
rootPrefixCls,
okTextLocale,
okType,
onConfirm,
onOk
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ActionButton, {
isSilent: isSilent,
type: okType || 'primary',
actionFn: onOk,
close: function () {
close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(true);
},
autoFocus: autoFocusButton === 'ok',
buttonProps: okButtonProps,
prefixCls: `${rootPrefixCls}-btn`
}, okTextLocale);
};
/* harmony default export */ var components_ConfirmOkBtn = (ConfirmOkBtn);
;// ./node_modules/@rc-component/portal/es/Context.js
var OrderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var es_Context = (OrderContext);
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
var useLayoutEffect = __webpack_require__("./node_modules/rc-util/es/hooks/useLayoutEffect.js");
;// ./node_modules/@rc-component/portal/es/useDom.js
var EMPTY_LIST = [];
/**
* Will add `div` to document. Nest call will keep order
* @param render Render DOM in document
*/
function useDom(render, debug) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
if (!(0,canUseDom["default"])()) {
return null;
}
var defaultEle = document.createElement('div');
if ( true && debug) {
defaultEle.setAttribute('data-debug', debug);
}
return defaultEle;
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
ele = _React$useState2[0];
// ========================== Order ==========================
var appendedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var queueCreate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_Context);
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(EMPTY_LIST),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
queue = _React$useState4[0],
setQueue = _React$useState4[1];
var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) {
setQueue(function (origin) {
var newQueue = [appendFn].concat((0,toConsumableArray["default"])(origin));
return newQueue;
});
});
// =========================== DOM ===========================
function append() {
if (!ele.parentElement) {
document.body.appendChild(ele);
}
appendedRef.current = true;
}
function cleanup() {
var _ele$parentElement;
(_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele);
appendedRef.current = false;
}
(0,useLayoutEffect["default"])(function () {
if (render) {
if (queueCreate) {
queueCreate(append);
} else {
append();
}
} else {
cleanup();
}
return cleanup;
}, [render]);
(0,useLayoutEffect["default"])(function () {
if (queue.length) {
queue.forEach(function (appendFn) {
return appendFn();
});
setQueue(EMPTY_LIST);
}
}, [queue]);
return [ele, mergedQueueCreate];
}
;// ./node_modules/rc-util/es/getScrollBarSize.js
/* eslint-disable no-param-reassign */
var cached;
function measureScrollbarSize(ele) {
var randomId = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7));
var measureEle = document.createElement('div');
measureEle.id = randomId;
// Create Style
var measureStyle = measureEle.style;
measureStyle.position = 'absolute';
measureStyle.left = '0';
measureStyle.top = '0';
measureStyle.width = '100px';
measureStyle.height = '100px';
measureStyle.overflow = 'scroll';
// Clone Style if needed
var fallbackWidth;
var fallbackHeight;
if (ele) {
var targetStyle = getComputedStyle(ele);
measureStyle.scrollbarColor = targetStyle.scrollbarColor;
measureStyle.scrollbarWidth = targetStyle.scrollbarWidth;
// Set Webkit style
var webkitScrollbarStyle = getComputedStyle(ele, '::-webkit-scrollbar');
var width = parseInt(webkitScrollbarStyle.width, 10);
var height = parseInt(webkitScrollbarStyle.height, 10);
// Try wrap to handle CSP case
try {
var widthStyle = width ? "width: ".concat(webkitScrollbarStyle.width, ";") : '';
var heightStyle = height ? "height: ".concat(webkitScrollbarStyle.height, ";") : '';
(0,dynamicCSS.updateCSS)("\n#".concat(randomId, "::-webkit-scrollbar {\n").concat(widthStyle, "\n").concat(heightStyle, "\n}"), randomId);
} catch (e) {
// Can't wrap, just log error
console.error(e);
// Get from style directly
fallbackWidth = width;
fallbackHeight = height;
}
}
document.body.appendChild(measureEle);
// Measure. Get fallback style if provided
var scrollWidth = ele && fallbackWidth && !isNaN(fallbackWidth) ? fallbackWidth : measureEle.offsetWidth - measureEle.clientWidth;
var scrollHeight = ele && fallbackHeight && !isNaN(fallbackHeight) ? fallbackHeight : measureEle.offsetHeight - measureEle.clientHeight;
// Clean up
document.body.removeChild(measureEle);
(0,dynamicCSS.removeCSS)(randomId);
return {
width: scrollWidth,
height: scrollHeight
};
}
function getScrollBarSize(fresh) {
if (typeof document === 'undefined') {
return 0;
}
if (fresh || cached === undefined) {
cached = measureScrollbarSize();
}
return cached.width;
}
function getTargetScrollBarSize(target) {
if (typeof document === 'undefined' || !target || !(target instanceof Element)) {
return {
width: 0,
height: 0
};
}
return measureScrollbarSize(target);
}
;// ./node_modules/@rc-component/portal/es/util.js
/**
* Test usage export. Do not use in your production
*/
function isBodyOverflowing() {
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
;// ./node_modules/@rc-component/portal/es/useScrollLocker.js
var UNIQUE_ID = "rc-util-locker-".concat(Date.now());
var uuid = 0;
function useScrollLocker(lock) {
var mergedLock = !!lock;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
uuid += 1;
return "".concat(UNIQUE_ID, "_").concat(uuid);
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
id = _React$useState2[0];
(0,useLayoutEffect["default"])(function () {
if (mergedLock) {
var scrollbarSize = getTargetScrollBarSize(document.body).width;
var isOverflow = isBodyOverflowing();
(0,dynamicCSS.updateCSS)("\nhtml body {\n overflow-y: hidden;\n ".concat(isOverflow ? "width: calc(100% - ".concat(scrollbarSize, "px);") : '', "\n}"), id);
} else {
(0,dynamicCSS.removeCSS)(id);
}
return function () {
(0,dynamicCSS.removeCSS)(id);
};
}, [mergedLock, id]);
}
;// ./node_modules/@rc-component/portal/es/mock.js
var inline = false;
function inlineMock(nextInline) {
if (typeof nextInline === 'boolean') {
inline = nextInline;
}
return inline;
}
;// ./node_modules/@rc-component/portal/es/Portal.js
var getPortalContainer = function getPortalContainer(getContainer) {
if (getContainer === false) {
return false;
}
if (!(0,canUseDom["default"])() || !getContainer) {
return null;
}
if (typeof getContainer === 'string') {
return document.querySelector(getContainer);
}
if (typeof getContainer === 'function') {
return getContainer();
}
return getContainer;
};
var Portal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var open = props.open,
autoLock = props.autoLock,
getContainer = props.getContainer,
debug = props.debug,
_props$autoDestroy = props.autoDestroy,
autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy,
children = props.children;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(open),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
shouldRender = _React$useState2[0],
setShouldRender = _React$useState2[1];
var mergedRender = shouldRender || open;
// ========================= Warning =========================
if (true) {
(0,warning["default"])((0,canUseDom["default"])() || !open, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR.");
}
// ====================== Should Render ======================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (autoDestroy || open) {
setShouldRender(open);
}
}, [open, autoDestroy]);
// ======================== Container ========================
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
return getPortalContainer(getContainer);
}),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
innerContainer = _React$useState4[0],
setInnerContainer = _React$useState4[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var customizeContainer = getPortalContainer(getContainer);
// Tell component that we check this in effect which is safe to be `null`
setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null);
});
var _useDom = useDom(mergedRender && !innerContainer, debug),
_useDom2 = (0,slicedToArray["default"])(_useDom, 2),
defaultContainer = _useDom2[0],
queueCreate = _useDom2[1];
var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer;
// ========================= Locker ==========================
useScrollLocker(autoLock && open && (0,canUseDom["default"])() && (mergedContainer === defaultContainer || mergedContainer === document.body));
// =========================== Ref ===========================
var childRef = null;
if (children && (0,es_ref.supportRef)(children) && ref) {
var _ref = children;
childRef = _ref.ref;
}
var mergedRef = (0,es_ref.useComposeRef)(childRef, ref);
// ========================= Render ==========================
// Do not render when nothing need render
// When innerContainer is `undefined`, it may not ready since user use ref in the same render
if (!mergedRender || !(0,canUseDom["default"])() || innerContainer === undefined) {
return null;
}
// Render inline
var renderInline = mergedContainer === false || inlineMock();
var reffedChildren = children;
if (ref) {
reffedChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
ref: mergedRef
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Context.Provider, {
value: queueCreate
}, renderInline ? reffedChildren : /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)(reffedChildren, mergedContainer));
});
if (true) {
Portal.displayName = 'Portal';
}
/* harmony default export */ var es_Portal = (Portal);
;// ./node_modules/@rc-component/portal/es/index.js
/* harmony default export */ var portal_es = (es_Portal);
;// ./node_modules/rc-dialog/es/context.js
var RefContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js
var contains = __webpack_require__("./node_modules/rc-util/es/Dom/contains.js");
;// ./node_modules/rc-util/es/hooks/useId.js
function getUseId() {
// We need fully clone React function here to avoid webpack warning React 17 do not export `useId`
var fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
return fullClone.useId;
}
var useId_uuid = 0;
/** @private Note only worked in develop env. Not work in production. */
function resetUuid() {
if (true) {
useId_uuid = 0;
}
}
var useOriginId = getUseId();
/* harmony default export */ var hooks_useId = (useOriginId ?
// Use React `useId`
function useId(id) {
var reactId = useOriginId();
// Developer passed id is single source of truth
if (id) {
return id;
}
// Test env always return mock id
if (false) {}
return reactId;
} :
// Use compatible of `useId`
function useCompatId(id) {
// Inner id for accessibility usage. Only work in client side
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('ssr-id'),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
innerId = _React$useState2[0],
setInnerId = _React$useState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var nextId = useId_uuid;
useId_uuid += 1;
setInnerId("rc_unique_".concat(nextId));
}, []);
// Developer passed id is single source of truth
if (id) {
return id;
}
// Test env always return mock id
if (false) {}
// Return react native id or inner id
return innerId;
});
;// ./node_modules/rc-dialog/es/util.js
// =============================== Motion ===============================
function getMotionName(prefixCls, transitionName, animationName) {
var motionName = transitionName;
if (!motionName && animationName) {
motionName = "".concat(prefixCls, "-").concat(animationName);
}
return motionName;
}
// =============================== Offset ===============================
function util_getScroll(w, top) {
var ret = w["page".concat(top ? 'Y' : 'X', "Offset")];
var method = "scroll".concat(top ? 'Top' : 'Left');
if (typeof ret !== 'number') {
var d = w.document;
ret = d.documentElement[method];
if (typeof ret !== 'number') {
ret = d.body[method];
}
}
return ret;
}
function offset(el) {
var rect = el.getBoundingClientRect();
var pos = {
left: rect.left,
top: rect.top
};
var doc = el.ownerDocument;
var w = doc.defaultView || doc.parentWindow;
pos.left += util_getScroll(w);
pos.top += util_getScroll(w, true);
return pos;
}
;// ./node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js
/* harmony default export */ var MemoChildren = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function (_ref) {
var children = _ref.children;
return children;
}, function (_, _ref2) {
var shouldUpdate = _ref2.shouldUpdate;
return !shouldUpdate;
}));
;// ./node_modules/rc-dialog/es/Dialog/Content/Panel.js
var sentinelStyle = {
width: 0,
height: 0,
overflow: 'hidden',
outline: 'none'
};
var entityStyle = {
outline: 'none'
};
var Panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
className = props.className,
style = props.style,
title = props.title,
ariaId = props.ariaId,
footer = props.footer,
closable = props.closable,
closeIcon = props.closeIcon,
onClose = props.onClose,
children = props.children,
bodyStyle = props.bodyStyle,
bodyProps = props.bodyProps,
modalRender = props.modalRender,
onMouseDown = props.onMouseDown,
onMouseUp = props.onMouseUp,
holderRef = props.holderRef,
visible = props.visible,
forceRender = props.forceRender,
width = props.width,
height = props.height,
modalClassNames = props.classNames,
modalStyles = props.styles;
// ================================= Refs =================================
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(RefContext),
panelRef = _React$useContext.panel;
var mergedRef = (0,es_ref.useComposeRef)(holderRef, panelRef);
var sentinelStartRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var sentinelEndRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
return {
focus: function focus() {
var _sentinelStartRef$cur;
(_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 || _sentinelStartRef$cur.focus({
preventScroll: true
});
},
changeActive: function changeActive(next) {
var _document = document,
activeElement = _document.activeElement;
if (next && activeElement === sentinelEndRef.current) {
sentinelStartRef.current.focus({
preventScroll: true
});
} else if (!next && activeElement === sentinelStartRef.current) {
sentinelEndRef.current.focus({
preventScroll: true
});
}
}
};
});
// ================================ Style =================================
var contentStyle = {};
if (width !== undefined) {
contentStyle.width = width;
}
if (height !== undefined) {
contentStyle.height = height;
}
// ================================ Render ================================
var footerNode = footer ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-footer"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.footer),
style: (0,objectSpread2["default"])({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.footer)
}, footer) : null;
var headerNode = title ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-header"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.header),
style: (0,objectSpread2["default"])({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.header)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-title"),
id: ariaId
}, title)) : null;
var closableObj = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
if ((0,esm_typeof["default"])(closable) === 'object' && closable !== null) {
return closable;
}
if (closable) {
return {
closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: "".concat(prefixCls, "-close-x")
})
};
}
return {};
}, [closable, closeIcon, prefixCls]);
var ariaProps = (0,pickAttrs["default"])(closableObj, true);
var closeBtnIsDisabled = (0,esm_typeof["default"])(closable) === 'object' && closable.disabled;
var closerNode = closable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", (0,esm_extends["default"])({
type: "button",
onClick: onClose,
"aria-label": "Close"
}, ariaProps, {
className: "".concat(prefixCls, "-close"),
disabled: closeBtnIsDisabled
}), closableObj.closeIcon) : null;
var content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-content"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.content),
style: modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.content
}, closerNode, headerNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
className: classnames_default()("".concat(prefixCls, "-body"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.body),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, bodyStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.body)
}, bodyProps), children), footerNode);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
key: "dialog-element",
role: "dialog",
"aria-labelledby": title ? ariaId : null,
"aria-modal": "true",
ref: mergedRef,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), contentStyle),
className: classnames_default()(prefixCls, className),
onMouseDown: onMouseDown,
onMouseUp: onMouseUp
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: sentinelStartRef,
tabIndex: 0,
style: entityStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(MemoChildren, {
shouldUpdate: visible || forceRender
}, modalRender ? modalRender(content) : content)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
tabIndex: 0,
ref: sentinelEndRef,
style: sentinelStyle
}));
});
if (true) {
Panel.displayName = 'Panel';
}
/* harmony default export */ var Content_Panel = (Panel);
;// ./node_modules/rc-dialog/es/Dialog/Content/index.js
var Content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
title = props.title,
style = props.style,
className = props.className,
visible = props.visible,
forceRender = props.forceRender,
destroyOnClose = props.destroyOnClose,
motionName = props.motionName,
ariaId = props.ariaId,
onVisibleChanged = props.onVisibleChanged,
mousePosition = props.mousePosition;
var dialogRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
// ============================= Style ==============================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
transformOrigin = _React$useState2[0],
setTransformOrigin = _React$useState2[1];
var contentStyle = {};
if (transformOrigin) {
contentStyle.transformOrigin = transformOrigin;
}
function onPrepare() {
var elementOffset = offset(dialogRef.current);
setTransformOrigin(mousePosition && (mousePosition.x || mousePosition.y) ? "".concat(mousePosition.x - elementOffset.left, "px ").concat(mousePosition.y - elementOffset.top, "px") : '');
}
// ============================= Render =============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: visible,
onVisibleChanged: onVisibleChanged,
onAppearPrepare: onPrepare,
onEnterPrepare: onPrepare,
forceRender: forceRender,
motionName: motionName,
removeOnLeave: destroyOnClose,
ref: dialogRef
}, function (_ref, motionRef) {
var motionClassName = _ref.className,
motionStyle = _ref.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Content_Panel, (0,esm_extends["default"])({}, props, {
ref: ref,
title: title,
ariaId: ariaId,
prefixCls: prefixCls,
holderRef: motionRef,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), style), contentStyle),
className: classnames_default()(className, motionClassName)
}));
});
});
Content.displayName = 'Content';
/* harmony default export */ var Dialog_Content = (Content);
;// ./node_modules/rc-dialog/es/Dialog/Mask.js
var Mask = function Mask(props) {
var prefixCls = props.prefixCls,
style = props.style,
visible = props.visible,
maskProps = props.maskProps,
motionName = props.motionName,
className = props.className;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
key: "mask",
visible: visible,
motionName: motionName,
leavedClassName: "".concat(prefixCls, "-mask-hidden")
}, function (_ref, ref) {
var motionClassName = _ref.className,
motionStyle = _ref.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
ref: ref,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), style),
className: classnames_default()("".concat(prefixCls, "-mask"), motionClassName, className)
}, maskProps));
});
};
/* harmony default export */ var Dialog_Mask = (Mask);
;// ./node_modules/rc-dialog/es/Dialog/index.js
var Dialog = function Dialog(props) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-dialog' : _props$prefixCls,
zIndex = props.zIndex,
_props$visible = props.visible,
visible = _props$visible === void 0 ? false : _props$visible,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
_props$focusTriggerAf = props.focusTriggerAfterClose,
focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,
wrapStyle = props.wrapStyle,
wrapClassName = props.wrapClassName,
wrapProps = props.wrapProps,
onClose = props.onClose,
afterOpenChange = props.afterOpenChange,
afterClose = props.afterClose,
transitionName = props.transitionName,
animation = props.animation,
_props$closable = props.closable,
closable = _props$closable === void 0 ? true : _props$closable,
_props$mask = props.mask,
mask = _props$mask === void 0 ? true : _props$mask,
maskTransitionName = props.maskTransitionName,
maskAnimation = props.maskAnimation,
_props$maskClosable = props.maskClosable,
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
maskStyle = props.maskStyle,
maskProps = props.maskProps,
rootClassName = props.rootClassName,
modalClassNames = props.classNames,
modalStyles = props.styles;
if (true) {
['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(function (prop) {
// (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)
(0,warning.warning)(!(prop in props), "".concat(prop, " is deprecated, please use styles instead."));
});
if ('wrapClassName' in props) {
(0,warning.warning)(false, "wrapClassName is deprecated, please use classNames instead.");
}
}
var lastOutSideActiveElementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var wrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var contentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(visible),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
animatedVisible = _React$useState2[0],
setAnimatedVisible = _React$useState2[1];
// ========================== Init ==========================
var ariaId = hooks_useId();
function saveLastOutSideActiveElementRef() {
if (!(0,contains["default"])(wrapperRef.current, document.activeElement)) {
lastOutSideActiveElementRef.current = document.activeElement;
}
}
function focusDialogContent() {
if (!(0,contains["default"])(wrapperRef.current, document.activeElement)) {
var _contentRef$current;
(_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 || _contentRef$current.focus();
}
}
// ========================= Events =========================
function onDialogVisibleChanged(newVisible) {
// Try to focus
if (newVisible) {
focusDialogContent();
} else {
// Clean up scroll bar & focus back
setAnimatedVisible(false);
if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {
try {
lastOutSideActiveElementRef.current.focus({
preventScroll: true
});
} catch (e) {
// Do nothing
}
lastOutSideActiveElementRef.current = null;
}
// Trigger afterClose only when change visible from true to false
if (animatedVisible) {
afterClose === null || afterClose === void 0 || afterClose();
}
}
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(newVisible);
}
function onInternalClose(e) {
onClose === null || onClose === void 0 || onClose(e);
}
// >>> Content
var contentClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var contentTimeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
// We need record content click incase content popup out of dialog
var onContentMouseDown = function onContentMouseDown() {
clearTimeout(contentTimeoutRef.current);
contentClickRef.current = true;
};
var onContentMouseUp = function onContentMouseUp() {
contentTimeoutRef.current = setTimeout(function () {
contentClickRef.current = false;
});
};
// >>> Wrapper
// Close only when element not on dialog
var onWrapperClick = null;
if (maskClosable) {
onWrapperClick = function onWrapperClick(e) {
if (contentClickRef.current) {
contentClickRef.current = false;
} else if (wrapperRef.current === e.target) {
onInternalClose(e);
}
};
}
function onWrapperKeyDown(e) {
if (keyboard && e.keyCode === KeyCode["default"].ESC) {
e.stopPropagation();
onInternalClose(e);
return;
}
// keep focus inside dialog
if (visible && e.keyCode === KeyCode["default"].TAB) {
contentRef.current.changeActive(!e.shiftKey);
}
}
// ========================= Effect =========================
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (visible) {
setAnimatedVisible(true);
saveLastOutSideActiveElementRef();
}
}, [visible]);
// Remove direct should also check the scroll bar update
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return function () {
clearTimeout(contentTimeoutRef.current);
};
}, []);
var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
zIndex: zIndex
}, wrapStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.wrapper), {}, {
display: !animatedVisible ? 'none' : null
});
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
className: classnames_default()("".concat(prefixCls, "-root"), rootClassName)
}, (0,pickAttrs["default"])(props, {
data: true
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Dialog_Mask, {
prefixCls: prefixCls,
visible: mask && visible,
motionName: getMotionName(prefixCls, maskTransitionName, maskAnimation),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({
zIndex: zIndex
}, maskStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.mask),
maskProps: maskProps,
className: modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.mask
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
tabIndex: -1,
onKeyDown: onWrapperKeyDown,
className: classnames_default()("".concat(prefixCls, "-wrap"), wrapClassName, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper),
ref: wrapperRef,
onClick: onWrapperClick,
style: mergedStyle
}, wrapProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Dialog_Content, (0,esm_extends["default"])({}, props, {
onMouseDown: onContentMouseDown,
onMouseUp: onContentMouseUp,
ref: contentRef,
closable: closable,
ariaId: ariaId,
prefixCls: prefixCls,
visible: visible && animatedVisible,
onClose: onInternalClose,
onVisibleChanged: onDialogVisibleChanged,
motionName: getMotionName(prefixCls, transitionName, animation)
}))));
};
/* harmony default export */ var es_Dialog = (Dialog);
;// ./node_modules/rc-dialog/es/DialogWrap.js
// fix issue #10656
/*
* getContainer remarks
* Custom container should not be return, because in the Portal component, it will remove the
* return container element here, if the custom container is the only child of it's component,
* like issue #10656, It will has a conflict with removeChild method in react-dom.
* So here should add a child (div element) to custom container.
* */
var DialogWrap = function DialogWrap(props) {
var visible = props.visible,
getContainer = props.getContainer,
forceRender = props.forceRender,
_props$destroyOnClose = props.destroyOnClose,
destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,
_afterClose = props.afterClose,
panelRef = props.panelRef;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(visible),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
animatedVisible = _React$useState2[0],
setAnimatedVisible = _React$useState2[1];
var refContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
panel: panelRef
};
}, [panelRef]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (visible) {
setAnimatedVisible(true);
}
}, [visible]);
// Destroy on close will remove wrapped div
if (!forceRender && destroyOnClose && !animatedVisible) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RefContext.Provider, {
value: refContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
open: visible || forceRender || animatedVisible,
autoDestroy: false,
getContainer: getContainer,
autoLock: visible || animatedVisible
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Dialog, (0,esm_extends["default"])({}, props, {
destroyOnClose: destroyOnClose,
afterClose: function afterClose() {
_afterClose === null || _afterClose === void 0 || _afterClose();
setAnimatedVisible(false);
}
}))));
};
DialogWrap.displayName = 'Dialog';
/* harmony default export */ var es_DialogWrap = (DialogWrap);
;// ./node_modules/rc-dialog/es/index.js
/* harmony default export */ var rc_dialog_es = (es_DialogWrap);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
;// ./node_modules/rc-field-form/es/FieldContext.js
var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var warningFunc = function warningFunc() {
(0,warning["default"])(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');
};
var FieldContext_Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
getFieldValue: warningFunc,
getFieldsValue: warningFunc,
getFieldError: warningFunc,
getFieldWarning: warningFunc,
getFieldsError: warningFunc,
isFieldsTouched: warningFunc,
isFieldTouched: warningFunc,
isFieldValidating: warningFunc,
isFieldsValidating: warningFunc,
resetFields: warningFunc,
setFields: warningFunc,
setFieldValue: warningFunc,
setFieldsValue: warningFunc,
validateFields: warningFunc,
submit: warningFunc,
getInternalHooks: function getInternalHooks() {
warningFunc();
return {
dispatch: warningFunc,
initEntityValue: warningFunc,
registerField: warningFunc,
useSubscribe: warningFunc,
setInitialValues: warningFunc,
destroyForm: warningFunc,
setCallbacks: warningFunc,
registerWatch: warningFunc,
getFields: warningFunc,
setValidateMessages: warningFunc,
setPreserve: warningFunc,
getInitialValue: warningFunc
};
}
});
/* harmony default export */ var FieldContext = (FieldContext_Context);
;// ./node_modules/rc-field-form/es/ListContext.js
var ListContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var es_ListContext = (ListContext);
;// ./node_modules/rc-field-form/es/utils/typeUtil.js
function typeUtil_toArray(value) {
if (value === undefined || value === null) {
return [];
}
return Array.isArray(value) ? value : [value];
}
function isFormInstance(form) {
return form && !!form._init;
}
;// ./node_modules/@rc-component/async-validator/es/messages.js
function newMessages() {
return {
default: 'Validation error on field %s',
required: '%s is required',
enum: '%s must be one of %s',
whitespace: '%s cannot be empty',
date: {
format: '%s date %s is invalid for format %s',
parse: '%s date could not be parsed, %s is invalid ',
invalid: '%s date %s is invalid'
},
types: {
string: '%s is not a %s',
method: '%s is not a %s (function)',
array: '%s is not an %s',
object: '%s is not an %s',
number: '%s is not a %s',
date: '%s is not a %s',
boolean: '%s is not a %s',
integer: '%s is not an %s',
float: '%s is not a %s',
regexp: '%s is not a valid %s',
email: '%s is not a valid %s',
url: '%s is not a valid %s',
hex: '%s is not a valid %s'
},
string: {
len: '%s must be exactly %s characters',
min: '%s must be at least %s characters',
max: '%s cannot be longer than %s characters',
range: '%s must be between %s and %s characters'
},
number: {
len: '%s must equal %s',
min: '%s cannot be less than %s',
max: '%s cannot be greater than %s',
range: '%s must be between %s and %s'
},
array: {
len: '%s must be exactly %s in length',
min: '%s cannot be less than %s in length',
max: '%s cannot be greater than %s in length',
range: '%s must be between %s and %s in length'
},
pattern: {
mismatch: '%s value %s does not match pattern %s'
},
clone: function clone() {
var cloned = JSON.parse(JSON.stringify(this));
cloned.clone = this.clone;
return cloned;
}
};
}
var messages_messages = newMessages();
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
var setPrototypeOf = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
;// ./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
function _isNativeFunction(t) {
try {
return -1 !== Function.toString.call(t).indexOf("[native code]");
} catch (n) {
return "function" == typeof t;
}
}
;// ./node_modules/@babel/runtime/helpers/esm/construct.js
function _construct(t, e, r) {
if ((0,isNativeReflectConstruct["default"])()) return Reflect.construct.apply(null, arguments);
var o = [null];
o.push.apply(o, e);
var p = new (t.bind.apply(t, o))();
return r && (0,setPrototypeOf["default"])(p, r.prototype), p;
}
;// ./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
function _wrapNativeSuper(t) {
var r = "function" == typeof Map ? new Map() : void 0;
return _wrapNativeSuper = function _wrapNativeSuper(t) {
if (null === t || !_isNativeFunction(t)) return t;
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
if (void 0 !== r) {
if (r.has(t)) return r.get(t);
r.set(t, Wrapper);
}
function Wrapper() {
return _construct(t, arguments, (0,getPrototypeOf["default"])(this).constructor);
}
return Wrapper.prototype = Object.create(t.prototype, {
constructor: {
value: Wrapper,
enumerable: !1,
writable: !0,
configurable: !0
}
}), (0,setPrototypeOf["default"])(Wrapper, t);
}, _wrapNativeSuper(t);
}
;// ./node_modules/@rc-component/async-validator/es/util.js
/* eslint no-console:0 */
var formatRegExp = /%[sdj%]/g;
var util_warning = function warning() {};
// don't print warning message when in production env or node runtime
if (typeof process !== 'undefined' && process.env && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
util_warning = function warning(type, errors) {
if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {
if (errors.every(function (e) {
return typeof e === 'string';
})) {
console.warn(type, errors);
}
}
};
}
function convertFieldsError(errors) {
if (!errors || !errors.length) return null;
var fields = {};
errors.forEach(function (error) {
var field = error.field;
fields[field] = fields[field] || [];
fields[field].push(error);
});
return fields;
}
function format(template) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var i = 0;
var len = args.length;
if (typeof template === 'function') {
// eslint-disable-next-line prefer-spread
return template.apply(null, args);
}
if (typeof template === 'string') {
var str = template.replace(formatRegExp, function (x) {
if (x === '%%') {
return '%';
}
if (i >= len) {
return x;
}
switch (x) {
case '%s':
return String(args[i++]);
case '%d':
return Number(args[i++]);
case '%j':
try {
return JSON.stringify(args[i++]);
} catch (_) {
return '[Circular]';
}
break;
default:
return x;
}
});
return str;
}
return template;
}
function isNativeStringType(type) {
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';
}
function isEmptyValue(value, type) {
if (value === undefined || value === null) {
return true;
}
if (type === 'array' && Array.isArray(value) && !value.length) {
return true;
}
if (isNativeStringType(type) && typeof value === 'string' && !value) {
return true;
}
return false;
}
function isEmptyObject(obj) {
return Object.keys(obj).length === 0;
}
function asyncParallelArray(arr, func, callback) {
var results = [];
var total = 0;
var arrLength = arr.length;
function count(errors) {
results.push.apply(results, (0,toConsumableArray["default"])(errors || []));
total++;
if (total === arrLength) {
callback(results);
}
}
arr.forEach(function (a) {
func(a, count);
});
}
function asyncSerialArray(arr, func, callback) {
var index = 0;
var arrLength = arr.length;
function next(errors) {
if (errors && errors.length) {
callback(errors);
return;
}
var original = index;
index = index + 1;
if (original < arrLength) {
func(arr[original], next);
} else {
callback([]);
}
}
next([]);
}
function flattenObjArr(objArr) {
var ret = [];
Object.keys(objArr).forEach(function (k) {
ret.push.apply(ret, (0,toConsumableArray["default"])(objArr[k] || []));
});
return ret;
}
var AsyncValidationError = /*#__PURE__*/function (_Error) {
(0,inherits["default"])(AsyncValidationError, _Error);
var _super = (0,createSuper["default"])(AsyncValidationError);
function AsyncValidationError(errors, fields) {
var _this;
(0,classCallCheck["default"])(this, AsyncValidationError);
_this = _super.call(this, 'Async Validation Error');
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "errors", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "fields", void 0);
_this.errors = errors;
_this.fields = fields;
return _this;
}
return (0,createClass["default"])(AsyncValidationError);
}( /*#__PURE__*/_wrapNativeSuper(Error));
function asyncMap(objArr, option, func, callback, source) {
if (option.first) {
var _pending = new Promise(function (resolve, reject) {
var next = function next(errors) {
callback(errors);
return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
};
var flattenArr = flattenObjArr(objArr);
asyncSerialArray(flattenArr, func, next);
});
_pending.catch(function (e) {
return e;
});
return _pending;
}
var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
var objArrKeys = Object.keys(objArr);
var objArrLength = objArrKeys.length;
var total = 0;
var results = [];
var pending = new Promise(function (resolve, reject) {
var next = function next(errors) {
// eslint-disable-next-line prefer-spread
results.push.apply(results, errors);
total++;
if (total === objArrLength) {
callback(results);
return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
}
};
if (!objArrKeys.length) {
callback(results);
resolve(source);
}
objArrKeys.forEach(function (key) {
var arr = objArr[key];
if (firstFields.indexOf(key) !== -1) {
asyncSerialArray(arr, func, next);
} else {
asyncParallelArray(arr, func, next);
}
});
});
pending.catch(function (e) {
return e;
});
return pending;
}
function isErrorObj(obj) {
return !!(obj && obj.message !== undefined);
}
function getValue(value, path) {
var v = value;
for (var i = 0; i < path.length; i++) {
if (v == undefined) {
return v;
}
v = v[path[i]];
}
return v;
}
function complementError(rule, source) {
return function (oe) {
var fieldValue;
if (rule.fullFields) {
fieldValue = getValue(source, rule.fullFields);
} else {
fieldValue = source[oe.field || rule.fullField];
}
if (isErrorObj(oe)) {
oe.field = oe.field || rule.fullField;
oe.fieldValue = fieldValue;
return oe;
}
return {
message: typeof oe === 'function' ? oe() : oe,
fieldValue: fieldValue,
field: oe.field || rule.fullField
};
};
}
function deepMerge(target, source) {
if (source) {
for (var s in source) {
if (source.hasOwnProperty(s)) {
var value = source[s];
if ((0,esm_typeof["default"])(value) === 'object' && (0,esm_typeof["default"])(target[s]) === 'object') {
target[s] = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, target[s]), value);
} else {
target[s] = value;
}
}
}
}
return target;
}
;// ./node_modules/@rc-component/async-validator/es/rule/enum.js
var ENUM = 'enum';
var enumerable = function enumerable(rule, value, source, errors, options) {
rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
if (rule[ENUM].indexOf(value) === -1) {
errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
}
};
/* harmony default export */ var rule_enum = (enumerable);
;// ./node_modules/@rc-component/async-validator/es/rule/pattern.js
var pattern = function pattern(rule, value, source, errors, options) {
if (rule.pattern) {
if (rule.pattern instanceof RegExp) {
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
// flag is accidentally set to `true`, which in a validation scenario
// is not necessary and the result might be misleading
rule.pattern.lastIndex = 0;
if (!rule.pattern.test(value)) {
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
} else if (typeof rule.pattern === 'string') {
var _pattern = new RegExp(rule.pattern);
if (!_pattern.test(value)) {
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
}
}
};
/* harmony default export */ var rule_pattern = (pattern);
;// ./node_modules/@rc-component/async-validator/es/rule/range.js
var range = function range(rule, value, source, errors, options) {
var len = typeof rule.len === 'number';
var min = typeof rule.min === 'number';
var max = typeof rule.max === 'number';
// 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var val = value;
var key = null;
var num = typeof value === 'number';
var str = typeof value === 'string';
var arr = Array.isArray(value);
if (num) {
key = 'number';
} else if (str) {
key = 'string';
} else if (arr) {
key = 'array';
}
// if the value is not of a supported type for range validation
// the validation rule rule should use the
// type property to also test for a particular type
if (!key) {
return false;
}
if (arr) {
val = value.length;
}
if (str) {
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
val = value.replace(spRegexp, '_').length;
}
if (len) {
if (val !== rule.len) {
errors.push(format(options.messages[key].len, rule.fullField, rule.len));
}
} else if (min && !max && val < rule.min) {
errors.push(format(options.messages[key].min, rule.fullField, rule.min));
} else if (max && !min && val > rule.max) {
errors.push(format(options.messages[key].max, rule.fullField, rule.max));
} else if (min && max && (val < rule.min || val > rule.max)) {
errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
}
};
/* harmony default export */ var rule_range = (range);
;// ./node_modules/@rc-component/async-validator/es/rule/required.js
var required = function required(rule, value, source, errors, options, type) {
if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
errors.push(format(options.messages.required, rule.fullField));
}
};
/* harmony default export */ var rule_required = (required);
;// ./node_modules/@rc-component/async-validator/es/rule/url.js
// https://github.com/kevva/url-regex/blob/master/index.js
var urlReg;
/* harmony default export */ var rule_url = (function () {
if (urlReg) {
return urlReg;
}
var word = '[a-fA-F\\d:]';
var b = function b(options) {
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=".concat(word, ")|(?<=").concat(word, ")(?=\\s|$))") : '';
};
var v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
var v6seg = '[a-fA-F\\d]{1,4}';
var v6List = ["(?:".concat(v6seg, ":){7}(?:").concat(v6seg, "|:)"), // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
"(?:".concat(v6seg, ":){6}(?:").concat(v4, "|:").concat(v6seg, "|:)"), // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::
"(?:".concat(v6seg, ":){5}(?::").concat(v4, "|(?::").concat(v6seg, "){1,2}|:)"), // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::
"(?:".concat(v6seg, ":){4}(?:(?::").concat(v6seg, "){0,1}:").concat(v4, "|(?::").concat(v6seg, "){1,3}|:)"), // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::
"(?:".concat(v6seg, ":){3}(?:(?::").concat(v6seg, "){0,2}:").concat(v4, "|(?::").concat(v6seg, "){1,4}|:)"), // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::
"(?:".concat(v6seg, ":){2}(?:(?::").concat(v6seg, "){0,3}:").concat(v4, "|(?::").concat(v6seg, "){1,5}|:)"), // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::
"(?:".concat(v6seg, ":){1}(?:(?::").concat(v6seg, "){0,4}:").concat(v4, "|(?::").concat(v6seg, "){1,6}|:)"), // 1:: 1::3:4:5:6:7:8 1::8 1::
"(?::(?:(?::".concat(v6seg, "){0,5}:").concat(v4, "|(?::").concat(v6seg, "){1,7}|:))") // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::
];
var v6Eth0 = "(?:%[0-9a-zA-Z]{1,})?"; // %eth0 %1
var v6 = "(?:".concat(v6List.join('|'), ")").concat(v6Eth0);
// Pre-compile only the exact regexes because adding a global flag make regexes stateful
var v46Exact = new RegExp("(?:^".concat(v4, "$)|(?:^").concat(v6, "$)"));
var v4exact = new RegExp("^".concat(v4, "$"));
var v6exact = new RegExp("^".concat(v6, "$"));
var ip = function ip(options) {
return options && options.exact ? v46Exact : new RegExp("(?:".concat(b(options)).concat(v4).concat(b(options), ")|(?:").concat(b(options)).concat(v6).concat(b(options), ")"), 'g');
};
ip.v4 = function (options) {
return options && options.exact ? v4exact : new RegExp("".concat(b(options)).concat(v4).concat(b(options)), 'g');
};
ip.v6 = function (options) {
return options && options.exact ? v6exact : new RegExp("".concat(b(options)).concat(v6).concat(b(options)), 'g');
};
var protocol = "(?:(?:[a-z]+:)?//)";
var auth = '(?:\\S+(?::\\S*)?@)?';
var ipv4 = ip.v4().source;
var ipv6 = ip.v6().source;
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
var port = '(?::\\d{2,5})?';
var path = '(?:[/?#][^\\s"]*)?';
var regex = "(?:".concat(protocol, "|www\\.)").concat(auth, "(?:localhost|").concat(ipv4, "|").concat(ipv6, "|").concat(host).concat(domain).concat(tld, ")").concat(port).concat(path);
urlReg = new RegExp("(?:^".concat(regex, "$)"), 'i');
return urlReg;
});
;// ./node_modules/@rc-component/async-validator/es/rule/type.js
/* eslint max-len:0 */
var type_pattern = {
// http://emailregex.com/
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
// url: new RegExp(
// '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
// 'i',
// ),
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
};
var types = {
integer: function integer(value) {
return types.number(value) && parseInt(value, 10) === value;
},
float: function float(value) {
return types.number(value) && !types.integer(value);
},
array: function array(value) {
return Array.isArray(value);
},
regexp: function regexp(value) {
if (value instanceof RegExp) {
return true;
}
try {
return !!new RegExp(value);
} catch (e) {
return false;
}
},
date: function date(value) {
return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());
},
number: function number(value) {
if (isNaN(value)) {
return false;
}
return typeof value === 'number';
},
object: function object(value) {
return (0,esm_typeof["default"])(value) === 'object' && !types.array(value);
},
method: function method(value) {
return typeof value === 'function';
},
email: function email(value) {
return typeof value === 'string' && value.length <= 320 && !!value.match(type_pattern.email);
},
url: function url(value) {
return typeof value === 'string' && value.length <= 2048 && !!value.match(rule_url());
},
hex: function hex(value) {
return typeof value === 'string' && !!value.match(type_pattern.hex);
}
};
var type = function type(rule, value, source, errors, options) {
if (rule.required && value === undefined) {
rule_required(rule, value, source, errors, options);
return;
}
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
var ruleType = rule.type;
if (custom.indexOf(ruleType) > -1) {
if (!types[ruleType](value)) {
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
}
// straight typeof check
} else if (ruleType && (0,esm_typeof["default"])(value) !== rule.type) {
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
}
};
/* harmony default export */ var rule_type = (type);
;// ./node_modules/@rc-component/async-validator/es/rule/whitespace.js
/**
* Rule for validating whitespace.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
var whitespace = function whitespace(rule, value, source, errors, options) {
if (/^\s+$/.test(value) || value === '') {
errors.push(format(options.messages.whitespace, rule.fullField));
}
};
/* harmony default export */ var rule_whitespace = (whitespace);
;// ./node_modules/@rc-component/async-validator/es/rule/index.js
/* harmony default export */ var es_rule = ({
required: rule_required,
whitespace: rule_whitespace,
type: rule_type,
range: rule_range,
enum: rule_enum,
pattern: rule_pattern
});
;// ./node_modules/@rc-component/async-validator/es/validator/any.js
var any = function any(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
}
callback(errors);
};
/* harmony default export */ var validator_any = (any);
;// ./node_modules/@rc-component/async-validator/es/validator/array.js
var array = function array(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((value === undefined || value === null) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options, 'array');
if (value !== undefined && value !== null) {
es_rule.type(rule, value, source, errors, options);
es_rule.range(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_array = (array);
;// ./node_modules/@rc-component/async-validator/es/validator/boolean.js
var boolean_boolean = function boolean(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule.type(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_boolean = (boolean_boolean);
;// ./node_modules/@rc-component/async-validator/es/validator/date.js
var date = function date(rule, value, callback, source, options) {
// console.log('integer rule called %j', rule);
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
// console.log('validate on %s value', value);
if (validate) {
if (isEmptyValue(value, 'date') && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (!isEmptyValue(value, 'date')) {
var dateObject;
if (value instanceof Date) {
dateObject = value;
} else {
dateObject = new Date(value);
}
es_rule.type(rule, dateObject, source, errors, options);
if (dateObject) {
es_rule.range(rule, dateObject.getTime(), source, errors, options);
}
}
}
callback(errors);
};
/* harmony default export */ var validator_date = (date);
;// ./node_modules/@rc-component/async-validator/es/validator/enum.js
var enum_ENUM = 'enum';
var enum_enumerable = function enumerable(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule[enum_ENUM](rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_enum = (enum_enumerable);
;// ./node_modules/@rc-component/async-validator/es/validator/float.js
var floatFn = function floatFn(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule.type(rule, value, source, errors, options);
es_rule.range(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_float = (floatFn);
;// ./node_modules/@rc-component/async-validator/es/validator/integer.js
var integer = function integer(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule.type(rule, value, source, errors, options);
es_rule.range(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_integer = (integer);
;// ./node_modules/@rc-component/async-validator/es/validator/method.js
var method = function method(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule.type(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_method = (method);
;// ./node_modules/@rc-component/async-validator/es/validator/number.js
var number = function number(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (value === '') {
// eslint-disable-next-line no-param-reassign
value = undefined;
}
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule.type(rule, value, source, errors, options);
es_rule.range(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_number = (number);
;// ./node_modules/@rc-component/async-validator/es/validator/object.js
var object = function object(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (value !== undefined) {
es_rule.type(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_object = (object);
;// ./node_modules/@rc-component/async-validator/es/validator/pattern.js
var pattern_pattern = function pattern(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, 'string') && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (!isEmptyValue(value, 'string')) {
es_rule.pattern(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_pattern = (pattern_pattern);
;// ./node_modules/@rc-component/async-validator/es/validator/regexp.js
var regexp = function regexp(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options);
if (!isEmptyValue(value)) {
es_rule.type(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_regexp = (regexp);
;// ./node_modules/@rc-component/async-validator/es/validator/required.js
var required_required = function required(rule, value, callback, source, options) {
var errors = [];
var type = Array.isArray(value) ? 'array' : (0,esm_typeof["default"])(value);
es_rule.required(rule, value, source, errors, options, type);
callback(errors);
};
/* harmony default export */ var validator_required = (required_required);
;// ./node_modules/@rc-component/async-validator/es/validator/string.js
var string = function string(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, 'string') && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options, 'string');
if (!isEmptyValue(value, 'string')) {
es_rule.type(rule, value, source, errors, options);
es_rule.range(rule, value, source, errors, options);
es_rule.pattern(rule, value, source, errors, options);
if (rule.whitespace === true) {
es_rule.whitespace(rule, value, source, errors, options);
}
}
}
callback(errors);
};
/* harmony default export */ var validator_string = (string);
;// ./node_modules/@rc-component/async-validator/es/validator/type.js
var type_type = function type(rule, value, callback, source, options) {
var ruleType = rule.type;
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, ruleType) && !rule.required) {
return callback();
}
es_rule.required(rule, value, source, errors, options, ruleType);
if (!isEmptyValue(value, ruleType)) {
es_rule.type(rule, value, source, errors, options);
}
}
callback(errors);
};
/* harmony default export */ var validator_type = (type_type);
;// ./node_modules/@rc-component/async-validator/es/validator/index.js
/* harmony default export */ var es_validator = ({
string: validator_string,
method: validator_method,
number: validator_number,
boolean: validator_boolean,
regexp: validator_regexp,
integer: validator_integer,
float: validator_float,
array: validator_array,
object: validator_object,
enum: validator_enum,
pattern: validator_pattern,
date: validator_date,
url: validator_type,
hex: validator_type,
email: validator_type,
required: validator_required,
any: validator_any
});
;// ./node_modules/@rc-component/async-validator/es/interface.js
;// ./node_modules/@rc-component/async-validator/es/index.js
/**
* Encapsulates a validation schema.
*
* @param descriptor An object declaring validation rules
* for this schema.
*/
var Schema = /*#__PURE__*/function () {
function Schema(descriptor) {
(0,classCallCheck["default"])(this, Schema);
// ======================== Instance ========================
(0,defineProperty["default"])(this, "rules", null);
(0,defineProperty["default"])(this, "_messages", messages_messages);
this.define(descriptor);
}
(0,createClass["default"])(Schema, [{
key: "define",
value: function define(rules) {
var _this = this;
if (!rules) {
throw new Error('Cannot configure a schema with no rules');
}
if ((0,esm_typeof["default"])(rules) !== 'object' || Array.isArray(rules)) {
throw new Error('Rules must be an object');
}
this.rules = {};
Object.keys(rules).forEach(function (name) {
var item = rules[name];
_this.rules[name] = Array.isArray(item) ? item : [item];
});
}
}, {
key: "messages",
value: function messages(_messages) {
if (_messages) {
this._messages = deepMerge(newMessages(), _messages);
}
return this._messages;
}
}, {
key: "validate",
value: function validate(source_) {
var _this2 = this;
var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
var source = source_;
var options = o;
var callback = oc;
if (typeof options === 'function') {
callback = options;
options = {};
}
if (!this.rules || Object.keys(this.rules).length === 0) {
if (callback) {
callback(null, source);
}
return Promise.resolve(source);
}
function complete(results) {
var errors = [];
var fields = {};
function add(e) {
if (Array.isArray(e)) {
var _errors;
errors = (_errors = errors).concat.apply(_errors, (0,toConsumableArray["default"])(e));
} else {
errors.push(e);
}
}
for (var i = 0; i < results.length; i++) {
add(results[i]);
}
if (!errors.length) {
callback(null, source);
} else {
fields = convertFieldsError(errors);
callback(errors, fields);
}
}
if (options.messages) {
var messages = this.messages();
if (messages === messages_messages) {
messages = newMessages();
}
deepMerge(messages, options.messages);
options.messages = messages;
} else {
options.messages = this.messages();
}
var series = {};
var keys = options.keys || Object.keys(this.rules);
keys.forEach(function (z) {
var arr = _this2.rules[z];
var value = source[z];
arr.forEach(function (r) {
var rule = r;
if (typeof rule.transform === 'function') {
if (source === source_) {
source = (0,objectSpread2["default"])({}, source);
}
value = source[z] = rule.transform(value);
if (value !== undefined && value !== null) {
rule.type = rule.type || (Array.isArray(value) ? 'array' : (0,esm_typeof["default"])(value));
}
}
if (typeof rule === 'function') {
rule = {
validator: rule
};
} else {
rule = (0,objectSpread2["default"])({}, rule);
}
// Fill validator. Skip if nothing need to validate
rule.validator = _this2.getValidationMethod(rule);
if (!rule.validator) {
return;
}
rule.field = z;
rule.fullField = rule.fullField || z;
rule.type = _this2.getType(rule);
series[z] = series[z] || [];
series[z].push({
rule: rule,
value: value,
source: source,
field: z
});
});
});
var errorFields = {};
return asyncMap(series, options, function (data, doIt) {
var rule = data.rule;
var deep = (rule.type === 'object' || rule.type === 'array') && ((0,esm_typeof["default"])(rule.fields) === 'object' || (0,esm_typeof["default"])(rule.defaultField) === 'object');
deep = deep && (rule.required || !rule.required && data.value);
rule.field = data.field;
function addFullField(key, schema) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, schema), {}, {
fullField: "".concat(rule.fullField, ".").concat(key),
fullFields: rule.fullFields ? [].concat((0,toConsumableArray["default"])(rule.fullFields), [key]) : [key]
});
}
function cb() {
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var errorList = Array.isArray(e) ? e : [e];
if (!options.suppressWarning && errorList.length) {
Schema.warning('async-validator:', errorList);
}
if (errorList.length && rule.message !== undefined) {
errorList = [].concat(rule.message);
}
// Fill error info
var filledErrors = errorList.map(complementError(rule, source));
if (options.first && filledErrors.length) {
errorFields[rule.field] = 1;
return doIt(filledErrors);
}
if (!deep) {
doIt(filledErrors);
} else {
// if rule is required but the target object
// does not exist fail at the rule level and don't
// go deeper
if (rule.required && !data.value) {
if (rule.message !== undefined) {
filledErrors = [].concat(rule.message).map(complementError(rule, source));
} else if (options.error) {
filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
}
return doIt(filledErrors);
}
var fieldsSchema = {};
if (rule.defaultField) {
Object.keys(data.value).map(function (key) {
fieldsSchema[key] = rule.defaultField;
});
}
fieldsSchema = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, fieldsSchema), data.rule.fields);
var paredFieldsSchema = {};
Object.keys(fieldsSchema).forEach(function (field) {
var fieldSchema = fieldsSchema[field];
var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];
paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));
});
var schema = new Schema(paredFieldsSchema);
schema.messages(options.messages);
if (data.rule.options) {
data.rule.options.messages = options.messages;
data.rule.options.error = options.error;
}
schema.validate(data.value, data.rule.options || options, function (errs) {
var finalErrors = [];
if (filledErrors && filledErrors.length) {
finalErrors.push.apply(finalErrors, (0,toConsumableArray["default"])(filledErrors));
}
if (errs && errs.length) {
finalErrors.push.apply(finalErrors, (0,toConsumableArray["default"])(errs));
}
doIt(finalErrors.length ? finalErrors : null);
});
}
}
var res;
if (rule.asyncValidator) {
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
} else if (rule.validator) {
try {
res = rule.validator(rule, data.value, cb, data.source, options);
} catch (error) {
var _console$error, _console;
(_console$error = (_console = console).error) === null || _console$error === void 0 || _console$error.call(_console, error);
// rethrow to report error
if (!options.suppressValidatorError) {
setTimeout(function () {
throw error;
}, 0);
}
cb(error.message);
}
if (res === true) {
cb();
} else if (res === false) {
cb(typeof rule.message === 'function' ? rule.message(rule.fullField || rule.field) : rule.message || "".concat(rule.fullField || rule.field, " fails"));
} else if (res instanceof Array) {
cb(res);
} else if (res instanceof Error) {
cb(res.message);
}
}
if (res && res.then) {
res.then(function () {
return cb();
}, function (e) {
return cb(e);
});
}
}, function (results) {
complete(results);
}, source);
}
}, {
key: "getType",
value: function getType(rule) {
if (rule.type === undefined && rule.pattern instanceof RegExp) {
rule.type = 'pattern';
}
if (typeof rule.validator !== 'function' && rule.type && !es_validator.hasOwnProperty(rule.type)) {
throw new Error(format('Unknown rule type %s', rule.type));
}
return rule.type || 'string';
}
}, {
key: "getValidationMethod",
value: function getValidationMethod(rule) {
if (typeof rule.validator === 'function') {
return rule.validator;
}
var keys = Object.keys(rule);
var messageIndex = keys.indexOf('message');
if (messageIndex !== -1) {
keys.splice(messageIndex, 1);
}
if (keys.length === 1 && keys[0] === 'required') {
return es_validator.required;
}
return es_validator[this.getType(rule)] || undefined;
}
}]);
return Schema;
}();
// ========================= Static =========================
(0,defineProperty["default"])(Schema, "register", function register(type, validator) {
if (typeof validator !== 'function') {
throw new Error('Cannot register a validator by type, validator is not a function');
}
es_validator[type] = validator;
});
(0,defineProperty["default"])(Schema, "warning", util_warning);
(0,defineProperty["default"])(Schema, "messages", messages_messages);
(0,defineProperty["default"])(Schema, "validators", es_validator);
/* harmony default export */ var async_validator_es = (Schema);
;// ./node_modules/rc-field-form/es/utils/messages.js
var typeTemplate = "'${name}' is not a valid ${type}";
var defaultValidateMessages = {
default: "Validation error on field '${name}'",
required: "'${name}' is required",
enum: "'${name}' must be one of [${enum}]",
whitespace: "'${name}' cannot be empty",
date: {
format: "'${name}' is invalid for format date",
parse: "'${name}' could not be parsed as date",
invalid: "'${name}' is invalid date"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: "'${name}' must be exactly ${len} characters",
min: "'${name}' must be at least ${min} characters",
max: "'${name}' cannot be longer than ${max} characters",
range: "'${name}' must be between ${min} and ${max} characters"
},
number: {
len: "'${name}' must equal ${len}",
min: "'${name}' cannot be less than ${min}",
max: "'${name}' cannot be greater than ${max}",
range: "'${name}' must be between ${min} and ${max}"
},
array: {
len: "'${name}' must be exactly ${len} in length",
min: "'${name}' cannot be less than ${min} in length",
max: "'${name}' cannot be greater than ${max} in length",
range: "'${name}' must be between ${min} and ${max} in length"
},
pattern: {
mismatch: "'${name}' does not match pattern ${pattern}"
}
};
;// ./node_modules/rc-field-form/es/utils/validateUtil.js
// Remove incorrect original ts define
var AsyncValidator = async_validator_es;
/**
* Replace with template.
* `I'm ${name}` + { name: 'bamboo' } = I'm bamboo
*/
function replaceMessage(template, kv) {
return template.replace(/\\?\$\{\w+\}/g, function (str) {
if (str.startsWith('\\')) {
return str.slice(1);
}
var key = str.slice(2, -1);
return kv[key];
});
}
var CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';
function validateRule(_x, _x2, _x3, _x4, _x5) {
return _validateRule.apply(this, arguments);
}
/**
* We use `async-validator` to validate the value.
* But only check one value in a time to avoid namePath validate issue.
*/
function _validateRule() {
_validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
cloneRule = (0,objectSpread2["default"])({}, rule); // Bug of `async-validator`
// https://github.com/react-component/field-form/issues/316
// https://github.com/react-component/field-form/issues/313
delete cloneRule.ruleIndex;
// https://github.com/ant-design/ant-design/issues/40497#issuecomment-1422282378
AsyncValidator.warning = function () {
return void 0;
};
if (cloneRule.validator) {
originValidator = cloneRule.validator;
cloneRule.validator = function () {
try {
return originValidator.apply(void 0, arguments);
} catch (error) {
console.error(error);
return Promise.reject(CODE_LOGIC_ERROR);
}
};
}
// We should special handle array validate
subRuleField = null;
if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {
subRuleField = cloneRule.defaultField;
delete cloneRule.defaultField;
}
validator = new AsyncValidator((0,defineProperty["default"])({}, name, [cloneRule]));
messages = (0,set.merge)(defaultValidateMessages, options.validateMessages);
validator.messages(messages);
result = [];
_context2.prev = 10;
_context2.next = 13;
return Promise.resolve(validator.validate((0,defineProperty["default"])({}, name, value), (0,objectSpread2["default"])({}, options)));
case 13:
_context2.next = 18;
break;
case 15:
_context2.prev = 15;
_context2.t0 = _context2["catch"](10);
if (_context2.t0.errors) {
result = _context2.t0.errors.map(function (_ref4, index) {
var message = _ref4.message;
var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedMessage) ?
/*#__PURE__*/
// Wrap ReactNode with `key`
external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(mergedMessage, {
key: "error_".concat(index)
}) : mergedMessage;
});
}
case 18:
if (!(!result.length && subRuleField)) {
_context2.next = 23;
break;
}
_context2.next = 21;
return Promise.all(value.map(function (subValue, i) {
return validateRule("".concat(name, ".").concat(i), subValue, subRuleField, options, messageVariables);
}));
case 21:
subResults = _context2.sent;
return _context2.abrupt("return", subResults.reduce(function (prev, errors) {
return [].concat((0,toConsumableArray["default"])(prev), (0,toConsumableArray["default"])(errors));
}, []));
case 23:
// Replace message with variables
kv = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rule), {}, {
name: name,
enum: (rule.enum || []).join(', ')
}, messageVariables);
fillVariableResult = result.map(function (error) {
if (typeof error === 'string') {
return replaceMessage(error, kv);
}
return error;
});
return _context2.abrupt("return", fillVariableResult);
case 26:
case "end":
return _context2.stop();
}
}, _callee2, null, [[10, 15]]);
}));
return _validateRule.apply(this, arguments);
}
function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {
var name = namePath.join('.');
// Fill rule with context
var filledRules = rules.map(function (currentRule, ruleIndex) {
var originValidatorFunc = currentRule.validator;
var cloneRule = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, currentRule), {}, {
ruleIndex: ruleIndex
});
// Replace validator if needed
if (originValidatorFunc) {
cloneRule.validator = function (rule, val, callback) {
var hasPromise = false;
// Wrap callback only accept when promise not provided
var wrappedCallback = function wrappedCallback() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
// Wait a tick to make sure return type is a promise
Promise.resolve().then(function () {
(0,warning["default"])(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');
if (!hasPromise) {
callback.apply(void 0, args);
}
});
};
// Get promise
var promise = originValidatorFunc(rule, val, wrappedCallback);
hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';
/**
* 1. Use promise as the first priority.
* 2. If promise not exist, use callback with warning instead
*/
(0,warning["default"])(hasPromise, '`callback` is deprecated. Please return a promise instead.');
if (hasPromise) {
promise.then(function () {
callback();
}).catch(function (err) {
callback(err || ' ');
});
}
};
}
return cloneRule;
}).sort(function (_ref, _ref2) {
var w1 = _ref.warningOnly,
i1 = _ref.ruleIndex;
var w2 = _ref2.warningOnly,
i2 = _ref2.ruleIndex;
if (!!w1 === !!w2) {
// Let keep origin order
return i1 - i2;
}
if (w1) {
return 1;
}
return -1;
});
// Do validate rules
var summaryPromise;
if (validateFirst === true) {
// >>>>> Validate by serialization
summaryPromise = new Promise( /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
var i, rule, errors;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
i = 0;
case 1:
if (!(i < filledRules.length)) {
_context.next = 12;
break;
}
rule = filledRules[i];
_context.next = 5;
return validateRule(name, value, rule, options, messageVariables);
case 5:
errors = _context.sent;
if (!errors.length) {
_context.next = 9;
break;
}
reject([{
errors: errors,
rule: rule
}]);
return _context.abrupt("return");
case 9:
i += 1;
_context.next = 1;
break;
case 12:
/* eslint-enable */
resolve([]);
case 13:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x6, _x7) {
return _ref3.apply(this, arguments);
};
}());
} else {
// >>>>> Validate by parallel
var rulePromises = filledRules.map(function (rule) {
return validateRule(name, value, rule, options, messageVariables).then(function (errors) {
return {
errors: errors,
rule: rule
};
});
});
summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {
// Always change to rejection for Field to catch
return Promise.reject(errors);
});
}
// Internal catch error to avoid console error log.
summaryPromise.catch(function (e) {
return e;
});
return summaryPromise;
}
function finishOnAllFailed(_x8) {
return _finishOnAllFailed.apply(this, arguments);
}
function _finishOnAllFailed() {
_finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rulePromises) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Promise.all(rulePromises).then(function (errorsList) {
var _ref5;
var errors = (_ref5 = []).concat.apply(_ref5, (0,toConsumableArray["default"])(errorsList));
return errors;
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _finishOnAllFailed.apply(this, arguments);
}
function finishOnFirstFailed(_x9) {
return _finishOnFirstFailed.apply(this, arguments);
}
function _finishOnFirstFailed() {
_finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rulePromises) {
var count;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
count = 0;
return _context4.abrupt("return", new Promise(function (resolve) {
rulePromises.forEach(function (promise) {
promise.then(function (ruleError) {
if (ruleError.errors.length) {
resolve([ruleError]);
}
count += 1;
if (count === rulePromises.length) {
resolve([]);
}
});
});
}));
case 2:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _finishOnFirstFailed.apply(this, arguments);
}
// EXTERNAL MODULE: ./node_modules/rc-util/es/utils/get.js
var get = __webpack_require__("./node_modules/rc-util/es/utils/get.js");
;// ./node_modules/rc-field-form/es/utils/valueUtil.js
/**
* Convert name to internal supported format.
* This function should keep since we still thinking if need support like `a.b.c` format.
* 'a' => ['a']
* 123 => [123]
* ['a', 123] => ['a', 123]
*/
function getNamePath(path) {
return typeUtil_toArray(path);
}
function cloneByNamePathList(store, namePathList) {
var newStore = {};
namePathList.forEach(function (namePath) {
var value = (0,get["default"])(store, namePath);
newStore = (0,set["default"])(newStore, namePath, value);
});
return newStore;
}
/**
* Check if `namePathList` includes `namePath`.
* @param namePathList A list of `InternalNamePath[]`
* @param namePath Compare `InternalNamePath`
* @param partialMatch True will make `[a, b]` match `[a, b, c]`
*/
function containsNamePath(namePathList, namePath) {
var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return namePathList && namePathList.some(function (path) {
return matchNamePath(namePath, path, partialMatch);
});
}
/**
* Check if `namePath` is super set or equal of `subNamePath`.
* @param namePath A list of `InternalNamePath[]`
* @param subNamePath Compare `InternalNamePath`
* @param partialMatch True will make `[a, b]` match `[a, b, c]`
*/
function matchNamePath(namePath, subNamePath) {
var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (!namePath || !subNamePath) {
return false;
}
if (!partialMatch && namePath.length !== subNamePath.length) {
return false;
}
return subNamePath.every(function (nameUnit, i) {
return namePath[i] === nameUnit;
});
}
// Like `shallowEqual`, but we not check the data which may cause re-render
function isSimilar(source, target) {
if (source === target) {
return true;
}
if (!source && target || source && !target) {
return false;
}
if (!source || !target || (0,esm_typeof["default"])(source) !== 'object' || (0,esm_typeof["default"])(target) !== 'object') {
return false;
}
var sourceKeys = Object.keys(source);
var targetKeys = Object.keys(target);
var keys = new Set([].concat(sourceKeys, targetKeys));
return (0,toConsumableArray["default"])(keys).every(function (key) {
var sourceValue = source[key];
var targetValue = target[key];
if (typeof sourceValue === 'function' && typeof targetValue === 'function') {
return true;
}
return sourceValue === targetValue;
});
}
function defaultGetValueFromEvent(valuePropName) {
var event = arguments.length <= 1 ? undefined : arguments[1];
if (event && event.target && (0,esm_typeof["default"])(event.target) === 'object' && valuePropName in event.target) {
return event.target[valuePropName];
}
return event;
}
/**
* Moves an array item from one position in an array to another.
*
* Note: This is a pure function so a new array will be returned, instead
* of altering the array argument.
*
* @param array Array in which to move an item. (required)
* @param moveIndex The index of the item to move. (required)
* @param toIndex The index to move item at moveIndex to. (required)
*/
function valueUtil_move(array, moveIndex, toIndex) {
var length = array.length;
if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {
return array;
}
var item = array[moveIndex];
var diff = moveIndex - toIndex;
if (diff > 0) {
// move left
return [].concat((0,toConsumableArray["default"])(array.slice(0, toIndex)), [item], (0,toConsumableArray["default"])(array.slice(toIndex, moveIndex)), (0,toConsumableArray["default"])(array.slice(moveIndex + 1, length)));
}
if (diff < 0) {
// move right
return [].concat((0,toConsumableArray["default"])(array.slice(0, moveIndex)), (0,toConsumableArray["default"])(array.slice(moveIndex + 1, toIndex + 1)), [item], (0,toConsumableArray["default"])(array.slice(toIndex + 1, length)));
}
return array;
}
;// ./node_modules/rc-field-form/es/Field.js
var Field_excluded = ["name"];
var EMPTY_ERRORS = [];
function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {
if (typeof shouldUpdate === 'function') {
return shouldUpdate(prev, next, 'source' in info ? {
source: info.source
} : {});
}
return prevValue !== nextValue;
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
// We use Class instead of Hooks here since it will cost much code by using Hooks.
var Field = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(Field, _React$Component);
var _super = (0,createSuper["default"])(Field);
// ============================== Subscriptions ==============================
function Field(props) {
var _this;
(0,classCallCheck["default"])(this, Field);
_this = _super.call(this, props);
// Register on init
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
resetCount: 0
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "cancelRegisterFunc", null);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "mounted", false);
/**
* Follow state should not management in State since it will async update by React.
* This makes first render of form can not get correct state value.
*/
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "touched", false);
/**
* Mark when touched & validated. Currently only used for `dependencies`.
* Note that we do not think field with `initialValue` is dirty
* but this will be by `isFieldDirty` func.
*/
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "dirty", false);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "validatePromise", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "prevValidating", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "errors", EMPTY_ERRORS);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "warnings", EMPTY_ERRORS);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "cancelRegister", function () {
var _this$props = _this.props,
preserve = _this$props.preserve,
isListField = _this$props.isListField,
name = _this$props.name;
if (_this.cancelRegisterFunc) {
_this.cancelRegisterFunc(isListField, preserve, getNamePath(name));
}
_this.cancelRegisterFunc = null;
});
// ================================== Utils ==================================
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getNamePath", function () {
var _this$props2 = _this.props,
name = _this$props2.name,
fieldContext = _this$props2.fieldContext;
var _fieldContext$prefixN = fieldContext.prefixName,
prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;
return name !== undefined ? [].concat((0,toConsumableArray["default"])(prefixName), (0,toConsumableArray["default"])(name)) : [];
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getRules", function () {
var _this$props3 = _this.props,
_this$props3$rules = _this$props3.rules,
rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,
fieldContext = _this$props3.fieldContext;
return rules.map(function (rule) {
if (typeof rule === 'function') {
return rule(fieldContext);
}
return rule;
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "refresh", function () {
if (!_this.mounted) return;
/**
* Clean up current node.
*/
_this.setState(function (_ref) {
var resetCount = _ref.resetCount;
return {
resetCount: resetCount + 1
};
});
});
// Event should only trigger when meta changed
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "metaCache", null);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "triggerMetaEvent", function (destroy) {
var onMetaChange = _this.props.onMetaChange;
if (onMetaChange) {
var _meta = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.getMeta()), {}, {
destroy: destroy
});
if (!(0,isEqual["default"])(_this.metaCache, _meta)) {
onMetaChange(_meta);
}
_this.metaCache = _meta;
} else {
_this.metaCache = null;
}
});
// ========================= Field Entity Interfaces =========================
// Trigger by store update. Check if need update the component
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onStoreChange", function (prevStore, namePathList, info) {
var _this$props4 = _this.props,
shouldUpdate = _this$props4.shouldUpdate,
_this$props4$dependen = _this$props4.dependencies,
dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,
onReset = _this$props4.onReset;
var store = info.store;
var namePath = _this.getNamePath();
var prevValue = _this.getValue(prevStore);
var curValue = _this.getValue(store);
var namePathMatch = namePathList && containsNamePath(namePathList, namePath);
// `setFieldsValue` is a quick access to update related status
if (info.type === 'valueUpdate' && info.source === 'external' && !(0,isEqual["default"])(prevValue, curValue)) {
_this.touched = true;
_this.dirty = true;
_this.validatePromise = null;
_this.errors = EMPTY_ERRORS;
_this.warnings = EMPTY_ERRORS;
_this.triggerMetaEvent();
}
switch (info.type) {
case 'reset':
if (!namePathList || namePathMatch) {
// Clean up state
_this.touched = false;
_this.dirty = false;
_this.validatePromise = undefined;
_this.errors = EMPTY_ERRORS;
_this.warnings = EMPTY_ERRORS;
_this.triggerMetaEvent();
onReset === null || onReset === void 0 || onReset();
_this.refresh();
return;
}
break;
/**
* In case field with `preserve = false` nest deps like:
* - A = 1 => show B
* - B = 1 => show C
* - Reset A, need clean B, C
*/
case 'remove':
{
if (shouldUpdate && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
_this.reRender();
return;
}
break;
}
case 'setField':
{
var data = info.data;
if (namePathMatch) {
if ('touched' in data) {
_this.touched = data.touched;
}
if ('validating' in data && !('originRCField' in data)) {
_this.validatePromise = data.validating ? Promise.resolve([]) : null;
}
if ('errors' in data) {
_this.errors = data.errors || EMPTY_ERRORS;
}
if ('warnings' in data) {
_this.warnings = data.warnings || EMPTY_ERRORS;
}
_this.dirty = true;
_this.triggerMetaEvent();
_this.reRender();
return;
} else if ('value' in data && containsNamePath(namePathList, namePath, true)) {
// Contains path with value should also check
_this.reRender();
return;
}
// Handle update by `setField` with `shouldUpdate`
if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
_this.reRender();
return;
}
break;
}
case 'dependenciesUpdate':
{
/**
* Trigger when marked `dependencies` updated. Related fields will all update
*/
var dependencyList = dependencies.map(getNamePath);
// No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be
// emitted earlier and they will work there
// If set it may cause unnecessary twice rerendering
if (dependencyList.some(function (dependency) {
return containsNamePath(info.relatedFields, dependency);
})) {
_this.reRender();
return;
}
break;
}
default:
// 1. If `namePath` exists in `namePathList`, means it's related value and should update
// For example <List name="list"><Field name={['list', 0]}></List>
// If `namePathList` is [['list']] (List value update), Field should be updated
// If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated
// 2.
// 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,
// don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`
// is not provided
// 2.2 If `shouldUpdate` provided, use customize logic to update the field
// else to check if value changed
if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
_this.reRender();
return;
}
break;
}
if (shouldUpdate === true) {
_this.reRender();
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "validateRules", function (options) {
// We should fixed namePath & value to avoid developer change then by form function
var namePath = _this.getNamePath();
var currentValue = _this.getValue();
var _ref2 = options || {},
triggerName = _ref2.triggerName,
_ref2$validateOnly = _ref2.validateOnly,
validateOnly = _ref2$validateOnly === void 0 ? false : _ref2$validateOnly;
// Force change to async to avoid rule OOD under renderProps field
var rootPromise = Promise.resolve().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var _this$props5, _this$props5$validate, validateFirst, messageVariables, validateDebounce, filteredRules, promise;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (_this.mounted) {
_context.next = 2;
break;
}
return _context.abrupt("return", []);
case 2:
_this$props5 = _this.props, _this$props5$validate = _this$props5.validateFirst, validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate, messageVariables = _this$props5.messageVariables, validateDebounce = _this$props5.validateDebounce; // Start validate
filteredRules = _this.getRules();
if (triggerName) {
filteredRules = filteredRules.filter(function (rule) {
return rule;
}).filter(function (rule) {
var validateTrigger = rule.validateTrigger;
if (!validateTrigger) {
return true;
}
var triggerList = typeUtil_toArray(validateTrigger);
return triggerList.includes(triggerName);
});
}
// Wait for debounce. Skip if no `triggerName` since its from `validateFields / submit`
if (!(validateDebounce && triggerName)) {
_context.next = 10;
break;
}
_context.next = 8;
return new Promise(function (resolve) {
setTimeout(resolve, validateDebounce);
});
case 8:
if (!(_this.validatePromise !== rootPromise)) {
_context.next = 10;
break;
}
return _context.abrupt("return", []);
case 10:
promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);
promise.catch(function (e) {
return e;
}).then(function () {
var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;
if (_this.validatePromise === rootPromise) {
var _ruleErrors$forEach;
_this.validatePromise = null;
// Get errors & warnings
var nextErrors = [];
var nextWarnings = [];
(_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref4) {
var warningOnly = _ref4.rule.warningOnly,
_ref4$errors = _ref4.errors,
errors = _ref4$errors === void 0 ? EMPTY_ERRORS : _ref4$errors;
if (warningOnly) {
nextWarnings.push.apply(nextWarnings, (0,toConsumableArray["default"])(errors));
} else {
nextErrors.push.apply(nextErrors, (0,toConsumableArray["default"])(errors));
}
});
_this.errors = nextErrors;
_this.warnings = nextWarnings;
_this.triggerMetaEvent();
_this.reRender();
}
});
return _context.abrupt("return", promise);
case 13:
case "end":
return _context.stop();
}
}, _callee);
})));
if (validateOnly) {
return rootPromise;
}
_this.validatePromise = rootPromise;
_this.dirty = true;
_this.errors = EMPTY_ERRORS;
_this.warnings = EMPTY_ERRORS;
_this.triggerMetaEvent();
// Force trigger re-render since we need sync renderProps with new meta
_this.reRender();
return rootPromise;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isFieldValidating", function () {
return !!_this.validatePromise;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isFieldTouched", function () {
return _this.touched;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isFieldDirty", function () {
// Touched or validate or has initialValue
if (_this.dirty || _this.props.initialValue !== undefined) {
return true;
}
// Form set initialValue
var fieldContext = _this.props.fieldContext;
var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),
getInitialValue = _fieldContext$getInte.getInitialValue;
if (getInitialValue(_this.getNamePath()) !== undefined) {
return true;
}
return false;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getErrors", function () {
return _this.errors;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getWarnings", function () {
return _this.warnings;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isListField", function () {
return _this.props.isListField;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isList", function () {
return _this.props.isList;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isPreserve", function () {
return _this.props.preserve;
});
// ============================= Child Component =============================
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getMeta", function () {
// Make error & validating in cache to save perf
_this.prevValidating = _this.isFieldValidating();
var meta = {
touched: _this.isFieldTouched(),
validating: _this.prevValidating,
errors: _this.errors,
warnings: _this.warnings,
name: _this.getNamePath(),
validated: _this.validatePromise === null
};
return meta;
});
// Only return validate child node. If invalidate, will do nothing about field.
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getOnlyChild", function (children) {
// Support render props
if (typeof children === 'function') {
var _meta2 = _this.getMeta();
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.getOnlyChild(children(_this.getControlled(), _meta2, _this.props.fieldContext))), {}, {
isFunction: true
});
}
// Filed element only
var childList = (0,toArray["default"])(children);
if (childList.length !== 1 || ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(childList[0])) {
return {
child: childList,
isFunction: false
};
}
return {
child: childList[0],
isFunction: false
};
});
// ============================== Field Control ==============================
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getValue", function (store) {
var getFieldsValue = _this.props.fieldContext.getFieldsValue;
var namePath = _this.getNamePath();
return (0,get["default"])(store || getFieldsValue(true), namePath);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getControlled", function () {
var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _this$props6 = _this.props,
name = _this$props6.name,
trigger = _this$props6.trigger,
validateTrigger = _this$props6.validateTrigger,
getValueFromEvent = _this$props6.getValueFromEvent,
normalize = _this$props6.normalize,
valuePropName = _this$props6.valuePropName,
getValueProps = _this$props6.getValueProps,
fieldContext = _this$props6.fieldContext;
var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;
var namePath = _this.getNamePath();
var getInternalHooks = fieldContext.getInternalHooks,
getFieldsValue = fieldContext.getFieldsValue;
var _getInternalHooks = getInternalHooks(HOOK_MARK),
dispatch = _getInternalHooks.dispatch;
var value = _this.getValue();
var mergedGetValueProps = getValueProps || function (val) {
return (0,defineProperty["default"])({}, valuePropName, val);
};
var originTriggerFunc = childProps[trigger];
var valueProps = name !== undefined ? mergedGetValueProps(value) : {};
// warning when prop value is function
if ( true && valueProps) {
Object.keys(valueProps).forEach(function (key) {
(0,warning["default"])(typeof valueProps[key] !== 'function', "It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(key, ")"));
});
}
var control = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, childProps), valueProps);
// Add trigger
control[trigger] = function () {
// Mark as touched
_this.touched = true;
_this.dirty = true;
_this.triggerMetaEvent();
var newValue;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (getValueFromEvent) {
newValue = getValueFromEvent.apply(void 0, args);
} else {
newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));
}
if (normalize) {
newValue = normalize(newValue, value, getFieldsValue(true));
}
if (newValue !== value) {
dispatch({
type: 'updateValue',
namePath: namePath,
value: newValue
});
}
if (originTriggerFunc) {
originTriggerFunc.apply(void 0, args);
}
};
// Add validateTrigger
var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []);
validateTriggerList.forEach(function (triggerName) {
// Wrap additional function of component, so that we can get latest value from store
var originTrigger = control[triggerName];
control[triggerName] = function () {
if (originTrigger) {
originTrigger.apply(void 0, arguments);
}
// Always use latest rules
var rules = _this.props.rules;
if (rules && rules.length) {
// We dispatch validate to root,
// since it will update related data with other field with same name
dispatch({
type: 'validateField',
namePath: namePath,
triggerName: triggerName
});
}
};
});
return control;
});
if (props.fieldContext) {
var getInternalHooks = props.fieldContext.getInternalHooks;
var _getInternalHooks2 = getInternalHooks(HOOK_MARK),
initEntityValue = _getInternalHooks2.initEntityValue;
initEntityValue((0,assertThisInitialized["default"])(_this));
}
return _this;
}
(0,createClass["default"])(Field, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this$props7 = this.props,
shouldUpdate = _this$props7.shouldUpdate,
fieldContext = _this$props7.fieldContext;
this.mounted = true;
// Register on init
if (fieldContext) {
var getInternalHooks = fieldContext.getInternalHooks;
var _getInternalHooks3 = getInternalHooks(HOOK_MARK),
registerField = _getInternalHooks3.registerField;
this.cancelRegisterFunc = registerField(this);
}
// One more render for component in case fields not ready
if (shouldUpdate === true) {
this.reRender();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.cancelRegister();
this.triggerMetaEvent(true);
this.mounted = false;
}
}, {
key: "reRender",
value: function reRender() {
if (!this.mounted) return;
this.forceUpdate();
}
}, {
key: "render",
value: function render() {
var resetCount = this.state.resetCount;
var children = this.props.children;
var _this$getOnlyChild = this.getOnlyChild(children),
child = _this$getOnlyChild.child,
isFunction = _this$getOnlyChild.isFunction;
// Not need to `cloneElement` since user can handle this in render function self
var returnChildNode;
if (isFunction) {
returnChildNode = child;
} else if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) {
returnChildNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, this.getControlled(child.props));
} else {
(0,warning["default"])(!child, '`children` of Field is not validate ReactElement.');
returnChildNode = child;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
key: resetCount
}, returnChildNode);
}
}]);
return Field;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
(0,defineProperty["default"])(Field, "contextType", FieldContext);
(0,defineProperty["default"])(Field, "defaultProps", {
trigger: 'onChange',
valuePropName: 'value'
});
function WrapperField(_ref6) {
var _restProps$isListFiel;
var name = _ref6.name,
restProps = (0,objectWithoutProperties["default"])(_ref6, Field_excluded);
var fieldContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FieldContext);
var listContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_ListContext);
var namePath = name !== undefined ? getNamePath(name) : undefined;
var isMergedListField = (_restProps$isListFiel = restProps.isListField) !== null && _restProps$isListFiel !== void 0 ? _restProps$isListFiel : !!listContext;
var key = 'keep';
if (!isMergedListField) {
key = "_".concat((namePath || []).join('_'));
}
// Warning if it's a directly list field.
// We can still support multiple level field preserve.
if ( true && restProps.preserve === false && isMergedListField && namePath.length <= 1) {
(0,warning["default"])(false, '`preserve` should not apply on Form.List fields.');
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Field, (0,esm_extends["default"])({
key: key,
name: namePath,
isListField: isMergedListField
}, restProps, {
fieldContext: fieldContext
}));
}
/* harmony default export */ var es_Field = (WrapperField);
;// ./node_modules/rc-field-form/es/List.js
function List(_ref) {
var name = _ref.name,
initialValue = _ref.initialValue,
children = _ref.children,
rules = _ref.rules,
validateTrigger = _ref.validateTrigger,
isListField = _ref.isListField;
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FieldContext);
var wrapperListContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_ListContext);
var keyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
keys: [],
id: 0
});
var keyManager = keyRef.current;
var prefixName = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var parentPrefixName = getNamePath(context.prefixName) || [];
return [].concat((0,toConsumableArray["default"])(parentPrefixName), (0,toConsumableArray["default"])(getNamePath(name)));
}, [context.prefixName, name]);
var fieldContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, context), {}, {
prefixName: prefixName
});
}, [context, prefixName]);
// List context
var listContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
getKey: function getKey(namePath) {
var len = prefixName.length;
var pathName = namePath[len];
return [keyManager.keys[pathName], namePath.slice(len + 1)];
}
};
}, [prefixName]);
// User should not pass `children` as other type.
if (typeof children !== 'function') {
(0,warning["default"])(false, 'Form.List only accepts function as children.');
return null;
}
var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {
var source = _ref2.source;
if (source === 'internal') {
return false;
}
return prevValue !== nextValue;
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ListContext.Provider, {
value: listContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FieldContext.Provider, {
value: fieldContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Field, {
name: [],
shouldUpdate: shouldUpdate,
rules: rules,
validateTrigger: validateTrigger,
initialValue: initialValue,
isList: true,
isListField: isListField !== null && isListField !== void 0 ? isListField : !!wrapperListContext
}, function (_ref3, meta) {
var _ref3$value = _ref3.value,
value = _ref3$value === void 0 ? [] : _ref3$value,
onChange = _ref3.onChange;
var getFieldValue = context.getFieldValue;
var getNewValue = function getNewValue() {
var values = getFieldValue(prefixName || []);
return values || [];
};
/**
* Always get latest value in case user update fields by `form` api.
*/
var operations = {
add: function add(defaultValue, index) {
// Mapping keys
var newValue = getNewValue();
if (index >= 0 && index <= newValue.length) {
keyManager.keys = [].concat((0,toConsumableArray["default"])(keyManager.keys.slice(0, index)), [keyManager.id], (0,toConsumableArray["default"])(keyManager.keys.slice(index)));
onChange([].concat((0,toConsumableArray["default"])(newValue.slice(0, index)), [defaultValue], (0,toConsumableArray["default"])(newValue.slice(index))));
} else {
if ( true && (index < 0 || index > newValue.length)) {
(0,warning["default"])(false, 'The second parameter of the add function should be a valid positive number.');
}
keyManager.keys = [].concat((0,toConsumableArray["default"])(keyManager.keys), [keyManager.id]);
onChange([].concat((0,toConsumableArray["default"])(newValue), [defaultValue]));
}
keyManager.id += 1;
},
remove: function remove(index) {
var newValue = getNewValue();
var indexSet = new Set(Array.isArray(index) ? index : [index]);
if (indexSet.size <= 0) {
return;
}
keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {
return !indexSet.has(keysIndex);
});
// Trigger store change
onChange(newValue.filter(function (_, valueIndex) {
return !indexSet.has(valueIndex);
}));
},
move: function move(from, to) {
if (from === to) {
return;
}
var newValue = getNewValue();
// Do not handle out of range
if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {
return;
}
keyManager.keys = valueUtil_move(keyManager.keys, from, to);
// Trigger store change
onChange(valueUtil_move(newValue, from, to));
}
};
var listValue = value || [];
if (!Array.isArray(listValue)) {
listValue = [];
if (true) {
(0,warning["default"])(false, "Current value of '".concat(prefixName.join(' > '), "' is not an array type."));
}
}
return children(listValue.map(function (__, index) {
var key = keyManager.keys[index];
if (key === undefined) {
keyManager.keys[index] = keyManager.id;
key = keyManager.keys[index];
keyManager.id += 1;
}
return {
name: index,
key: key,
isListField: true
};
}), operations, meta);
})));
}
/* harmony default export */ var es_List = (List);
;// ./node_modules/rc-field-form/es/utils/asyncUtil.js
function allPromiseFinish(promiseList) {
var hasError = false;
var count = promiseList.length;
var results = [];
if (!promiseList.length) {
return Promise.resolve([]);
}
return new Promise(function (resolve, reject) {
promiseList.forEach(function (promise, index) {
promise.catch(function (e) {
hasError = true;
return e;
}).then(function (result) {
count -= 1;
results[index] = result;
if (count > 0) {
return;
}
if (hasError) {
reject(results);
}
resolve(results);
});
});
});
}
;// ./node_modules/rc-field-form/es/utils/NameMap.js
var SPLIT = '__@field_split__';
/**
* Convert name path into string to fast the fetch speed of Map.
*/
function normalize(namePath) {
return namePath.map(function (cell) {
return "".concat((0,esm_typeof["default"])(cell), ":").concat(cell);
})
// Magic split
.join(SPLIT);
}
/**
* NameMap like a `Map` but accepts `string[]` as key.
*/
var NameMap = /*#__PURE__*/function () {
function NameMap() {
(0,classCallCheck["default"])(this, NameMap);
(0,defineProperty["default"])(this, "kvs", new Map());
}
(0,createClass["default"])(NameMap, [{
key: "set",
value: function set(key, value) {
this.kvs.set(normalize(key), value);
}
}, {
key: "get",
value: function get(key) {
return this.kvs.get(normalize(key));
}
}, {
key: "update",
value: function update(key, updater) {
var origin = this.get(key);
var next = updater(origin);
if (!next) {
this.delete(key);
} else {
this.set(key, next);
}
}
}, {
key: "delete",
value: function _delete(key) {
this.kvs.delete(normalize(key));
}
// Since we only use this in test, let simply realize this
}, {
key: "map",
value: function map(callback) {
return (0,toConsumableArray["default"])(this.kvs.entries()).map(function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 2),
key = _ref2[0],
value = _ref2[1];
var cells = key.split(SPLIT);
return callback({
key: cells.map(function (cell) {
var _cell$match = cell.match(/^([^:]*):(.*)$/),
_cell$match2 = (0,slicedToArray["default"])(_cell$match, 3),
type = _cell$match2[1],
unit = _cell$match2[2];
return type === 'number' ? Number(unit) : unit;
}),
value: value
});
});
}
}, {
key: "toJSON",
value: function toJSON() {
var json = {};
this.map(function (_ref3) {
var key = _ref3.key,
value = _ref3.value;
json[key.join('.')] = value;
return null;
});
return json;
}
}]);
return NameMap;
}();
/* harmony default export */ var utils_NameMap = (NameMap);
;// ./node_modules/rc-field-form/es/useForm.js
var useForm_excluded = ["name"];
var FormStore = /*#__PURE__*/(0,createClass["default"])(function FormStore(forceRootUpdate) {
var _this = this;
(0,classCallCheck["default"])(this, FormStore);
(0,defineProperty["default"])(this, "formHooked", false);
(0,defineProperty["default"])(this, "forceRootUpdate", void 0);
(0,defineProperty["default"])(this, "subscribable", true);
(0,defineProperty["default"])(this, "store", {});
(0,defineProperty["default"])(this, "fieldEntities", []);
(0,defineProperty["default"])(this, "initialValues", {});
(0,defineProperty["default"])(this, "callbacks", {});
(0,defineProperty["default"])(this, "validateMessages", null);
(0,defineProperty["default"])(this, "preserve", null);
(0,defineProperty["default"])(this, "lastValidatePromise", null);
(0,defineProperty["default"])(this, "getForm", function () {
return {
getFieldValue: _this.getFieldValue,
getFieldsValue: _this.getFieldsValue,
getFieldError: _this.getFieldError,
getFieldWarning: _this.getFieldWarning,
getFieldsError: _this.getFieldsError,
isFieldsTouched: _this.isFieldsTouched,
isFieldTouched: _this.isFieldTouched,
isFieldValidating: _this.isFieldValidating,
isFieldsValidating: _this.isFieldsValidating,
resetFields: _this.resetFields,
setFields: _this.setFields,
setFieldValue: _this.setFieldValue,
setFieldsValue: _this.setFieldsValue,
validateFields: _this.validateFields,
submit: _this.submit,
_init: true,
getInternalHooks: _this.getInternalHooks
};
});
// ======================== Internal Hooks ========================
(0,defineProperty["default"])(this, "getInternalHooks", function (key) {
if (key === HOOK_MARK) {
_this.formHooked = true;
return {
dispatch: _this.dispatch,
initEntityValue: _this.initEntityValue,
registerField: _this.registerField,
useSubscribe: _this.useSubscribe,
setInitialValues: _this.setInitialValues,
destroyForm: _this.destroyForm,
setCallbacks: _this.setCallbacks,
setValidateMessages: _this.setValidateMessages,
getFields: _this.getFields,
setPreserve: _this.setPreserve,
getInitialValue: _this.getInitialValue,
registerWatch: _this.registerWatch
};
}
(0,warning["default"])(false, '`getInternalHooks` is internal usage. Should not call directly.');
return null;
});
(0,defineProperty["default"])(this, "useSubscribe", function (subscribable) {
_this.subscribable = subscribable;
});
/**
* Record prev Form unmount fieldEntities which config preserve false.
* This need to be refill with initialValues instead of store value.
*/
(0,defineProperty["default"])(this, "prevWithoutPreserves", null);
/**
* First time `setInitialValues` should update store with initial value
*/
(0,defineProperty["default"])(this, "setInitialValues", function (initialValues, init) {
_this.initialValues = initialValues || {};
if (init) {
var _this$prevWithoutPres;
var nextStore = (0,set.merge)(initialValues, _this.store);
// We will take consider prev form unmount fields.
// When the field is not `preserve`, we need fill this with initialValues instead of store.
// eslint-disable-next-line array-callback-return
(_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 || _this$prevWithoutPres.map(function (_ref) {
var namePath = _ref.key;
nextStore = (0,set["default"])(nextStore, namePath, (0,get["default"])(initialValues, namePath));
});
_this.prevWithoutPreserves = null;
_this.updateStore(nextStore);
}
});
(0,defineProperty["default"])(this, "destroyForm", function (clearOnDestroy) {
if (clearOnDestroy) {
// destroy form reset store
_this.updateStore({});
} else {
// Fill preserve fields
var prevWithoutPreserves = new utils_NameMap();
_this.getFieldEntities(true).forEach(function (entity) {
if (!_this.isMergedPreserve(entity.isPreserve())) {
prevWithoutPreserves.set(entity.getNamePath(), true);
}
});
_this.prevWithoutPreserves = prevWithoutPreserves;
}
});
(0,defineProperty["default"])(this, "getInitialValue", function (namePath) {
var initValue = (0,get["default"])(_this.initialValues, namePath);
// Not cloneDeep when without `namePath`
return namePath.length ? (0,set.merge)(initValue) : initValue;
});
(0,defineProperty["default"])(this, "setCallbacks", function (callbacks) {
_this.callbacks = callbacks;
});
(0,defineProperty["default"])(this, "setValidateMessages", function (validateMessages) {
_this.validateMessages = validateMessages;
});
(0,defineProperty["default"])(this, "setPreserve", function (preserve) {
_this.preserve = preserve;
});
// ============================= Watch ============================
(0,defineProperty["default"])(this, "watchList", []);
(0,defineProperty["default"])(this, "registerWatch", function (callback) {
_this.watchList.push(callback);
return function () {
_this.watchList = _this.watchList.filter(function (fn) {
return fn !== callback;
});
};
});
(0,defineProperty["default"])(this, "notifyWatch", function () {
var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
// No need to cost perf when nothing need to watch
if (_this.watchList.length) {
var values = _this.getFieldsValue();
var allValues = _this.getFieldsValue(true);
_this.watchList.forEach(function (callback) {
callback(values, allValues, namePath);
});
}
});
// ========================== Dev Warning =========================
(0,defineProperty["default"])(this, "timeoutId", null);
(0,defineProperty["default"])(this, "warningUnhooked", function () {
if ( true && !_this.timeoutId && typeof window !== 'undefined') {
_this.timeoutId = setTimeout(function () {
_this.timeoutId = null;
if (!_this.formHooked) {
(0,warning["default"])(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');
}
});
}
});
// ============================ Store =============================
(0,defineProperty["default"])(this, "updateStore", function (nextStore) {
_this.store = nextStore;
});
// ============================ Fields ============================
/**
* Get registered field entities.
* @param pure Only return field which has a `name`. Default: false
*/
(0,defineProperty["default"])(this, "getFieldEntities", function () {
var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (!pure) {
return _this.fieldEntities;
}
return _this.fieldEntities.filter(function (field) {
return field.getNamePath().length;
});
});
(0,defineProperty["default"])(this, "getFieldsMap", function () {
var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var cache = new utils_NameMap();
_this.getFieldEntities(pure).forEach(function (field) {
var namePath = field.getNamePath();
cache.set(namePath, field);
});
return cache;
});
(0,defineProperty["default"])(this, "getFieldEntitiesForNamePathList", function (nameList) {
if (!nameList) {
return _this.getFieldEntities(true);
}
var cache = _this.getFieldsMap(true);
return nameList.map(function (name) {
var namePath = getNamePath(name);
return cache.get(namePath) || {
INVALIDATE_NAME_PATH: getNamePath(name)
};
});
});
(0,defineProperty["default"])(this, "getFieldsValue", function (nameList, filterFunc) {
_this.warningUnhooked();
// Fill args
var mergedNameList;
var mergedFilterFunc;
var mergedStrict;
if (nameList === true || Array.isArray(nameList)) {
mergedNameList = nameList;
mergedFilterFunc = filterFunc;
} else if (nameList && (0,esm_typeof["default"])(nameList) === 'object') {
mergedStrict = nameList.strict;
mergedFilterFunc = nameList.filter;
}
if (mergedNameList === true && !mergedFilterFunc) {
return _this.store;
}
var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(mergedNameList) ? mergedNameList : null);
var filteredNameList = [];
fieldEntities.forEach(function (entity) {
var _isListField, _ref3;
var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();
// Ignore when it's a list item and not specific the namePath,
// since parent field is already take in count
if (mergedStrict) {
var _isList, _ref2;
if ((_isList = (_ref2 = entity).isList) !== null && _isList !== void 0 && _isList.call(_ref2)) {
return;
}
} else if (!mergedNameList && (_isListField = (_ref3 = entity).isListField) !== null && _isListField !== void 0 && _isListField.call(_ref3)) {
return;
}
if (!mergedFilterFunc) {
filteredNameList.push(namePath);
} else {
var meta = 'getMeta' in entity ? entity.getMeta() : null;
if (mergedFilterFunc(meta)) {
filteredNameList.push(namePath);
}
}
});
return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));
});
(0,defineProperty["default"])(this, "getFieldValue", function (name) {
_this.warningUnhooked();
var namePath = getNamePath(name);
return (0,get["default"])(_this.store, namePath);
});
(0,defineProperty["default"])(this, "getFieldsError", function (nameList) {
_this.warningUnhooked();
var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);
return fieldEntities.map(function (entity, index) {
if (entity && !('INVALIDATE_NAME_PATH' in entity)) {
return {
name: entity.getNamePath(),
errors: entity.getErrors(),
warnings: entity.getWarnings()
};
}
return {
name: getNamePath(nameList[index]),
errors: [],
warnings: []
};
});
});
(0,defineProperty["default"])(this, "getFieldError", function (name) {
_this.warningUnhooked();
var namePath = getNamePath(name);
var fieldError = _this.getFieldsError([namePath])[0];
return fieldError.errors;
});
(0,defineProperty["default"])(this, "getFieldWarning", function (name) {
_this.warningUnhooked();
var namePath = getNamePath(name);
var fieldError = _this.getFieldsError([namePath])[0];
return fieldError.warnings;
});
(0,defineProperty["default"])(this, "isFieldsTouched", function () {
_this.warningUnhooked();
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var arg0 = args[0],
arg1 = args[1];
var namePathList;
var isAllFieldsTouched = false;
if (args.length === 0) {
namePathList = null;
} else if (args.length === 1) {
if (Array.isArray(arg0)) {
namePathList = arg0.map(getNamePath);
isAllFieldsTouched = false;
} else {
namePathList = null;
isAllFieldsTouched = arg0;
}
} else {
namePathList = arg0.map(getNamePath);
isAllFieldsTouched = arg1;
}
var fieldEntities = _this.getFieldEntities(true);
var isFieldTouched = function isFieldTouched(field) {
return field.isFieldTouched();
};
// ===== Will get fully compare when not config namePathList =====
if (!namePathList) {
return isAllFieldsTouched ? fieldEntities.every(function (entity) {
return isFieldTouched(entity) || entity.isList();
}) : fieldEntities.some(isFieldTouched);
}
// Generate a nest tree for validate
var map = new utils_NameMap();
namePathList.forEach(function (shortNamePath) {
map.set(shortNamePath, []);
});
fieldEntities.forEach(function (field) {
var fieldNamePath = field.getNamePath();
// Find matched entity and put into list
namePathList.forEach(function (shortNamePath) {
if (shortNamePath.every(function (nameUnit, i) {
return fieldNamePath[i] === nameUnit;
})) {
map.update(shortNamePath, function (list) {
return [].concat((0,toConsumableArray["default"])(list), [field]);
});
}
});
});
// Check if NameMap value is touched
var isNamePathListTouched = function isNamePathListTouched(entities) {
return entities.some(isFieldTouched);
};
var namePathListEntities = map.map(function (_ref4) {
var value = _ref4.value;
return value;
});
return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);
});
(0,defineProperty["default"])(this, "isFieldTouched", function (name) {
_this.warningUnhooked();
return _this.isFieldsTouched([name]);
});
(0,defineProperty["default"])(this, "isFieldsValidating", function (nameList) {
_this.warningUnhooked();
var fieldEntities = _this.getFieldEntities();
if (!nameList) {
return fieldEntities.some(function (testField) {
return testField.isFieldValidating();
});
}
var namePathList = nameList.map(getNamePath);
return fieldEntities.some(function (testField) {
var fieldNamePath = testField.getNamePath();
return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();
});
});
(0,defineProperty["default"])(this, "isFieldValidating", function (name) {
_this.warningUnhooked();
return _this.isFieldsValidating([name]);
});
/**
* Reset Field with field `initialValue` prop.
* Can pass `entities` or `namePathList` or just nothing.
*/
(0,defineProperty["default"])(this, "resetWithFieldInitialValue", function () {
var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
// Create cache
var cache = new utils_NameMap();
var fieldEntities = _this.getFieldEntities(true);
fieldEntities.forEach(function (field) {
var initialValue = field.props.initialValue;
var namePath = field.getNamePath();
// Record only if has `initialValue`
if (initialValue !== undefined) {
var records = cache.get(namePath) || new Set();
records.add({
entity: field,
value: initialValue
});
cache.set(namePath, records);
}
});
// Reset
var resetWithFields = function resetWithFields(entities) {
entities.forEach(function (field) {
var initialValue = field.props.initialValue;
if (initialValue !== undefined) {
var namePath = field.getNamePath();
var formInitialValue = _this.getInitialValue(namePath);
if (formInitialValue !== undefined) {
// Warning if conflict with form initialValues and do not modify value
(0,warning["default"])(false, "Form already set 'initialValues' with path '".concat(namePath.join('.'), "'. Field can not overwrite it."));
} else {
var records = cache.get(namePath);
if (records && records.size > 1) {
// Warning if multiple field set `initialValue`and do not modify value
(0,warning["default"])(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick."));
} else if (records) {
var originValue = _this.getFieldValue(namePath);
var isListField = field.isListField();
// Set `initialValue`
if (!isListField && (!info.skipExist || originValue === undefined)) {
_this.updateStore((0,set["default"])(_this.store, namePath, (0,toConsumableArray["default"])(records)[0].value));
}
}
}
}
});
};
var requiredFieldEntities;
if (info.entities) {
requiredFieldEntities = info.entities;
} else if (info.namePathList) {
requiredFieldEntities = [];
info.namePathList.forEach(function (namePath) {
var records = cache.get(namePath);
if (records) {
var _requiredFieldEntitie;
(_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, (0,toConsumableArray["default"])((0,toConsumableArray["default"])(records).map(function (r) {
return r.entity;
})));
}
});
} else {
requiredFieldEntities = fieldEntities;
}
resetWithFields(requiredFieldEntities);
});
(0,defineProperty["default"])(this, "resetFields", function (nameList) {
_this.warningUnhooked();
var prevStore = _this.store;
if (!nameList) {
_this.updateStore((0,set.merge)(_this.initialValues));
_this.resetWithFieldInitialValue();
_this.notifyObservers(prevStore, null, {
type: 'reset'
});
_this.notifyWatch();
return;
}
// Reset by `nameList`
var namePathList = nameList.map(getNamePath);
namePathList.forEach(function (namePath) {
var initialValue = _this.getInitialValue(namePath);
_this.updateStore((0,set["default"])(_this.store, namePath, initialValue));
});
_this.resetWithFieldInitialValue({
namePathList: namePathList
});
_this.notifyObservers(prevStore, namePathList, {
type: 'reset'
});
_this.notifyWatch(namePathList);
});
(0,defineProperty["default"])(this, "setFields", function (fields) {
_this.warningUnhooked();
var prevStore = _this.store;
var namePathList = [];
fields.forEach(function (fieldData) {
var name = fieldData.name,
data = (0,objectWithoutProperties["default"])(fieldData, useForm_excluded);
var namePath = getNamePath(name);
namePathList.push(namePath);
// Value
if ('value' in data) {
_this.updateStore((0,set["default"])(_this.store, namePath, data.value));
}
_this.notifyObservers(prevStore, [namePath], {
type: 'setField',
data: fieldData
});
});
_this.notifyWatch(namePathList);
});
(0,defineProperty["default"])(this, "getFields", function () {
var entities = _this.getFieldEntities(true);
var fields = entities.map(function (field) {
var namePath = field.getNamePath();
var meta = field.getMeta();
var fieldData = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, meta), {}, {
name: namePath,
value: _this.getFieldValue(namePath)
});
Object.defineProperty(fieldData, 'originRCField', {
value: true
});
return fieldData;
});
return fields;
});
// =========================== Observer ===========================
/**
* This only trigger when a field is on constructor to avoid we get initialValue too late
*/
(0,defineProperty["default"])(this, "initEntityValue", function (entity) {
var initialValue = entity.props.initialValue;
if (initialValue !== undefined) {
var namePath = entity.getNamePath();
var prevValue = (0,get["default"])(_this.store, namePath);
if (prevValue === undefined) {
_this.updateStore((0,set["default"])(_this.store, namePath, initialValue));
}
}
});
(0,defineProperty["default"])(this, "isMergedPreserve", function (fieldPreserve) {
var mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : _this.preserve;
return mergedPreserve !== null && mergedPreserve !== void 0 ? mergedPreserve : true;
});
(0,defineProperty["default"])(this, "registerField", function (entity) {
_this.fieldEntities.push(entity);
var namePath = entity.getNamePath();
_this.notifyWatch([namePath]);
// Set initial values
if (entity.props.initialValue !== undefined) {
var prevStore = _this.store;
_this.resetWithFieldInitialValue({
entities: [entity],
skipExist: true
});
_this.notifyObservers(prevStore, [entity.getNamePath()], {
type: 'valueUpdate',
source: 'internal'
});
}
// un-register field callback
return function (isListField, preserve) {
var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
_this.fieldEntities = _this.fieldEntities.filter(function (item) {
return item !== entity;
});
// Clean up store value if not preserve
if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {
var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);
if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {
return (
// Only reset when no namePath exist
!matchNamePath(field.getNamePath(), namePath)
);
})) {
var _prevStore = _this.store;
_this.updateStore((0,set["default"])(_prevStore, namePath, defaultValue, true));
// Notify that field is unmount
_this.notifyObservers(_prevStore, [namePath], {
type: 'remove'
});
// Dependencies update
_this.triggerDependenciesUpdate(_prevStore, namePath);
}
}
_this.notifyWatch([namePath]);
};
});
(0,defineProperty["default"])(this, "dispatch", function (action) {
switch (action.type) {
case 'updateValue':
{
var namePath = action.namePath,
value = action.value;
_this.updateValue(namePath, value);
break;
}
case 'validateField':
{
var _namePath = action.namePath,
triggerName = action.triggerName;
_this.validateFields([_namePath], {
triggerName: triggerName
});
break;
}
default:
// Currently we don't have other action. Do nothing.
}
});
(0,defineProperty["default"])(this, "notifyObservers", function (prevStore, namePathList, info) {
if (_this.subscribable) {
var mergedInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
store: _this.getFieldsValue(true)
});
_this.getFieldEntities().forEach(function (_ref5) {
var onStoreChange = _ref5.onStoreChange;
onStoreChange(prevStore, namePathList, mergedInfo);
});
} else {
_this.forceRootUpdate();
}
});
/**
* Notify dependencies children with parent update
* We need delay to trigger validate in case Field is under render props
*/
(0,defineProperty["default"])(this, "triggerDependenciesUpdate", function (prevStore, namePath) {
var childrenFields = _this.getDependencyChildrenFields(namePath);
if (childrenFields.length) {
_this.validateFields(childrenFields);
}
_this.notifyObservers(prevStore, childrenFields, {
type: 'dependenciesUpdate',
relatedFields: [namePath].concat((0,toConsumableArray["default"])(childrenFields))
});
return childrenFields;
});
(0,defineProperty["default"])(this, "updateValue", function (name, value) {
var namePath = getNamePath(name);
var prevStore = _this.store;
_this.updateStore((0,set["default"])(_this.store, namePath, value));
_this.notifyObservers(prevStore, [namePath], {
type: 'valueUpdate',
source: 'internal'
});
_this.notifyWatch([namePath]);
// Dependencies update
var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);
// trigger callback function
var onValuesChange = _this.callbacks.onValuesChange;
if (onValuesChange) {
var changedValues = cloneByNamePathList(_this.store, [namePath]);
onValuesChange(changedValues, _this.getFieldsValue());
}
_this.triggerOnFieldsChange([namePath].concat((0,toConsumableArray["default"])(childrenFields)));
});
// Let all child Field get update.
(0,defineProperty["default"])(this, "setFieldsValue", function (store) {
_this.warningUnhooked();
var prevStore = _this.store;
if (store) {
var nextStore = (0,set.merge)(_this.store, store);
_this.updateStore(nextStore);
}
_this.notifyObservers(prevStore, null, {
type: 'valueUpdate',
source: 'external'
});
_this.notifyWatch();
});
(0,defineProperty["default"])(this, "setFieldValue", function (name, value) {
_this.setFields([{
name: name,
value: value,
errors: [],
warnings: []
}]);
});
(0,defineProperty["default"])(this, "getDependencyChildrenFields", function (rootNamePath) {
var children = new Set();
var childrenFields = [];
var dependencies2fields = new utils_NameMap();
/**
* Generate maps
* Can use cache to save perf if user report performance issue with this
*/
_this.getFieldEntities().forEach(function (field) {
var dependencies = field.props.dependencies;
(dependencies || []).forEach(function (dependency) {
var dependencyNamePath = getNamePath(dependency);
dependencies2fields.update(dependencyNamePath, function () {
var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();
fields.add(field);
return fields;
});
});
});
var fillChildren = function fillChildren(namePath) {
var fields = dependencies2fields.get(namePath) || new Set();
fields.forEach(function (field) {
if (!children.has(field)) {
children.add(field);
var fieldNamePath = field.getNamePath();
if (field.isFieldDirty() && fieldNamePath.length) {
childrenFields.push(fieldNamePath);
fillChildren(fieldNamePath);
}
}
});
};
fillChildren(rootNamePath);
return childrenFields;
});
(0,defineProperty["default"])(this, "triggerOnFieldsChange", function (namePathList, filedErrors) {
var onFieldsChange = _this.callbacks.onFieldsChange;
if (onFieldsChange) {
var fields = _this.getFields();
/**
* Fill errors since `fields` may be replaced by controlled fields
*/
if (filedErrors) {
var cache = new utils_NameMap();
filedErrors.forEach(function (_ref6) {
var name = _ref6.name,
errors = _ref6.errors;
cache.set(name, errors);
});
fields.forEach(function (field) {
// eslint-disable-next-line no-param-reassign
field.errors = cache.get(field.name) || field.errors;
});
}
var changedFields = fields.filter(function (_ref7) {
var fieldName = _ref7.name;
return containsNamePath(namePathList, fieldName);
});
if (changedFields.length) {
onFieldsChange(changedFields, fields);
}
}
});
// =========================== Validate ===========================
(0,defineProperty["default"])(this, "validateFields", function (arg1, arg2) {
_this.warningUnhooked();
var nameList;
var options;
if (Array.isArray(arg1) || typeof arg1 === 'string' || typeof arg2 === 'string') {
nameList = arg1;
options = arg2;
} else {
options = arg1;
}
var provideNameList = !!nameList;
var namePathList = provideNameList ? nameList.map(getNamePath) : [];
// Collect result in promise list
var promiseList = [];
// We temp save the path which need trigger for `onFieldsChange`
var TMP_SPLIT = String(Date.now());
var validateNamePathList = new Set();
var _ref8 = options || {},
recursive = _ref8.recursive,
dirty = _ref8.dirty;
_this.getFieldEntities(true).forEach(function (field) {
// Add field if not provide `nameList`
if (!provideNameList) {
namePathList.push(field.getNamePath());
}
// Skip if without rule
if (!field.props.rules || !field.props.rules.length) {
return;
}
// Skip if only validate dirty field
if (dirty && !field.isFieldDirty()) {
return;
}
var fieldNamePath = field.getNamePath();
validateNamePathList.add(fieldNamePath.join(TMP_SPLIT));
// Add field validate rule in to promise list
if (!provideNameList || containsNamePath(namePathList, fieldNamePath, recursive)) {
var promise = field.validateRules((0,objectSpread2["default"])({
validateMessages: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, defaultValidateMessages), _this.validateMessages)
}, options));
// Wrap promise with field
promiseList.push(promise.then(function () {
return {
name: fieldNamePath,
errors: [],
warnings: []
};
}).catch(function (ruleErrors) {
var _ruleErrors$forEach;
var mergedErrors = [];
var mergedWarnings = [];
(_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref9) {
var warningOnly = _ref9.rule.warningOnly,
errors = _ref9.errors;
if (warningOnly) {
mergedWarnings.push.apply(mergedWarnings, (0,toConsumableArray["default"])(errors));
} else {
mergedErrors.push.apply(mergedErrors, (0,toConsumableArray["default"])(errors));
}
});
if (mergedErrors.length) {
return Promise.reject({
name: fieldNamePath,
errors: mergedErrors,
warnings: mergedWarnings
});
}
return {
name: fieldNamePath,
errors: mergedErrors,
warnings: mergedWarnings
};
}));
}
});
var summaryPromise = allPromiseFinish(promiseList);
_this.lastValidatePromise = summaryPromise;
// Notify fields with rule that validate has finished and need update
summaryPromise.catch(function (results) {
return results;
}).then(function (results) {
var resultNamePathList = results.map(function (_ref10) {
var name = _ref10.name;
return name;
});
_this.notifyObservers(_this.store, resultNamePathList, {
type: 'validateFinish'
});
_this.triggerOnFieldsChange(resultNamePathList, results);
});
var returnPromise = summaryPromise.then(function () {
if (_this.lastValidatePromise === summaryPromise) {
return Promise.resolve(_this.getFieldsValue(namePathList));
}
return Promise.reject([]);
}).catch(function (results) {
var errorList = results.filter(function (result) {
return result && result.errors.length;
});
return Promise.reject({
values: _this.getFieldsValue(namePathList),
errorFields: errorList,
outOfDate: _this.lastValidatePromise !== summaryPromise
});
});
// Do not throw in console
returnPromise.catch(function (e) {
return e;
});
// `validating` changed. Trigger `onFieldsChange`
var triggerNamePathList = namePathList.filter(function (namePath) {
return validateNamePathList.has(namePath.join(TMP_SPLIT));
});
_this.triggerOnFieldsChange(triggerNamePathList);
return returnPromise;
});
// ============================ Submit ============================
(0,defineProperty["default"])(this, "submit", function () {
_this.warningUnhooked();
_this.validateFields().then(function (values) {
var onFinish = _this.callbacks.onFinish;
if (onFinish) {
try {
onFinish(values);
} catch (err) {
// Should print error if user `onFinish` callback failed
console.error(err);
}
}
}).catch(function (e) {
var onFinishFailed = _this.callbacks.onFinishFailed;
if (onFinishFailed) {
onFinishFailed(e);
}
});
});
this.forceRootUpdate = forceRootUpdate;
});
function useForm(form) {
var formRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
forceUpdate = _React$useState2[1];
if (!formRef.current) {
if (form) {
formRef.current = form;
} else {
// Create a new FormStore if not provided
var forceReRender = function forceReRender() {
forceUpdate({});
};
var formStore = new FormStore(forceReRender);
formRef.current = formStore.getForm();
}
}
return [formRef.current];
}
/* harmony default export */ var es_useForm = (useForm);
;// ./node_modules/rc-field-form/es/FormContext.js
var FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
triggerFormChange: function triggerFormChange() {},
triggerFormFinish: function triggerFormFinish() {},
registerForm: function registerForm() {},
unregisterForm: function unregisterForm() {}
});
var FormProvider = function FormProvider(_ref) {
var validateMessages = _ref.validateMessages,
onFormChange = _ref.onFormChange,
onFormFinish = _ref.onFormFinish,
children = _ref.children;
var formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormContext);
var formsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormContext.Provider, {
value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formContext), {}, {
validateMessages: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formContext.validateMessages), validateMessages),
// =========================================================
// = Global Form Control =
// =========================================================
triggerFormChange: function triggerFormChange(name, changedFields) {
if (onFormChange) {
onFormChange(name, {
changedFields: changedFields,
forms: formsRef.current
});
}
formContext.triggerFormChange(name, changedFields);
},
triggerFormFinish: function triggerFormFinish(name, values) {
if (onFormFinish) {
onFormFinish(name, {
values: values,
forms: formsRef.current
});
}
formContext.triggerFormFinish(name, values);
},
registerForm: function registerForm(name, form) {
if (name) {
formsRef.current = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formsRef.current), {}, (0,defineProperty["default"])({}, name, form));
}
formContext.registerForm(name, form);
},
unregisterForm: function unregisterForm(name) {
var newForms = (0,objectSpread2["default"])({}, formsRef.current);
delete newForms[name];
formsRef.current = newForms;
formContext.unregisterForm(name);
}
})
}, children);
};
/* harmony default export */ var es_FormContext = (FormContext);
;// ./node_modules/rc-field-form/es/Form.js
var Form_excluded = ["name", "initialValues", "fields", "form", "preserve", "children", "component", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed", "clearOnDestroy"];
var Form = function Form(_ref, ref) {
var name = _ref.name,
initialValues = _ref.initialValues,
fields = _ref.fields,
form = _ref.form,
preserve = _ref.preserve,
children = _ref.children,
_ref$component = _ref.component,
Component = _ref$component === void 0 ? 'form' : _ref$component,
validateMessages = _ref.validateMessages,
_ref$validateTrigger = _ref.validateTrigger,
validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,
onValuesChange = _ref.onValuesChange,
_onFieldsChange = _ref.onFieldsChange,
_onFinish = _ref.onFinish,
onFinishFailed = _ref.onFinishFailed,
clearOnDestroy = _ref.clearOnDestroy,
restProps = (0,objectWithoutProperties["default"])(_ref, Form_excluded);
var nativeElementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_FormContext);
// We customize handle event since Context will makes all the consumer re-render:
// https://reactjs.org/docs/context.html#contextprovider
var _useForm = es_useForm(form),
_useForm2 = (0,slicedToArray["default"])(_useForm, 1),
formInstance = _useForm2[0];
var _getInternalHooks = formInstance.getInternalHooks(HOOK_MARK),
useSubscribe = _getInternalHooks.useSubscribe,
setInitialValues = _getInternalHooks.setInitialValues,
setCallbacks = _getInternalHooks.setCallbacks,
setValidateMessages = _getInternalHooks.setValidateMessages,
setPreserve = _getInternalHooks.setPreserve,
destroyForm = _getInternalHooks.destroyForm;
// Pass ref with form instance
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formInstance), {}, {
nativeElement: nativeElementRef.current
});
});
// Register form into Context
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
formContext.registerForm(name, formInstance);
return function () {
formContext.unregisterForm(name);
};
}, [formContext, formInstance, name]);
// Pass props to store
setValidateMessages((0,objectSpread2["default"])((0,objectSpread2["default"])({}, formContext.validateMessages), validateMessages));
setCallbacks({
onValuesChange: onValuesChange,
onFieldsChange: function onFieldsChange(changedFields) {
formContext.triggerFormChange(name, changedFields);
if (_onFieldsChange) {
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
rest[_key - 1] = arguments[_key];
}
_onFieldsChange.apply(void 0, [changedFields].concat(rest));
}
},
onFinish: function onFinish(values) {
formContext.triggerFormFinish(name, values);
if (_onFinish) {
_onFinish(values);
}
},
onFinishFailed: onFinishFailed
});
setPreserve(preserve);
// Set initial value, init store value when first mount
var mountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
setInitialValues(initialValues, !mountRef.current);
if (!mountRef.current) {
mountRef.current = true;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
return destroyForm(clearOnDestroy);
};
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[]);
// Prepare children by `children` type
var childrenNode;
var childrenRenderProps = typeof children === 'function';
if (childrenRenderProps) {
var _values = formInstance.getFieldsValue(true);
childrenNode = children(_values, formInstance);
} else {
childrenNode = children;
}
// Not use subscribe when using render props
useSubscribe(!childrenRenderProps);
// Listen if fields provided. We use ref to save prev data here to avoid additional render
var prevFieldsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!isSimilar(prevFieldsRef.current || [], fields || [])) {
formInstance.setFields(fields || []);
}
prevFieldsRef.current = fields;
}, [fields, formInstance]);
var formContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formInstance), {}, {
validateTrigger: validateTrigger
});
}, [formInstance, validateTrigger]);
var wrapperNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ListContext.Provider, {
value: null
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FieldContext.Provider, {
value: formContextValue
}, childrenNode));
if (Component === false) {
return wrapperNode;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, restProps, {
ref: nativeElementRef,
onSubmit: function onSubmit(event) {
event.preventDefault();
event.stopPropagation();
formInstance.submit();
},
onReset: function onReset(event) {
var _restProps$onReset;
event.preventDefault();
formInstance.resetFields();
(_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 || _restProps$onReset.call(restProps, event);
}
}), wrapperNode);
};
/* harmony default export */ var es_Form = (Form);
;// ./node_modules/rc-field-form/es/useWatch.js
function stringify(value) {
try {
return JSON.stringify(value);
} catch (err) {
return Math.random();
}
}
var useWatchWarning = true ? function (namePath) {
var fullyStr = namePath.join('__RC_FIELD_FORM_SPLIT__');
var nameStrRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(fullyStr);
(0,warning["default"])(nameStrRef.current === fullyStr, '`useWatch` is not support dynamic `namePath`. Please provide static instead.');
} : 0;
// ------- selector type -------
// ------- selector type end -------
function useWatch() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var dependencies = args[0],
_args$ = args[1],
_form = _args$ === void 0 ? {} : _args$;
var options = isFormInstance(_form) ? {
form: _form
} : _form;
var form = options.form;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
value = _useState2[0],
setValue = _useState2[1];
var valueStr = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return stringify(value);
}, [value]);
var valueStrRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(valueStr);
valueStrRef.current = valueStr;
var fieldContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FieldContext);
var formInstance = form || fieldContext;
var isValidForm = formInstance && formInstance._init;
// Warning if not exist form instance
if (true) {
(0,warning["default"])(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');
}
var namePath = getNamePath(dependencies);
var namePathRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(namePath);
namePathRef.current = namePath;
useWatchWarning(namePath);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
// Skip if not exist form instance
if (!isValidForm) {
return;
}
var getFieldsValue = formInstance.getFieldsValue,
getInternalHooks = formInstance.getInternalHooks;
var _getInternalHooks = getInternalHooks(HOOK_MARK),
registerWatch = _getInternalHooks.registerWatch;
var getWatchValue = function getWatchValue(values, allValues) {
var watchValue = options.preserve ? allValues : values;
return typeof dependencies === 'function' ? dependencies(watchValue) : (0,get["default"])(watchValue, namePathRef.current);
};
var cancelRegister = registerWatch(function (values, allValues) {
var newValue = getWatchValue(values, allValues);
var nextValueStr = stringify(newValue);
// Compare stringify in case it's nest object
if (valueStrRef.current !== nextValueStr) {
valueStrRef.current = nextValueStr;
setValue(newValue);
}
});
// TODO: We can improve this perf in future
var initialValue = getWatchValue(getFieldsValue(), getFieldsValue(true));
// React 18 has the bug that will queue update twice even the value is not changed
// ref: https://github.com/facebook/react/issues/27213
if (value !== initialValue) {
setValue(initialValue);
}
return cancelRegister;
},
// We do not need re-register since namePath content is the same
// eslint-disable-next-line react-hooks/exhaustive-deps
[isValidForm]);
return value;
}
/* harmony default export */ var es_useWatch = (useWatch);
;// ./node_modules/rc-field-form/es/index.js
var InternalForm = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(es_Form);
var RefForm = InternalForm;
RefForm.FormProvider = FormProvider;
RefForm.Field = es_Field;
RefForm.List = es_List;
RefForm.useForm = es_useForm;
RefForm.useWatch = es_useWatch;
/* harmony default export */ var rc_field_form_es = (RefForm);
;// ./components/form/context.tsx
const context_FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
labelAlign: 'right',
vertical: false,
itemRef: () => {}
});
const NoStyleItemContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
const context_FormProvider = props => {
const providerProps = (0,omit["default"])(props, ['prefixCls']);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormProvider, Object.assign({}, providerProps));
};
const FormItemPrefixContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
prefixCls: ''
});
const FormItemInputContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
if (true) {
FormItemInputContext.displayName = 'FormItemInputContext';
}
const NoFormStyle = _ref => {
let {
children,
status,
override
} = _ref;
const formItemInputContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const newFormItemInputContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const newContext = Object.assign({}, formItemInputContext);
if (override) {
delete newContext.isFormItemInput;
}
if (status) {
delete newContext.status;
delete newContext.hasFeedback;
delete newContext.feedbackIcon;
}
return newContext;
}, [status, override, formItemInputContext]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
value: newFormItemInputContext
}, children);
};
const VariantContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
;// ./components/_util/ContextIsolator.tsx
const ContextIsolator = props => {
const {
space,
form,
children
} = props;
if (children === undefined || children === null) {
return null;
}
let result = children;
if (form) {
result = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NoFormStyle, {
override: true,
status: true
}, result);
}
if (space) {
result = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NoCompactStyle, null, result);
}
return result;
};
/* harmony default export */ var _util_ContextIsolator = (ContextIsolator);
;// ./components/_util/hooks/useClosable.tsx
function pickClosable(context) {
if (!context) {
return undefined;
}
return {
closable: context.closable,
closeIcon: context.closeIcon
};
}
/** Convert `closable` and `closeIcon` to config object */
function useClosableConfig(closableCollection) {
const {
closable,
closeIcon
} = closableCollection || {};
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
if (
// If `closable`, whatever rest be should be true
!closable && (closable === false || closeIcon === false || closeIcon === null)) {
return false;
}
if (closable === undefined && closeIcon === undefined) {
return null;
}
let closableConfig = {
closeIcon: typeof closeIcon !== 'boolean' && closeIcon !== null ? closeIcon : undefined
};
if (closable && typeof closable === 'object') {
closableConfig = Object.assign(Object.assign({}, closableConfig), closable);
}
return closableConfig;
}, [closable, closeIcon]);
}
/**
* Assign object without `undefined` field. Will skip if is `false`.
* This helps to handle both closableConfig or false
*/
function assignWithoutUndefined() {
const target = {};
for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {
objList[_key] = arguments[_key];
}
objList.forEach(obj => {
if (obj) {
Object.keys(obj).forEach(key => {
if (obj[key] !== undefined) {
target[key] = obj[key];
}
});
}
});
return target;
}
/** Use same object to support `useMemo` optimization */
const EmptyFallbackCloseCollection = {};
function useClosable(propCloseCollection, contextCloseCollection) {
let fallbackCloseCollection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EmptyFallbackCloseCollection;
// Align the `props`, `context` `fallback` to config object first
const propCloseConfig = useClosableConfig(propCloseCollection);
const contextCloseConfig = useClosableConfig(contextCloseCollection);
const closeBtnIsDisabled = typeof propCloseConfig !== 'boolean' ? !!(propCloseConfig === null || propCloseConfig === void 0 ? void 0 : propCloseConfig.disabled) : false;
const mergedFallbackCloseCollection = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => Object.assign({
closeIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, null)
}, fallbackCloseCollection), [fallbackCloseCollection]);
// Use fallback logic to fill the config
const mergedClosableConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
// ================ Props First ================
// Skip if prop is disabled
if (propCloseConfig === false) {
return false;
}
if (propCloseConfig) {
return assignWithoutUndefined(mergedFallbackCloseCollection, contextCloseConfig, propCloseConfig);
}
// =============== Context Second ==============
// Skip if context is disabled
if (contextCloseConfig === false) {
return false;
}
if (contextCloseConfig) {
return assignWithoutUndefined(mergedFallbackCloseCollection, contextCloseConfig);
}
// ============= Fallback Default ==============
return !mergedFallbackCloseCollection.closable ? false : mergedFallbackCloseCollection;
}, [propCloseConfig, contextCloseConfig, mergedFallbackCloseCollection]);
// Calculate the final closeIcon
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
if (mergedClosableConfig === false) {
return [false, null, closeBtnIsDisabled];
}
const {
closeIconRender
} = mergedFallbackCloseCollection;
const {
closeIcon
} = mergedClosableConfig;
let mergedCloseIcon = closeIcon;
if (mergedCloseIcon !== null && mergedCloseIcon !== undefined) {
// Wrap the closeIcon if needed
if (closeIconRender) {
mergedCloseIcon = closeIconRender(closeIcon);
}
// Wrap the closeIcon with aria props
const ariaProps = (0,pickAttrs["default"])(mergedClosableConfig, true);
if (Object.keys(ariaProps).length) {
mergedCloseIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(mergedCloseIcon) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(mergedCloseIcon, ariaProps)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", Object.assign({}, ariaProps), mergedCloseIcon));
}
}
return [true, mergedCloseIcon, closeBtnIsDisabled];
}, [mergedClosableConfig, mergedFallbackCloseCollection]);
}
;// ./node_modules/rc-util/es/Dom/styleChecker.js
var isStyleNameSupport = function isStyleNameSupport(styleName) {
if ((0,canUseDom["default"])() && window.document.documentElement) {
var styleNameList = Array.isArray(styleName) ? styleName : [styleName];
var documentElement = window.document.documentElement;
return styleNameList.some(function (name) {
return name in documentElement.style;
});
}
return false;
};
var isStyleValueSupport = function isStyleValueSupport(styleName, value) {
if (!isStyleNameSupport(styleName)) {
return false;
}
var ele = document.createElement('div');
var origin = ele.style[styleName];
ele.style[styleName] = value;
return ele.style[styleName] !== origin;
};
function isStyleSupport(styleName, styleValue) {
if (!Array.isArray(styleName) && styleValue !== undefined) {
return isStyleValueSupport(styleName, styleValue);
}
return isStyleNameSupport(styleName);
}
;// ./components/_util/styleChecker.ts
const canUseDocElement = () => (0,canUseDom["default"])() && window.document.documentElement;
// EXTERNAL MODULE: ./components/_util/zindexContext.ts
var zindexContext = __webpack_require__("./components/_util/zindexContext.ts");
;// ./components/skeleton/Element.tsx
const Element_Element = props => {
const {
prefixCls,
className,
style,
size,
shape
} = props;
const sizeCls = classnames_default()({
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small'
});
const shapeCls = classnames_default()({
[`${prefixCls}-circle`]: shape === 'circle',
[`${prefixCls}-square`]: shape === 'square',
[`${prefixCls}-round`]: shape === 'round'
});
const sizeStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => typeof size === 'number' ? {
width: size,
height: size,
lineHeight: `${size}px`
} : {}, [size]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(prefixCls, sizeCls, shapeCls, className),
style: Object.assign(Object.assign({}, sizeStyle), style)
});
};
/* harmony default export */ var skeleton_Element = (Element_Element);
// EXTERNAL MODULE: ./components/skeleton/style/index.ts
var skeleton_style = __webpack_require__("./components/skeleton/style/index.ts");
;// ./components/skeleton/Avatar.tsx
const SkeletonAvatar = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
active,
shape = 'circle',
size = 'default'
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
const otherProps = (0,omit["default"])(props, ['prefixCls', 'className']);
const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active
}, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({
prefixCls: `${prefixCls}-avatar`,
shape: shape,
size: size
}, otherProps))));
};
/* harmony default export */ var Avatar = (SkeletonAvatar);
;// ./components/skeleton/Button.tsx
const SkeletonButton = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
active,
block = false,
size = 'default'
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
const otherProps = (0,omit["default"])(props, ['prefixCls']);
const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active,
[`${prefixCls}-block`]: block
}, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({
prefixCls: `${prefixCls}-button`,
size: size
}, otherProps))));
};
/* harmony default export */ var skeleton_Button = (SkeletonButton);
;// ./components/skeleton/Image.tsx
const path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z';
const SkeletonImage = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
active
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active
}, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-image`, className),
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
viewBox: "0 0 1098 1024",
xmlns: "http://www.w3.org/2000/svg",
className: `${prefixCls}-image-svg`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "Image placeholder"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: path,
className: `${prefixCls}-image-path`
})))));
};
/* harmony default export */ var skeleton_Image = (SkeletonImage);
;// ./components/skeleton/Input.tsx
const SkeletonInput = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
active,
block,
size = 'default'
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
const otherProps = (0,omit["default"])(props, ['prefixCls']);
const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active,
[`${prefixCls}-block`]: block
}, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({
prefixCls: `${prefixCls}-input`,
size: size
}, otherProps))));
};
/* harmony default export */ var Input = (SkeletonInput);
;// ./components/skeleton/Node.tsx
const SkeletonNode = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
active,
children
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active
}, hashId, className, rootClassName, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-image`, className),
style: style
}, children)));
};
/* harmony default export */ var Node = (SkeletonNode);
;// ./components/skeleton/Paragraph.tsx
const getWidth = (index, props) => {
const {
width,
rows = 2
} = props;
if (Array.isArray(width)) {
return width[index];
}
// last paragraph
if (rows - 1 === index) {
return width;
}
return undefined;
};
const Paragraph = props => {
const {
prefixCls,
className,
style,
rows = 0
} = props;
const rowList = Array.from({
length: rows
}).map((_, index) => (
/*#__PURE__*/
// eslint-disable-next-line react/no-array-index-key
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
key: index,
style: {
width: getWidth(index, props)
}
})));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: classnames_default()(prefixCls, className),
style: style
}, rowList);
};
/* harmony default export */ var skeleton_Paragraph = (Paragraph);
;// ./components/skeleton/Title.tsx
/* eslint-disable jsx-a11y/heading-has-content */
const Title = _ref => {
let {
prefixCls,
className,
width,
style
} = _ref;
return (
/*#__PURE__*/
// biome-ignore lint/a11y/useHeadingContent: HOC here
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("h3", {
className: classnames_default()(prefixCls, className),
style: Object.assign({
width
}, style)
})
);
};
/* harmony default export */ var skeleton_Title = (Title);
;// ./components/skeleton/Skeleton.tsx
function getComponentProps(prop) {
if (prop && typeof prop === 'object') {
return prop;
}
return {};
}
function getAvatarBasicProps(hasTitle, hasParagraph) {
if (hasTitle && !hasParagraph) {
// Square avatar
return {
size: 'large',
shape: 'square'
};
}
return {
size: 'large',
shape: 'circle'
};
}
function getTitleBasicProps(hasAvatar, hasParagraph) {
if (!hasAvatar && hasParagraph) {
return {
width: '38%'
};
}
if (hasAvatar && hasParagraph) {
return {
width: '50%'
};
}
return {};
}
function getParagraphBasicProps(hasAvatar, hasTitle) {
const basicProps = {};
// Width
if (!hasAvatar || !hasTitle) {
basicProps.width = '61%';
}
// Rows
if (!hasAvatar && hasTitle) {
basicProps.rows = 3;
} else {
basicProps.rows = 2;
}
return basicProps;
}
const Skeleton = props => {
const {
prefixCls: customizePrefixCls,
loading,
className,
rootClassName,
style,
children,
avatar = false,
title = true,
paragraph = true,
active,
round
} = props;
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('skeleton');
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
if (loading || !('loading' in props)) {
const hasAvatar = !!avatar;
const hasTitle = !!title;
const hasParagraph = !!paragraph;
// Avatar
let avatarNode;
if (hasAvatar) {
const avatarProps = Object.assign(Object.assign({
prefixCls: `${prefixCls}-avatar`
}, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar));
// We direct use SkeletonElement as avatar in skeleton internal.
avatarNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-header`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({}, avatarProps)));
}
let contentNode;
if (hasTitle || hasParagraph) {
// Title
let $title;
if (hasTitle) {
const titleProps = Object.assign(Object.assign({
prefixCls: `${prefixCls}-title`
}, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title));
$title = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Title, Object.assign({}, titleProps));
}
// Paragraph
let paragraphNode;
if (hasParagraph) {
const paragraphProps = Object.assign(Object.assign({
prefixCls: `${prefixCls}-paragraph`
}, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph));
paragraphNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Paragraph, Object.assign({}, paragraphProps));
}
contentNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-content`
}, $title, paragraphNode);
}
const cls = classnames_default()(prefixCls, {
[`${prefixCls}-with-avatar`]: hasAvatar,
[`${prefixCls}-active`]: active,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-round`]: round
}, contextClassName, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls,
style: Object.assign(Object.assign({}, contextStyle), style)
}, avatarNode, contentNode));
}
return children !== null && children !== void 0 ? children : null;
};
Skeleton.Button = skeleton_Button;
Skeleton.Avatar = Avatar;
Skeleton.Input = Input;
Skeleton.Image = skeleton_Image;
Skeleton.Node = Node;
if (true) {
Skeleton.displayName = 'Skeleton';
}
/* harmony default export */ var skeleton_Skeleton = (Skeleton);
;// ./components/skeleton/index.tsx
/* harmony default export */ var skeleton = (skeleton_Skeleton);
;// ./components/watermark/context.ts
function voidFunc() {}
const WatermarkContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
add: voidFunc,
remove: voidFunc
});
function usePanelRef(panelSelector) {
const watermark = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(WatermarkContext);
const panelEleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const panelRef = (0,useEvent["default"])(ele => {
if (ele) {
const innerContentEle = panelSelector ? ele.querySelector(panelSelector) : ele;
watermark.add(innerContentEle);
panelEleRef.current = innerContentEle;
} else {
watermark.remove(panelEleRef.current);
}
});
return panelRef;
}
/* harmony default export */ var watermark_context = (WatermarkContext);
;// ./components/modal/components/NormalCancelBtn.tsx
const NormalCancelBtn = () => {
const {
cancelButtonProps,
cancelTextLocale,
onCancel
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({
onClick: onCancel
}, cancelButtonProps), cancelTextLocale);
};
/* harmony default export */ var components_NormalCancelBtn = (NormalCancelBtn);
;// ./components/modal/components/NormalOkBtn.tsx
const NormalOkBtn = () => {
const {
confirmLoading,
okButtonProps,
okType,
okTextLocale,
onOk
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({}, convertLegacyProps(okType), {
loading: confirmLoading,
onClick: onOk
}, okButtonProps), okTextLocale);
};
/* harmony default export */ var components_NormalOkBtn = (NormalOkBtn);
;// ./components/modal/shared.tsx
function renderCloseIcon(prefixCls, closeIcon) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: `${prefixCls}-close-x`
}, closeIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, {
className: `${prefixCls}-close-icon`
}));
}
const Footer = props => {
const {
okText,
okType = 'primary',
cancelText,
confirmLoading,
onOk,
onCancel,
okButtonProps,
cancelButtonProps,
footer
} = props;
const [locale] = (0,useLocale["default"])('Modal', getConfirmLocale());
// ================== Locale Text ==================
const okTextLocale = okText || (locale === null || locale === void 0 ? void 0 : locale.okText);
const cancelTextLocale = cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText);
// ================= Context Value =================
const btnCtxValue = {
confirmLoading,
okButtonProps,
cancelButtonProps,
okTextLocale,
cancelTextLocale,
okType,
onOk,
onCancel
};
const btnCtxValueMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => btnCtxValue, (0,toConsumableArray["default"])(Object.values(btnCtxValue)));
let footerNode;
if (typeof footer === 'function' || typeof footer === 'undefined') {
footerNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_NormalCancelBtn, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_NormalOkBtn, null));
if (typeof footer === 'function') {
footerNode = footer(footerNode, {
OkBtn: components_NormalOkBtn,
CancelBtn: components_NormalCancelBtn
});
}
footerNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ModalContextProvider, {
value: btnCtxValueMemo
}, footerNode);
} else {
footerNode = footer;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(DisabledContextProvider, {
disabled: false
}, footerNode);
};
// EXTERNAL MODULE: ./components/modal/style/index.ts
var modal_style = __webpack_require__("./components/modal/style/index.ts");
;// ./components/modal/Modal.tsx
var Modal_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;
};
let mousePosition;
// ref: https://github.com/ant-design/ant-design/issues/15795
const getClickPosition = e => {
mousePosition = {
x: e.pageX,
y: e.pageY
};
// 100ms 内发生过点击事件,则从点击位置动画展示
// 否则直接 zoom 展示
// 这样可以兼容非点击方式展开
setTimeout(() => {
mousePosition = null;
}, 100);
};
// 只有点击事件支持从鼠标位置动画展开
if (canUseDocElement()) {
document.documentElement.addEventListener('click', getClickPosition, true);
}
const Modal = props => {
var _a;
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
direction,
modal: modalContext
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const handleCancel = e => {
const {
onCancel
} = props;
onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);
};
const handleOk = e => {
const {
onOk
} = props;
onOk === null || onOk === void 0 ? void 0 : onOk(e);
};
if (true) {
const warning = (0,_util_warning.devUseWarning)('Modal');
[['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
open,
wrapClassName,
centered,
getContainer,
focusTriggerAfterClose = true,
style,
// Deprecated
visible,
width = 520,
footer,
classNames: modalClassNames,
styles: modalStyles,
children,
loading
} = props,
restProps = Modal_rest(props, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"]);
const prefixCls = getPrefixCls('modal', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,modal_style["default"])(prefixCls, rootCls);
const wrapClassNameExtended = classnames_default()(wrapClassName, {
[`${prefixCls}-centered`]: centered !== null && centered !== void 0 ? centered : modalContext === null || modalContext === void 0 ? void 0 : modalContext.centered,
[`${prefixCls}-wrap-rtl`]: direction === 'rtl'
});
const dialogFooter = footer !== null && !loading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer, Object.assign({}, props, {
onOk: handleOk,
onCancel: handleCancel
}))) : null;
const [mergedClosable, mergedCloseIcon, closeBtnIsDisabled] = useClosable(pickClosable(props), pickClosable(modalContext), {
closable: true,
closeIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
className: `${prefixCls}-close-icon`
}),
closeIconRender: icon => renderCloseIcon(prefixCls, icon)
});
// ============================ Refs ============================
// Select `ant-modal-content` by `panelRef`
const panelRef = usePanelRef(`.${prefixCls}-content`);
// ============================ zIndex ============================
const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Modal', restProps.zIndex);
// =========================== Width ============================
const [numWidth, responsiveWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (width && typeof width === 'object') {
return [undefined, width];
}
return [width, undefined];
}, [width]);
const responsiveWidthVars = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const vars = {};
if (responsiveWidth) {
Object.keys(responsiveWidth).forEach(breakpoint => {
const breakpointWidth = responsiveWidth[breakpoint];
if (breakpointWidth !== undefined) {
vars[`--${prefixCls}-${breakpoint}-width`] = typeof breakpointWidth === 'number' ? `${breakpointWidth}px` : breakpointWidth;
}
});
}
return vars;
}, [responsiveWidth]);
// =========================== Render ===========================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
form: true,
space: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
value: contextZIndex
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_dialog_es, Object.assign({
width: numWidth
}, restProps, {
zIndex: zIndex,
getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
prefixCls: prefixCls,
rootClassName: classnames_default()(hashId, rootClassName, cssVarCls, rootCls),
footer: dialogFooter,
visible: open !== null && open !== void 0 ? open : visible,
mousePosition: (_a = restProps.mousePosition) !== null && _a !== void 0 ? _a : mousePosition,
onClose: handleCancel,
closable: mergedClosable ? {
disabled: closeBtnIsDisabled,
closeIcon: mergedCloseIcon
} : mergedClosable,
closeIcon: mergedCloseIcon,
focusTriggerAfterClose: focusTriggerAfterClose,
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom', props.transitionName),
maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'fade', props.maskTransitionName),
className: classnames_default()(hashId, className, modalContext === null || modalContext === void 0 ? void 0 : modalContext.className),
style: Object.assign(Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.style), style), responsiveWidthVars),
classNames: Object.assign(Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.classNames), modalClassNames), {
wrapper: classnames_default()(wrapClassNameExtended, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper)
}),
styles: Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.styles), modalStyles),
panelRef: panelRef
}), loading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
active: true,
title: false,
paragraph: {
rows: 4
},
className: `${prefixCls}-body-skeleton`
})) : children))));
};
/* harmony default export */ var modal_Modal = (Modal);
// EXTERNAL MODULE: ./components/style/index.tsx
var components_style = __webpack_require__("./components/style/index.tsx");
;// ./components/modal/style/confirm.ts
// Style as confirm component
// ============================= Confirm ==============================
const genModalConfirmStyle = token => {
const {
componentCls,
titleFontSize,
titleLineHeight,
modalConfirmIconSize,
fontSize,
lineHeight,
modalTitleHeight,
fontHeight,
confirmBodyPadding
} = token;
const confirmComponentCls = `${componentCls}-confirm`;
return {
[confirmComponentCls]: {
'&-rtl': {
direction: 'rtl'
},
[`${token.antCls}-modal-header`]: {
display: 'none'
},
[`${confirmComponentCls}-body-wrapper`]: Object.assign({}, (0,components_style.clearFix)()),
[`&${componentCls} ${componentCls}-body`]: {
padding: confirmBodyPadding
},
// ====================== Body ======================
[`${confirmComponentCls}-body`]: {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'start',
[`> ${token.iconCls}`]: {
flex: 'none',
fontSize: modalConfirmIconSize,
marginInlineEnd: token.confirmIconMarginInlineEnd,
marginTop: token.calc(token.calc(fontHeight).sub(modalConfirmIconSize).equal()).div(2).equal()
},
[`&-has-title > ${token.iconCls}`]: {
marginTop: token.calc(token.calc(modalTitleHeight).sub(modalConfirmIconSize).equal()).div(2).equal()
}
},
[`${confirmComponentCls}-paragraph`]: {
display: 'flex',
flexDirection: 'column',
flex: 'auto',
rowGap: token.marginXS,
// https://github.com/ant-design/ant-design/issues/51912
maxWidth: `calc(100% - ${(0,cssinjs.unit)(token.marginSM)})`
},
// https://github.com/ant-design/ant-design/issues/48159
[`${token.iconCls} + ${confirmComponentCls}-paragraph`]: {
maxWidth: `calc(100% - ${(0,cssinjs.unit)(token.calc(token.modalConfirmIconSize).add(token.marginSM).equal())})`
},
[`${confirmComponentCls}-title`]: {
color: token.colorTextHeading,
fontWeight: token.fontWeightStrong,
fontSize: titleFontSize,
lineHeight: titleLineHeight
},
[`${confirmComponentCls}-content`]: {
color: token.colorText,
fontSize,
lineHeight
},
// ===================== Footer =====================
[`${confirmComponentCls}-btns`]: {
textAlign: 'end',
marginTop: token.confirmBtnsMarginTop,
[`${token.antCls}-btn + ${token.antCls}-btn`]: {
marginBottom: 0,
marginInlineStart: token.marginXS
}
}
},
[`${confirmComponentCls}-error ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorError
},
[`${confirmComponentCls}-warning ${confirmComponentCls}-body > ${token.iconCls},
${confirmComponentCls}-confirm ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorWarning
},
[`${confirmComponentCls}-info ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorInfo
},
[`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorSuccess
}
};
};
// ============================== Export ==============================
/* harmony default export */ var style_confirm = ((0,genStyleUtils.genSubStyleComponent)(['Modal', 'confirm'], token => {
const modalToken = (0,modal_style.prepareToken)(token);
return [genModalConfirmStyle(modalToken)];
}, modal_style.prepareComponentToken, {
// confirm is weak than modal since no conflict here
order: -1000
}));
;// ./components/modal/ConfirmDialog.tsx
var ConfirmDialog_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 ConfirmContent(props) {
const {
prefixCls,
icon,
okText,
cancelText,
confirmPrefixCls,
type,
okCancel,
footer,
// Legacy for static function usage
locale: staticLocale
} = props,
resetProps = ConfirmDialog_rest(props, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Modal');
true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
}
// Icon
let mergedIcon = icon;
// 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon
if (!icon && icon !== null) {
switch (type) {
case 'info':
mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_InfoCircleFilled, null);
break;
case 'success':
mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null);
break;
case 'error':
mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null);
break;
default:
mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null);
}
}
// 默认为 true,保持向下兼容
const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type === 'confirm';
const autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';
const [locale] = (0,useLocale["default"])('Modal');
const mergedLocale = staticLocale || locale;
// ================== Locale Text ==================
const okTextLocale = okText || (mergedOkCancel ? mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.okText : mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.justOkText);
const cancelTextLocale = cancelText || (mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.cancelText);
// ================= Context Value =================
const btnCtxValue = Object.assign({
autoFocusButton,
cancelTextLocale,
okTextLocale,
mergedOkCancel
}, resetProps);
const btnCtxValueMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => btnCtxValue, (0,toConsumableArray["default"])(Object.values(btnCtxValue)));
// ====================== Footer Origin Node ======================
const footerOriginNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_ConfirmCancelBtn, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_ConfirmOkBtn, null));
const hasTitle = props.title !== undefined && props.title !== null;
const bodyCls = `${confirmPrefixCls}-body`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${confirmPrefixCls}-body-wrapper`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(bodyCls, {
[`${bodyCls}-has-title`]: hasTitle
})
}, mergedIcon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${confirmPrefixCls}-paragraph`
}, hasTitle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${confirmPrefixCls}-title`
}, props.title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${confirmPrefixCls}-content`
}, props.content))), footer === undefined || typeof footer === 'function' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ModalContextProvider, {
value: btnCtxValueMemo
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${confirmPrefixCls}-btns`
}, typeof footer === 'function' ? footer(footerOriginNode, {
OkBtn: components_ConfirmOkBtn,
CancelBtn: components_ConfirmCancelBtn
}) : footerOriginNode))) : footer, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(style_confirm, {
prefixCls: prefixCls
}));
}
const ConfirmDialog = props => {
const {
close,
zIndex,
maskStyle,
direction,
prefixCls,
wrapClassName,
rootPrefixCls,
bodyStyle,
closable = false,
onConfirm,
styles
} = props;
if (true) {
const warning = (0,_util_warning.devUseWarning)('Modal');
[['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
const confirmPrefixCls = `${prefixCls}-confirm`;
const width = props.width || 416;
const style = props.style || {};
const mask = props.mask === undefined ? true : props.mask;
// 默认为 false,保持旧版默认行为
const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
const classString = classnames_default()(confirmPrefixCls, `${confirmPrefixCls}-${props.type}`, {
[`${confirmPrefixCls}-rtl`]: direction === 'rtl'
}, props.className);
// ========================= zIndex =========================
const [, token] = (0,useToken["default"])();
const mergedZIndex = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (zIndex !== undefined) {
return zIndex;
}
// Static always use max zIndex
return token.zIndexPopupBase + useZIndex.CONTAINER_MAX_OFFSET;
}, [zIndex, token]);
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(modal_Modal, Object.assign({}, props, {
className: classString,
wrapClassName: classnames_default()({
[`${confirmPrefixCls}-centered`]: !!props.centered
}, wrapClassName),
onCancel: () => {
close === null || close === void 0 ? void 0 : close({
triggerCancel: true
});
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
},
title: "",
footer: null,
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls || '', 'zoom', props.transitionName),
maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls || '', 'fade', props.maskTransitionName),
mask: mask,
maskClosable: maskClosable,
style: style,
styles: Object.assign({
body: bodyStyle,
mask: maskStyle
}, styles),
width: width,
zIndex: mergedZIndex,
closable: closable
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ConfirmContent, Object.assign({}, props, {
confirmPrefixCls: confirmPrefixCls
})));
};
const ConfirmDialogWrapper = props => {
const {
rootPrefixCls,
iconPrefixCls,
direction,
theme
} = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
prefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls,
direction: direction,
theme: theme
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ConfirmDialog, Object.assign({}, props)));
};
if (true) {
ConfirmDialog.displayName = 'ConfirmDialog';
ConfirmDialogWrapper.displayName = 'ConfirmDialogWrapper';
}
/* harmony default export */ var modal_ConfirmDialog = (ConfirmDialogWrapper);
;// ./components/modal/destroyFns.ts
const destroyFns = [];
/* harmony default export */ var modal_destroyFns = (destroyFns);
;// ./components/modal/confirm.tsx
let defaultRootPrefixCls = '';
function getRootPrefixCls() {
return defaultRootPrefixCls;
}
const confirm_ConfirmDialogWrapper = props => {
var _a, _b;
const {
prefixCls: customizePrefixCls,
getContainer,
direction
} = props;
const runtimeLocale = getConfirmLocale();
const config = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const rootPrefixCls = getRootPrefixCls() || config.getPrefixCls();
// because Modal.config set rootPrefixCls, which is different from other components
const prefixCls = customizePrefixCls || `${rootPrefixCls}-modal`;
let mergedGetContainer = getContainer;
if (mergedGetContainer === false) {
mergedGetContainer = undefined;
if (true) {
true ? (0,_util_warning["default"])(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') : 0;
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(modal_ConfirmDialog, Object.assign({}, props, {
rootPrefixCls: rootPrefixCls,
prefixCls: prefixCls,
iconPrefixCls: config.iconPrefixCls,
theme: config.theme,
direction: direction !== null && direction !== void 0 ? direction : config.direction,
locale: (_b = (_a = config.locale) === null || _a === void 0 ? void 0 : _a.Modal) !== null && _b !== void 0 ? _b : runtimeLocale,
getContainer: mergedGetContainer
}));
};
function confirm_confirm(config) {
const global = globalConfig();
if ( true && !global.holderRender) {
warnContext('Modal');
}
const container = document.createDocumentFragment();
let currentConfig = Object.assign(Object.assign({}, config), {
close,
open: true
});
let timeoutId;
let reactUnmount;
function destroy() {
var _a;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
const triggerCancel = args.some(param => param === null || param === void 0 ? void 0 : param.triggerCancel);
if (triggerCancel) {
var _a2;
(_a = config.onCancel) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [config, () => {}].concat((0,toConsumableArray["default"])(args.slice(1))));
}
for (let i = 0; i < modal_destroyFns.length; i++) {
const fn = modal_destroyFns[i];
if (fn === close) {
modal_destroyFns.splice(i, 1);
break;
}
}
reactUnmount();
}
function render(props) {
clearTimeout(timeoutId);
/**
* https://github.com/ant-design/ant-design/issues/23623
*
* Sync render blocks React event. Let's make this async.
*/
timeoutId = setTimeout(() => {
const rootPrefixCls = global.getPrefixCls(undefined, getRootPrefixCls());
const iconPrefixCls = global.getIconPrefixCls();
const theme = global.getTheme();
const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(confirm_ConfirmDialogWrapper, Object.assign({}, props));
const reactRender = getReactRender();
reactUnmount = reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(config_provider, {
prefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls,
theme: theme
}, global.holderRender ? global.holderRender(dom) : dom), container);
});
}
function close() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
currentConfig = Object.assign(Object.assign({}, currentConfig), {
open: false,
afterClose: () => {
if (typeof config.afterClose === 'function') {
config.afterClose();
}
// @ts-ignore
destroy.apply(this, args);
}
});
// Legacy support
if (currentConfig.visible) {
delete currentConfig.visible;
}
render(currentConfig);
}
function update(configUpdate) {
if (typeof configUpdate === 'function') {
currentConfig = configUpdate(currentConfig);
} else {
currentConfig = Object.assign(Object.assign({}, currentConfig), configUpdate);
}
render(currentConfig);
}
render(currentConfig);
modal_destroyFns.push(close);
return {
destroy: close,
update
};
}
function withWarn(props) {
return Object.assign(Object.assign({}, props), {
type: 'warning'
});
}
function withInfo(props) {
return Object.assign(Object.assign({}, props), {
type: 'info'
});
}
function withSuccess(props) {
return Object.assign(Object.assign({}, props), {
type: 'success'
});
}
function withError(props) {
return Object.assign(Object.assign({}, props), {
type: 'error'
});
}
function withConfirm(props) {
return Object.assign(Object.assign({}, props), {
type: 'confirm'
});
}
function modalGlobalConfig(_ref) {
let {
rootPrefixCls
} = _ref;
true ? (0,_util_warning["default"])(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') : 0;
defaultRootPrefixCls = rootPrefixCls;
}
;// ./components/modal/useModal/HookModal.tsx
var HookModal_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;
};
const HookModal = (_a, ref) => {
var _b;
var {
afterClose: hookAfterClose,
config
} = _a,
restProps = HookModal_rest(_a, ["afterClose", "config"]);
const [open, setOpen] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
const [innerConfig, setInnerConfig] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(config);
const {
direction,
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('modal');
const rootPrefixCls = getPrefixCls();
const afterClose = () => {
var _a;
hookAfterClose();
(_a = innerConfig.afterClose) === null || _a === void 0 ? void 0 : _a.call(innerConfig);
};
const close = function () {
var _a;
setOpen(false);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
const triggerCancel = args.some(param => param === null || param === void 0 ? void 0 : param.triggerCancel);
if (triggerCancel) {
var _a2;
(_a = innerConfig.onCancel) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [innerConfig, () => {}].concat((0,toConsumableArray["default"])(args.slice(1))));
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
destroy: close,
update: newConfig => {
setInnerConfig(originConfig => Object.assign(Object.assign({}, originConfig), newConfig));
}
}));
const mergedOkCancel = (_b = innerConfig.okCancel) !== null && _b !== void 0 ? _b : innerConfig.type === 'confirm';
const [contextLocale] = (0,useLocale["default"])('Modal', en_US["default"].Modal);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(modal_ConfirmDialog, Object.assign({
prefixCls: prefixCls,
rootPrefixCls: rootPrefixCls
}, innerConfig, {
close: close,
open: open,
afterClose: afterClose,
okText: innerConfig.okText || (mergedOkCancel ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.justOkText),
direction: innerConfig.direction || direction,
cancelText: innerConfig.cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText)
}, restProps));
};
/* harmony default export */ var useModal_HookModal = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(HookModal));
;// ./components/modal/useModal/index.tsx
let useModal_uuid = 0;
const ElementsHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_props, ref) => {
const [elements, patchElement] = usePatchElement();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
patchElement
}), []);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, elements);
}));
function useModal() {
const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ========================== Effect ==========================
const [actionQueue, setActionQueue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (actionQueue.length) {
const cloneQueue = (0,toConsumableArray["default"])(actionQueue);
cloneQueue.forEach(action => {
action();
});
setActionQueue([]);
}
}, [actionQueue]);
// =========================== Hook ===========================
const getConfirmFunc = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(withFunc => function hookConfirm(config) {
var _a;
useModal_uuid += 1;
const modalRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createRef();
// Proxy to promise with `onClose`
let resolvePromise;
const promise = new Promise(resolve => {
resolvePromise = resolve;
});
let silent = false;
let closeFunc;
const modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useModal_HookModal, {
key: `modal-${useModal_uuid}`,
config: withFunc(config),
ref: modalRef,
afterClose: () => {
closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();
},
isSilent: () => silent,
onConfirm: confirmed => {
resolvePromise(confirmed);
}
});
closeFunc = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.patchElement(modal);
if (closeFunc) {
modal_destroyFns.push(closeFunc);
}
const instance = {
destroy: () => {
function destroyAction() {
var _a;
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
}
if (modalRef.current) {
destroyAction();
} else {
setActionQueue(prev => [].concat((0,toConsumableArray["default"])(prev), [destroyAction]));
}
},
update: newConfig => {
function updateAction() {
var _a;
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.update(newConfig);
}
if (modalRef.current) {
updateAction();
} else {
setActionQueue(prev => [].concat((0,toConsumableArray["default"])(prev), [updateAction]));
}
},
then: resolve => {
silent = true;
return promise.then(resolve);
}
};
return instance;
}, []);
const fns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
info: getConfirmFunc(withInfo),
success: getConfirmFunc(withSuccess),
error: getConfirmFunc(withError),
warning: getConfirmFunc(withWarn),
confirm: getConfirmFunc(withConfirm)
}), []);
return [fns, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ElementsHolder, {
key: "modal-holder",
ref: holderRef
})];
}
/* harmony default export */ var modal_useModal = (useModal);
// EXTERNAL MODULE: ./components/notification/style/index.ts + 3 modules
var notification_style = __webpack_require__("./components/notification/style/index.ts");
;// ./components/notification/style/pure-panel.ts
/* harmony default export */ var pure_panel = ((0,genStyleUtils.genSubStyleComponent)(['Notification', 'PurePanel'], token => {
const noticeCls = `${token.componentCls}-notice`;
const notificationToken = (0,notification_style.prepareNotificationToken)(token);
return {
[`${noticeCls}-pure-panel`]: Object.assign(Object.assign({}, (0,notification_style.genNoticeStyle)(notificationToken)), {
width: notificationToken.width,
maxWidth: `calc(100vw - ${(0,cssinjs.unit)(token.calc(notificationToken.notificationMarginEdge).mul(2).equal())})`,
margin: 0
})
};
}, notification_style.prepareComponentToken));
;// ./components/notification/PurePanel.tsx
var notification_PurePanel_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;
};
const PurePanel_TypeIcon = {
info: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_InfoCircleFilled, null),
success: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null),
error: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null),
warning: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
loading: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null)
};
function getCloseIcon(prefixCls, closeIcon) {
if (closeIcon === null || closeIcon === false) {
return null;
}
return closeIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
className: `${prefixCls}-close-icon`
});
}
const typeToIcon = {
success: icons_CheckCircleFilled,
info: icons_InfoCircleFilled,
error: icons_CloseCircleFilled,
warning: icons_ExclamationCircleFilled
};
const PurePanel_PureContent = props => {
const {
prefixCls,
icon,
type,
message,
description,
actions,
role = 'alert'
} = props;
let iconNode = null;
if (icon) {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-icon`
}, icon);
} else if (type) {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typeToIcon[type] || null, {
className: classnames_default()(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()({
[`${prefixCls}-with-icon`]: iconNode
}),
role: role
}, iconNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-message`
}, message), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-description`
}, description), actions && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-actions`
}, actions));
};
/** @private Internal Component. Do not use in your production. */
const PurePanel_PurePanel = props => {
const {
prefixCls: staticPrefixCls,
className,
icon,
type,
message,
description,
btn,
actions,
closable = true,
closeIcon,
className: notificationClassName
} = props,
restProps = notification_PurePanel_rest(props, ["prefixCls", "className", "icon", "type", "message", "description", "btn", "actions", "closable", "closeIcon", "className"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const mergedActions = actions !== null && actions !== void 0 ? actions : btn;
if (true) {
const warning = (0,_util_warning.devUseWarning)('Notification');
warning.deprecated(!btn, 'btn', 'actions');
}
const prefixCls = staticPrefixCls || getPrefixCls('notification');
const noticePrefixCls = `${prefixCls}-notice`;
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,notification_style["default"])(prefixCls, rootCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${noticePrefixCls}-pure-panel`, hashId, className, cssVarCls, rootCls)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(pure_panel, {
prefixCls: prefixCls
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Notice, Object.assign({}, restProps, {
prefixCls: prefixCls,
eventKey: "pure",
duration: null,
closable: closable,
className: classnames_default()({
notificationClassName
}),
closeIcon: getCloseIcon(prefixCls, closeIcon),
content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PurePanel_PureContent, {
prefixCls: noticePrefixCls,
icon: icon,
type: type,
message: message,
description: description,
actions: mergedActions
})
}))));
};
/* harmony default export */ var notification_PurePanel = (PurePanel_PurePanel);
;// ./components/notification/util.ts
function getPlacementStyle(placement, top, bottom) {
let style;
switch (placement) {
case 'top':
style = {
left: '50%',
transform: 'translateX(-50%)',
right: 'auto',
top,
bottom: 'auto'
};
break;
case 'topLeft':
style = {
left: 0,
top,
bottom: 'auto'
};
break;
case 'topRight':
style = {
right: 0,
top,
bottom: 'auto'
};
break;
case 'bottom':
style = {
left: '50%',
transform: 'translateX(-50%)',
right: 'auto',
top: 'auto',
bottom
};
break;
case 'bottomLeft':
style = {
left: 0,
top: 'auto',
bottom
};
break;
default:
style = {
right: 0,
top: 'auto',
bottom
};
break;
}
return style;
}
function util_getMotion(prefixCls) {
return {
motionName: `${prefixCls}-fade`
};
}
function getCloseIconConfig(closeIcon, notificationConfig, notification) {
if (typeof closeIcon !== 'undefined') {
return closeIcon;
}
if (typeof (notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.closeIcon) !== 'undefined') {
return notificationConfig.closeIcon;
}
return notification === null || notification === void 0 ? void 0 : notification.closeIcon;
}
;// ./components/notification/useNotification.tsx
var useNotification_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;
};
const useNotification_DEFAULT_OFFSET = 24;
const useNotification_DEFAULT_DURATION = 4.5;
const DEFAULT_PLACEMENT = 'topRight';
const useNotification_Wrapper = _ref => {
let {
children,
prefixCls
} = _ref;
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,notification_style["default"])(prefixCls, rootCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_NotificationProvider, {
classNames: {
list: classnames_default()(hashId, cssVarCls, rootCls)
}
}, children));
};
const useNotification_renderNotifications = (node, _ref2) => {
let {
prefixCls,
key
} = _ref2;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(useNotification_Wrapper, {
prefixCls: prefixCls,
key: key
}, node);
};
const useNotification_Holder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
top,
bottom,
prefixCls: staticPrefixCls,
getContainer: staticGetContainer,
maxCount,
rtl,
onAllRemoved,
stack,
duration,
pauseOnHover = true,
showProgress
} = props;
const {
getPrefixCls,
getPopupContainer,
notification,
direction
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const [, token] = (0,useToken["default"])();
const prefixCls = staticPrefixCls || getPrefixCls('notification');
// =============================== Style ===============================
const getStyle = placement => getPlacementStyle(placement, top !== null && top !== void 0 ? top : useNotification_DEFAULT_OFFSET, bottom !== null && bottom !== void 0 ? bottom : useNotification_DEFAULT_OFFSET);
const getClassName = () => classnames_default()({
[`${prefixCls}-rtl`]: rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl'
});
// ============================== Motion ===============================
const getNotificationMotion = () => util_getMotion(prefixCls);
// ============================== Origin ===============================
const [api, holder] = useNotification({
prefixCls,
style: getStyle,
className: getClassName,
motion: getNotificationMotion,
closable: true,
closeIcon: getCloseIcon(prefixCls),
duration: duration !== null && duration !== void 0 ? duration : useNotification_DEFAULT_DURATION,
getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,
maxCount,
pauseOnHover,
showProgress,
onAllRemoved,
renderNotifications: useNotification_renderNotifications,
stack: stack === false ? false : {
threshold: typeof stack === 'object' ? stack === null || stack === void 0 ? void 0 : stack.threshold : undefined,
offset: 8,
gap: token.margin
}
});
// ================================ Ref ================================
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {
prefixCls,
notification
}));
return holder;
});
// ==============================================================================
// == Hook ==
// ==============================================================================
function useInternalNotification(notificationConfig) {
const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const warning = (0,_util_warning.devUseWarning)('Notification');
// ================================ API ================================
const wrapAPI = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
// Wrap with notification content
// >>> Open
const open = config => {
var _a;
if (!holderRef.current) {
true ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : 0;
return;
}
const {
open: originOpen,
prefixCls,
notification
} = holderRef.current;
const noticePrefixCls = `${prefixCls}-notice`;
const {
message,
description,
icon,
type,
btn,
actions,
className,
style,
role = 'alert',
closeIcon,
closable
} = config,
restConfig = useNotification_rest(config, ["message", "description", "icon", "type", "btn", "actions", "className", "style", "role", "closeIcon", "closable"]);
if (true) {
warning.deprecated(!btn, 'btn', 'actions');
}
const mergedActions = actions !== null && actions !== void 0 ? actions : btn;
const realCloseIcon = getCloseIcon(noticePrefixCls, getCloseIconConfig(closeIcon, notificationConfig, notification));
return originOpen(Object.assign(Object.assign({
// use placement from props instead of hard-coding "topRight"
placement: (_a = notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.placement) !== null && _a !== void 0 ? _a : DEFAULT_PLACEMENT
}, restConfig), {
content: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PurePanel_PureContent, {
prefixCls: noticePrefixCls,
icon: icon,
type: type,
message: message,
description: description,
actions: mergedActions,
role: role
})),
className: classnames_default()(type && `${noticePrefixCls}-${type}`, className, notification === null || notification === void 0 ? void 0 : notification.className),
style: Object.assign(Object.assign({}, notification === null || notification === void 0 ? void 0 : notification.style), style),
closeIcon: realCloseIcon,
closable: closable !== null && closable !== void 0 ? closable : !!realCloseIcon
}));
};
// >>> destroy
const destroy = key => {
var _a, _b;
if (key !== undefined) {
(_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);
} else {
(_b = holderRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
}
};
const clone = {
open,
destroy
};
const keys = ['success', 'info', 'warning', 'error'];
keys.forEach(type => {
clone[type] = config => open(Object.assign(Object.assign({}, config), {
type
}));
});
return clone;
}, []);
// ============================== Return ===============================
return [wrapAPI, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(useNotification_Holder, Object.assign({
key: "notification-holder"
}, notificationConfig, {
ref: holderRef
}))];
}
function useNotification_useNotification(notificationConfig) {
return useInternalNotification(notificationConfig);
}
;// ./components/app/context.ts
const AppConfigContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
const AppContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
message: {},
notification: {},
modal: {}
});
/* harmony default export */ var app_context = (AppContext);
// EXTERNAL MODULE: ./components/app/style/index.ts
var app_style = __webpack_require__("./components/app/style/index.ts");
;// ./components/app/App.tsx
const App = props => {
const {
prefixCls: customizePrefixCls,
children,
className,
rootClassName,
message,
notification,
style,
component = 'div'
} = props;
const {
direction,
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('app', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,app_style["default"])(prefixCls);
const customClassName = classnames_default()(hashId, prefixCls, className, rootClassName, cssVarCls, {
[`${prefixCls}-rtl`]: direction === 'rtl'
});
const appConfig = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AppConfigContext);
const mergedAppConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
message: Object.assign(Object.assign({}, appConfig.message), message),
notification: Object.assign(Object.assign({}, appConfig.notification), notification)
}), [message, notification, appConfig.message, appConfig.notification]);
const [messageApi, messageContextHolder] = useMessage(mergedAppConfig.message);
const [notificationApi, notificationContextHolder] = useNotification_useNotification(mergedAppConfig.notification);
const [ModalApi, ModalContextHolder] = modal_useModal();
const memoizedContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
message: messageApi,
notification: notificationApi,
modal: ModalApi
}), [messageApi, notificationApi, ModalApi]);
// https://github.com/ant-design/ant-design/issues/48802#issuecomment-2097813526
(0,_util_warning.devUseWarning)('App')(!(cssVarCls && component === false), 'usage', 'When using cssVar, ensure `component` is assigned a valid React component string.');
// ============================ Render ============================
const Component = component === false ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment : component;
const rootProps = {
className: customClassName,
style
};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(app_context.Provider, {
value: memoizedContextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AppConfigContext.Provider, {
value: mergedAppConfig
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, Object.assign({}, component === false ? undefined : rootProps), ModalContextHolder, messageContextHolder, notificationContextHolder, children))));
};
if (true) {
App.displayName = 'App';
}
/* harmony default export */ var app_App = (App);
;// ./components/app/useApp.ts
const useApp = () => external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(app_context);
/* harmony default export */ var app_useApp = (useApp);
;// ./components/app/index.tsx
const components_app_App = app_App;
components_app_App.useApp = app_useApp;
/* harmony default export */ var app = (components_app_App);
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__("./node_modules/rc-util/es/hooks/useMergedState.js");
;// ./components/_util/PurePanel.tsx
function withPureRenderTheme(Component) {
return props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
theme: {
token: {
motion: false,
zIndexPopupBase: 0
}
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({}, props))));
}
/* istanbul ignore next */
const genPurePanel = (Component, alignPropName, postProps, defaultPrefixCls, getDropdownCls) => {
const PurePanel = props => {
const {
prefixCls: customizePrefixCls,
style
} = props;
const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const [popupHeight, setPopupHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [popupWidth, setPopupWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [open, setOpen] = (0,useMergedState["default"])(false, {
value: props.open
});
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls(defaultPrefixCls || 'select', customizePrefixCls);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
// We do not care about ssr
setOpen(true);
if (typeof ResizeObserver !== 'undefined') {
const resizeObserver = new ResizeObserver(entries => {
const element = entries[0].target;
setPopupHeight(element.offsetHeight + 8);
setPopupWidth(element.offsetWidth);
});
const interval = setInterval(() => {
var _a;
const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls)}` : `.${prefixCls}-dropdown`;
const popup = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(dropdownCls);
if (popup) {
clearInterval(interval);
resizeObserver.observe(popup);
}
}, 10);
return () => {
clearInterval(interval);
resizeObserver.disconnect();
};
}
}, []);
let mergedProps = Object.assign(Object.assign({}, props), {
style: Object.assign(Object.assign({}, style), {
margin: 0
}),
open,
visible: open,
getPopupContainer: () => holderRef.current
});
if (postProps) {
mergedProps = postProps(mergedProps);
}
if (alignPropName) {
Object.assign(mergedProps, {
[alignPropName]: {
overflow: {
adjustX: false,
adjustY: false
}
}
});
}
const mergedStyle = {
paddingBottom: popupHeight,
position: 'relative',
minWidth: popupWidth
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: holderRef,
style: mergedStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({}, mergedProps)));
};
return withPureRenderTheme(PurePanel);
};
/* harmony default export */ var _util_PurePanel = (genPurePanel);
;// ./node_modules/rc-util/es/isMobile.js
/* harmony default export */ var isMobile = (function () {
if (typeof navigator === 'undefined' || typeof window === 'undefined') {
return false;
}
var agent = navigator.userAgent || navigator.vendor || window.opera;
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4));
});
;// ./node_modules/rc-select/es/TransBtn.js
var TransBtn = function TransBtn(props) {
var className = props.className,
customizeIcon = props.customizeIcon,
customizeIconProps = props.customizeIconProps,
children = props.children,
_onMouseDown = props.onMouseDown,
onClick = props.onClick;
var icon = typeof customizeIcon === 'function' ? customizeIcon(customizeIconProps) : customizeIcon;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: className,
onMouseDown: function onMouseDown(event) {
event.preventDefault();
_onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(event);
},
style: {
userSelect: 'none',
WebkitUserSelect: 'none'
},
unselectable: "on",
onClick: onClick,
"aria-hidden": true
}, icon !== undefined ? icon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(className.split(/\s+/).map(function (cls) {
return "".concat(cls, "-icon");
}))
}, children));
};
/* harmony default export */ var es_TransBtn = (TransBtn);
;// ./node_modules/rc-select/es/hooks/useAllowClear.js
var useAllowClear = function useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon) {
var disabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
var mergedSearchValue = arguments.length > 6 ? arguments[6] : undefined;
var mode = arguments.length > 7 ? arguments[7] : undefined;
var mergedClearIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if ((0,esm_typeof["default"])(allowClear) === 'object') {
return allowClear.clearIcon;
}
if (clearIcon) {
return clearIcon;
}
}, [allowClear, clearIcon]);
var mergedAllowClear = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if (!disabled && !!allowClear && (displayValues.length || mergedSearchValue) && !(mode === 'combobox' && mergedSearchValue === '')) {
return true;
}
return false;
}, [allowClear, disabled, displayValues.length, mergedSearchValue, mode]);
return {
allowClear: mergedAllowClear,
clearIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_TransBtn, {
className: "".concat(prefixCls, "-clear"),
onMouseDown: onClearMouseDown,
customizeIcon: mergedClearIcon
}, "\xD7")
};
};
;// ./node_modules/rc-select/es/hooks/useBaseProps.js
/**
* BaseSelect provide some parsed data into context.
* You can use this hooks to get them.
*/
var BaseSelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
function useBaseProps() {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(BaseSelectContext);
}
;// ./node_modules/rc-select/es/hooks/useDelayReset.js
/**
* Similar with `useLock`, but this hook will always execute last value.
* When set to `true`, it will keep `true` for a short time even if `false` is set.
*/
function useDelayReset() {
var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
bool = _React$useState2[0],
setBool = _React$useState2[1];
var delayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var cancelLatest = function cancelLatest() {
window.clearTimeout(delayRef.current);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return cancelLatest;
}, []);
var delaySetBool = function delaySetBool(value, callback) {
cancelLatest();
delayRef.current = window.setTimeout(function () {
setBool(value);
if (callback) {
callback();
}
}, timeout);
};
return [bool, delaySetBool, cancelLatest];
}
;// ./node_modules/rc-select/es/hooks/useLock.js
/**
* Locker return cached mark.
* If set to `true`, will return `true` in a short time even if set `false`.
* If set to `false` and then set to `true`, will change to `true`.
* And after time duration, it will back to `null` automatically.
*/
function useLock() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 250;
var lockRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var timeoutRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// Clean up
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
window.clearTimeout(timeoutRef.current);
};
}, []);
function doLock(locked) {
if (locked || lockRef.current === null) {
lockRef.current = locked;
}
window.clearTimeout(timeoutRef.current);
timeoutRef.current = window.setTimeout(function () {
lockRef.current = null;
}, duration);
}
return [function () {
return lockRef.current;
}, doLock];
}
;// ./node_modules/rc-select/es/hooks/useSelectTriggerControl.js
function useSelectTriggerControl(elements, open, triggerOpen, customizedTrigger) {
var propsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
propsRef.current = {
open: open,
triggerOpen: triggerOpen,
customizedTrigger: customizedTrigger
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
function onGlobalMouseDown(event) {
var _propsRef$current;
// If trigger is customized, Trigger will take control of popupVisible
if ((_propsRef$current = propsRef.current) !== null && _propsRef$current !== void 0 && _propsRef$current.customizedTrigger) {
return;
}
var target = event.target;
if (target.shadowRoot && event.composed) {
target = event.composedPath()[0] || target;
}
if (propsRef.current.open && elements().filter(function (element) {
return element;
}).every(function (element) {
return !element.contains(target) && element !== target;
})) {
// Should trigger close
propsRef.current.triggerOpen(false);
}
}
window.addEventListener('mousedown', onGlobalMouseDown);
return function () {
return window.removeEventListener('mousedown', onGlobalMouseDown);
};
}, []);
}
;// ./node_modules/rc-select/es/utils/keyUtil.js
/** keyCode Judgment function */
function isValidateOpenKey(currentKeyCode) {
return (
// Undefined for Edge bug:
// https://github.com/ant-design/ant-design/issues/51292
currentKeyCode &&
// Other keys
![
// System function button
KeyCode["default"].ESC, KeyCode["default"].SHIFT, KeyCode["default"].BACKSPACE, KeyCode["default"].TAB, KeyCode["default"].WIN_KEY, KeyCode["default"].ALT, KeyCode["default"].META, KeyCode["default"].WIN_KEY_RIGHT, KeyCode["default"].CTRL, KeyCode["default"].SEMICOLON, KeyCode["default"].EQUALS, KeyCode["default"].CAPS_LOCK, KeyCode["default"].CONTEXT_MENU,
// F1-F12
KeyCode["default"].F1, KeyCode["default"].F2, KeyCode["default"].F3, KeyCode["default"].F4, KeyCode["default"].F5, KeyCode["default"].F6, KeyCode["default"].F7, KeyCode["default"].F8, KeyCode["default"].F9, KeyCode["default"].F10, KeyCode["default"].F11, KeyCode["default"].F12].includes(currentKeyCode)
);
}
;// ./node_modules/rc-overflow/es/Item.js
var Item_excluded = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"];
// Use shared variable to save bundle size
var UNDEFINED = undefined;
function InternalItem(props, ref) {
var prefixCls = props.prefixCls,
invalidate = props.invalidate,
item = props.item,
renderItem = props.renderItem,
responsive = props.responsive,
responsiveDisabled = props.responsiveDisabled,
registerSize = props.registerSize,
itemKey = props.itemKey,
className = props.className,
style = props.style,
children = props.children,
display = props.display,
order = props.order,
_props$component = props.component,
Component = _props$component === void 0 ? 'div' : _props$component,
restProps = (0,objectWithoutProperties["default"])(props, Item_excluded);
var mergedHidden = responsive && !display;
// ================================ Effect ================================
function internalRegisterSize(width) {
registerSize(itemKey, width);
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
internalRegisterSize(null);
};
}, []);
// ================================ Render ================================
var childNode = renderItem && item !== UNDEFINED ? renderItem(item, {
index: order
}) : children;
var overflowStyle;
if (!invalidate) {
overflowStyle = {
opacity: mergedHidden ? 0 : 1,
height: mergedHidden ? 0 : UNDEFINED,
overflowY: mergedHidden ? 'hidden' : UNDEFINED,
order: responsive ? order : UNDEFINED,
pointerEvents: mergedHidden ? 'none' : UNDEFINED,
position: mergedHidden ? 'absolute' : UNDEFINED
};
}
var overflowProps = {};
if (mergedHidden) {
overflowProps['aria-hidden'] = true;
}
var itemNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({
className: classnames_default()(!invalidate && prefixCls, className),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, overflowStyle), style)
}, overflowProps, restProps, {
ref: ref
}), childNode);
if (responsive) {
itemNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: function onResize(_ref) {
var offsetWidth = _ref.offsetWidth;
internalRegisterSize(offsetWidth);
},
disabled: responsiveDisabled
}, itemNode);
}
return itemNode;
}
var Item = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalItem);
Item.displayName = 'Item';
/* harmony default export */ var es_Item = (Item);
;// ./node_modules/rc-overflow/es/hooks/channelUpdate.js
function channelUpdate(callback) {
if (typeof MessageChannel === 'undefined') {
(0,raf["default"])(callback);
} else {
var channel = new MessageChannel();
channel.port1.onmessage = function () {
return callback();
};
channel.port2.postMessage(undefined);
}
}
;// ./node_modules/rc-overflow/es/hooks/useEffectState.js
/**
* Batcher for record any `useEffectState` need update.
*/
function useBatcher() {
// Updater Trigger
var updateFuncRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// Notify update
var notifyEffectUpdate = function notifyEffectUpdate(callback) {
if (!updateFuncRef.current) {
updateFuncRef.current = [];
channelUpdate(function () {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.unstable_batchedUpdates)(function () {
updateFuncRef.current.forEach(function (fn) {
fn();
});
updateFuncRef.current = null;
});
});
}
updateFuncRef.current.push(callback);
};
return notifyEffectUpdate;
}
/**
* Trigger state update by `useLayoutEffect` to save perf.
*/
function useEffectState(notifyEffectUpdate, defaultValue) {
// Value
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(defaultValue),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
stateValue = _React$useState2[0],
setStateValue = _React$useState2[1];
// Set State
var setEffectVal = (0,useEvent["default"])(function (nextValue) {
notifyEffectUpdate(function () {
setStateValue(nextValue);
});
});
return [stateValue, setEffectVal];
}
;// ./node_modules/rc-overflow/es/context.js
var OverflowContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
;// ./node_modules/rc-overflow/es/RawItem.js
var RawItem_excluded = ["component"],
_excluded2 = ["className"],
_excluded3 = ["className"];
var InternalRawItem = function InternalRawItem(props, ref) {
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(OverflowContext);
// Render directly when context not provided
if (!context) {
var _props$component = props.component,
Component = _props$component === void 0 ? 'div' : _props$component,
_restProps = (0,objectWithoutProperties["default"])(props, RawItem_excluded);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, _restProps, {
ref: ref
}));
}
var contextClassName = context.className,
restContext = (0,objectWithoutProperties["default"])(context, _excluded2);
var className = props.className,
restProps = (0,objectWithoutProperties["default"])(props, _excluded3);
// Do not pass context to sub item to avoid multiple measure
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverflowContext.Provider, {
value: null
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({
ref: ref,
className: classnames_default()(contextClassName, className)
}, restContext, restProps)));
};
var RawItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalRawItem);
RawItem.displayName = 'RawItem';
/* harmony default export */ var es_RawItem = (RawItem);
;// ./node_modules/rc-overflow/es/Overflow.js
var Overflow_excluded = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"];
var RESPONSIVE = 'responsive';
var INVALIDATE = 'invalidate';
function defaultRenderRest(omittedItems) {
return "+ ".concat(omittedItems.length, " ...");
}
function Overflow(props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-overflow' : _props$prefixCls,
_props$data = props.data,
data = _props$data === void 0 ? [] : _props$data,
renderItem = props.renderItem,
renderRawItem = props.renderRawItem,
itemKey = props.itemKey,
_props$itemWidth = props.itemWidth,
itemWidth = _props$itemWidth === void 0 ? 10 : _props$itemWidth,
ssr = props.ssr,
style = props.style,
className = props.className,
maxCount = props.maxCount,
renderRest = props.renderRest,
renderRawRest = props.renderRawRest,
suffix = props.suffix,
_props$component = props.component,
Component = _props$component === void 0 ? 'div' : _props$component,
itemComponent = props.itemComponent,
onVisibleChange = props.onVisibleChange,
restProps = (0,objectWithoutProperties["default"])(props, Overflow_excluded);
var fullySSR = ssr === 'full';
var notifyEffectUpdate = useBatcher();
var _useEffectState = useEffectState(notifyEffectUpdate, null),
_useEffectState2 = (0,slicedToArray["default"])(_useEffectState, 2),
containerWidth = _useEffectState2[0],
setContainerWidth = _useEffectState2[1];
var mergedContainerWidth = containerWidth || 0;
var _useEffectState3 = useEffectState(notifyEffectUpdate, new Map()),
_useEffectState4 = (0,slicedToArray["default"])(_useEffectState3, 2),
itemWidths = _useEffectState4[0],
setItemWidths = _useEffectState4[1];
var _useEffectState5 = useEffectState(notifyEffectUpdate, 0),
_useEffectState6 = (0,slicedToArray["default"])(_useEffectState5, 2),
prevRestWidth = _useEffectState6[0],
setPrevRestWidth = _useEffectState6[1];
var _useEffectState7 = useEffectState(notifyEffectUpdate, 0),
_useEffectState8 = (0,slicedToArray["default"])(_useEffectState7, 2),
restWidth = _useEffectState8[0],
setRestWidth = _useEffectState8[1];
var _useEffectState9 = useEffectState(notifyEffectUpdate, 0),
_useEffectState10 = (0,slicedToArray["default"])(_useEffectState9, 2),
suffixWidth = _useEffectState10[0],
setSuffixWidth = _useEffectState10[1];
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
suffixFixedStart = _useState2[0],
setSuffixFixedStart = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
displayCount = _useState4[0],
setDisplayCount = _useState4[1];
var mergedDisplayCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (displayCount === null && fullySSR) {
return Number.MAX_SAFE_INTEGER;
}
return displayCount || 0;
}, [displayCount, containerWidth]);
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState6 = (0,slicedToArray["default"])(_useState5, 2),
restReady = _useState6[0],
setRestReady = _useState6[1];
var itemPrefixCls = "".concat(prefixCls, "-item");
// Always use the max width to avoid blink
var mergedRestWidth = Math.max(prevRestWidth, restWidth);
// ================================= Data =================================
var isResponsive = maxCount === RESPONSIVE;
var shouldResponsive = data.length && isResponsive;
var invalidate = maxCount === INVALIDATE;
/**
* When is `responsive`, we will always render rest node to get the real width of it for calculation
*/
var showRest = shouldResponsive || typeof maxCount === 'number' && data.length > maxCount;
var mergedData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var items = data;
if (shouldResponsive) {
if (containerWidth === null && fullySSR) {
items = data;
} else {
items = data.slice(0, Math.min(data.length, mergedContainerWidth / itemWidth));
}
} else if (typeof maxCount === 'number') {
items = data.slice(0, maxCount);
}
return items;
}, [data, itemWidth, containerWidth, maxCount, shouldResponsive]);
var omittedItems = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
if (shouldResponsive) {
return data.slice(mergedDisplayCount + 1);
}
return data.slice(mergedData.length);
}, [data, mergedData, shouldResponsive, mergedDisplayCount]);
// ================================= Item =================================
var getKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (item, index) {
var _ref;
if (typeof itemKey === 'function') {
return itemKey(item);
}
return (_ref = itemKey && (item === null || item === void 0 ? void 0 : item[itemKey])) !== null && _ref !== void 0 ? _ref : index;
}, [itemKey]);
var mergedRenderItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(renderItem || function (item) {
return item;
}, [renderItem]);
function updateDisplayCount(count, suffixFixedStartVal, notReady) {
// React 18 will sync render even when the value is same in some case.
// We take `mergedData` as deps which may cause dead loop if it's dynamic generate.
// ref: https://github.com/ant-design/ant-design/issues/36559
if (displayCount === count && (suffixFixedStartVal === undefined || suffixFixedStartVal === suffixFixedStart)) {
return;
}
setDisplayCount(count);
if (!notReady) {
setRestReady(count < data.length - 1);
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(count);
}
if (suffixFixedStartVal !== undefined) {
setSuffixFixedStart(suffixFixedStartVal);
}
}
// ================================= Size =================================
function onOverflowResize(_, element) {
setContainerWidth(element.clientWidth);
}
function registerSize(key, width) {
setItemWidths(function (origin) {
var clone = new Map(origin);
if (width === null) {
clone.delete(key);
} else {
clone.set(key, width);
}
return clone;
});
}
function registerOverflowSize(_, width) {
setRestWidth(width);
setPrevRestWidth(restWidth);
}
function registerSuffixSize(_, width) {
setSuffixWidth(width);
}
// ================================ Effect ================================
function getItemWidth(index) {
return itemWidths.get(getKey(mergedData[index], index));
}
(0,useLayoutEffect["default"])(function () {
if (mergedContainerWidth && typeof mergedRestWidth === 'number' && mergedData) {
var totalWidth = suffixWidth;
var len = mergedData.length;
var lastIndex = len - 1;
// When data count change to 0, reset this since not loop will reach
if (!len) {
updateDisplayCount(0, null);
return;
}
for (var i = 0; i < len; i += 1) {
var currentItemWidth = getItemWidth(i);
// Fully will always render
if (fullySSR) {
currentItemWidth = currentItemWidth || 0;
}
// Break since data not ready
if (currentItemWidth === undefined) {
updateDisplayCount(i - 1, undefined, true);
break;
}
// Find best match
totalWidth += currentItemWidth;
if (
// Only one means `totalWidth` is the final width
lastIndex === 0 && totalWidth <= mergedContainerWidth ||
// Last two width will be the final width
i === lastIndex - 1 && totalWidth + getItemWidth(lastIndex) <= mergedContainerWidth) {
// Additional check if match the end
updateDisplayCount(lastIndex, null);
break;
} else if (totalWidth + mergedRestWidth > mergedContainerWidth) {
// Can not hold all the content to show rest
updateDisplayCount(i - 1, totalWidth - currentItemWidth - suffixWidth + restWidth);
break;
}
}
if (suffix && getItemWidth(0) + suffixWidth > mergedContainerWidth) {
setSuffixFixedStart(null);
}
}
}, [mergedContainerWidth, itemWidths, restWidth, suffixWidth, getKey, mergedData]);
// ================================ Render ================================
var displayRest = restReady && !!omittedItems.length;
var suffixStyle = {};
if (suffixFixedStart !== null && shouldResponsive) {
suffixStyle = {
position: 'absolute',
left: suffixFixedStart,
top: 0
};
}
var itemSharedProps = {
prefixCls: itemPrefixCls,
responsive: shouldResponsive,
component: itemComponent,
invalidate: invalidate
};
// >>>>> Choice render fun by `renderRawItem`
var internalRenderItemNode = renderRawItem ? function (item, index) {
var key = getKey(item, index);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverflowContext.Provider, {
key: key,
value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, itemSharedProps), {}, {
order: index,
item: item,
itemKey: key,
registerSize: registerSize,
display: index <= mergedDisplayCount
})
}, renderRawItem(item, index));
} : function (item, index) {
var key = getKey(item, index);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({}, itemSharedProps, {
order: index,
key: key,
item: item,
renderItem: mergedRenderItem,
itemKey: key,
registerSize: registerSize,
display: index <= mergedDisplayCount
}));
};
// >>>>> Rest node
var restContextProps = {
order: displayRest ? mergedDisplayCount : Number.MAX_SAFE_INTEGER,
className: "".concat(itemPrefixCls, "-rest"),
registerSize: registerOverflowSize,
display: displayRest
};
var mergedRenderRest = renderRest || defaultRenderRest;
var restNode = renderRawRest ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverflowContext.Provider, {
value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, itemSharedProps), restContextProps)
}, renderRawRest(omittedItems)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({}, itemSharedProps, restContextProps), typeof mergedRenderRest === 'function' ? mergedRenderRest(omittedItems) : mergedRenderRest);
var overflowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({
className: classnames_default()(!invalidate && prefixCls, className),
style: style,
ref: ref
}, restProps), mergedData.map(internalRenderItemNode), showRest ? restNode : null, suffix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({}, itemSharedProps, {
responsive: isResponsive,
responsiveDisabled: !shouldResponsive,
order: mergedDisplayCount,
className: "".concat(itemPrefixCls, "-suffix"),
registerSize: registerSuffixSize,
display: true,
style: suffixStyle
}), suffix));
return isResponsive ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onOverflowResize,
disabled: !shouldResponsive
}, overflowNode) : overflowNode;
}
var ForwardOverflow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Overflow);
ForwardOverflow.displayName = 'Overflow';
ForwardOverflow.Item = es_RawItem;
ForwardOverflow.RESPONSIVE = RESPONSIVE;
ForwardOverflow.INVALIDATE = INVALIDATE;
// Convert to generic type
/* harmony default export */ var es_Overflow = (ForwardOverflow);
;// ./node_modules/rc-overflow/es/index.js
/* harmony default export */ var rc_overflow_es = (es_Overflow);
;// ./node_modules/rc-select/es/Selector/Input.js
var Input_Input = function Input(props, ref) {
var _inputNode2;
var prefixCls = props.prefixCls,
id = props.id,
inputElement = props.inputElement,
disabled = props.disabled,
tabIndex = props.tabIndex,
autoFocus = props.autoFocus,
autoComplete = props.autoComplete,
editable = props.editable,
activeDescendantId = props.activeDescendantId,
value = props.value,
maxLength = props.maxLength,
_onKeyDown = props.onKeyDown,
_onMouseDown = props.onMouseDown,
_onChange = props.onChange,
onPaste = props.onPaste,
_onCompositionStart = props.onCompositionStart,
_onCompositionEnd = props.onCompositionEnd,
_onBlur = props.onBlur,
open = props.open,
attrs = props.attrs;
var inputNode = inputElement || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", null);
var _inputNode = inputNode,
originRef = _inputNode.ref,
originProps = _inputNode.props;
var onOriginKeyDown = originProps.onKeyDown,
onOriginChange = originProps.onChange,
onOriginMouseDown = originProps.onMouseDown,
onOriginCompositionStart = originProps.onCompositionStart,
onOriginCompositionEnd = originProps.onCompositionEnd,
onOriginBlur = originProps.onBlur,
style = originProps.style;
(0,warning.warning)(!('maxLength' in inputNode.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled.");
inputNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(inputNode, (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
type: 'search'
}, originProps), {}, {
// Override over origin props
id: id,
ref: (0,es_ref.composeRef)(ref, originRef),
disabled: disabled,
tabIndex: tabIndex,
autoComplete: autoComplete || 'off',
autoFocus: autoFocus,
className: classnames_default()("".concat(prefixCls, "-selection-search-input"), (_inputNode2 = inputNode) === null || _inputNode2 === void 0 || (_inputNode2 = _inputNode2.props) === null || _inputNode2 === void 0 ? void 0 : _inputNode2.className),
role: 'combobox',
'aria-expanded': open || false,
'aria-haspopup': 'listbox',
'aria-owns': "".concat(id, "_list"),
'aria-autocomplete': 'list',
'aria-controls': "".concat(id, "_list"),
'aria-activedescendant': open ? activeDescendantId : undefined
}, attrs), {}, {
value: editable ? value : '',
maxLength: maxLength,
readOnly: !editable,
unselectable: !editable ? 'on' : null,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
opacity: editable ? null : 0
}),
onKeyDown: function onKeyDown(event) {
_onKeyDown(event);
if (onOriginKeyDown) {
onOriginKeyDown(event);
}
},
onMouseDown: function onMouseDown(event) {
_onMouseDown(event);
if (onOriginMouseDown) {
onOriginMouseDown(event);
}
},
onChange: function onChange(event) {
_onChange(event);
if (onOriginChange) {
onOriginChange(event);
}
},
onCompositionStart: function onCompositionStart(event) {
_onCompositionStart(event);
if (onOriginCompositionStart) {
onOriginCompositionStart(event);
}
},
onCompositionEnd: function onCompositionEnd(event) {
_onCompositionEnd(event);
if (onOriginCompositionEnd) {
onOriginCompositionEnd(event);
}
},
onPaste: onPaste,
onBlur: function onBlur(event) {
_onBlur(event);
if (onOriginBlur) {
onOriginBlur(event);
}
}
}));
return inputNode;
};
var RefInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Input_Input);
if (true) {
RefInput.displayName = 'Input';
}
/* harmony default export */ var Selector_Input = (RefInput);
;// ./node_modules/rc-select/es/utils/commonUtil.js
function commonUtil_toArray(value) {
if (Array.isArray(value)) {
return value;
}
return value !== undefined ? [value] : [];
}
var isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;
/** Is client side and not jsdom */
var isBrowserClient = true && isClient;
function hasValue(value) {
return value !== undefined && value !== null;
}
/** combo mode no value judgment function */
function isComboNoValue(value) {
return !value && value !== 0;
}
function isTitleType(title) {
return ['string', 'number'].includes((0,esm_typeof["default"])(title));
}
function getTitle(item) {
var title = undefined;
if (item) {
if (isTitleType(item.title)) {
title = item.title.toString();
} else if (isTitleType(item.label)) {
title = item.label.toString();
}
}
return title;
}
;// ./node_modules/rc-select/es/hooks/useLayoutEffect.js
/* eslint-disable react-hooks/rules-of-hooks */
/**
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
*/
function useLayoutEffect_useLayoutEffect(effect, deps) {
// Never happen in test env
if (isBrowserClient) {
/* istanbul ignore next */
external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect(effect, deps);
} else {
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(effect, deps);
}
}
/* eslint-enable */
;// ./node_modules/rc-select/es/Selector/MultipleSelector.js
function itemKey(value) {
var _value$key;
return (_value$key = value.key) !== null && _value$key !== void 0 ? _value$key : value.value;
}
var onPreventMouseDown = function onPreventMouseDown(event) {
event.preventDefault();
event.stopPropagation();
};
var SelectSelector = function SelectSelector(props) {
var id = props.id,
prefixCls = props.prefixCls,
values = props.values,
open = props.open,
searchValue = props.searchValue,
autoClearSearchValue = props.autoClearSearchValue,
inputRef = props.inputRef,
placeholder = props.placeholder,
disabled = props.disabled,
mode = props.mode,
showSearch = props.showSearch,
autoFocus = props.autoFocus,
autoComplete = props.autoComplete,
activeDescendantId = props.activeDescendantId,
tabIndex = props.tabIndex,
removeIcon = props.removeIcon,
maxTagCount = props.maxTagCount,
maxTagTextLength = props.maxTagTextLength,
_props$maxTagPlacehol = props.maxTagPlaceholder,
maxTagPlaceholder = _props$maxTagPlacehol === void 0 ? function (omittedValues) {
return "+ ".concat(omittedValues.length, " ...");
} : _props$maxTagPlacehol,
tagRender = props.tagRender,
onToggleOpen = props.onToggleOpen,
onRemove = props.onRemove,
onInputChange = props.onInputChange,
onInputPaste = props.onInputPaste,
onInputKeyDown = props.onInputKeyDown,
onInputMouseDown = props.onInputMouseDown,
onInputCompositionStart = props.onInputCompositionStart,
onInputCompositionEnd = props.onInputCompositionEnd,
onInputBlur = props.onInputBlur;
var measureRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
inputWidth = _useState2[0],
setInputWidth = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
focused = _useState4[0],
setFocused = _useState4[1];
var selectionPrefixCls = "".concat(prefixCls, "-selection");
// ===================== Search ======================
var inputValue = open || mode === 'multiple' && autoClearSearchValue === false || mode === 'tags' ? searchValue : '';
var inputEditable = mode === 'tags' || mode === 'multiple' && autoClearSearchValue === false || showSearch && (open || focused);
// We measure width and set to the input immediately
useLayoutEffect_useLayoutEffect(function () {
setInputWidth(measureRef.current.scrollWidth);
}, [inputValue]);
// ===================== Render ======================
// >>> Render Selector Node. Includes Item & Rest
var defaultRenderSelector = function defaultRenderSelector(item, content, itemDisabled, closable, onClose) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
title: getTitle(item),
className: classnames_default()("".concat(selectionPrefixCls, "-item"), (0,defineProperty["default"])({}, "".concat(selectionPrefixCls, "-item-disabled"), itemDisabled))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(selectionPrefixCls, "-item-content")
}, content), closable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TransBtn, {
className: "".concat(selectionPrefixCls, "-item-remove"),
onMouseDown: onPreventMouseDown,
onClick: onClose,
customizeIcon: removeIcon
}, "\xD7"));
};
var customizeRenderSelector = function customizeRenderSelector(value, content, itemDisabled, closable, onClose, isMaxTag) {
var onMouseDown = function onMouseDown(e) {
onPreventMouseDown(e);
onToggleOpen(!open);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
onMouseDown: onMouseDown
}, tagRender({
label: content,
value: value,
disabled: itemDisabled,
closable: closable,
onClose: onClose,
isMaxTag: !!isMaxTag
}));
};
var renderItem = function renderItem(valueItem) {
var itemDisabled = valueItem.disabled,
label = valueItem.label,
value = valueItem.value;
var closable = !disabled && !itemDisabled;
var displayLabel = label;
if (typeof maxTagTextLength === 'number') {
if (typeof label === 'string' || typeof label === 'number') {
var strLabel = String(displayLabel);
if (strLabel.length > maxTagTextLength) {
displayLabel = "".concat(strLabel.slice(0, maxTagTextLength), "...");
}
}
}
var onClose = function onClose(event) {
if (event) {
event.stopPropagation();
}
onRemove(valueItem);
};
return typeof tagRender === 'function' ? customizeRenderSelector(value, displayLabel, itemDisabled, closable, onClose) : defaultRenderSelector(valueItem, displayLabel, itemDisabled, closable, onClose);
};
var renderRest = function renderRest(omittedValues) {
// https://github.com/ant-design/ant-design/issues/48930
if (!values.length) {
return null;
}
var content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder;
return typeof tagRender === 'function' ? customizeRenderSelector(undefined, content, false, false, undefined, true) : defaultRenderSelector({
title: content
}, content, false);
};
// >>> Input Node
var inputNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(selectionPrefixCls, "-search"),
style: {
width: inputWidth
},
onFocus: function onFocus() {
setFocused(true);
},
onBlur: function onBlur() {
setFocused(false);
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_Input, {
ref: inputRef,
open: open,
prefixCls: prefixCls,
id: id,
inputElement: null,
disabled: disabled,
autoFocus: autoFocus,
autoComplete: autoComplete,
editable: inputEditable,
activeDescendantId: activeDescendantId,
value: inputValue,
onKeyDown: onInputKeyDown,
onMouseDown: onInputMouseDown,
onChange: onInputChange,
onPaste: onInputPaste,
onCompositionStart: onInputCompositionStart,
onCompositionEnd: onInputCompositionEnd,
onBlur: onInputBlur,
tabIndex: tabIndex,
attrs: (0,pickAttrs["default"])(props, true)
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
ref: measureRef,
className: "".concat(selectionPrefixCls, "-search-mirror"),
"aria-hidden": true
}, inputValue, "\xA0"));
// >>> Selections
var selectionNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es, {
prefixCls: "".concat(selectionPrefixCls, "-overflow"),
data: values,
renderItem: renderItem,
renderRest: renderRest,
suffix: inputNode,
itemKey: itemKey,
maxCount: maxTagCount
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(selectionPrefixCls, "-wrap")
}, selectionNode, !values.length && !inputValue && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(selectionPrefixCls, "-placeholder")
}, placeholder));
};
/* harmony default export */ var MultipleSelector = (SelectSelector);
;// ./node_modules/rc-select/es/Selector/SingleSelector.js
var SingleSelector = function SingleSelector(props) {
var inputElement = props.inputElement,
prefixCls = props.prefixCls,
id = props.id,
inputRef = props.inputRef,
disabled = props.disabled,
autoFocus = props.autoFocus,
autoComplete = props.autoComplete,
activeDescendantId = props.activeDescendantId,
mode = props.mode,
open = props.open,
values = props.values,
placeholder = props.placeholder,
tabIndex = props.tabIndex,
showSearch = props.showSearch,
searchValue = props.searchValue,
activeValue = props.activeValue,
maxLength = props.maxLength,
onInputKeyDown = props.onInputKeyDown,
onInputMouseDown = props.onInputMouseDown,
onInputChange = props.onInputChange,
onInputPaste = props.onInputPaste,
onInputCompositionStart = props.onInputCompositionStart,
onInputCompositionEnd = props.onInputCompositionEnd,
onInputBlur = props.onInputBlur,
title = props.title;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
inputChanged = _React$useState2[0],
setInputChanged = _React$useState2[1];
var combobox = mode === 'combobox';
var inputEditable = combobox || showSearch;
var item = values[0];
var inputValue = searchValue || '';
if (combobox && activeValue && !inputChanged) {
inputValue = activeValue;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (combobox) {
setInputChanged(false);
}
}, [combobox, activeValue]);
// Not show text when closed expect combobox mode
var hasTextInput = mode !== 'combobox' && !open && !showSearch ? false : !!inputValue;
// Get title of selection item
var selectionTitle = title === undefined ? getTitle(item) : title;
var placeholderNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (item) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-selection-placeholder"),
style: hasTextInput ? {
visibility: 'hidden'
} : undefined
}, placeholder);
}, [item, hasTextInput, placeholder, prefixCls]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-selection-wrap")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-selection-search")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_Input, {
ref: inputRef,
prefixCls: prefixCls,
id: id,
open: open,
inputElement: inputElement,
disabled: disabled,
autoFocus: autoFocus,
autoComplete: autoComplete,
editable: inputEditable,
activeDescendantId: activeDescendantId,
value: inputValue,
onKeyDown: onInputKeyDown,
onMouseDown: onInputMouseDown,
onChange: function onChange(e) {
setInputChanged(true);
onInputChange(e);
},
onPaste: onInputPaste,
onCompositionStart: onInputCompositionStart,
onCompositionEnd: onInputCompositionEnd,
onBlur: onInputBlur,
tabIndex: tabIndex,
attrs: (0,pickAttrs["default"])(props, true),
maxLength: combobox ? maxLength : undefined
})), !combobox && item ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-selection-item"),
title: selectionTitle
// 当 Select 已经选中选项时,还需 selection 隐藏但留在原地占位
// https://github.com/ant-design/ant-design/issues/27688
// https://github.com/ant-design/ant-design/issues/41530
,
style: hasTextInput ? {
visibility: 'hidden'
} : undefined
}, item.label) : null, placeholderNode);
};
/* harmony default export */ var Selector_SingleSelector = (SingleSelector);
;// ./node_modules/rc-select/es/Selector/index.js
/**
* Cursor rule:
* 1. Only `showSearch` enabled
* 2. Only `open` is `true`
* 3. When typing, set `open` to `true` which hit rule of 2
*
* Accessibility:
* - https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html
*/
var Selector = function Selector(props, ref) {
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var compositionStatusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var prefixCls = props.prefixCls,
open = props.open,
mode = props.mode,
showSearch = props.showSearch,
tokenWithEnter = props.tokenWithEnter,
disabled = props.disabled,
prefix = props.prefix,
autoClearSearchValue = props.autoClearSearchValue,
onSearch = props.onSearch,
onSearchSubmit = props.onSearchSubmit,
onToggleOpen = props.onToggleOpen,
onInputKeyDown = props.onInputKeyDown,
onInputBlur = props.onInputBlur,
domRef = props.domRef;
// ======================= Ref =======================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
focus: function focus(options) {
inputRef.current.focus(options);
},
blur: function blur() {
inputRef.current.blur();
}
};
});
// ====================== Input ======================
var _useLock = useLock(0),
_useLock2 = (0,slicedToArray["default"])(_useLock, 2),
getInputMouseDown = _useLock2[0],
setInputMouseDown = _useLock2[1];
var onInternalInputKeyDown = function onInternalInputKeyDown(event) {
var which = event.which;
// Compatible with multiple lines in TextArea
var isTextAreaElement = inputRef.current instanceof HTMLTextAreaElement;
if (!isTextAreaElement && open && (which === KeyCode["default"].UP || which === KeyCode["default"].DOWN)) {
event.preventDefault();
}
if (onInputKeyDown) {
onInputKeyDown(event);
}
if (which === KeyCode["default"].ENTER && mode === 'tags' && !compositionStatusRef.current && !open) {
// When menu isn't open, OptionList won't trigger a value change
// So when enter is pressed, the tag's input value should be emitted here to let selector know
onSearchSubmit === null || onSearchSubmit === void 0 || onSearchSubmit(event.target.value);
}
// Move within the text box
if (isTextAreaElement && !open && ~[KeyCode["default"].UP, KeyCode["default"].DOWN, KeyCode["default"].LEFT, KeyCode["default"].RIGHT].indexOf(which)) {
return;
}
if (isValidateOpenKey(which)) {
onToggleOpen(true);
}
};
/**
* We can not use `findDOMNode` sine it will get warning,
* have to use timer to check if is input element.
*/
var onInternalInputMouseDown = function onInternalInputMouseDown() {
setInputMouseDown(true);
};
// When paste come, ignore next onChange
var pastedTextRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var triggerOnSearch = function triggerOnSearch(value) {
if (onSearch(value, true, compositionStatusRef.current) !== false) {
onToggleOpen(true);
}
};
var onInputCompositionStart = function onInputCompositionStart() {
compositionStatusRef.current = true;
};
var onInputCompositionEnd = function onInputCompositionEnd(e) {
compositionStatusRef.current = false;
// Trigger search again to support `tokenSeparators` with typewriting
if (mode !== 'combobox') {
triggerOnSearch(e.target.value);
}
};
var onInputChange = function onInputChange(event) {
var value = event.target.value;
// Pasted text should replace back to origin content
if (tokenWithEnter && pastedTextRef.current && /[\r\n]/.test(pastedTextRef.current)) {
// CRLF will be treated as a single space for input element
var replacedText = pastedTextRef.current.replace(/[\r\n]+$/, '').replace(/\r\n/g, ' ').replace(/[\r\n]/g, ' ');
value = value.replace(replacedText, pastedTextRef.current);
}
pastedTextRef.current = null;
triggerOnSearch(value);
};
var onInputPaste = function onInputPaste(e) {
var clipboardData = e.clipboardData;
var value = clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
pastedTextRef.current = value || '';
};
var onClick = function onClick(_ref) {
var target = _ref.target;
if (target !== inputRef.current) {
// Should focus input if click the selector
var isIE = document.body.style.msTouchAction !== undefined;
if (isIE) {
setTimeout(function () {
inputRef.current.focus();
});
} else {
inputRef.current.focus();
}
}
};
var onMouseDown = function onMouseDown(event) {
var inputMouseDown = getInputMouseDown();
// when mode is combobox and it is disabled, don't prevent default behavior
// https://github.com/ant-design/ant-design/issues/37320
// https://github.com/ant-design/ant-design/issues/48281
if (event.target !== inputRef.current && !inputMouseDown && !(mode === 'combobox' && disabled)) {
event.preventDefault();
}
if (mode !== 'combobox' && (!showSearch || !inputMouseDown) || !open) {
if (open && autoClearSearchValue !== false) {
onSearch('', true, false);
}
onToggleOpen();
}
};
// ================= Inner Selector ==================
var sharedProps = {
inputRef: inputRef,
onInputKeyDown: onInternalInputKeyDown,
onInputMouseDown: onInternalInputMouseDown,
onInputChange: onInputChange,
onInputPaste: onInputPaste,
onInputCompositionStart: onInputCompositionStart,
onInputCompositionEnd: onInputCompositionEnd,
onInputBlur: onInputBlur
};
var selectNode = mode === 'multiple' || mode === 'tags' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MultipleSelector, (0,esm_extends["default"])({}, props, sharedProps)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_SingleSelector, (0,esm_extends["default"])({}, props, sharedProps));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: domRef,
className: "".concat(prefixCls, "-selector"),
onClick: onClick,
onMouseDown: onMouseDown
}, prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-prefix")
}, prefix), selectNode);
};
var ForwardSelector = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Selector);
if (true) {
ForwardSelector.displayName = 'Selector';
}
/* harmony default export */ var es_Selector = (ForwardSelector);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/shadow.js
var shadow = __webpack_require__("./node_modules/rc-util/es/Dom/shadow.js");
;// ./node_modules/@rc-component/trigger/es/Popup/Arrow.js
function Arrow(props) {
var prefixCls = props.prefixCls,
align = props.align,
arrow = props.arrow,
arrowPos = props.arrowPos;
var _ref = arrow || {},
className = _ref.className,
content = _ref.content;
var _arrowPos$x = arrowPos.x,
x = _arrowPos$x === void 0 ? 0 : _arrowPos$x,
_arrowPos$y = arrowPos.y,
y = _arrowPos$y === void 0 ? 0 : _arrowPos$y;
var arrowRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
// Skip if no align
if (!align || !align.points) {
return null;
}
var alignStyle = {
position: 'absolute'
};
// Skip if no need to align
if (align.autoArrow !== false) {
var popupPoints = align.points[0];
var targetPoints = align.points[1];
var popupTB = popupPoints[0];
var popupLR = popupPoints[1];
var targetTB = targetPoints[0];
var targetLR = targetPoints[1];
// Top & Bottom
if (popupTB === targetTB || !['t', 'b'].includes(popupTB)) {
alignStyle.top = y;
} else if (popupTB === 't') {
alignStyle.top = 0;
} else {
alignStyle.bottom = 0;
}
// Left & Right
if (popupLR === targetLR || !['l', 'r'].includes(popupLR)) {
alignStyle.left = x;
} else if (popupLR === 'l') {
alignStyle.left = 0;
} else {
alignStyle.right = 0;
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: arrowRef,
className: classnames_default()("".concat(prefixCls, "-arrow"), className),
style: alignStyle
}, content);
}
;// ./node_modules/@rc-component/trigger/es/Popup/Mask.js
function Mask_Mask(props) {
var prefixCls = props.prefixCls,
open = props.open,
zIndex = props.zIndex,
mask = props.mask,
motion = props.motion;
if (!mask) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({}, motion, {
motionAppear: true,
visible: open,
removeOnLeave: true
}), function (_ref) {
var className = _ref.className;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
zIndex: zIndex
},
className: classnames_default()("".concat(prefixCls, "-mask"), className)
});
});
}
;// ./node_modules/@rc-component/trigger/es/Popup/PopupContent.js
var PopupContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function (_ref) {
var children = _ref.children;
return children;
}, function (_, next) {
return next.cache;
});
if (true) {
PopupContent.displayName = 'PopupContent';
}
/* harmony default export */ var Popup_PopupContent = (PopupContent);
;// ./node_modules/@rc-component/trigger/es/Popup/index.js
var Popup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var popup = props.popup,
className = props.className,
prefixCls = props.prefixCls,
style = props.style,
target = props.target,
_onVisibleChanged = props.onVisibleChanged,
open = props.open,
keepDom = props.keepDom,
fresh = props.fresh,
onClick = props.onClick,
mask = props.mask,
arrow = props.arrow,
arrowPos = props.arrowPos,
align = props.align,
motion = props.motion,
maskMotion = props.maskMotion,
forceRender = props.forceRender,
getPopupContainer = props.getPopupContainer,
autoDestroy = props.autoDestroy,
Portal = props.portal,
zIndex = props.zIndex,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onPointerEnter = props.onPointerEnter,
onPointerDownCapture = props.onPointerDownCapture,
ready = props.ready,
offsetX = props.offsetX,
offsetY = props.offsetY,
offsetR = props.offsetR,
offsetB = props.offsetB,
onAlign = props.onAlign,
onPrepare = props.onPrepare,
stretch = props.stretch,
targetWidth = props.targetWidth,
targetHeight = props.targetHeight;
var childNode = typeof popup === 'function' ? popup() : popup;
// We can not remove holder only when motion finished.
var isNodeVisible = open || keepDom;
// ======================= Container ========================
var getPopupContainerNeedParams = (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer.length) > 0;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(!getPopupContainer || !getPopupContainerNeedParams),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
show = _React$useState2[0],
setShow = _React$useState2[1];
// Delay to show since `getPopupContainer` need target element
(0,useLayoutEffect["default"])(function () {
if (!show && getPopupContainerNeedParams && target) {
setShow(true);
}
}, [show, getPopupContainerNeedParams, target]);
// ========================= Render =========================
if (!show) {
return null;
}
// >>>>> Offset
var AUTO = 'auto';
var offsetStyle = {
left: '-1000vw',
top: '-1000vh',
right: AUTO,
bottom: AUTO
};
// Set align style
if (ready || !open) {
var _experimental;
var points = align.points;
var dynamicInset = align.dynamicInset || ((_experimental = align._experimental) === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset);
var alignRight = dynamicInset && points[0][1] === 'r';
var alignBottom = dynamicInset && points[0][0] === 'b';
if (alignRight) {
offsetStyle.right = offsetR;
offsetStyle.left = AUTO;
} else {
offsetStyle.left = offsetX;
offsetStyle.right = AUTO;
}
if (alignBottom) {
offsetStyle.bottom = offsetB;
offsetStyle.top = AUTO;
} else {
offsetStyle.top = offsetY;
offsetStyle.bottom = AUTO;
}
}
// >>>>> Misc
var miscStyle = {};
if (stretch) {
if (stretch.includes('height') && targetHeight) {
miscStyle.height = targetHeight;
} else if (stretch.includes('minHeight') && targetHeight) {
miscStyle.minHeight = targetHeight;
}
if (stretch.includes('width') && targetWidth) {
miscStyle.width = targetWidth;
} else if (stretch.includes('minWidth') && targetWidth) {
miscStyle.minWidth = targetWidth;
}
}
if (!open) {
miscStyle.pointerEvents = 'none';
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Portal, {
open: forceRender || isNodeVisible,
getContainer: getPopupContainer && function () {
return getPopupContainer(target);
},
autoDestroy: autoDestroy
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Mask_Mask, {
prefixCls: prefixCls,
open: open,
zIndex: zIndex,
mask: mask,
motion: maskMotion
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onAlign,
disabled: !open
}, function (resizeObserverRef) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
motionAppear: true,
motionEnter: true,
motionLeave: true,
removeOnLeave: false,
forceRender: forceRender,
leavedClassName: "".concat(prefixCls, "-hidden")
}, motion, {
onAppearPrepare: onPrepare,
onEnterPrepare: onPrepare,
visible: open,
onVisibleChanged: function onVisibleChanged(nextVisible) {
var _motion$onVisibleChan;
motion === null || motion === void 0 || (_motion$onVisibleChan = motion.onVisibleChanged) === null || _motion$onVisibleChan === void 0 || _motion$onVisibleChan.call(motion, nextVisible);
_onVisibleChanged(nextVisible);
}
}), function (_ref, motionRef) {
var motionClassName = _ref.className,
motionStyle = _ref.style;
var cls = classnames_default()(prefixCls, motionClassName, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: (0,es_ref.composeRef)(resizeObserverRef, ref, motionRef),
className: cls,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
'--arrow-x': "".concat(arrowPos.x || 0, "px"),
'--arrow-y': "".concat(arrowPos.y || 0, "px")
}, offsetStyle), miscStyle), motionStyle), {}, {
boxSizing: 'border-box',
zIndex: zIndex
}, style),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onPointerEnter: onPointerEnter,
onClick: onClick,
onPointerDownCapture: onPointerDownCapture
}, arrow && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Arrow, {
prefixCls: prefixCls,
arrow: arrow,
arrowPos: arrowPos,
align: align
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_PopupContent, {
cache: !open && !fresh
}, childNode));
});
}));
});
if (true) {
Popup.displayName = 'Popup';
}
/* harmony default export */ var es_Popup = (Popup);
;// ./node_modules/@rc-component/trigger/es/TriggerWrapper.js
var TriggerWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var children = props.children,
getTriggerDOMNode = props.getTriggerDOMNode;
var canUseRef = (0,es_ref.supportRef)(children);
// When use `getTriggerDOMNode`, we should do additional work to get the real dom
var setRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (node) {
(0,es_ref.fillRef)(ref, getTriggerDOMNode ? getTriggerDOMNode(node) : node);
}, [getTriggerDOMNode]);
var mergedRef = (0,es_ref.useComposeRef)(setRef, (0,es_ref.getNodeRef)(children));
return canUseRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
ref: mergedRef
}) : children;
});
if (true) {
TriggerWrapper.displayName = 'TriggerWrapper';
}
/* harmony default export */ var es_TriggerWrapper = (TriggerWrapper);
;// ./node_modules/@rc-component/trigger/es/context.js
var TriggerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var es_context = (TriggerContext);
;// ./node_modules/@rc-component/trigger/es/hooks/useAction.js
function useAction_toArray(val) {
return val ? Array.isArray(val) ? val : [val] : [];
}
function useAction(mobile, action, showAction, hideAction) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var mergedShowAction = useAction_toArray(showAction !== null && showAction !== void 0 ? showAction : action);
var mergedHideAction = useAction_toArray(hideAction !== null && hideAction !== void 0 ? hideAction : action);
var showActionSet = new Set(mergedShowAction);
var hideActionSet = new Set(mergedHideAction);
if (mobile) {
if (showActionSet.has('hover')) {
showActionSet.delete('hover');
showActionSet.add('click');
}
if (hideActionSet.has('hover')) {
hideActionSet.delete('hover');
hideActionSet.add('click');
}
}
return [showActionSet, hideActionSet];
}, [mobile, action, showAction, hideAction]);
}
;// ./node_modules/@rc-component/trigger/es/util.js
function isPointsEq() {
var a1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var a2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var isAlignPoint = arguments.length > 2 ? arguments[2] : undefined;
if (isAlignPoint) {
return a1[0] === a2[0];
}
return a1[0] === a2[0] && a1[1] === a2[1];
}
function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
var points = align.points;
var placements = Object.keys(builtinPlacements);
for (var i = 0; i < placements.length; i += 1) {
var _builtinPlacements$pl;
var placement = placements[i];
if (isPointsEq((_builtinPlacements$pl = builtinPlacements[placement]) === null || _builtinPlacements$pl === void 0 ? void 0 : _builtinPlacements$pl.points, points, isAlignPoint)) {
return "".concat(prefixCls, "-placement-").concat(placement);
}
}
return '';
}
/** @deprecated We should not use this if we can refactor all deps */
function es_util_getMotion(prefixCls, motion, animation, transitionName) {
if (motion) {
return motion;
}
if (animation) {
return {
motionName: "".concat(prefixCls, "-").concat(animation)
};
}
if (transitionName) {
return {
motionName: transitionName
};
}
return null;
}
function getWin(ele) {
return ele.ownerDocument.defaultView;
}
/**
* Get all the scrollable parent elements of the element
* @param ele The element to be detected
* @param areaOnly Only return the parent which will cut visible area
*/
function collectScroller(ele) {
var scrollerList = [];
var current = ele === null || ele === void 0 ? void 0 : ele.parentElement;
var scrollStyle = ['hidden', 'scroll', 'clip', 'auto'];
while (current) {
var _getWin$getComputedSt = getWin(current).getComputedStyle(current),
overflowX = _getWin$getComputedSt.overflowX,
overflowY = _getWin$getComputedSt.overflowY,
overflow = _getWin$getComputedSt.overflow;
if ([overflowX, overflowY, overflow].some(function (o) {
return scrollStyle.includes(o);
})) {
scrollerList.push(current);
}
current = current.parentElement;
}
return scrollerList;
}
function toNum(num) {
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
return Number.isNaN(num) ? defaultValue : num;
}
function getPxValue(val) {
return toNum(parseFloat(val), 0);
}
/**
*
*
* **************************************
* * Border *
* * ************************** *
* * * * * *
* * B * * S * B *
* * o * * c * o *
* * r * Content * r * r *
* * d * * o * d *
* * e * * l * e *
* * r ******************** l * r *
* * * Scroll * *
* * ************************** *
* * Border *
* **************************************
*
*/
/**
* Get visible area of element
*/
function getVisibleArea(initArea, scrollerList) {
var visibleArea = (0,objectSpread2["default"])({}, initArea);
(scrollerList || []).forEach(function (ele) {
if (ele instanceof HTMLBodyElement || ele instanceof HTMLHtmlElement) {
return;
}
// Skip if static position which will not affect visible area
var _getWin$getComputedSt2 = getWin(ele).getComputedStyle(ele),
overflow = _getWin$getComputedSt2.overflow,
overflowClipMargin = _getWin$getComputedSt2.overflowClipMargin,
borderTopWidth = _getWin$getComputedSt2.borderTopWidth,
borderBottomWidth = _getWin$getComputedSt2.borderBottomWidth,
borderLeftWidth = _getWin$getComputedSt2.borderLeftWidth,
borderRightWidth = _getWin$getComputedSt2.borderRightWidth;
var eleRect = ele.getBoundingClientRect();
var eleOutHeight = ele.offsetHeight,
eleInnerHeight = ele.clientHeight,
eleOutWidth = ele.offsetWidth,
eleInnerWidth = ele.clientWidth;
var borderTopNum = getPxValue(borderTopWidth);
var borderBottomNum = getPxValue(borderBottomWidth);
var borderLeftNum = getPxValue(borderLeftWidth);
var borderRightNum = getPxValue(borderRightWidth);
var scaleX = toNum(Math.round(eleRect.width / eleOutWidth * 1000) / 1000);
var scaleY = toNum(Math.round(eleRect.height / eleOutHeight * 1000) / 1000);
// Original visible area
var eleScrollWidth = (eleOutWidth - eleInnerWidth - borderLeftNum - borderRightNum) * scaleX;
var eleScrollHeight = (eleOutHeight - eleInnerHeight - borderTopNum - borderBottomNum) * scaleY;
// Cut border size
var scaledBorderTopWidth = borderTopNum * scaleY;
var scaledBorderBottomWidth = borderBottomNum * scaleY;
var scaledBorderLeftWidth = borderLeftNum * scaleX;
var scaledBorderRightWidth = borderRightNum * scaleX;
// Clip margin
var clipMarginWidth = 0;
var clipMarginHeight = 0;
if (overflow === 'clip') {
var clipNum = getPxValue(overflowClipMargin);
clipMarginWidth = clipNum * scaleX;
clipMarginHeight = clipNum * scaleY;
}
// Region
var eleLeft = eleRect.x + scaledBorderLeftWidth - clipMarginWidth;
var eleTop = eleRect.y + scaledBorderTopWidth - clipMarginHeight;
var eleRight = eleLeft + eleRect.width + 2 * clipMarginWidth - scaledBorderLeftWidth - scaledBorderRightWidth - eleScrollWidth;
var eleBottom = eleTop + eleRect.height + 2 * clipMarginHeight - scaledBorderTopWidth - scaledBorderBottomWidth - eleScrollHeight;
visibleArea.left = Math.max(visibleArea.left, eleLeft);
visibleArea.top = Math.max(visibleArea.top, eleTop);
visibleArea.right = Math.min(visibleArea.right, eleRight);
visibleArea.bottom = Math.min(visibleArea.bottom, eleBottom);
});
return visibleArea;
}
;// ./node_modules/@rc-component/trigger/es/hooks/useAlign.js
function getUnitOffset(size) {
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var offsetStr = "".concat(offset);
var cells = offsetStr.match(/^(.*)\%$/);
if (cells) {
return size * (parseFloat(cells[1]) / 100);
}
return parseFloat(offsetStr);
}
function getNumberOffset(rect, offset) {
var _ref = offset || [],
_ref2 = (0,slicedToArray["default"])(_ref, 2),
offsetX = _ref2[0],
offsetY = _ref2[1];
return [getUnitOffset(rect.width, offsetX), getUnitOffset(rect.height, offsetY)];
}
function splitPoints() {
var points = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
return [points[0], points[1]];
}
function getAlignPoint(rect, points) {
var topBottom = points[0];
var leftRight = points[1];
var x;
var y;
// Top & Bottom
if (topBottom === 't') {
y = rect.y;
} else if (topBottom === 'b') {
y = rect.y + rect.height;
} else {
y = rect.y + rect.height / 2;
}
// Left & Right
if (leftRight === 'l') {
x = rect.x;
} else if (leftRight === 'r') {
x = rect.x + rect.width;
} else {
x = rect.x + rect.width / 2;
}
return {
x: x,
y: y
};
}
function reversePoints(points, index) {
var reverseMap = {
t: 'b',
b: 't',
l: 'r',
r: 'l'
};
return points.map(function (point, i) {
if (i === index) {
return reverseMap[point] || 'c';
}
return point;
}).join('');
}
function useAlign(open, popupEle, target, placement, builtinPlacements, popupAlign, onPopupAlign) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({
ready: false,
offsetX: 0,
offsetY: 0,
offsetR: 0,
offsetB: 0,
arrowX: 0,
arrowY: 0,
scaleX: 1,
scaleY: 1,
align: builtinPlacements[placement] || {}
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
offsetInfo = _React$useState2[0],
setOffsetInfo = _React$useState2[1];
var alignCountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
var scrollerList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!popupEle) {
return [];
}
return collectScroller(popupEle);
}, [popupEle]);
// ========================= Flip ==========================
// We will memo flip info.
// If size change to make flip, it will memo the flip info and use it in next align.
var prevFlipRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
var resetFlipCache = function resetFlipCache() {
prevFlipRef.current = {};
};
if (!open) {
resetFlipCache();
}
// ========================= Align =========================
var onAlign = (0,useEvent["default"])(function () {
if (popupEle && target && open) {
var _popupElement$parentE, _popupRect$x, _popupRect$y, _popupElement$parentE2;
var popupElement = popupEle;
var doc = popupElement.ownerDocument;
var win = getWin(popupElement);
var _win$getComputedStyle = win.getComputedStyle(popupElement),
width = _win$getComputedStyle.width,
height = _win$getComputedStyle.height,
popupPosition = _win$getComputedStyle.position;
var originLeft = popupElement.style.left;
var originTop = popupElement.style.top;
var originRight = popupElement.style.right;
var originBottom = popupElement.style.bottom;
var originOverflow = popupElement.style.overflow;
// Placement
var placementInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, builtinPlacements[placement]), popupAlign);
// placeholder element
var placeholderElement = doc.createElement('div');
(_popupElement$parentE = popupElement.parentElement) === null || _popupElement$parentE === void 0 || _popupElement$parentE.appendChild(placeholderElement);
placeholderElement.style.left = "".concat(popupElement.offsetLeft, "px");
placeholderElement.style.top = "".concat(popupElement.offsetTop, "px");
placeholderElement.style.position = popupPosition;
placeholderElement.style.height = "".concat(popupElement.offsetHeight, "px");
placeholderElement.style.width = "".concat(popupElement.offsetWidth, "px");
// Reset first
popupElement.style.left = '0';
popupElement.style.top = '0';
popupElement.style.right = 'auto';
popupElement.style.bottom = 'auto';
popupElement.style.overflow = 'hidden';
// Calculate align style, we should consider `transform` case
var targetRect;
if (Array.isArray(target)) {
targetRect = {
x: target[0],
y: target[1],
width: 0,
height: 0
};
} else {
var _rect$x, _rect$y;
var rect = target.getBoundingClientRect();
rect.x = (_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left;
rect.y = (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top;
targetRect = {
x: rect.x,
y: rect.y,
width: rect.width,
height: rect.height
};
}
var popupRect = popupElement.getBoundingClientRect();
popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left;
popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;
var _doc$documentElement = doc.documentElement,
clientWidth = _doc$documentElement.clientWidth,
clientHeight = _doc$documentElement.clientHeight,
scrollWidth = _doc$documentElement.scrollWidth,
scrollHeight = _doc$documentElement.scrollHeight,
scrollTop = _doc$documentElement.scrollTop,
scrollLeft = _doc$documentElement.scrollLeft;
var popupHeight = popupRect.height;
var popupWidth = popupRect.width;
var targetHeight = targetRect.height;
var targetWidth = targetRect.width;
// Get bounding of visible area
var visibleRegion = {
left: 0,
top: 0,
right: clientWidth,
bottom: clientHeight
};
var scrollRegion = {
left: -scrollLeft,
top: -scrollTop,
right: scrollWidth - scrollLeft,
bottom: scrollHeight - scrollTop
};
var htmlRegion = placementInfo.htmlRegion;
var VISIBLE = 'visible';
var VISIBLE_FIRST = 'visibleFirst';
if (htmlRegion !== 'scroll' && htmlRegion !== VISIBLE_FIRST) {
htmlRegion = VISIBLE;
}
var isVisibleFirst = htmlRegion === VISIBLE_FIRST;
var scrollRegionArea = getVisibleArea(scrollRegion, scrollerList);
var visibleRegionArea = getVisibleArea(visibleRegion, scrollerList);
var visibleArea = htmlRegion === VISIBLE ? visibleRegionArea : scrollRegionArea;
// When set to `visibleFirst`,
// the check `adjust` logic will use `visibleRegion` for check first.
var adjustCheckVisibleArea = isVisibleFirst ? visibleRegionArea : visibleArea;
// Record right & bottom align data
popupElement.style.left = 'auto';
popupElement.style.top = 'auto';
popupElement.style.right = '0';
popupElement.style.bottom = '0';
var popupMirrorRect = popupElement.getBoundingClientRect();
// Reset back
popupElement.style.left = originLeft;
popupElement.style.top = originTop;
popupElement.style.right = originRight;
popupElement.style.bottom = originBottom;
popupElement.style.overflow = originOverflow;
(_popupElement$parentE2 = popupElement.parentElement) === null || _popupElement$parentE2 === void 0 || _popupElement$parentE2.removeChild(placeholderElement);
// Calculate scale
var _scaleX = toNum(Math.round(popupWidth / parseFloat(width) * 1000) / 1000);
var _scaleY = toNum(Math.round(popupHeight / parseFloat(height) * 1000) / 1000);
// No need to align since it's not visible in view
if (_scaleX === 0 || _scaleY === 0 || (0,findDOMNode.isDOM)(target) && !isVisible(target)) {
return;
}
// Offset
var offset = placementInfo.offset,
targetOffset = placementInfo.targetOffset;
var _getNumberOffset = getNumberOffset(popupRect, offset),
_getNumberOffset2 = (0,slicedToArray["default"])(_getNumberOffset, 2),
popupOffsetX = _getNumberOffset2[0],
popupOffsetY = _getNumberOffset2[1];
var _getNumberOffset3 = getNumberOffset(targetRect, targetOffset),
_getNumberOffset4 = (0,slicedToArray["default"])(_getNumberOffset3, 2),
targetOffsetX = _getNumberOffset4[0],
targetOffsetY = _getNumberOffset4[1];
targetRect.x -= targetOffsetX;
targetRect.y -= targetOffsetY;
// Points
var _ref3 = placementInfo.points || [],
_ref4 = (0,slicedToArray["default"])(_ref3, 2),
popupPoint = _ref4[0],
targetPoint = _ref4[1];
var targetPoints = splitPoints(targetPoint);
var popupPoints = splitPoints(popupPoint);
var targetAlignPoint = getAlignPoint(targetRect, targetPoints);
var popupAlignPoint = getAlignPoint(popupRect, popupPoints);
// Real align info may not same as origin one
var nextAlignInfo = (0,objectSpread2["default"])({}, placementInfo);
// Next Offset
var nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX;
var nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY;
// ============== Intersection ===============
// Get area by position. Used for check if flip area is better
function getIntersectionVisibleArea(offsetX, offsetY) {
var area = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : visibleArea;
var l = popupRect.x + offsetX;
var t = popupRect.y + offsetY;
var r = l + popupWidth;
var b = t + popupHeight;
var visibleL = Math.max(l, area.left);
var visibleT = Math.max(t, area.top);
var visibleR = Math.min(r, area.right);
var visibleB = Math.min(b, area.bottom);
return Math.max(0, (visibleR - visibleL) * (visibleB - visibleT));
}
var originIntersectionVisibleArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY);
// As `visibleFirst`, we prepare this for check
var originIntersectionRecommendArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY, visibleRegionArea);
// ========================== Overflow ===========================
var targetAlignPointTL = getAlignPoint(targetRect, ['t', 'l']);
var popupAlignPointTL = getAlignPoint(popupRect, ['t', 'l']);
var targetAlignPointBR = getAlignPoint(targetRect, ['b', 'r']);
var popupAlignPointBR = getAlignPoint(popupRect, ['b', 'r']);
var overflow = placementInfo.overflow || {};
var adjustX = overflow.adjustX,
adjustY = overflow.adjustY,
shiftX = overflow.shiftX,
shiftY = overflow.shiftY;
var supportAdjust = function supportAdjust(val) {
if (typeof val === 'boolean') {
return val;
}
return val >= 0;
};
// Prepare position
var nextPopupY;
var nextPopupBottom;
var nextPopupX;
var nextPopupRight;
function syncNextPopupPosition() {
nextPopupY = popupRect.y + nextOffsetY;
nextPopupBottom = nextPopupY + popupHeight;
nextPopupX = popupRect.x + nextOffsetX;
nextPopupRight = nextPopupX + popupWidth;
}
syncNextPopupPosition();
// >>>>>>>>>> Top & Bottom
var needAdjustY = supportAdjust(adjustY);
var sameTB = popupPoints[0] === targetPoints[0];
// Bottom to Top
if (needAdjustY && popupPoints[0] === 't' && (nextPopupBottom > adjustCheckVisibleArea.bottom || prevFlipRef.current.bt)) {
var tmpNextOffsetY = nextOffsetY;
if (sameTB) {
tmpNextOffsetY -= popupHeight - targetHeight;
} else {
tmpNextOffsetY = targetAlignPointTL.y - popupAlignPointBR.y - popupOffsetY;
}
var newVisibleArea = getIntersectionVisibleArea(nextOffsetX, tmpNextOffsetY);
var newVisibleRecommendArea = getIntersectionVisibleArea(nextOffsetX, tmpNextOffsetY, visibleRegionArea);
if (
// Of course use larger one
newVisibleArea > originIntersectionVisibleArea || newVisibleArea === originIntersectionVisibleArea && (!isVisibleFirst ||
// Choose recommend one
newVisibleRecommendArea >= originIntersectionRecommendArea)) {
prevFlipRef.current.bt = true;
nextOffsetY = tmpNextOffsetY;
popupOffsetY = -popupOffsetY;
nextAlignInfo.points = [reversePoints(popupPoints, 0), reversePoints(targetPoints, 0)];
} else {
prevFlipRef.current.bt = false;
}
}
// Top to Bottom
if (needAdjustY && popupPoints[0] === 'b' && (nextPopupY < adjustCheckVisibleArea.top || prevFlipRef.current.tb)) {
var _tmpNextOffsetY = nextOffsetY;
if (sameTB) {
_tmpNextOffsetY += popupHeight - targetHeight;
} else {
_tmpNextOffsetY = targetAlignPointBR.y - popupAlignPointTL.y - popupOffsetY;
}
var _newVisibleArea = getIntersectionVisibleArea(nextOffsetX, _tmpNextOffsetY);
var _newVisibleRecommendArea = getIntersectionVisibleArea(nextOffsetX, _tmpNextOffsetY, visibleRegionArea);
if (
// Of course use larger one
_newVisibleArea > originIntersectionVisibleArea || _newVisibleArea === originIntersectionVisibleArea && (!isVisibleFirst ||
// Choose recommend one
_newVisibleRecommendArea >= originIntersectionRecommendArea)) {
prevFlipRef.current.tb = true;
nextOffsetY = _tmpNextOffsetY;
popupOffsetY = -popupOffsetY;
nextAlignInfo.points = [reversePoints(popupPoints, 0), reversePoints(targetPoints, 0)];
} else {
prevFlipRef.current.tb = false;
}
}
// >>>>>>>>>> Left & Right
var needAdjustX = supportAdjust(adjustX);
// >>>>> Flip
var sameLR = popupPoints[1] === targetPoints[1];
// Right to Left
if (needAdjustX && popupPoints[1] === 'l' && (nextPopupRight > adjustCheckVisibleArea.right || prevFlipRef.current.rl)) {
var tmpNextOffsetX = nextOffsetX;
if (sameLR) {
tmpNextOffsetX -= popupWidth - targetWidth;
} else {
tmpNextOffsetX = targetAlignPointTL.x - popupAlignPointBR.x - popupOffsetX;
}
var _newVisibleArea2 = getIntersectionVisibleArea(tmpNextOffsetX, nextOffsetY);
var _newVisibleRecommendArea2 = getIntersectionVisibleArea(tmpNextOffsetX, nextOffsetY, visibleRegionArea);
if (
// Of course use larger one
_newVisibleArea2 > originIntersectionVisibleArea || _newVisibleArea2 === originIntersectionVisibleArea && (!isVisibleFirst ||
// Choose recommend one
_newVisibleRecommendArea2 >= originIntersectionRecommendArea)) {
prevFlipRef.current.rl = true;
nextOffsetX = tmpNextOffsetX;
popupOffsetX = -popupOffsetX;
nextAlignInfo.points = [reversePoints(popupPoints, 1), reversePoints(targetPoints, 1)];
} else {
prevFlipRef.current.rl = false;
}
}
// Left to Right
if (needAdjustX && popupPoints[1] === 'r' && (nextPopupX < adjustCheckVisibleArea.left || prevFlipRef.current.lr)) {
var _tmpNextOffsetX = nextOffsetX;
if (sameLR) {
_tmpNextOffsetX += popupWidth - targetWidth;
} else {
_tmpNextOffsetX = targetAlignPointBR.x - popupAlignPointTL.x - popupOffsetX;
}
var _newVisibleArea3 = getIntersectionVisibleArea(_tmpNextOffsetX, nextOffsetY);
var _newVisibleRecommendArea3 = getIntersectionVisibleArea(_tmpNextOffsetX, nextOffsetY, visibleRegionArea);
if (
// Of course use larger one
_newVisibleArea3 > originIntersectionVisibleArea || _newVisibleArea3 === originIntersectionVisibleArea && (!isVisibleFirst ||
// Choose recommend one
_newVisibleRecommendArea3 >= originIntersectionRecommendArea)) {
prevFlipRef.current.lr = true;
nextOffsetX = _tmpNextOffsetX;
popupOffsetX = -popupOffsetX;
nextAlignInfo.points = [reversePoints(popupPoints, 1), reversePoints(targetPoints, 1)];
} else {
prevFlipRef.current.lr = false;
}
}
// ============================ Shift ============================
syncNextPopupPosition();
var numShiftX = shiftX === true ? 0 : shiftX;
if (typeof numShiftX === 'number') {
// Left
if (nextPopupX < visibleRegionArea.left) {
nextOffsetX -= nextPopupX - visibleRegionArea.left - popupOffsetX;
if (targetRect.x + targetWidth < visibleRegionArea.left + numShiftX) {
nextOffsetX += targetRect.x - visibleRegionArea.left + targetWidth - numShiftX;
}
}
// Right
if (nextPopupRight > visibleRegionArea.right) {
nextOffsetX -= nextPopupRight - visibleRegionArea.right - popupOffsetX;
if (targetRect.x > visibleRegionArea.right - numShiftX) {
nextOffsetX += targetRect.x - visibleRegionArea.right + numShiftX;
}
}
}
var numShiftY = shiftY === true ? 0 : shiftY;
if (typeof numShiftY === 'number') {
// Top
if (nextPopupY < visibleRegionArea.top) {
nextOffsetY -= nextPopupY - visibleRegionArea.top - popupOffsetY;
// When target if far away from visible area
// Stop shift
if (targetRect.y + targetHeight < visibleRegionArea.top + numShiftY) {
nextOffsetY += targetRect.y - visibleRegionArea.top + targetHeight - numShiftY;
}
}
// Bottom
if (nextPopupBottom > visibleRegionArea.bottom) {
nextOffsetY -= nextPopupBottom - visibleRegionArea.bottom - popupOffsetY;
if (targetRect.y > visibleRegionArea.bottom - numShiftY) {
nextOffsetY += targetRect.y - visibleRegionArea.bottom + numShiftY;
}
}
}
// ============================ Arrow ============================
// Arrow center align
var popupLeft = popupRect.x + nextOffsetX;
var popupRight = popupLeft + popupWidth;
var popupTop = popupRect.y + nextOffsetY;
var popupBottom = popupTop + popupHeight;
var targetLeft = targetRect.x;
var targetRight = targetLeft + targetWidth;
var targetTop = targetRect.y;
var targetBottom = targetTop + targetHeight;
var maxLeft = Math.max(popupLeft, targetLeft);
var minRight = Math.min(popupRight, targetRight);
var xCenter = (maxLeft + minRight) / 2;
var nextArrowX = xCenter - popupLeft;
var maxTop = Math.max(popupTop, targetTop);
var minBottom = Math.min(popupBottom, targetBottom);
var yCenter = (maxTop + minBottom) / 2;
var nextArrowY = yCenter - popupTop;
onPopupAlign === null || onPopupAlign === void 0 || onPopupAlign(popupEle, nextAlignInfo);
// Additional calculate right & bottom position
var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
var offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
if (_scaleX === 1) {
nextOffsetX = Math.round(nextOffsetX);
offsetX4Right = Math.round(offsetX4Right);
}
if (_scaleY === 1) {
nextOffsetY = Math.round(nextOffsetY);
offsetY4Bottom = Math.round(offsetY4Bottom);
}
var nextOffsetInfo = {
ready: true,
offsetX: nextOffsetX / _scaleX,
offsetY: nextOffsetY / _scaleY,
offsetR: offsetX4Right / _scaleX,
offsetB: offsetY4Bottom / _scaleY,
arrowX: nextArrowX / _scaleX,
arrowY: nextArrowY / _scaleY,
scaleX: _scaleX,
scaleY: _scaleY,
align: nextAlignInfo
};
setOffsetInfo(nextOffsetInfo);
}
});
var triggerAlign = function triggerAlign() {
alignCountRef.current += 1;
var id = alignCountRef.current;
// Merge all align requirement into one frame
Promise.resolve().then(function () {
if (alignCountRef.current === id) {
onAlign();
}
});
};
// Reset ready status when placement & open changed
var resetReady = function resetReady() {
setOffsetInfo(function (ori) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, ori), {}, {
ready: false
});
});
};
(0,useLayoutEffect["default"])(resetReady, [placement]);
(0,useLayoutEffect["default"])(function () {
if (!open) {
resetReady();
}
}, [open]);
return [offsetInfo.ready, offsetInfo.offsetX, offsetInfo.offsetY, offsetInfo.offsetR, offsetInfo.offsetB, offsetInfo.arrowX, offsetInfo.arrowY, offsetInfo.scaleX, offsetInfo.scaleY, offsetInfo.align, triggerAlign];
}
;// ./node_modules/@rc-component/trigger/es/hooks/useWatch.js
function useWatch_useWatch(open, target, popup, onAlign, onScroll) {
(0,useLayoutEffect["default"])(function () {
if (open && target && popup) {
var targetElement = target;
var popupElement = popup;
var targetScrollList = collectScroller(targetElement);
var popupScrollList = collectScroller(popupElement);
var win = getWin(popupElement);
var mergedList = new Set([win].concat((0,toConsumableArray["default"])(targetScrollList), (0,toConsumableArray["default"])(popupScrollList)));
function notifyScroll() {
onAlign();
onScroll();
}
mergedList.forEach(function (scroller) {
scroller.addEventListener('scroll', notifyScroll, {
passive: true
});
});
win.addEventListener('resize', notifyScroll, {
passive: true
});
// First time always do align
onAlign();
return function () {
mergedList.forEach(function (scroller) {
scroller.removeEventListener('scroll', notifyScroll);
win.removeEventListener('resize', notifyScroll);
});
};
}
}, [open, target, popup]);
}
;// ./node_modules/@rc-component/trigger/es/hooks/useWinClick.js
function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen) {
var openRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(open);
openRef.current = open;
var popupPointerDownRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
// Click to hide is special action since click popup element should not hide
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (clickToHide && popupEle && (!mask || maskClosable)) {
var onPointerDown = function onPointerDown() {
popupPointerDownRef.current = false;
};
var onTriggerClose = function onTriggerClose(e) {
var _e$composedPath;
if (openRef.current && !inPopupOrChild(((_e$composedPath = e.composedPath) === null || _e$composedPath === void 0 || (_e$composedPath = _e$composedPath.call(e)) === null || _e$composedPath === void 0 ? void 0 : _e$composedPath[0]) || e.target) && !popupPointerDownRef.current) {
triggerOpen(false);
}
};
var win = getWin(popupEle);
win.addEventListener('pointerdown', onPointerDown, true);
win.addEventListener('mousedown', onTriggerClose, true);
win.addEventListener('contextmenu', onTriggerClose, true);
// shadow root
var targetShadowRoot = (0,shadow.getShadowRoot)(targetEle);
if (targetShadowRoot) {
targetShadowRoot.addEventListener('mousedown', onTriggerClose, true);
targetShadowRoot.addEventListener('contextmenu', onTriggerClose, true);
}
// Warning if target and popup not in same root
if (true) {
var _targetEle$getRootNod, _popupEle$getRootNode;
var targetRoot = targetEle === null || targetEle === void 0 || (_targetEle$getRootNod = targetEle.getRootNode) === null || _targetEle$getRootNod === void 0 ? void 0 : _targetEle$getRootNod.call(targetEle);
var popupRoot = (_popupEle$getRootNode = popupEle.getRootNode) === null || _popupEle$getRootNode === void 0 ? void 0 : _popupEle$getRootNode.call(popupEle);
(0,warning.warning)(targetRoot === popupRoot, "trigger element and popup element should in same shadow root.");
}
return function () {
win.removeEventListener('pointerdown', onPointerDown, true);
win.removeEventListener('mousedown', onTriggerClose, true);
win.removeEventListener('contextmenu', onTriggerClose, true);
if (targetShadowRoot) {
targetShadowRoot.removeEventListener('mousedown', onTriggerClose, true);
targetShadowRoot.removeEventListener('contextmenu', onTriggerClose, true);
}
};
}
}, [clickToHide, targetEle, popupEle, mask, maskClosable]);
function onPopupPointerDown() {
popupPointerDownRef.current = true;
}
return onPopupPointerDown;
}
;// ./node_modules/@rc-component/trigger/es/index.js
var es_excluded = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
// Removed Props List
// Seems this can be auto
// getDocument?: (element?: HTMLElement) => Document;
// New version will not wrap popup with `rc-trigger-popup-content` when multiple children
function generateTrigger() {
var PortalComponent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : portal_es;
var Trigger = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-trigger-popup' : _props$prefixCls,
children = props.children,
_props$action = props.action,
action = _props$action === void 0 ? 'hover' : _props$action,
showAction = props.showAction,
hideAction = props.hideAction,
popupVisible = props.popupVisible,
defaultPopupVisible = props.defaultPopupVisible,
onPopupVisibleChange = props.onPopupVisibleChange,
afterPopupVisibleChange = props.afterPopupVisibleChange,
mouseEnterDelay = props.mouseEnterDelay,
_props$mouseLeaveDela = props.mouseLeaveDelay,
mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
focusDelay = props.focusDelay,
blurDelay = props.blurDelay,
mask = props.mask,
_props$maskClosable = props.maskClosable,
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
getPopupContainer = props.getPopupContainer,
forceRender = props.forceRender,
autoDestroy = props.autoDestroy,
destroyPopupOnHide = props.destroyPopupOnHide,
popup = props.popup,
popupClassName = props.popupClassName,
popupStyle = props.popupStyle,
popupPlacement = props.popupPlacement,
_props$builtinPlaceme = props.builtinPlacements,
builtinPlacements = _props$builtinPlaceme === void 0 ? {} : _props$builtinPlaceme,
popupAlign = props.popupAlign,
zIndex = props.zIndex,
stretch = props.stretch,
getPopupClassNameFromAlign = props.getPopupClassNameFromAlign,
fresh = props.fresh,
alignPoint = props.alignPoint,
onPopupClick = props.onPopupClick,
onPopupAlign = props.onPopupAlign,
arrow = props.arrow,
popupMotion = props.popupMotion,
maskMotion = props.maskMotion,
popupTransitionName = props.popupTransitionName,
popupAnimation = props.popupAnimation,
maskTransitionName = props.maskTransitionName,
maskAnimation = props.maskAnimation,
className = props.className,
getTriggerDOMNode = props.getTriggerDOMNode,
restProps = (0,objectWithoutProperties["default"])(props, es_excluded);
var mergedAutoDestroy = autoDestroy || destroyPopupOnHide || false;
// =========================== Mobile ===========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
mobile = _React$useState2[0],
setMobile = _React$useState2[1];
(0,useLayoutEffect["default"])(function () {
setMobile(isMobile());
}, []);
// ========================== Context ===========================
var subPopupElements = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_context);
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
registerSubPopup: function registerSubPopup(id, subPopupEle) {
subPopupElements.current[id] = subPopupEle;
parentContext === null || parentContext === void 0 || parentContext.registerSubPopup(id, subPopupEle);
}
};
}, [parentContext]);
// =========================== Popup ============================
var id = hooks_useId();
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
popupEle = _React$useState4[0],
setPopupEle = _React$useState4[1];
// Used for forwardRef popup. Not use internal
var externalPopupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var setPopupRef = (0,useEvent["default"])(function (node) {
externalPopupRef.current = node;
if ((0,findDOMNode.isDOM)(node) && popupEle !== node) {
setPopupEle(node);
}
parentContext === null || parentContext === void 0 || parentContext.registerSubPopup(id, node);
});
// =========================== Target ===========================
// Use state to control here since `useRef` update not trigger render
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
targetEle = _React$useState6[0],
setTargetEle = _React$useState6[1];
// Used for forwardRef target. Not use internal
var externalForwardRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var setTargetRef = (0,useEvent["default"])(function (node) {
if ((0,findDOMNode.isDOM)(node) && targetEle !== node) {
setTargetEle(node);
externalForwardRef.current = node;
}
});
// ========================== Children ==========================
var child = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children);
var originChildProps = (child === null || child === void 0 ? void 0 : child.props) || {};
var cloneProps = {};
var inPopupOrChild = (0,useEvent["default"])(function (ele) {
var _getShadowRoot, _getShadowRoot2;
var childDOM = targetEle;
return (childDOM === null || childDOM === void 0 ? void 0 : childDOM.contains(ele)) || ((_getShadowRoot = (0,shadow.getShadowRoot)(childDOM)) === null || _getShadowRoot === void 0 ? void 0 : _getShadowRoot.host) === ele || ele === childDOM || (popupEle === null || popupEle === void 0 ? void 0 : popupEle.contains(ele)) || ((_getShadowRoot2 = (0,shadow.getShadowRoot)(popupEle)) === null || _getShadowRoot2 === void 0 ? void 0 : _getShadowRoot2.host) === ele || ele === popupEle || Object.values(subPopupElements.current).some(function (subPopupEle) {
return (subPopupEle === null || subPopupEle === void 0 ? void 0 : subPopupEle.contains(ele)) || ele === subPopupEle;
});
});
// =========================== Motion ===========================
var mergePopupMotion = es_util_getMotion(prefixCls, popupMotion, popupAnimation, popupTransitionName);
var mergeMaskMotion = es_util_getMotion(prefixCls, maskMotion, maskAnimation, maskTransitionName);
// ============================ Open ============================
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(defaultPopupVisible || false),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
internalOpen = _React$useState8[0],
setInternalOpen = _React$useState8[1];
// Render still use props as first priority
var mergedOpen = popupVisible !== null && popupVisible !== void 0 ? popupVisible : internalOpen;
// We use effect sync here in case `popupVisible` back to `undefined`
var setMergedOpen = (0,useEvent["default"])(function (nextOpen) {
if (popupVisible === undefined) {
setInternalOpen(nextOpen);
}
});
(0,useLayoutEffect["default"])(function () {
setInternalOpen(popupVisible || false);
}, [popupVisible]);
var openRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mergedOpen);
openRef.current = mergedOpen;
var lastTriggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
lastTriggerRef.current = [];
var internalTriggerOpen = (0,useEvent["default"])(function (nextOpen) {
var _lastTriggerRef$curre;
setMergedOpen(nextOpen);
// Enter or Pointer will both trigger open state change
// We only need take one to avoid duplicated change event trigger
// Use `lastTriggerRef` to record last open type
if (((_lastTriggerRef$curre = lastTriggerRef.current[lastTriggerRef.current.length - 1]) !== null && _lastTriggerRef$curre !== void 0 ? _lastTriggerRef$curre : mergedOpen) !== nextOpen) {
lastTriggerRef.current.push(nextOpen);
onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextOpen);
}
});
// Trigger for delay
var delayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var clearDelay = function clearDelay() {
clearTimeout(delayRef.current);
};
var triggerOpen = function triggerOpen(nextOpen) {
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
clearDelay();
if (delay === 0) {
internalTriggerOpen(nextOpen);
} else {
delayRef.current = setTimeout(function () {
internalTriggerOpen(nextOpen);
}, delay * 1000);
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return clearDelay;
}, []);
// ========================== Motion ============================
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
inMotion = _React$useState10[0],
setInMotion = _React$useState10[1];
(0,useLayoutEffect["default"])(function (firstMount) {
if (!firstMount || mergedOpen) {
setInMotion(true);
}
}, [mergedOpen]);
var _React$useState11 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState12 = (0,slicedToArray["default"])(_React$useState11, 2),
motionPrepareResolve = _React$useState12[0],
setMotionPrepareResolve = _React$useState12[1];
// =========================== Align ============================
var _React$useState13 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState14 = (0,slicedToArray["default"])(_React$useState13, 2),
mousePos = _React$useState14[0],
setMousePos = _React$useState14[1];
var setMousePosByEvent = function setMousePosByEvent(event) {
setMousePos([event.clientX, event.clientY]);
};
var _useAlign = useAlign(mergedOpen, popupEle, alignPoint && mousePos !== null ? mousePos : targetEle, popupPlacement, builtinPlacements, popupAlign, onPopupAlign),
_useAlign2 = (0,slicedToArray["default"])(_useAlign, 11),
ready = _useAlign2[0],
offsetX = _useAlign2[1],
offsetY = _useAlign2[2],
offsetR = _useAlign2[3],
offsetB = _useAlign2[4],
arrowX = _useAlign2[5],
arrowY = _useAlign2[6],
scaleX = _useAlign2[7],
scaleY = _useAlign2[8],
alignInfo = _useAlign2[9],
onAlign = _useAlign2[10];
var _useAction = useAction(mobile, action, showAction, hideAction),
_useAction2 = (0,slicedToArray["default"])(_useAction, 2),
showActions = _useAction2[0],
hideActions = _useAction2[1];
var clickToShow = showActions.has('click');
var clickToHide = hideActions.has('click') || hideActions.has('contextMenu');
var triggerAlign = (0,useEvent["default"])(function () {
if (!inMotion) {
onAlign();
}
});
var onScroll = function onScroll() {
if (openRef.current && alignPoint && clickToHide) {
triggerOpen(false);
}
};
useWatch_useWatch(mergedOpen, targetEle, popupEle, triggerAlign, onScroll);
(0,useLayoutEffect["default"])(function () {
triggerAlign();
}, [mousePos, popupPlacement]);
// When no builtinPlacements and popupAlign changed
(0,useLayoutEffect["default"])(function () {
if (mergedOpen && !(builtinPlacements !== null && builtinPlacements !== void 0 && builtinPlacements[popupPlacement])) {
triggerAlign();
}
}, [JSON.stringify(popupAlign)]);
var alignedClassName = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var baseClassName = getAlignPopupClassName(builtinPlacements, prefixCls, alignInfo, alignPoint);
return classnames_default()(baseClassName, getPopupClassNameFromAlign === null || getPopupClassNameFromAlign === void 0 ? void 0 : getPopupClassNameFromAlign(alignInfo));
}, [alignInfo, getPopupClassNameFromAlign, builtinPlacements, prefixCls, alignPoint]);
// ============================ Refs ============================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: externalForwardRef.current,
popupElement: externalPopupRef.current,
forceAlign: triggerAlign
};
});
// ========================== Stretch ===========================
var _React$useState15 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState16 = (0,slicedToArray["default"])(_React$useState15, 2),
targetWidth = _React$useState16[0],
setTargetWidth = _React$useState16[1];
var _React$useState17 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState18 = (0,slicedToArray["default"])(_React$useState17, 2),
targetHeight = _React$useState18[0],
setTargetHeight = _React$useState18[1];
var syncTargetSize = function syncTargetSize() {
if (stretch && targetEle) {
var rect = targetEle.getBoundingClientRect();
setTargetWidth(rect.width);
setTargetHeight(rect.height);
}
};
var onTargetResize = function onTargetResize() {
syncTargetSize();
triggerAlign();
};
// ========================== Motion ============================
var onVisibleChanged = function onVisibleChanged(visible) {
setInMotion(false);
onAlign();
afterPopupVisibleChange === null || afterPopupVisibleChange === void 0 || afterPopupVisibleChange(visible);
};
// We will trigger align when motion is in prepare
var onPrepare = function onPrepare() {
return new Promise(function (resolve) {
syncTargetSize();
setMotionPrepareResolve(function () {
return resolve;
});
});
};
(0,useLayoutEffect["default"])(function () {
if (motionPrepareResolve) {
onAlign();
motionPrepareResolve();
setMotionPrepareResolve(null);
}
}, [motionPrepareResolve]);
// =========================== Action ===========================
/**
* Util wrapper for trigger action
*/
function wrapperAction(eventName, nextOpen, delay, preEvent) {
cloneProps[eventName] = function (event) {
var _originChildProps$eve;
preEvent === null || preEvent === void 0 || preEvent(event);
triggerOpen(nextOpen, delay);
// Pass to origin
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
(_originChildProps$eve = originChildProps[eventName]) === null || _originChildProps$eve === void 0 || _originChildProps$eve.call.apply(_originChildProps$eve, [originChildProps, event].concat(args));
};
}
// ======================= Action: Click ========================
if (clickToShow || clickToHide) {
cloneProps.onClick = function (event) {
var _originChildProps$onC;
if (openRef.current && clickToHide) {
triggerOpen(false);
} else if (!openRef.current && clickToShow) {
setMousePosByEvent(event);
triggerOpen(true);
}
// Pass to origin
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
(_originChildProps$onC = originChildProps.onClick) === null || _originChildProps$onC === void 0 || _originChildProps$onC.call.apply(_originChildProps$onC, [originChildProps, event].concat(args));
};
}
// Click to hide is special action since click popup element should not hide
var onPopupPointerDown = useWinClick(mergedOpen, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen);
// ======================= Action: Hover ========================
var hoverToShow = showActions.has('hover');
var hoverToHide = hideActions.has('hover');
var onPopupMouseEnter;
var onPopupMouseLeave;
if (hoverToShow) {
// Compatible with old browser which not support pointer event
wrapperAction('onMouseEnter', true, mouseEnterDelay, function (event) {
setMousePosByEvent(event);
});
wrapperAction('onPointerEnter', true, mouseEnterDelay, function (event) {
setMousePosByEvent(event);
});
onPopupMouseEnter = function onPopupMouseEnter(event) {
// Only trigger re-open when popup is visible
if ((mergedOpen || inMotion) && popupEle !== null && popupEle !== void 0 && popupEle.contains(event.target)) {
triggerOpen(true, mouseEnterDelay);
}
};
// Align Point
if (alignPoint) {
cloneProps.onMouseMove = function (event) {
var _originChildProps$onM;
// setMousePosByEvent(event);
(_originChildProps$onM = originChildProps.onMouseMove) === null || _originChildProps$onM === void 0 || _originChildProps$onM.call(originChildProps, event);
};
}
}
if (hoverToHide) {
wrapperAction('onMouseLeave', false, mouseLeaveDelay);
wrapperAction('onPointerLeave', false, mouseLeaveDelay);
onPopupMouseLeave = function onPopupMouseLeave() {
triggerOpen(false, mouseLeaveDelay);
};
}
// ======================= Action: Focus ========================
if (showActions.has('focus')) {
wrapperAction('onFocus', true, focusDelay);
}
if (hideActions.has('focus')) {
wrapperAction('onBlur', false, blurDelay);
}
// ==================== Action: ContextMenu =====================
if (showActions.has('contextMenu')) {
cloneProps.onContextMenu = function (event) {
var _originChildProps$onC2;
if (openRef.current && hideActions.has('contextMenu')) {
triggerOpen(false);
} else {
setMousePosByEvent(event);
triggerOpen(true);
}
event.preventDefault();
// Pass to origin
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
args[_key3 - 1] = arguments[_key3];
}
(_originChildProps$onC2 = originChildProps.onContextMenu) === null || _originChildProps$onC2 === void 0 || _originChildProps$onC2.call.apply(_originChildProps$onC2, [originChildProps, event].concat(args));
};
}
// ========================= ClassName ==========================
if (className) {
cloneProps.className = classnames_default()(originChildProps.className, className);
}
// =========================== Render ===========================
var mergedChildrenProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originChildProps), cloneProps);
// Pass props into cloneProps for nest usage
var passedProps = {};
var passedEventList = ['onContextMenu', 'onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];
passedEventList.forEach(function (eventName) {
if (restProps[eventName]) {
passedProps[eventName] = function () {
var _mergedChildrenProps$;
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
(_mergedChildrenProps$ = mergedChildrenProps[eventName]) === null || _mergedChildrenProps$ === void 0 || _mergedChildrenProps$.call.apply(_mergedChildrenProps$, [mergedChildrenProps].concat(args));
restProps[eventName].apply(restProps, args);
};
}
});
// Child Node
var triggerNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedChildrenProps), passedProps));
var arrowPos = {
x: arrowX,
y: arrowY
};
var innerArrow = arrow ? (0,objectSpread2["default"])({}, arrow !== true ? arrow : {}) : null;
// Render
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
disabled: !mergedOpen,
ref: setTargetRef,
onResize: onTargetResize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TriggerWrapper, {
getTriggerDOMNode: getTriggerDOMNode
}, triggerNode)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_context.Provider, {
value: context
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Popup, {
portal: PortalComponent,
ref: setPopupRef,
prefixCls: prefixCls,
popup: popup,
className: classnames_default()(popupClassName, alignedClassName),
style: popupStyle,
target: targetEle,
onMouseEnter: onPopupMouseEnter,
onMouseLeave: onPopupMouseLeave
// https://github.com/ant-design/ant-design/issues/43924
,
onPointerEnter: onPopupMouseEnter,
zIndex: zIndex
// Open
,
open: mergedOpen,
keepDom: inMotion,
fresh: fresh
// Click
,
onClick: onPopupClick,
onPointerDownCapture: onPopupPointerDown
// Mask
,
mask: mask
// Motion
,
motion: mergePopupMotion,
maskMotion: mergeMaskMotion,
onVisibleChanged: onVisibleChanged,
onPrepare: onPrepare
// Portal
,
forceRender: forceRender,
autoDestroy: mergedAutoDestroy,
getPopupContainer: getPopupContainer
// Arrow
,
align: alignInfo,
arrow: innerArrow,
arrowPos: arrowPos
// Align
,
ready: ready,
offsetX: offsetX,
offsetY: offsetY,
offsetR: offsetR,
offsetB: offsetB,
onAlign: triggerAlign
// Stretch
,
stretch: stretch,
targetWidth: targetWidth / scaleX,
targetHeight: targetHeight / scaleY
})));
});
if (true) {
Trigger.displayName = 'Trigger';
}
return Trigger;
}
/* harmony default export */ var trigger_es = (generateTrigger(portal_es));
;// ./node_modules/rc-select/es/SelectTrigger.js
var SelectTrigger_excluded = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"];
var getBuiltInPlacements = function getBuiltInPlacements(dropdownMatchSelectWidth) {
// Enable horizontal overflow auto-adjustment when a custom dropdown width is provided
var adjustX = dropdownMatchSelectWidth === true ? 0 : 1;
return {
bottomLeft: {
points: ['tl', 'bl'],
offset: [0, 4],
overflow: {
adjustX: adjustX,
adjustY: 1
},
htmlRegion: 'scroll'
},
bottomRight: {
points: ['tr', 'br'],
offset: [0, 4],
overflow: {
adjustX: adjustX,
adjustY: 1
},
htmlRegion: 'scroll'
},
topLeft: {
points: ['bl', 'tl'],
offset: [0, -4],
overflow: {
adjustX: adjustX,
adjustY: 1
},
htmlRegion: 'scroll'
},
topRight: {
points: ['br', 'tr'],
offset: [0, -4],
overflow: {
adjustX: adjustX,
adjustY: 1
},
htmlRegion: 'scroll'
}
};
};
var SelectTrigger = function SelectTrigger(props, ref) {
var prefixCls = props.prefixCls,
disabled = props.disabled,
visible = props.visible,
children = props.children,
popupElement = props.popupElement,
animation = props.animation,
transitionName = props.transitionName,
dropdownStyle = props.dropdownStyle,
dropdownClassName = props.dropdownClassName,
_props$direction = props.direction,
direction = _props$direction === void 0 ? 'ltr' : _props$direction,
placement = props.placement,
builtinPlacements = props.builtinPlacements,
dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,
dropdownRender = props.dropdownRender,
dropdownAlign = props.dropdownAlign,
getPopupContainer = props.getPopupContainer,
empty = props.empty,
getTriggerDOMNode = props.getTriggerDOMNode,
onPopupVisibleChange = props.onPopupVisibleChange,
onPopupMouseEnter = props.onPopupMouseEnter,
restProps = (0,objectWithoutProperties["default"])(props, SelectTrigger_excluded);
var dropdownPrefixCls = "".concat(prefixCls, "-dropdown");
var popupNode = popupElement;
if (dropdownRender) {
popupNode = dropdownRender(popupElement);
}
var mergedBuiltinPlacements = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return builtinPlacements || getBuiltInPlacements(dropdownMatchSelectWidth);
}, [builtinPlacements, dropdownMatchSelectWidth]);
// ===================== Motion ======================
var mergedTransitionName = animation ? "".concat(dropdownPrefixCls, "-").concat(animation) : transitionName;
// =================== Popup Width ===================
var isNumberPopupWidth = typeof dropdownMatchSelectWidth === 'number';
var stretch = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (isNumberPopupWidth) {
return null;
}
return dropdownMatchSelectWidth === false ? 'minWidth' : 'width';
}, [dropdownMatchSelectWidth, isNumberPopupWidth]);
var popupStyle = dropdownStyle;
if (isNumberPopupWidth) {
popupStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, popupStyle), {}, {
width: dropdownMatchSelectWidth
});
}
// ======================= Ref =======================
var triggerPopupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
getPopupElement: function getPopupElement() {
var _triggerPopupRef$curr;
return (_triggerPopupRef$curr = triggerPopupRef.current) === null || _triggerPopupRef$curr === void 0 ? void 0 : _triggerPopupRef$curr.popupElement;
}
};
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, (0,esm_extends["default"])({}, restProps, {
showAction: onPopupVisibleChange ? ['click'] : [],
hideAction: onPopupVisibleChange ? ['click'] : [],
popupPlacement: placement || (direction === 'rtl' ? 'bottomRight' : 'bottomLeft'),
builtinPlacements: mergedBuiltinPlacements,
prefixCls: dropdownPrefixCls,
popupTransitionName: mergedTransitionName,
popup: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
onMouseEnter: onPopupMouseEnter
}, popupNode),
ref: triggerPopupRef,
stretch: stretch,
popupAlign: dropdownAlign,
popupVisible: visible,
getPopupContainer: getPopupContainer,
popupClassName: classnames_default()(dropdownClassName, (0,defineProperty["default"])({}, "".concat(dropdownPrefixCls, "-empty"), empty)),
popupStyle: popupStyle,
getTriggerDOMNode: getTriggerDOMNode,
onPopupVisibleChange: onPopupVisibleChange
}), children);
};
var RefSelectTrigger = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SelectTrigger);
if (true) {
RefSelectTrigger.displayName = 'SelectTrigger';
}
/* harmony default export */ var es_SelectTrigger = (RefSelectTrigger);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
var esm_toArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toArray.js");
;// ./node_modules/rc-select/es/utils/valueUtil.js
function getKey(data, index) {
var key = data.key;
var value;
if ('value' in data) {
value = data.value;
}
if (key !== null && key !== undefined) {
return key;
}
if (value !== undefined) {
return value;
}
return "rc-index-key-".concat(index);
}
function isValidCount(value) {
return typeof value !== 'undefined' && !Number.isNaN(value);
}
function fillFieldNames(fieldNames, childrenAsData) {
var _ref = fieldNames || {},
label = _ref.label,
value = _ref.value,
options = _ref.options,
groupLabel = _ref.groupLabel;
var mergedLabel = label || (childrenAsData ? 'children' : 'label');
return {
label: mergedLabel,
value: value || 'value',
options: options || 'options',
groupLabel: groupLabel || mergedLabel
};
}
/**
* Flat options into flatten list.
* We use `optionOnly` here is aim to avoid user use nested option group.
* Here is simply set `key` to the index if not provided.
*/
function flattenOptions(options) {
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
fieldNames = _ref2.fieldNames,
childrenAsData = _ref2.childrenAsData;
var flattenList = [];
var _fillFieldNames = fillFieldNames(fieldNames, false),
fieldLabel = _fillFieldNames.label,
fieldValue = _fillFieldNames.value,
fieldOptions = _fillFieldNames.options,
groupLabel = _fillFieldNames.groupLabel;
function dig(list, isGroupOption) {
if (!Array.isArray(list)) {
return;
}
list.forEach(function (data) {
if (isGroupOption || !(fieldOptions in data)) {
var value = data[fieldValue];
// Option
flattenList.push({
key: getKey(data, flattenList.length),
groupOption: isGroupOption,
data: data,
label: data[fieldLabel],
value: value
});
} else {
var grpLabel = data[groupLabel];
if (grpLabel === undefined && childrenAsData) {
grpLabel = data.label;
}
// Option Group
flattenList.push({
key: getKey(data, flattenList.length),
group: true,
data: data,
label: grpLabel
});
dig(data[fieldOptions], true);
}
});
}
dig(options, false);
return flattenList;
}
/**
* Inject `props` into `option` for legacy usage
*/
function injectPropsWithOption(option) {
var newOption = (0,objectSpread2["default"])({}, option);
if (!('props' in newOption)) {
Object.defineProperty(newOption, 'props', {
get: function get() {
(0,warning["default"])(false, 'Return type is option instead of Option instance. Please read value directly instead of reading from `props`.');
return newOption;
}
});
}
return newOption;
}
var getSeparatedContent = function getSeparatedContent(text, tokens, end) {
if (!tokens || !tokens.length) {
return null;
}
var match = false;
var separate = function separate(str, _ref3) {
var _ref4 = (0,esm_toArray["default"])(_ref3),
token = _ref4[0],
restTokens = _ref4.slice(1);
if (!token) {
return [str];
}
var list = str.split(token);
match = match || list.length > 1;
return list.reduce(function (prevList, unitStr) {
return [].concat((0,toConsumableArray["default"])(prevList), (0,toConsumableArray["default"])(separate(unitStr, restTokens)));
}, []).filter(Boolean);
};
var list = separate(text, tokens);
if (match) {
return typeof end !== 'undefined' ? list.slice(0, end) : list;
} else {
return null;
}
};
;// ./node_modules/rc-select/es/SelectContext.js
// Use any here since we do not get the type during compilation
var SelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var es_SelectContext = (SelectContext);
;// ./node_modules/rc-select/es/BaseSelect/Polite.js
function Polite(props) {
var visible = props.visible,
values = props.values;
if (!visible) {
return null;
}
// Only cut part of values since it's a screen reader
var MAX_COUNT = 50;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
"aria-live": "polite",
style: {
width: 0,
height: 0,
position: 'absolute',
overflow: 'hidden',
opacity: 0
}
}, "".concat(values.slice(0, MAX_COUNT).map(function (_ref) {
var label = _ref.label,
value = _ref.value;
return ['number', 'string'].includes((0,esm_typeof["default"])(label)) ? label : value;
}).join(', ')), values.length > MAX_COUNT ? ', ...' : null);
}
;// ./node_modules/rc-select/es/BaseSelect/index.js
var BaseSelect_excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"];
var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex'];
var isMultiple = function isMultiple(mode) {
return mode === 'tags' || mode === 'multiple';
};
var BaseSelect = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _customizeRawInputEle;
var id = props.id,
prefixCls = props.prefixCls,
className = props.className,
showSearch = props.showSearch,
tagRender = props.tagRender,
direction = props.direction,
omitDomProps = props.omitDomProps,
displayValues = props.displayValues,
onDisplayValuesChange = props.onDisplayValuesChange,
emptyOptions = props.emptyOptions,
_props$notFoundConten = props.notFoundContent,
notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,
onClear = props.onClear,
mode = props.mode,
disabled = props.disabled,
loading = props.loading,
getInputElement = props.getInputElement,
getRawInputElement = props.getRawInputElement,
open = props.open,
defaultOpen = props.defaultOpen,
onDropdownVisibleChange = props.onDropdownVisibleChange,
activeValue = props.activeValue,
onActiveValueChange = props.onActiveValueChange,
activeDescendantId = props.activeDescendantId,
searchValue = props.searchValue,
autoClearSearchValue = props.autoClearSearchValue,
onSearch = props.onSearch,
onSearchSplit = props.onSearchSplit,
tokenSeparators = props.tokenSeparators,
allowClear = props.allowClear,
prefix = props.prefix,
suffixIcon = props.suffixIcon,
clearIcon = props.clearIcon,
OptionList = props.OptionList,
animation = props.animation,
transitionName = props.transitionName,
dropdownStyle = props.dropdownStyle,
dropdownClassName = props.dropdownClassName,
dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,
dropdownRender = props.dropdownRender,
dropdownAlign = props.dropdownAlign,
placement = props.placement,
builtinPlacements = props.builtinPlacements,
getPopupContainer = props.getPopupContainer,
_props$showAction = props.showAction,
showAction = _props$showAction === void 0 ? [] : _props$showAction,
onFocus = props.onFocus,
onBlur = props.onBlur,
onKeyUp = props.onKeyUp,
onKeyDown = props.onKeyDown,
onMouseDown = props.onMouseDown,
restProps = (0,objectWithoutProperties["default"])(props, BaseSelect_excluded);
// ============================== MISC ==============================
var multiple = isMultiple(mode);
var mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';
var domProps = (0,objectSpread2["default"])({}, restProps);
DEFAULT_OMIT_PROPS.forEach(function (propName) {
delete domProps[propName];
});
omitDomProps === null || omitDomProps === void 0 || omitDomProps.forEach(function (propName) {
delete domProps[propName];
});
// ============================= Mobile =============================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
mobile = _React$useState2[0],
setMobile = _React$useState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
// Only update on the client side
setMobile(isMobile());
}, []);
// ============================== Refs ==============================
var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var selectorDomRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var triggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var selectorRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var blurRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
/** Used for component focused management */
var _useDelayReset = useDelayReset(),
_useDelayReset2 = (0,slicedToArray["default"])(_useDelayReset, 3),
mockFocused = _useDelayReset2[0],
setMockFocused = _useDelayReset2[1],
cancelSetMockFocused = _useDelayReset2[2];
// =========================== Imperative ===========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
var _selectorRef$current, _selectorRef$current2;
return {
focus: (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.focus,
blur: (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 ? void 0 : _selectorRef$current2.blur,
scrollTo: function scrollTo(arg) {
var _listRef$current;
return (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollTo(arg);
},
nativeElement: containerRef.current || selectorDomRef.current
};
});
// ========================== Search Value ==========================
var mergedSearchValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var _displayValues$;
if (mode !== 'combobox') {
return searchValue;
}
var val = (_displayValues$ = displayValues[0]) === null || _displayValues$ === void 0 ? void 0 : _displayValues$.value;
return typeof val === 'string' || typeof val === 'number' ? String(val) : '';
}, [searchValue, mode, displayValues]);
// ========================== Custom Input ==========================
// Only works in `combobox`
var customizeInputElement = mode === 'combobox' && typeof getInputElement === 'function' && getInputElement() || null;
// Used for customize replacement for `rc-cascader`
var customizeRawInputElement = typeof getRawInputElement === 'function' && getRawInputElement();
var customizeRawInputRef = (0,es_ref.useComposeRef)(selectorDomRef, customizeRawInputElement === null || customizeRawInputElement === void 0 || (_customizeRawInputEle = customizeRawInputElement.props) === null || _customizeRawInputEle === void 0 ? void 0 : _customizeRawInputEle.ref);
// ============================== Open ==============================
// SSR not support Portal which means we need delay `open` for the first time render
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
rendered = _React$useState4[0],
setRendered = _React$useState4[1];
(0,useLayoutEffect["default"])(function () {
setRendered(true);
}, []);
var _useMergedState = (0,useMergedState["default"])(false, {
defaultValue: defaultOpen,
value: open
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
innerOpen = _useMergedState2[0],
setInnerOpen = _useMergedState2[1];
var mergedOpen = rendered ? innerOpen : false;
// Not trigger `open` in `combobox` when `notFoundContent` is empty
var emptyListContent = !notFoundContent && emptyOptions;
if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {
mergedOpen = false;
}
var triggerOpen = emptyListContent ? false : mergedOpen;
var onToggleOpen = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (newOpen) {
var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;
if (!disabled) {
setInnerOpen(nextOpen);
if (mergedOpen !== nextOpen) {
onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(nextOpen);
}
}
}, [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange]);
// ============================= Search =============================
var tokenWithEnter = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (tokenSeparators || []).some(function (tokenSeparator) {
return ['\n', '\r\n'].includes(tokenSeparator);
});
}, [tokenSeparators]);
var _ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_SelectContext) || {},
maxCount = _ref.maxCount,
rawValues = _ref.rawValues;
var onInternalSearch = function onInternalSearch(searchText, fromTyping, isCompositing) {
if (multiple && isValidCount(maxCount) && (rawValues === null || rawValues === void 0 ? void 0 : rawValues.size) >= maxCount) {
return;
}
var ret = true;
var newSearchText = searchText;
onActiveValueChange === null || onActiveValueChange === void 0 || onActiveValueChange(null);
var separatedList = getSeparatedContent(searchText, tokenSeparators, isValidCount(maxCount) ? maxCount - rawValues.size : undefined);
// Check if match the `tokenSeparators`
var patchLabels = isCompositing ? null : separatedList;
// Ignore combobox since it's not split-able
if (mode !== 'combobox' && patchLabels) {
newSearchText = '';
onSearchSplit === null || onSearchSplit === void 0 || onSearchSplit(patchLabels);
// Should close when paste finish
onToggleOpen(false);
// Tell Selector that break next actions
ret = false;
}
if (onSearch && mergedSearchValue !== newSearchText) {
onSearch(newSearchText, {
source: fromTyping ? 'typing' : 'effect'
});
}
return ret;
};
// Only triggered when menu is closed & mode is tags
// If menu is open, OptionList will take charge
// If mode isn't tags, press enter is not meaningful when you can't see any option
var onInternalSearchSubmit = function onInternalSearchSubmit(searchText) {
// prevent empty tags from appearing when you click the Enter button
if (!searchText || !searchText.trim()) {
return;
}
onSearch(searchText, {
source: 'submit'
});
};
// Close will clean up single mode search text
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!mergedOpen && !multiple && mode !== 'combobox') {
onInternalSearch('', false, false);
}
}, [mergedOpen]);
// ============================ Disabled ============================
// Close dropdown & remove focus state when disabled change
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (innerOpen && disabled) {
setInnerOpen(false);
}
// After onBlur is triggered, the focused does not need to be reset
if (disabled && !blurRef.current) {
setMockFocused(false);
}
}, [disabled]);
// ============================ Keyboard ============================
/**
* We record input value here to check if can press to clean up by backspace
* - null: Key is not down, this is reset by key up
* - true: Search text is empty when first time backspace down
* - false: Search text is not empty when first time backspace down
*/
var _useLock = useLock(),
_useLock2 = (0,slicedToArray["default"])(_useLock, 2),
getClearLock = _useLock2[0],
setClearLock = _useLock2[1];
var keyLockRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
// KeyDown
var onInternalKeyDown = function onInternalKeyDown(event) {
var clearLock = getClearLock();
var key = event.key;
var isEnterKey = key === 'Enter';
if (isEnterKey) {
// Do not submit form when type in the input
if (mode !== 'combobox') {
event.preventDefault();
}
// We only manage open state here, close logic should handle by list component
if (!mergedOpen) {
onToggleOpen(true);
}
}
setClearLock(!!mergedSearchValue);
// Remove value by `backspace`
if (key === 'Backspace' && !clearLock && multiple && !mergedSearchValue && displayValues.length) {
var cloneDisplayValues = (0,toConsumableArray["default"])(displayValues);
var removedDisplayValue = null;
for (var i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {
var current = cloneDisplayValues[i];
if (!current.disabled) {
cloneDisplayValues.splice(i, 1);
removedDisplayValue = current;
break;
}
}
if (removedDisplayValue) {
onDisplayValuesChange(cloneDisplayValues, {
type: 'remove',
values: [removedDisplayValue]
});
}
}
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
rest[_key - 1] = arguments[_key];
}
if (mergedOpen && (!isEnterKey || !keyLockRef.current)) {
var _listRef$current2;
// Lock the Enter key after it is pressed to avoid repeated triggering of the onChange event.
if (isEnterKey) {
keyLockRef.current = true;
}
(_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 || _listRef$current2.onKeyDown.apply(_listRef$current2, [event].concat(rest));
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown.apply(void 0, [event].concat(rest));
};
// KeyUp
var onInternalKeyUp = function onInternalKeyUp(event) {
for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
rest[_key2 - 1] = arguments[_key2];
}
if (mergedOpen) {
var _listRef$current3;
(_listRef$current3 = listRef.current) === null || _listRef$current3 === void 0 || _listRef$current3.onKeyUp.apply(_listRef$current3, [event].concat(rest));
}
if (event.key === 'Enter') {
keyLockRef.current = false;
}
onKeyUp === null || onKeyUp === void 0 || onKeyUp.apply(void 0, [event].concat(rest));
};
// ============================ Selector ============================
var onSelectorRemove = function onSelectorRemove(val) {
var newValues = displayValues.filter(function (i) {
return i !== val;
});
onDisplayValuesChange(newValues, {
type: 'remove',
values: [val]
});
};
var onInputBlur = function onInputBlur() {
// Unlock the Enter key after the input blur; otherwise, the Enter key needs to be pressed twice to trigger the correct effect.
keyLockRef.current = false;
};
// ========================== Focus / Blur ==========================
/** Record real focus status */
var focusRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var onContainerFocus = function onContainerFocus() {
setMockFocused(true);
if (!disabled) {
if (onFocus && !focusRef.current) {
onFocus.apply(void 0, arguments);
}
// `showAction` should handle `focus` if set
if (showAction.includes('focus')) {
onToggleOpen(true);
}
}
focusRef.current = true;
};
var onContainerBlur = function onContainerBlur() {
blurRef.current = true;
setMockFocused(false, function () {
focusRef.current = false;
blurRef.current = false;
onToggleOpen(false);
});
if (disabled) {
return;
}
if (mergedSearchValue) {
// `tags` mode should move `searchValue` into values
if (mode === 'tags') {
onSearch(mergedSearchValue, {
source: 'submit'
});
} else if (mode === 'multiple') {
// `multiple` mode only clean the search value but not trigger event
onSearch('', {
source: 'blur'
});
}
}
if (onBlur) {
onBlur.apply(void 0, arguments);
}
};
// Give focus back of Select
var activeTimeoutIds = [];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
activeTimeoutIds.forEach(function (timeoutId) {
return clearTimeout(timeoutId);
});
activeTimeoutIds.splice(0, activeTimeoutIds.length);
};
}, []);
var onInternalMouseDown = function onInternalMouseDown(event) {
var _triggerRef$current;
var target = event.target;
var popupElement = (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getPopupElement();
// We should give focus back to selector if clicked item is not focusable
if (popupElement && popupElement.contains(target)) {
var timeoutId = setTimeout(function () {
var index = activeTimeoutIds.indexOf(timeoutId);
if (index !== -1) {
activeTimeoutIds.splice(index, 1);
}
cancelSetMockFocused();
if (!mobile && !popupElement.contains(document.activeElement)) {
var _selectorRef$current3;
(_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 || _selectorRef$current3.focus();
}
});
activeTimeoutIds.push(timeoutId);
}
for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
restArgs[_key3 - 1] = arguments[_key3];
}
onMouseDown === null || onMouseDown === void 0 || onMouseDown.apply(void 0, [event].concat(restArgs));
};
// ============================ Dropdown ============================
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
forceUpdate = _React$useState6[1];
// We need force update here since popup dom is render async
function onPopupMouseEnter() {
forceUpdate({});
}
// Used for raw custom input trigger
var onTriggerVisibleChange;
if (customizeRawInputElement) {
onTriggerVisibleChange = function onTriggerVisibleChange(newOpen) {
onToggleOpen(newOpen);
};
}
// Close when click on non-select element
useSelectTriggerControl(function () {
var _triggerRef$current2;
return [containerRef.current, (_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : _triggerRef$current2.getPopupElement()];
}, triggerOpen, onToggleOpen, !!customizeRawInputElement);
// ============================ Context =============================
var baseSelectContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
notFoundContent: notFoundContent,
open: mergedOpen,
triggerOpen: triggerOpen,
id: id,
showSearch: mergedShowSearch,
multiple: multiple,
toggleOpen: onToggleOpen
});
}, [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]);
// ==================================================================
// == Render ==
// ==================================================================
// ============================= Arrow ==============================
var showSuffixIcon = !!suffixIcon || loading;
var arrowNode;
if (showSuffixIcon) {
arrowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TransBtn, {
className: classnames_default()("".concat(prefixCls, "-arrow"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-arrow-loading"), loading)),
customizeIcon: suffixIcon,
customizeIconProps: {
loading: loading,
searchValue: mergedSearchValue,
open: mergedOpen,
focused: mockFocused,
showSearch: mergedShowSearch
}
});
}
// ============================= Clear ==============================
var onClearMouseDown = function onClearMouseDown() {
var _selectorRef$current4;
onClear === null || onClear === void 0 || onClear();
(_selectorRef$current4 = selectorRef.current) === null || _selectorRef$current4 === void 0 || _selectorRef$current4.focus();
onDisplayValuesChange([], {
type: 'clear',
values: displayValues
});
onInternalSearch('', false, false);
};
var _useAllowClear = useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon, disabled, mergedSearchValue, mode),
mergedAllowClear = _useAllowClear.allowClear,
clearNode = _useAllowClear.clearIcon;
// =========================== OptionList ===========================
var optionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList, {
ref: listRef
});
// ============================= Select =============================
var mergedClassName = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-focused"), mockFocused), "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-single"), !multiple), "".concat(prefixCls, "-allow-clear"), allowClear), "".concat(prefixCls, "-show-arrow"), showSuffixIcon), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-open"), mergedOpen), "".concat(prefixCls, "-customize-input"), customizeInputElement), "".concat(prefixCls, "-show-search"), mergedShowSearch));
// >>> Selector
var selectorNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SelectTrigger, {
ref: triggerRef,
disabled: disabled,
prefixCls: prefixCls,
visible: triggerOpen,
popupElement: optionList,
animation: animation,
transitionName: transitionName,
dropdownStyle: dropdownStyle,
dropdownClassName: dropdownClassName,
direction: direction,
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
dropdownRender: dropdownRender,
dropdownAlign: dropdownAlign,
placement: placement,
builtinPlacements: builtinPlacements,
getPopupContainer: getPopupContainer,
empty: emptyOptions,
getTriggerDOMNode: function getTriggerDOMNode(node) {
return (
// TODO: This is workaround and should be removed in `rc-select`
// And use new standard `nativeElement` for ref.
// But we should update `rc-resize-observer` first.
selectorDomRef.current || node
);
},
onPopupVisibleChange: onTriggerVisibleChange,
onPopupMouseEnter: onPopupMouseEnter
}, customizeRawInputElement ? ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(customizeRawInputElement, {
ref: customizeRawInputRef
})) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Selector, (0,esm_extends["default"])({}, props, {
domRef: selectorDomRef,
prefixCls: prefixCls,
inputElement: customizeInputElement,
ref: selectorRef,
id: id,
prefix: prefix,
showSearch: mergedShowSearch,
autoClearSearchValue: autoClearSearchValue,
mode: mode,
activeDescendantId: activeDescendantId,
tagRender: tagRender,
values: displayValues,
open: mergedOpen,
onToggleOpen: onToggleOpen,
activeValue: activeValue,
searchValue: mergedSearchValue,
onSearch: onInternalSearch,
onSearchSubmit: onInternalSearchSubmit,
onRemove: onSelectorRemove,
tokenWithEnter: tokenWithEnter,
onInputBlur: onInputBlur
})));
// >>> Render
var renderNode;
// Render raw
if (customizeRawInputElement) {
renderNode = selectorNode;
} else {
renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
className: mergedClassName
}, domProps, {
ref: containerRef,
onMouseDown: onInternalMouseDown,
onKeyDown: onInternalKeyDown,
onKeyUp: onInternalKeyUp,
onFocus: onContainerFocus,
onBlur: onContainerBlur
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Polite, {
visible: mockFocused && !mergedOpen,
values: displayValues
}), selectorNode, arrowNode, mergedAllowClear && clearNode);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(BaseSelectContext.Provider, {
value: baseSelectContext
}, renderNode);
});
// Set display name for dev
if (true) {
BaseSelect.displayName = 'BaseSelect';
}
/* harmony default export */ var es_BaseSelect = (BaseSelect);
;// ./node_modules/rc-select/es/OptGroup.js
/* istanbul ignore file */
/** This is a placeholder, not real render in dom */
var OptGroup = function OptGroup() {
return null;
};
OptGroup.isSelectOptGroup = true;
/* harmony default export */ var es_OptGroup = (OptGroup);
;// ./node_modules/rc-select/es/Option.js
/* istanbul ignore file */
/** This is a placeholder, not real render in dom */
var Option = function Option() {
return null;
};
Option.isSelectOption = true;
/* harmony default export */ var es_Option = (Option);
// EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
var rc_util_es = __webpack_require__("./node_modules/rc-util/es/index.js");
;// ./node_modules/rc-virtual-list/es/Filler.js
/**
* Fill component to provided the scroll content real height.
*/
var Filler = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (_ref, ref) {
var height = _ref.height,
offsetY = _ref.offsetY,
offsetX = _ref.offsetX,
children = _ref.children,
prefixCls = _ref.prefixCls,
onInnerResize = _ref.onInnerResize,
innerProps = _ref.innerProps,
rtl = _ref.rtl,
extra = _ref.extra;
var outerStyle = {};
var innerStyle = {
display: 'flex',
flexDirection: 'column'
};
if (offsetY !== undefined) {
// Not set `width` since this will break `sticky: right`
outerStyle = {
height: height,
position: 'relative',
overflow: 'hidden'
};
innerStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, innerStyle), {}, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({
transform: "translateY(".concat(offsetY, "px)")
}, rtl ? 'marginRight' : 'marginLeft', -offsetX), "position", 'absolute'), "left", 0), "right", 0), "top", 0));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: outerStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: function onResize(_ref2) {
var offsetHeight = _ref2.offsetHeight;
if (offsetHeight && onInnerResize) {
onInnerResize();
}
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
style: innerStyle,
className: classnames_default()((0,defineProperty["default"])({}, "".concat(prefixCls, "-holder-inner"), prefixCls)),
ref: ref
}, innerProps), children, extra)));
});
Filler.displayName = 'Filler';
/* harmony default export */ var es_Filler = (Filler);
;// ./node_modules/rc-virtual-list/es/Item.js
function Item_Item(_ref) {
var children = _ref.children,
setRef = _ref.setRef;
var refFunc = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (node) {
setRef(node);
}, []);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
ref: refFunc
});
}
;// ./node_modules/rc-virtual-list/es/hooks/useChildren.js
function useChildren(list, startIndex, endIndex, scrollWidth, offsetX, setNodeRef, renderFunc, _ref) {
var getKey = _ref.getKey;
return list.slice(startIndex, endIndex + 1).map(function (item, index) {
var eleIndex = startIndex + index;
var node = renderFunc(item, eleIndex, {
style: {
width: scrollWidth
},
offsetX: offsetX
});
var key = getKey(item);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Item_Item, {
key: key,
setRef: function setRef(ele) {
return setNodeRef(item, ele);
}
}, node);
});
}
;// ./node_modules/rc-virtual-list/es/utils/algorithmUtil.js
/**
* Get index with specific start index one by one. e.g.
* min: 3, max: 9, start: 6
*
* Return index is:
* [0]: 6
* [1]: 7
* [2]: 5
* [3]: 8
* [4]: 4
* [5]: 9
* [6]: 3
*/
function getIndexByStartLoc(min, max, start, index) {
var beforeCount = start - min;
var afterCount = max - start;
var balanceCount = Math.min(beforeCount, afterCount) * 2;
// Balance
if (index <= balanceCount) {
var stepIndex = Math.floor(index / 2);
if (index % 2) {
return start + stepIndex + 1;
}
return start - stepIndex;
}
// One is out of range
if (beforeCount > afterCount) {
return start - (index - afterCount);
}
return start + (index - beforeCount);
}
/**
* We assume that 2 list has only 1 item diff and others keeping the order.
* So we can use dichotomy algorithm to find changed one.
*/
function findListDiffIndex(originList, targetList, getKey) {
var originLen = originList.length;
var targetLen = targetList.length;
var shortList;
var longList;
if (originLen === 0 && targetLen === 0) {
return null;
}
if (originLen < targetLen) {
shortList = originList;
longList = targetList;
} else {
shortList = targetList;
longList = originList;
}
var notExistKey = {
__EMPTY_ITEM__: true
};
function getItemKey(item) {
if (item !== undefined) {
return getKey(item);
}
return notExistKey;
}
// Loop to find diff one
var diffIndex = null;
var multiple = Math.abs(originLen - targetLen) !== 1;
for (var i = 0; i < longList.length; i += 1) {
var shortKey = getItemKey(shortList[i]);
var longKey = getItemKey(longList[i]);
if (shortKey !== longKey) {
diffIndex = i;
multiple = multiple || shortKey !== getItemKey(longList[i + 1]);
break;
}
}
return diffIndex === null ? null : {
index: diffIndex,
multiple: multiple
};
}
;// ./node_modules/rc-virtual-list/es/hooks/useDiffItem.js
function useDiffItem(data, getKey, onDiff) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(data),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
prevData = _React$useState2[0],
setPrevData = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
diffItem = _React$useState4[0],
setDiffItem = _React$useState4[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var diff = findListDiffIndex(prevData || [], data || [], getKey);
if ((diff === null || diff === void 0 ? void 0 : diff.index) !== undefined) {
onDiff === null || onDiff === void 0 || onDiff(diff.index);
setDiffItem(data[diff.index]);
}
setPrevData(data);
}, [data]);
return [diffItem];
}
;// ./node_modules/rc-virtual-list/es/utils/isFirefox.js
var isFF = (typeof navigator === "undefined" ? "undefined" : (0,esm_typeof["default"])(navigator)) === 'object' && /Firefox/i.test(navigator.userAgent);
/* harmony default export */ var isFirefox = (isFF);
;// ./node_modules/rc-virtual-list/es/hooks/useOriginScroll.js
/* harmony default export */ var useOriginScroll = (function (isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight) {
// Do lock for a wheel when scrolling
var lockRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var lockTimeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
function lockScroll() {
clearTimeout(lockTimeoutRef.current);
lockRef.current = true;
lockTimeoutRef.current = setTimeout(function () {
lockRef.current = false;
}, 50);
}
// Pass to ref since global add is in closure
var scrollPingRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
top: isScrollAtTop,
bottom: isScrollAtBottom,
left: isScrollAtLeft,
right: isScrollAtRight
});
scrollPingRef.current.top = isScrollAtTop;
scrollPingRef.current.bottom = isScrollAtBottom;
scrollPingRef.current.left = isScrollAtLeft;
scrollPingRef.current.right = isScrollAtRight;
return function (isHorizontal, delta) {
var smoothOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var originScroll = isHorizontal ?
// Pass origin wheel when on the left
delta < 0 && scrollPingRef.current.left ||
// Pass origin wheel when on the right
delta > 0 && scrollPingRef.current.right // Pass origin wheel when on the top
: delta < 0 && scrollPingRef.current.top ||
// Pass origin wheel when on the bottom
delta > 0 && scrollPingRef.current.bottom;
if (smoothOffset && originScroll) {
// No need lock anymore when it's smooth offset from touchMove interval
clearTimeout(lockTimeoutRef.current);
lockRef.current = false;
} else if (!originScroll || lockRef.current) {
lockScroll();
}
return !lockRef.current && originScroll;
};
});
;// ./node_modules/rc-virtual-list/es/hooks/useFrameWheel.js
function useFrameWheel(inVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, horizontalScroll,
/***
* Return `true` when you need to prevent default event
*/
onWheelDelta) {
var offsetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
var nextFrameRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// Firefox patch
var wheelValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var isMouseScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
// Scroll status sync
var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
function onWheelY(e, deltaY) {
raf["default"].cancel(nextFrameRef.current);
// Do nothing when scroll at the edge, Skip check when is in scroll
if (originScroll(false, deltaY)) return;
// Skip if nest List has handled this event
var event = e;
if (!event._virtualHandled) {
event._virtualHandled = true;
} else {
return;
}
offsetRef.current += deltaY;
wheelValueRef.current = deltaY;
// Proxy of scroll events
if (!isFirefox) {
event.preventDefault();
}
nextFrameRef.current = (0,raf["default"])(function () {
// Patch a multiple for Firefox to fix wheel number too small
// ref: https://github.com/ant-design/ant-design/issues/26372#issuecomment-679460266
var patchMultiple = isMouseScrollRef.current ? 10 : 1;
onWheelDelta(offsetRef.current * patchMultiple, false);
offsetRef.current = 0;
});
}
function onWheelX(event, deltaX) {
onWheelDelta(deltaX, true);
if (!isFirefox) {
event.preventDefault();
}
}
// Check for which direction does wheel do. `sx` means `shift + wheel`
var wheelDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var wheelDirectionCleanRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
function onWheel(event) {
if (!inVirtual) return;
// Wait for 2 frame to clean direction
raf["default"].cancel(wheelDirectionCleanRef.current);
wheelDirectionCleanRef.current = (0,raf["default"])(function () {
wheelDirectionRef.current = null;
}, 2);
var deltaX = event.deltaX,
deltaY = event.deltaY,
shiftKey = event.shiftKey;
var mergedDeltaX = deltaX;
var mergedDeltaY = deltaY;
if (wheelDirectionRef.current === 'sx' || !wheelDirectionRef.current && (shiftKey || false) && deltaY && !deltaX) {
mergedDeltaX = deltaY;
mergedDeltaY = 0;
wheelDirectionRef.current = 'sx';
}
var absX = Math.abs(mergedDeltaX);
var absY = Math.abs(mergedDeltaY);
if (wheelDirectionRef.current === null) {
wheelDirectionRef.current = horizontalScroll && absX > absY ? 'x' : 'y';
}
if (wheelDirectionRef.current === 'y') {
onWheelY(event, mergedDeltaY);
} else {
onWheelX(event, mergedDeltaX);
}
}
// A patch for firefox
function onFireFoxScroll(event) {
if (!inVirtual) return;
isMouseScrollRef.current = event.detail === wheelValueRef.current;
}
return [onWheel, onFireFoxScroll];
}
;// ./node_modules/rc-virtual-list/es/hooks/useGetSize.js
/**
* Size info need loop query for the `heights` which will has the perf issue.
* Let cache result for each render phase.
*/
function useGetSize(mergedData, getKey, heights, itemHeight) {
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return [new Map(), []];
}, [mergedData, heights.id, itemHeight]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
key2Index = _React$useMemo2[0],
bottomList = _React$useMemo2[1];
var getSize = function getSize(startKey) {
var endKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startKey;
// Get from cache first
var startIndex = key2Index.get(startKey);
var endIndex = key2Index.get(endKey);
// Loop to fill the cache
if (startIndex === undefined || endIndex === undefined) {
var dataLen = mergedData.length;
for (var i = bottomList.length; i < dataLen; i += 1) {
var _heights$get;
var item = mergedData[i];
var key = getKey(item);
key2Index.set(key, i);
var cacheHeight = (_heights$get = heights.get(key)) !== null && _heights$get !== void 0 ? _heights$get : itemHeight;
bottomList[i] = (bottomList[i - 1] || 0) + cacheHeight;
if (key === startKey) {
startIndex = i;
}
if (key === endKey) {
endIndex = i;
}
if (startIndex !== undefined && endIndex !== undefined) {
break;
}
}
}
return {
top: bottomList[startIndex - 1] || 0,
bottom: bottomList[endIndex]
};
};
return getSize;
}
;// ./node_modules/rc-virtual-list/es/utils/CacheMap.js
// Firefox has low performance of map.
var CacheMap = /*#__PURE__*/function () {
function CacheMap() {
(0,classCallCheck["default"])(this, CacheMap);
(0,defineProperty["default"])(this, "maps", void 0);
// Used for cache key
// `useMemo` no need to update if `id` not change
(0,defineProperty["default"])(this, "id", 0);
(0,defineProperty["default"])(this, "diffKeys", new Set());
this.maps = Object.create(null);
}
(0,createClass["default"])(CacheMap, [{
key: "set",
value: function set(key, value) {
this.maps[key] = value;
this.id += 1;
this.diffKeys.add(key);
}
}, {
key: "get",
value: function get(key) {
return this.maps[key];
}
/**
* CacheMap will record the key changed.
* To help to know what's update in the next render.
*/
}, {
key: "resetRecord",
value: function resetRecord() {
this.diffKeys.clear();
}
}, {
key: "getRecord",
value: function getRecord() {
return this.diffKeys;
}
}]);
return CacheMap;
}();
/* harmony default export */ var utils_CacheMap = (CacheMap);
;// ./node_modules/rc-virtual-list/es/hooks/useHeights.js
function parseNumber(value) {
var num = parseFloat(value);
return isNaN(num) ? 0 : num;
}
function useHeights(getKey, onItemAdd, onItemRemove) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
updatedMark = _React$useState2[0],
setUpdatedMark = _React$useState2[1];
var instanceRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new Map());
var heightsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new utils_CacheMap());
var promiseIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
function cancelRaf() {
promiseIdRef.current += 1;
}
function collectHeight() {
var sync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
cancelRaf();
var doCollect = function doCollect() {
var changed = false;
instanceRef.current.forEach(function (element, key) {
if (element && element.offsetParent) {
var offsetHeight = element.offsetHeight;
var _getComputedStyle = getComputedStyle(element),
marginTop = _getComputedStyle.marginTop,
marginBottom = _getComputedStyle.marginBottom;
var marginTopNum = parseNumber(marginTop);
var marginBottomNum = parseNumber(marginBottom);
var totalHeight = offsetHeight + marginTopNum + marginBottomNum;
if (heightsRef.current.get(key) !== totalHeight) {
heightsRef.current.set(key, totalHeight);
changed = true;
}
}
});
// Always trigger update mark to tell parent that should re-calculate heights when resized
if (changed) {
setUpdatedMark(function (c) {
return c + 1;
});
}
};
if (sync) {
doCollect();
} else {
promiseIdRef.current += 1;
var id = promiseIdRef.current;
Promise.resolve().then(function () {
if (id === promiseIdRef.current) {
doCollect();
}
});
}
}
function setInstanceRef(item, instance) {
var key = getKey(item);
var origin = instanceRef.current.get(key);
if (instance) {
instanceRef.current.set(key, instance);
collectHeight();
} else {
instanceRef.current.delete(key);
}
// Instance changed
if (!origin !== !instance) {
if (instance) {
onItemAdd === null || onItemAdd === void 0 || onItemAdd(item);
} else {
onItemRemove === null || onItemRemove === void 0 || onItemRemove(item);
}
}
}
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return cancelRaf;
}, []);
return [setInstanceRef, collectHeight, heightsRef.current, updatedMark];
}
;// ./node_modules/rc-virtual-list/es/hooks/useMobileTouchMove.js
var SMOOTH_PTG = 14 / 15;
function useMobileTouchMove(inVirtual, listRef, callback) {
var touchedRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var touchXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
var touchYRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// Smooth scroll
var intervalRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
/* eslint-disable prefer-const */
var cleanUpEvents;
var onTouchMove = function onTouchMove(e) {
if (touchedRef.current) {
var currentX = Math.ceil(e.touches[0].pageX);
var currentY = Math.ceil(e.touches[0].pageY);
var offsetX = touchXRef.current - currentX;
var offsetY = touchYRef.current - currentY;
var _isHorizontal = Math.abs(offsetX) > Math.abs(offsetY);
if (_isHorizontal) {
touchXRef.current = currentX;
} else {
touchYRef.current = currentY;
}
var scrollHandled = callback(_isHorizontal, _isHorizontal ? offsetX : offsetY, false, e);
if (scrollHandled) {
e.preventDefault();
}
// Smooth interval
clearInterval(intervalRef.current);
if (scrollHandled) {
intervalRef.current = setInterval(function () {
if (_isHorizontal) {
offsetX *= SMOOTH_PTG;
} else {
offsetY *= SMOOTH_PTG;
}
var offset = Math.floor(_isHorizontal ? offsetX : offsetY);
if (!callback(_isHorizontal, offset, true) || Math.abs(offset) <= 0.1) {
clearInterval(intervalRef.current);
}
}, 16);
}
}
};
var onTouchEnd = function onTouchEnd() {
touchedRef.current = false;
cleanUpEvents();
};
var onTouchStart = function onTouchStart(e) {
cleanUpEvents();
if (e.touches.length === 1 && !touchedRef.current) {
touchedRef.current = true;
touchXRef.current = Math.ceil(e.touches[0].pageX);
touchYRef.current = Math.ceil(e.touches[0].pageY);
elementRef.current = e.target;
elementRef.current.addEventListener('touchmove', onTouchMove, {
passive: false
});
elementRef.current.addEventListener('touchend', onTouchEnd, {
passive: true
});
}
};
cleanUpEvents = function cleanUpEvents() {
if (elementRef.current) {
elementRef.current.removeEventListener('touchmove', onTouchMove);
elementRef.current.removeEventListener('touchend', onTouchEnd);
}
};
(0,useLayoutEffect["default"])(function () {
if (inVirtual) {
listRef.current.addEventListener('touchstart', onTouchStart, {
passive: true
});
}
return function () {
var _listRef$current;
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.removeEventListener('touchstart', onTouchStart);
cleanUpEvents();
clearInterval(intervalRef.current);
};
}, [inVirtual]);
}
;// ./node_modules/rc-virtual-list/es/hooks/useScrollDrag.js
function smoothScrollOffset(offset) {
return Math.floor(Math.pow(offset, 0.5));
}
function getPageXY(e, horizontal) {
var obj = 'touches' in e ? e.touches[0] : e;
return obj[horizontal ? 'pageX' : 'pageY'] - window[horizontal ? 'scrollX' : 'scrollY'];
}
function useScrollDrag(inVirtual, componentRef, onScrollOffset) {
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var ele = componentRef.current;
if (inVirtual && ele) {
var mouseDownLock = false;
var rafId;
var _offset;
var stopScroll = function stopScroll() {
raf["default"].cancel(rafId);
};
var continueScroll = function continueScroll() {
stopScroll();
rafId = (0,raf["default"])(function () {
onScrollOffset(_offset);
continueScroll();
});
};
var onMouseDown = function onMouseDown(e) {
// Skip if element set draggable
if (e.target.draggable) {
return;
}
// Skip if nest List has handled this event
var event = e;
if (!event._virtualHandled) {
event._virtualHandled = true;
mouseDownLock = true;
}
};
var onMouseUp = function onMouseUp() {
mouseDownLock = false;
stopScroll();
};
var onMouseMove = function onMouseMove(e) {
if (mouseDownLock) {
var mouseY = getPageXY(e, false);
var _ele$getBoundingClien = ele.getBoundingClientRect(),
top = _ele$getBoundingClien.top,
bottom = _ele$getBoundingClien.bottom;
if (mouseY <= top) {
var diff = top - mouseY;
_offset = -smoothScrollOffset(diff);
continueScroll();
} else if (mouseY >= bottom) {
var _diff = mouseY - bottom;
_offset = smoothScrollOffset(_diff);
continueScroll();
} else {
stopScroll();
}
}
};
ele.addEventListener('mousedown', onMouseDown);
ele.ownerDocument.addEventListener('mouseup', onMouseUp);
ele.ownerDocument.addEventListener('mousemove', onMouseMove);
return function () {
ele.removeEventListener('mousedown', onMouseDown);
ele.ownerDocument.removeEventListener('mouseup', onMouseUp);
ele.ownerDocument.removeEventListener('mousemove', onMouseMove);
stopScroll();
};
}
}, [inVirtual]);
}
;// ./node_modules/rc-virtual-list/es/hooks/useScrollTo.js
/* eslint-disable no-param-reassign */
var MAX_TIMES = 10;
function useScrollTo(containerRef, data, heights, itemHeight, getKey, collectHeight, syncScrollTop, triggerFlash) {
var scrollRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
syncState = _React$useState2[0],
setSyncState = _React$useState2[1];
// ========================== Sync Scroll ==========================
(0,useLayoutEffect["default"])(function () {
if (syncState && syncState.times < MAX_TIMES) {
// Never reach
if (!containerRef.current) {
setSyncState(function (ori) {
return (0,objectSpread2["default"])({}, ori);
});
return;
}
collectHeight();
var targetAlign = syncState.targetAlign,
originAlign = syncState.originAlign,
index = syncState.index,
offset = syncState.offset;
var height = containerRef.current.clientHeight;
var needCollectHeight = false;
var newTargetAlign = targetAlign;
var targetTop = null;
// Go to next frame if height not exist
if (height) {
var mergedAlign = targetAlign || originAlign;
// Get top & bottom
var stackTop = 0;
var itemTop = 0;
var itemBottom = 0;
var maxLen = Math.min(data.length - 1, index);
for (var i = 0; i <= maxLen; i += 1) {
var key = getKey(data[i]);
itemTop = stackTop;
var cacheHeight = heights.get(key);
itemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight);
stackTop = itemBottom;
}
// Check if need sync height (visible range has item not record height)
var leftHeight = mergedAlign === 'top' ? offset : height - offset;
for (var _i = maxLen; _i >= 0; _i -= 1) {
var _key = getKey(data[_i]);
var _cacheHeight = heights.get(_key);
if (_cacheHeight === undefined) {
needCollectHeight = true;
break;
}
leftHeight -= _cacheHeight;
if (leftHeight <= 0) {
break;
}
}
// Scroll to
switch (mergedAlign) {
case 'top':
targetTop = itemTop - offset;
break;
case 'bottom':
targetTop = itemBottom - height + offset;
break;
default:
{
var scrollTop = containerRef.current.scrollTop;
var scrollBottom = scrollTop + height;
if (itemTop < scrollTop) {
newTargetAlign = 'top';
} else if (itemBottom > scrollBottom) {
newTargetAlign = 'bottom';
}
}
}
if (targetTop !== null) {
syncScrollTop(targetTop);
}
// One more time for sync
if (targetTop !== syncState.lastTop) {
needCollectHeight = true;
}
}
// Trigger next effect
if (needCollectHeight) {
setSyncState((0,objectSpread2["default"])((0,objectSpread2["default"])({}, syncState), {}, {
times: syncState.times + 1,
targetAlign: newTargetAlign,
lastTop: targetTop
}));
}
} else if ( true && (syncState === null || syncState === void 0 ? void 0 : syncState.times) === MAX_TIMES) {
(0,rc_util_es.warning)(false, 'Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.');
}
}, [syncState, containerRef.current]);
// =========================== Scroll To ===========================
return function (arg) {
// When not argument provided, we think dev may want to show the scrollbar
if (arg === null || arg === undefined) {
triggerFlash();
return;
}
// Normal scroll logic
raf["default"].cancel(scrollRef.current);
if (typeof arg === 'number') {
syncScrollTop(arg);
} else if (arg && (0,esm_typeof["default"])(arg) === 'object') {
var index;
var align = arg.align;
if ('index' in arg) {
index = arg.index;
} else {
index = data.findIndex(function (item) {
return getKey(item) === arg.key;
});
}
var _arg$offset = arg.offset,
offset = _arg$offset === void 0 ? 0 : _arg$offset;
setSyncState({
times: 0,
index: index,
offset: offset,
originAlign: align
});
}
};
}
;// ./node_modules/rc-virtual-list/es/ScrollBar.js
var ScrollBar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
rtl = props.rtl,
scrollOffset = props.scrollOffset,
scrollRange = props.scrollRange,
onStartMove = props.onStartMove,
onStopMove = props.onStopMove,
onScroll = props.onScroll,
horizontal = props.horizontal,
spinSize = props.spinSize,
containerSize = props.containerSize,
style = props.style,
propsThumbStyle = props.thumbStyle,
showScrollBar = props.showScrollBar;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
dragging = _React$useState2[0],
setDragging = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
pageXY = _React$useState4[0],
setPageXY = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
startTop = _React$useState6[0],
setStartTop = _React$useState6[1];
var isLTR = !rtl;
// ========================= Refs =========================
var scrollbarRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var thumbRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
// ======================= Visible ========================
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(showScrollBar),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
visible = _React$useState8[0],
setVisible = _React$useState8[1];
var visibleTimeoutRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var delayHidden = function delayHidden() {
if (showScrollBar === true || showScrollBar === false) return;
clearTimeout(visibleTimeoutRef.current);
setVisible(true);
visibleTimeoutRef.current = setTimeout(function () {
setVisible(false);
}, 3000);
};
// ======================== Range =========================
var enableScrollRange = scrollRange - containerSize || 0;
var enableOffsetRange = containerSize - spinSize || 0;
// ========================= Top ==========================
var top = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (scrollOffset === 0 || enableScrollRange === 0) {
return 0;
}
var ptg = scrollOffset / enableScrollRange;
return ptg * enableOffsetRange;
}, [scrollOffset, enableScrollRange, enableOffsetRange]);
// ====================== Container =======================
var onContainerMouseDown = function onContainerMouseDown(e) {
e.stopPropagation();
e.preventDefault();
};
// ======================== Thumb =========================
var stateRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
top: top,
dragging: dragging,
pageY: pageXY,
startTop: startTop
});
stateRef.current = {
top: top,
dragging: dragging,
pageY: pageXY,
startTop: startTop
};
var onThumbMouseDown = function onThumbMouseDown(e) {
setDragging(true);
setPageXY(getPageXY(e, horizontal));
setStartTop(stateRef.current.top);
onStartMove();
e.stopPropagation();
e.preventDefault();
};
// ======================== Effect ========================
// React make event as passive, but we need to preventDefault
// Add event on dom directly instead.
// ref: https://github.com/facebook/react/issues/9809
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var onScrollbarTouchStart = function onScrollbarTouchStart(e) {
e.preventDefault();
};
var scrollbarEle = scrollbarRef.current;
var thumbEle = thumbRef.current;
scrollbarEle.addEventListener('touchstart', onScrollbarTouchStart, {
passive: false
});
thumbEle.addEventListener('touchstart', onThumbMouseDown, {
passive: false
});
return function () {
scrollbarEle.removeEventListener('touchstart', onScrollbarTouchStart);
thumbEle.removeEventListener('touchstart', onThumbMouseDown);
};
}, []);
// Pass to effect
var enableScrollRangeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
enableScrollRangeRef.current = enableScrollRange;
var enableOffsetRangeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
enableOffsetRangeRef.current = enableOffsetRange;
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (dragging) {
var moveRafId;
var onMouseMove = function onMouseMove(e) {
var _stateRef$current = stateRef.current,
stateDragging = _stateRef$current.dragging,
statePageY = _stateRef$current.pageY,
stateStartTop = _stateRef$current.startTop;
raf["default"].cancel(moveRafId);
var rect = scrollbarRef.current.getBoundingClientRect();
var scale = containerSize / (horizontal ? rect.width : rect.height);
if (stateDragging) {
var offset = (getPageXY(e, horizontal) - statePageY) * scale;
var newTop = stateStartTop;
if (!isLTR && horizontal) {
newTop -= offset;
} else {
newTop += offset;
}
var tmpEnableScrollRange = enableScrollRangeRef.current;
var tmpEnableOffsetRange = enableOffsetRangeRef.current;
var ptg = tmpEnableOffsetRange ? newTop / tmpEnableOffsetRange : 0;
var newScrollTop = Math.ceil(ptg * tmpEnableScrollRange);
newScrollTop = Math.max(newScrollTop, 0);
newScrollTop = Math.min(newScrollTop, tmpEnableScrollRange);
moveRafId = (0,raf["default"])(function () {
onScroll(newScrollTop, horizontal);
});
}
};
var onMouseUp = function onMouseUp() {
setDragging(false);
onStopMove();
};
window.addEventListener('mousemove', onMouseMove, {
passive: true
});
window.addEventListener('touchmove', onMouseMove, {
passive: true
});
window.addEventListener('mouseup', onMouseUp, {
passive: true
});
window.addEventListener('touchend', onMouseUp, {
passive: true
});
return function () {
window.removeEventListener('mousemove', onMouseMove);
window.removeEventListener('touchmove', onMouseMove);
window.removeEventListener('mouseup', onMouseUp);
window.removeEventListener('touchend', onMouseUp);
raf["default"].cancel(moveRafId);
};
}
}, [dragging]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
delayHidden();
return function () {
clearTimeout(visibleTimeoutRef.current);
};
}, [scrollOffset]);
// ====================== Imperative ======================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
delayHidden: delayHidden
};
});
// ======================== Render ========================
var scrollbarPrefixCls = "".concat(prefixCls, "-scrollbar");
var containerStyle = {
position: 'absolute',
visibility: visible ? null : 'hidden'
};
var thumbStyle = {
position: 'absolute',
background: 'rgba(0, 0, 0, 0.5)',
borderRadius: 99,
cursor: 'pointer',
userSelect: 'none'
};
if (horizontal) {
// Container
containerStyle.height = 8;
containerStyle.left = 0;
containerStyle.right = 0;
containerStyle.bottom = 0;
// Thumb
thumbStyle.height = '100%';
thumbStyle.width = spinSize;
if (isLTR) {
thumbStyle.left = top;
} else {
thumbStyle.right = top;
}
} else {
// Container
containerStyle.width = 8;
containerStyle.top = 0;
containerStyle.bottom = 0;
if (isLTR) {
containerStyle.right = 0;
} else {
containerStyle.left = 0;
}
// Thumb
thumbStyle.width = '100%';
thumbStyle.height = spinSize;
thumbStyle.top = top;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: scrollbarRef,
className: classnames_default()(scrollbarPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(scrollbarPrefixCls, "-horizontal"), horizontal), "".concat(scrollbarPrefixCls, "-vertical"), !horizontal), "".concat(scrollbarPrefixCls, "-visible"), visible)),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, containerStyle), style),
onMouseDown: onContainerMouseDown,
onMouseMove: delayHidden
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: thumbRef,
className: classnames_default()("".concat(scrollbarPrefixCls, "-thumb"), (0,defineProperty["default"])({}, "".concat(scrollbarPrefixCls, "-thumb-moving"), dragging)),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, thumbStyle), propsThumbStyle),
onMouseDown: onThumbMouseDown
}));
});
if (true) {
ScrollBar.displayName = 'ScrollBar';
}
/* harmony default export */ var es_ScrollBar = (ScrollBar);
;// ./node_modules/rc-virtual-list/es/utils/scrollbarUtil.js
var MIN_SIZE = 20;
function getSpinSize() {
var containerSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var scrollRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var baseSize = containerSize / scrollRange * containerSize;
if (isNaN(baseSize)) {
baseSize = 0;
}
baseSize = Math.max(baseSize, MIN_SIZE);
return Math.floor(baseSize);
}
;// ./node_modules/rc-virtual-list/es/List.js
var List_excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"];
var EMPTY_DATA = [];
var ScrollStyle = {
overflowY: 'auto',
overflowAnchor: 'none'
};
function RawList(props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-virtual-list' : _props$prefixCls,
className = props.className,
height = props.height,
itemHeight = props.itemHeight,
_props$fullHeight = props.fullHeight,
fullHeight = _props$fullHeight === void 0 ? true : _props$fullHeight,
style = props.style,
data = props.data,
children = props.children,
itemKey = props.itemKey,
virtual = props.virtual,
direction = props.direction,
scrollWidth = props.scrollWidth,
_props$component = props.component,
Component = _props$component === void 0 ? 'div' : _props$component,
onScroll = props.onScroll,
onVirtualScroll = props.onVirtualScroll,
onVisibleChange = props.onVisibleChange,
innerProps = props.innerProps,
extraRender = props.extraRender,
styles = props.styles,
_props$showScrollBar = props.showScrollBar,
showScrollBar = _props$showScrollBar === void 0 ? 'optional' : _props$showScrollBar,
restProps = (0,objectWithoutProperties["default"])(props, List_excluded);
// =============================== Item Key ===============================
var getKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (item) {
if (typeof itemKey === 'function') {
return itemKey(item);
}
return item === null || item === void 0 ? void 0 : item[itemKey];
}, [itemKey]);
// ================================ Height ================================
var _useHeights = useHeights(getKey, null, null),
_useHeights2 = (0,slicedToArray["default"])(_useHeights, 4),
setInstanceRef = _useHeights2[0],
collectHeight = _useHeights2[1],
heights = _useHeights2[2],
heightUpdatedMark = _useHeights2[3];
// ================================= MISC =================================
var useVirtual = !!(virtual !== false && height && itemHeight);
var containerHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return Object.values(heights.maps).reduce(function (total, curr) {
return total + curr;
}, 0);
}, [heights.id, heights.maps]);
var inVirtual = useVirtual && data && (Math.max(itemHeight * data.length, containerHeight) > height || !!scrollWidth);
var isRTL = direction === 'rtl';
var mergedClassName = classnames_default()(prefixCls, (0,defineProperty["default"])({}, "".concat(prefixCls, "-rtl"), isRTL), className);
var mergedData = data || EMPTY_DATA;
var componentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var fillerInnerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
// =============================== Item Key ===============================
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
offsetTop = _useState2[0],
setOffsetTop = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
offsetLeft = _useState4[0],
setOffsetLeft = _useState4[1];
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState6 = (0,slicedToArray["default"])(_useState5, 2),
scrollMoving = _useState6[0],
setScrollMoving = _useState6[1];
var onScrollbarStartMove = function onScrollbarStartMove() {
setScrollMoving(true);
};
var onScrollbarStopMove = function onScrollbarStopMove() {
setScrollMoving(false);
};
var sharedConfig = {
getKey: getKey
};
// ================================ Scroll ================================
function syncScrollTop(newTop) {
setOffsetTop(function (origin) {
var value;
if (typeof newTop === 'function') {
value = newTop(origin);
} else {
value = newTop;
}
var alignedTop = keepInRange(value);
componentRef.current.scrollTop = alignedTop;
return alignedTop;
});
}
// ================================ Legacy ================================
// Put ref here since the range is generate by follow
var rangeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
start: 0,
end: mergedData.length
});
var diffItemRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var _useDiffItem = useDiffItem(mergedData, getKey),
_useDiffItem2 = (0,slicedToArray["default"])(_useDiffItem, 1),
diffItem = _useDiffItem2[0];
diffItemRef.current = diffItem;
// ========================== Visible Calculation =========================
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!useVirtual) {
return {
scrollHeight: undefined,
start: 0,
end: mergedData.length - 1,
offset: undefined
};
}
// Always use virtual scroll bar in avoid shaking
if (!inVirtual) {
var _fillerInnerRef$curre;
return {
scrollHeight: ((_fillerInnerRef$curre = fillerInnerRef.current) === null || _fillerInnerRef$curre === void 0 ? void 0 : _fillerInnerRef$curre.offsetHeight) || 0,
start: 0,
end: mergedData.length - 1,
offset: undefined
};
}
var itemTop = 0;
var startIndex;
var startOffset;
var endIndex;
var dataLen = mergedData.length;
for (var i = 0; i < dataLen; i += 1) {
var _item = mergedData[i];
var key = getKey(_item);
var cacheHeight = heights.get(key);
var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight);
// Check item top in the range
if (currentItemBottom >= offsetTop && startIndex === undefined) {
startIndex = i;
startOffset = itemTop;
}
// Check item bottom in the range. We will render additional one item for motion usage
if (currentItemBottom > offsetTop + height && endIndex === undefined) {
endIndex = i;
}
itemTop = currentItemBottom;
}
// When scrollTop at the end but data cut to small count will reach this
if (startIndex === undefined) {
startIndex = 0;
startOffset = 0;
endIndex = Math.ceil(height / itemHeight);
}
if (endIndex === undefined) {
endIndex = mergedData.length - 1;
}
// Give cache to improve scroll experience
endIndex = Math.min(endIndex + 1, mergedData.length - 1);
return {
scrollHeight: itemTop,
start: startIndex,
end: endIndex,
offset: startOffset
};
}, [inVirtual, useVirtual, offsetTop, mergedData, heightUpdatedMark, height]),
scrollHeight = _React$useMemo.scrollHeight,
start = _React$useMemo.start,
end = _React$useMemo.end,
fillerOffset = _React$useMemo.offset;
rangeRef.current.start = start;
rangeRef.current.end = end;
// When scroll up, first visible item get real height may not same as `itemHeight`,
// Which will make scroll jump.
// Let's sync scroll top to avoid jump
external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect(function () {
var changedRecord = heights.getRecord();
if (changedRecord.size === 1) {
var recordKey = Array.from(changedRecord)[0];
// Quick switch data may cause `start` not in `mergedData` anymore
var startItem = mergedData[start];
if (startItem) {
var startIndexKey = getKey(startItem);
if (startIndexKey === recordKey) {
var realStartHeight = heights.get(recordKey);
var diffHeight = realStartHeight - itemHeight;
syncScrollTop(function (ori) {
return ori + diffHeight;
});
}
}
}
heights.resetRecord();
}, [scrollHeight]);
// ================================= Size =================================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({
width: 0,
height: height
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
size = _React$useState2[0],
setSize = _React$useState2[1];
var onHolderResize = function onHolderResize(sizeInfo) {
setSize({
width: sizeInfo.offsetWidth,
height: sizeInfo.offsetHeight
});
};
// Hack on scrollbar to enable flash call
var verticalScrollBarRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var horizontalScrollBarRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var horizontalScrollBarSpinSize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getSpinSize(size.width, scrollWidth);
}, [size.width, scrollWidth]);
var verticalScrollBarSpinSize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getSpinSize(size.height, scrollHeight);
}, [size.height, scrollHeight]);
// =============================== In Range ===============================
var maxScrollHeight = scrollHeight - height;
var maxScrollHeightRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(maxScrollHeight);
maxScrollHeightRef.current = maxScrollHeight;
function keepInRange(newScrollTop) {
var newTop = newScrollTop;
if (!Number.isNaN(maxScrollHeightRef.current)) {
newTop = Math.min(newTop, maxScrollHeightRef.current);
}
newTop = Math.max(newTop, 0);
return newTop;
}
var isScrollAtTop = offsetTop <= 0;
var isScrollAtBottom = offsetTop >= maxScrollHeight;
var isScrollAtLeft = offsetLeft <= 0;
var isScrollAtRight = offsetLeft >= scrollWidth;
var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
// ================================ Scroll ================================
var getVirtualScrollInfo = function getVirtualScrollInfo() {
return {
x: isRTL ? -offsetLeft : offsetLeft,
y: offsetTop
};
};
var lastVirtualScrollInfoRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(getVirtualScrollInfo());
var triggerScroll = (0,rc_util_es.useEvent)(function (params) {
if (onVirtualScroll) {
var nextInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getVirtualScrollInfo()), params);
// Trigger when offset changed
if (lastVirtualScrollInfoRef.current.x !== nextInfo.x || lastVirtualScrollInfoRef.current.y !== nextInfo.y) {
onVirtualScroll(nextInfo);
lastVirtualScrollInfoRef.current = nextInfo;
}
}
});
function onScrollBar(newScrollOffset, horizontal) {
var newOffset = newScrollOffset;
if (horizontal) {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(function () {
setOffsetLeft(newOffset);
});
triggerScroll();
} else {
syncScrollTop(newOffset);
}
}
// When data size reduce. It may trigger native scroll event back to fit scroll position
function onFallbackScroll(e) {
var newScrollTop = e.currentTarget.scrollTop;
if (newScrollTop !== offsetTop) {
syncScrollTop(newScrollTop);
}
// Trigger origin onScroll
onScroll === null || onScroll === void 0 || onScroll(e);
triggerScroll();
}
var keepInHorizontalRange = function keepInHorizontalRange(nextOffsetLeft) {
var tmpOffsetLeft = nextOffsetLeft;
var max = !!scrollWidth ? scrollWidth - size.width : 0;
tmpOffsetLeft = Math.max(tmpOffsetLeft, 0);
tmpOffsetLeft = Math.min(tmpOffsetLeft, max);
return tmpOffsetLeft;
};
var onWheelDelta = (0,rc_util_es.useEvent)(function (offsetXY, fromHorizontal) {
if (fromHorizontal) {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(function () {
setOffsetLeft(function (left) {
var nextOffsetLeft = left + (isRTL ? -offsetXY : offsetXY);
return keepInHorizontalRange(nextOffsetLeft);
});
});
triggerScroll();
} else {
syncScrollTop(function (top) {
var newTop = top + offsetXY;
return newTop;
});
}
});
// Since this added in global,should use ref to keep update
var _useFrameWheel = useFrameWheel(useVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, !!scrollWidth, onWheelDelta),
_useFrameWheel2 = (0,slicedToArray["default"])(_useFrameWheel, 2),
onRawWheel = _useFrameWheel2[0],
onFireFoxScroll = _useFrameWheel2[1];
// Mobile touch move
useMobileTouchMove(useVirtual, componentRef, function (isHorizontal, delta, smoothOffset, e) {
var event = e;
if (originScroll(isHorizontal, delta, smoothOffset)) {
return false;
}
// Fix nest List trigger TouchMove event
if (!event || !event._virtualHandled) {
if (event) {
event._virtualHandled = true;
}
onRawWheel({
preventDefault: function preventDefault() {},
deltaX: isHorizontal ? delta : 0,
deltaY: isHorizontal ? 0 : delta
});
return true;
}
return false;
});
// MouseDown drag for scroll
useScrollDrag(inVirtual, componentRef, function (offset) {
syncScrollTop(function (top) {
return top + offset;
});
});
(0,useLayoutEffect["default"])(function () {
// Firefox only
function onMozMousePixelScroll(e) {
// scrolling at top/bottom limit
var scrollingUpAtTop = isScrollAtTop && e.detail < 0;
var scrollingDownAtBottom = isScrollAtBottom && e.detail > 0;
if (useVirtual && !scrollingUpAtTop && !scrollingDownAtBottom) {
e.preventDefault();
}
}
var componentEle = componentRef.current;
componentEle.addEventListener('wheel', onRawWheel, {
passive: false
});
componentEle.addEventListener('DOMMouseScroll', onFireFoxScroll, {
passive: true
});
componentEle.addEventListener('MozMousePixelScroll', onMozMousePixelScroll, {
passive: false
});
return function () {
componentEle.removeEventListener('wheel', onRawWheel);
componentEle.removeEventListener('DOMMouseScroll', onFireFoxScroll);
componentEle.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll);
};
}, [useVirtual, isScrollAtTop, isScrollAtBottom]);
// Sync scroll left
(0,useLayoutEffect["default"])(function () {
if (scrollWidth) {
var newOffsetLeft = keepInHorizontalRange(offsetLeft);
setOffsetLeft(newOffsetLeft);
triggerScroll({
x: newOffsetLeft
});
}
}, [size.width, scrollWidth]);
// ================================= Ref ==================================
var delayHideScrollBar = function delayHideScrollBar() {
var _verticalScrollBarRef, _horizontalScrollBarR;
(_verticalScrollBarRef = verticalScrollBarRef.current) === null || _verticalScrollBarRef === void 0 || _verticalScrollBarRef.delayHidden();
(_horizontalScrollBarR = horizontalScrollBarRef.current) === null || _horizontalScrollBarR === void 0 || _horizontalScrollBarR.delayHidden();
};
var _scrollTo = useScrollTo(componentRef, mergedData, heights, itemHeight, getKey, function () {
return collectHeight(true);
}, syncScrollTop, delayHideScrollBar);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: containerRef.current,
getScrollInfo: getVirtualScrollInfo,
scrollTo: function scrollTo(config) {
function isPosScroll(arg) {
return arg && (0,esm_typeof["default"])(arg) === 'object' && ('left' in arg || 'top' in arg);
}
if (isPosScroll(config)) {
// Scroll X
if (config.left !== undefined) {
setOffsetLeft(keepInHorizontalRange(config.left));
}
// Scroll Y
_scrollTo(config.top);
} else {
_scrollTo(config);
}
}
};
});
// ================================ Effect ================================
/** We need told outside that some list not rendered */
(0,useLayoutEffect["default"])(function () {
if (onVisibleChange) {
var renderList = mergedData.slice(start, end + 1);
onVisibleChange(renderList, mergedData);
}
}, [start, end, mergedData]);
// ================================ Extra =================================
var getSize = useGetSize(mergedData, getKey, heights, itemHeight);
var extraContent = extraRender === null || extraRender === void 0 ? void 0 : extraRender({
start: start,
end: end,
virtual: inVirtual,
offsetX: offsetLeft,
offsetY: fillerOffset,
rtl: isRTL,
getSize: getSize
});
// ================================ Render ================================
var listChildren = useChildren(mergedData, start, end, scrollWidth, offsetLeft, setInstanceRef, children, sharedConfig);
var componentStyle = null;
if (height) {
componentStyle = (0,objectSpread2["default"])((0,defineProperty["default"])({}, fullHeight ? 'height' : 'maxHeight', height), ScrollStyle);
if (useVirtual) {
componentStyle.overflowY = 'hidden';
if (scrollWidth) {
componentStyle.overflowX = 'hidden';
}
if (scrollMoving) {
componentStyle.pointerEvents = 'none';
}
}
}
var containerProps = {};
if (isRTL) {
containerProps.dir = 'rtl';
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
ref: containerRef,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
position: 'relative'
}),
className: mergedClassName
}, containerProps, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onHolderResize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
className: "".concat(prefixCls, "-holder"),
style: componentStyle,
ref: componentRef,
onScroll: onFallbackScroll,
onMouseEnter: delayHideScrollBar
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Filler, {
prefixCls: prefixCls,
height: scrollHeight,
offsetX: offsetLeft,
offsetY: fillerOffset,
scrollWidth: scrollWidth,
onInnerResize: collectHeight,
ref: fillerInnerRef,
innerProps: innerProps,
rtl: isRTL,
extra: extraContent
}, listChildren))), inVirtual && scrollHeight > height && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ScrollBar, {
ref: verticalScrollBarRef,
prefixCls: prefixCls,
scrollOffset: offsetTop,
scrollRange: scrollHeight,
rtl: isRTL,
onScroll: onScrollBar,
onStartMove: onScrollbarStartMove,
onStopMove: onScrollbarStopMove,
spinSize: verticalScrollBarSpinSize,
containerSize: size.height,
style: styles === null || styles === void 0 ? void 0 : styles.verticalScrollBar,
thumbStyle: styles === null || styles === void 0 ? void 0 : styles.verticalScrollBarThumb,
showScrollBar: showScrollBar
}), inVirtual && scrollWidth > size.width && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ScrollBar, {
ref: horizontalScrollBarRef,
prefixCls: prefixCls,
scrollOffset: offsetLeft,
scrollRange: scrollWidth,
rtl: isRTL,
onScroll: onScrollBar,
onStartMove: onScrollbarStartMove,
onStopMove: onScrollbarStopMove,
spinSize: horizontalScrollBarSpinSize,
containerSize: size.width,
horizontal: true,
style: styles === null || styles === void 0 ? void 0 : styles.horizontalScrollBar,
thumbStyle: styles === null || styles === void 0 ? void 0 : styles.horizontalScrollBarThumb,
showScrollBar: showScrollBar
}));
}
var List_List = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RawList);
List_List.displayName = 'List';
/* harmony default export */ var rc_virtual_list_es_List = (List_List);
;// ./node_modules/rc-virtual-list/es/index.js
/* harmony default export */ var rc_virtual_list_es = (rc_virtual_list_es_List);
;// ./node_modules/rc-select/es/utils/platformUtil.js
/* istanbul ignore file */
function isPlatformMac() {
return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
;// ./node_modules/rc-select/es/OptionList.js
var OptionList_excluded = ["disabled", "title", "children", "style", "className"];
// export interface OptionListProps<OptionsType extends object[]> {
function OptionList_isTitleType(content) {
return typeof content === 'string' || typeof content === 'number';
}
/**
* Using virtual list of option display.
* Will fallback to dom if use customize render.
*/
var OptionList = function OptionList(_, ref) {
var _useBaseProps = useBaseProps(),
prefixCls = _useBaseProps.prefixCls,
id = _useBaseProps.id,
open = _useBaseProps.open,
multiple = _useBaseProps.multiple,
mode = _useBaseProps.mode,
searchValue = _useBaseProps.searchValue,
toggleOpen = _useBaseProps.toggleOpen,
notFoundContent = _useBaseProps.notFoundContent,
onPopupScroll = _useBaseProps.onPopupScroll;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_SelectContext),
maxCount = _React$useContext.maxCount,
flattenOptions = _React$useContext.flattenOptions,
onActiveValue = _React$useContext.onActiveValue,
defaultActiveFirstOption = _React$useContext.defaultActiveFirstOption,
onSelect = _React$useContext.onSelect,
menuItemSelectedIcon = _React$useContext.menuItemSelectedIcon,
rawValues = _React$useContext.rawValues,
fieldNames = _React$useContext.fieldNames,
virtual = _React$useContext.virtual,
direction = _React$useContext.direction,
listHeight = _React$useContext.listHeight,
listItemHeight = _React$useContext.listItemHeight,
optionRender = _React$useContext.optionRender;
var itemPrefixCls = "".concat(prefixCls, "-item");
var memoFlattenOptions = (0,useMemo["default"])(function () {
return flattenOptions;
}, [open, flattenOptions], function (prev, next) {
return next[0] && prev[1] !== next[1];
});
// =========================== List ===========================
var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var overMaxCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return multiple && isValidCount(maxCount) && (rawValues === null || rawValues === void 0 ? void 0 : rawValues.size) >= maxCount;
}, [multiple, maxCount, rawValues === null || rawValues === void 0 ? void 0 : rawValues.size]);
var onListMouseDown = function onListMouseDown(event) {
event.preventDefault();
};
var scrollIntoView = function scrollIntoView(args) {
var _listRef$current;
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollTo(typeof args === 'number' ? {
index: args
} : args);
};
// https://github.com/ant-design/ant-design/issues/34975
var isSelected = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (value) {
if (mode === 'combobox') {
return false;
}
return rawValues.has(value);
}, [mode, (0,toConsumableArray["default"])(rawValues).toString(), rawValues.size]);
// ========================== Active ==========================
var getEnabledActiveIndex = function getEnabledActiveIndex(index) {
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var len = memoFlattenOptions.length;
for (var i = 0; i < len; i += 1) {
var current = (index + i * offset + len) % len;
var _ref = memoFlattenOptions[current] || {},
group = _ref.group,
data = _ref.data;
if (!group && !(data !== null && data !== void 0 && data.disabled) && (isSelected(data.value) || !overMaxCount)) {
return current;
}
}
return -1;
};
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
return getEnabledActiveIndex(0);
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
activeIndex = _React$useState2[0],
setActiveIndex = _React$useState2[1];
var setActive = function setActive(index) {
var fromKeyboard = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
setActiveIndex(index);
var info = {
source: fromKeyboard ? 'keyboard' : 'mouse'
};
// Trigger active event
var flattenItem = memoFlattenOptions[index];
if (!flattenItem) {
onActiveValue(null, -1, info);
return;
}
onActiveValue(flattenItem.value, index, info);
};
// Auto active first item when list length or searchValue changed
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
setActive(defaultActiveFirstOption !== false ? getEnabledActiveIndex(0) : -1);
}, [memoFlattenOptions.length, searchValue]);
// https://github.com/ant-design/ant-design/issues/48036
var isAriaSelected = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (value) {
if (mode === 'combobox') {
return String(value).toLowerCase() === searchValue.toLowerCase();
}
return rawValues.has(value);
}, [mode, searchValue, (0,toConsumableArray["default"])(rawValues).toString(), rawValues.size]);
// Auto scroll to item position in single mode
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
/**
* React will skip `onChange` when component update.
* `setActive` function will call root accessibility state update which makes re-render.
* So we need to delay to let Input component trigger onChange first.
*/
var timeoutId = setTimeout(function () {
if (!multiple && open && rawValues.size === 1) {
var value = Array.from(rawValues)[0];
var index = memoFlattenOptions.findIndex(function (_ref2) {
var data = _ref2.data;
return data.value === value;
});
if (index !== -1) {
setActive(index);
scrollIntoView(index);
}
}
});
// Force trigger scrollbar visible when open
if (open) {
var _listRef$current2;
(_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 || _listRef$current2.scrollTo(undefined);
}
return function () {
return clearTimeout(timeoutId);
};
}, [open, searchValue]);
// ========================== Values ==========================
var onSelectValue = function onSelectValue(value) {
if (value !== undefined) {
onSelect(value, {
selected: !rawValues.has(value)
});
}
// Single mode should always close by select
if (!multiple) {
toggleOpen(false);
}
};
// ========================= Keyboard =========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
onKeyDown: function onKeyDown(event) {
var which = event.which,
ctrlKey = event.ctrlKey;
switch (which) {
// >>> Arrow keys & ctrl + n/p on Mac
case KeyCode["default"].N:
case KeyCode["default"].P:
case KeyCode["default"].UP:
case KeyCode["default"].DOWN:
{
var offset = 0;
if (which === KeyCode["default"].UP) {
offset = -1;
} else if (which === KeyCode["default"].DOWN) {
offset = 1;
} else if (isPlatformMac() && ctrlKey) {
if (which === KeyCode["default"].N) {
offset = 1;
} else if (which === KeyCode["default"].P) {
offset = -1;
}
}
if (offset !== 0) {
var nextActiveIndex = getEnabledActiveIndex(activeIndex + offset, offset);
scrollIntoView(nextActiveIndex);
setActive(nextActiveIndex, true);
}
break;
}
// >>> Select (Tab / Enter)
case KeyCode["default"].TAB:
case KeyCode["default"].ENTER:
{
var _item$data;
// value
var item = memoFlattenOptions[activeIndex];
if (item && !(item !== null && item !== void 0 && (_item$data = item.data) !== null && _item$data !== void 0 && _item$data.disabled) && !overMaxCount) {
onSelectValue(item.value);
} else {
onSelectValue(undefined);
}
if (open) {
event.preventDefault();
}
break;
}
// >>> Close
case KeyCode["default"].ESC:
{
toggleOpen(false);
if (open) {
event.stopPropagation();
}
}
}
},
onKeyUp: function onKeyUp() {},
scrollTo: function scrollTo(index) {
scrollIntoView(index);
}
};
});
// ========================== Render ==========================
if (memoFlattenOptions.length === 0) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
role: "listbox",
id: "".concat(id, "_list"),
className: "".concat(itemPrefixCls, "-empty"),
onMouseDown: onListMouseDown
}, notFoundContent);
}
var omitFieldNameList = Object.keys(fieldNames).map(function (key) {
return fieldNames[key];
});
var getLabel = function getLabel(item) {
return item.label;
};
function getItemAriaProps(item, index) {
var group = item.group;
return {
role: group ? 'presentation' : 'option',
id: "".concat(id, "_list_").concat(index)
};
}
var renderItem = function renderItem(index) {
var item = memoFlattenOptions[index];
if (!item) {
return null;
}
var itemData = item.data || {};
var value = itemData.value;
var group = item.group;
var attrs = (0,pickAttrs["default"])(itemData, true);
var mergedLabel = getLabel(item);
return item ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
"aria-label": typeof mergedLabel === 'string' && !group ? mergedLabel : null
}, attrs, {
key: index
}, getItemAriaProps(item, index), {
"aria-selected": isAriaSelected(value)
}), value) : null;
};
var a11yProps = {
role: 'listbox',
id: "".concat(id, "_list")
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, virtual && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, a11yProps, {
style: {
height: 0,
width: 0,
overflow: 'hidden'
}
}), renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_virtual_list_es, {
itemKey: "key",
ref: listRef,
data: memoFlattenOptions,
height: listHeight,
itemHeight: listItemHeight,
fullHeight: false,
onMouseDown: onListMouseDown,
onScroll: onPopupScroll,
virtual: virtual,
direction: direction,
innerProps: virtual ? null : a11yProps
}, function (item, itemIndex) {
var group = item.group,
groupOption = item.groupOption,
data = item.data,
label = item.label,
value = item.value;
var key = data.key;
// Group
if (group) {
var _data$title;
var groupTitle = (_data$title = data.title) !== null && _data$title !== void 0 ? _data$title : OptionList_isTitleType(label) ? label.toString() : undefined;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(itemPrefixCls, "".concat(itemPrefixCls, "-group"), data.className),
title: groupTitle
}, label !== undefined ? label : key);
}
var disabled = data.disabled,
title = data.title,
children = data.children,
style = data.style,
className = data.className,
otherProps = (0,objectWithoutProperties["default"])(data, OptionList_excluded);
var passedProps = (0,omit["default"])(otherProps, omitFieldNameList);
// Option
var selected = isSelected(value);
var mergedDisabled = disabled || !selected && overMaxCount;
var optionPrefixCls = "".concat(itemPrefixCls, "-option");
var optionClassName = classnames_default()(itemPrefixCls, optionPrefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(optionPrefixCls, "-grouped"), groupOption), "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !mergedDisabled), "".concat(optionPrefixCls, "-disabled"), mergedDisabled), "".concat(optionPrefixCls, "-selected"), selected));
var mergedLabel = getLabel(item);
var iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
// https://github.com/ant-design/ant-design/issues/34145
var content = typeof mergedLabel === 'number' ? mergedLabel : mergedLabel || value;
// https://github.com/ant-design/ant-design/issues/26717
var optionTitle = OptionList_isTitleType(content) ? content.toString() : undefined;
if (title !== undefined) {
optionTitle = title;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, (0,pickAttrs["default"])(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
"aria-selected": isAriaSelected(value),
className: optionClassName,
title: optionTitle,
onMouseMove: function onMouseMove() {
if (activeIndex === itemIndex || mergedDisabled) {
return;
}
setActive(itemIndex);
},
onClick: function onClick() {
if (!mergedDisabled) {
onSelectValue(value);
}
},
style: style
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(optionPrefixCls, "-content")
}, typeof optionRender === 'function' ? optionRender(item, {
index: itemIndex
}) : content), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(menuItemSelectedIcon) || selected, iconVisible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TransBtn, {
className: "".concat(itemPrefixCls, "-option-state"),
customizeIcon: menuItemSelectedIcon,
customizeIconProps: {
value: value,
disabled: mergedDisabled,
isSelected: selected
}
}, selected ? '✓' : null));
}));
};
var RefOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(OptionList);
if (true) {
RefOptionList.displayName = 'OptionList';
}
/* harmony default export */ var es_OptionList = (RefOptionList);
;// ./node_modules/rc-select/es/hooks/useCache.js
/**
* Cache `value` related LabeledValue & options.
*/
/* harmony default export */ var useCache = (function (labeledValues, valueOptions) {
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
values: new Map(),
options: new Map()
});
var filledLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var _cacheRef$current = cacheRef.current,
prevValueCache = _cacheRef$current.values,
prevOptionCache = _cacheRef$current.options;
// Fill label by cache
var patchedValues = labeledValues.map(function (item) {
if (item.label === undefined) {
var _prevValueCache$get;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
label: (_prevValueCache$get = prevValueCache.get(item.value)) === null || _prevValueCache$get === void 0 ? void 0 : _prevValueCache$get.label
});
}
return item;
});
// Refresh cache
var valueCache = new Map();
var optionCache = new Map();
patchedValues.forEach(function (item) {
valueCache.set(item.value, item);
optionCache.set(item.value, valueOptions.get(item.value) || prevOptionCache.get(item.value));
});
cacheRef.current.values = valueCache;
cacheRef.current.options = optionCache;
return patchedValues;
}, [labeledValues, valueOptions]);
var getOption = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
return valueOptions.get(val) || cacheRef.current.options.get(val);
}, [valueOptions]);
return [filledLabeledValues, getOption];
});
;// ./node_modules/rc-select/es/hooks/useFilterOptions.js
function includes(test, search) {
return commonUtil_toArray(test).join('').toUpperCase().includes(search);
}
/* harmony default export */ var useFilterOptions = (function (options, fieldNames, searchValue, filterOption, optionFilterProp) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!searchValue || filterOption === false) {
return options;
}
var fieldOptions = fieldNames.options,
fieldLabel = fieldNames.label,
fieldValue = fieldNames.value;
var filteredOptions = [];
var customizeFilter = typeof filterOption === 'function';
var upperSearch = searchValue.toUpperCase();
var filterFunc = customizeFilter ? filterOption : function (_, option) {
// Use provided `optionFilterProp`
if (optionFilterProp) {
return includes(option[optionFilterProp], upperSearch);
}
// Auto select `label` or `value` by option type
if (option[fieldOptions]) {
// hack `fieldLabel` since `OptionGroup` children is not `label`
return includes(option[fieldLabel !== 'children' ? fieldLabel : 'label'], upperSearch);
}
return includes(option[fieldValue], upperSearch);
};
var wrapOption = customizeFilter ? function (opt) {
return injectPropsWithOption(opt);
} : function (opt) {
return opt;
};
options.forEach(function (item) {
// Group should check child options
if (item[fieldOptions]) {
// Check group first
var matchGroup = filterFunc(searchValue, wrapOption(item));
if (matchGroup) {
filteredOptions.push(item);
} else {
// Check option
var subOptions = item[fieldOptions].filter(function (subItem) {
return filterFunc(searchValue, wrapOption(subItem));
});
if (subOptions.length) {
filteredOptions.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, (0,defineProperty["default"])({}, fieldOptions, subOptions)));
}
}
return;
}
if (filterFunc(searchValue, wrapOption(item))) {
filteredOptions.push(item);
}
});
return filteredOptions;
}, [options, filterOption, optionFilterProp, searchValue, fieldNames]);
});
;// ./node_modules/rc-select/es/hooks/useId.js
var hooks_useId_uuid = 0;
/** Is client side and not jsdom */
var useId_isBrowserClient = true && (0,canUseDom["default"])();
/** Get unique id for accessibility usage */
function getUUID() {
var retId;
// Test never reach
/* istanbul ignore if */
if (useId_isBrowserClient) {
retId = hooks_useId_uuid;
hooks_useId_uuid += 1;
} else {
retId = 'TEST_OR_SSR';
}
return retId;
}
function useId_useId(id) {
// Inner id for accessibility usage. Only work in client side
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
innerId = _React$useState2[0],
setInnerId = _React$useState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setInnerId("rc_select_".concat(getUUID()));
}, []);
return id || innerId;
}
;// ./node_modules/rc-select/es/utils/legacyUtil.js
var legacyUtil_excluded = ["children", "value"],
legacyUtil_excluded2 = ["children"];
function convertNodeToOption(node) {
var _ref = node,
key = _ref.key,
_ref$props = _ref.props,
children = _ref$props.children,
value = _ref$props.value,
restProps = (0,objectWithoutProperties["default"])(_ref$props, legacyUtil_excluded);
return (0,objectSpread2["default"])({
key: key,
value: value !== undefined ? value : key,
children: children
}, restProps);
}
function convertChildrenToData(nodes) {
var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return (0,toArray["default"])(nodes).map(function (node, index) {
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node) || !node.type) {
return null;
}
var _ref2 = node,
isSelectOptGroup = _ref2.type.isSelectOptGroup,
key = _ref2.key,
_ref2$props = _ref2.props,
children = _ref2$props.children,
restProps = (0,objectWithoutProperties["default"])(_ref2$props, legacyUtil_excluded2);
if (optionOnly || !isSelectOptGroup) {
return convertNodeToOption(node);
}
return (0,objectSpread2["default"])((0,objectSpread2["default"])({
key: "__RC_SELECT_GRP__".concat(key === null ? index : key, "__"),
label: key
}, restProps), {}, {
options: convertChildrenToData(children)
});
}).filter(function (data) {
return data;
});
}
;// ./node_modules/rc-select/es/hooks/useOptions.js
/**
* Parse `children` to `options` if `options` is not provided.
* Then flatten the `options`.
*/
var useOptions = function useOptions(options, children, fieldNames, optionFilterProp, optionLabelProp) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var mergedOptions = options;
var childrenAsData = !options;
if (childrenAsData) {
mergedOptions = convertChildrenToData(children);
}
var valueOptions = new Map();
var labelOptions = new Map();
var setLabelOptions = function setLabelOptions(labelOptionsMap, option, key) {
if (key && typeof key === 'string') {
labelOptionsMap.set(option[key], option);
}
};
var dig = function dig(optionList) {
var isChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
// for loop to speed up collection speed
for (var i = 0; i < optionList.length; i += 1) {
var option = optionList[i];
if (!option[fieldNames.options] || isChildren) {
valueOptions.set(option[fieldNames.value], option);
setLabelOptions(labelOptions, option, fieldNames.label);
// https://github.com/ant-design/ant-design/issues/35304
setLabelOptions(labelOptions, option, optionFilterProp);
setLabelOptions(labelOptions, option, optionLabelProp);
} else {
dig(option[fieldNames.options], true);
}
}
};
dig(mergedOptions);
return {
options: mergedOptions,
valueOptions: valueOptions,
labelOptions: labelOptions
};
}, [options, children, fieldNames, optionFilterProp, optionLabelProp]);
};
/* harmony default export */ var hooks_useOptions = (useOptions);
;// ./node_modules/rc-select/es/hooks/useRefFunc.js
/**
* Same as `React.useCallback` but always return a memoized function
* but redirect to real function.
*/
function useRefFunc(callback) {
var funcRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
funcRef.current = callback;
var cacheFn = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
return funcRef.current.apply(funcRef, arguments);
}, []);
return cacheFn;
}
;// ./node_modules/rc-select/es/utils/warningPropsUtil.js
function warningProps(props) {
var mode = props.mode,
options = props.options,
children = props.children,
backfill = props.backfill,
allowClear = props.allowClear,
placeholder = props.placeholder,
getInputElement = props.getInputElement,
showSearch = props.showSearch,
onSearch = props.onSearch,
defaultOpen = props.defaultOpen,
autoFocus = props.autoFocus,
labelInValue = props.labelInValue,
value = props.value,
inputValue = props.inputValue,
optionLabelProp = props.optionLabelProp;
var multiple = isMultiple(mode);
var mergedShowSearch = showSearch !== undefined ? showSearch : multiple || mode === 'combobox';
var mergedOptions = options || convertChildrenToData(children);
// `tags` should not set option as disabled
(0,warning["default"])(mode !== 'tags' || mergedOptions.every(function (opt) {
return !opt.disabled;
}), 'Please avoid setting option to disabled in tags mode since user can always type text as tag.');
// `combobox` & `tags` should option be `string` type
if (mode === 'tags' || mode === 'combobox') {
var hasNumberValue = mergedOptions.some(function (item) {
if (item.options) {
return item.options.some(function (opt) {
return typeof ('value' in opt ? opt.value : opt.key) === 'number';
});
}
return typeof ('value' in item ? item.value : item.key) === 'number';
});
(0,warning["default"])(!hasNumberValue, '`value` of Option should not use number type when `mode` is `tags` or `combobox`.');
}
// `combobox` should not use `optionLabelProp`
(0,warning["default"])(mode !== 'combobox' || !optionLabelProp, '`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly.');
// Only `combobox` support `backfill`
(0,warning["default"])(mode === 'combobox' || !backfill, '`backfill` only works with `combobox` mode.');
// Only `combobox` support `getInputElement`
(0,warning["default"])(mode === 'combobox' || !getInputElement, '`getInputElement` only work with `combobox` mode.');
// Customize `getInputElement` should not use `allowClear` & `placeholder`
(0,warning.noteOnce)(mode !== 'combobox' || !getInputElement || !allowClear || !placeholder, 'Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`.');
// `onSearch` should use in `combobox` or `showSearch`
if (onSearch && !mergedShowSearch && mode !== 'combobox' && mode !== 'tags') {
(0,warning["default"])(false, '`onSearch` should work with `showSearch` instead of use alone.');
}
(0,warning.noteOnce)(!defaultOpen || autoFocus, '`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed.');
if (value !== undefined && value !== null) {
var values = commonUtil_toArray(value);
(0,warning["default"])(!labelInValue || values.every(function (val) {
return (0,esm_typeof["default"])(val) === 'object' && ('key' in val || 'value' in val);
}), '`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`');
(0,warning["default"])(!multiple || Array.isArray(value), '`value` should be array when `mode` is `multiple` or `tags`');
}
// Syntactic sugar should use correct children type
if (children) {
var invalidateChildType = null;
(0,toArray["default"])(children).some(function (node) {
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node) || !node.type) {
return false;
}
var _ref = node,
type = _ref.type;
if (type.isSelectOption) {
return false;
}
if (type.isSelectOptGroup) {
var allChildrenValid = (0,toArray["default"])(node.props.children).every(function (subNode) {
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(subNode) || !node.type || subNode.type.isSelectOption) {
return true;
}
invalidateChildType = subNode.type;
return false;
});
if (allChildrenValid) {
return false;
}
return true;
}
invalidateChildType = type;
return true;
});
if (invalidateChildType) {
(0,warning["default"])(false, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(invalidateChildType.displayName || invalidateChildType.name || invalidateChildType, "`."));
}
(0,warning["default"])(inputValue === undefined, '`inputValue` is deprecated, please use `searchValue` instead.');
}
}
// value in Select option should not be null
// note: OptGroup has options too
function warningNullOptions(options, fieldNames) {
if (options) {
var recursiveOptions = function recursiveOptions(optionsList) {
var inGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
for (var i = 0; i < optionsList.length; i++) {
var option = optionsList[i];
if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
(0,warning["default"])(false, '`value` in Select options should not be `null`.');
return true;
}
if (!inGroup && Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.options]) && recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.options], true)) {
break;
}
}
};
recursiveOptions(options);
}
}
/* harmony default export */ var warningPropsUtil = (warningProps);
;// ./node_modules/rc-select/es/Select.js
var Select_excluded = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"];
/**
* To match accessibility requirement, we always provide an input in the component.
* Other element will not set `tabIndex` to avoid `onBlur` sequence problem.
* For focused select, we set `aria-live="polite"` to update the accessibility content.
*
* ref:
* - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions
*
* New api:
* - listHeight
* - listItemHeight
* - component
*
* Remove deprecated api:
* - multiple
* - tags
* - combobox
* - firstActiveValue
* - dropdownMenuStyle
* - openClassName (Not list in api)
*
* Update:
* - `backfill` only support `combobox` mode
* - `combobox` mode not support `labelInValue` since it's meaningless
* - `getInputElement` only support `combobox` mode
* - `onChange` return OptionData instead of ReactNode
* - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode
* - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option
* - `combobox` mode not support `optionLabelProp`
*/
var OMIT_DOM_PROPS = ['inputValue'];
function isRawValue(value) {
return !value || (0,esm_typeof["default"])(value) !== 'object';
}
var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var id = props.id,
mode = props.mode,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,
backfill = props.backfill,
fieldNames = props.fieldNames,
inputValue = props.inputValue,
searchValue = props.searchValue,
onSearch = props.onSearch,
_props$autoClearSearc = props.autoClearSearchValue,
autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
onSelect = props.onSelect,
onDeselect = props.onDeselect,
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
filterOption = props.filterOption,
filterSort = props.filterSort,
optionFilterProp = props.optionFilterProp,
optionLabelProp = props.optionLabelProp,
options = props.options,
optionRender = props.optionRender,
children = props.children,
defaultActiveFirstOption = props.defaultActiveFirstOption,
menuItemSelectedIcon = props.menuItemSelectedIcon,
virtual = props.virtual,
direction = props.direction,
_props$listHeight = props.listHeight,
listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,
_props$listItemHeight = props.listItemHeight,
listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,
labelRender = props.labelRender,
value = props.value,
defaultValue = props.defaultValue,
labelInValue = props.labelInValue,
onChange = props.onChange,
maxCount = props.maxCount,
restProps = (0,objectWithoutProperties["default"])(props, Select_excluded);
var mergedId = useId_useId(id);
var multiple = isMultiple(mode);
var childrenAsData = !!(!options && children);
var mergedFilterOption = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (filterOption === undefined && mode === 'combobox') {
return false;
}
return filterOption;
}, [filterOption, mode]);
// ========================= FieldNames =========================
var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return fillFieldNames(fieldNames, childrenAsData);
}, /* eslint-disable react-hooks/exhaustive-deps */
[
// We stringify fieldNames to avoid unnecessary re-renders.
JSON.stringify(fieldNames), childrenAsData]
/* eslint-enable react-hooks/exhaustive-deps */);
// =========================== Search ===========================
var _useMergedState = (0,useMergedState["default"])('', {
value: searchValue !== undefined ? searchValue : inputValue,
postState: function postState(search) {
return search || '';
}
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedSearchValue = _useMergedState2[0],
setSearchValue = _useMergedState2[1];
// =========================== Option ===========================
var parsedOptions = hooks_useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
var valueOptions = parsedOptions.valueOptions,
labelOptions = parsedOptions.labelOptions,
mergedOptions = parsedOptions.options;
// ========================= Wrap Value =========================
var convert2LabelValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (draftValues) {
// Convert to array
var valueList = commonUtil_toArray(draftValues);
// Convert to labelInValue type
return valueList.map(function (val) {
var rawValue;
var rawLabel;
var rawKey;
var rawDisabled;
var rawTitle;
// Fill label & value
if (isRawValue(val)) {
rawValue = val;
} else {
var _val$value;
rawKey = val.key;
rawLabel = val.label;
rawValue = (_val$value = val.value) !== null && _val$value !== void 0 ? _val$value : rawKey;
}
var option = valueOptions.get(rawValue);
if (option) {
var _option$key;
// Fill missing props
if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];
if (rawKey === undefined) rawKey = (_option$key = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key !== void 0 ? _option$key : rawValue;
rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;
rawTitle = option === null || option === void 0 ? void 0 : option.title;
// Warning if label not same as provided
if ( true && !optionLabelProp) {
var optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];
if (optionLabel !== undefined && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(optionLabel) && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(rawLabel) && optionLabel !== rawLabel) {
(0,warning["default"])(false, '`label` of `value` is not same as `label` in Select options.');
}
}
}
return {
label: rawLabel,
value: rawValue,
key: rawKey,
disabled: rawDisabled,
title: rawTitle
};
});
}, [mergedFieldNames, optionLabelProp, valueOptions]);
// =========================== Values ===========================
var _useMergedState3 = (0,useMergedState["default"])(defaultValue, {
value: value
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
internalValue = _useMergedState4[0],
setInternalValue = _useMergedState4[1];
// Merged value with LabelValueType
var rawLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var _values$;
var newInternalValue = multiple && internalValue === null ? [] : internalValue;
var values = convert2LabelValues(newInternalValue);
// combobox no need save value when it's no value (exclude value equal 0)
if (mode === 'combobox' && isComboNoValue((_values$ = values[0]) === null || _values$ === void 0 ? void 0 : _values$.value)) {
return [];
}
return values;
}, [internalValue, convert2LabelValues, mode, multiple]);
// Fill label with cache to avoid option remove
var _useCache = useCache(rawLabeledValues, valueOptions),
_useCache2 = (0,slicedToArray["default"])(_useCache, 2),
mergedValues = _useCache2[0],
getMixedOption = _useCache2[1];
var displayValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// `null` need show as placeholder instead
// https://github.com/ant-design/ant-design/issues/25057
if (!mode && mergedValues.length === 1) {
var firstValue = mergedValues[0];
if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {
return [];
}
}
return mergedValues.map(function (item) {
var _ref;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
label: (_ref = typeof labelRender === 'function' ? labelRender(item) : item.label) !== null && _ref !== void 0 ? _ref : item.value
});
});
}, [mode, mergedValues, labelRender]);
/** Convert `displayValues` to raw value type set */
var rawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return new Set(mergedValues.map(function (val) {
return val.value;
}));
}, [mergedValues]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (mode === 'combobox') {
var _mergedValues$;
var strValue = (_mergedValues$ = mergedValues[0]) === null || _mergedValues$ === void 0 ? void 0 : _mergedValues$.value;
setSearchValue(hasValue(strValue) ? String(strValue) : '');
}
}, [mergedValues]);
// ======================= Display Option =======================
// Create a placeholder item if not exist in `options`
var createTagOption = useRefFunc(function (val, label) {
var mergedLabel = label !== null && label !== void 0 ? label : val;
return (0,defineProperty["default"])((0,defineProperty["default"])({}, mergedFieldNames.value, val), mergedFieldNames.label, mergedLabel);
});
// Fill tag as option if mode is `tags`
var filledTagOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (mode !== 'tags') {
return mergedOptions;
}
// >>> Tag mode
var cloneOptions = (0,toConsumableArray["default"])(mergedOptions);
// Check if value exist in options (include new patch item)
var existOptions = function existOptions(val) {
return valueOptions.has(val);
};
// Fill current value as option
(0,toConsumableArray["default"])(mergedValues).sort(function (a, b) {
return a.value < b.value ? -1 : 1;
}).forEach(function (item) {
var val = item.value;
if (!existOptions(val)) {
cloneOptions.push(createTagOption(val, item.label));
}
});
return cloneOptions;
}, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);
var filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);
// Fill options with search value if needed
var filledSearchOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(function (item) {
return item[optionFilterProp || 'value'] === mergedSearchValue;
})) {
return filteredOptions;
}
// ignore when search value equal select input value
if (filteredOptions.some(function (item) {
return item[mergedFieldNames.value] === mergedSearchValue;
})) {
return filteredOptions;
}
// Fill search value as option
return [createTagOption(mergedSearchValue)].concat((0,toConsumableArray["default"])(filteredOptions));
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]);
var sorter = function sorter(inputOptions) {
var sortedOptions = (0,toConsumableArray["default"])(inputOptions).sort(function (a, b) {
return filterSort(a, b, {
searchValue: mergedSearchValue
});
});
return sortedOptions.map(function (item) {
if (Array.isArray(item.options)) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
options: item.options.length > 0 ? sorter(item.options) : item.options
});
}
return item;
});
};
var orderedFilteredOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!filterSort) {
return filledSearchOptions;
}
return sorter(filledSearchOptions);
}, [filledSearchOptions, filterSort, mergedSearchValue]);
var displayOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return flattenOptions(orderedFilteredOptions, {
fieldNames: mergedFieldNames,
childrenAsData: childrenAsData
});
}, [orderedFilteredOptions, mergedFieldNames, childrenAsData]);
// =========================== Change ===========================
var triggerChange = function triggerChange(values) {
var labeledValues = convert2LabelValues(values);
setInternalValue(labeledValues);
if (onChange && (
// Trigger event only when value changed
labeledValues.length !== mergedValues.length || labeledValues.some(function (newVal, index) {
var _mergedValues$index;
return ((_mergedValues$index = mergedValues[index]) === null || _mergedValues$index === void 0 ? void 0 : _mergedValues$index.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);
}))) {
var returnValues = labelInValue ? labeledValues : labeledValues.map(function (v) {
return v.value;
});
var returnOptions = labeledValues.map(function (v) {
return injectPropsWithOption(getMixedOption(v.value));
});
onChange(
// Value
multiple ? returnValues : returnValues[0],
// Option
multiple ? returnOptions : returnOptions[0]);
}
};
// ======================= Accessibility ========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
activeValue = _React$useState2[0],
setActiveValue = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
accessibilityIndex = _React$useState4[0],
setAccessibilityIndex = _React$useState4[1];
var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';
var onActiveValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (active, index) {
var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref3$source = _ref3.source,
source = _ref3$source === void 0 ? 'keyboard' : _ref3$source;
setAccessibilityIndex(index);
if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {
setActiveValue(String(active));
}
}, [backfill, mode]);
// ========================= OptionList =========================
var triggerSelect = function triggerSelect(val, selected, type) {
var getSelectEnt = function getSelectEnt() {
var _option$key2;
var option = getMixedOption(val);
return [labelInValue ? {
label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],
value: val,
key: (_option$key2 = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key2 !== void 0 ? _option$key2 : val
} : val, injectPropsWithOption(option)];
};
if (selected && onSelect) {
var _getSelectEnt = getSelectEnt(),
_getSelectEnt2 = (0,slicedToArray["default"])(_getSelectEnt, 2),
wrappedValue = _getSelectEnt2[0],
_option = _getSelectEnt2[1];
onSelect(wrappedValue, _option);
} else if (!selected && onDeselect && type !== 'clear') {
var _getSelectEnt3 = getSelectEnt(),
_getSelectEnt4 = (0,slicedToArray["default"])(_getSelectEnt3, 2),
_wrappedValue = _getSelectEnt4[0],
_option2 = _getSelectEnt4[1];
onDeselect(_wrappedValue, _option2);
}
};
// Used for OptionList selection
var onInternalSelect = useRefFunc(function (val, info) {
var cloneValues;
// Single mode always trigger select only with option list
var mergedSelect = multiple ? info.selected : true;
if (mergedSelect) {
cloneValues = multiple ? [].concat((0,toConsumableArray["default"])(mergedValues), [val]) : [val];
} else {
cloneValues = mergedValues.filter(function (v) {
return v.value !== val;
});
}
triggerChange(cloneValues);
triggerSelect(val, mergedSelect);
// Clean search value if single or configured
if (mode === 'combobox') {
// setSearchValue(String(val));
setActiveValue('');
} else if (!isMultiple || autoClearSearchValue) {
setSearchValue('');
setActiveValue('');
}
});
// ======================= Display Change =======================
// BaseSelect display values change
var onDisplayValuesChange = function onDisplayValuesChange(nextValues, info) {
triggerChange(nextValues);
var type = info.type,
values = info.values;
if (type === 'remove' || type === 'clear') {
values.forEach(function (item) {
triggerSelect(item.value, false, type);
});
}
};
// =========================== Search ===========================
var onInternalSearch = function onInternalSearch(searchText, info) {
setSearchValue(searchText);
setActiveValue(null);
// [Submit] Tag mode should flush input
if (info.source === 'submit') {
var formatted = (searchText || '').trim();
// prevent empty tags from appearing when you click the Enter button
if (formatted) {
var newRawValues = Array.from(new Set([].concat((0,toConsumableArray["default"])(rawValues), [formatted])));
triggerChange(newRawValues);
triggerSelect(formatted, true);
setSearchValue('');
}
return;
}
if (info.source !== 'blur') {
if (mode === 'combobox') {
triggerChange(searchText);
}
onSearch === null || onSearch === void 0 || onSearch(searchText);
}
};
var onInternalSearchSplit = function onInternalSearchSplit(words) {
var patchValues = words;
if (mode !== 'tags') {
patchValues = words.map(function (word) {
var opt = labelOptions.get(word);
return opt === null || opt === void 0 ? void 0 : opt.value;
}).filter(function (val) {
return val !== undefined;
});
}
var newRawValues = Array.from(new Set([].concat((0,toConsumableArray["default"])(rawValues), (0,toConsumableArray["default"])(patchValues))));
triggerChange(newRawValues);
newRawValues.forEach(function (newRawValue) {
triggerSelect(newRawValue, true);
});
};
// ========================== Context ===========================
var selectContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, parsedOptions), {}, {
flattenOptions: displayOptions,
onActiveValue: onActiveValue,
defaultActiveFirstOption: mergedDefaultActiveFirstOption,
onSelect: onInternalSelect,
menuItemSelectedIcon: menuItemSelectedIcon,
rawValues: rawValues,
fieldNames: mergedFieldNames,
virtual: realVirtual,
direction: direction,
listHeight: listHeight,
listItemHeight: listItemHeight,
childrenAsData: childrenAsData,
maxCount: maxCount,
optionRender: optionRender
});
}, [maxCount, parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, direction, listHeight, listItemHeight, childrenAsData, optionRender]);
// ========================== Warning ===========================
if (true) {
warningPropsUtil(props);
warningNullOptions(mergedOptions, mergedFieldNames);
}
// ==============================================================
// == Render ==
// ==============================================================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SelectContext.Provider, {
value: selectContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseSelect, (0,esm_extends["default"])({}, restProps, {
// >>> MISC
id: mergedId,
prefixCls: prefixCls,
ref: ref,
omitDomProps: OMIT_DOM_PROPS,
mode: mode
// >>> Values
,
displayValues: displayValues,
onDisplayValuesChange: onDisplayValuesChange
// >>> Trigger
,
direction: direction
// >>> Search
,
searchValue: mergedSearchValue,
onSearch: onInternalSearch,
autoClearSearchValue: autoClearSearchValue,
onSearchSplit: onInternalSearchSplit,
dropdownMatchSelectWidth: dropdownMatchSelectWidth
// >>> OptionList
,
OptionList: es_OptionList,
emptyOptions: !displayOptions.length
// >>> Accessibility
,
activeValue: activeValue,
activeDescendantId: "".concat(mergedId, "_list_").concat(accessibilityIndex)
})));
});
if (true) {
Select.displayName = 'Select';
}
var TypedSelect = Select;
TypedSelect.Option = es_Option;
TypedSelect.OptGroup = es_OptGroup;
/* harmony default export */ var es_Select = (TypedSelect);
;// ./node_modules/rc-select/es/index.js
/* harmony default export */ var rc_select_es = (es_Select);
;// ./components/_util/statusUtils.ts
const _InputStatuses = ['warning', 'error', ''];
function getStatusClassNames(prefixCls, status, hasFeedback) {
return classnames_default()({
[`${prefixCls}-status-success`]: status === 'success',
[`${prefixCls}-status-warning`]: status === 'warning',
[`${prefixCls}-status-error`]: status === 'error',
[`${prefixCls}-status-validating`]: status === 'validating',
[`${prefixCls}-has-feedback`]: hasFeedback
});
}
const getMergedStatus = (contextStatus, customStatus) => customStatus || contextStatus;
;// ./components/empty/empty.tsx
const Empty = () => {
const [, token] = (0,useToken["default"])();
const [locale] = (0,useLocale["default"])('Empty');
const bgColor = new fast_color_es.FastColor(token.colorBgBase);
// Dark Theme need more dark of this
const themeStyle = bgColor.toHsl().l < 0.5 ? {
opacity: 0.65
} : {};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
style: themeStyle,
width: "184",
height: "152",
viewBox: "0 0 184 152",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
transform: "translate(24 31.67)"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ellipse", {
fillOpacity: ".8",
fill: "#F5F5F7",
cx: "67.797",
cy: "106.89",
rx: "67.797",
ry: "12.668"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
fill: "#AEB8C2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
fill: "url(#linearGradient-1)",
transform: "translate(13.56)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
fill: "#F5F5F7"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
fill: "#DCE0E6"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
fill: "#DCE0E6"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
transform: "translate(149.65 15.383)",
fill: "#FFF"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ellipse", {
cx: "20.654",
cy: "3.167",
rx: "2.849",
ry: "2.815"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
}))));
};
if (true) {
Empty.displayName = 'EmptyImage';
}
/* harmony default export */ var empty = (Empty);
;// ./components/empty/simple.tsx
const Simple = () => {
const [, token] = (0,useToken["default"])();
const [locale] = (0,useLocale["default"])('Empty');
const {
colorFill,
colorFillTertiary,
colorFillQuaternary,
colorBgContainer
} = token;
const {
borderColor,
shadowColor,
contentColor
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
borderColor: new fast_color_es.FastColor(colorFill).onBackground(colorBgContainer).toHexString(),
shadowColor: new fast_color_es.FastColor(colorFillTertiary).onBackground(colorBgContainer).toHexString(),
contentColor: new fast_color_es.FastColor(colorFillQuaternary).onBackground(colorBgContainer).toHexString()
}), [colorFill, colorFillTertiary, colorFillQuaternary, colorBgContainer]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
width: "64",
height: "41",
viewBox: "0 0 64 41",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
transform: "translate(0 1)",
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ellipse", {
fill: shadowColor,
cx: "32",
cy: "33",
rx: "32",
ry: "7"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
fillRule: "nonzero",
stroke: borderColor
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
fill: contentColor
}))));
};
if (true) {
Simple.displayName = 'SimpleImage';
}
/* harmony default export */ var simple = (Simple);
// EXTERNAL MODULE: ./components/empty/style/index.ts
var empty_style = __webpack_require__("./components/empty/style/index.ts");
;// ./components/empty/index.tsx
var empty_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;
};
const defaultEmptyImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(empty, null);
const simpleEmptyImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(simple, null);
const empty_Empty = props => {
const {
className,
rootClassName,
prefixCls: customizePrefixCls,
image = defaultEmptyImg,
description,
children,
imageStyle,
style,
classNames: emptyClassNames,
styles
} = props,
restProps = empty_rest(props, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('empty');
const prefixCls = getPrefixCls('empty', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,empty_style["default"])(prefixCls);
const [locale] = (0,useLocale["default"])('Empty');
const des = typeof description !== 'undefined' ? description : locale === null || locale === void 0 ? void 0 : locale.description;
const alt = typeof des === 'string' ? des : 'empty';
let imageNode = null;
if (typeof image === 'string') {
imageNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", {
alt: alt,
src: image
});
} else {
imageNode = image;
}
// ============================= Warning ==============================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Empty');
[['imageStyle', 'styles: { image: {} }']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
className: classnames_default()(hashId, cssVarCls, prefixCls, contextClassName, {
[`${prefixCls}-normal`]: image === simpleEmptyImg,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, contextClassNames.root, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.root),
style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), styles === null || styles === void 0 ? void 0 : styles.root), style)
}, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-image`, contextClassNames.image, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.image),
style: Object.assign(Object.assign(Object.assign({}, imageStyle), contextStyles.image), styles === null || styles === void 0 ? void 0 : styles.image)
}, imageNode), des && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-description`, contextClassNames.description, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.description),
style: Object.assign(Object.assign({}, contextStyles.description), styles === null || styles === void 0 ? void 0 : styles.description)
}, des)), children && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-footer`, contextClassNames.footer, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.footer),
style: Object.assign(Object.assign({}, contextStyles.footer), styles === null || styles === void 0 ? void 0 : styles.footer)
}, children))));
};
empty_Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;
empty_Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;
if (true) {
empty_Empty.displayName = 'Empty';
}
/* harmony default export */ var components_empty = (empty_Empty);
;// ./components/config-provider/defaultRenderEmpty.tsx
const DefaultRenderEmpty = props => {
const {
componentName
} = props;
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefix = getPrefixCls('empty');
switch (componentName) {
case 'Table':
case 'List':
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_empty, {
image: components_empty.PRESENTED_IMAGE_SIMPLE
});
case 'Select':
case 'TreeSelect':
case 'Cascader':
case 'Transfer':
case 'Mentions':
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_empty, {
image: components_empty.PRESENTED_IMAGE_SIMPLE,
className: `${prefix}-small`
});
/**
* This type of component should satisfy the nullish coalescing operator(??) on the left-hand side.
* to let the component itself implement the logic.
* For example `Table.filter`.
*/
case 'Table.filter':
// why `null`? legacy react16 node type `undefined` is not allowed.
return null;
default:
// Should never hit if we take all the component into consider.
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_empty, null);
}
};
/* harmony default export */ var defaultRenderEmpty = (DefaultRenderEmpty);
;// ./components/form/hooks/useVariants.ts
/**
* Compatible for legacy `bordered` prop.
*/
const useVariant = function (component, variant) {
let legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
var _a, _b;
const {
variant: configVariant,
[component]: componentConfig
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const ctxVariant = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(VariantContext);
const configComponentVariant = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.variant;
let mergedVariant;
if (typeof variant !== 'undefined') {
mergedVariant = variant;
} else if (legacyBordered === false) {
mergedVariant = 'borderless';
} else {
// form variant > component global variant > global variant
mergedVariant = (_b = (_a = ctxVariant !== null && ctxVariant !== void 0 ? ctxVariant : configComponentVariant) !== null && _a !== void 0 ? _a : configVariant) !== null && _b !== void 0 ? _b : 'outlined';
}
const enableVariantCls = config_provider_context.Variants.includes(mergedVariant);
return [mergedVariant, enableVariantCls];
};
/* harmony default export */ var useVariants = (useVariant);
;// ./components/select/mergedBuiltinPlacements.ts
const mergedBuiltinPlacements_getBuiltInPlacements = popupOverflow => {
const htmlRegion = popupOverflow === 'scroll' ? 'scroll' : 'visible';
const sharedConfig = {
overflow: {
adjustX: true,
adjustY: true,
shiftY: true
},
htmlRegion,
dynamicInset: true
};
return {
bottomLeft: Object.assign(Object.assign({}, sharedConfig), {
points: ['tl', 'bl'],
offset: [0, 4]
}),
bottomRight: Object.assign(Object.assign({}, sharedConfig), {
points: ['tr', 'br'],
offset: [0, 4]
}),
topLeft: Object.assign(Object.assign({}, sharedConfig), {
points: ['bl', 'tl'],
offset: [0, -4]
}),
topRight: Object.assign(Object.assign({}, sharedConfig), {
points: ['br', 'tr'],
offset: [0, -4]
})
};
};
function mergedBuiltinPlacements(buildInPlacements, popupOverflow) {
return buildInPlacements || mergedBuiltinPlacements_getBuiltInPlacements(popupOverflow);
}
/* harmony default export */ var select_mergedBuiltinPlacements = (mergedBuiltinPlacements);
// EXTERNAL MODULE: ./components/select/style/index.ts + 4 modules
var select_style = __webpack_require__("./components/select/style/index.ts");
;// ./node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js
// This icon file is generated automatically.
var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
/* harmony default export */ var asn_CheckOutlined = (CheckOutlined);
;// ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CheckOutlined
}));
};
/** */
var CheckOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CheckOutlined_CheckOutlined);
if (true) {
CheckOutlined_RefIcon.displayName = 'CheckOutlined';
}
/* harmony default export */ var icons_CheckOutlined = (CheckOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js
// This icon file is generated automatically.
var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
/* harmony default export */ var asn_DownOutlined = (DownOutlined);
;// ./node_modules/@ant-design/icons/es/icons/DownOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DownOutlined_DownOutlined = function DownOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_DownOutlined
}));
};
/** */
var DownOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DownOutlined_DownOutlined);
if (true) {
DownOutlined_RefIcon.displayName = 'DownOutlined';
}
/* harmony default export */ var icons_DownOutlined = (DownOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js
// This icon file is generated automatically.
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
/* harmony default export */ var asn_SearchOutlined = (SearchOutlined);
;// ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SearchOutlined_SearchOutlined = function SearchOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_SearchOutlined
}));
};
/** */
var SearchOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SearchOutlined_SearchOutlined);
if (true) {
SearchOutlined_RefIcon.displayName = 'SearchOutlined';
}
/* harmony default export */ var icons_SearchOutlined = (SearchOutlined_RefIcon);
;// ./components/select/useIcons.tsx
function useIcons(_ref) {
let {
suffixIcon,
clearIcon,
menuItemSelectedIcon,
removeIcon,
loading,
multiple,
hasFeedback,
prefixCls,
showSuffixIcon,
feedbackIcon,
showArrow,
componentName
} = _ref;
if (true) {
const warning = (0,_util_warning.devUseWarning)(componentName);
warning.deprecated(!clearIcon, 'clearIcon', 'allowClear={{ clearIcon: React.ReactNode }}');
}
// Clear Icon
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null);
// Validation Feedback Icon
const getSuffixIconNode = arrowIcon => {
if (suffixIcon === null && !hasFeedback && !showArrow) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, showSuffixIcon !== false && arrowIcon, hasFeedback && feedbackIcon);
};
// Arrow item icon
let mergedSuffixIcon = null;
if (suffixIcon !== undefined) {
mergedSuffixIcon = getSuffixIconNode(suffixIcon);
} else if (loading) {
mergedSuffixIcon = getSuffixIconNode(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
spin: true
}));
} else {
const iconCls = `${prefixCls}-suffix`;
mergedSuffixIcon = _ref2 => {
let {
open,
showSearch
} = _ref2;
if (open && showSearch) {
return getSuffixIconNode(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, {
className: iconCls
}));
}
return getSuffixIconNode(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, {
className: iconCls
}));
};
}
// Checked item icon
let mergedItemIcon = null;
if (menuItemSelectedIcon !== undefined) {
mergedItemIcon = menuItemSelectedIcon;
} else if (multiple) {
mergedItemIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, null);
} else {
mergedItemIcon = null;
}
let mergedRemoveIcon = null;
if (removeIcon !== undefined) {
mergedRemoveIcon = removeIcon;
} else {
mergedRemoveIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null);
}
return {
clearIcon: mergedClearIcon,
suffixIcon: mergedSuffixIcon,
itemIcon: mergedItemIcon,
removeIcon: mergedRemoveIcon
};
}
;// ./components/select/useShowArrow.ts
/**
* Since Select, TreeSelect, Cascader is same Select like component.
* We just use same hook to handle this logic.
*
* If `suffixIcon` is not equal to `null`, always show it.
*/
function useShowArrow(suffixIcon, showArrow) {
return showArrow !== undefined ? showArrow : suffixIcon !== null;
}
;// ./components/select/index.tsx
var select_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;
};
// TODO: 4.0 - codemod should help to change `filterOption` to support node props.
const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
const InternalSelect = (props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
bordered,
className,
rootClassName,
getPopupContainer,
popupClassName,
dropdownClassName,
listHeight = 256,
placement,
listItemHeight: customListItemHeight,
size: customizeSize,
disabled: customDisabled,
notFoundContent,
status: customStatus,
builtinPlacements,
dropdownMatchSelectWidth,
popupMatchSelectWidth,
direction: propDirection,
style,
allowClear,
variant: customizeVariant,
dropdownStyle,
transitionName,
tagRender,
maxCount,
prefix
} = props,
rest = select_rest(props, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix"]);
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
renderEmpty,
direction: contextDirection,
virtual,
popupMatchSelectWidth: contextPopupMatchSelectWidth,
popupOverflow
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const contextSelect = (0,config_provider_context.useComponentConfig)('select');
const [, token] = (0,useToken["default"])();
const listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : token === null || token === void 0 ? void 0 : token.controlHeight;
const prefixCls = getPrefixCls('select', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const direction = propDirection !== null && propDirection !== void 0 ? propDirection : contextDirection;
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const [variant, enableVariantCls] = useVariants('select', customizeVariant, bordered);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,select_style["default"])(prefixCls, rootCls);
const mode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const {
mode: m
} = props;
if (m === 'combobox') {
return undefined;
}
if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {
return 'combobox';
}
return m;
}, [props.mode]);
const isMultiple = mode === 'multiple' || mode === 'tags';
const showSuffixIcon = useShowArrow(props.suffixIcon, props.showArrow);
const mergedPopupMatchSelectWidth = (_a = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : contextPopupMatchSelectWidth;
// ===================== Form Status =====================
const {
status: contextStatus,
hasFeedback,
isFormItemInput,
feedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
// ===================== Empty =====================
let mergedNotFound;
if (notFoundContent !== undefined) {
mergedNotFound = notFoundContent;
} else if (mode === 'combobox') {
mergedNotFound = null;
} else {
mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "Select"
});
}
// ===================== Icons =====================
const {
suffixIcon,
itemIcon,
removeIcon,
clearIcon
} = useIcons(Object.assign(Object.assign({}, rest), {
multiple: isMultiple,
hasFeedback,
feedbackIcon,
showSuffixIcon,
prefixCls,
componentName: 'Select'
}));
const mergedAllowClear = allowClear === true ? {
clearIcon
} : allowClear;
const selectProps = (0,omit["default"])(rest, ['suffixIcon', 'itemIcon']);
const mergedPopupClassName = classnames_default()(popupClassName || dropdownClassName, {
[`${prefixCls}-dropdown-${direction}`]: direction === 'rtl'
}, rootClassName, cssVarCls, rootCls, hashId);
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const mergedClassName = classnames_default()({
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${variant}`]: enableVariantCls,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, contextSelect.className, className, rootClassName, cssVarCls, rootCls, hashId);
// ===================== Placement =====================
const memoPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (placement !== undefined) {
return placement;
}
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
}, [placement, direction]);
// ====================== Warning ======================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Select');
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
true ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : 0;
warning.deprecated(!('bordered' in props), 'bordered', 'variant');
true ? warning(!(typeof maxCount !== 'undefined' && !isMultiple), 'usage', '`maxCount` only works with mode `multiple` or `tags`') : 0;
}
// ====================== zIndex =========================
const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.zIndex);
// ====================== Render =======================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_select_es, Object.assign({
ref: ref,
virtual: virtual,
showSearch: contextSelect.showSearch
}, selectProps, {
style: Object.assign(Object.assign({}, contextSelect.style), style),
dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),
builtinPlacements: select_mergedBuiltinPlacements(builtinPlacements, popupOverflow),
listHeight: listHeight,
listItemHeight: listItemHeight,
mode: mode,
prefixCls: prefixCls,
placement: memoPlacement,
direction: direction,
prefix: prefix,
suffixIcon: suffixIcon,
menuItemSelectedIcon: itemIcon,
removeIcon: removeIcon,
allowClear: mergedAllowClear,
notFoundContent: mergedNotFound,
className: mergedClassName,
getPopupContainer: getPopupContainer || getContextPopupContainer,
dropdownClassName: mergedPopupClassName,
disabled: mergedDisabled,
dropdownStyle: Object.assign(Object.assign({}, dropdownStyle), {
zIndex
}),
maxCount: isMultiple ? maxCount : undefined,
tagRender: isMultiple ? tagRender : undefined
})));
};
if (true) {
InternalSelect.displayName = 'Select';
}
const select_Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalSelect);
// We don't care debug panel
/* istanbul ignore next */
const select_PurePanel = _util_PurePanel(select_Select, 'dropdownAlign');
select_Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
select_Select.Option = es_Option;
select_Select.OptGroup = es_OptGroup;
select_Select._InternalPanelDoNotUseOrYouWillBeFired = select_PurePanel;
if (true) {
select_Select.displayName = 'Select';
}
/* harmony default export */ var components_select = (select_Select);
;// ./components/auto-complete/AutoComplete.tsx
const {
Option: AutoComplete_Option
} = components_select;
function isSelectOptionOrSelectOptGroup(child) {
return (child === null || child === void 0 ? void 0 : child.type) && (child.type.isSelectOption || child.type.isSelectOptGroup);
}
const AutoComplete = (props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
className,
popupClassName,
dropdownClassName,
children,
dataSource
} = props;
const childNodes = (0,toArray["default"])(children);
// ============================= Input =============================
let customizeInput;
if (childNodes.length === 1 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
[customizeInput] = childNodes;
}
const getInputElement = customizeInput ? () => customizeInput : undefined;
// ============================ Options ============================
let optionChildren;
// [Legacy] convert `children` or `dataSource` into option children
if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
optionChildren = children;
} else {
optionChildren = dataSource ? dataSource.map(item => {
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(item)) {
return item;
}
switch (typeof item) {
case 'string':
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AutoComplete_Option, {
key: item,
value: item
}, item);
case 'object':
{
const {
value: optionValue
} = item;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AutoComplete_Option, {
key: optionValue,
value: optionValue
}, item.text);
}
default:
return undefined;
}
}) : [];
}
if (true) {
const warning = (0,_util_warning.devUseWarning)('AutoComplete');
warning.deprecated(!('dataSource' in props), 'dataSource', 'options');
true ? warning(!customizeInput || !('size' in props), 'usage', 'You need to control style self instead of setting `size` when using customize input.') : 0;
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
}
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('select', customizePrefixCls);
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', (_a = props.dropdownStyle) === null || _a === void 0 ? void 0 : _a.zIndex);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_select, Object.assign({
ref: ref,
suffixIcon: null
}, (0,omit["default"])(props, ['dataSource', 'dropdownClassName']), {
prefixCls: prefixCls,
popupClassName: popupClassName || dropdownClassName,
dropdownStyle: Object.assign(Object.assign({}, props.dropdownStyle), {
zIndex
}),
className: classnames_default()(`${prefixCls}-auto-complete`, className),
mode: components_select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
// Internal api
getInputElement
}), optionChildren);
};
const RefAutoComplete = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(AutoComplete);
if (true) {
RefAutoComplete.displayName = 'AutoComplete';
}
/* harmony default export */ var auto_complete_AutoComplete = (RefAutoComplete);
;// ./components/auto-complete/index.tsx
const {
Option: auto_complete_Option
} = components_select;
// We don't care debug panel
/* istanbul ignore next */
const auto_complete_PurePanel = _util_PurePanel(auto_complete_AutoComplete, 'dropdownAlign', props => (0,omit["default"])(props, ['visible']));
const components_auto_complete_AutoComplete = auto_complete_AutoComplete;
components_auto_complete_AutoComplete.Option = auto_complete_Option;
components_auto_complete_AutoComplete._InternalPanelDoNotUseOrYouWillBeFired = auto_complete_PurePanel;
/* harmony default export */ var auto_complete = (components_auto_complete_AutoComplete);
;// ./components/_util/responsiveObserver.ts
const responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
const getResponsiveMap = token => ({
xs: `(max-width: ${token.screenXSMax}px)`,
sm: `(min-width: ${token.screenSM}px)`,
md: `(min-width: ${token.screenMD}px)`,
lg: `(min-width: ${token.screenLG}px)`,
xl: `(min-width: ${token.screenXL}px)`,
xxl: `(min-width: ${token.screenXXL}px)`
});
/**
* Ensures that the breakpoints token are valid, in good order
* For each breakpoint : screenMin <= screen <= screenMax and screenMax <= nextScreenMin
*/
const validateBreakpoints = token => {
const indexableToken = token;
const revBreakpoints = [].concat(responsiveArray).reverse();
revBreakpoints.forEach((breakpoint, i) => {
const breakpointUpper = breakpoint.toUpperCase();
const screenMin = `screen${breakpointUpper}Min`;
const screen = `screen${breakpointUpper}`;
if (!(indexableToken[screenMin] <= indexableToken[screen])) {
throw new Error(`${screenMin}<=${screen} fails : !(${indexableToken[screenMin]}<=${indexableToken[screen]})`);
}
if (i < revBreakpoints.length - 1) {
const screenMax = `screen${breakpointUpper}Max`;
if (!(indexableToken[screen] <= indexableToken[screenMax])) {
throw new Error(`${screen}<=${screenMax} fails : !(${indexableToken[screen]}<=${indexableToken[screenMax]})`);
}
const nextBreakpointUpperMin = revBreakpoints[i + 1].toUpperCase();
const nextScreenMin = `screen${nextBreakpointUpperMin}Min`;
if (!(indexableToken[screenMax] <= indexableToken[nextScreenMin])) {
throw new Error(`${screenMax}<=${nextScreenMin} fails : !(${indexableToken[screenMax]}<=${indexableToken[nextScreenMin]})`);
}
}
});
return token;
};
function useResponsiveObserver() {
const [, token] = (0,useToken["default"])();
const responsiveMap = getResponsiveMap(validateBreakpoints(token));
// To avoid repeat create instance, we add `useMemo` here.
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
const subscribers = new Map();
let subUid = -1;
let screens = {};
return {
matchHandlers: {},
dispatch(pointMap) {
screens = pointMap;
subscribers.forEach(func => func(screens));
return subscribers.size >= 1;
},
subscribe(func) {
if (!subscribers.size) {
this.register();
}
subUid += 1;
subscribers.set(subUid, func);
func(screens);
return subUid;
},
unsubscribe(paramToken) {
subscribers.delete(paramToken);
if (!subscribers.size) {
this.unregister();
}
},
unregister() {
Object.keys(responsiveMap).forEach(screen => {
const matchMediaQuery = responsiveMap[screen];
const handler = this.matchHandlers[matchMediaQuery];
handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener);
});
subscribers.clear();
},
register() {
Object.keys(responsiveMap).forEach(screen => {
const matchMediaQuery = responsiveMap[screen];
const listener = _ref => {
let {
matches
} = _ref;
this.dispatch(Object.assign(Object.assign({}, screens), {
[screen]: matches
}));
};
const mql = window.matchMedia(matchMediaQuery);
mql.addListener(listener);
this.matchHandlers[matchMediaQuery] = {
mql,
listener
};
listener(mql);
});
},
responsiveMap
};
}, [token]);
}
const matchScreen = (screens, screenSizes) => {
if (screenSizes && typeof screenSizes === 'object') {
for (let i = 0; i < responsiveArray.length; i++) {
const breakpoint = responsiveArray[i];
if (screens[breakpoint] && screenSizes[breakpoint] !== undefined) {
return screenSizes[breakpoint];
}
}
}
};
;// ./components/_util/hooks/useForceUpdate.ts
function useForceUpdate() {
const [, forceUpdate] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer(x => x + 1, 0);
return forceUpdate;
}
;// ./components/grid/hooks/useBreakpoint.tsx
function useBreakpoint() {
let refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
let defaultScreens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const screensRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(defaultScreens);
const forceUpdate = useForceUpdate();
const responsiveObserver = useResponsiveObserver();
(0,useLayoutEffect["default"])(() => {
const token = responsiveObserver.subscribe(supportScreens => {
screensRef.current = supportScreens;
if (refreshOnChange) {
forceUpdate();
}
});
return () => responsiveObserver.unsubscribe(token);
}, []);
return screensRef.current;
}
/* harmony default export */ var hooks_useBreakpoint = (useBreakpoint);
;// ./components/avatar/AvatarContext.ts
const AvatarContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
/* harmony default export */ var avatar_AvatarContext = (AvatarContext);
// EXTERNAL MODULE: ./components/avatar/style/index.ts
var avatar_style = __webpack_require__("./components/avatar/style/index.ts");
;// ./components/avatar/Avatar.tsx
var Avatar_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;
};
const InternalAvatar = (props, ref) => {
const [scale, setScale] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(1);
const [mounted, setMounted] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [isImgExist, setIsImgExist] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
const avatarNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const avatarChildrenRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const avatarNodeMergedRef = (0,es_ref.composeRef)(ref, avatarNodeRef);
const {
getPrefixCls,
avatar
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const avatarCtx = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(avatar_AvatarContext);
const setScaleParam = () => {
if (!avatarChildrenRef.current || !avatarNodeRef.current) {
return;
}
const childrenWidth = avatarChildrenRef.current.offsetWidth; // offsetWidth avoid affecting be transform scale
const nodeWidth = avatarNodeRef.current.offsetWidth;
// denominator is 0 is no meaning
if (childrenWidth !== 0 && nodeWidth !== 0) {
const {
gap = 4
} = props;
if (gap * 2 < nodeWidth) {
setScale(nodeWidth - gap * 2 < childrenWidth ? (nodeWidth - gap * 2) / childrenWidth : 1);
}
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
setMounted(true);
}, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
setIsImgExist(true);
setScale(1);
}, [props.src]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(setScaleParam, [props.gap]);
const handleImgLoadError = () => {
const {
onError
} = props;
const errorFlag = onError === null || onError === void 0 ? void 0 : onError();
if (errorFlag !== false) {
setIsImgExist(false);
}
};
const {
prefixCls: customizePrefixCls,
shape,
size: customSize,
src,
srcSet,
icon,
className,
rootClassName,
alt,
draggable,
children,
crossOrigin
} = props,
others = Avatar_rest(props, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "rootClassName", "alt", "draggable", "children", "crossOrigin"]);
const size = (0,useSize["default"])(ctxSize => {
var _a, _b;
return (_b = (_a = customSize !== null && customSize !== void 0 ? customSize : avatarCtx === null || avatarCtx === void 0 ? void 0 : avatarCtx.size) !== null && _a !== void 0 ? _a : ctxSize) !== null && _b !== void 0 ? _b : 'default';
});
const needResponsive = Object.keys(typeof size === 'object' ? size || {} : {}).some(key => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key));
const screens = hooks_useBreakpoint(needResponsive);
const responsiveSizeStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (typeof size !== 'object') {
return {};
}
const currentBreakpoint = responsiveArray.find(screen => screens[screen]);
const currentSize = size[currentBreakpoint];
return currentSize ? {
width: currentSize,
height: currentSize,
fontSize: currentSize && (icon || children) ? currentSize / 2 : 18
} : {};
}, [screens, size]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Avatar');
true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
}
const prefixCls = getPrefixCls('avatar', customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,avatar_style["default"])(prefixCls, rootCls);
const sizeCls = classnames_default()({
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small'
});
const hasImageElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(src);
const mergedShape = shape || (avatarCtx === null || avatarCtx === void 0 ? void 0 : avatarCtx.shape) || 'circle';
const classString = classnames_default()(prefixCls, sizeCls, avatar === null || avatar === void 0 ? void 0 : avatar.className, `${prefixCls}-${mergedShape}`, {
[`${prefixCls}-image`]: hasImageElement || src && isImgExist,
[`${prefixCls}-icon`]: !!icon
}, cssVarCls, rootCls, className, rootClassName, hashId);
const sizeStyle = typeof size === 'number' ? {
width: size,
height: size,
fontSize: icon ? size / 2 : 18
} : {};
let childrenToRender;
if (typeof src === 'string' && isImgExist) {
childrenToRender = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", {
src: src,
draggable: draggable,
srcSet: srcSet,
onError: handleImgLoadError,
alt: alt,
crossOrigin: crossOrigin
});
} else if (hasImageElement) {
childrenToRender = src;
} else if (icon) {
childrenToRender = icon;
} else if (mounted || scale !== 1) {
const transformString = `scale(${scale})`;
const childrenStyle = {
msTransform: transformString,
WebkitTransform: transformString,
transform: transformString
};
childrenToRender = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: setScaleParam
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-string`,
ref: avatarChildrenRef,
style: Object.assign({}, childrenStyle)
}, children));
} else {
childrenToRender = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-string`,
style: {
opacity: 0
},
ref: avatarChildrenRef
}, children);
}
// The event is triggered twice from bubbling up the DOM tree.
// see https://codesandbox.io/s/kind-snow-9lidz
delete others.onError;
delete others.gap;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, others, {
style: Object.assign(Object.assign(Object.assign(Object.assign({}, sizeStyle), responsiveSizeStyle), avatar === null || avatar === void 0 ? void 0 : avatar.style), others.style),
className: classString,
ref: avatarNodeMergedRef
}), childrenToRender));
};
const Avatar_Avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalAvatar);
if (true) {
Avatar_Avatar.displayName = 'Avatar';
}
/* harmony default export */ var avatar_Avatar = (Avatar_Avatar);
;// ./components/_util/getRenderPropValue.ts
const getRenderPropValue = propValue => {
if (!propValue) {
return null;
}
return typeof propValue === 'function' ? propValue() : propValue;
};
;// ./node_modules/rc-tooltip/es/Popup.js
function Popup_Popup(props) {
var children = props.children,
prefixCls = props.prefixCls,
id = props.id,
innerStyle = props.overlayInnerStyle,
bodyClassName = props.bodyClassName,
className = props.className,
style = props.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-content"), className),
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-inner"), bodyClassName),
id: id,
role: "tooltip",
style: innerStyle
}, typeof children === 'function' ? children() : children));
}
;// ./node_modules/rc-tooltip/es/placements.js
var autoAdjustOverflowTopBottom = {
shiftX: 64,
adjustY: 1
};
var autoAdjustOverflowLeftRight = {
adjustX: 1,
shiftY: true
};
var targetOffset = [0, 0];
var placements = {
left: {
points: ['cr', 'cl'],
overflow: autoAdjustOverflowLeftRight,
offset: [-4, 0],
targetOffset: targetOffset
},
right: {
points: ['cl', 'cr'],
overflow: autoAdjustOverflowLeftRight,
offset: [4, 0],
targetOffset: targetOffset
},
top: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, -4],
targetOffset: targetOffset
},
bottom: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, 4],
targetOffset: targetOffset
},
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, -4],
targetOffset: targetOffset
},
leftTop: {
points: ['tr', 'tl'],
overflow: autoAdjustOverflowLeftRight,
offset: [-4, 0],
targetOffset: targetOffset
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, -4],
targetOffset: targetOffset
},
rightTop: {
points: ['tl', 'tr'],
overflow: autoAdjustOverflowLeftRight,
offset: [4, 0],
targetOffset: targetOffset
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, 4],
targetOffset: targetOffset
},
rightBottom: {
points: ['bl', 'br'],
overflow: autoAdjustOverflowLeftRight,
offset: [4, 0],
targetOffset: targetOffset
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, 4],
targetOffset: targetOffset
},
leftBottom: {
points: ['br', 'bl'],
overflow: autoAdjustOverflowLeftRight,
offset: [-4, 0],
targetOffset: targetOffset
}
};
/* harmony default export */ var es_placements = (placements);
;// ./node_modules/rc-tooltip/es/Tooltip.js
var Tooltip_excluded = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow", "classNames", "styles"];
var Tooltip = function Tooltip(props, ref) {
var overlayClassName = props.overlayClassName,
_props$trigger = props.trigger,
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
_props$mouseEnterDela = props.mouseEnterDelay,
mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,
_props$mouseLeaveDela = props.mouseLeaveDelay,
mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
overlayStyle = props.overlayStyle,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,
children = props.children,
onVisibleChange = props.onVisibleChange,
afterVisibleChange = props.afterVisibleChange,
transitionName = props.transitionName,
animation = props.animation,
motion = props.motion,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'right' : _props$placement,
_props$align = props.align,
align = _props$align === void 0 ? {} : _props$align,
_props$destroyTooltip = props.destroyTooltipOnHide,
destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,
defaultVisible = props.defaultVisible,
getTooltipContainer = props.getTooltipContainer,
overlayInnerStyle = props.overlayInnerStyle,
arrowContent = props.arrowContent,
overlay = props.overlay,
id = props.id,
_props$showArrow = props.showArrow,
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
tooltipClassNames = props.classNames,
tooltipStyles = props.styles,
restProps = (0,objectWithoutProperties["default"])(props, Tooltip_excluded);
var mergedId = hooks_useId(id);
var triggerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
return triggerRef.current;
});
var extraProps = (0,objectSpread2["default"])({}, restProps);
if ('visible' in props) {
extraProps.popupVisible = props.visible;
}
var getPopupElement = function getPopupElement() {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_Popup, {
key: "content",
prefixCls: prefixCls,
id: mergedId,
bodyClassName: tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.body,
overlayInnerStyle: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, overlayInnerStyle), tooltipStyles === null || tooltipStyles === void 0 ? void 0 : tooltipStyles.body)
}, overlay);
};
var getChildren = function getChildren() {
var child = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children);
var originalProps = (child === null || child === void 0 ? void 0 : child.props) || {};
var childProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originalProps), {}, {
'aria-describedby': overlay ? mergedId : null
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, childProps);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, (0,esm_extends["default"])({
popupClassName: classnames_default()(overlayClassName, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.root),
prefixCls: prefixCls,
popup: getPopupElement,
action: trigger,
builtinPlacements: placements,
popupPlacement: placement,
ref: triggerRef,
popupAlign: align,
getPopupContainer: getTooltipContainer,
onPopupVisibleChange: onVisibleChange,
afterPopupVisibleChange: afterVisibleChange,
popupTransitionName: transitionName,
popupAnimation: animation,
popupMotion: motion,
defaultPopupVisible: defaultVisible,
autoDestroy: destroyTooltipOnHide,
mouseLeaveDelay: mouseLeaveDelay,
popupStyle: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, overlayStyle), tooltipStyles === null || tooltipStyles === void 0 ? void 0 : tooltipStyles.root),
mouseEnterDelay: mouseEnterDelay,
arrow: showArrow
}, extraProps), getChildren());
};
/* harmony default export */ var es_Tooltip = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(Tooltip));
;// ./node_modules/rc-tooltip/es/index.js
/* harmony default export */ var rc_tooltip_es = (es_Tooltip);
// EXTERNAL MODULE: ./components/style/placementArrow.ts
var placementArrow = __webpack_require__("./components/style/placementArrow.ts");
;// ./components/_util/placements.ts
function getOverflowOptions(placement, arrowOffset, arrowWidth, autoAdjustOverflow) {
if (autoAdjustOverflow === false) {
return {
adjustX: false,
adjustY: false
};
}
const overflow = autoAdjustOverflow && typeof autoAdjustOverflow === 'object' ? autoAdjustOverflow : {};
const baseOverflow = {};
switch (placement) {
case 'top':
case 'bottom':
baseOverflow.shiftX = arrowOffset.arrowOffsetHorizontal * 2 + arrowWidth;
baseOverflow.shiftY = true;
baseOverflow.adjustY = true;
break;
case 'left':
case 'right':
baseOverflow.shiftY = arrowOffset.arrowOffsetVertical * 2 + arrowWidth;
baseOverflow.shiftX = true;
baseOverflow.adjustX = true;
break;
}
const mergedOverflow = Object.assign(Object.assign({}, baseOverflow), overflow);
// Support auto shift
if (!mergedOverflow.shiftX) {
mergedOverflow.adjustX = true;
}
if (!mergedOverflow.shiftY) {
mergedOverflow.adjustY = true;
}
return mergedOverflow;
}
const PlacementAlignMap = {
left: {
points: ['cr', 'cl']
},
right: {
points: ['cl', 'cr']
},
top: {
points: ['bc', 'tc']
},
bottom: {
points: ['tc', 'bc']
},
topLeft: {
points: ['bl', 'tl']
},
leftTop: {
points: ['tr', 'tl']
},
topRight: {
points: ['br', 'tr']
},
rightTop: {
points: ['tl', 'tr']
},
bottomRight: {
points: ['tr', 'br']
},
rightBottom: {
points: ['bl', 'br']
},
bottomLeft: {
points: ['tl', 'bl']
},
leftBottom: {
points: ['br', 'bl']
}
};
const ArrowCenterPlacementAlignMap = {
topLeft: {
points: ['bl', 'tc']
},
leftTop: {
points: ['tr', 'cl']
},
topRight: {
points: ['br', 'tc']
},
rightTop: {
points: ['tl', 'cr']
},
bottomRight: {
points: ['tr', 'bc']
},
rightBottom: {
points: ['bl', 'cr']
},
bottomLeft: {
points: ['tl', 'bc']
},
leftBottom: {
points: ['br', 'cl']
}
};
const DisableAutoArrowList = new Set(['topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom']);
function getPlacements(config) {
const {
arrowWidth,
autoAdjustOverflow,
arrowPointAtCenter,
offset,
borderRadius,
visibleFirst
} = config;
const halfArrowWidth = arrowWidth / 2;
const placementMap = {};
Object.keys(PlacementAlignMap).forEach(key => {
const template = arrowPointAtCenter && ArrowCenterPlacementAlignMap[key] || PlacementAlignMap[key];
const placementInfo = Object.assign(Object.assign({}, template), {
offset: [0, 0],
dynamicInset: true
});
placementMap[key] = placementInfo;
// Disable autoArrow since design is fixed position
if (DisableAutoArrowList.has(key)) {
placementInfo.autoArrow = false;
}
// Static offset
switch (key) {
case 'top':
case 'topLeft':
case 'topRight':
placementInfo.offset[1] = -halfArrowWidth - offset;
break;
case 'bottom':
case 'bottomLeft':
case 'bottomRight':
placementInfo.offset[1] = halfArrowWidth + offset;
break;
case 'left':
case 'leftTop':
case 'leftBottom':
placementInfo.offset[0] = -halfArrowWidth - offset;
break;
case 'right':
case 'rightTop':
case 'rightBottom':
placementInfo.offset[0] = halfArrowWidth + offset;
break;
}
// Dynamic offset
const arrowOffset = (0,placementArrow.getArrowOffsetToken)({
contentRadius: borderRadius,
limitVerticalRadius: true
});
if (arrowPointAtCenter) {
switch (key) {
case 'topLeft':
case 'bottomLeft':
placementInfo.offset[0] = -arrowOffset.arrowOffsetHorizontal - halfArrowWidth;
break;
case 'topRight':
case 'bottomRight':
placementInfo.offset[0] = arrowOffset.arrowOffsetHorizontal + halfArrowWidth;
break;
case 'leftTop':
case 'rightTop':
placementInfo.offset[1] = -arrowOffset.arrowOffsetHorizontal * 2 + halfArrowWidth;
break;
case 'leftBottom':
case 'rightBottom':
placementInfo.offset[1] = arrowOffset.arrowOffsetHorizontal * 2 - halfArrowWidth;
break;
}
}
// Overflow
placementInfo.overflow = getOverflowOptions(key, arrowOffset, arrowWidth, autoAdjustOverflow);
// VisibleFirst
if (visibleFirst) {
placementInfo.htmlRegion = 'visibleFirst';
}
});
return placementMap;
}
// EXTERNAL MODULE: ./components/tooltip/style/index.ts
var tooltip_style = __webpack_require__("./components/tooltip/style/index.ts");
;// ./components/_util/colors.ts
const inverseColors = presetColors.PresetColors.map(color => `${color}-inverse`);
const PresetStatusColorTypes = ['success', 'processing', 'error', 'default', 'warning'];
/**
* determine if the color keyword belongs to the `Ant Design` {@link PresetColors}.
* @param color color to be judged
* @param includeInverse whether to include reversed colors
*/
function isPresetColor(color) {
let includeInverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
if (includeInverse) {
return [].concat((0,toConsumableArray["default"])(inverseColors), (0,toConsumableArray["default"])(presetColors.PresetColors)).includes(color);
}
return presetColors.PresetColors.includes(color);
}
function isPresetStatusColor(color) {
return PresetStatusColorTypes.includes(color);
}
;// ./components/tooltip/util.ts
function parseColor(prefixCls, color) {
const isInternalColor = isPresetColor(color);
const className = classnames_default()({
[`${prefixCls}-${color}`]: color && isInternalColor
});
const overlayStyle = {};
const arrowStyle = {};
if (color && !isInternalColor) {
overlayStyle.background = color;
// @ts-ignore
arrowStyle['--antd-arrow-background-color'] = color;
}
return {
className,
overlayStyle,
arrowStyle
};
}
;// ./components/tooltip/PurePanel.tsx
/** @private Internal Component. Do not use in your production. */
const tooltip_PurePanel_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
className,
placement = 'top',
title,
color,
overlayInnerStyle
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,tooltip_style["default"])(prefixCls);
// Color
const colorInfo = parseColor(prefixCls, color);
const arrowContentStyle = colorInfo.arrowStyle;
const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);
const cls = classnames_default()(hashId, cssVarCls, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className, colorInfo.className);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls,
style: arrowContentStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-arrow`
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_Popup, Object.assign({}, props, {
className: hashId,
prefixCls: prefixCls,
overlayInnerStyle: formattedOverlayInnerStyle
}), title)));
};
/* harmony default export */ var tooltip_PurePanel = (tooltip_PurePanel_PurePanel);
;// ./components/tooltip/index.tsx
var tooltip_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;
};
const InternalTooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a, _b;
const {
prefixCls: customizePrefixCls,
openClassName,
getTooltipContainer,
color,
overlayInnerStyle,
children,
afterOpenChange,
afterVisibleChange,
destroyTooltipOnHide,
arrow = true,
title,
overlay,
builtinPlacements,
arrowPointAtCenter = false,
autoAdjustOverflow = true,
motion,
getPopupContainer,
placement = 'top',
mouseEnterDelay = 0.1,
mouseLeaveDelay = 0.1,
overlayStyle,
rootClassName,
overlayClassName,
styles,
classNames: tooltipClassNames
} = props,
restProps = tooltip_rest(props, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "arrow", "title", "overlay", "builtinPlacements", "arrowPointAtCenter", "autoAdjustOverflow", "motion", "getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]);
const mergedShowArrow = !!arrow;
const [, token] = (0,useToken["default"])();
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('tooltip');
// ============================== Ref ===============================
const warning = (0,_util_warning.devUseWarning)('Tooltip');
const tooltipRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const forceAlign = () => {
var _a;
(_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.forceAlign();
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => {
var _a, _b;
return {
forceAlign,
forcePopupAlign: () => {
warning.deprecated(false, 'forcePopupAlign', 'forceAlign');
forceAlign();
},
nativeElement: (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement,
popupElement: (_b = tooltipRef.current) === null || _b === void 0 ? void 0 : _b.popupElement
};
});
// ============================== Warn ==============================
if (true) {
[['visible', 'open'], ['defaultVisible', 'defaultOpen'], ['onVisibleChange', 'onOpenChange'], ['afterVisibleChange', 'afterOpenChange'], ['arrowPointAtCenter', 'arrow={{ pointAtCenter: true }}'], ['overlayStyle', 'styles={{ root: {} }}'], ['overlayInnerStyle', 'styles={{ body: {} }}'], ['overlayClassName', 'classNames={{ root: "" }}']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
true ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === 'boolean', 'usage', '`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.') : 0;
true ? warning(!arrow || typeof arrow === 'boolean' || !('arrowPointAtCenter' in arrow), 'deprecated', '`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead.') : 0;
}
// ============================== Open ==============================
const [open, setOpen] = (0,useMergedState["default"])(false, {
value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,
defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible
});
const noTitle = !title && !overlay && title !== 0; // overlay for old version compatibility
const onOpenChange = vis => {
var _a, _b;
setOpen(noTitle ? false : vis);
if (!noTitle) {
(_a = props.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(props, vis);
(_b = props.onVisibleChange) === null || _b === void 0 ? void 0 : _b.call(props, vis);
}
};
const tooltipPlacements = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b;
let mergedArrowPointAtCenter = arrowPointAtCenter;
if (typeof arrow === 'object') {
mergedArrowPointAtCenter = (_b = (_a = arrow.pointAtCenter) !== null && _a !== void 0 ? _a : arrow.arrowPointAtCenter) !== null && _b !== void 0 ? _b : arrowPointAtCenter;
}
return builtinPlacements || getPlacements({
arrowPointAtCenter: mergedArrowPointAtCenter,
autoAdjustOverflow,
arrowWidth: mergedShowArrow ? token.sizePopupArrow : 0,
borderRadius: token.borderRadius,
offset: token.marginXXS,
visibleFirst: true
});
}, [arrowPointAtCenter, arrow, builtinPlacements, token]);
const memoOverlay = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (title === 0) {
return title;
}
return overlay || title || '';
}, [overlay, title]);
const memoOverlayWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
space: true
}, typeof memoOverlay === 'function' ? memoOverlay() : memoOverlay);
const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const injectFromPopover = props['data-popover-inject'];
let tempOpen = open;
// Hide tooltip when there is no title
if (!('open' in props) && !('visible' in props) && noTitle) {
tempOpen = false;
}
// ============================= Render =============================
const child = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children) && !(0,reactNode.isFragment)(children) ? children : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children);
const childProps = child.props;
const childCls = !childProps.className || typeof childProps.className === 'string' ? classnames_default()(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,tooltip_style["default"])(prefixCls, !injectFromPopover);
// Color
const colorInfo = parseColor(prefixCls, color);
const arrowContentStyle = colorInfo.arrowStyle;
const rootClassNames = classnames_default()(overlayClassName, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, colorInfo.className, rootClassName, hashId, cssVarCls, contextClassName, contextClassNames.root, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.root);
const bodyClassNames = classnames_default()(contextClassNames.body, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.body);
// ============================ zIndex ============================
const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Tooltip', restProps.zIndex);
const content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tooltip_es, Object.assign({}, restProps, {
zIndex: zIndex,
showArrow: mergedShowArrow,
placement: placement,
mouseEnterDelay: mouseEnterDelay,
mouseLeaveDelay: mouseLeaveDelay,
prefixCls: prefixCls,
classNames: {
root: rootClassNames,
body: bodyClassNames
},
styles: {
root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, arrowContentStyle), contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
body: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.body), overlayInnerStyle), styles === null || styles === void 0 ? void 0 : styles.body), colorInfo.overlayStyle)
},
getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,
ref: tooltipRef,
builtinPlacements: tooltipPlacements,
overlay: memoOverlayWrapper,
visible: tempOpen,
onVisibleChange: onOpenChange,
afterVisibleChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,
arrowContent: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-arrow-content`
}),
motion: {
motionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom-big-fast', props.transitionName),
motionDeadline: 1000
},
destroyTooltipOnHide: !!destroyTooltipOnHide
}), tempOpen ? (0,reactNode.cloneElement)(child, {
className: childCls
}) : child);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
value: contextZIndex
}, content));
});
const tooltip_Tooltip = InternalTooltip;
if (true) {
tooltip_Tooltip.displayName = 'Tooltip';
}
tooltip_Tooltip._InternalPanelDoNotUseOrYouWillBeFired = tooltip_PurePanel;
/* harmony default export */ var components_tooltip = (tooltip_Tooltip);
// EXTERNAL MODULE: ./components/popover/style/index.ts
var popover_style = __webpack_require__("./components/popover/style/index.ts");
;// ./components/popover/PurePanel.tsx
var popover_PurePanel_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;
};
const Overlay = _ref => {
let {
title,
content,
prefixCls
} = _ref;
if (!title && !content) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-title`
}, title), content && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-inner-content`
}, content));
};
const RawPurePanel = props => {
const {
hashId,
prefixCls,
className,
style,
placement = 'top',
title,
content,
children
} = props;
const titleNode = getRenderPropValue(title);
const contentNode = getRenderPropValue(content);
const cls = classnames_default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls,
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-arrow`
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_Popup, Object.assign({}, props, {
className: hashId,
prefixCls: prefixCls
}), children || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Overlay, {
prefixCls: prefixCls,
title: titleNode,
content: contentNode
})));
};
const popover_PurePanel_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
className
} = props,
restProps = popover_PurePanel_rest(props, ["prefixCls", "className"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('popover', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,popover_style["default"])(prefixCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RawPurePanel, Object.assign({}, restProps, {
prefixCls: prefixCls,
hashId: hashId,
className: classnames_default()(className, cssVarCls)
})));
};
/* harmony default export */ var popover_PurePanel = (popover_PurePanel_PurePanel);
;// ./components/popover/index.tsx
var popover_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;
};
// CSSINJS
const InternalPopover = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a, _b;
const {
prefixCls: customizePrefixCls,
title,
content,
overlayClassName,
placement = 'top',
trigger = 'hover',
children,
mouseEnterDelay = 0.1,
mouseLeaveDelay = 0.1,
onOpenChange,
overlayStyle = {},
styles,
classNames: popoverClassNames
} = props,
otherProps = popover_rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle", "styles", "classNames"]);
const {
getPrefixCls,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('popover');
const prefixCls = getPrefixCls('popover', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,popover_style["default"])(prefixCls);
const rootPrefixCls = getPrefixCls();
const rootClassNames = classnames_default()(overlayClassName, hashId, cssVarCls, contextClassName, contextClassNames.root, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.root);
const bodyClassNames = classnames_default()(contextClassNames.body, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.body);
const [open, setOpen] = (0,useMergedState["default"])(false, {
value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,
defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible
});
const settingOpen = (value, e) => {
setOpen(value, true);
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);
};
const onKeyDown = e => {
if (e.keyCode === KeyCode["default"].ESC) {
settingOpen(false, e);
}
};
const onInternalOpenChange = value => {
settingOpen(value);
};
const titleNode = getRenderPropValue(title);
const contentNode = getRenderPropValue(content);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({
placement: placement,
trigger: trigger,
mouseEnterDelay: mouseEnterDelay,
mouseLeaveDelay: mouseLeaveDelay
}, otherProps, {
prefixCls: prefixCls,
classNames: {
root: rootClassNames,
body: bodyClassNames
},
styles: {
root: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
body: Object.assign(Object.assign({}, contextStyles.body), styles === null || styles === void 0 ? void 0 : styles.body)
},
ref: ref,
open: open,
onOpenChange: onInternalOpenChange,
overlay: titleNode || contentNode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Overlay, {
prefixCls: prefixCls,
title: titleNode,
content: contentNode
})) : null,
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
"data-popover-inject": true
}), (0,reactNode.cloneElement)(children, {
onKeyDown: e => {
var _a, _b;
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children)) {
(_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
}
onKeyDown(e);
}
})));
});
const Popover = InternalPopover;
Popover._InternalPanelDoNotUseOrYouWillBeFired = popover_PurePanel;
if (true) {
Popover.displayName = 'Popover';
}
/* harmony default export */ var popover = (Popover);
;// ./components/avatar/AvatarGroup.tsx
const AvatarContextProvider = props => {
const {
size,
shape
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(avatar_AvatarContext);
const avatarContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
size: props.size || size,
shape: props.shape || shape
}), [props.size, props.shape, size, shape]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(avatar_AvatarContext.Provider, {
value: avatarContextValue
}, props.children);
};
const AvatarGroup = props => {
var _a, _b, _c, _d;
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
maxCount,
maxStyle,
size,
shape,
maxPopoverPlacement,
maxPopoverTrigger,
children,
max
} = props;
if (true) {
const warning = (0,_util_warning.devUseWarning)('Avatar.Group');
[['maxCount', 'max={{ count: number }}'], ['maxStyle', 'max={{ style: CSSProperties }}'], ['maxPopoverPlacement', 'max={{ popover: PopoverProps }}'], ['maxPopoverTrigger', 'max={{ popover: PopoverProps }}']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
const prefixCls = getPrefixCls('avatar', customizePrefixCls);
const groupPrefixCls = `${prefixCls}-group`;
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,avatar_style["default"])(prefixCls, rootCls);
const cls = classnames_default()(groupPrefixCls, {
[`${groupPrefixCls}-rtl`]: direction === 'rtl'
}, cssVarCls, rootCls, className, rootClassName, hashId);
const childrenWithProps = (0,toArray["default"])(children).map((child, index) => (0,reactNode.cloneElement)(child, {
// eslint-disable-next-line react/no-array-index-key
key: `avatar-key-${index}`
}));
const mergeCount = (max === null || max === void 0 ? void 0 : max.count) || maxCount;
const numOfChildren = childrenWithProps.length;
if (mergeCount && mergeCount < numOfChildren) {
const childrenShow = childrenWithProps.slice(0, mergeCount);
const childrenHidden = childrenWithProps.slice(mergeCount, numOfChildren);
const mergeStyle = (max === null || max === void 0 ? void 0 : max.style) || maxStyle;
const mergePopoverTrigger = ((_a = max === null || max === void 0 ? void 0 : max.popover) === null || _a === void 0 ? void 0 : _a.trigger) || maxPopoverTrigger || 'hover';
const mergePopoverPlacement = ((_b = max === null || max === void 0 ? void 0 : max.popover) === null || _b === void 0 ? void 0 : _b.placement) || maxPopoverPlacement || 'top';
const mergeProps = Object.assign(Object.assign({
content: childrenHidden
}, max === null || max === void 0 ? void 0 : max.popover), {
classNames: {
root: classnames_default()(`${groupPrefixCls}-popover`, (_d = (_c = max === null || max === void 0 ? void 0 : max.popover) === null || _c === void 0 ? void 0 : _c.classNames) === null || _d === void 0 ? void 0 : _d.root)
},
placement: mergePopoverPlacement,
trigger: mergePopoverTrigger
});
childrenShow.push(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(popover, Object.assign({
key: "avatar-popover-key",
destroyTooltipOnHide: true
}, mergeProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(avatar_Avatar, {
style: mergeStyle
}, `+${numOfChildren - mergeCount}`)));
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AvatarContextProvider, {
shape: shape,
size: size
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls,
style: style
}, childrenShow)));
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AvatarContextProvider, {
shape: shape,
size: size
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls,
style: style
}, childrenWithProps)));
};
/* harmony default export */ var avatar_AvatarGroup = (AvatarGroup);
;// ./components/avatar/index.tsx
const components_avatar_Avatar = avatar_Avatar;
components_avatar_Avatar.Group = avatar_AvatarGroup;
/* harmony default export */ var avatar = (components_avatar_Avatar);
;// ./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignTopOutlined.js
// This icon file is generated automatically.
var VerticalAlignTopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z" } }] }, "name": "vertical-align-top", "theme": "outlined" };
/* harmony default export */ var asn_VerticalAlignTopOutlined = (VerticalAlignTopOutlined);
;// ./node_modules/@ant-design/icons/es/icons/VerticalAlignTopOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var VerticalAlignTopOutlined_VerticalAlignTopOutlined = function VerticalAlignTopOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_VerticalAlignTopOutlined
}));
};
/** */
var VerticalAlignTopOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(VerticalAlignTopOutlined_VerticalAlignTopOutlined);
if (true) {
VerticalAlignTopOutlined_RefIcon.displayName = 'VerticalAlignTopOutlined';
}
/* harmony default export */ var icons_VerticalAlignTopOutlined = (VerticalAlignTopOutlined_RefIcon);
// EXTERNAL MODULE: ./components/back-top/style/index.ts
var back_top_style = __webpack_require__("./components/back-top/style/index.ts");
;// ./components/back-top/index.tsx
const BackTop = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
visibilityHeight = 400,
target,
onClick,
duration = 450
} = props;
const [visible, setVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(visibilityHeight === 0);
const ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const getDefaultTarget = () => {
var _a;
return ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window;
};
const handleScroll = _util_throttleByAnimationFrame(e => {
const scrollTop = _util_getScroll(e.target);
setVisible(scrollTop >= visibilityHeight);
});
if (true) {
const warning = (0,_util_warning.devUseWarning)('BackTop');
warning.deprecated(false, 'BackTop', 'FloatButton.BackTop');
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const getTarget = target || getDefaultTarget;
const container = getTarget();
handleScroll({
target: container
});
container === null || container === void 0 ? void 0 : container.addEventListener('scroll', handleScroll);
return () => {
handleScroll.cancel();
container === null || container === void 0 ? void 0 : container.removeEventListener('scroll', handleScroll);
};
}, [target]);
const scrollToTop = e => {
scrollTo(0, {
getContainer: target || getDefaultTarget,
duration
});
onClick === null || onClick === void 0 ? void 0 : onClick(e);
};
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('back-top', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const [wrapCSSVar, hashId, cssVarCls] = (0,back_top_style["default"])(prefixCls);
const classString = classnames_default()(hashId, cssVarCls, prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName);
// fix https://fb.me/react-unknown-prop
const divProps = (0,omit["default"])(props, ['prefixCls', 'className', 'rootClassName', 'children', 'visibilityHeight', 'target']);
const defaultElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-content`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-icon`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_VerticalAlignTopOutlined, null)));
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, divProps, {
className: classString,
onClick: scrollToTop,
ref: ref
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: visible,
motionName: `${rootPrefixCls}-fade`
}, _ref => {
let {
className: motionClassName
} = _ref;
return (0,reactNode.cloneElement)(props.children || defaultElement, _ref2 => {
let {
className: cloneCls
} = _ref2;
return {
className: classnames_default()(motionClassName, cloneCls)
};
});
})));
};
if (true) {
BackTop.displayName = 'BackTop';
}
/* harmony default export */ var back_top = (BackTop);
// EXTERNAL MODULE: ./components/badge/style/index.ts
var badge_style = __webpack_require__("./components/badge/style/index.ts");
// EXTERNAL MODULE: ./components/theme/util/genPresetColor.ts
var genPresetColor = __webpack_require__("./components/theme/util/genPresetColor.ts");
;// ./components/badge/style/ribbon.ts
// ============================== Ribbon ==============================
const genRibbonStyle = token => {
const {
antCls,
badgeFontHeight,
marginXS,
badgeRibbonOffset,
calc
} = token;
const ribbonPrefixCls = `${antCls}-ribbon`;
const ribbonWrapperPrefixCls = `${antCls}-ribbon-wrapper`;
const statusRibbonPreset = (0,genPresetColor["default"])(token, (colorKey, _ref) => {
let {
darkColor
} = _ref;
return {
[`&${ribbonPrefixCls}-color-${colorKey}`]: {
background: darkColor,
color: darkColor
}
};
});
return {
[ribbonWrapperPrefixCls]: {
position: 'relative'
},
[ribbonPrefixCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), {
position: 'absolute',
top: marginXS,
padding: `0 ${(0,cssinjs.unit)(token.paddingXS)}`,
color: token.colorPrimary,
lineHeight: (0,cssinjs.unit)(badgeFontHeight),
whiteSpace: 'nowrap',
backgroundColor: token.colorPrimary,
borderRadius: token.borderRadiusSM,
[`${ribbonPrefixCls}-text`]: {
color: token.badgeTextColor
},
[`${ribbonPrefixCls}-corner`]: {
position: 'absolute',
top: '100%',
width: badgeRibbonOffset,
height: badgeRibbonOffset,
color: 'currentcolor',
border: `${(0,cssinjs.unit)(calc(badgeRibbonOffset).div(2).equal())} solid`,
transform: token.badgeRibbonCornerTransform,
transformOrigin: 'top',
filter: token.badgeRibbonCornerFilter
}
}), statusRibbonPreset), {
[`&${ribbonPrefixCls}-placement-end`]: {
insetInlineEnd: calc(badgeRibbonOffset).mul(-1).equal(),
borderEndEndRadius: 0,
[`${ribbonPrefixCls}-corner`]: {
insetInlineEnd: 0,
borderInlineEndColor: 'transparent',
borderBlockEndColor: 'transparent'
}
},
[`&${ribbonPrefixCls}-placement-start`]: {
insetInlineStart: calc(badgeRibbonOffset).mul(-1).equal(),
borderEndStartRadius: 0,
[`${ribbonPrefixCls}-corner`]: {
insetInlineStart: 0,
borderBlockEndColor: 'transparent',
borderInlineStartColor: 'transparent'
}
},
// ====================== RTL =======================
'&-rtl': {
direction: 'rtl'
}
})
};
};
// ============================== Export ==============================
/* harmony default export */ var ribbon = ((0,genStyleUtils.genStyleHooks)(['Badge', 'Ribbon'], token => {
const badgeToken = (0,badge_style.prepareToken)(token);
return genRibbonStyle(badgeToken);
}, badge_style.prepareComponentToken));
;// ./components/badge/Ribbon.tsx
const Ribbon = props => {
const {
className,
prefixCls: customizePrefixCls,
style,
color,
children,
text,
placement = 'end',
rootClassName
} = props;
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('ribbon', customizePrefixCls);
const wrapperCls = `${prefixCls}-wrapper`;
const [wrapCSSVar, hashId, cssVarCls] = ribbon(prefixCls, wrapperCls);
const colorInPreset = isPresetColor(color, false);
const ribbonCls = classnames_default()(prefixCls, `${prefixCls}-placement-${placement}`, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-color-${color}`]: colorInPreset
}, className);
const colorStyle = {};
const cornerColorStyle = {};
if (color && !colorInPreset) {
colorStyle.background = color;
cornerColorStyle.color = color;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(wrapperCls, rootClassName, hashId, cssVarCls)
}, children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(ribbonCls, hashId),
style: Object.assign(Object.assign({}, colorStyle), style)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-text`
}, text), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-corner`,
style: cornerColorStyle
}))));
};
if (true) {
Ribbon.displayName = 'Ribbon';
}
/* harmony default export */ var badge_Ribbon = (Ribbon);
;// ./components/badge/SingleNumber.tsx
const UnitNumber = props => {
const {
prefixCls,
value,
current,
offset = 0
} = props;
let style;
if (offset) {
style = {
position: 'absolute',
top: `${offset}00%`,
left: 0
};
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: style,
className: classnames_default()(`${prefixCls}-only-unit`, {
current
})
}, value);
};
function getOffset(start, end, unit) {
let index = start;
let offset = 0;
while ((index + 10) % 10 !== end) {
index += unit;
offset += unit;
}
return offset;
}
const SingleNumber = props => {
const {
prefixCls,
count: originCount,
value: originValue
} = props;
const value = Number(originValue);
const count = Math.abs(originCount);
const [prevValue, setPrevValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value);
const [prevCount, setPrevCount] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(count);
// ============================= Events =============================
const onTransitionEnd = () => {
setPrevValue(value);
setPrevCount(count);
};
// Fallback if transition events are not supported
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const timer = setTimeout(onTransitionEnd, 1000);
return () => clearTimeout(timer);
}, [value]);
// ============================= Render =============================
// Render unit list
let unitNodes;
let offsetStyle;
if (prevValue === value || Number.isNaN(value) || Number.isNaN(prevValue)) {
// Nothing to change
unitNodes = [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UnitNumber, Object.assign({}, props, {
key: value,
current: true
}))];
offsetStyle = {
transition: 'none'
};
} else {
unitNodes = [];
// Fill basic number units
const end = value + 10;
const unitNumberList = [];
for (let index = value; index <= end; index += 1) {
unitNumberList.push(index);
}
const unit = prevCount < count ? 1 : -1;
// Fill with number unit nodes
const prevIndex = unitNumberList.findIndex(n => n % 10 === prevValue);
// Cut list
const cutUnitNumberList = unit < 0 ? unitNumberList.slice(0, prevIndex + 1) : unitNumberList.slice(prevIndex);
unitNodes = cutUnitNumberList.map((n, index) => {
const singleUnit = n % 10;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UnitNumber, Object.assign({}, props, {
key: n,
value: singleUnit,
offset: unit < 0 ? index - prevIndex : index,
current: index === prevIndex
}));
});
// Calculate container offset value
offsetStyle = {
transform: `translateY(${-getOffset(prevValue, value, unit)}00%)`
};
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-only`,
style: offsetStyle,
onTransitionEnd: onTransitionEnd
}, unitNodes);
};
/* harmony default export */ var badge_SingleNumber = (SingleNumber);
;// ./components/badge/ScrollNumber.tsx
var ScrollNumber_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;
};
const ScrollNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
count,
className,
motionClassName,
style,
title,
show,
component: Component = 'sup',
children
} = props,
restProps = ScrollNumber_rest(props, ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
// ============================ Render ============================
const newProps = Object.assign(Object.assign({}, restProps), {
'data-show': show,
style,
className: classnames_default()(prefixCls, className, motionClassName),
title: title
});
// Only integer need motion
let numberNodes = count;
if (count && Number(count) % 1 === 0) {
const numberList = String(count).split('');
numberNodes = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("bdi", null, numberList.map((num, i) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(badge_SingleNumber, {
prefixCls: prefixCls,
count: Number(count),
value: num,
// eslint-disable-next-line react/no-array-index-key
key: numberList.length - i
}))));
}
// 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 === null || style === void 0 ? void 0 : style.borderColor) {
newProps.style = Object.assign(Object.assign({}, style), {
boxShadow: `0 0 0 1px ${style.borderColor} inset`
});
}
if (children) {
return (0,reactNode.cloneElement)(children, oriProps => ({
className: classnames_default()(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)
}));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({}, newProps, {
ref: ref
}), numberNodes);
});
/* harmony default export */ var badge_ScrollNumber = (ScrollNumber);
;// ./components/badge/index.tsx
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;
};
const InternalBadge = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a, _b, _c, _d, _e;
const {
prefixCls: customizePrefixCls,
scrollNumberPrefixCls: customizeScrollNumberPrefixCls,
children,
status,
text,
color,
count = null,
overflowCount = 99,
dot = false,
size = 'default',
title,
offset,
style,
className,
rootClassName,
classNames,
styles,
showZero = false
} = props,
restProps = badge_rest(props, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "rootClassName", "classNames", "styles", "showZero"]);
const {
getPrefixCls,
direction,
badge
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('badge', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,badge_style["default"])(prefixCls);
// ================================ Misc ================================
const numberedDisplayCount = count > overflowCount ? `${overflowCount}+` : count;
const isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0;
const ignoreCount = count === null || isZero && !showZero;
const hasStatus = (status !== null && status !== undefined || color !== null && color !== undefined) && ignoreCount;
const showAsDot = dot && !isZero;
const mergedCount = showAsDot ? '' : numberedDisplayCount;
const isHidden = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
const isEmpty = mergedCount === null || mergedCount === undefined || mergedCount === '';
return (isEmpty || isZero && !showZero) && !showAsDot;
}, [mergedCount, isZero, showZero, showAsDot]);
// Count should be cache in case hidden change it
const countRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(count);
if (!isHidden) {
countRef.current = count;
}
const livingCount = countRef.current;
// We need cache count since remove motion should not change count display
const displayCountRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(mergedCount);
if (!isHidden) {
displayCountRef.current = mergedCount;
}
const displayCount = displayCountRef.current;
// We will cache the dot status to avoid shaking on leaved motion
const isDotRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(showAsDot);
if (!isHidden) {
isDotRef.current = showAsDot;
}
// =============================== Styles ===============================
const mergedStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (!offset) {
return Object.assign(Object.assign({}, badge === null || badge === void 0 ? void 0 : badge.style), style);
}
const offsetStyle = {
marginTop: offset[1]
};
if (direction === 'rtl') {
offsetStyle.left = parseInt(offset[0], 10);
} else {
offsetStyle.right = -parseInt(offset[0], 10);
}
return Object.assign(Object.assign(Object.assign({}, offsetStyle), badge === null || badge === void 0 ? void 0 : badge.style), style);
}, [direction, offset, style, badge === null || badge === void 0 ? void 0 : badge.style]);
// =============================== Render ===============================
// >>> Title
const titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined;
// >>> Status Text
const statusTextNode = isHidden || !text ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-status-text`
}, text);
// >>> Display Component
const displayNode = !livingCount || typeof livingCount !== 'object' ? undefined : (0,reactNode.cloneElement)(livingCount, oriProps => ({
style: Object.assign(Object.assign({}, mergedStyle), oriProps.style)
}));
// InternalColor
const isInternalColor = isPresetColor(color, false);
// Shared styles
const statusCls = classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.indicator, (_a = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _a === void 0 ? void 0 : _a.indicator, {
[`${prefixCls}-status-dot`]: hasStatus,
[`${prefixCls}-status-${status}`]: !!status,
[`${prefixCls}-color-${color}`]: isInternalColor
});
const statusStyle = {};
if (color && !isInternalColor) {
statusStyle.color = color;
statusStyle.background = color;
}
const badgeClassName = classnames_default()(prefixCls, {
[`${prefixCls}-status`]: hasStatus,
[`${prefixCls}-not-a-wrapper`]: !children,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, badge === null || badge === void 0 ? void 0 : badge.className, (_b = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _b === void 0 ? void 0 : _b.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, hashId, cssVarCls);
// <Badge status="success" />
if (!children && hasStatus) {
const statusTextColor = mergedStyle.color;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, restProps, {
className: badgeClassName,
style: Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.root), (_c = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _c === void 0 ? void 0 : _c.root), mergedStyle)
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: statusCls,
style: Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.indicator), (_d = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _d === void 0 ? void 0 : _d.indicator), statusStyle)
}), text && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: {
color: statusTextColor
},
className: `${prefixCls}-status-text`
}, text))));
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({
ref: ref
}, restProps, {
className: badgeClassName,
style: Object.assign(Object.assign({}, (_e = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _e === void 0 ? void 0 : _e.root), styles === null || styles === void 0 ? void 0 : styles.root)
}), children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: !isHidden,
motionName: `${prefixCls}-zoom`,
motionAppear: false,
motionDeadline: 1000
}, _ref => {
let {
className: motionClassName
} = _ref;
var _a, _b;
const scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);
const isDot = isDotRef.current;
const scrollNumberCls = classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.indicator, (_a = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _a === void 0 ? void 0 : _a.indicator, {
[`${prefixCls}-dot`]: isDot,
[`${prefixCls}-count`]: !isDot,
[`${prefixCls}-count-sm`]: size === 'small',
[`${prefixCls}-multiple-words`]: !isDot && displayCount && displayCount.toString().length > 1,
[`${prefixCls}-status-${status}`]: !!status,
[`${prefixCls}-color-${color}`]: isInternalColor
});
let scrollNumberStyle = Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.indicator), (_b = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _b === void 0 ? void 0 : _b.indicator), mergedStyle);
if (color && !isInternalColor) {
scrollNumberStyle = scrollNumberStyle || {};
scrollNumberStyle.background = color;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(badge_ScrollNumber, {
prefixCls: scrollNumberPrefixCls,
show: !isHidden,
motionClassName: motionClassName,
className: scrollNumberCls,
count: displayCount,
title: titleNode,
style: scrollNumberStyle,
key: "scrollNumber"
}, displayNode);
}), statusTextNode));
});
const Badge = InternalBadge;
Badge.Ribbon = badge_Ribbon;
if (true) {
Badge.displayName = 'Badge';
}
/* harmony default export */ var components_badge = (Badge);
;// ./node_modules/@ant-design/icons-svg/es/asn/LeftOutlined.js
// This icon file is generated automatically.
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
/* harmony default export */ var asn_LeftOutlined = (LeftOutlined);
;// ./node_modules/@ant-design/icons/es/icons/LeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var LeftOutlined_LeftOutlined = function LeftOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_LeftOutlined
}));
};
/** */
var LeftOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(LeftOutlined_LeftOutlined);
if (true) {
LeftOutlined_RefIcon.displayName = 'LeftOutlined';
}
/* harmony default export */ var icons_LeftOutlined = (LeftOutlined_RefIcon);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
var RightOutlined = __webpack_require__("./node_modules/@ant-design/icons/es/icons/RightOutlined.js");
;// ./node_modules/rc-dropdown/es/hooks/useAccessibility.js
var ESC = KeyCode["default"].ESC,
TAB = KeyCode["default"].TAB;
function useAccessibility(_ref) {
var visible = _ref.visible,
triggerRef = _ref.triggerRef,
onVisibleChange = _ref.onVisibleChange,
autoFocus = _ref.autoFocus,
overlayRef = _ref.overlayRef;
var focusMenuRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var handleCloseMenuAndReturnFocus = function handleCloseMenuAndReturnFocus() {
if (visible) {
var _triggerRef$current, _triggerRef$current$f;
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || (_triggerRef$current$f = _triggerRef$current.focus) === null || _triggerRef$current$f === void 0 || _triggerRef$current$f.call(_triggerRef$current);
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(false);
}
};
var focusMenu = function focusMenu() {
var _overlayRef$current;
if ((_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.focus) {
overlayRef.current.focus();
focusMenuRef.current = true;
return true;
}
return false;
};
var handleKeyDown = function handleKeyDown(event) {
switch (event.keyCode) {
case ESC:
handleCloseMenuAndReturnFocus();
break;
case TAB:
{
var focusResult = false;
if (!focusMenuRef.current) {
focusResult = focusMenu();
}
if (focusResult) {
event.preventDefault();
} else {
handleCloseMenuAndReturnFocus();
}
break;
}
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (visible) {
window.addEventListener("keydown", handleKeyDown);
if (autoFocus) {
// FIXME: hack with raf
(0,raf["default"])(focusMenu, 3);
}
return function () {
window.removeEventListener("keydown", handleKeyDown);
focusMenuRef.current = false;
};
}
return function () {
focusMenuRef.current = false;
};
}, [visible]); // eslint-disable-line react-hooks/exhaustive-deps
}
;// ./node_modules/rc-dropdown/es/Overlay.js
var Overlay_Overlay = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
var overlay = props.overlay,
arrow = props.arrow,
prefixCls = props.prefixCls;
var overlayNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var overlayElement;
if (typeof overlay === 'function') {
overlayElement = overlay();
} else {
overlayElement = overlay;
}
return overlayElement;
}, [overlay]);
var composedRef = (0,es_ref.composeRef)(ref, (0,es_ref.getNodeRef)(overlayNode));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, arrow && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-arrow")
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(overlayNode, {
ref: (0,es_ref.supportRef)(overlayNode) ? composedRef : undefined
}));
});
/* harmony default export */ var es_Overlay = (Overlay_Overlay);
;// ./node_modules/rc-dropdown/es/placements.js
var autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
};
var placements_targetOffset = [0, 0];
var placements_placements = {
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: placements_targetOffset
},
top: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: placements_targetOffset
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: placements_targetOffset
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: placements_targetOffset
},
bottom: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: placements_targetOffset
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: placements_targetOffset
}
};
/* harmony default export */ var rc_dropdown_es_placements = (placements_placements);
;// ./node_modules/rc-dropdown/es/Dropdown.js
var Dropdown_excluded = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
function Dropdown(props, ref) {
var _children$props;
var _props$arrow = props.arrow,
arrow = _props$arrow === void 0 ? false : _props$arrow,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls,
transitionName = props.transitionName,
animation = props.animation,
align = props.align,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
_props$placements = props.placements,
placements = _props$placements === void 0 ? rc_dropdown_es_placements : _props$placements,
getPopupContainer = props.getPopupContainer,
showAction = props.showAction,
hideAction = props.hideAction,
overlayClassName = props.overlayClassName,
overlayStyle = props.overlayStyle,
visible = props.visible,
_props$trigger = props.trigger,
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
autoFocus = props.autoFocus,
overlay = props.overlay,
children = props.children,
onVisibleChange = props.onVisibleChange,
otherProps = (0,objectWithoutProperties["default"])(props, Dropdown_excluded);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
triggerVisible = _React$useState2[0],
setTriggerVisible = _React$useState2[1];
var mergedVisible = 'visible' in props ? visible : triggerVisible;
var triggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
var overlayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
var childRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
return triggerRef.current;
});
var handleVisibleChange = function handleVisibleChange(newVisible) {
setTriggerVisible(newVisible);
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(newVisible);
};
useAccessibility({
visible: mergedVisible,
triggerRef: childRef,
onVisibleChange: handleVisibleChange,
autoFocus: autoFocus,
overlayRef: overlayRef
});
var onClick = function onClick(e) {
var onOverlayClick = props.onOverlayClick;
setTriggerVisible(false);
if (onOverlayClick) {
onOverlayClick(e);
}
};
var getMenuElement = function getMenuElement() {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Overlay, {
ref: overlayRef,
overlay: overlay,
prefixCls: prefixCls,
arrow: arrow
});
};
var getMenuElementOrLambda = function getMenuElementOrLambda() {
if (typeof overlay === 'function') {
return getMenuElement;
}
return getMenuElement();
};
var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() {
var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger,
alignPoint = props.alignPoint;
if ('minOverlayWidthMatchTrigger' in props) {
return minOverlayWidthMatchTrigger;
}
return !alignPoint;
};
var getOpenClassName = function getOpenClassName() {
var openClassName = props.openClassName;
if (openClassName !== undefined) {
return openClassName;
}
return "".concat(prefixCls, "-open");
};
var childrenNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
className: classnames_default()((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()),
ref: (0,es_ref.supportRef)(children) ? (0,es_ref.composeRef)(childRef, (0,es_ref.getNodeRef)(children)) : undefined
});
var triggerHideAction = hideAction;
if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
triggerHideAction = ['click'];
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(trigger_es, (0,esm_extends["default"])({
builtinPlacements: placements
}, otherProps, {
prefixCls: prefixCls,
ref: triggerRef,
popupClassName: classnames_default()(overlayClassName, (0,defineProperty["default"])({}, "".concat(prefixCls, "-show-arrow"), arrow)),
popupStyle: overlayStyle,
action: trigger,
showAction: showAction,
hideAction: triggerHideAction,
popupPlacement: placement,
popupAlign: align,
popupTransitionName: transitionName,
popupAnimation: animation,
popupVisible: mergedVisible,
stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '',
popup: getMenuElementOrLambda(),
onPopupVisibleChange: handleVisibleChange,
onPopupClick: onClick,
getPopupContainer: getPopupContainer
}), childrenNode);
}
/* harmony default export */ var es_Dropdown = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Dropdown));
;// ./node_modules/rc-dropdown/es/index.js
/* harmony default export */ var rc_dropdown_es = (es_Dropdown);
;// ./components/_util/isPrimitive.ts
const isPrimitive = value => typeof value !== 'object' && typeof value !== 'function' || value === null;
/* harmony default export */ var _util_isPrimitive = (isPrimitive);
;// ./node_modules/rc-menu/es/context/IdContext.js
var IdContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
function getMenuId(uuid, eventKey) {
if (uuid === undefined) {
return null;
}
return "".concat(uuid, "-").concat(eventKey);
}
/**
* Get `data-menu-id`
*/
function useMenuId(eventKey) {
var id = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(IdContext);
return getMenuId(id, eventKey);
}
;// ./node_modules/rc-menu/es/context/MenuContext.js
var MenuContext_excluded = ["children", "locked"];
var MenuContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
function mergeProps(origin, target) {
var clone = (0,objectSpread2["default"])({}, origin);
Object.keys(target).forEach(function (key) {
var value = target[key];
if (value !== undefined) {
clone[key] = value;
}
});
return clone;
}
function InheritableContextProvider(_ref) {
var children = _ref.children,
locked = _ref.locked,
restProps = (0,objectWithoutProperties["default"])(_ref, MenuContext_excluded);
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext);
var inheritableContext = (0,useMemo["default"])(function () {
return mergeProps(context, restProps);
}, [context, restProps], function (prev, next) {
return !locked && (prev[0] !== next[0] || !(0,isEqual["default"])(prev[1], next[1], true));
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MenuContext.Provider, {
value: inheritableContext
}, children);
}
;// ./node_modules/rc-menu/es/context/PathContext.js
var EmptyList = [];
// ========================= Path Register =========================
var PathRegisterContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
function useMeasure() {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PathRegisterContext);
}
// ========================= Path Tracker ==========================
var PathTrackerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(EmptyList);
function useFullPath(eventKey) {
var parentKeyPath = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PathTrackerContext);
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return eventKey !== undefined ? [].concat((0,toConsumableArray["default"])(parentKeyPath), [eventKey]) : parentKeyPath;
}, [parentKeyPath, eventKey]);
}
// =========================== Path User ===========================
var PathUserContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
;// ./node_modules/rc-menu/es/context/PrivateContext.js
var PrivateContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
/* harmony default export */ var context_PrivateContext = (PrivateContext);
;// ./node_modules/rc-util/es/Dom/focus.js
function focusable(node) {
var includePositive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (isVisible(node)) {
var nodeName = node.nodeName.toLowerCase();
var isFocusableElement =
// Focusable element
['input', 'select', 'textarea', 'button'].includes(nodeName) ||
// Editable element
node.isContentEditable ||
// Anchor with href element
nodeName === 'a' && !!node.getAttribute('href');
// Get tabIndex
var tabIndexAttr = node.getAttribute('tabindex');
var tabIndexNum = Number(tabIndexAttr);
// Parse as number if validate
var tabIndex = null;
if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {
tabIndex = tabIndexNum;
} else if (isFocusableElement && tabIndex === null) {
tabIndex = 0;
}
// Block focusable if disabled
if (isFocusableElement && node.disabled) {
tabIndex = null;
}
return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);
}
return false;
}
function getFocusNodeList(node) {
var includePositive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var res = (0,toConsumableArray["default"])(node.querySelectorAll('*')).filter(function (child) {
return focusable(child, includePositive);
});
if (focusable(node, includePositive)) {
res.unshift(node);
}
return res;
}
var lastFocusElement = null;
/** @deprecated Do not use since this may failed when used in async */
function saveLastFocusNode() {
lastFocusElement = document.activeElement;
}
/** @deprecated Do not use since this may failed when used in async */
function clearLastFocusNode() {
lastFocusElement = null;
}
/** @deprecated Do not use since this may failed when used in async */
function backLastFocusNode() {
if (lastFocusElement) {
try {
// 元素可能已经被移动了
lastFocusElement.focus();
/* eslint-disable no-empty */
} catch (e) {
// empty
}
/* eslint-enable no-empty */
}
}
function limitTabRange(node, e) {
if (e.keyCode === 9) {
var tabNodeList = getFocusNodeList(node);
var lastTabNode = tabNodeList[e.shiftKey ? 0 : tabNodeList.length - 1];
var leavingTab = lastTabNode === document.activeElement || node === document.activeElement;
if (leavingTab) {
var target = tabNodeList[e.shiftKey ? tabNodeList.length - 1 : 0];
target.focus();
e.preventDefault();
}
}
}
;// ./node_modules/rc-menu/es/hooks/useAccessibility.js
// destruct to reduce minify size
var LEFT = KeyCode["default"].LEFT,
RIGHT = KeyCode["default"].RIGHT,
UP = KeyCode["default"].UP,
DOWN = KeyCode["default"].DOWN,
ENTER = KeyCode["default"].ENTER,
useAccessibility_ESC = KeyCode["default"].ESC,
HOME = KeyCode["default"].HOME,
END = KeyCode["default"].END;
var ArrowKeys = [UP, DOWN, LEFT, RIGHT];
function useAccessibility_getOffset(mode, isRootLevel, isRtl, which) {
var _offsets;
var prev = 'prev';
var next = 'next';
var children = 'children';
var parent = 'parent';
// Inline enter is special that we use unique operation
if (mode === 'inline' && which === ENTER) {
return {
inlineTrigger: true
};
}
var inline = (0,defineProperty["default"])((0,defineProperty["default"])({}, UP, prev), DOWN, next);
var horizontal = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, LEFT, isRtl ? next : prev), RIGHT, isRtl ? prev : next), DOWN, children), ENTER, children);
var vertical = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, UP, prev), DOWN, next), ENTER, children), useAccessibility_ESC, parent), LEFT, isRtl ? children : parent), RIGHT, isRtl ? parent : children);
var offsets = {
inline: inline,
horizontal: horizontal,
vertical: vertical,
inlineSub: inline,
horizontalSub: vertical,
verticalSub: vertical
};
var type = (_offsets = offsets["".concat(mode).concat(isRootLevel ? '' : 'Sub')]) === null || _offsets === void 0 ? void 0 : _offsets[which];
switch (type) {
case prev:
return {
offset: -1,
sibling: true
};
case next:
return {
offset: 1,
sibling: true
};
case parent:
return {
offset: -1,
sibling: false
};
case children:
return {
offset: 1,
sibling: false
};
default:
return null;
}
}
function findContainerUL(element) {
var current = element;
while (current) {
if (current.getAttribute('data-menu-list')) {
return current;
}
current = current.parentElement;
}
// Normally should not reach this line
/* istanbul ignore next */
return null;
}
/**
* Find focused element within element set provided
*/
function getFocusElement(activeElement, elements) {
var current = activeElement || document.activeElement;
while (current) {
if (elements.has(current)) {
return current;
}
current = current.parentElement;
}
return null;
}
/**
* Get focusable elements from the element set under provided container
*/
function getFocusableElements(container, elements) {
var list = getFocusNodeList(container, true);
return list.filter(function (ele) {
return elements.has(ele);
});
}
function getNextFocusElement(parentQueryContainer, elements, focusMenuElement) {
var offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
// Key on the menu item will not get validate parent container
if (!parentQueryContainer) {
return null;
}
// List current level menu item elements
var sameLevelFocusableMenuElementList = getFocusableElements(parentQueryContainer, elements);
// Find next focus index
var count = sameLevelFocusableMenuElementList.length;
var focusIndex = sameLevelFocusableMenuElementList.findIndex(function (ele) {
return focusMenuElement === ele;
});
if (offset < 0) {
if (focusIndex === -1) {
focusIndex = count - 1;
} else {
focusIndex -= 1;
}
} else if (offset > 0) {
focusIndex += 1;
}
focusIndex = (focusIndex + count) % count;
// Focus menu item
return sameLevelFocusableMenuElementList[focusIndex];
}
var refreshElements = function refreshElements(keys, id) {
var elements = new Set();
var key2element = new Map();
var element2key = new Map();
keys.forEach(function (key) {
var element = document.querySelector("[data-menu-id='".concat(getMenuId(id, key), "']"));
if (element) {
elements.add(element);
element2key.set(element, key);
key2element.set(key, element);
}
});
return {
elements: elements,
key2element: key2element,
element2key: element2key
};
};
function useAccessibility_useAccessibility(mode, activeKey, isRtl, id, containerRef, getKeys, getKeyPath, triggerActiveKey, triggerAccessibilityOpen, originOnKeyDown) {
var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var activeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
activeRef.current = activeKey;
var cleanRaf = function cleanRaf() {
raf["default"].cancel(rafRef.current);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
cleanRaf();
};
}, []);
return function (e) {
var which = e.which;
if ([].concat(ArrowKeys, [ENTER, useAccessibility_ESC, HOME, END]).includes(which)) {
var keys = getKeys();
var refreshedElements = refreshElements(keys, id);
var _refreshedElements = refreshedElements,
elements = _refreshedElements.elements,
key2element = _refreshedElements.key2element,
element2key = _refreshedElements.element2key;
// First we should find current focused MenuItem/SubMenu element
var activeElement = key2element.get(activeKey);
var focusMenuElement = getFocusElement(activeElement, elements);
var focusMenuKey = element2key.get(focusMenuElement);
var offsetObj = useAccessibility_getOffset(mode, getKeyPath(focusMenuKey, true).length === 1, isRtl, which);
// Some mode do not have fully arrow operation like inline
if (!offsetObj && which !== HOME && which !== END) {
return;
}
// Arrow prevent default to avoid page scroll
if (ArrowKeys.includes(which) || [HOME, END].includes(which)) {
e.preventDefault();
}
var tryFocus = function tryFocus(menuElement) {
if (menuElement) {
var focusTargetElement = menuElement;
// Focus to link instead of menu item if possible
var link = menuElement.querySelector('a');
if (link !== null && link !== void 0 && link.getAttribute('href')) {
focusTargetElement = link;
}
var targetKey = element2key.get(menuElement);
triggerActiveKey(targetKey);
/**
* Do not `useEffect` here since `tryFocus` may trigger async
* which makes React sync update the `activeKey`
* that force render before `useRef` set the next activeKey
*/
cleanRaf();
rafRef.current = (0,raf["default"])(function () {
if (activeRef.current === targetKey) {
focusTargetElement.focus();
}
});
}
};
if ([HOME, END].includes(which) || offsetObj.sibling || !focusMenuElement) {
// ========================== Sibling ==========================
// Find walkable focus menu element container
var parentQueryContainer;
if (!focusMenuElement || mode === 'inline') {
parentQueryContainer = containerRef.current;
} else {
parentQueryContainer = findContainerUL(focusMenuElement);
}
// Get next focus element
var targetElement;
var focusableElements = getFocusableElements(parentQueryContainer, elements);
if (which === HOME) {
targetElement = focusableElements[0];
} else if (which === END) {
targetElement = focusableElements[focusableElements.length - 1];
} else {
targetElement = getNextFocusElement(parentQueryContainer, elements, focusMenuElement, offsetObj.offset);
}
// Focus menu item
tryFocus(targetElement);
// ======================= InlineTrigger =======================
} else if (offsetObj.inlineTrigger) {
// Inline trigger no need switch to sub menu item
triggerAccessibilityOpen(focusMenuKey);
// =========================== Level ===========================
} else if (offsetObj.offset > 0) {
triggerAccessibilityOpen(focusMenuKey, true);
cleanRaf();
rafRef.current = (0,raf["default"])(function () {
// Async should resync elements
refreshedElements = refreshElements(keys, id);
var controlId = focusMenuElement.getAttribute('aria-controls');
var subQueryContainer = document.getElementById(controlId);
// Get sub focusable menu item
var targetElement = getNextFocusElement(subQueryContainer, refreshedElements.elements);
// Focus menu item
tryFocus(targetElement);
}, 5);
} else if (offsetObj.offset < 0) {
var keyPath = getKeyPath(focusMenuKey, true);
var parentKey = keyPath[keyPath.length - 2];
var parentMenuElement = key2element.get(parentKey);
// Focus menu item
triggerAccessibilityOpen(parentKey, false);
tryFocus(parentMenuElement);
}
}
// Pass origin key down event
originOnKeyDown === null || originOnKeyDown === void 0 || originOnKeyDown(e);
};
}
;// ./node_modules/rc-menu/es/utils/timeUtil.js
function nextSlice(callback) {
/* istanbul ignore next */
Promise.resolve().then(callback);
}
;// ./node_modules/rc-menu/es/hooks/useKeyRecords.js
var PATH_SPLIT = '__RC_UTIL_PATH_SPLIT__';
var getPathStr = function getPathStr(keyPath) {
return keyPath.join(PATH_SPLIT);
};
var getPathKeys = function getPathKeys(keyPathStr) {
return keyPathStr.split(PATH_SPLIT);
};
var OVERFLOW_KEY = 'rc-menu-more';
function useKeyRecords() {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
internalForceUpdate = _React$useState2[1];
var key2pathRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new Map());
var path2keyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new Map());
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
overflowKeys = _React$useState4[0],
setOverflowKeys = _React$useState4[1];
var updateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
var destroyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var forceUpdate = function forceUpdate() {
if (!destroyRef.current) {
internalForceUpdate({});
}
};
var registerPath = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (key, keyPath) {
// Warning for invalidate or duplicated `key`
if (true) {
(0,warning["default"])(!key2pathRef.current.has(key), "Duplicated key '".concat(key, "' used in Menu by path [").concat(keyPath.join(' > '), "]"));
}
// Fill map
var connectedPath = getPathStr(keyPath);
path2keyRef.current.set(connectedPath, key);
key2pathRef.current.set(key, connectedPath);
updateRef.current += 1;
var id = updateRef.current;
nextSlice(function () {
if (id === updateRef.current) {
forceUpdate();
}
});
}, []);
var unregisterPath = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (key, keyPath) {
var connectedPath = getPathStr(keyPath);
path2keyRef.current.delete(connectedPath);
key2pathRef.current.delete(key);
}, []);
var refreshOverflowKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (keys) {
setOverflowKeys(keys);
}, []);
var getKeyPath = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (eventKey, includeOverflow) {
var fullPath = key2pathRef.current.get(eventKey) || '';
var keys = getPathKeys(fullPath);
if (includeOverflow && overflowKeys.includes(keys[0])) {
keys.unshift(OVERFLOW_KEY);
}
return keys;
}, [overflowKeys]);
var isSubPathKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (pathKeys, eventKey) {
return pathKeys.filter(function (item) {
return item !== undefined;
}).some(function (pathKey) {
var pathKeyList = getKeyPath(pathKey, true);
return pathKeyList.includes(eventKey);
});
}, [getKeyPath]);
var getKeys = function getKeys() {
var keys = (0,toConsumableArray["default"])(key2pathRef.current.keys());
if (overflowKeys.length) {
keys.push(OVERFLOW_KEY);
}
return keys;
};
/**
* Find current key related child path keys
*/
var getSubPathKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (key) {
var connectedPath = "".concat(key2pathRef.current.get(key)).concat(PATH_SPLIT);
var pathKeys = new Set();
(0,toConsumableArray["default"])(path2keyRef.current.keys()).forEach(function (pathKey) {
if (pathKey.startsWith(connectedPath)) {
pathKeys.add(path2keyRef.current.get(pathKey));
}
});
return pathKeys;
}, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
destroyRef.current = true;
};
}, []);
return {
// Register
registerPath: registerPath,
unregisterPath: unregisterPath,
refreshOverflowKeys: refreshOverflowKeys,
// Util
isSubPathKey: isSubPathKey,
getKeyPath: getKeyPath,
getKeys: getKeys,
getSubPathKeys: getSubPathKeys
};
}
;// ./node_modules/rc-menu/es/hooks/useMemoCallback.js
/**
* Cache callback function that always return same ref instead.
* This is used for context optimization.
*/
function useMemoCallback(func) {
var funRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(func);
funRef.current = func;
var callback = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
var _funRef$current;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return (_funRef$current = funRef.current) === null || _funRef$current === void 0 ? void 0 : _funRef$current.call.apply(_funRef$current, [funRef].concat(args));
}, []);
return func ? callback : undefined;
}
;// ./node_modules/rc-menu/es/hooks/useUUID.js
var uniquePrefix = Math.random().toFixed(5).toString().slice(2);
var internalId = 0;
function useUUID(id) {
var _useMergedState = (0,useMergedState["default"])(id, {
value: id
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
uuid = _useMergedState2[0],
setUUID = _useMergedState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
internalId += 1;
var newId = false ? 0 : "".concat(uniquePrefix, "-").concat(internalId);
setUUID("rc-menu-uuid-".concat(newId));
}, []);
return uuid;
}
;// ./node_modules/rc-menu/es/hooks/useActive.js
function useActive(eventKey, disabled, onMouseEnter, onMouseLeave) {
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
activeKey = _React$useContext.activeKey,
onActive = _React$useContext.onActive,
onInactive = _React$useContext.onInactive;
var ret = {
active: activeKey === eventKey
};
// Skip when disabled
if (!disabled) {
ret.onMouseEnter = function (domEvent) {
onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter({
key: eventKey,
domEvent: domEvent
});
onActive(eventKey);
};
ret.onMouseLeave = function (domEvent) {
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave({
key: eventKey,
domEvent: domEvent
});
onInactive(eventKey);
};
}
return ret;
}
;// ./node_modules/rc-menu/es/hooks/useDirectionStyle.js
function useDirectionStyle(level) {
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
mode = _React$useContext.mode,
rtl = _React$useContext.rtl,
inlineIndent = _React$useContext.inlineIndent;
if (mode !== 'inline') {
return null;
}
var len = level;
return rtl ? {
paddingRight: len * inlineIndent
} : {
paddingLeft: len * inlineIndent
};
}
;// ./node_modules/rc-menu/es/Icon.js
function Icon(_ref) {
var icon = _ref.icon,
props = _ref.props,
children = _ref.children;
var iconNode;
if (icon === null || icon === false) {
return null;
}
if (typeof icon === 'function') {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icon, (0,objectSpread2["default"])({}, props));
} else if (typeof icon !== "boolean") {
// Compatible for origin definition
iconNode = icon;
}
return iconNode || children || null;
}
;// ./node_modules/rc-menu/es/utils/warnUtil.js
var warnUtil_excluded = ["item"];
/**
* `onClick` event return `info.item` which point to react node directly.
* We should warning this since it will not work on FC.
*/
function warnItemProp(_ref) {
var item = _ref.item,
restInfo = (0,objectWithoutProperties["default"])(_ref, warnUtil_excluded);
Object.defineProperty(restInfo, 'item', {
get: function get() {
(0,warning["default"])(false, '`info.item` is deprecated since we will move to function component that not provides React Node instance in future.');
return item;
}
});
return restInfo;
}
;// ./node_modules/rc-menu/es/MenuItem.js
var MenuItem_excluded = ["title", "attribute", "elementRef"],
MenuItem_excluded2 = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"],
MenuItem_excluded3 = ["active"];
// Since Menu event provide the `info.item` which point to the MenuItem node instance.
// We have to use class component here.
// This should be removed from doc & api in future.
var LegacyMenuItem = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(LegacyMenuItem, _React$Component);
var _super = (0,createSuper["default"])(LegacyMenuItem);
function LegacyMenuItem() {
(0,classCallCheck["default"])(this, LegacyMenuItem);
return _super.apply(this, arguments);
}
(0,createClass["default"])(LegacyMenuItem, [{
key: "render",
value: function render() {
var _this$props = this.props,
title = _this$props.title,
attribute = _this$props.attribute,
elementRef = _this$props.elementRef,
restProps = (0,objectWithoutProperties["default"])(_this$props, MenuItem_excluded);
// Here the props are eventually passed to the DOM element.
// React does not recognize non-standard attributes.
// Therefore, remove the props that is not used here.
// ref: https://github.com/ant-design/ant-design/issues/41395
var passedProps = (0,omit["default"])(restProps, ['eventKey', 'popupClassName', 'popupOffset', 'onTitleClick']);
(0,warning["default"])(!attribute, '`attribute` of Menu.Item is deprecated. Please pass attribute directly.');
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es.Item, (0,esm_extends["default"])({}, attribute, {
title: typeof title === 'string' ? title : undefined
}, passedProps, {
ref: elementRef
}));
}
}]);
return LegacyMenuItem;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
/**
* Real Menu Item component
*/
var InternalMenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var style = props.style,
className = props.className,
eventKey = props.eventKey,
warnKey = props.warnKey,
disabled = props.disabled,
itemIcon = props.itemIcon,
children = props.children,
role = props.role,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onClick = props.onClick,
onKeyDown = props.onKeyDown,
onFocus = props.onFocus,
restProps = (0,objectWithoutProperties["default"])(props, MenuItem_excluded2);
var domDataId = useMenuId(eventKey);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
prefixCls = _React$useContext.prefixCls,
onItemClick = _React$useContext.onItemClick,
contextDisabled = _React$useContext.disabled,
overflowDisabled = _React$useContext.overflowDisabled,
contextItemIcon = _React$useContext.itemIcon,
selectedKeys = _React$useContext.selectedKeys,
onActive = _React$useContext.onActive;
var _React$useContext2 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_PrivateContext),
_internalRenderMenuItem = _React$useContext2._internalRenderMenuItem;
var itemCls = "".concat(prefixCls, "-item");
var legacyMenuItemRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var mergedDisabled = contextDisabled || disabled;
var mergedEleRef = (0,es_ref.useComposeRef)(ref, elementRef);
var connectedKeys = useFullPath(eventKey);
// ================================ Warn ================================
if ( true && warnKey) {
(0,warning["default"])(false, 'MenuItem should not leave undefined `key`.');
}
// ============================= Info =============================
var getEventInfo = function getEventInfo(e) {
return {
key: eventKey,
// Note: For legacy code is reversed which not like other antd component
keyPath: (0,toConsumableArray["default"])(connectedKeys).reverse(),
item: legacyMenuItemRef.current,
domEvent: e
};
};
// ============================= Icon =============================
var mergedItemIcon = itemIcon || contextItemIcon;
// ============================ Active ============================
var _useActive = useActive(eventKey, mergedDisabled, onMouseEnter, onMouseLeave),
active = _useActive.active,
activeProps = (0,objectWithoutProperties["default"])(_useActive, MenuItem_excluded3);
// ============================ Select ============================
var selected = selectedKeys.includes(eventKey);
// ======================== DirectionStyle ========================
var directionStyle = useDirectionStyle(connectedKeys.length);
// ============================ Events ============================
var onInternalClick = function onInternalClick(e) {
if (mergedDisabled) {
return;
}
var info = getEventInfo(e);
onClick === null || onClick === void 0 || onClick(warnItemProp(info));
onItemClick(info);
};
var onInternalKeyDown = function onInternalKeyDown(e) {
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
if (e.which === KeyCode["default"].ENTER) {
var info = getEventInfo(e);
// Legacy. Key will also trigger click event
onClick === null || onClick === void 0 || onClick(warnItemProp(info));
onItemClick(info);
}
};
/**
* Used for accessibility. Helper will focus element without key board.
* We should manually trigger an active
*/
var onInternalFocus = function onInternalFocus(e) {
onActive(eventKey);
onFocus === null || onFocus === void 0 || onFocus(e);
};
// ============================ Render ============================
var optionRoleProps = {};
if (props.role === 'option') {
optionRoleProps['aria-selected'] = selected;
}
var renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(LegacyMenuItem, (0,esm_extends["default"])({
ref: legacyMenuItemRef,
elementRef: mergedEleRef,
role: role === null ? 'none' : role || 'menuitem',
tabIndex: disabled ? null : -1,
"data-menu-id": overflowDisabled && domDataId ? null : domDataId
}, (0,omit["default"])(restProps, ['extra']), activeProps, optionRoleProps, {
component: "li",
"aria-disabled": disabled,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, directionStyle), style),
className: classnames_default()(itemCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(itemCls, "-active"), active), "".concat(itemCls, "-selected"), selected), "".concat(itemCls, "-disabled"), mergedDisabled), className),
onClick: onInternalClick,
onKeyDown: onInternalKeyDown,
onFocus: onInternalFocus
}), children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon, {
props: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
isSelected: selected
}),
icon: mergedItemIcon
}));
if (_internalRenderMenuItem) {
renderNode = _internalRenderMenuItem(renderNode, props, {
selected: selected
});
}
return renderNode;
});
function MenuItem(props, ref) {
var eventKey = props.eventKey;
// ==================== Record KeyPath ====================
var measure = useMeasure();
var connectedKeyPath = useFullPath(eventKey);
// eslint-disable-next-line consistent-return
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (measure) {
measure.registerPath(eventKey, connectedKeyPath);
return function () {
measure.unregisterPath(eventKey, connectedKeyPath);
};
}
}, [connectedKeyPath]);
if (measure) {
return null;
}
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalMenuItem, (0,esm_extends["default"])({}, props, {
ref: ref
}));
}
/* harmony default export */ var es_MenuItem = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(MenuItem));
;// ./node_modules/rc-menu/es/SubMenu/SubMenuList.js
var SubMenuList_excluded = ["className", "children"];
var InternalSubMenuList = function InternalSubMenuList(_ref, ref) {
var className = _ref.className,
children = _ref.children,
restProps = (0,objectWithoutProperties["default"])(_ref, SubMenuList_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
prefixCls = _React$useContext.prefixCls,
mode = _React$useContext.mode,
rtl = _React$useContext.rtl;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", (0,esm_extends["default"])({
className: classnames_default()(prefixCls, rtl && "".concat(prefixCls, "-rtl"), "".concat(prefixCls, "-sub"), "".concat(prefixCls, "-").concat(mode === 'inline' ? 'inline' : 'vertical'), className),
role: "menu"
}, restProps, {
"data-menu-list": true,
ref: ref
}), children);
};
var SubMenuList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalSubMenuList);
SubMenuList.displayName = 'SubMenuList';
/* harmony default export */ var SubMenu_SubMenuList = (SubMenuList);
;// ./node_modules/rc-menu/es/utils/commonUtil.js
function parseChildren(children, keyPath) {
return (0,toArray["default"])(children).map(function (child, index) {
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) {
var _eventKey, _child$props;
var key = child.key;
var eventKey = (_eventKey = (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.eventKey) !== null && _eventKey !== void 0 ? _eventKey : key;
var emptyKey = eventKey === null || eventKey === undefined;
if (emptyKey) {
eventKey = "tmp_key-".concat([].concat((0,toConsumableArray["default"])(keyPath), [index]).join('-'));
}
var cloneProps = {
key: eventKey,
eventKey: eventKey
};
if ( true && emptyKey) {
cloneProps.warnKey = true;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, cloneProps);
}
return child;
});
}
;// ./node_modules/rc-menu/es/placements.js
var placements_autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
};
var es_placements_placements = {
topLeft: {
points: ['bl', 'tl'],
overflow: placements_autoAdjustOverflow
},
topRight: {
points: ['br', 'tr'],
overflow: placements_autoAdjustOverflow
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: placements_autoAdjustOverflow
},
bottomRight: {
points: ['tr', 'br'],
overflow: placements_autoAdjustOverflow
},
leftTop: {
points: ['tr', 'tl'],
overflow: placements_autoAdjustOverflow
},
leftBottom: {
points: ['br', 'bl'],
overflow: placements_autoAdjustOverflow
},
rightTop: {
points: ['tl', 'tr'],
overflow: placements_autoAdjustOverflow
},
rightBottom: {
points: ['bl', 'br'],
overflow: placements_autoAdjustOverflow
}
};
var placementsRtl = {
topLeft: {
points: ['bl', 'tl'],
overflow: placements_autoAdjustOverflow
},
topRight: {
points: ['br', 'tr'],
overflow: placements_autoAdjustOverflow
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: placements_autoAdjustOverflow
},
bottomRight: {
points: ['tr', 'br'],
overflow: placements_autoAdjustOverflow
},
rightTop: {
points: ['tr', 'tl'],
overflow: placements_autoAdjustOverflow
},
rightBottom: {
points: ['br', 'bl'],
overflow: placements_autoAdjustOverflow
},
leftTop: {
points: ['tl', 'tr'],
overflow: placements_autoAdjustOverflow
},
leftBottom: {
points: ['bl', 'br'],
overflow: placements_autoAdjustOverflow
}
};
/* harmony default export */ var rc_menu_es_placements = (es_placements_placements);
;// ./node_modules/rc-menu/es/utils/motionUtil.js
function motionUtil_getMotion(mode, motion, defaultMotions) {
if (motion) {
return motion;
}
if (defaultMotions) {
return defaultMotions[mode] || defaultMotions.other;
}
return undefined;
}
;// ./node_modules/rc-menu/es/SubMenu/PopupTrigger.js
var popupPlacementMap = {
horizontal: 'bottomLeft',
vertical: 'rightTop',
'vertical-left': 'rightTop',
'vertical-right': 'leftTop'
};
function PopupTrigger(_ref) {
var prefixCls = _ref.prefixCls,
visible = _ref.visible,
children = _ref.children,
popup = _ref.popup,
popupStyle = _ref.popupStyle,
popupClassName = _ref.popupClassName,
popupOffset = _ref.popupOffset,
disabled = _ref.disabled,
mode = _ref.mode,
onVisibleChange = _ref.onVisibleChange;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
getPopupContainer = _React$useContext.getPopupContainer,
rtl = _React$useContext.rtl,
subMenuOpenDelay = _React$useContext.subMenuOpenDelay,
subMenuCloseDelay = _React$useContext.subMenuCloseDelay,
builtinPlacements = _React$useContext.builtinPlacements,
triggerSubMenuAction = _React$useContext.triggerSubMenuAction,
forceSubMenuRender = _React$useContext.forceSubMenuRender,
rootClassName = _React$useContext.rootClassName,
motion = _React$useContext.motion,
defaultMotions = _React$useContext.defaultMotions;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
innerVisible = _React$useState2[0],
setInnerVisible = _React$useState2[1];
var placement = rtl ? (0,objectSpread2["default"])((0,objectSpread2["default"])({}, placementsRtl), builtinPlacements) : (0,objectSpread2["default"])((0,objectSpread2["default"])({}, es_placements_placements), builtinPlacements);
var popupPlacement = popupPlacementMap[mode];
var targetMotion = motionUtil_getMotion(mode, motion, defaultMotions);
var targetMotionRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(targetMotion);
if (mode !== 'inline') {
/**
* PopupTrigger is only used for vertical and horizontal types.
* When collapsed is unfolded, the inline animation will destroy the vertical animation.
*/
targetMotionRef.current = targetMotion;
}
var mergedMotion = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, targetMotionRef.current), {}, {
leavedClassName: "".concat(prefixCls, "-hidden"),
removeOnLeave: false,
motionAppear: true
});
// Delay to change visible
var visibleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
visibleRef.current = (0,raf["default"])(function () {
setInnerVisible(visible);
});
return function () {
raf["default"].cancel(visibleRef.current);
};
}, [visible]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, {
prefixCls: prefixCls,
popupClassName: classnames_default()("".concat(prefixCls, "-popup"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-rtl"), rtl), popupClassName, rootClassName),
stretch: mode === 'horizontal' ? 'minWidth' : null,
getPopupContainer: getPopupContainer,
builtinPlacements: placement,
popupPlacement: popupPlacement,
popupVisible: innerVisible,
popup: popup,
popupStyle: popupStyle,
popupAlign: popupOffset && {
offset: popupOffset
},
action: disabled ? [] : [triggerSubMenuAction],
mouseEnterDelay: subMenuOpenDelay,
mouseLeaveDelay: subMenuCloseDelay,
onPopupVisibleChange: onVisibleChange,
forceRender: forceSubMenuRender,
popupMotion: mergedMotion,
fresh: true
}, children);
}
;// ./node_modules/rc-menu/es/SubMenu/InlineSubMenuList.js
function InlineSubMenuList(_ref) {
var id = _ref.id,
open = _ref.open,
keyPath = _ref.keyPath,
children = _ref.children;
var fixedMode = 'inline';
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
prefixCls = _React$useContext.prefixCls,
forceSubMenuRender = _React$useContext.forceSubMenuRender,
motion = _React$useContext.motion,
defaultMotions = _React$useContext.defaultMotions,
mode = _React$useContext.mode;
// Always use latest mode check
var sameModeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
sameModeRef.current = mode === fixedMode;
// We record `destroy` mark here since when mode change from `inline` to others.
// The inline list should remove when motion end.
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(!sameModeRef.current),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
destroy = _React$useState2[0],
setDestroy = _React$useState2[1];
var mergedOpen = sameModeRef.current ? open : false;
// ================================= Effect =================================
// Reset destroy state when mode change back
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (sameModeRef.current) {
setDestroy(false);
}
}, [mode]);
// ================================= Render =================================
var mergedMotion = (0,objectSpread2["default"])({}, motionUtil_getMotion(fixedMode, motion, defaultMotions));
// No need appear since nest inlineCollapse changed
if (keyPath.length > 1) {
mergedMotion.motionAppear = false;
}
// Hide inline list when mode changed and motion end
var originOnVisibleChanged = mergedMotion.onVisibleChanged;
mergedMotion.onVisibleChanged = function (newVisible) {
if (!sameModeRef.current && !newVisible) {
setDestroy(true);
}
return originOnVisibleChanged === null || originOnVisibleChanged === void 0 ? void 0 : originOnVisibleChanged(newVisible);
};
if (destroy) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
mode: fixedMode,
locked: !sameModeRef.current
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
visible: mergedOpen
}, mergedMotion, {
forceRender: forceSubMenuRender,
removeOnLeave: false,
leavedClassName: "".concat(prefixCls, "-hidden")
}), function (_ref2) {
var motionClassName = _ref2.className,
motionStyle = _ref2.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SubMenu_SubMenuList, {
id: id,
className: motionClassName,
style: motionStyle
}, children);
}));
}
;// ./node_modules/rc-menu/es/SubMenu/index.js
var SubMenu_excluded = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"],
SubMenu_excluded2 = ["active"];
var InternalSubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var style = props.style,
className = props.className,
title = props.title,
eventKey = props.eventKey,
warnKey = props.warnKey,
disabled = props.disabled,
internalPopupClose = props.internalPopupClose,
children = props.children,
itemIcon = props.itemIcon,
expandIcon = props.expandIcon,
popupClassName = props.popupClassName,
popupOffset = props.popupOffset,
popupStyle = props.popupStyle,
onClick = props.onClick,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onTitleClick = props.onTitleClick,
onTitleMouseEnter = props.onTitleMouseEnter,
onTitleMouseLeave = props.onTitleMouseLeave,
restProps = (0,objectWithoutProperties["default"])(props, SubMenu_excluded);
var domDataId = useMenuId(eventKey);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
prefixCls = _React$useContext.prefixCls,
mode = _React$useContext.mode,
openKeys = _React$useContext.openKeys,
contextDisabled = _React$useContext.disabled,
overflowDisabled = _React$useContext.overflowDisabled,
activeKey = _React$useContext.activeKey,
selectedKeys = _React$useContext.selectedKeys,
contextItemIcon = _React$useContext.itemIcon,
contextExpandIcon = _React$useContext.expandIcon,
onItemClick = _React$useContext.onItemClick,
onOpenChange = _React$useContext.onOpenChange,
onActive = _React$useContext.onActive;
var _React$useContext2 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_PrivateContext),
_internalRenderSubMenuItem = _React$useContext2._internalRenderSubMenuItem;
var _React$useContext3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PathUserContext),
isSubPathKey = _React$useContext3.isSubPathKey;
var connectedPath = useFullPath();
var subMenuPrefixCls = "".concat(prefixCls, "-submenu");
var mergedDisabled = contextDisabled || disabled;
var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
// ================================ Warn ================================
if ( true && warnKey) {
(0,warning["default"])(false, 'SubMenu should not leave undefined `key`.');
}
// ================================ Icon ================================
var mergedItemIcon = itemIcon !== null && itemIcon !== void 0 ? itemIcon : contextItemIcon;
var mergedExpandIcon = expandIcon !== null && expandIcon !== void 0 ? expandIcon : contextExpandIcon;
// ================================ Open ================================
var originOpen = openKeys.includes(eventKey);
var open = !overflowDisabled && originOpen;
// =============================== Select ===============================
var childrenSelected = isSubPathKey(selectedKeys, eventKey);
// =============================== Active ===============================
var _useActive = useActive(eventKey, mergedDisabled, onTitleMouseEnter, onTitleMouseLeave),
active = _useActive.active,
activeProps = (0,objectWithoutProperties["default"])(_useActive, SubMenu_excluded2);
// Fallback of active check to avoid hover on menu title or disabled item
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
childrenActive = _React$useState2[0],
setChildrenActive = _React$useState2[1];
var triggerChildrenActive = function triggerChildrenActive(newActive) {
if (!mergedDisabled) {
setChildrenActive(newActive);
}
};
var onInternalMouseEnter = function onInternalMouseEnter(domEvent) {
triggerChildrenActive(true);
onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter({
key: eventKey,
domEvent: domEvent
});
};
var onInternalMouseLeave = function onInternalMouseLeave(domEvent) {
triggerChildrenActive(false);
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave({
key: eventKey,
domEvent: domEvent
});
};
var mergedActive = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (active) {
return active;
}
if (mode !== 'inline') {
return childrenActive || isSubPathKey([activeKey], eventKey);
}
return false;
}, [mode, active, activeKey, childrenActive, eventKey, isSubPathKey]);
// ========================== DirectionStyle ==========================
var directionStyle = useDirectionStyle(connectedPath.length);
// =============================== Events ===============================
// >>>> Title click
var onInternalTitleClick = function onInternalTitleClick(e) {
// Skip if disabled
if (mergedDisabled) {
return;
}
onTitleClick === null || onTitleClick === void 0 || onTitleClick({
key: eventKey,
domEvent: e
});
// Trigger open by click when mode is `inline`
if (mode === 'inline') {
onOpenChange(eventKey, !originOpen);
}
};
// >>>> Context for children click
var onMergedItemClick = useMemoCallback(function (info) {
onClick === null || onClick === void 0 || onClick(warnItemProp(info));
onItemClick(info);
});
// >>>>> Visible change
var onPopupVisibleChange = function onPopupVisibleChange(newVisible) {
if (mode !== 'inline') {
onOpenChange(eventKey, newVisible);
}
};
/**
* Used for accessibility. Helper will focus element without key board.
* We should manually trigger an active
*/
var onInternalFocus = function onInternalFocus() {
onActive(eventKey);
};
// =============================== Render ===============================
var popupId = domDataId && "".concat(domDataId, "-popup");
var expandIconNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon, {
icon: mode !== 'horizontal' ? mergedExpandIcon : undefined,
props: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
isOpen: open,
// [Legacy] Not sure why need this mark
isSubMenu: true
})
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("i", {
className: "".concat(subMenuPrefixCls, "-arrow")
}));
}, [mode, mergedExpandIcon, props, open, subMenuPrefixCls]);
// >>>>> Title
var titleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
role: "menuitem",
style: directionStyle,
className: "".concat(subMenuPrefixCls, "-title"),
tabIndex: mergedDisabled ? null : -1,
ref: elementRef,
title: typeof title === 'string' ? title : null,
"data-menu-id": overflowDisabled && domDataId ? null : domDataId,
"aria-expanded": open,
"aria-haspopup": true,
"aria-controls": popupId,
"aria-disabled": mergedDisabled,
onClick: onInternalTitleClick,
onFocus: onInternalFocus
}, activeProps), title, expandIconNode);
// Cache mode if it change to `inline` which do not have popup motion
var triggerModeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mode);
if (mode !== 'inline' && connectedPath.length > 1) {
triggerModeRef.current = 'vertical';
} else {
triggerModeRef.current = mode;
}
if (!overflowDisabled) {
var triggerMode = triggerModeRef.current;
// Still wrap with Trigger here since we need avoid react re-mount dom node
// Which makes motion failed
titleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PopupTrigger, {
mode: triggerMode,
prefixCls: subMenuPrefixCls,
visible: !internalPopupClose && open && mode !== 'inline',
popupClassName: popupClassName,
popupOffset: popupOffset,
popupStyle: popupStyle,
popup: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider
// Special handle of horizontal mode
, {
mode: triggerMode === 'horizontal' ? 'vertical' : triggerMode
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SubMenu_SubMenuList, {
id: popupId,
ref: popupRef
}, children)),
disabled: mergedDisabled,
onVisibleChange: onPopupVisibleChange
}, titleNode);
}
// >>>>> List node
var listNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es.Item, (0,esm_extends["default"])({
ref: ref,
role: "none"
}, restProps, {
component: "li",
style: style,
className: classnames_default()(subMenuPrefixCls, "".concat(subMenuPrefixCls, "-").concat(mode), className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(subMenuPrefixCls, "-open"), open), "".concat(subMenuPrefixCls, "-active"), mergedActive), "".concat(subMenuPrefixCls, "-selected"), childrenSelected), "".concat(subMenuPrefixCls, "-disabled"), mergedDisabled)),
onMouseEnter: onInternalMouseEnter,
onMouseLeave: onInternalMouseLeave
}), titleNode, !overflowDisabled && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InlineSubMenuList, {
id: popupId,
open: open,
keyPath: connectedPath
}, children));
if (_internalRenderSubMenuItem) {
listNode = _internalRenderSubMenuItem(listNode, props, {
selected: childrenSelected,
active: mergedActive,
open: open,
disabled: mergedDisabled
});
}
// >>>>> Render
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
onItemClick: onMergedItemClick,
mode: mode === 'horizontal' ? 'vertical' : mode,
itemIcon: mergedItemIcon,
expandIcon: mergedExpandIcon
}, listNode);
});
var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var eventKey = props.eventKey,
children = props.children;
var connectedKeyPath = useFullPath(eventKey);
var childList = parseChildren(children, connectedKeyPath);
// ==================== Record KeyPath ====================
var measure = useMeasure();
// eslint-disable-next-line consistent-return
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (measure) {
measure.registerPath(eventKey, connectedKeyPath);
return function () {
measure.unregisterPath(eventKey, connectedKeyPath);
};
}
}, [connectedKeyPath]);
var renderNode;
// ======================== Render ========================
if (measure) {
renderNode = childList;
} else {
renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalSubMenu, (0,esm_extends["default"])({
ref: ref
}, props), childList);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PathTrackerContext.Provider, {
value: connectedKeyPath
}, renderNode);
});
if (true) {
SubMenu.displayName = 'SubMenu';
}
/* harmony default export */ var es_SubMenu = (SubMenu);
;// ./node_modules/rc-menu/es/Divider.js
function Divider(_ref) {
var className = _ref.className,
style = _ref.style;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
prefixCls = _React$useContext.prefixCls;
var measure = useMeasure();
if (measure) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
role: "separator",
className: classnames_default()("".concat(prefixCls, "-item-divider"), className),
style: style
});
}
;// ./node_modules/rc-menu/es/MenuItemGroup.js
var MenuItemGroup_excluded = ["className", "title", "eventKey", "children"];
var InternalMenuItemGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var className = props.className,
title = props.title,
eventKey = props.eventKey,
children = props.children,
restProps = (0,objectWithoutProperties["default"])(props, MenuItemGroup_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
prefixCls = _React$useContext.prefixCls;
var groupPrefixCls = "".concat(prefixCls, "-item-group");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", (0,esm_extends["default"])({
ref: ref,
role: "presentation"
}, restProps, {
onClick: function onClick(e) {
return e.stopPropagation();
},
className: classnames_default()(groupPrefixCls, className)
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
role: "presentation",
className: "".concat(groupPrefixCls, "-title"),
title: typeof title === 'string' ? title : undefined
}, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
role: "group",
className: "".concat(groupPrefixCls, "-list")
}, children));
});
var MenuItemGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var eventKey = props.eventKey,
children = props.children;
var connectedKeyPath = useFullPath(eventKey);
var childList = parseChildren(children, connectedKeyPath);
var measure = useMeasure();
if (measure) {
return childList;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalMenuItemGroup, (0,esm_extends["default"])({
ref: ref
}, (0,omit["default"])(props, ['warnKey'])), childList);
});
if (true) {
MenuItemGroup.displayName = 'MenuItemGroup';
}
/* harmony default export */ var es_MenuItemGroup = (MenuItemGroup);
;// ./node_modules/rc-menu/es/utils/nodeUtil.js
var nodeUtil_excluded = ["label", "children", "key", "type", "extra"];
function convertItemsToNodes(list, components, prefixCls) {
var MergedMenuItem = components.item,
MergedMenuItemGroup = components.group,
MergedSubMenu = components.submenu,
MergedDivider = components.divider;
return (list || []).map(function (opt, index) {
if (opt && (0,esm_typeof["default"])(opt) === 'object') {
var _ref = opt,
label = _ref.label,
children = _ref.children,
key = _ref.key,
type = _ref.type,
extra = _ref.extra,
restProps = (0,objectWithoutProperties["default"])(_ref, nodeUtil_excluded);
var mergedKey = key !== null && key !== void 0 ? key : "tmp-".concat(index);
// MenuItemGroup & SubMenuItem
if (children || type === 'group') {
if (type === 'group') {
// Group
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedMenuItemGroup, (0,esm_extends["default"])({
key: mergedKey
}, restProps, {
title: label
}), convertItemsToNodes(children, components, prefixCls));
}
// Sub Menu
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedSubMenu, (0,esm_extends["default"])({
key: mergedKey
}, restProps, {
title: label
}), convertItemsToNodes(children, components, prefixCls));
}
// MenuItem & Divider
if (type === 'divider') {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedDivider, (0,esm_extends["default"])({
key: mergedKey
}, restProps));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedMenuItem, (0,esm_extends["default"])({
key: mergedKey
}, restProps, {
extra: extra
}), label, (!!extra || extra === 0) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-item-extra")
}, extra));
}
return null;
}).filter(function (opt) {
return opt;
});
}
function parseItems(children, items, keyPath, components, prefixCls) {
var childNodes = children;
var mergedComponents = (0,objectSpread2["default"])({
divider: Divider,
item: es_MenuItem,
group: es_MenuItemGroup,
submenu: es_SubMenu
}, components);
if (items) {
childNodes = convertItemsToNodes(items, mergedComponents, prefixCls);
}
return parseChildren(childNodes, keyPath);
}
;// ./node_modules/rc-menu/es/Menu.js
var Menu_excluded = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"];
/**
* Menu modify after refactor:
* ## Add
* - disabled
*
* ## Remove
* - openTransitionName
* - openAnimation
* - onDestroy
* - siderCollapsed: Seems antd do not use this prop (Need test in antd)
* - collapsedWidth: Seems this logic should be handle by antd Layout.Sider
*/
// optimize for render
var Menu_EMPTY_LIST = [];
var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _childList$;
var _ref = props,
_ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-menu' : _ref$prefixCls,
rootClassName = _ref.rootClassName,
style = _ref.style,
className = _ref.className,
_ref$tabIndex = _ref.tabIndex,
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
items = _ref.items,
children = _ref.children,
direction = _ref.direction,
id = _ref.id,
_ref$mode = _ref.mode,
mode = _ref$mode === void 0 ? 'vertical' : _ref$mode,
inlineCollapsed = _ref.inlineCollapsed,
disabled = _ref.disabled,
disabledOverflow = _ref.disabledOverflow,
_ref$subMenuOpenDelay = _ref.subMenuOpenDelay,
subMenuOpenDelay = _ref$subMenuOpenDelay === void 0 ? 0.1 : _ref$subMenuOpenDelay,
_ref$subMenuCloseDela = _ref.subMenuCloseDelay,
subMenuCloseDelay = _ref$subMenuCloseDela === void 0 ? 0.1 : _ref$subMenuCloseDela,
forceSubMenuRender = _ref.forceSubMenuRender,
defaultOpenKeys = _ref.defaultOpenKeys,
openKeys = _ref.openKeys,
activeKey = _ref.activeKey,
defaultActiveFirst = _ref.defaultActiveFirst,
_ref$selectable = _ref.selectable,
selectable = _ref$selectable === void 0 ? true : _ref$selectable,
_ref$multiple = _ref.multiple,
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
defaultSelectedKeys = _ref.defaultSelectedKeys,
selectedKeys = _ref.selectedKeys,
onSelect = _ref.onSelect,
onDeselect = _ref.onDeselect,
_ref$inlineIndent = _ref.inlineIndent,
inlineIndent = _ref$inlineIndent === void 0 ? 24 : _ref$inlineIndent,
motion = _ref.motion,
defaultMotions = _ref.defaultMotions,
_ref$triggerSubMenuAc = _ref.triggerSubMenuAction,
triggerSubMenuAction = _ref$triggerSubMenuAc === void 0 ? 'hover' : _ref$triggerSubMenuAc,
builtinPlacements = _ref.builtinPlacements,
itemIcon = _ref.itemIcon,
expandIcon = _ref.expandIcon,
_ref$overflowedIndica = _ref.overflowedIndicator,
overflowedIndicator = _ref$overflowedIndica === void 0 ? '...' : _ref$overflowedIndica,
overflowedIndicatorPopupClassName = _ref.overflowedIndicatorPopupClassName,
getPopupContainer = _ref.getPopupContainer,
onClick = _ref.onClick,
onOpenChange = _ref.onOpenChange,
onKeyDown = _ref.onKeyDown,
openAnimation = _ref.openAnimation,
openTransitionName = _ref.openTransitionName,
_internalRenderMenuItem = _ref._internalRenderMenuItem,
_internalRenderSubMenuItem = _ref._internalRenderSubMenuItem,
_internalComponents = _ref._internalComponents,
restProps = (0,objectWithoutProperties["default"])(_ref, Menu_excluded);
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return [parseItems(children, items, Menu_EMPTY_LIST, _internalComponents, prefixCls), parseItems(children, items, Menu_EMPTY_LIST, {}, prefixCls)];
}, [children, items, _internalComponents]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
childList = _React$useMemo2[0],
measureChildList = _React$useMemo2[1];
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
mounted = _React$useState2[0],
setMounted = _React$useState2[1];
var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var uuid = useUUID(id);
var isRtl = direction === 'rtl';
// ========================= Warn =========================
if (true) {
(0,warning["default"])(!openAnimation && !openTransitionName, '`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.');
}
// ========================= Open =========================
var _useMergedState = (0,useMergedState["default"])(defaultOpenKeys, {
value: openKeys,
postState: function postState(keys) {
return keys || Menu_EMPTY_LIST;
}
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedOpenKeys = _useMergedState2[0],
setMergedOpenKeys = _useMergedState2[1];
// React 18 will merge mouse event which means we open key will not sync
// ref: https://github.com/ant-design/ant-design/issues/38818
var triggerOpenKeys = function triggerOpenKeys(keys) {
var forceFlush = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
function doUpdate() {
setMergedOpenKeys(keys);
onOpenChange === null || onOpenChange === void 0 || onOpenChange(keys);
}
if (forceFlush) {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(doUpdate);
} else {
doUpdate();
}
};
// >>>>> Cache & Reset open keys when inlineCollapsed changed
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedOpenKeys),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
inlineCacheOpenKeys = _React$useState4[0],
setInlineCacheOpenKeys = _React$useState4[1];
var mountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
// ========================= Mode =========================
var _React$useMemo3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if ((mode === 'inline' || mode === 'vertical') && inlineCollapsed) {
return ['vertical', inlineCollapsed];
}
return [mode, false];
}, [mode, inlineCollapsed]),
_React$useMemo4 = (0,slicedToArray["default"])(_React$useMemo3, 2),
mergedMode = _React$useMemo4[0],
mergedInlineCollapsed = _React$useMemo4[1];
var isInlineMode = mergedMode === 'inline';
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedMode),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
internalMode = _React$useState6[0],
setInternalMode = _React$useState6[1];
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedInlineCollapsed),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
internalInlineCollapsed = _React$useState8[0],
setInternalInlineCollapsed = _React$useState8[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setInternalMode(mergedMode);
setInternalInlineCollapsed(mergedInlineCollapsed);
if (!mountRef.current) {
return;
}
// Synchronously update MergedOpenKeys
if (isInlineMode) {
setMergedOpenKeys(inlineCacheOpenKeys);
} else {
// Trigger open event in case its in control
triggerOpenKeys(Menu_EMPTY_LIST);
}
}, [mergedMode, mergedInlineCollapsed]);
// ====================== Responsive ======================
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
lastVisibleIndex = _React$useState10[0],
setLastVisibleIndex = _React$useState10[1];
var allVisible = lastVisibleIndex >= childList.length - 1 || internalMode !== 'horizontal' || disabledOverflow;
// Cache
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (isInlineMode) {
setInlineCacheOpenKeys(mergedOpenKeys);
}
}, [mergedOpenKeys]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
mountRef.current = true;
return function () {
mountRef.current = false;
};
}, []);
// ========================= Path =========================
var _useKeyRecords = useKeyRecords(),
registerPath = _useKeyRecords.registerPath,
unregisterPath = _useKeyRecords.unregisterPath,
refreshOverflowKeys = _useKeyRecords.refreshOverflowKeys,
isSubPathKey = _useKeyRecords.isSubPathKey,
getKeyPath = _useKeyRecords.getKeyPath,
getKeys = _useKeyRecords.getKeys,
getSubPathKeys = _useKeyRecords.getSubPathKeys;
var registerPathContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
registerPath: registerPath,
unregisterPath: unregisterPath
};
}, [registerPath, unregisterPath]);
var pathUserContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
isSubPathKey: isSubPathKey
};
}, [isSubPathKey]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
refreshOverflowKeys(allVisible ? Menu_EMPTY_LIST : childList.slice(lastVisibleIndex + 1).map(function (child) {
return child.key;
}));
}, [lastVisibleIndex, allVisible]);
// ======================== Active ========================
var _useMergedState3 = (0,useMergedState["default"])(activeKey || defaultActiveFirst && ((_childList$ = childList[0]) === null || _childList$ === void 0 ? void 0 : _childList$.key), {
value: activeKey
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedActiveKey = _useMergedState4[0],
setMergedActiveKey = _useMergedState4[1];
var onActive = useMemoCallback(function (key) {
setMergedActiveKey(key);
});
var onInactive = useMemoCallback(function () {
setMergedActiveKey(undefined);
});
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
return {
list: containerRef.current,
focus: function focus(options) {
var _childList$find;
var keys = getKeys();
var _refreshElements = refreshElements(keys, uuid),
elements = _refreshElements.elements,
key2element = _refreshElements.key2element,
element2key = _refreshElements.element2key;
var focusableElements = getFocusableElements(containerRef.current, elements);
var shouldFocusKey = mergedActiveKey !== null && mergedActiveKey !== void 0 ? mergedActiveKey : focusableElements[0] ? element2key.get(focusableElements[0]) : (_childList$find = childList.find(function (node) {
return !node.props.disabled;
})) === null || _childList$find === void 0 ? void 0 : _childList$find.key;
var elementToFocus = key2element.get(shouldFocusKey);
if (shouldFocusKey && elementToFocus) {
var _elementToFocus$focus;
elementToFocus === null || elementToFocus === void 0 || (_elementToFocus$focus = elementToFocus.focus) === null || _elementToFocus$focus === void 0 || _elementToFocus$focus.call(elementToFocus, options);
}
}
};
});
// ======================== Select ========================
// >>>>> Select keys
var _useMergedState5 = (0,useMergedState["default"])(defaultSelectedKeys || [], {
value: selectedKeys,
// Legacy convert key to array
postState: function postState(keys) {
if (Array.isArray(keys)) {
return keys;
}
if (keys === null || keys === undefined) {
return Menu_EMPTY_LIST;
}
return [keys];
}
}),
_useMergedState6 = (0,slicedToArray["default"])(_useMergedState5, 2),
mergedSelectKeys = _useMergedState6[0],
setMergedSelectKeys = _useMergedState6[1];
// >>>>> Trigger select
var triggerSelection = function triggerSelection(info) {
if (selectable) {
// Insert or Remove
var targetKey = info.key;
var exist = mergedSelectKeys.includes(targetKey);
var newSelectKeys;
if (multiple) {
if (exist) {
newSelectKeys = mergedSelectKeys.filter(function (key) {
return key !== targetKey;
});
} else {
newSelectKeys = [].concat((0,toConsumableArray["default"])(mergedSelectKeys), [targetKey]);
}
} else {
newSelectKeys = [targetKey];
}
setMergedSelectKeys(newSelectKeys);
// Trigger event
var selectInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
selectedKeys: newSelectKeys
});
if (exist) {
onDeselect === null || onDeselect === void 0 || onDeselect(selectInfo);
} else {
onSelect === null || onSelect === void 0 || onSelect(selectInfo);
}
}
// Whatever selectable, always close it
if (!multiple && mergedOpenKeys.length && internalMode !== 'inline') {
triggerOpenKeys(Menu_EMPTY_LIST);
}
};
// ========================= Open =========================
/**
* Click for item. SubMenu do not have selection status
*/
var onInternalClick = useMemoCallback(function (info) {
onClick === null || onClick === void 0 || onClick(warnItemProp(info));
triggerSelection(info);
});
var onInternalOpenChange = useMemoCallback(function (key, open) {
var newOpenKeys = mergedOpenKeys.filter(function (k) {
return k !== key;
});
if (open) {
newOpenKeys.push(key);
} else if (internalMode !== 'inline') {
// We need find all related popup to close
var subPathKeys = getSubPathKeys(key);
newOpenKeys = newOpenKeys.filter(function (k) {
return !subPathKeys.has(k);
});
}
if (!(0,isEqual["default"])(mergedOpenKeys, newOpenKeys, true)) {
triggerOpenKeys(newOpenKeys, true);
}
});
// ==================== Accessibility =====================
var triggerAccessibilityOpen = function triggerAccessibilityOpen(key, open) {
var nextOpen = open !== null && open !== void 0 ? open : !mergedOpenKeys.includes(key);
onInternalOpenChange(key, nextOpen);
};
var onInternalKeyDown = useAccessibility_useAccessibility(internalMode, mergedActiveKey, isRtl, uuid, containerRef, getKeys, getKeyPath, setMergedActiveKey, triggerAccessibilityOpen, onKeyDown);
// ======================== Effect ========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setMounted(true);
}, []);
// ======================= Context ========================
var privateContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
_internalRenderMenuItem: _internalRenderMenuItem,
_internalRenderSubMenuItem: _internalRenderSubMenuItem
};
}, [_internalRenderMenuItem, _internalRenderSubMenuItem]);
// ======================== Render ========================
// >>>>> Children
var wrappedChildList = internalMode !== 'horizontal' || disabledOverflow ? childList :
// Need wrap for overflow dropdown that do not response for open
childList.map(function (child, index) {
return (
/*#__PURE__*/
// Always wrap provider to avoid sub node re-mount
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
key: child.key,
overflowDisabled: index > lastVisibleIndex
}, child)
);
});
// >>>>> Container
var container = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es, (0,esm_extends["default"])({
id: id,
ref: containerRef,
prefixCls: "".concat(prefixCls, "-overflow"),
component: "ul",
itemComponent: es_MenuItem,
className: classnames_default()(prefixCls, "".concat(prefixCls, "-root"), "".concat(prefixCls, "-").concat(internalMode), className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-inline-collapsed"), internalInlineCollapsed), "".concat(prefixCls, "-rtl"), isRtl), rootClassName),
dir: direction,
style: style,
role: "menu",
tabIndex: tabIndex,
data: wrappedChildList,
renderRawItem: function renderRawItem(node) {
return node;
},
renderRawRest: function renderRawRest(omitItems) {
// We use origin list since wrapped list use context to prevent open
var len = omitItems.length;
var originOmitItems = len ? childList.slice(-len) : null;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SubMenu, {
eventKey: OVERFLOW_KEY,
title: overflowedIndicator,
disabled: allVisible,
internalPopupClose: len === 0,
popupClassName: overflowedIndicatorPopupClassName
}, originOmitItems);
},
maxCount: internalMode !== 'horizontal' || disabledOverflow ? rc_overflow_es.INVALIDATE : rc_overflow_es.RESPONSIVE,
ssr: "full",
"data-menu-list": true,
onVisibleChange: function onVisibleChange(newLastIndex) {
setLastVisibleIndex(newLastIndex);
},
onKeyDown: onInternalKeyDown
}, restProps));
// >>>>> Render
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_PrivateContext.Provider, {
value: privateContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IdContext.Provider, {
value: uuid
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
prefixCls: prefixCls,
rootClassName: rootClassName,
mode: internalMode,
openKeys: mergedOpenKeys,
rtl: isRtl
// Disabled
,
disabled: disabled
// Motion
,
motion: mounted ? motion : null,
defaultMotions: mounted ? defaultMotions : null
// Active
,
activeKey: mergedActiveKey,
onActive: onActive,
onInactive: onInactive
// Selection
,
selectedKeys: mergedSelectKeys
// Level
,
inlineIndent: inlineIndent
// Popup
,
subMenuOpenDelay: subMenuOpenDelay,
subMenuCloseDelay: subMenuCloseDelay,
forceSubMenuRender: forceSubMenuRender,
builtinPlacements: builtinPlacements,
triggerSubMenuAction: triggerSubMenuAction,
getPopupContainer: getPopupContainer
// Icon
,
itemIcon: itemIcon,
expandIcon: expandIcon
// Events
,
onItemClick: onInternalClick,
onOpenChange: onInternalOpenChange
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PathUserContext.Provider, {
value: pathUserContext
}, container), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
display: 'none'
},
"aria-hidden": true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PathRegisterContext.Provider, {
value: registerPathContext
}, measureChildList)))));
});
/* harmony default export */ var es_Menu = (Menu);
;// ./node_modules/rc-menu/es/index.js
var ExportMenu = es_Menu;
ExportMenu.Item = es_MenuItem;
ExportMenu.SubMenu = es_SubMenu;
ExportMenu.ItemGroup = es_MenuItemGroup;
ExportMenu.Divider = Divider;
/* harmony default export */ var rc_menu_es = (ExportMenu);
;// ./node_modules/@ant-design/icons-svg/es/asn/BarsOutlined.js
// This icon file is generated automatically.
var BarsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "bars", "theme": "outlined" };
/* harmony default export */ var asn_BarsOutlined = (BarsOutlined);
;// ./node_modules/@ant-design/icons/es/icons/BarsOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var BarsOutlined_BarsOutlined = function BarsOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_BarsOutlined
}));
};
/** */
var BarsOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(BarsOutlined_BarsOutlined);
if (true) {
BarsOutlined_RefIcon.displayName = 'BarsOutlined';
}
/* harmony default export */ var icons_BarsOutlined = (BarsOutlined_RefIcon);
;// ./components/layout/context.ts
const LayoutContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
siderHook: {
addSider: () => null,
removeSider: () => null
}
});
// EXTERNAL MODULE: ./components/layout/style/index.ts
var layout_style = __webpack_require__("./components/layout/style/index.ts");
;// ./components/layout/style/sider.ts
const genSiderStyle = token => {
const {
componentCls,
siderBg,
motionDurationMid,
motionDurationSlow,
antCls,
triggerHeight,
triggerColor,
triggerBg,
headerHeight,
zeroTriggerWidth,
zeroTriggerHeight,
borderRadiusLG,
lightSiderBg,
lightTriggerColor,
lightTriggerBg,
bodyBg
} = token;
return {
[componentCls]: {
position: 'relative',
// fix firefox can't set width smaller than content on flex item
minWidth: 0,
background: siderBg,
transition: `all ${motionDurationMid}, background 0s`,
'&-has-trigger': {
paddingBottom: triggerHeight
},
'&-right': {
order: 1
},
[`${componentCls}-children`]: {
height: '100%',
// Hack for fixing margin collapse bug
// https://github.com/ant-design/ant-design/issues/7967
// solution from https://stackoverflow.com/a/33132624/3040605
marginTop: -0.1,
paddingTop: 0.1,
[`${antCls}-menu${antCls}-menu-inline-collapsed`]: {
width: 'auto'
}
},
[`&-zero-width ${componentCls}-children`]: {
overflow: 'hidden'
},
[`${componentCls}-trigger`]: {
position: 'fixed',
bottom: 0,
zIndex: 1,
height: triggerHeight,
color: triggerColor,
lineHeight: (0,cssinjs.unit)(triggerHeight),
textAlign: 'center',
background: triggerBg,
cursor: 'pointer',
transition: `all ${motionDurationMid}`
},
[`${componentCls}-zero-width-trigger`]: {
position: 'absolute',
top: headerHeight,
insetInlineEnd: token.calc(zeroTriggerWidth).mul(-1).equal(),
zIndex: 1,
width: zeroTriggerWidth,
height: zeroTriggerHeight,
color: triggerColor,
fontSize: token.fontSizeXL,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: siderBg,
borderRadius: `0 ${(0,cssinjs.unit)(borderRadiusLG)} ${(0,cssinjs.unit)(borderRadiusLG)} 0`,
cursor: 'pointer',
transition: `background ${motionDurationSlow} ease`,
'&::after': {
position: 'absolute',
inset: 0,
background: 'transparent',
transition: `all ${motionDurationSlow}`,
content: '""'
},
'&:hover::after': {
background: `rgba(255, 255, 255, 0.2)`
},
'&-right': {
insetInlineStart: token.calc(zeroTriggerWidth).mul(-1).equal(),
borderRadius: `${(0,cssinjs.unit)(borderRadiusLG)} 0 0 ${(0,cssinjs.unit)(borderRadiusLG)}`
}
},
// Light
'&-light': {
background: lightSiderBg,
[`${componentCls}-trigger`]: {
color: lightTriggerColor,
background: lightTriggerBg
},
[`${componentCls}-zero-width-trigger`]: {
color: lightTriggerColor,
background: lightTriggerBg,
border: `1px solid ${bodyBg}`,
// Safe to modify to any other color
borderInlineStart: 0
}
}
}
};
};
/* harmony default export */ var sider = ((0,genStyleUtils.genStyleHooks)(['Layout', 'Sider'], token => [genSiderStyle(token)], layout_style.prepareComponentToken, {
deprecatedTokens: layout_style.DEPRECATED_TOKENS
}));
;// ./components/layout/Sider.tsx
var Sider_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;
};
const dimensionMaxMap = {
xs: '479.98px',
sm: '575.98px',
md: '767.98px',
lg: '991.98px',
xl: '1199.98px',
xxl: '1599.98px'
};
const isNumeric = value => !Number.isNaN(Number.parseFloat(value)) && isFinite(value);
const SiderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
const generateId = (() => {
let i = 0;
return function () {
let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
i += 1;
return `${prefix}${i}`;
};
})();
const Sider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
trigger,
children,
defaultCollapsed = false,
theme = 'dark',
style = {},
collapsible = false,
reverseArrow = false,
width = 200,
collapsedWidth = 80,
zeroWidthTriggerStyle,
breakpoint,
onCollapse,
onBreakpoint
} = props,
otherProps = Sider_rest(props, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]);
const {
siderHook
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(LayoutContext);
const [collapsed, setCollapsed] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('collapsed' in props ? props.collapsed : defaultCollapsed);
const [below, setBelow] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if ('collapsed' in props) {
setCollapsed(props.collapsed);
}
}, [props.collapsed]);
const handleSetCollapsed = (value, type) => {
if (!('collapsed' in props)) {
setCollapsed(value);
}
onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(value, type);
};
// =========================== Prefix ===========================
const {
getPrefixCls,
direction
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = sider(prefixCls);
// ========================= Responsive =========================
const responsiveHandlerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
responsiveHandlerRef.current = mql => {
setBelow(mql.matches);
onBreakpoint === null || onBreakpoint === void 0 ? void 0 : onBreakpoint(mql.matches);
if (collapsed !== mql.matches) {
handleSetCollapsed(mql.matches, 'responsive');
}
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
function responsiveHandler(mql) {
return responsiveHandlerRef.current(mql);
}
let mql;
if (typeof window !== 'undefined') {
const {
matchMedia
} = window;
if (matchMedia && breakpoint && breakpoint in dimensionMaxMap) {
mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
try {
mql.addEventListener('change', responsiveHandler);
} catch (_a) {
mql.addListener(responsiveHandler);
}
responsiveHandler(mql);
}
}
return () => {
try {
mql === null || mql === void 0 ? void 0 : mql.removeEventListener('change', responsiveHandler);
} catch (_a) {
mql === null || mql === void 0 ? void 0 : mql.removeListener(responsiveHandler);
}
};
}, [breakpoint]); // in order to accept dynamic 'breakpoint' property, we need to add 'breakpoint' into dependency array.
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
const uniqueId = generateId('ant-sider-');
siderHook.addSider(uniqueId);
return () => siderHook.removeSider(uniqueId);
}, []);
const toggle = () => {
handleSetCollapsed(!collapsed, 'clickTrigger');
};
const divProps = (0,omit["default"])(otherProps, ['collapsed']);
const rawWidth = collapsed ? collapsedWidth : width;
// use "px" as fallback unit for width
const siderWidth = isNumeric(rawWidth) ? `${rawWidth}px` : String(rawWidth);
// special trigger when collapsedWidth == 0
const zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
onClick: toggle,
className: classnames_default()(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? 'right' : 'left'}`),
style: zeroWidthTriggerStyle
}, trigger || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_BarsOutlined, null))) : null;
const reverseIcon = direction === 'rtl' === !reverseArrow;
const iconObj = {
expanded: reverseIcon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null),
collapsed: reverseIcon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null)
};
const status = collapsed ? 'collapsed' : 'expanded';
const defaultTrigger = iconObj[status];
const triggerDom = trigger !== null ? zeroWidthTrigger || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-trigger`,
onClick: toggle,
style: {
width: siderWidth
}
}, trigger || defaultTrigger)) : null;
const divStyle = Object.assign(Object.assign({}, style), {
flex: `0 0 ${siderWidth}`,
maxWidth: siderWidth,
minWidth: siderWidth,
width: siderWidth
});
const siderCls = classnames_default()(prefixCls, `${prefixCls}-${theme}`, {
[`${prefixCls}-collapsed`]: !!collapsed,
[`${prefixCls}-has-trigger`]: collapsible && trigger !== null && !zeroWidthTrigger,
[`${prefixCls}-below`]: !!below,
[`${prefixCls}-zero-width`]: parseFloat(siderWidth) === 0
}, className, hashId, cssVarCls);
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
siderCollapsed: collapsed
}), [collapsed]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SiderContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("aside", Object.assign({
className: siderCls
}, divProps, {
style: divStyle,
ref: ref
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-children`
}, children), collapsible || below && zeroWidthTrigger ? triggerDom : null)));
});
if (true) {
Sider.displayName = 'Sider';
}
/* harmony default export */ var layout_Sider = (Sider);
;// ./node_modules/@ant-design/icons-svg/es/asn/EllipsisOutlined.js
// This icon file is generated automatically.
var EllipsisOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "ellipsis", "theme": "outlined" };
/* harmony default export */ var asn_EllipsisOutlined = (EllipsisOutlined);
;// ./node_modules/@ant-design/icons/es/icons/EllipsisOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EllipsisOutlined_EllipsisOutlined = function EllipsisOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_EllipsisOutlined
}));
};
/** */
var EllipsisOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EllipsisOutlined_EllipsisOutlined);
if (true) {
EllipsisOutlined_RefIcon.displayName = 'EllipsisOutlined';
}
/* harmony default export */ var icons_EllipsisOutlined = (EllipsisOutlined_RefIcon);
;// ./components/menu/MenuContext.tsx
const MenuContext_MenuContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({
prefixCls: '',
firstLevel: true,
inlineCollapsed: false
});
/* harmony default export */ var menu_MenuContext = (MenuContext_MenuContext);
;// ./components/menu/MenuDivider.tsx
var MenuDivider_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;
};
const MenuDivider = props => {
const {
prefixCls: customizePrefixCls,
className,
dashed
} = props,
restProps = MenuDivider_rest(props, ["prefixCls", "className", "dashed"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('menu', customizePrefixCls);
const classString = classnames_default()({
[`${prefixCls}-item-divider-dashed`]: !!dashed
}, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Divider, Object.assign({
className: classString
}, restProps));
};
/* harmony default export */ var menu_MenuDivider = (MenuDivider);
;// ./components/menu/MenuItem.tsx
const MenuItem_MenuItem = props => {
var _a;
const {
className,
children,
icon,
title,
danger,
extra
} = props;
const {
prefixCls,
firstLevel,
direction,
disableMenuItemTitleTooltip,
inlineCollapsed: isInlineCollapsed
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(menu_MenuContext);
const renderItemChildren = inlineCollapsed => {
const label = children === null || children === void 0 ? void 0 : children[0];
const wrapNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(`${prefixCls}-title-content`, {
[`${prefixCls}-title-content-with-extra`]: !!extra || extra === 0
})
}, children);
// inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span
// ref: https://github.com/ant-design/ant-design/pull/23456
if (!icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children) && children.type === 'span') {
if (children && inlineCollapsed && firstLevel && typeof label === 'string') {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-inline-collapsed-noicon`
}, label.charAt(0));
}
}
return wrapNode;
};
const {
siderCollapsed
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SiderContext);
let tooltipTitle = title;
if (typeof title === 'undefined') {
tooltipTitle = firstLevel ? children : '';
} else if (title === false) {
tooltipTitle = '';
}
const tooltipProps = {
title: tooltipTitle
};
if (!siderCollapsed && !isInlineCollapsed) {
tooltipProps.title = null;
// Reset `open` to fix control mode tooltip display not correct
// ref: https://github.com/ant-design/ant-design/issues/16742
tooltipProps.open = false;
}
const childrenLength = (0,toArray["default"])(children).length;
let returnNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, Object.assign({}, (0,omit["default"])(props, ['title', 'icon', 'danger']), {
className: classnames_default()({
[`${prefixCls}-item-danger`]: danger,
[`${prefixCls}-item-only-child`]: (icon ? childrenLength + 1 : childrenLength) === 1
}, className),
title: typeof title === 'string' ? title : undefined
}), (0,reactNode.cloneElement)(icon, {
className: classnames_default()(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : '', `${prefixCls}-item-icon`)
}), renderItemChildren(isInlineCollapsed));
if (!disableMenuItemTitleTooltip) {
returnNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, tooltipProps, {
placement: direction === 'rtl' ? 'left' : 'right',
classNames: {
root: `${prefixCls}-inline-collapsed-tooltip`
}
}), returnNode);
}
return returnNode;
};
/* harmony default export */ var menu_MenuItem = (MenuItem_MenuItem);
;// ./components/menu/OverrideContext.tsx
var OverrideContext_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;
};
const OverrideContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/** @internal Only used for Dropdown component. Do not use this in your production. */
const OverrideProvider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
children
} = props,
restProps = OverrideContext_rest(props, ["children"]);
const override = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(OverrideContext);
const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, override), restProps), [override, restProps.prefixCls,
// restProps.expandIcon, Not mark as deps since this is a ReactNode
restProps.mode, restProps.selectable, restProps.rootClassName
// restProps.validator, Not mark as deps since this is a function
]);
const canRef = (0,es_ref.supportNodeRef)(children);
const mergedRef = (0,es_ref.useComposeRef)(ref, canRef ? (0,es_ref.getNodeRef)(children) : null);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverrideContext.Provider, {
value: context
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
space: true
}, canRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
ref: mergedRef
}) : children));
});
/** @internal Only used for Dropdown component. Do not use this in your production. */
/* harmony default export */ var menu_OverrideContext = (OverrideContext);
// EXTERNAL MODULE: ./components/menu/style/index.ts + 4 modules
var menu_style = __webpack_require__("./components/menu/style/index.ts");
;// ./components/menu/SubMenu.tsx
const SubMenu_SubMenu = props => {
var _a;
const {
popupClassName,
icon,
title,
theme: customTheme
} = props;
const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(menu_MenuContext);
const {
prefixCls,
inlineCollapsed,
theme: contextTheme
} = context;
const parentPath = useFullPath();
let titleNode;
if (!icon) {
titleNode = inlineCollapsed && !parentPath.length && title && typeof title === 'string' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-inline-collapsed-noicon`
}, title.charAt(0))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-title-content`
}, title));
} else {
// inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span
// ref: https://github.com/ant-design/ant-design/pull/23456
const titleIsSpan = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(title) && title.type === 'span';
titleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, (0,reactNode.cloneElement)(icon, {
className: classnames_default()(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : '', `${prefixCls}-item-icon`)
}), titleIsSpan ? title : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-title-content`
}, title));
}
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, context), {
firstLevel: false
}), [context]);
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('Menu');
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu_MenuContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SubMenu, Object.assign({}, (0,omit["default"])(props, ['icon']), {
title: titleNode,
popupClassName: classnames_default()(prefixCls, popupClassName, `${prefixCls}-${customTheme || contextTheme}`),
popupStyle: Object.assign({
zIndex
}, props.popupStyle)
})));
};
/* harmony default export */ var menu_SubMenu = (SubMenu_SubMenu);
;// ./components/menu/menu.tsx
var menu_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 isEmptyIcon(icon) {
return icon === null || icon === false;
}
const MENU_COMPONENTS = {
item: menu_MenuItem,
submenu: menu_SubMenu,
divider: menu_MenuDivider
};
const InternalMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
var _a;
const override = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(menu_OverrideContext);
const overrideObj = override || {};
const {
getPrefixCls,
getPopupContainer,
direction,
menu
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const rootPrefixCls = getPrefixCls();
const {
prefixCls: customizePrefixCls,
className,
style,
theme = 'light',
expandIcon,
_internalDisableMenuItemTitleTooltip,
inlineCollapsed,
siderCollapsed,
rootClassName,
mode,
selectable,
onClick,
overflowedIndicatorPopupClassName
} = props,
restProps = menu_rest(props, ["prefixCls", "className", "style", "theme", "expandIcon", "_internalDisableMenuItemTitleTooltip", "inlineCollapsed", "siderCollapsed", "rootClassName", "mode", "selectable", "onClick", "overflowedIndicatorPopupClassName"]);
const passedProps = (0,omit["default"])(restProps, ['collapsedWidth']);
// ======================== Warning ==========================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Menu');
true ? warning(!('inlineCollapsed' in props && mode !== 'inline'), 'usage', '`inlineCollapsed` should only be used when `mode` is inline.') : 0;
warning.deprecated('items' in props && !props.children, 'children', 'items');
}
(_a = overrideObj.validator) === null || _a === void 0 ? void 0 : _a.call(overrideObj, {
mode
});
// ========================== Click ==========================
// Tell dropdown that item clicked
const onItemClick = (0,useEvent["default"])(function () {
var _a;
onClick === null || onClick === void 0 ? void 0 : onClick.apply(void 0, arguments);
(_a = overrideObj.onClick) === null || _a === void 0 ? void 0 : _a.call(overrideObj);
});
// ========================== Mode ===========================
const mergedMode = overrideObj.mode || mode;
// ======================= Selectable ========================
const mergedSelectable = selectable !== null && selectable !== void 0 ? selectable : overrideObj.selectable;
// ======================== Collapsed ========================
// Inline Collapsed
const mergedInlineCollapsed = inlineCollapsed !== null && inlineCollapsed !== void 0 ? inlineCollapsed : siderCollapsed;
const defaultMotions = {
horizontal: {
motionName: `${rootPrefixCls}-slide-up`
},
inline: (0,_util_motion["default"])(rootPrefixCls),
other: {
motionName: `${rootPrefixCls}-zoom-big`
}
};
const prefixCls = getPrefixCls('menu', customizePrefixCls || overrideObj.prefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,menu_style["default"])(prefixCls, rootCls, !override);
const menuClassName = classnames_default()(`${prefixCls}-${theme}`, menu === null || menu === void 0 ? void 0 : menu.className, className);
// ====================== ExpandIcon ========================
const mergedExpandIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b;
if (typeof expandIcon === 'function' || isEmptyIcon(expandIcon)) {
return expandIcon || null;
}
if (typeof overrideObj.expandIcon === 'function' || isEmptyIcon(overrideObj.expandIcon)) {
return overrideObj.expandIcon || null;
}
if (typeof (menu === null || menu === void 0 ? void 0 : menu.expandIcon) === 'function' || isEmptyIcon(menu === null || menu === void 0 ? void 0 : menu.expandIcon)) {
return (menu === null || menu === void 0 ? void 0 : menu.expandIcon) || null;
}
const mergedIcon = (_a = expandIcon !== null && expandIcon !== void 0 ? expandIcon : overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon) !== null && _a !== void 0 ? _a : menu === null || menu === void 0 ? void 0 : menu.expandIcon;
return (0,reactNode.cloneElement)(mergedIcon, {
className: classnames_default()(`${prefixCls}-submenu-expand-icon`, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedIcon) ? (_b = mergedIcon.props) === null || _b === void 0 ? void 0 : _b.className : undefined)
});
}, [expandIcon, overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon, menu === null || menu === void 0 ? void 0 : menu.expandIcon, prefixCls]);
// ======================== Context ==========================
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
prefixCls,
inlineCollapsed: mergedInlineCollapsed || false,
direction,
firstLevel: true,
theme,
mode: mergedMode,
disableMenuItemTitleTooltip: _internalDisableMenuItemTitleTooltip
}), [prefixCls, mergedInlineCollapsed, direction, _internalDisableMenuItemTitleTooltip, theme]);
// ========================= Render ==========================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu_OverrideContext.Provider, {
value: null
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu_MenuContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_menu_es, Object.assign({
getPopupContainer: getPopupContainer,
overflowedIndicator: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EllipsisOutlined, null),
overflowedIndicatorPopupClassName: classnames_default()(prefixCls, `${prefixCls}-${theme}`, overflowedIndicatorPopupClassName),
mode: mergedMode,
selectable: mergedSelectable,
onClick: onItemClick
}, passedProps, {
inlineCollapsed: mergedInlineCollapsed,
style: Object.assign(Object.assign({}, menu === null || menu === void 0 ? void 0 : menu.style), style),
className: menuClassName,
prefixCls: prefixCls,
direction: direction,
defaultMotions: defaultMotions,
expandIcon: mergedExpandIcon,
ref: ref,
rootClassName: classnames_default()(rootClassName, hashId, overrideObj.rootClassName, cssVarCls, rootCls),
_internalComponents: MENU_COMPONENTS
})))));
});
/* harmony default export */ var menu = (InternalMenu);
;// ./components/menu/index.tsx
const menu_Menu = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
const menuRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SiderContext);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => ({
menu: menuRef.current,
focus: options => {
var _a;
(_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.focus(options);
}
}));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu, Object.assign({
ref: menuRef
}, props, context));
});
menu_Menu.Item = menu_MenuItem;
menu_Menu.SubMenu = menu_SubMenu;
menu_Menu.Divider = menu_MenuDivider;
menu_Menu.ItemGroup = es_MenuItemGroup;
if (true) {
menu_Menu.displayName = 'Menu';
}
/* harmony default export */ var components_menu = (menu_Menu);
// EXTERNAL MODULE: ./components/dropdown/style/index.ts + 1 modules
var dropdown_style = __webpack_require__("./components/dropdown/style/index.ts");
;// ./components/dropdown/dropdown.tsx
const _Placements = ['topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', 'top', 'bottom'];
const dropdown_Dropdown = props => {
var _a;
const {
menu,
arrow,
prefixCls: customizePrefixCls,
children,
trigger,
disabled,
dropdownRender,
getPopupContainer,
overlayClassName,
rootClassName,
overlayStyle,
open,
onOpenChange,
// Deprecated
visible,
onVisibleChange,
mouseEnterDelay = 0.15,
mouseLeaveDelay = 0.1,
autoAdjustOverflow = true,
placement = '',
overlay,
transitionName
} = props;
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
direction,
dropdown
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
// Warning for deprecated usage
const warning = (0,_util_warning.devUseWarning)('Dropdown');
if (true) {
[['visible', 'open'], ['onVisibleChange', 'onOpenChange']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
warning.deprecated(!('overlay' in props), 'overlay', 'menu');
}
const memoTransitionName = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const rootPrefixCls = getPrefixCls();
if (transitionName !== undefined) {
return transitionName;
}
if (placement.includes('top')) {
return `${rootPrefixCls}-slide-down`;
}
return `${rootPrefixCls}-slide-up`;
}, [getPrefixCls, placement, transitionName]);
const memoPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!placement) {
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
}
if (placement.includes('Center')) {
return placement.slice(0, placement.indexOf('Center'));
}
return placement;
}, [placement, direction]);
if (true) {
if (placement.includes('Center')) {
const newPlacement = placement.slice(0, placement.indexOf('Center'));
true ? warning(!placement.includes('Center'), 'deprecated', `You are using '${placement}' placement in Dropdown, which is deprecated. Try to use '${newPlacement}' instead.`) : 0;
}
[['visible', 'open'], ['onVisibleChange', 'onOpenChange']].forEach(_ref2 => {
let [deprecatedName, newName] = _ref2;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,dropdown_style["default"])(prefixCls, rootCls);
const [, token] = (0,useToken["default"])();
const child = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(_util_isPrimitive(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children) : children);
const dropdownTrigger = (0,reactNode.cloneElement)(child, {
className: classnames_default()(`${prefixCls}-trigger`, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, child.props.className),
disabled: (_a = child.props.disabled) !== null && _a !== void 0 ? _a : disabled
});
const triggerActions = disabled ? [] : trigger;
const alignPoint = !!(triggerActions === null || triggerActions === void 0 ? void 0 : triggerActions.includes('contextMenu'));
// =========================== Open ============================
const [mergedOpen, setOpen] = (0,useMergedState["default"])(false, {
value: open !== null && open !== void 0 ? open : visible
});
const onInnerOpenChange = (0,useEvent["default"])(nextOpen => {
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen, {
source: 'trigger'
});
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(nextOpen);
setOpen(nextOpen);
});
// =========================== Overlay ============================
const overlayClassNameCustomized = classnames_default()(overlayClassName, rootClassName, hashId, cssVarCls, rootCls, dropdown === null || dropdown === void 0 ? void 0 : dropdown.className, {
[`${prefixCls}-rtl`]: direction === 'rtl'
});
const builtinPlacements = getPlacements({
arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,
autoAdjustOverflow,
offset: token.marginXXS,
arrowWidth: arrow ? token.sizePopupArrow : 0,
borderRadius: token.borderRadius
});
const onMenuClick = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(() => {
if ((menu === null || menu === void 0 ? void 0 : menu.selectable) && (menu === null || menu === void 0 ? void 0 : menu.multiple)) {
return;
}
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false, {
source: 'menu'
});
setOpen(false);
}, [menu === null || menu === void 0 ? void 0 : menu.selectable, menu === null || menu === void 0 ? void 0 : menu.multiple]);
const renderOverlay = () => {
// rc-dropdown already can process the function of overlay, but we have check logic here.
// So we need render the element to check and pass back to rc-dropdown.
let overlayNode;
if (menu === null || menu === void 0 ? void 0 : menu.items) {
overlayNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_menu, Object.assign({}, menu));
} else if (typeof overlay === 'function') {
overlayNode = overlay();
} else {
overlayNode = overlay;
}
if (dropdownRender) {
overlayNode = dropdownRender(overlayNode);
}
overlayNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(typeof overlayNode === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, overlayNode) : overlayNode);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverrideProvider, {
prefixCls: `${prefixCls}-menu`,
rootClassName: classnames_default()(cssVarCls, rootCls),
expandIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-menu-submenu-arrow`
}, direction === 'rtl' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, {
className: `${prefixCls}-menu-submenu-arrow-icon`
})) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], {
className: `${prefixCls}-menu-submenu-arrow-icon`
}))),
mode: "vertical",
selectable: false,
onClick: onMenuClick,
validator: _ref3 => {
let {
mode
} = _ref3;
// Warning if use other mode
true ? warning(!mode || mode === 'vertical', 'usage', `mode="${mode}" is not supported for Dropdown's Menu.`) : 0;
}
}, overlayNode);
};
// =========================== zIndex ============================
const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Dropdown', overlayStyle === null || overlayStyle === void 0 ? void 0 : overlayStyle.zIndex);
// ============================ Render ============================
let renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_dropdown_es, Object.assign({
alignPoint: alignPoint
}, (0,omit["default"])(props, ['rootClassName']), {
mouseEnterDelay: mouseEnterDelay,
mouseLeaveDelay: mouseLeaveDelay,
visible: mergedOpen,
builtinPlacements: builtinPlacements,
arrow: !!arrow,
overlayClassName: overlayClassNameCustomized,
prefixCls: prefixCls,
getPopupContainer: getPopupContainer || getContextPopupContainer,
transitionName: memoTransitionName,
trigger: triggerActions,
overlay: renderOverlay,
placement: memoPlacement,
onVisibleChange: onInnerOpenChange,
overlayStyle: Object.assign(Object.assign(Object.assign({}, dropdown === null || dropdown === void 0 ? void 0 : dropdown.style), overlayStyle), {
zIndex
})
}), dropdownTrigger);
if (zIndex) {
renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
value: contextZIndex
}, renderNode);
}
return wrapCSSVar(renderNode);
};
// We don't care debug panel
const dropdown_PurePanel = _util_PurePanel(dropdown_Dropdown, 'align', undefined, 'dropdown', prefixCls => prefixCls);
/* istanbul ignore next */
const WrapPurePanel = props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(dropdown_PurePanel, Object.assign({}, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null)));
dropdown_Dropdown._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel;
if (true) {
dropdown_Dropdown.displayName = 'Dropdown';
}
/* harmony default export */ var dropdown = (dropdown_Dropdown);
;// ./components/breadcrumb/BreadcrumbSeparator.tsx
const BreadcrumbSeparator = _ref => {
let {
children
} = _ref;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('breadcrumb');
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
className: `${prefixCls}-separator`,
"aria-hidden": "true"
}, children === '' ? children : children || '/');
};
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
;// ./components/breadcrumb/useItemRender.tsx
var useItemRender_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.title === undefined || route.title === null) {
return null;
}
const paramsKeys = Object.keys(params).join('|');
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
}
function renderItem(prefixCls, item, children, href) {
if (children === null || children === undefined) {
return null;
}
const {
className,
onClick
} = item,
restItem = useItemRender_rest(item, ["className", "onClick"]);
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs["default"])(restItem, {
data: true,
aria: true
})), {
onClick
});
if (href !== undefined) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", Object.assign({}, passedProps, {
className: classnames_default()(`${prefixCls}-link`, className),
href: href
}), children);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, passedProps, {
className: classnames_default()(`${prefixCls}-link`, className)
}), children);
}
function useItemRender(prefixCls, itemRender) {
const mergedItemRender = (item, params, routes, path, href) => {
if (itemRender) {
return itemRender(item, params, routes, path);
}
const name = getBreadcrumbName(item, params);
return renderItem(prefixCls, item, name, href);
};
return mergedItemRender;
}
;// ./components/breadcrumb/BreadcrumbItem.tsx
var BreadcrumbItem_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;
};
const InternalBreadcrumbItem = props => {
const {
prefixCls,
separator = '/',
children,
menu,
overlay,
dropdownProps,
href
} = props;
// Warning for deprecated usage
if (true) {
const warning = (0,_util_warning.devUseWarning)('Breadcrumb.Item');
warning.deprecated(!('overlay' in props), 'overlay', 'menu');
}
/** If overlay is have Wrap a Dropdown */
const renderBreadcrumbNode = breadcrumbItem => {
if (menu || overlay) {
const mergeDropDownProps = Object.assign({}, dropdownProps);
if (menu) {
const _a = menu || {},
{
items
} = _a,
menuProps = BreadcrumbItem_rest(_a, ["items"]);
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
var {
key,
title,
label,
path
} = _a,
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
let mergedLabel = label !== null && label !== void 0 ? label : title;
if (path) {
mergedLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
href: `${href}${path}`
}, mergedLabel);
}
return Object.assign(Object.assign({}, itemProps), {
key: key !== null && key !== void 0 ? key : index,
label: mergedLabel
});
})
});
} else if (overlay) {
mergeDropDownProps.overlay = overlay;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(dropdown, Object.assign({
placement: "bottom"
}, mergeDropDownProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-overlay-link`
}, breadcrumbItem, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, null)));
}
return breadcrumbItem;
};
// wrap to dropDown
const link = renderBreadcrumbNode(children);
if (link !== undefined && link !== null) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", null, link), separator && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
}
return null;
};
const BreadcrumbItem = props => {
const {
prefixCls: customizePrefixCls,
children,
href
} = props,
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
prefixCls: prefixCls
}), renderItem(prefixCls, restProps, children, href));
};
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
// EXTERNAL MODULE: ./components/breadcrumb/style/index.ts
var breadcrumb_style = __webpack_require__("./components/breadcrumb/style/index.ts");
;// ./components/breadcrumb/useItems.ts
var useItems_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 route2item(route) {
const {
breadcrumbName,
children
} = route,
rest = useItems_rest(route, ["breadcrumbName", "children"]);
const clone = Object.assign({
title: breadcrumbName
}, rest);
if (children) {
clone.menu = {
items: children.map(_a => {
var {
breadcrumbName: itemBreadcrumbName
} = _a,
itemProps = useItems_rest(_a, ["breadcrumbName"]);
return Object.assign(Object.assign({}, itemProps), {
title: itemBreadcrumbName
});
})
};
}
return clone;
}
function useItems(items, routes) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (items) {
return items;
}
if (routes) {
return routes.map(route2item);
}
return null;
}, [items, routes]);
}
;// ./components/breadcrumb/Breadcrumb.tsx
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;
};
const getPath = (params, path) => {
if (path === undefined) {
return path;
}
let mergedPath = (path || '').replace(/^\//, '');
Object.keys(params).forEach(key => {
mergedPath = mergedPath.replace(`:${key}`, params[key]);
});
return mergedPath;
};
const Breadcrumb = props => {
const {
prefixCls: customizePrefixCls,
separator = '/',
style,
className,
rootClassName,
routes: legacyRoutes,
items,
children,
itemRender,
params = {}
} = props,
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
const {
getPrefixCls,
direction,
breadcrumb
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
let crumbs;
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,breadcrumb_style["default"])(prefixCls);
const mergedItems = useItems(items, legacyRoutes);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Breadcrumb');
warning.deprecated(!legacyRoutes, 'routes', 'items');
// Deprecated warning for breadcrumb children
if (!mergedItems || mergedItems.length === 0) {
const childList = (0,toArray["default"])(children);
warning.deprecated(childList.length === 0, 'Breadcrumb.Item and Breadcrumb.Separator', 'items');
childList.forEach(element => {
if (element) {
true ? warning(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'usage', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children") : 0;
}
});
}
}
const mergedItemRender = useItemRender(prefixCls, itemRender);
if (mergedItems && mergedItems.length > 0) {
// generated by route
const paths = [];
const itemRenderRoutes = items || legacyRoutes;
crumbs = mergedItems.map((item, index) => {
const {
path,
key,
type,
menu,
overlay,
onClick,
className: itemClassName,
separator: itemSeparator,
dropdownProps
} = item;
const mergedPath = getPath(params, path);
if (mergedPath !== undefined) {
paths.push(mergedPath);
}
const mergedKey = key !== null && key !== void 0 ? key : index;
if (type === 'separator') {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(breadcrumb_BreadcrumbSeparator, {
key: mergedKey
}, itemSeparator);
}
const itemProps = {};
const isLastItem = index === mergedItems.length - 1;
if (menu) {
itemProps.menu = menu;
} else if (overlay) {
itemProps.overlay = overlay;
}
let {
href
} = item;
if (paths.length && mergedPath !== undefined) {
href = `#/${paths.join('/')}`;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalBreadcrumbItem, Object.assign({
key: mergedKey
}, itemProps, (0,pickAttrs["default"])(item, {
data: true,
aria: true
}), {
className: itemClassName,
dropdownProps: dropdownProps,
href: href,
separator: isLastItem ? '' : separator,
onClick: onClick,
prefixCls: prefixCls
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
});
} else if (children) {
const childrenLength = (0,toArray["default"])(children).length;
crumbs = (0,toArray["default"])(children).map((element, index) => {
if (!element) {
return element;
}
const isLastItem = index === childrenLength - 1;
return (0,reactNode.cloneElement)(element, {
separator: isLastItem ? '' : separator,
// eslint-disable-next-line react/no-array-index-key
key: index
});
});
}
const breadcrumbClassName = classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("nav", Object.assign({
className: breadcrumbClassName,
style: mergedStyle
}, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ol", null, crumbs)));
};
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
if (true) {
Breadcrumb.displayName = 'Breadcrumb';
}
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
;// ./components/breadcrumb/index.tsx
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
// EXTERNAL MODULE: external {"root":"dayjs","commonjs2":"dayjs","commonjs":"dayjs","amd":"dayjs"}
var external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_ = __webpack_require__("dayjs");
var external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_);
// EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekday.js
var weekday = __webpack_require__("./node_modules/dayjs/plugin/weekday.js");
var weekday_default = /*#__PURE__*/__webpack_require__.n(weekday);
// EXTERNAL MODULE: ./node_modules/dayjs/plugin/localeData.js
var localeData = __webpack_require__("./node_modules/dayjs/plugin/localeData.js");
var localeData_default = /*#__PURE__*/__webpack_require__.n(localeData);
// EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekOfYear.js
var weekOfYear = __webpack_require__("./node_modules/dayjs/plugin/weekOfYear.js");
var weekOfYear_default = /*#__PURE__*/__webpack_require__.n(weekOfYear);
// EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekYear.js
var weekYear = __webpack_require__("./node_modules/dayjs/plugin/weekYear.js");
var weekYear_default = /*#__PURE__*/__webpack_require__.n(weekYear);
// EXTERNAL MODULE: ./node_modules/dayjs/plugin/advancedFormat.js
var advancedFormat = __webpack_require__("./node_modules/dayjs/plugin/advancedFormat.js");
var advancedFormat_default = /*#__PURE__*/__webpack_require__.n(advancedFormat);
// EXTERNAL MODULE: ./node_modules/dayjs/plugin/customParseFormat.js
var customParseFormat = __webpack_require__("./node_modules/dayjs/plugin/customParseFormat.js");
var customParseFormat_default = /*#__PURE__*/__webpack_require__.n(customParseFormat);
;// ./node_modules/rc-picker/es/generate/dayjs.js
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((customParseFormat_default()));
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((advancedFormat_default()));
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((weekday_default()));
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((localeData_default()));
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((weekOfYear_default()));
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((weekYear_default()));
external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend(function (o, c) {
// todo support Wo (ISO week)
var proto = c.prototype;
var oldFormat = proto.format;
proto.format = function f(formatStr) {
var str = (formatStr || '').replace('Wo', 'wo');
return oldFormat.bind(this)(str);
};
});
var localeMap = {
// ar_EG:
// az_AZ:
// bg_BG:
bn_BD: 'bn-bd',
by_BY: 'be',
// ca_ES:
// cs_CZ:
// da_DK:
// de_DE:
// el_GR:
en_GB: 'en-gb',
en_US: 'en',
// es_ES:
// et_EE:
// fa_IR:
// fi_FI:
fr_BE: 'fr',
// todo: dayjs has no fr_BE locale, use fr at present
fr_CA: 'fr-ca',
// fr_FR:
// ga_IE:
// gl_ES:
// he_IL:
// hi_IN:
// hr_HR:
// hu_HU:
hy_AM: 'hy-am',
// id_ID:
// is_IS:
// it_IT:
// ja_JP:
// ka_GE:
// kk_KZ:
// km_KH:
kmr_IQ: 'ku',
// kn_IN:
// ko_KR:
// ku_IQ: // previous ku in antd
// lt_LT:
// lv_LV:
// mk_MK:
// ml_IN:
// mn_MN:
// ms_MY:
// nb_NO:
// ne_NP:
nl_BE: 'nl-be',
// nl_NL:
// pl_PL:
pt_BR: 'pt-br',
// pt_PT:
// ro_RO:
// ru_RU:
// sk_SK:
// sl_SI:
// sr_RS:
// sv_SE:
// ta_IN:
// th_TH:
// tr_TR:
// uk_UA:
// ur_PK:
// vi_VN:
zh_CN: 'zh-cn',
zh_HK: 'zh-hk',
zh_TW: 'zh-tw'
};
var parseLocale = function parseLocale(locale) {
var mapLocale = localeMap[locale];
return mapLocale || locale.split('_')[0];
};
/* istanbul ignore next */
var parseNoMatchNotice = function parseNoMatchNotice() {
// zombieJ:
// When user typing, its always miss match format.
// This check is meaningless.
// https://github.com/ant-design/ant-design/issues/51839
// noteOnce(false, 'Not match any format. Please help to fire a issue about this.');
};
var generateConfig = {
// get
getNow: function getNow() {
var now = external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()();
// https://github.com/ant-design/ant-design/discussions/50934
if (typeof now.tz === 'function') {
return now.tz(); // use default timezone
}
return now;
},
getFixedDate: function getFixedDate(string) {
return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()(string, ['YYYY-M-DD', 'YYYY-MM-DD']);
},
getEndDate: function getEndDate(date) {
return date.endOf('month');
},
getWeekDay: function getWeekDay(date) {
var clone = date.locale('en');
return clone.weekday() + clone.localeData().firstDayOfWeek();
},
getYear: function getYear(date) {
return date.year();
},
getMonth: function getMonth(date) {
return date.month();
},
getDate: function getDate(date) {
return date.date();
},
getHour: function getHour(date) {
return date.hour();
},
getMinute: function getMinute(date) {
return date.minute();
},
getSecond: function getSecond(date) {
return date.second();
},
getMillisecond: function getMillisecond(date) {
return date.millisecond();
},
// set
addYear: function addYear(date, diff) {
return date.add(diff, 'year');
},
addMonth: function addMonth(date, diff) {
return date.add(diff, 'month');
},
addDate: function addDate(date, diff) {
return date.add(diff, 'day');
},
setYear: function setYear(date, year) {
return date.year(year);
},
setMonth: function setMonth(date, month) {
return date.month(month);
},
setDate: function setDate(date, num) {
return date.date(num);
},
setHour: function setHour(date, hour) {
return date.hour(hour);
},
setMinute: function setMinute(date, minute) {
return date.minute(minute);
},
setSecond: function setSecond(date, second) {
return date.second(second);
},
setMillisecond: function setMillisecond(date, milliseconds) {
return date.millisecond(milliseconds);
},
// Compare
isAfter: function isAfter(date1, date2) {
return date1.isAfter(date2);
},
isValidate: function isValidate(date) {
return date.isValid();
},
locale: {
getWeekFirstDay: function getWeekFirstDay(locale) {
return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()().locale(parseLocale(locale)).localeData().firstDayOfWeek();
},
getWeekFirstDate: function getWeekFirstDate(locale, date) {
return date.locale(parseLocale(locale)).weekday(0);
},
getWeek: function getWeek(locale, date) {
return date.locale(parseLocale(locale)).week();
},
getShortWeekDays: function getShortWeekDays(locale) {
return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()().locale(parseLocale(locale)).localeData().weekdaysMin();
},
getShortMonths: function getShortMonths(locale) {
return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()().locale(parseLocale(locale)).localeData().monthsShort();
},
format: function format(locale, date, _format) {
return date.locale(parseLocale(locale)).format(_format);
},
parse: function parse(locale, text, formats) {
var localeStr = parseLocale(locale);
for (var i = 0; i < formats.length; i += 1) {
var format = formats[i];
var formatText = text;
if (format.includes('wo') || format.includes('Wo')) {
// parse Wo
var year = formatText.split('-')[0];
var weekStr = formatText.split('-')[1];
var firstWeek = external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()(year, 'YYYY').startOf('year').locale(localeStr);
for (var j = 0; j <= 52; j += 1) {
var nextWeek = firstWeek.add(j, 'week');
if (nextWeek.format('Wo') === weekStr) {
return nextWeek;
}
}
parseNoMatchNotice();
return null;
}
var date = external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()(formatText, format, true).locale(localeStr);
if (date.isValid()) {
return date;
}
}
if (text) {
parseNoMatchNotice();
}
return null;
}
}
};
/* harmony default export */ var dayjs = (generateConfig);
;// ./node_modules/rc-picker/es/utils/uiUtil.js
// ====================== Mode ======================
function getRealPlacement(placement, rtl) {
if (placement !== undefined) {
return placement;
}
return rtl ? 'bottomRight' : 'bottomLeft';
}
;// ./node_modules/rc-picker/es/PickerInput/context.js
var PickerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var PickerInput_context = (PickerContext);
;// ./node_modules/rc-picker/es/PickerTrigger/index.js
var BUILT_IN_PLACEMENTS = {
bottomLeft: {
points: ['tl', 'bl'],
offset: [0, 4],
overflow: {
adjustX: 1,
adjustY: 1
}
},
bottomRight: {
points: ['tr', 'br'],
offset: [0, 4],
overflow: {
adjustX: 1,
adjustY: 1
}
},
topLeft: {
points: ['bl', 'tl'],
offset: [0, -4],
overflow: {
adjustX: 0,
adjustY: 1
}
},
topRight: {
points: ['br', 'tr'],
offset: [0, -4],
overflow: {
adjustX: 0,
adjustY: 1
}
}
};
function PickerTrigger(_ref) {
var popupElement = _ref.popupElement,
popupStyle = _ref.popupStyle,
popupClassName = _ref.popupClassName,
popupAlign = _ref.popupAlign,
transitionName = _ref.transitionName,
getPopupContainer = _ref.getPopupContainer,
children = _ref.children,
range = _ref.range,
placement = _ref.placement,
_ref$builtinPlacement = _ref.builtinPlacements,
builtinPlacements = _ref$builtinPlacement === void 0 ? BUILT_IN_PLACEMENTS : _ref$builtinPlacement,
direction = _ref.direction,
visible = _ref.visible,
onClose = _ref.onClose;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls;
var dropdownPrefixCls = "".concat(prefixCls, "-dropdown");
var realPlacement = getRealPlacement(placement, direction === 'rtl');
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, {
showAction: [],
hideAction: ['click'],
popupPlacement: realPlacement,
builtinPlacements: builtinPlacements,
prefixCls: dropdownPrefixCls,
popupTransitionName: transitionName,
popup: popupElement,
popupAlign: popupAlign,
popupVisible: visible,
popupClassName: classnames_default()(popupClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(dropdownPrefixCls, "-range"), range), "".concat(dropdownPrefixCls, "-rtl"), direction === 'rtl')),
popupStyle: popupStyle,
stretch: "minWidth",
getPopupContainer: getPopupContainer,
onPopupVisibleChange: function onPopupVisibleChange(nextVisible) {
if (!nextVisible) {
onClose();
}
}
}, children);
}
/* harmony default export */ var es_PickerTrigger = (PickerTrigger);
;// ./node_modules/rc-picker/es/utils/miscUtil.js
function leftPad(str, length) {
var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';
var current = String(str);
while (current.length < length) {
current = "".concat(fill).concat(current);
}
return current;
}
/**
* Convert `value` to array. Will provide `[]` if is null or undefined.
*/
function miscUtil_toArray(val) {
if (val === null || val === undefined) {
return [];
}
return Array.isArray(val) ? val : [val];
}
function fillIndex(ori, index, value) {
var clone = (0,toConsumableArray["default"])(ori);
clone[index] = value;
return clone;
}
/** Pick props from the key list. Will filter empty value */
function pickProps(props, keys) {
var clone = {};
var mergedKeys = keys || Object.keys(props);
mergedKeys.forEach(function (key) {
if (props[key] !== undefined) {
clone[key] = props[key];
}
});
return clone;
}
function getRowFormat(picker, locale, format) {
if (format) {
return format;
}
switch (picker) {
// All from the `locale.fieldXXXFormat` first
case 'time':
return locale.fieldTimeFormat;
case 'datetime':
return locale.fieldDateTimeFormat;
case 'month':
return locale.fieldMonthFormat;
case 'year':
return locale.fieldYearFormat;
case 'quarter':
return locale.fieldQuarterFormat;
case 'week':
return locale.fieldWeekFormat;
default:
return locale.fieldDateFormat;
}
}
function getFromDate(calendarValues, activeIndexList, activeIndex) {
var mergedActiveIndex = activeIndex !== undefined ? activeIndex : activeIndexList[activeIndexList.length - 1];
var firstValuedIndex = activeIndexList.find(function (index) {
return calendarValues[index];
});
return mergedActiveIndex !== firstValuedIndex ? calendarValues[firstValuedIndex] : undefined;
}
;// ./node_modules/rc-picker/es/PickerTrigger/util.js
function pickTriggerProps(props) {
return pickProps(props, ['placement', 'builtinPlacements', 'popupAlign', 'getPopupContainer', 'transitionName', 'direction']);
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useCellRender.js
function useCellRender(cellRender, dateRender, monthCellRender, range) {
// ========================= Warn =========================
if (true) {
(0,rc_util_es.warning)(!dateRender, "'dateRender' is deprecated. Please use 'cellRender' instead.");
(0,rc_util_es.warning)(!monthCellRender, "'monthCellRender' is deprecated. Please use 'cellRender' instead.");
}
// ======================== Render ========================
// Merged render
var mergedCellRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (cellRender) {
return cellRender;
}
return function (current, info) {
var date = current;
if (dateRender && info.type === 'date') {
return dateRender(date, info.today);
}
if (monthCellRender && info.type === 'month') {
return monthCellRender(date, info.locale);
}
return info.originNode;
};
}, [cellRender, monthCellRender, dateRender]);
// Cell render
var onInternalCellRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (date, info) {
return mergedCellRender(date, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
range: range
}));
}, [mergedCellRender, range]);
return onInternalCellRender;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useFieldsInvalidate.js
/**
* Used to control each fields invalidate status
*/
function useFieldsInvalidate(calendarValue, isInvalidateDate) {
var allowEmpty = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([false, false]),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
fieldsInvalidates = _React$useState2[0],
setFieldsInvalidates = _React$useState2[1];
var onSelectorInvalid = function onSelectorInvalid(invalid, index) {
setFieldsInvalidates(function (ori) {
return fillIndex(ori, index, invalid);
});
};
/**
* For the Selector Input to mark as `aria-disabled`
*/
var submitInvalidates = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return fieldsInvalidates.map(function (invalid, index) {
// If typing invalidate
if (invalid) {
return true;
}
var current = calendarValue[index];
// Not check if all empty
if (!current) {
return false;
}
// Not allow empty
if (!allowEmpty[index] && !current) {
return true;
}
// Invalidate
if (current && isInvalidateDate(current, {
activeIndex: index
})) {
return true;
}
return false;
});
}, [calendarValue, fieldsInvalidates, isInvalidateDate, allowEmpty]);
return [submitInvalidates, onSelectorInvalid];
}
;// ./node_modules/rc-picker/es/hooks/useLocale.js
function fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, showMeridiem) {
var timeFormat = '';
// Base HH:mm:ss
var cells = [];
if (showHour) {
cells.push(showMeridiem ? 'hh' : 'HH');
}
if (showMinute) {
cells.push('mm');
}
if (showSecond) {
cells.push('ss');
}
timeFormat = cells.join(':');
// Millisecond
if (showMillisecond) {
timeFormat += '.SSS';
}
// Meridiem
if (showMeridiem) {
timeFormat += ' A';
}
return timeFormat;
}
/**
* Used for `useFilledProps` since it already in the React.useMemo
*/
function fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours) {
// Not fill `monthFormat` since `locale.shortMonths` handle this
// Not fill `cellMeridiemFormat` since AM & PM by default
var fieldDateTimeFormat = locale.fieldDateTimeFormat,
fieldDateFormat = locale.fieldDateFormat,
fieldTimeFormat = locale.fieldTimeFormat,
fieldMonthFormat = locale.fieldMonthFormat,
fieldYearFormat = locale.fieldYearFormat,
fieldWeekFormat = locale.fieldWeekFormat,
fieldQuarterFormat = locale.fieldQuarterFormat,
yearFormat = locale.yearFormat,
cellYearFormat = locale.cellYearFormat,
cellQuarterFormat = locale.cellQuarterFormat,
dayFormat = locale.dayFormat,
cellDateFormat = locale.cellDateFormat;
var timeFormat = fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, use12Hours);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, locale), {}, {
fieldDateTimeFormat: fieldDateTimeFormat || "YYYY-MM-DD ".concat(timeFormat),
fieldDateFormat: fieldDateFormat || 'YYYY-MM-DD',
fieldTimeFormat: fieldTimeFormat || timeFormat,
fieldMonthFormat: fieldMonthFormat || 'YYYY-MM',
fieldYearFormat: fieldYearFormat || 'YYYY',
fieldWeekFormat: fieldWeekFormat || 'gggg-wo',
fieldQuarterFormat: fieldQuarterFormat || 'YYYY-[Q]Q',
yearFormat: yearFormat || 'YYYY',
cellYearFormat: cellYearFormat || 'YYYY',
cellQuarterFormat: cellQuarterFormat || '[Q]Q',
cellDateFormat: cellDateFormat || dayFormat || 'D'
});
}
/**
* Fill locale format as start up
*/
function useLocale_useLocale(locale, showProps) {
var showHour = showProps.showHour,
showMinute = showProps.showMinute,
showSecond = showProps.showSecond,
showMillisecond = showProps.showMillisecond,
use12Hours = showProps.use12Hours;
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
return fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours);
}, [locale, showHour, showMinute, showSecond, showMillisecond, use12Hours]);
}
;// ./node_modules/rc-picker/es/hooks/useTimeConfig.js
function checkShow(format, keywords, show) {
return show !== null && show !== void 0 ? show : keywords.some(function (keyword) {
return format.includes(keyword);
});
}
var showTimeKeys = [
// 'format',
'showNow', 'showHour', 'showMinute', 'showSecond', 'showMillisecond', 'use12Hours', 'hourStep', 'minuteStep', 'secondStep', 'millisecondStep', 'hideDisabledOptions', 'defaultValue', 'disabledHours', 'disabledMinutes', 'disabledSeconds', 'disabledMilliseconds', 'disabledTime', 'changeOnScroll', 'defaultOpenValue'];
/**
* Get SharedTimeProps from props.
*/
function pickTimeProps(props) {
var timeProps = pickProps(props, showTimeKeys);
var format = props.format,
picker = props.picker;
var propFormat = null;
if (format) {
propFormat = format;
if (Array.isArray(propFormat)) {
propFormat = propFormat[0];
}
propFormat = (0,esm_typeof["default"])(propFormat) === 'object' ? propFormat.format : propFormat;
}
if (picker === 'time') {
timeProps.format = propFormat;
}
return [timeProps, propFormat];
}
function isStringFormat(format) {
return format && typeof format === 'string';
}
/** Check if all the showXXX is `undefined` */
function existShowConfig(showHour, showMinute, showSecond, showMillisecond) {
return [showHour, showMinute, showSecond, showMillisecond].some(function (show) {
return show !== undefined;
});
}
/** Fill the showXXX if needed */
function fillShowConfig(hasShowConfig, showHour, showMinute, showSecond, showMillisecond) {
var parsedShowHour = showHour;
var parsedShowMinute = showMinute;
var parsedShowSecond = showSecond;
if (!hasShowConfig && !parsedShowHour && !parsedShowMinute && !parsedShowSecond && !showMillisecond) {
parsedShowHour = true;
parsedShowMinute = true;
parsedShowSecond = true;
} else if (hasShowConfig) {
var _parsedShowHour, _parsedShowMinute, _parsedShowSecond;
var existFalse = [parsedShowHour, parsedShowMinute, parsedShowSecond].some(function (show) {
return show === false;
});
var existTrue = [parsedShowHour, parsedShowMinute, parsedShowSecond].some(function (show) {
return show === true;
});
var defaultShow = existFalse ? true : !existTrue;
parsedShowHour = (_parsedShowHour = parsedShowHour) !== null && _parsedShowHour !== void 0 ? _parsedShowHour : defaultShow;
parsedShowMinute = (_parsedShowMinute = parsedShowMinute) !== null && _parsedShowMinute !== void 0 ? _parsedShowMinute : defaultShow;
parsedShowSecond = (_parsedShowSecond = parsedShowSecond) !== null && _parsedShowSecond !== void 0 ? _parsedShowSecond : defaultShow;
}
return [parsedShowHour, parsedShowMinute, parsedShowSecond, showMillisecond];
}
/**
* Get `showHour`, `showMinute`, `showSecond` or other from the props.
* This is pure function, will not get `showXXX` from the `format` prop.
*/
function getTimeProps(componentProps) {
var showTime = componentProps.showTime;
var _pickTimeProps = pickTimeProps(componentProps),
_pickTimeProps2 = (0,slicedToArray["default"])(_pickTimeProps, 2),
pickedProps = _pickTimeProps2[0],
propFormat = _pickTimeProps2[1];
var showTimeConfig = showTime && (0,esm_typeof["default"])(showTime) === 'object' ? showTime : {};
var timeConfig = (0,objectSpread2["default"])((0,objectSpread2["default"])({
defaultOpenValue: showTimeConfig.defaultOpenValue || showTimeConfig.defaultValue
}, pickedProps), showTimeConfig);
var showMillisecond = timeConfig.showMillisecond;
var showHour = timeConfig.showHour,
showMinute = timeConfig.showMinute,
showSecond = timeConfig.showSecond;
var hasShowConfig = existShowConfig(showHour, showMinute, showSecond, showMillisecond);
var _fillShowConfig = fillShowConfig(hasShowConfig, showHour, showMinute, showSecond, showMillisecond);
var _fillShowConfig2 = (0,slicedToArray["default"])(_fillShowConfig, 3);
showHour = _fillShowConfig2[0];
showMinute = _fillShowConfig2[1];
showSecond = _fillShowConfig2[2];
return [timeConfig, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, timeConfig), {}, {
showHour: showHour,
showMinute: showMinute,
showSecond: showSecond,
showMillisecond: showMillisecond
}), timeConfig.format, propFormat];
}
function fillShowTimeConfig(picker, showTimeFormat, propFormat, timeConfig, locale) {
var isTimePicker = picker === 'time';
if (picker === 'datetime' || isTimePicker) {
var pickedProps = timeConfig;
// ====================== BaseFormat ======================
var defaultLocaleFormat = getRowFormat(picker, locale, null);
var baselineFormat = defaultLocaleFormat;
var formatList = [showTimeFormat, propFormat];
for (var i = 0; i < formatList.length; i += 1) {
var format = miscUtil_toArray(formatList[i])[0];
if (isStringFormat(format)) {
baselineFormat = format;
break;
}
}
// ========================= Show =========================
var showHour = pickedProps.showHour,
showMinute = pickedProps.showMinute,
showSecond = pickedProps.showSecond,
showMillisecond = pickedProps.showMillisecond;
var use12Hours = pickedProps.use12Hours;
var showMeridiem = checkShow(baselineFormat, ['a', 'A', 'LT', 'LLL', 'LTS'], use12Hours);
var hasShowConfig = existShowConfig(showHour, showMinute, showSecond, showMillisecond);
// Fill with format, if needed
if (!hasShowConfig) {
showHour = checkShow(baselineFormat, ['H', 'h', 'k', 'LT', 'LLL']);
showMinute = checkShow(baselineFormat, ['m', 'LT', 'LLL']);
showSecond = checkShow(baselineFormat, ['s', 'LTS']);
showMillisecond = checkShow(baselineFormat, ['SSS']);
}
// Fallback if all can not see
// ======================== Format ========================
var _fillShowConfig3 = fillShowConfig(hasShowConfig, showHour, showMinute, showSecond, showMillisecond);
var _fillShowConfig4 = (0,slicedToArray["default"])(_fillShowConfig3, 3);
showHour = _fillShowConfig4[0];
showMinute = _fillShowConfig4[1];
showSecond = _fillShowConfig4[2];
var timeFormat = showTimeFormat || fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, showMeridiem);
// ======================== Props =========================
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, pickedProps), {}, {
// Format
format: timeFormat,
// Show Config
showHour: showHour,
showMinute: showMinute,
showSecond: showSecond,
showMillisecond: showMillisecond,
use12Hours: showMeridiem
});
}
return null;
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/hooks/useClearIcon.js
/**
* Used for `useFilledProps` since it already in the React.useMemo
*/
function fillClearIcon(prefixCls, allowClear, clearIcon) {
if ( true && clearIcon) {
(0,warning["default"])(false, '`clearIcon` will be removed in future. Please use `allowClear` instead.');
}
if (allowClear === false) {
return null;
}
var config = allowClear && (0,esm_typeof["default"])(allowClear) === 'object' ? allowClear : {};
return config.clearIcon || clearIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-clear-btn")
});
}
;// ./node_modules/rc-picker/es/utils/dateUtil.js
var WEEK_DAY_COUNT = 7;
/**
* Wrap the compare logic.
* This will compare the each of value is empty first.
* 1. All is empty, return true.
* 2. One is empty, return false.
* 3. return customize compare logic.
*/
function nullableCompare(value1, value2, oriCompareFn) {
if (!value1 && !value2 || value1 === value2) {
return true;
}
if (!value1 || !value2) {
return false;
}
return oriCompareFn();
}
function isSameDecade(generateConfig, decade1, decade2) {
return nullableCompare(decade1, decade2, function () {
var num1 = Math.floor(generateConfig.getYear(decade1) / 10);
var num2 = Math.floor(generateConfig.getYear(decade2) / 10);
return num1 === num2;
});
}
function isSameYear(generateConfig, year1, year2) {
return nullableCompare(year1, year2, function () {
return generateConfig.getYear(year1) === generateConfig.getYear(year2);
});
}
function getQuarter(generateConfig, date) {
var quota = Math.floor(generateConfig.getMonth(date) / 3);
return quota + 1;
}
function isSameQuarter(generateConfig, quarter1, quarter2) {
return nullableCompare(quarter1, quarter2, function () {
return isSameYear(generateConfig, quarter1, quarter2) && getQuarter(generateConfig, quarter1) === getQuarter(generateConfig, quarter2);
});
}
function isSameMonth(generateConfig, month1, month2) {
return nullableCompare(month1, month2, function () {
return isSameYear(generateConfig, month1, month2) && generateConfig.getMonth(month1) === generateConfig.getMonth(month2);
});
}
function isSameDate(generateConfig, date1, date2) {
return nullableCompare(date1, date2, function () {
return isSameYear(generateConfig, date1, date2) && isSameMonth(generateConfig, date1, date2) && generateConfig.getDate(date1) === generateConfig.getDate(date2);
});
}
function isSameTime(generateConfig, time1, time2) {
return nullableCompare(time1, time2, function () {
return generateConfig.getHour(time1) === generateConfig.getHour(time2) && generateConfig.getMinute(time1) === generateConfig.getMinute(time2) && generateConfig.getSecond(time1) === generateConfig.getSecond(time2);
});
}
/**
* Check if the Date is all the same of timestamp
*/
function isSameTimestamp(generateConfig, time1, time2) {
return nullableCompare(time1, time2, function () {
return isSameDate(generateConfig, time1, time2) && isSameTime(generateConfig, time1, time2) && generateConfig.getMillisecond(time1) === generateConfig.getMillisecond(time2);
});
}
function isSameWeek(generateConfig, locale, date1, date2) {
return nullableCompare(date1, date2, function () {
var weekStartDate1 = generateConfig.locale.getWeekFirstDate(locale, date1);
var weekStartDate2 = generateConfig.locale.getWeekFirstDate(locale, date2);
return isSameYear(generateConfig, weekStartDate1, weekStartDate2) && generateConfig.locale.getWeek(locale, date1) === generateConfig.locale.getWeek(locale, date2);
});
}
function isSame(generateConfig, locale, source, target, type) {
switch (type) {
case 'date':
return isSameDate(generateConfig, source, target);
case 'week':
return isSameWeek(generateConfig, locale.locale, source, target);
case 'month':
return isSameMonth(generateConfig, source, target);
case 'quarter':
return isSameQuarter(generateConfig, source, target);
case 'year':
return isSameYear(generateConfig, source, target);
case 'decade':
return isSameDecade(generateConfig, source, target);
case 'time':
return isSameTime(generateConfig, source, target);
default:
return isSameTimestamp(generateConfig, source, target);
}
}
/** Between in date but not equal of date */
function isInRange(generateConfig, startDate, endDate, current) {
if (!startDate || !endDate || !current) {
return false;
}
return generateConfig.isAfter(current, startDate) && generateConfig.isAfter(endDate, current);
}
function isSameOrAfter(generateConfig, locale, date1, date2, type) {
if (isSame(generateConfig, locale, date1, date2, type)) {
return true;
}
return generateConfig.isAfter(date1, date2);
}
function getWeekStartDate(locale, generateConfig, value) {
var weekFirstDay = generateConfig.locale.getWeekFirstDay(locale);
var monthStartDate = generateConfig.setDate(value, 1);
var startDateWeekDay = generateConfig.getWeekDay(monthStartDate);
var alignStartDate = generateConfig.addDate(monthStartDate, weekFirstDay - startDateWeekDay);
if (generateConfig.getMonth(alignStartDate) === generateConfig.getMonth(value) && generateConfig.getDate(alignStartDate) > 1) {
alignStartDate = generateConfig.addDate(alignStartDate, -7);
}
return alignStartDate;
}
function formatValue(value, _ref) {
var generateConfig = _ref.generateConfig,
locale = _ref.locale,
format = _ref.format;
if (!value) {
return '';
}
return typeof format === 'function' ? format(value) : generateConfig.locale.format(locale.locale, value, format);
}
/**
* Fill the time info into Date if provided.
*/
function fillTime(generateConfig, date, time) {
var tmpDate = date;
var getFn = ['getHour', 'getMinute', 'getSecond', 'getMillisecond'];
var setFn = ['setHour', 'setMinute', 'setSecond', 'setMillisecond'];
setFn.forEach(function (fn, index) {
if (time) {
tmpDate = generateConfig[fn](tmpDate, generateConfig[getFn[index]](time));
} else {
tmpDate = generateConfig[fn](tmpDate, 0);
}
});
return tmpDate;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useDisabledBoundary.js
/**
* Merge `disabledDate` with `minDate` & `maxDate`.
*/
function useDisabledBoundary(generateConfig, locale, disabledDate, minDate, maxDate) {
var mergedDisabledDate = (0,rc_util_es.useEvent)(function (date, info) {
if (disabledDate && disabledDate(date, info)) {
return true;
}
if (minDate && generateConfig.isAfter(minDate, date) && !isSame(generateConfig, locale, minDate, date, info.type)) {
return true;
}
if (maxDate && generateConfig.isAfter(date, maxDate) && !isSame(generateConfig, locale, maxDate, date, info.type)) {
return true;
}
return false;
});
return mergedDisabledDate;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useFieldFormat.js
function useFieldFormat(picker, locale, format) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var rawFormat = getRowFormat(picker, locale, format);
var formatList = miscUtil_toArray(rawFormat);
var firstFormat = formatList[0];
var maskFormat = (0,esm_typeof["default"])(firstFormat) === 'object' && firstFormat.type === 'mask' ? firstFormat.format : null;
return [
// Format list
formatList.map(function (config) {
return typeof config === 'string' || typeof config === 'function' ? config : config.format;
}),
// Mask Format
maskFormat];
}, [picker, locale, format]);
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useInputReadOnly.js
function useInputReadOnly(formatList, inputReadOnly, multiple) {
if (typeof formatList[0] === 'function' || multiple) {
return true;
}
return inputReadOnly;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useInvalidate.js
/**
* Check if provided date is valid for the `disabledDate` & `showTime.disabledTime`.
*/
function useInvalidate(generateConfig, picker, disabledDate, showTime) {
// Check disabled date
var isInvalidate = (0,rc_util_es.useEvent)(function (date, info) {
var outsideInfo = (0,objectSpread2["default"])({
type: picker
}, info);
delete outsideInfo.activeIndex;
if (
// Date object is invalid
!generateConfig.isValidate(date) ||
// Date is disabled by `disabledDate`
disabledDate && disabledDate(date, outsideInfo)) {
return true;
}
if ((picker === 'date' || picker === 'time') && showTime) {
var _showTime$disabledTim;
var range = info && info.activeIndex === 1 ? 'end' : 'start';
var _ref = ((_showTime$disabledTim = showTime.disabledTime) === null || _showTime$disabledTim === void 0 ? void 0 : _showTime$disabledTim.call(showTime, date, range, {
from: outsideInfo.from
})) || {},
disabledHours = _ref.disabledHours,
disabledMinutes = _ref.disabledMinutes,
disabledSeconds = _ref.disabledSeconds,
disabledMilliseconds = _ref.disabledMilliseconds;
var legacyDisabledHours = showTime.disabledHours,
legacyDisabledMinutes = showTime.disabledMinutes,
legacyDisabledSeconds = showTime.disabledSeconds;
var mergedDisabledHours = disabledHours || legacyDisabledHours;
var mergedDisabledMinutes = disabledMinutes || legacyDisabledMinutes;
var mergedDisabledSeconds = disabledSeconds || legacyDisabledSeconds;
var hour = generateConfig.getHour(date);
var minute = generateConfig.getMinute(date);
var second = generateConfig.getSecond(date);
var millisecond = generateConfig.getMillisecond(date);
if (mergedDisabledHours && mergedDisabledHours().includes(hour)) {
return true;
}
if (mergedDisabledMinutes && mergedDisabledMinutes(hour).includes(minute)) {
return true;
}
if (mergedDisabledSeconds && mergedDisabledSeconds(hour, minute).includes(second)) {
return true;
}
if (disabledMilliseconds && disabledMilliseconds(hour, minute, second).includes(millisecond)) {
return true;
}
}
return false;
});
return isInvalidate;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useFilledProps.js
function useList(value) {
var fillMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var values = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var list = value ? miscUtil_toArray(value) : value;
if (fillMode && list) {
list[1] = list[1] || list[0];
}
return list;
}, [value, fillMode]);
return values;
}
/**
* Align the outer props with unique typed and fill undefined props.
* This is shared with both RangePicker and Picker. This will do:
* - Convert `value` & `defaultValue` to array
* - handle the legacy props fill like `clearIcon` + `allowClear` = `clearIcon`
*/
function useFilledProps(props, updater) {
var generateConfig = props.generateConfig,
locale = props.locale,
_props$picker = props.picker,
picker = _props$picker === void 0 ? 'date' : _props$picker,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-picker' : _props$prefixCls,
_props$styles = props.styles,
styles = _props$styles === void 0 ? {} : _props$styles,
_props$classNames = props.classNames,
classNames = _props$classNames === void 0 ? {} : _props$classNames,
_props$order = props.order,
order = _props$order === void 0 ? true : _props$order,
_props$components = props.components,
components = _props$components === void 0 ? {} : _props$components,
inputRender = props.inputRender,
allowClear = props.allowClear,
clearIcon = props.clearIcon,
needConfirm = props.needConfirm,
multiple = props.multiple,
format = props.format,
inputReadOnly = props.inputReadOnly,
disabledDate = props.disabledDate,
minDate = props.minDate,
maxDate = props.maxDate,
showTime = props.showTime,
value = props.value,
defaultValue = props.defaultValue,
pickerValue = props.pickerValue,
defaultPickerValue = props.defaultPickerValue;
var values = useList(value);
var defaultValues = useList(defaultValue);
var pickerValues = useList(pickerValue);
var defaultPickerValues = useList(defaultPickerValue);
// ======================== Picker ========================
/** Almost same as `picker`, but add `datetime` for `date` with `showTime` */
var internalPicker = picker === 'date' && showTime ? 'datetime' : picker;
/** The picker is `datetime` or `time` */
var multipleInteractivePicker = internalPicker === 'time' || internalPicker === 'datetime';
var complexPicker = multipleInteractivePicker || multiple;
var mergedNeedConfirm = needConfirm !== null && needConfirm !== void 0 ? needConfirm : multipleInteractivePicker;
// ========================== Time ==========================
// Auto `format` need to check `showTime.showXXX` first.
// And then merge the `locale` into `mergedShowTime`.
var _getTimeProps = getTimeProps(props),
_getTimeProps2 = (0,slicedToArray["default"])(_getTimeProps, 4),
timeProps = _getTimeProps2[0],
localeTimeProps = _getTimeProps2[1],
showTimeFormat = _getTimeProps2[2],
propFormat = _getTimeProps2[3];
// ======================= Locales ========================
var mergedLocale = useLocale_useLocale(locale, localeTimeProps);
var mergedShowTime = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return fillShowTimeConfig(internalPicker, showTimeFormat, propFormat, timeProps, mergedLocale);
}, [internalPicker, showTimeFormat, propFormat, timeProps, mergedLocale]);
// ======================= Warning ========================
if ( true && picker === 'time') {
if (['disabledHours', 'disabledMinutes', 'disabledSeconds'].some(function (key) {
return props[key];
})) {
(0,rc_util_es.warning)(false, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
}
// ======================== Props =========================
var filledProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
prefixCls: prefixCls,
locale: mergedLocale,
picker: picker,
styles: styles,
classNames: classNames,
order: order,
components: (0,objectSpread2["default"])({
input: inputRender
}, components),
clearIcon: fillClearIcon(prefixCls, allowClear, clearIcon),
showTime: mergedShowTime,
value: values,
defaultValue: defaultValues,
pickerValue: pickerValues,
defaultPickerValue: defaultPickerValues
}, updater === null || updater === void 0 ? void 0 : updater());
}, [props]);
// ======================== Format ========================
var _useFieldFormat = useFieldFormat(internalPicker, mergedLocale, format),
_useFieldFormat2 = (0,slicedToArray["default"])(_useFieldFormat, 2),
formatList = _useFieldFormat2[0],
maskFormat = _useFieldFormat2[1];
// ======================= ReadOnly =======================
var mergedInputReadOnly = useInputReadOnly(formatList, inputReadOnly, multiple);
// ======================= Boundary =======================
var disabledBoundaryDate = useDisabledBoundary(generateConfig, locale, disabledDate, minDate, maxDate);
// ====================== Invalidate ======================
var isInvalidateDate = useInvalidate(generateConfig, picker, disabledBoundaryDate, mergedShowTime);
// ======================== Merged ========================
var mergedProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, filledProps), {}, {
needConfirm: mergedNeedConfirm,
inputReadOnly: mergedInputReadOnly,
disabledDate: disabledBoundaryDate
});
}, [filledProps, mergedNeedConfirm, mergedInputReadOnly, disabledBoundaryDate]);
return [mergedProps, internalPicker, complexPicker, formatList, maskFormat, isInvalidateDate];
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useDelayState.js
/**
* Will be `true` immediately for next effect.
* But will be `false` for a delay of effect.
*/
function useDelayState(value, defaultValue, onChange) {
var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
value: value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
state = _useMergedState2[0],
setState = _useMergedState2[1];
var nextValueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(value);
// ============================= Update =============================
var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef();
var cancelRaf = function cancelRaf() {
raf["default"].cancel(rafRef.current);
};
var doUpdate = (0,rc_util_es.useEvent)(function () {
setState(nextValueRef.current);
if (onChange && state !== nextValueRef.current) {
onChange(nextValueRef.current);
}
});
var updateValue = (0,rc_util_es.useEvent)(function (next, immediately) {
cancelRaf();
nextValueRef.current = next;
if (next || immediately) {
doUpdate();
} else {
rafRef.current = (0,raf["default"])(doUpdate);
}
});
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
return cancelRaf;
}, []);
return [state, updateValue];
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useOpen.js
/**
* Control the open state.
* Will not close if activeElement is on the popup.
*/
function useOpen(open, defaultOpen) {
var disabledList = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
var onOpenChange = arguments.length > 3 ? arguments[3] : undefined;
var mergedOpen = disabledList.every(function (disabled) {
return disabled;
}) ? false : open;
// Delay for handle the open state, in case fast shift from `open` -> `close` -> `open`
// const [rafOpen, setRafOpen] = useLockState(open, defaultOpen || false, onOpenChange);
var _useDelayState = useDelayState(mergedOpen, defaultOpen || false, onOpenChange),
_useDelayState2 = (0,slicedToArray["default"])(_useDelayState, 2),
rafOpen = _useDelayState2[0],
setRafOpen = _useDelayState2[1];
function setOpen(next) {
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!config.inherit || rafOpen) {
setRafOpen(next, config.force);
}
}
return [rafOpen, setOpen];
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/usePickerRef.js
function usePickerRef(ref) {
var selectorRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
var _selectorRef$current;
return {
nativeElement: (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.nativeElement,
focus: function focus(options) {
var _selectorRef$current2;
(_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 || _selectorRef$current2.focus(options);
},
blur: function blur() {
var _selectorRef$current3;
(_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 || _selectorRef$current3.blur();
}
};
});
return selectorRef;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/usePresets.js
function usePresets(presets, legacyRanges) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (presets) {
return presets;
}
if (legacyRanges) {
(0,warning["default"])(false, '`ranges` is deprecated. Please use `presets` instead.');
return Object.entries(legacyRanges).map(function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 2),
label = _ref2[0],
value = _ref2[1];
return {
label: label,
value: value
};
});
}
return [];
}, [presets, legacyRanges]);
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useLockEffect.js
/**
* Trigger `callback` immediately when `condition` is `true`.
* But trigger `callback` in next frame when `condition` is `false`.
*/
function useLockEffect(condition, callback) {
var delayFrames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var callbackRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(callback);
callbackRef.current = callback;
(0,useLayoutEffect.useLayoutUpdateEffect)(function () {
if (condition) {
callbackRef.current(condition);
} else {
var id = (0,raf["default"])(function () {
callbackRef.current(condition);
}, delayFrames);
return function () {
raf["default"].cancel(id);
};
}
}, [condition]);
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangeActive.js
/**
* When user first focus one input, any submit will trigger focus another one.
* When second time focus one input, submit will not trigger focus again.
* When click outside to close the panel, trigger event if it can trigger onChange.
*/
function useRangeActive(disabled) {
var empty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var mergedOpen = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
activeIndex = _React$useState2[0],
setActiveIndex = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
focused = _React$useState4[0],
setFocused = _React$useState4[1];
var activeListRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
var submitIndexRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var lastOperationRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var updateSubmitIndex = function updateSubmitIndex(index) {
submitIndexRef.current = index;
};
var hasActiveSubmitValue = function hasActiveSubmitValue(index) {
return submitIndexRef.current === index;
};
var triggerFocus = function triggerFocus(nextFocus) {
setFocused(nextFocus);
};
// ============================= Record =============================
var lastOperation = function lastOperation(type) {
if (type) {
lastOperationRef.current = type;
}
return lastOperationRef.current;
};
// ============================ Strategy ============================
// Trigger when input enter or input blur or panel close
var nextActiveIndex = function nextActiveIndex(nextValue) {
var list = activeListRef.current;
var filledActiveSet = new Set(list.filter(function (index) {
return nextValue[index] || empty[index];
}));
var nextIndex = list[list.length - 1] === 0 ? 1 : 0;
if (filledActiveSet.size >= 2 || disabled[nextIndex]) {
return null;
}
return nextIndex;
};
// ============================= Effect =============================
// Wait in case it's from the click outside to blur
useLockEffect(focused || mergedOpen, function () {
if (!focused) {
activeListRef.current = [];
updateSubmitIndex(null);
}
});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (focused) {
activeListRef.current.push(activeIndex);
}
}, [focused, activeIndex]);
return [focused, triggerFocus, lastOperation, activeIndex, setActiveIndex, nextActiveIndex, activeListRef.current, updateSubmitIndex, hasActiveSubmitValue];
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangeDisabledDate.js
/**
* RangePicker need additional logic to handle the `disabled` case. e.g.
* [disabled, enabled] should end date not before start date
*/
function useRangeDisabledDate(values, disabled, activeIndexList, generateConfig, locale, disabledDate) {
var activeIndex = activeIndexList[activeIndexList.length - 1];
var rangeDisabledDate = function rangeDisabledDate(date, info) {
var _values = (0,slicedToArray["default"])(values, 2),
start = _values[0],
end = _values[1];
var mergedInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
from: getFromDate(values, activeIndexList)
});
// ============================ Disabled ============================
// Should not select days before the start date
if (activeIndex === 1 && disabled[0] && start &&
// Same date isOK
!isSame(generateConfig, locale, start, date, mergedInfo.type) &&
// Before start date
generateConfig.isAfter(start, date)) {
return true;
}
// Should not select days after the end date
if (activeIndex === 0 && disabled[1] && end &&
// Same date isOK
!isSame(generateConfig, locale, end, date, mergedInfo.type) &&
// After end date
generateConfig.isAfter(date, end)) {
return true;
}
// ============================= Origin =============================
return disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date, mergedInfo);
};
return rangeDisabledDate;
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangePickerValue.js
function offsetPanelDate(generateConfig, picker, date, offset) {
switch (picker) {
case 'date':
case 'week':
return generateConfig.addMonth(date, offset);
case 'month':
case 'quarter':
return generateConfig.addYear(date, offset);
case 'year':
return generateConfig.addYear(date, offset * 10);
case 'decade':
return generateConfig.addYear(date, offset * 100);
default:
return date;
}
}
var useRangePickerValue_EMPTY_LIST = [];
function useRangePickerValue(generateConfig, locale, calendarValue, modes, open, activeIndex, pickerMode, multiplePanel) {
var defaultPickerValue = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : useRangePickerValue_EMPTY_LIST;
var pickerValue = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : useRangePickerValue_EMPTY_LIST;
var timeDefaultValue = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : useRangePickerValue_EMPTY_LIST;
var onPickerValueChange = arguments.length > 11 ? arguments[11] : undefined;
var minDate = arguments.length > 12 ? arguments[12] : undefined;
var maxDate = arguments.length > 13 ? arguments[13] : undefined;
var isTimePicker = pickerMode === 'time';
// ======================== Active ========================
// `activeIndex` must be valid to avoid getting empty `pickerValue`
var mergedActiveIndex = activeIndex || 0;
// ===================== Picker Value =====================
var getDefaultPickerValue = function getDefaultPickerValue(index) {
var now = generateConfig.getNow();
if (isTimePicker) {
now = fillTime(generateConfig, now);
}
return defaultPickerValue[index] || calendarValue[index] || now;
};
// Align `pickerValue` with `showTime.defaultValue`
var _pickerValue = (0,slicedToArray["default"])(pickerValue, 2),
startPickerValue = _pickerValue[0],
endPickerValue = _pickerValue[1];
// PickerValue state
var _useMergedState = (0,rc_util_es.useMergedState)(function () {
return getDefaultPickerValue(0);
}, {
value: startPickerValue
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedStartPickerValue = _useMergedState2[0],
setStartPickerValue = _useMergedState2[1];
var _useMergedState3 = (0,rc_util_es.useMergedState)(function () {
return getDefaultPickerValue(1);
}, {
value: endPickerValue
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedEndPickerValue = _useMergedState4[0],
setEndPickerValue = _useMergedState4[1];
// Current PickerValue
var currentPickerValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var current = [mergedStartPickerValue, mergedEndPickerValue][mergedActiveIndex];
// Merge the `showTime.defaultValue` into `pickerValue`
return isTimePicker ? current : fillTime(generateConfig, current, timeDefaultValue[mergedActiveIndex]);
}, [isTimePicker, mergedStartPickerValue, mergedEndPickerValue, mergedActiveIndex, generateConfig, timeDefaultValue]);
var setCurrentPickerValue = function setCurrentPickerValue(nextPickerValue) {
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'panel';
var updater = [setStartPickerValue, setEndPickerValue][mergedActiveIndex];
updater(nextPickerValue);
var clone = [mergedStartPickerValue, mergedEndPickerValue];
clone[mergedActiveIndex] = nextPickerValue;
if (onPickerValueChange && (!isSame(generateConfig, locale, mergedStartPickerValue, clone[0], pickerMode) || !isSame(generateConfig, locale, mergedEndPickerValue, clone[1], pickerMode))) {
onPickerValueChange(clone, {
source: source,
range: mergedActiveIndex === 1 ? 'end' : 'start',
mode: modes
});
}
};
// ======================== Effect ========================
/**
* EndDate pickerValue is little different. It should be:
* - If date picker (without time), endDate is not same year & month as startDate
* - pickerValue minus one month
* - Else pass directly
*/
var getEndDatePickerValue = function getEndDatePickerValue(startDate, endDate) {
if (multiplePanel) {
// Basic offset
var SAME_CHECKER = {
date: 'month',
week: 'month',
month: 'year',
quarter: 'year'
};
var mode = SAME_CHECKER[pickerMode];
if (mode && !isSame(generateConfig, locale, startDate, endDate, mode)) {
return offsetPanelDate(generateConfig, pickerMode, endDate, -1);
}
// Year offset
if (pickerMode === 'year' && startDate) {
var srcYear = Math.floor(generateConfig.getYear(startDate) / 10);
var tgtYear = Math.floor(generateConfig.getYear(endDate) / 10);
if (srcYear !== tgtYear) {
return offsetPanelDate(generateConfig, pickerMode, endDate, -1);
}
}
}
return endDate;
};
// >>> When switch field, reset the picker value as prev field picker value
var prevActiveIndexRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
(0,useLayoutEffect["default"])(function () {
if (open) {
if (!defaultPickerValue[mergedActiveIndex]) {
var nextPickerValue = isTimePicker ? null : generateConfig.getNow();
/**
* 1. If has prevActiveIndex, use it to avoid panel jump
* 2. If current field has value
* - If `activeIndex` is 1 and `calendarValue[0]` is not same panel as `calendarValue[1]`,
* offset `calendarValue[1]` and set it
* - Else use `calendarValue[activeIndex]`
* 3. If current field has no value but another field has value, use another field value
* 4. Else use now (not any `calendarValue` can ref)
*/
if (prevActiveIndexRef.current !== null && prevActiveIndexRef.current !== mergedActiveIndex) {
// If from another field, not jump picker value
nextPickerValue = [mergedStartPickerValue, mergedEndPickerValue][mergedActiveIndex ^ 1];
} else if (calendarValue[mergedActiveIndex]) {
// Current field has value
nextPickerValue = mergedActiveIndex === 0 ? calendarValue[0] : getEndDatePickerValue(calendarValue[0], calendarValue[1]);
} else if (calendarValue[mergedActiveIndex ^ 1]) {
// Current field has no value but another field has value
nextPickerValue = calendarValue[mergedActiveIndex ^ 1];
}
// Only sync when has value, this will sync in the `min-max` logic
if (nextPickerValue) {
// nextPickerValue < minDate
if (minDate && generateConfig.isAfter(minDate, nextPickerValue)) {
nextPickerValue = minDate;
}
// maxDate < nextPickerValue
var offsetPickerValue = multiplePanel ? offsetPanelDate(generateConfig, pickerMode, nextPickerValue, 1) : nextPickerValue;
if (maxDate && generateConfig.isAfter(offsetPickerValue, maxDate)) {
nextPickerValue = multiplePanel ? offsetPanelDate(generateConfig, pickerMode, maxDate, -1) : maxDate;
}
setCurrentPickerValue(nextPickerValue, 'reset');
}
}
}
}, [open, mergedActiveIndex, calendarValue[mergedActiveIndex]]);
// >>> Reset prevActiveIndex when panel closed
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (open) {
prevActiveIndexRef.current = mergedActiveIndex;
} else {
prevActiveIndexRef.current = null;
}
}, [open, mergedActiveIndex]);
// >>> defaultPickerValue: Resync to `defaultPickerValue` for each panel focused
(0,useLayoutEffect["default"])(function () {
if (open && defaultPickerValue) {
if (defaultPickerValue[mergedActiveIndex]) {
setCurrentPickerValue(defaultPickerValue[mergedActiveIndex], 'reset');
}
}
}, [open, mergedActiveIndex]);
return [currentPickerValue, setCurrentPickerValue];
}
;// ./node_modules/rc-picker/es/hooks/useSyncState.js
/**
* Sync value with state.
* This should only used for internal which not affect outside calculation.
* Since it's not safe for suspense.
*/
function useSyncState(defaultValue, controlledValue) {
var valueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(defaultValue);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
forceUpdate = _React$useState2[1];
var getter = function getter(useControlledValueFirst) {
return useControlledValueFirst && controlledValue !== undefined ? controlledValue : valueRef.current;
};
var setter = function setter(nextValue) {
valueRef.current = nextValue;
forceUpdate({});
};
return [getter, setter, getter(true)];
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangeValue.js
var EMPTY_VALUE = [];
// Submit Logic:
// * ✅ Value:
// * merged value using controlled value, if not, use stateValue
// * When merged value change, [1] resync calendar value and submit value
// * ✅ Calender Value:
// * 💻 When user typing is validate, change the calendar value
// * 🌅 When user click on the panel, change the calendar value
// * Submit Value:
// * 💻 When user blur the input, flush calendar value to submit value
// * 🌅 When user click on the panel is no needConfirm, flush calendar value to submit value
// * 🌅 When user click on the panel is needConfirm and click OK, flush calendar value to submit value
// * Blur logic & close logic:
// * ✅ For value, always try flush submit
// * ✅ If `needConfirm`, reset as [1]
// * Else (`!needConfirm`)
// * If has another index field, active another index
// * ✅ Flush submit:
// * If all the start & end field is confirmed or all blur or panel closed
// * Update `needSubmit` mark to true
// * trigger onChange by `needSubmit` and update stateValue
function useUtil(generateConfig, locale, formatList) {
var getDateTexts = function getDateTexts(dates) {
return dates.map(function (date) {
return formatValue(date, {
generateConfig: generateConfig,
locale: locale,
format: formatList[0]
});
});
};
var isSameDates = function isSameDates(source, target) {
var maxLen = Math.max(source.length, target.length);
var diffIndex = -1;
for (var i = 0; i < maxLen; i += 1) {
var prev = source[i] || null;
var next = target[i] || null;
if (prev !== next && !isSameTimestamp(generateConfig, prev, next)) {
diffIndex = i;
break;
}
}
return [diffIndex < 0, diffIndex !== 0];
};
return [getDateTexts, isSameDates];
}
function orderDates(dates, generateConfig) {
return (0,toConsumableArray["default"])(dates).sort(function (a, b) {
return generateConfig.isAfter(a, b) ? 1 : -1;
});
}
/**
* Used for internal value management.
* It should always use `mergedValue` in render logic
*/
function useCalendarValue(mergedValue) {
var _useSyncState = useSyncState(mergedValue),
_useSyncState2 = (0,slicedToArray["default"])(_useSyncState, 2),
calendarValue = _useSyncState2[0],
setCalendarValue = _useSyncState2[1];
/** Sync calendarValue & submitValue back with value */
var syncWithValue = (0,rc_util_es.useEvent)(function () {
setCalendarValue(mergedValue);
});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
syncWithValue();
}, [mergedValue]);
return [calendarValue, setCalendarValue];
}
/**
* Control the internal `value` align with prop `value` and provide a temp `calendarValue` for ui.
* `calendarValue` will be reset when blur & focus & open.
*/
function useInnerValue(generateConfig, locale, formatList, /** Used for RangePicker. `true` means [DateType, DateType] or will be DateType[] */
rangeValue,
/**
* Trigger order when trigger calendar value change.
* This should only used in SinglePicker with `multiple` mode.
* So when `rangeValue` is `true`, order will be ignored.
*/
order, defaultValue, value, onCalendarChange, onOk) {
// This is the root value which will sync with controlled or uncontrolled value
var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
value: value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
innerValue = _useMergedState2[0],
setInnerValue = _useMergedState2[1];
var mergedValue = innerValue || EMPTY_VALUE;
// ========================= Inner Values =========================
var _useCalendarValue = useCalendarValue(mergedValue),
_useCalendarValue2 = (0,slicedToArray["default"])(_useCalendarValue, 2),
calendarValue = _useCalendarValue2[0],
setCalendarValue = _useCalendarValue2[1];
// ============================ Change ============================
var _useUtil = useUtil(generateConfig, locale, formatList),
_useUtil2 = (0,slicedToArray["default"])(_useUtil, 2),
getDateTexts = _useUtil2[0],
isSameDates = _useUtil2[1];
var triggerCalendarChange = (0,rc_util_es.useEvent)(function (nextCalendarValues) {
var clone = (0,toConsumableArray["default"])(nextCalendarValues);
if (rangeValue) {
for (var i = 0; i < 2; i += 1) {
clone[i] = clone[i] || null;
}
} else if (order) {
clone = orderDates(clone.filter(function (date) {
return date;
}), generateConfig);
}
// Update merged value
var _isSameDates = isSameDates(calendarValue(), clone),
_isSameDates2 = (0,slicedToArray["default"])(_isSameDates, 2),
isSameMergedDates = _isSameDates2[0],
isSameStart = _isSameDates2[1];
if (!isSameMergedDates) {
setCalendarValue(clone);
// Trigger calendar change event
if (onCalendarChange) {
var cellTexts = getDateTexts(clone);
onCalendarChange(clone, cellTexts, {
range: isSameStart ? 'end' : 'start'
});
}
}
});
var triggerOk = function triggerOk() {
if (onOk) {
onOk(calendarValue());
}
};
return [mergedValue, setInnerValue, calendarValue, triggerCalendarChange, triggerOk];
}
function useRangeValue(info, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, open, isInvalidateDate) {
var generateConfig = info.generateConfig,
locale = info.locale,
picker = info.picker,
onChange = info.onChange,
allowEmpty = info.allowEmpty,
order = info.order;
var orderOnChange = disabled.some(function (d) {
return d;
}) ? false : order;
// ============================= Util =============================
var _useUtil3 = useUtil(generateConfig, locale, formatList),
_useUtil4 = (0,slicedToArray["default"])(_useUtil3, 2),
getDateTexts = _useUtil4[0],
isSameDates = _useUtil4[1];
// ============================ Values ============================
// Used for trigger `onChange` event.
// Record current value which is wait for submit.
var _useSyncState3 = useSyncState(mergedValue),
_useSyncState4 = (0,slicedToArray["default"])(_useSyncState3, 2),
submitValue = _useSyncState4[0],
setSubmitValue = _useSyncState4[1];
/** Sync calendarValue & submitValue back with value */
var syncWithValue = (0,rc_util_es.useEvent)(function () {
setSubmitValue(mergedValue);
});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
syncWithValue();
}, [mergedValue]);
// ============================ Submit ============================
var triggerSubmit = (0,rc_util_es.useEvent)(function (nextValue) {
var isNullValue = nextValue === null;
var clone = (0,toConsumableArray["default"])(nextValue || submitValue());
// Fill null value
if (isNullValue) {
var maxLen = Math.max(disabled.length, clone.length);
for (var i = 0; i < maxLen; i += 1) {
if (!disabled[i]) {
clone[i] = null;
}
}
}
// Only when exist value to sort
if (orderOnChange && clone[0] && clone[1]) {
clone = orderDates(clone, generateConfig);
}
// Sync `calendarValue`
triggerCalendarChange(clone);
// ========= Validate check =========
var _clone = clone,
_clone2 = (0,slicedToArray["default"])(_clone, 2),
start = _clone2[0],
end = _clone2[1];
// >>> Empty
var startEmpty = !start;
var endEmpty = !end;
var validateEmptyDateRange = allowEmpty ?
// Validate empty start
(!startEmpty || allowEmpty[0]) && (
// Validate empty end
!endEmpty || allowEmpty[1]) : true;
// >>> Order
var validateOrder = !order || startEmpty || endEmpty || isSame(generateConfig, locale, start, end, picker) || generateConfig.isAfter(end, start);
// >>> Invalid
var validateDates =
// Validate start
(disabled[0] || !start || !isInvalidateDate(start, {
activeIndex: 0
})) && (
// Validate end
disabled[1] || !end || !isInvalidateDate(end, {
from: start,
activeIndex: 1
}));
// >>> Result
var allPassed =
// Null value is from clear button
isNullValue ||
// Normal check
validateEmptyDateRange && validateOrder && validateDates;
if (allPassed) {
// Sync value with submit value
setInnerValue(clone);
var _isSameDates3 = isSameDates(clone, mergedValue),
_isSameDates4 = (0,slicedToArray["default"])(_isSameDates3, 1),
isSameMergedDates = _isSameDates4[0];
// Trigger `onChange` if needed
if (onChange && !isSameMergedDates) {
onChange(
// Return null directly if all date are empty
isNullValue && clone.every(function (val) {
return !val;
}) ? null : clone, getDateTexts(clone));
}
}
return allPassed;
});
// ========================= Flush Submit =========================
var flushSubmit = (0,rc_util_es.useEvent)(function (index, needTriggerChange) {
var nextSubmitValue = fillIndex(submitValue(), index, getCalendarValue()[index]);
setSubmitValue(nextSubmitValue);
if (needTriggerChange) {
triggerSubmit();
}
});
// ============================ Effect ============================
// All finished action trigger after 2 frames
var interactiveFinished = !focused && !open;
useLockEffect(!interactiveFinished, function () {
if (interactiveFinished) {
// Always try to trigger submit first
triggerSubmit();
// Trigger calendar change since this is a effect reset
// https://github.com/ant-design/ant-design/issues/22351
triggerCalendarChange(mergedValue);
// Sync with value anyway
syncWithValue();
}
}, 2);
// ============================ Return ============================
return [flushSubmit, triggerSubmit];
}
;// ./node_modules/rc-picker/es/PickerInput/hooks/useShowNow.js
function useShowNow(picker, mode, showNow, showToday, rangePicker) {
if (mode !== 'date' && mode !== 'time') {
return false;
}
if (showNow !== undefined) {
return showNow;
}
// Compatible with old version `showToday`
if (showToday !== undefined) {
return showToday;
}
return !rangePicker && (picker === 'date' || picker === 'time');
}
;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/util.js
function findValidateTime(date, getHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits, generateConfig) {
var nextDate = date;
function alignValidate(getUnitValue, setUnitValue, units) {
var nextValue = generateConfig[getUnitValue](nextDate);
var nextUnit = units.find(function (unit) {
return unit.value === nextValue;
});
if (!nextUnit || nextUnit.disabled) {
// Find most closest unit
var validateUnits = units.filter(function (unit) {
return !unit.disabled;
});
var reverseEnabledUnits = (0,toConsumableArray["default"])(validateUnits).reverse();
var validateUnit = reverseEnabledUnits.find(function (unit) {
return unit.value <= nextValue;
}) || validateUnits[0];
if (validateUnit) {
nextValue = validateUnit.value;
nextDate = generateConfig[setUnitValue](nextDate, nextValue);
}
}
return nextValue;
}
// Find validate hour
var nextHour = alignValidate('getHour', 'setHour', getHourUnits());
// Find validate minute
var nextMinute = alignValidate('getMinute', 'setMinute', getMinuteUnits(nextHour));
// Find validate second
var nextSecond = alignValidate('getSecond', 'setSecond', getSecondUnits(nextHour, nextMinute));
// Find validate millisecond
alignValidate('getMillisecond', 'setMillisecond', getMillisecondUnits(nextHour, nextMinute, nextSecond));
return nextDate;
}
;// ./node_modules/rc-picker/es/hooks/useTimeInfo.js
function emptyDisabled() {
return [];
}
function generateUnits(start, end) {
var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var hideDisabledOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
var disabledUnits = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
var pad = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 2;
var units = [];
var integerStep = step >= 1 ? step | 0 : 1;
for (var i = start; i <= end; i += integerStep) {
var disabled = disabledUnits.includes(i);
if (!disabled || !hideDisabledOptions) {
units.push({
label: leftPad(i, pad),
value: i,
disabled: disabled
});
}
}
return units;
}
/**
* Parse time props to get util info
*/
function useTimeInfo(generateConfig) {
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var date = arguments.length > 2 ? arguments[2] : undefined;
var _ref = props || {},
use12Hours = _ref.use12Hours,
_ref$hourStep = _ref.hourStep,
hourStep = _ref$hourStep === void 0 ? 1 : _ref$hourStep,
_ref$minuteStep = _ref.minuteStep,
minuteStep = _ref$minuteStep === void 0 ? 1 : _ref$minuteStep,
_ref$secondStep = _ref.secondStep,
secondStep = _ref$secondStep === void 0 ? 1 : _ref$secondStep,
_ref$millisecondStep = _ref.millisecondStep,
millisecondStep = _ref$millisecondStep === void 0 ? 100 : _ref$millisecondStep,
hideDisabledOptions = _ref.hideDisabledOptions,
disabledTime = _ref.disabledTime,
disabledHours = _ref.disabledHours,
disabledMinutes = _ref.disabledMinutes,
disabledSeconds = _ref.disabledSeconds;
var mergedDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return date || generateConfig.getNow();
}, [date, generateConfig]);
// ======================== Warnings ========================
if (true) {
var isHourStepValid = 24 % hourStep === 0;
var isMinuteStepValid = 60 % minuteStep === 0;
var isSecondStepValid = 60 % secondStep === 0;
(0,rc_util_es.warning)(isHourStepValid, "`hourStep` ".concat(hourStep, " is invalid. It should be a factor of 24."));
(0,rc_util_es.warning)(isMinuteStepValid, "`minuteStep` ".concat(minuteStep, " is invalid. It should be a factor of 60."));
(0,rc_util_es.warning)(isSecondStepValid, "`secondStep` ".concat(secondStep, " is invalid. It should be a factor of 60."));
}
// ======================== Disabled ========================
var getDisabledTimes = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (targetDate) {
var disabledConfig = (disabledTime === null || disabledTime === void 0 ? void 0 : disabledTime(targetDate)) || {};
return [disabledConfig.disabledHours || disabledHours || emptyDisabled, disabledConfig.disabledMinutes || disabledMinutes || emptyDisabled, disabledConfig.disabledSeconds || disabledSeconds || emptyDisabled, disabledConfig.disabledMilliseconds || emptyDisabled];
}, [disabledTime, disabledHours, disabledMinutes, disabledSeconds]);
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getDisabledTimes(mergedDate);
}, [mergedDate, getDisabledTimes]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 4),
mergedDisabledHours = _React$useMemo2[0],
mergedDisabledMinutes = _React$useMemo2[1],
mergedDisabledSeconds = _React$useMemo2[2],
mergedDisabledMilliseconds = _React$useMemo2[3];
// ========================= Column =========================
var getAllUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (getDisabledHours, getDisabledMinutes, getDisabledSeconds, getDisabledMilliseconds) {
var hours = generateUnits(0, 23, hourStep, hideDisabledOptions, getDisabledHours());
// Hours
var rowHourUnits = use12Hours ? hours.map(function (unit) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, unit), {}, {
label: leftPad(unit.value % 12 || 12, 2)
});
}) : hours;
// Minutes
var getMinuteUnits = function getMinuteUnits(nextHour) {
return generateUnits(0, 59, minuteStep, hideDisabledOptions, getDisabledMinutes(nextHour));
};
// Seconds
var getSecondUnits = function getSecondUnits(nextHour, nextMinute) {
return generateUnits(0, 59, secondStep, hideDisabledOptions, getDisabledSeconds(nextHour, nextMinute));
};
// Milliseconds
var getMillisecondUnits = function getMillisecondUnits(nextHour, nextMinute, nextSecond) {
return generateUnits(0, 999, millisecondStep, hideDisabledOptions, getDisabledMilliseconds(nextHour, nextMinute, nextSecond), 3);
};
return [rowHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits];
}, [hideDisabledOptions, hourStep, use12Hours, millisecondStep, minuteStep, secondStep]);
var _React$useMemo3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getAllUnits(mergedDisabledHours, mergedDisabledMinutes, mergedDisabledSeconds, mergedDisabledMilliseconds);
}, [getAllUnits, mergedDisabledHours, mergedDisabledMinutes, mergedDisabledSeconds, mergedDisabledMilliseconds]),
_React$useMemo4 = (0,slicedToArray["default"])(_React$useMemo3, 4),
rowHourUnits = _React$useMemo4[0],
getMinuteUnits = _React$useMemo4[1],
getSecondUnits = _React$useMemo4[2],
getMillisecondUnits = _React$useMemo4[3];
// ======================== Validate ========================
/**
* Get validate time with `disabledTime`, `certainDate` to specific the date need to check
*/
var getValidTime = function getValidTime(nextTime, certainDate) {
var getCheckHourUnits = function getCheckHourUnits() {
return rowHourUnits;
};
var getCheckMinuteUnits = getMinuteUnits;
var getCheckSecondUnits = getSecondUnits;
var getCheckMillisecondUnits = getMillisecondUnits;
if (certainDate) {
var _getDisabledTimes = getDisabledTimes(certainDate),
_getDisabledTimes2 = (0,slicedToArray["default"])(_getDisabledTimes, 4),
targetDisabledHours = _getDisabledTimes2[0],
targetDisabledMinutes = _getDisabledTimes2[1],
targetDisabledSeconds = _getDisabledTimes2[2],
targetDisabledMilliseconds = _getDisabledTimes2[3];
var _getAllUnits = getAllUnits(targetDisabledHours, targetDisabledMinutes, targetDisabledSeconds, targetDisabledMilliseconds),
_getAllUnits2 = (0,slicedToArray["default"])(_getAllUnits, 4),
targetRowHourUnits = _getAllUnits2[0],
targetGetMinuteUnits = _getAllUnits2[1],
targetGetSecondUnits = _getAllUnits2[2],
targetGetMillisecondUnits = _getAllUnits2[3];
getCheckHourUnits = function getCheckHourUnits() {
return targetRowHourUnits;
};
getCheckMinuteUnits = targetGetMinuteUnits;
getCheckSecondUnits = targetGetSecondUnits;
getCheckMillisecondUnits = targetGetMillisecondUnits;
}
var validateDate = findValidateTime(nextTime, getCheckHourUnits, getCheckMinuteUnits, getCheckSecondUnits, getCheckMillisecondUnits, generateConfig);
return validateDate;
};
return [
// getValidTime
getValidTime,
// Units
rowHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits];
}
;// ./node_modules/rc-picker/es/PickerInput/Popup/Footer.js
function Footer_Footer(props) {
var mode = props.mode,
internalMode = props.internalMode,
renderExtraFooter = props.renderExtraFooter,
showNow = props.showNow,
showTime = props.showTime,
onSubmit = props.onSubmit,
onNow = props.onNow,
invalid = props.invalid,
needConfirm = props.needConfirm,
generateConfig = props.generateConfig,
disabledDate = props.disabledDate;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls,
locale = _React$useContext.locale,
_React$useContext$but = _React$useContext.button,
Button = _React$useContext$but === void 0 ? 'button' : _React$useContext$but;
// >>> Now
var now = generateConfig.getNow();
var _useTimeInfo = useTimeInfo(generateConfig, showTime, now),
_useTimeInfo2 = (0,slicedToArray["default"])(_useTimeInfo, 1),
getValidTime = _useTimeInfo2[0];
// ======================== Extra =========================
var extraNode = renderExtraFooter === null || renderExtraFooter === void 0 ? void 0 : renderExtraFooter(mode);
// ======================== Ranges ========================
var nowDisabled = disabledDate(now, {
type: mode
});
var onInternalNow = function onInternalNow() {
if (!nowDisabled) {
var validateNow = getValidTime(now);
onNow(validateNow);
}
};
var nowPrefixCls = "".concat(prefixCls, "-now");
var nowBtnPrefixCls = "".concat(nowPrefixCls, "-btn");
var presetNode = showNow && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
className: nowPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
className: classnames_default()(nowBtnPrefixCls, nowDisabled && "".concat(nowBtnPrefixCls, "-disabled")),
"aria-disabled": nowDisabled,
onClick: onInternalNow
}, internalMode === 'date' ? locale.today : locale.now));
// >>> OK
var okNode = needConfirm && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
className: "".concat(prefixCls, "-ok")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Button, {
disabled: invalid,
onClick: onSubmit
}, locale.ok));
var rangeNode = (presetNode || okNode) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: "".concat(prefixCls, "-ranges")
}, presetNode, okNode);
// ======================== Render ========================
if (!extraNode && !rangeNode) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-footer")
}, extraNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-footer-extra")
}, extraNode), rangeNode);
}
;// ./node_modules/rc-picker/es/hooks/useToggleDates.js
/**
* Toggles the presence of a value in an array.
* If the value exists in the array, removed it.
* Else add it.
*/
function useToggleDates(generateConfig, locale, panelMode) {
function toggleDates(list, target) {
var index = list.findIndex(function (date) {
return isSame(generateConfig, locale, date, target, panelMode);
});
if (index === -1) {
return [].concat((0,toConsumableArray["default"])(list), [target]);
}
var sliceList = (0,toConsumableArray["default"])(list);
sliceList.splice(index, 1);
return sliceList;
}
return toggleDates;
}
;// ./node_modules/rc-picker/es/PickerPanel/context.js
/** Used for each single Panel. e.g. DatePanel */
var PanelContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
function usePanelContext() {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PanelContext);
}
/**
* Get shared props for the SharedPanelProps interface.
*/
function useInfo(props, panelType) {
var prefixCls = props.prefixCls,
generateConfig = props.generateConfig,
locale = props.locale,
disabledDate = props.disabledDate,
minDate = props.minDate,
maxDate = props.maxDate,
cellRender = props.cellRender,
hoverValue = props.hoverValue,
hoverRangeValue = props.hoverRangeValue,
onHover = props.onHover,
values = props.values,
pickerValue = props.pickerValue,
onSelect = props.onSelect,
prevIcon = props.prevIcon,
nextIcon = props.nextIcon,
superPrevIcon = props.superPrevIcon,
superNextIcon = props.superNextIcon;
// ========================= MISC =========================
var now = generateConfig.getNow();
// ========================= Info =========================
var info = {
now: now,
values: values,
pickerValue: pickerValue,
prefixCls: prefixCls,
disabledDate: disabledDate,
minDate: minDate,
maxDate: maxDate,
cellRender: cellRender,
hoverValue: hoverValue,
hoverRangeValue: hoverRangeValue,
onHover: onHover,
locale: locale,
generateConfig: generateConfig,
onSelect: onSelect,
panelType: panelType,
// Icons
prevIcon: prevIcon,
nextIcon: nextIcon,
superPrevIcon: superPrevIcon,
superNextIcon: superNextIcon
};
return [info, now];
}
// ============================== Internal ==============================
/**
* Internal usage for RangePicker to not to show the operation arrow
*/
var PickerHackContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
if (true) {
PickerHackContext.displayName = 'PickerHackContext';
}
;// ./node_modules/rc-picker/es/PickerPanel/PanelBody.js
function PanelBody(props) {
var rowNum = props.rowNum,
colNum = props.colNum,
baseDate = props.baseDate,
getCellDate = props.getCellDate,
prefixColumn = props.prefixColumn,
rowClassName = props.rowClassName,
titleFormat = props.titleFormat,
getCellText = props.getCellText,
getCellClassName = props.getCellClassName,
headerCells = props.headerCells,
_props$cellSelection = props.cellSelection,
cellSelection = _props$cellSelection === void 0 ? true : _props$cellSelection,
disabledDate = props.disabledDate;
var _usePanelContext = usePanelContext(),
prefixCls = _usePanelContext.prefixCls,
type = _usePanelContext.panelType,
now = _usePanelContext.now,
contextDisabledDate = _usePanelContext.disabledDate,
cellRender = _usePanelContext.cellRender,
onHover = _usePanelContext.onHover,
hoverValue = _usePanelContext.hoverValue,
hoverRangeValue = _usePanelContext.hoverRangeValue,
generateConfig = _usePanelContext.generateConfig,
values = _usePanelContext.values,
locale = _usePanelContext.locale,
onSelect = _usePanelContext.onSelect;
var mergedDisabledDate = disabledDate || contextDisabledDate;
var cellPrefixCls = "".concat(prefixCls, "-cell");
// ============================= Context ==============================
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext),
onCellDblClick = _React$useContext.onCellDblClick;
// ============================== Value ===============================
var matchValues = function matchValues(date) {
return values.some(function (singleValue) {
return singleValue && isSame(generateConfig, locale, date, singleValue, type);
});
};
// =============================== Body ===============================
var rows = [];
for (var row = 0; row < rowNum; row += 1) {
var rowNode = [];
var rowStartDate = void 0;
var _loop = function _loop() {
var offset = row * colNum + col;
var currentDate = getCellDate(baseDate, offset);
var disabled = mergedDisabledDate === null || mergedDisabledDate === void 0 ? void 0 : mergedDisabledDate(currentDate, {
type: type
});
// Row Start Cell
if (col === 0) {
rowStartDate = currentDate;
if (prefixColumn) {
rowNode.push(prefixColumn(rowStartDate));
}
}
// Range
var inRange = false;
var rangeStart = false;
var rangeEnd = false;
if (cellSelection && hoverRangeValue) {
var _hoverRangeValue = (0,slicedToArray["default"])(hoverRangeValue, 2),
hoverStart = _hoverRangeValue[0],
hoverEnd = _hoverRangeValue[1];
inRange = isInRange(generateConfig, hoverStart, hoverEnd, currentDate);
rangeStart = isSame(generateConfig, locale, currentDate, hoverStart, type);
rangeEnd = isSame(generateConfig, locale, currentDate, hoverEnd, type);
}
// Title
var title = titleFormat ? formatValue(currentDate, {
locale: locale,
format: titleFormat,
generateConfig: generateConfig
}) : undefined;
// Render
var inner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(cellPrefixCls, "-inner")
}, getCellText(currentDate));
rowNode.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("td", {
key: col,
title: title,
className: classnames_default()(cellPrefixCls, (0,objectSpread2["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
return isSame(generateConfig, locale, currentDate, date, type);
})), "".concat(cellPrefixCls, "-in-range"), inRange && !rangeStart && !rangeEnd), "".concat(cellPrefixCls, "-range-start"), rangeStart), "".concat(cellPrefixCls, "-range-end"), rangeEnd), "".concat(prefixCls, "-cell-selected"), !hoverRangeValue &&
// WeekPicker use row instead
type !== 'week' && matchValues(currentDate)), getCellClassName(currentDate))),
onClick: function onClick() {
if (!disabled) {
onSelect(currentDate);
}
},
onDoubleClick: function onDoubleClick() {
if (!disabled && onCellDblClick) {
onCellDblClick();
}
},
onMouseEnter: function onMouseEnter() {
if (!disabled) {
onHover === null || onHover === void 0 || onHover(currentDate);
}
},
onMouseLeave: function onMouseLeave() {
if (!disabled) {
onHover === null || onHover === void 0 || onHover(null);
}
}
}, cellRender ? cellRender(currentDate, {
prefixCls: prefixCls,
originNode: inner,
today: now,
type: type,
locale: locale
}) : inner));
};
for (var col = 0; col < colNum; col += 1) {
_loop();
}
rows.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
key: row,
className: rowClassName === null || rowClassName === void 0 ? void 0 : rowClassName(rowStartDate)
}, rowNode));
}
// ============================== Render ==============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-body")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("table", {
className: "".concat(prefixCls, "-content")
}, headerCells && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("thead", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", null, headerCells)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tbody", null, rows)));
}
;// ./node_modules/rc-picker/es/PickerPanel/PanelHeader.js
var HIDDEN_STYLE = {
visibility: 'hidden'
};
function PanelHeader(props) {
var offset = props.offset,
superOffset = props.superOffset,
onChange = props.onChange,
getStart = props.getStart,
getEnd = props.getEnd,
children = props.children;
var _usePanelContext = usePanelContext(),
prefixCls = _usePanelContext.prefixCls,
_usePanelContext$prev = _usePanelContext.prevIcon,
prevIcon = _usePanelContext$prev === void 0 ? "\u2039" : _usePanelContext$prev,
_usePanelContext$next = _usePanelContext.nextIcon,
nextIcon = _usePanelContext$next === void 0 ? "\u203A" : _usePanelContext$next,
_usePanelContext$supe = _usePanelContext.superPrevIcon,
superPrevIcon = _usePanelContext$supe === void 0 ? "\xAB" : _usePanelContext$supe,
_usePanelContext$supe2 = _usePanelContext.superNextIcon,
superNextIcon = _usePanelContext$supe2 === void 0 ? "\xBB" : _usePanelContext$supe2,
minDate = _usePanelContext.minDate,
maxDate = _usePanelContext.maxDate,
generateConfig = _usePanelContext.generateConfig,
locale = _usePanelContext.locale,
pickerValue = _usePanelContext.pickerValue,
type = _usePanelContext.panelType;
var headerPrefixCls = "".concat(prefixCls, "-header");
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext),
hidePrev = _React$useContext.hidePrev,
hideNext = _React$useContext.hideNext,
hideHeader = _React$useContext.hideHeader;
// ======================= Limitation =======================
var disabledOffsetPrev = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!minDate || !offset || !getEnd) {
return false;
}
var prevPanelLimitDate = getEnd(offset(-1, pickerValue));
return !isSameOrAfter(generateConfig, locale, prevPanelLimitDate, minDate, type);
}, [minDate, offset, pickerValue, getEnd, generateConfig, locale, type]);
var disabledSuperOffsetPrev = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!minDate || !superOffset || !getEnd) {
return false;
}
var prevPanelLimitDate = getEnd(superOffset(-1, pickerValue));
return !isSameOrAfter(generateConfig, locale, prevPanelLimitDate, minDate, type);
}, [minDate, superOffset, pickerValue, getEnd, generateConfig, locale, type]);
var disabledOffsetNext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!maxDate || !offset || !getStart) {
return false;
}
var nextPanelLimitDate = getStart(offset(1, pickerValue));
return !isSameOrAfter(generateConfig, locale, maxDate, nextPanelLimitDate, type);
}, [maxDate, offset, pickerValue, getStart, generateConfig, locale, type]);
var disabledSuperOffsetNext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!maxDate || !superOffset || !getStart) {
return false;
}
var nextPanelLimitDate = getStart(superOffset(1, pickerValue));
return !isSameOrAfter(generateConfig, locale, maxDate, nextPanelLimitDate, type);
}, [maxDate, superOffset, pickerValue, getStart, generateConfig, locale, type]);
// ========================= Offset =========================
var onOffset = function onOffset(distance) {
if (offset) {
onChange(offset(distance, pickerValue));
}
};
var onSuperOffset = function onSuperOffset(distance) {
if (superOffset) {
onChange(superOffset(distance, pickerValue));
}
};
// ========================= Render =========================
if (hideHeader) {
return null;
}
var prevBtnCls = "".concat(headerPrefixCls, "-prev-btn");
var nextBtnCls = "".concat(headerPrefixCls, "-next-btn");
var superPrevBtnCls = "".concat(headerPrefixCls, "-super-prev-btn");
var superNextBtnCls = "".concat(headerPrefixCls, "-super-next-btn");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: headerPrefixCls
}, superOffset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": locale.previousYear,
onClick: function onClick() {
return onSuperOffset(-1);
},
tabIndex: -1,
className: classnames_default()(superPrevBtnCls, disabledSuperOffsetPrev && "".concat(superPrevBtnCls, "-disabled")),
disabled: disabledSuperOffsetPrev,
style: hidePrev ? HIDDEN_STYLE : {}
}, superPrevIcon), offset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": locale.previousMonth,
onClick: function onClick() {
return onOffset(-1);
},
tabIndex: -1,
className: classnames_default()(prevBtnCls, disabledOffsetPrev && "".concat(prevBtnCls, "-disabled")),
disabled: disabledOffsetPrev,
style: hidePrev ? HIDDEN_STYLE : {}
}, prevIcon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(headerPrefixCls, "-view")
}, children), offset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": locale.nextMonth,
onClick: function onClick() {
return onOffset(1);
},
tabIndex: -1,
className: classnames_default()(nextBtnCls, disabledOffsetNext && "".concat(nextBtnCls, "-disabled")),
disabled: disabledOffsetNext,
style: hideNext ? HIDDEN_STYLE : {}
}, nextIcon), superOffset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": locale.nextYear,
onClick: function onClick() {
return onSuperOffset(1);
},
tabIndex: -1,
className: classnames_default()(superNextBtnCls, disabledSuperOffsetNext && "".concat(superNextBtnCls, "-disabled")),
disabled: disabledSuperOffsetNext,
style: hideNext ? HIDDEN_STYLE : {}
}, superNextIcon));
}
/* harmony default export */ var PickerPanel_PanelHeader = (PanelHeader);
;// ./node_modules/rc-picker/es/PickerPanel/DatePanel/index.js
function DatePanel(props) {
var prefixCls = props.prefixCls,
_props$panelName = props.panelName,
panelName = _props$panelName === void 0 ? 'date' : _props$panelName,
locale = props.locale,
generateConfig = props.generateConfig,
pickerValue = props.pickerValue,
onPickerValueChange = props.onPickerValueChange,
onModeChange = props.onModeChange,
_props$mode = props.mode,
mode = _props$mode === void 0 ? 'date' : _props$mode,
disabledDate = props.disabledDate,
onSelect = props.onSelect,
onHover = props.onHover,
showWeek = props.showWeek;
var panelPrefixCls = "".concat(prefixCls, "-").concat(panelName, "-panel");
var cellPrefixCls = "".concat(prefixCls, "-cell");
var isWeek = mode === 'week';
// ========================== Base ==========================
var _useInfo = useInfo(props, mode),
_useInfo2 = (0,slicedToArray["default"])(_useInfo, 2),
info = _useInfo2[0],
now = _useInfo2[1];
var weekFirstDay = generateConfig.locale.getWeekFirstDay(locale.locale);
var monthStartDate = generateConfig.setDate(pickerValue, 1);
var baseDate = getWeekStartDate(locale.locale, generateConfig, monthStartDate);
var month = generateConfig.getMonth(pickerValue);
// =========================== PrefixColumn ===========================
var showPrefixColumn = showWeek === undefined ? isWeek : showWeek;
var prefixColumn = showPrefixColumn ? function (date) {
// >>> Additional check for disabled
var disabled = disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date, {
type: 'week'
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("td", {
key: "week",
className: classnames_default()(cellPrefixCls, "".concat(cellPrefixCls, "-week"), (0,defineProperty["default"])({}, "".concat(cellPrefixCls, "-disabled"), disabled))
// Operation: Same as code in PanelBody
,
onClick: function onClick() {
if (!disabled) {
onSelect(date);
}
},
onMouseEnter: function onMouseEnter() {
if (!disabled) {
onHover === null || onHover === void 0 || onHover(date);
}
},
onMouseLeave: function onMouseLeave() {
if (!disabled) {
onHover === null || onHover === void 0 || onHover(null);
}
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(cellPrefixCls, "-inner")
}, generateConfig.locale.getWeek(locale.locale, date)));
} : null;
// ========================= Cells ==========================
// >>> Header Cells
var headerCells = [];
var weekDaysLocale = locale.shortWeekDays || (generateConfig.locale.getShortWeekDays ? generateConfig.locale.getShortWeekDays(locale.locale) : []);
if (prefixColumn) {
headerCells.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("th", {
key: "empty"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: {
width: 0,
height: 0,
position: 'absolute',
overflow: 'hidden',
opacity: 0
}
}, locale.week)));
}
for (var i = 0; i < WEEK_DAY_COUNT; i += 1) {
headerCells.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("th", {
key: i
}, weekDaysLocale[(i + weekFirstDay) % WEEK_DAY_COUNT]));
}
// >>> Body Cells
var getCellDate = function getCellDate(date, offset) {
return generateConfig.addDate(date, offset);
};
var getCellText = function getCellText(date) {
return formatValue(date, {
locale: locale,
format: locale.cellDateFormat,
generateConfig: generateConfig
});
};
var getCellClassName = function getCellClassName(date) {
var classObj = (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), isSameMonth(generateConfig, date, pickerValue)), "".concat(prefixCls, "-cell-today"), isSameDate(generateConfig, date, now));
return classObj;
};
// ========================= Header =========================
var monthsLocale = locale.shortMonths || (generateConfig.locale.getShortMonths ? generateConfig.locale.getShortMonths(locale.locale) : []);
var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": locale.yearSelect,
key: "year",
onClick: function onClick() {
onModeChange('year', pickerValue);
},
tabIndex: -1,
className: "".concat(prefixCls, "-year-btn")
}, formatValue(pickerValue, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}));
var monthNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": locale.monthSelect,
key: "month",
onClick: function onClick() {
onModeChange('month', pickerValue);
},
tabIndex: -1,
className: "".concat(prefixCls, "-month-btn")
}, locale.monthFormat ? formatValue(pickerValue, {
locale: locale,
format: locale.monthFormat,
generateConfig: generateConfig
}) : monthsLocale[month]);
var monthYearNodes = locale.monthBeforeYear ? [monthNode, yearNode] : [yearNode, monthNode];
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
value: info
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(panelPrefixCls, showWeek && "".concat(panelPrefixCls, "-show-week"))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
offset: function offset(distance) {
return generateConfig.addMonth(pickerValue, distance);
},
superOffset: function superOffset(distance) {
return generateConfig.addYear(pickerValue, distance);
},
onChange: onPickerValueChange
// Limitation
,
getStart: function getStart(date) {
return generateConfig.setDate(date, 1);
},
getEnd: function getEnd(date) {
var clone = generateConfig.setDate(date, 1);
clone = generateConfig.addMonth(clone, 1);
return generateConfig.addDate(clone, -1);
}
}, monthYearNodes), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({
titleFormat: locale.fieldDateFormat
}, props, {
colNum: WEEK_DAY_COUNT,
rowNum: 6,
baseDate: baseDate
// Header
,
headerCells: headerCells
// Body
,
getCellDate: getCellDate,
getCellText: getCellText,
getCellClassName: getCellClassName,
prefixColumn: prefixColumn,
cellSelection: !isWeek
}))));
}
;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js
var SPEED_PTG = 1 / 3;
function useScrollTo_useScrollTo(ulRef, value) {
// ========================= Scroll =========================
var scrollingRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var scrollRafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var scrollDistRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var isScrolling = function isScrolling() {
return scrollingRef.current;
};
var stopScroll = function stopScroll() {
raf["default"].cancel(scrollRafRef.current);
scrollingRef.current = false;
};
var scrollRafTimesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var startScroll = function startScroll() {
var ul = ulRef.current;
scrollDistRef.current = null;
scrollRafTimesRef.current = 0;
if (ul) {
var targetLi = ul.querySelector("[data-value=\"".concat(value, "\"]"));
var firstLi = ul.querySelector("li");
var doScroll = function doScroll() {
stopScroll();
scrollingRef.current = true;
scrollRafTimesRef.current += 1;
var currentTop = ul.scrollTop;
var firstLiTop = firstLi.offsetTop;
var targetLiTop = targetLi.offsetTop;
var targetTop = targetLiTop - firstLiTop;
// Wait for element exist. 5 frames is enough
if (targetLiTop === 0 && targetLi !== firstLi || !isVisible(ul)) {
if (scrollRafTimesRef.current <= 5) {
scrollRafRef.current = (0,raf["default"])(doScroll);
}
return;
}
var nextTop = currentTop + (targetTop - currentTop) * SPEED_PTG;
var dist = Math.abs(targetTop - nextTop);
// Break if dist get larger, which means user is scrolling
if (scrollDistRef.current !== null && scrollDistRef.current < dist) {
stopScroll();
return;
}
scrollDistRef.current = dist;
// Stop when dist is less than 1
if (dist <= 1) {
ul.scrollTop = targetTop;
stopScroll();
return;
}
// IE not support `scrollTo`
ul.scrollTop = nextTop;
scrollRafRef.current = (0,raf["default"])(doScroll);
};
if (targetLi && firstLi) {
doScroll();
}
}
};
// ======================== Trigger =========================
var syncScroll = (0,rc_util_es.useEvent)(startScroll);
return [syncScroll, stopScroll, isScrolling];
}
;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js
var SCROLL_DELAY = 300;
// Not use JSON.stringify to avoid dead loop
function flattenUnits(units) {
return units.map(function (_ref) {
var value = _ref.value,
label = _ref.label,
disabled = _ref.disabled;
return [value, label, disabled].join(',');
}).join(';');
}
function TimeColumn(props) {
var units = props.units,
value = props.value,
optionalValue = props.optionalValue,
type = props.type,
onChange = props.onChange,
onHover = props.onHover,
onDblClick = props.onDblClick,
changeOnScroll = props.changeOnScroll;
var _usePanelContext = usePanelContext(),
prefixCls = _usePanelContext.prefixCls,
cellRender = _usePanelContext.cellRender,
now = _usePanelContext.now,
locale = _usePanelContext.locale;
var panelPrefixCls = "".concat(prefixCls, "-time-panel");
var cellPrefixCls = "".concat(prefixCls, "-time-panel-cell");
// ========================== Refs ==========================
var ulRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ========================= Scroll =========================
var checkDelayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var clearDelayCheck = function clearDelayCheck() {
clearTimeout(checkDelayRef.current);
};
// ========================== Sync ==========================
var _useScrollTo = useScrollTo_useScrollTo(ulRef, value !== null && value !== void 0 ? value : optionalValue),
_useScrollTo2 = (0,slicedToArray["default"])(_useScrollTo, 3),
syncScroll = _useScrollTo2[0],
stopScroll = _useScrollTo2[1],
isScrolling = _useScrollTo2[2];
// Effect sync value scroll
(0,useLayoutEffect["default"])(function () {
syncScroll();
clearDelayCheck();
return function () {
stopScroll();
clearDelayCheck();
};
}, [value, optionalValue, flattenUnits(units)]);
// ========================= Change =========================
// Scroll event if sync onScroll
var onInternalScroll = function onInternalScroll(event) {
clearDelayCheck();
var target = event.target;
if (!isScrolling() && changeOnScroll) {
checkDelayRef.current = setTimeout(function () {
var ul = ulRef.current;
var firstLiTop = ul.querySelector("li").offsetTop;
var liList = Array.from(ul.querySelectorAll("li"));
var liTopList = liList.map(function (li) {
return li.offsetTop - firstLiTop;
});
var liDistList = liTopList.map(function (top, index) {
if (units[index].disabled) {
return Number.MAX_SAFE_INTEGER;
}
return Math.abs(top - target.scrollTop);
});
// Find min distance index
var minDist = Math.min.apply(Math, (0,toConsumableArray["default"])(liDistList));
var minDistIndex = liDistList.findIndex(function (dist) {
return dist === minDist;
});
var targetUnit = units[minDistIndex];
if (targetUnit && !targetUnit.disabled) {
onChange(targetUnit.value);
}
}, SCROLL_DELAY);
}
};
// ========================= Render =========================
var columnPrefixCls = "".concat(panelPrefixCls, "-column");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: columnPrefixCls,
ref: ulRef,
"data-type": type,
onScroll: onInternalScroll
}, units.map(function (_ref2) {
var label = _ref2.label,
unitValue = _ref2.value,
disabled = _ref2.disabled;
var inner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(cellPrefixCls, "-inner")
}, label);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
key: unitValue,
className: classnames_default()(cellPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(cellPrefixCls, "-selected"), value === unitValue), "".concat(cellPrefixCls, "-disabled"), disabled)),
onClick: function onClick() {
if (!disabled) {
onChange(unitValue);
}
},
onDoubleClick: function onDoubleClick() {
if (!disabled && onDblClick) {
onDblClick();
}
},
onMouseEnter: function onMouseEnter() {
onHover(unitValue);
},
onMouseLeave: function onMouseLeave() {
onHover(null);
},
"data-value": unitValue
}, cellRender ? cellRender(unitValue, {
prefixCls: prefixCls,
originNode: inner,
today: now,
type: 'time',
subType: type,
locale: locale
}) : inner);
}));
}
;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/index.js
function isAM(hour) {
return hour < 12;
}
function TimePanelBody(props) {
var showHour = props.showHour,
showMinute = props.showMinute,
showSecond = props.showSecond,
showMillisecond = props.showMillisecond,
showMeridiem = props.use12Hours,
changeOnScroll = props.changeOnScroll;
var _usePanelContext = usePanelContext(),
prefixCls = _usePanelContext.prefixCls,
values = _usePanelContext.values,
generateConfig = _usePanelContext.generateConfig,
locale = _usePanelContext.locale,
onSelect = _usePanelContext.onSelect,
_usePanelContext$onHo = _usePanelContext.onHover,
onHover = _usePanelContext$onHo === void 0 ? function () {} : _usePanelContext$onHo,
pickerValue = _usePanelContext.pickerValue;
var value = (values === null || values === void 0 ? void 0 : values[0]) || null;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext),
onCellDblClick = _React$useContext.onCellDblClick;
// ========================== Info ==========================
var _useTimeInfo = useTimeInfo(generateConfig, props, value),
_useTimeInfo2 = (0,slicedToArray["default"])(_useTimeInfo, 5),
getValidTime = _useTimeInfo2[0],
rowHourUnits = _useTimeInfo2[1],
getMinuteUnits = _useTimeInfo2[2],
getSecondUnits = _useTimeInfo2[3],
getMillisecondUnits = _useTimeInfo2[4];
// ========================= Value ==========================
// PickerValue will tell which one to align on the top
var getUnitValue = function getUnitValue(func) {
var valueUnitVal = value && generateConfig[func](value);
var pickerUnitValue = pickerValue && generateConfig[func](pickerValue);
return [valueUnitVal, pickerUnitValue];
};
var _getUnitValue = getUnitValue('getHour'),
_getUnitValue2 = (0,slicedToArray["default"])(_getUnitValue, 2),
hour = _getUnitValue2[0],
pickerHour = _getUnitValue2[1];
var _getUnitValue3 = getUnitValue('getMinute'),
_getUnitValue4 = (0,slicedToArray["default"])(_getUnitValue3, 2),
minute = _getUnitValue4[0],
pickerMinute = _getUnitValue4[1];
var _getUnitValue5 = getUnitValue('getSecond'),
_getUnitValue6 = (0,slicedToArray["default"])(_getUnitValue5, 2),
second = _getUnitValue6[0],
pickerSecond = _getUnitValue6[1];
var _getUnitValue7 = getUnitValue('getMillisecond'),
_getUnitValue8 = (0,slicedToArray["default"])(_getUnitValue7, 2),
millisecond = _getUnitValue8[0],
pickerMillisecond = _getUnitValue8[1];
var meridiem = hour === null ? null : isAM(hour) ? 'am' : 'pm';
// ========================= Column =========================
// Hours
var hourUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!showMeridiem) {
return rowHourUnits;
}
return isAM(hour) ? rowHourUnits.filter(function (h) {
return isAM(h.value);
}) : rowHourUnits.filter(function (h) {
return !isAM(h.value);
});
}, [hour, rowHourUnits, showMeridiem]);
// >>> Pick Fallback
var getEnabled = function getEnabled(units, val) {
var _enabledUnits$;
var enabledUnits = units.filter(function (unit) {
return !unit.disabled;
});
return val !== null && val !== void 0 ? val : // Fallback to enabled value
enabledUnits === null || enabledUnits === void 0 || (_enabledUnits$ = enabledUnits[0]) === null || _enabledUnits$ === void 0 ? void 0 : _enabledUnits$.value;
};
// >>> Minutes
var validHour = getEnabled(rowHourUnits, hour);
var minuteUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getMinuteUnits(validHour);
}, [getMinuteUnits, validHour]);
// >>> Seconds
var validMinute = getEnabled(minuteUnits, minute);
var secondUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getSecondUnits(validHour, validMinute);
}, [getSecondUnits, validHour, validMinute]);
// >>> Milliseconds
var validSecond = getEnabled(secondUnits, second);
var millisecondUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getMillisecondUnits(validHour, validMinute, validSecond);
}, [getMillisecondUnits, validHour, validMinute, validSecond]);
var validMillisecond = getEnabled(millisecondUnits, millisecond);
// Meridiem
var meridiemUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!showMeridiem) {
return [];
}
var base = generateConfig.getNow();
var amDate = generateConfig.setHour(base, 6);
var pmDate = generateConfig.setHour(base, 18);
var formatMeridiem = function formatMeridiem(date, defaultLabel) {
var cellMeridiemFormat = locale.cellMeridiemFormat;
return cellMeridiemFormat ? formatValue(date, {
generateConfig: generateConfig,
locale: locale,
format: cellMeridiemFormat
}) : defaultLabel;
};
return [{
label: formatMeridiem(amDate, 'AM'),
value: 'am',
disabled: rowHourUnits.every(function (h) {
return h.disabled || !isAM(h.value);
})
}, {
label: formatMeridiem(pmDate, 'PM'),
value: 'pm',
disabled: rowHourUnits.every(function (h) {
return h.disabled || isAM(h.value);
})
}];
}, [rowHourUnits, showMeridiem, generateConfig, locale]);
// ========================= Change =========================
/**
* Check if time is validate or will match to validate one
*/
var triggerChange = function triggerChange(nextDate) {
var validateDate = getValidTime(nextDate);
onSelect(validateDate);
};
// ========================= Column =========================
// Create a template date for the trigger change event
var triggerDateTmpl = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var tmpl = value || pickerValue || generateConfig.getNow();
var isNotNull = function isNotNull(num) {
return num !== null && num !== undefined;
};
if (isNotNull(hour)) {
tmpl = generateConfig.setHour(tmpl, hour);
tmpl = generateConfig.setMinute(tmpl, minute);
tmpl = generateConfig.setSecond(tmpl, second);
tmpl = generateConfig.setMillisecond(tmpl, millisecond);
} else if (isNotNull(pickerHour)) {
tmpl = generateConfig.setHour(tmpl, pickerHour);
tmpl = generateConfig.setMinute(tmpl, pickerMinute);
tmpl = generateConfig.setSecond(tmpl, pickerSecond);
tmpl = generateConfig.setMillisecond(tmpl, pickerMillisecond);
} else if (isNotNull(validHour)) {
tmpl = generateConfig.setHour(tmpl, validHour);
tmpl = generateConfig.setMinute(tmpl, validMinute);
tmpl = generateConfig.setSecond(tmpl, validSecond);
tmpl = generateConfig.setMillisecond(tmpl, validMillisecond);
}
return tmpl;
}, [value, pickerValue, hour, minute, second, millisecond, validHour, validMinute, validSecond, validMillisecond, pickerHour, pickerMinute, pickerSecond, pickerMillisecond, generateConfig]);
// ===================== Columns Change =====================
var fillColumnValue = function fillColumnValue(val, func) {
if (val === null) {
return null;
}
return generateConfig[func](triggerDateTmpl, val);
};
var getNextHourTime = function getNextHourTime(val) {
return fillColumnValue(val, 'setHour');
};
var getNextMinuteTime = function getNextMinuteTime(val) {
return fillColumnValue(val, 'setMinute');
};
var getNextSecondTime = function getNextSecondTime(val) {
return fillColumnValue(val, 'setSecond');
};
var getNextMillisecondTime = function getNextMillisecondTime(val) {
return fillColumnValue(val, 'setMillisecond');
};
var getMeridiemTime = function getMeridiemTime(val) {
if (val === null) {
return null;
}
if (val === 'am' && !isAM(hour)) {
return generateConfig.setHour(triggerDateTmpl, hour - 12);
} else if (val === 'pm' && isAM(hour)) {
return generateConfig.setHour(triggerDateTmpl, hour + 12);
}
return triggerDateTmpl;
};
var onHourChange = function onHourChange(val) {
triggerChange(getNextHourTime(val));
};
var onMinuteChange = function onMinuteChange(val) {
triggerChange(getNextMinuteTime(val));
};
var onSecondChange = function onSecondChange(val) {
triggerChange(getNextSecondTime(val));
};
var onMillisecondChange = function onMillisecondChange(val) {
triggerChange(getNextMillisecondTime(val));
};
var onMeridiemChange = function onMeridiemChange(val) {
triggerChange(getMeridiemTime(val));
};
// ====================== Column Hover ======================
var onHourHover = function onHourHover(val) {
onHover(getNextHourTime(val));
};
var onMinuteHover = function onMinuteHover(val) {
onHover(getNextMinuteTime(val));
};
var onSecondHover = function onSecondHover(val) {
onHover(getNextSecondTime(val));
};
var onMillisecondHover = function onMillisecondHover(val) {
onHover(getNextMillisecondTime(val));
};
var onMeridiemHover = function onMeridiemHover(val) {
onHover(getMeridiemTime(val));
};
// ========================= Render =========================
var sharedColumnProps = {
onDblClick: onCellDblClick,
changeOnScroll: changeOnScroll
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-content")
}, showHour && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
units: hourUnits,
value: hour,
optionalValue: pickerHour,
type: "hour",
onChange: onHourChange,
onHover: onHourHover
}, sharedColumnProps)), showMinute && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
units: minuteUnits,
value: minute,
optionalValue: pickerMinute,
type: "minute",
onChange: onMinuteChange,
onHover: onMinuteHover
}, sharedColumnProps)), showSecond && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
units: secondUnits,
value: second,
optionalValue: pickerSecond,
type: "second",
onChange: onSecondChange,
onHover: onSecondHover
}, sharedColumnProps)), showMillisecond && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
units: millisecondUnits,
value: millisecond,
optionalValue: pickerMillisecond,
type: "millisecond",
onChange: onMillisecondChange,
onHover: onMillisecondHover
}, sharedColumnProps)), showMeridiem && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
units: meridiemUnits,
value: meridiem,
type: "meridiem",
onChange: onMeridiemChange,
onHover: onMeridiemHover
}, sharedColumnProps)));
}
;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/index.js
function TimePanel(props) {
var prefixCls = props.prefixCls,
value = props.value,
locale = props.locale,
generateConfig = props.generateConfig,
showTime = props.showTime;
var _ref = showTime || {},
format = _ref.format;
var panelPrefixCls = "".concat(prefixCls, "-time-panel");
// ========================== Base ==========================
var _useInfo = useInfo(props, 'time'),
_useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
info = _useInfo2[0];
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
value: info
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(panelPrefixCls)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, null, value ? formatValue(value, {
locale: locale,
format: format,
generateConfig: generateConfig
}) : "\xA0"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimePanelBody, showTime)));
}
;// ./node_modules/rc-picker/es/PickerPanel/DateTimePanel/index.js
function DateTimePanel(props) {
var prefixCls = props.prefixCls,
generateConfig = props.generateConfig,
showTime = props.showTime,
onSelect = props.onSelect,
value = props.value,
pickerValue = props.pickerValue,
onHover = props.onHover;
var panelPrefixCls = "".concat(prefixCls, "-datetime-panel");
// =============================== Time ===============================
var _useTimeInfo = useTimeInfo(generateConfig, showTime),
_useTimeInfo2 = (0,slicedToArray["default"])(_useTimeInfo, 1),
getValidTime = _useTimeInfo2[0];
// Merge the time info from `value` or `pickerValue`
var mergeTime = function mergeTime(date) {
if (value) {
return fillTime(generateConfig, date, value);
}
return fillTime(generateConfig, date, pickerValue);
};
// ============================== Hover ===============================
var onDateHover = function onDateHover(date) {
onHover === null || onHover === void 0 || onHover(date ? mergeTime(date) : date);
};
// ============================== Select ==============================
var onDateSelect = function onDateSelect(date) {
// Merge with current time
var cloneDate = mergeTime(date);
onSelect(getValidTime(cloneDate, cloneDate));
};
// ============================== Render ==============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: panelPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DatePanel, (0,esm_extends["default"])({}, props, {
onSelect: onDateSelect,
onHover: onDateHover
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimePanel, props));
}
;// ./node_modules/rc-picker/es/PickerPanel/DecadePanel/index.js
function DecadePanel(props) {
var prefixCls = props.prefixCls,
locale = props.locale,
generateConfig = props.generateConfig,
pickerValue = props.pickerValue,
disabledDate = props.disabledDate,
onPickerValueChange = props.onPickerValueChange;
var panelPrefixCls = "".concat(prefixCls, "-decade-panel");
// ========================== Base ==========================
var _useInfo = useInfo(props, 'decade'),
_useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
info = _useInfo2[0];
var getStartYear = function getStartYear(date) {
var startYear = Math.floor(generateConfig.getYear(date) / 100) * 100;
return generateConfig.setYear(date, startYear);
};
var getEndYear = function getEndYear(date) {
var startYear = getStartYear(date);
return generateConfig.addYear(startYear, 99);
};
var startYearDate = getStartYear(pickerValue);
var endYearDate = getEndYear(pickerValue);
var baseDate = generateConfig.addYear(startYearDate, -10);
// ========================= Cells ==========================
var getCellDate = function getCellDate(date, offset) {
return generateConfig.addYear(date, offset * 10);
};
var getCellText = function getCellText(date) {
var cellYearFormat = locale.cellYearFormat;
var startYearStr = formatValue(date, {
locale: locale,
format: cellYearFormat,
generateConfig: generateConfig
});
var endYearStr = formatValue(generateConfig.addYear(date, 9), {
locale: locale,
format: cellYearFormat,
generateConfig: generateConfig
});
return "".concat(startYearStr, "-").concat(endYearStr);
};
var getCellClassName = function getCellClassName(date) {
return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), isSameDecade(generateConfig, date, startYearDate) || isSameDecade(generateConfig, date, endYearDate) || isInRange(generateConfig, startYearDate, endYearDate, date));
};
// ======================== Disabled ========================
var mergedDisabledDate = disabledDate ? function (currentDate, disabledInfo) {
// Start
var baseStartDate = generateConfig.setDate(currentDate, 1);
var baseStartMonth = generateConfig.setMonth(baseStartDate, 0);
var baseStartYear = generateConfig.setYear(baseStartMonth, Math.floor(generateConfig.getYear(baseStartMonth) / 10) * 10);
// End
var baseEndYear = generateConfig.addYear(baseStartYear, 10);
var baseEndDate = generateConfig.addDate(baseEndYear, -1);
return disabledDate(baseStartYear, disabledInfo) && disabledDate(baseEndDate, disabledInfo);
} : null;
// ========================= Header =========================
var yearNode = "".concat(formatValue(startYearDate, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}), "-").concat(formatValue(endYearDate, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}));
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
value: info
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: panelPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
superOffset: function superOffset(distance) {
return generateConfig.addYear(pickerValue, distance * 100);
},
onChange: onPickerValueChange
// Limitation
,
getStart: getStartYear,
getEnd: getEndYear
}, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
disabledDate: mergedDisabledDate,
colNum: 3,
rowNum: 4,
baseDate: baseDate
// Body
,
getCellDate: getCellDate,
getCellText: getCellText,
getCellClassName: getCellClassName
}))));
}
;// ./node_modules/rc-picker/es/PickerPanel/MonthPanel/index.js
function MonthPanel(props) {
var prefixCls = props.prefixCls,
locale = props.locale,
generateConfig = props.generateConfig,
pickerValue = props.pickerValue,
disabledDate = props.disabledDate,
onPickerValueChange = props.onPickerValueChange,
onModeChange = props.onModeChange;
var panelPrefixCls = "".concat(prefixCls, "-month-panel");
// ========================== Base ==========================
var _useInfo = useInfo(props, 'month'),
_useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
info = _useInfo2[0];
var baseDate = generateConfig.setMonth(pickerValue, 0);
// ========================= Month ==========================
var monthsLocale = locale.shortMonths || (generateConfig.locale.getShortMonths ? generateConfig.locale.getShortMonths(locale.locale) : []);
// ========================= Cells ==========================
var getCellDate = function getCellDate(date, offset) {
return generateConfig.addMonth(date, offset);
};
var getCellText = function getCellText(date) {
var month = generateConfig.getMonth(date);
return locale.monthFormat ? formatValue(date, {
locale: locale,
format: locale.monthFormat,
generateConfig: generateConfig
}) : monthsLocale[month];
};
var getCellClassName = function getCellClassName() {
return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), true);
};
// ======================== Disabled ========================
var mergedDisabledDate = disabledDate ? function (currentDate, disabledInfo) {
var startDate = generateConfig.setDate(currentDate, 1);
var nextMonthStartDate = generateConfig.setMonth(startDate, generateConfig.getMonth(startDate) + 1);
var endDate = generateConfig.addDate(nextMonthStartDate, -1);
return disabledDate(startDate, disabledInfo) && disabledDate(endDate, disabledInfo);
} : null;
// ========================= Header =========================
var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
key: "year",
"aria-label": locale.yearSelect,
onClick: function onClick() {
onModeChange('year');
},
tabIndex: -1,
className: "".concat(prefixCls, "-year-btn")
}, formatValue(pickerValue, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}));
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
value: info
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: panelPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
superOffset: function superOffset(distance) {
return generateConfig.addYear(pickerValue, distance);
},
onChange: onPickerValueChange
// Limitation
,
getStart: function getStart(date) {
return generateConfig.setMonth(date, 0);
},
getEnd: function getEnd(date) {
return generateConfig.setMonth(date, 11);
}
}, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
disabledDate: mergedDisabledDate,
titleFormat: locale.fieldMonthFormat,
colNum: 3,
rowNum: 4,
baseDate: baseDate
// Body
,
getCellDate: getCellDate,
getCellText: getCellText,
getCellClassName: getCellClassName
}))));
}
;// ./node_modules/rc-picker/es/PickerPanel/QuarterPanel/index.js
function QuarterPanel(props) {
var prefixCls = props.prefixCls,
locale = props.locale,
generateConfig = props.generateConfig,
pickerValue = props.pickerValue,
onPickerValueChange = props.onPickerValueChange,
onModeChange = props.onModeChange;
var panelPrefixCls = "".concat(prefixCls, "-quarter-panel");
// ========================== Base ==========================
var _useInfo = useInfo(props, 'quarter'),
_useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
info = _useInfo2[0];
var baseDate = generateConfig.setMonth(pickerValue, 0);
// ========================= Cells ==========================
var getCellDate = function getCellDate(date, offset) {
return generateConfig.addMonth(date, offset * 3);
};
var getCellText = function getCellText(date) {
return formatValue(date, {
locale: locale,
format: locale.cellQuarterFormat,
generateConfig: generateConfig
});
};
var getCellClassName = function getCellClassName() {
return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), true);
};
// ========================= Header =========================
var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
key: "year",
"aria-label": locale.yearSelect,
onClick: function onClick() {
onModeChange('year');
},
tabIndex: -1,
className: "".concat(prefixCls, "-year-btn")
}, formatValue(pickerValue, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}));
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
value: info
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: panelPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
superOffset: function superOffset(distance) {
return generateConfig.addYear(pickerValue, distance);
},
onChange: onPickerValueChange
// Limitation
,
getStart: function getStart(date) {
return generateConfig.setMonth(date, 0);
},
getEnd: function getEnd(date) {
return generateConfig.setMonth(date, 11);
}
}, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
titleFormat: locale.fieldQuarterFormat,
colNum: 4,
rowNum: 1,
baseDate: baseDate
// Body
,
getCellDate: getCellDate,
getCellText: getCellText,
getCellClassName: getCellClassName
}))));
}
;// ./node_modules/rc-picker/es/PickerPanel/WeekPanel/index.js
function WeekPanel(props) {
var prefixCls = props.prefixCls,
generateConfig = props.generateConfig,
locale = props.locale,
value = props.value,
hoverValue = props.hoverValue,
hoverRangeValue = props.hoverRangeValue;
// =============================== Row ================================
var localeName = locale.locale;
var rowPrefixCls = "".concat(prefixCls, "-week-panel-row");
var rowClassName = function rowClassName(currentDate) {
var rangeCls = {};
if (hoverRangeValue) {
var _hoverRangeValue = (0,slicedToArray["default"])(hoverRangeValue, 2),
rangeStart = _hoverRangeValue[0],
rangeEnd = _hoverRangeValue[1];
var isRangeStart = isSameWeek(generateConfig, localeName, rangeStart, currentDate);
var isRangeEnd = isSameWeek(generateConfig, localeName, rangeEnd, currentDate);
rangeCls["".concat(rowPrefixCls, "-range-start")] = isRangeStart;
rangeCls["".concat(rowPrefixCls, "-range-end")] = isRangeEnd;
rangeCls["".concat(rowPrefixCls, "-range-hover")] = !isRangeStart && !isRangeEnd && isInRange(generateConfig, rangeStart, rangeEnd, currentDate);
}
if (hoverValue) {
rangeCls["".concat(rowPrefixCls, "-hover")] = hoverValue.some(function (date) {
return isSameWeek(generateConfig, localeName, currentDate, date);
});
}
return classnames_default()(rowPrefixCls, (0,defineProperty["default"])({}, "".concat(rowPrefixCls, "-selected"), !hoverRangeValue && isSameWeek(generateConfig, localeName, value, currentDate)),
// Patch for hover range
rangeCls);
};
// ============================== Render ==============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DatePanel, (0,esm_extends["default"])({}, props, {
mode: "week",
panelName: "week",
rowClassName: rowClassName
}));
}
;// ./node_modules/rc-picker/es/PickerPanel/YearPanel/index.js
function YearPanel(props) {
var prefixCls = props.prefixCls,
locale = props.locale,
generateConfig = props.generateConfig,
pickerValue = props.pickerValue,
disabledDate = props.disabledDate,
onPickerValueChange = props.onPickerValueChange,
onModeChange = props.onModeChange;
var panelPrefixCls = "".concat(prefixCls, "-year-panel");
// ========================== Base ==========================
var _useInfo = useInfo(props, 'year'),
_useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
info = _useInfo2[0];
var getStartYear = function getStartYear(date) {
var startYear = Math.floor(generateConfig.getYear(date) / 10) * 10;
return generateConfig.setYear(date, startYear);
};
var getEndYear = function getEndYear(date) {
var startYear = getStartYear(date);
return generateConfig.addYear(startYear, 9);
};
var startYearDate = getStartYear(pickerValue);
var endYearDate = getEndYear(pickerValue);
var baseDate = generateConfig.addYear(startYearDate, -1);
// ========================= Cells ==========================
var getCellDate = function getCellDate(date, offset) {
return generateConfig.addYear(date, offset);
};
var getCellText = function getCellText(date) {
return formatValue(date, {
locale: locale,
format: locale.cellYearFormat,
generateConfig: generateConfig
});
};
var getCellClassName = function getCellClassName(date) {
return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), isSameYear(generateConfig, date, startYearDate) || isSameYear(generateConfig, date, endYearDate) || isInRange(generateConfig, startYearDate, endYearDate, date));
};
// ======================== Disabled ========================
var mergedDisabledDate = disabledDate ? function (currentDate, disabledInfo) {
// Start
var startMonth = generateConfig.setMonth(currentDate, 0);
var startDate = generateConfig.setDate(startMonth, 1);
// End
var endMonth = generateConfig.addYear(startDate, 1);
var endDate = generateConfig.addDate(endMonth, -1);
return disabledDate(startDate, disabledInfo) && disabledDate(endDate, disabledInfo);
} : null;
// ========================= Header =========================
var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
key: "decade",
"aria-label": locale.decadeSelect,
onClick: function onClick() {
onModeChange('decade');
},
tabIndex: -1,
className: "".concat(prefixCls, "-decade-btn")
}, formatValue(startYearDate, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}), "-", formatValue(endYearDate, {
locale: locale,
format: locale.yearFormat,
generateConfig: generateConfig
}));
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
value: info
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: panelPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
superOffset: function superOffset(distance) {
return generateConfig.addYear(pickerValue, distance * 10);
},
onChange: onPickerValueChange
// Limitation
,
getStart: getStartYear,
getEnd: getEndYear
}, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
disabledDate: mergedDisabledDate,
titleFormat: locale.fieldYearFormat,
colNum: 3,
rowNum: 4,
baseDate: baseDate
// Body
,
getCellDate: getCellDate,
getCellText: getCellText,
getCellClassName: getCellClassName
}))));
}
;// ./node_modules/rc-picker/es/PickerPanel/index.js
var DefaultComponents = {
date: DatePanel,
datetime: DateTimePanel,
week: WeekPanel,
month: MonthPanel,
quarter: QuarterPanel,
year: YearPanel,
decade: DecadePanel,
time: TimePanel
};
function PickerPanel(props, ref) {
var _React$useContext;
var locale = props.locale,
generateConfig = props.generateConfig,
direction = props.direction,
prefixCls = props.prefixCls,
_props$tabIndex = props.tabIndex,
tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
multiple = props.multiple,
defaultValue = props.defaultValue,
value = props.value,
onChange = props.onChange,
onSelect = props.onSelect,
defaultPickerValue = props.defaultPickerValue,
pickerValue = props.pickerValue,
onPickerValueChange = props.onPickerValueChange,
mode = props.mode,
onPanelChange = props.onPanelChange,
_props$picker = props.picker,
picker = _props$picker === void 0 ? 'date' : _props$picker,
showTime = props.showTime,
hoverValue = props.hoverValue,
hoverRangeValue = props.hoverRangeValue,
cellRender = props.cellRender,
dateRender = props.dateRender,
monthCellRender = props.monthCellRender,
_props$components = props.components,
components = _props$components === void 0 ? {} : _props$components,
hideHeader = props.hideHeader;
var mergedPrefixCls = ((_React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context)) === null || _React$useContext === void 0 ? void 0 : _React$useContext.prefixCls) || prefixCls || 'rc-picker';
// ========================== Refs ==========================
var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: rootRef.current
};
});
// ========================== Time ==========================
// Auto `format` need to check `showTime.showXXX` first.
// And then merge the `locale` into `mergedShowTime`.
var _getTimeProps = getTimeProps(props),
_getTimeProps2 = (0,slicedToArray["default"])(_getTimeProps, 4),
timeProps = _getTimeProps2[0],
localeTimeProps = _getTimeProps2[1],
showTimeFormat = _getTimeProps2[2],
propFormat = _getTimeProps2[3];
// ========================= Locale =========================
var filledLocale = useLocale_useLocale(locale, localeTimeProps);
// ========================= Picker =========================
var internalPicker = picker === 'date' && showTime ? 'datetime' : picker;
// ======================== ShowTime ========================
var mergedShowTime = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return fillShowTimeConfig(internalPicker, showTimeFormat, propFormat, timeProps, filledLocale);
}, [internalPicker, showTimeFormat, propFormat, timeProps, filledLocale]);
// ========================== Now ===========================
var now = generateConfig.getNow();
// ========================== Mode ==========================
var _useMergedState = (0,rc_util_es.useMergedState)(picker, {
value: mode,
postState: function postState(val) {
return val || 'date';
}
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedMode = _useMergedState2[0],
setMergedMode = _useMergedState2[1];
var internalMode = mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;
// ========================= Toggle =========================
var toggleDates = useToggleDates(generateConfig, locale, internalPicker);
// ========================= Value ==========================
// >>> Real value
// Interactive with `onChange` event which only trigger when the `mode` is `picker`
var _useMergedState3 = (0,rc_util_es.useMergedState)(defaultValue, {
value: value
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
innerValue = _useMergedState4[0],
setMergedValue = _useMergedState4[1];
var mergedValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// Clean up `[null]`
var values = miscUtil_toArray(innerValue).filter(function (val) {
return val;
});
return multiple ? values : values.slice(0, 1);
}, [innerValue, multiple]);
// Sync value and only trigger onChange event when changed
var triggerChange = (0,rc_util_es.useEvent)(function (nextValue) {
setMergedValue(nextValue);
if (onChange && (nextValue === null || mergedValue.length !== nextValue.length || mergedValue.some(function (ori, index) {
return !isSame(generateConfig, locale, ori, nextValue[index], internalPicker);
}))) {
onChange === null || onChange === void 0 || onChange(multiple ? nextValue : nextValue[0]);
}
});
// >>> CalendarValue
// CalendarValue is a temp value for user operation
// which will only trigger `onCalendarChange` but not `onChange`
var onInternalSelect = (0,rc_util_es.useEvent)(function (newDate) {
onSelect === null || onSelect === void 0 || onSelect(newDate);
if (mergedMode === picker) {
var nextValues = multiple ? toggleDates(mergedValue, newDate) : [newDate];
triggerChange(nextValues);
}
});
// >>> PickerValue
// PickerValue is used to control the current displaying panel
var _useMergedState5 = (0,rc_util_es.useMergedState)(defaultPickerValue || mergedValue[0] || now, {
value: pickerValue
}),
_useMergedState6 = (0,slicedToArray["default"])(_useMergedState5, 2),
mergedPickerValue = _useMergedState6[0],
setInternalPickerValue = _useMergedState6[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (mergedValue[0] && !pickerValue) {
setInternalPickerValue(mergedValue[0]);
}
}, [mergedValue[0]]);
// Both trigger when manually pickerValue or mode change
var triggerPanelChange = function triggerPanelChange(viewDate, nextMode) {
onPanelChange === null || onPanelChange === void 0 || onPanelChange(viewDate || pickerValue, nextMode || mergedMode);
};
var setPickerValue = function setPickerValue(nextPickerValue) {
var triggerPanelEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
setInternalPickerValue(nextPickerValue);
onPickerValueChange === null || onPickerValueChange === void 0 || onPickerValueChange(nextPickerValue);
if (triggerPanelEvent) {
triggerPanelChange(nextPickerValue);
}
};
var triggerModeChange = function triggerModeChange(nextMode, viewDate) {
setMergedMode(nextMode);
if (viewDate) {
setPickerValue(viewDate);
}
triggerPanelChange(viewDate, nextMode);
};
var onPanelValueSelect = function onPanelValueSelect(nextValue) {
onInternalSelect(nextValue);
setPickerValue(nextValue);
// Update mode if needed
if (mergedMode !== picker) {
var decadeYearQueue = ['decade', 'year'];
var decadeYearMonthQueue = [].concat(decadeYearQueue, ['month']);
var pickerQueue = {
quarter: [].concat(decadeYearQueue, ['quarter']),
week: [].concat((0,toConsumableArray["default"])(decadeYearMonthQueue), ['week']),
date: [].concat((0,toConsumableArray["default"])(decadeYearMonthQueue), ['date'])
};
var queue = pickerQueue[picker] || decadeYearMonthQueue;
var index = queue.indexOf(mergedMode);
var nextMode = queue[index + 1];
if (nextMode) {
triggerModeChange(nextMode, nextValue);
}
}
};
// ======================= Hover Date =======================
var hoverRangeDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var start;
var end;
if (Array.isArray(hoverRangeValue)) {
var _hoverRangeValue = (0,slicedToArray["default"])(hoverRangeValue, 2);
start = _hoverRangeValue[0];
end = _hoverRangeValue[1];
} else {
start = hoverRangeValue;
}
// Return for not exist
if (!start && !end) {
return null;
}
// Fill if has empty
start = start || end;
end = end || start;
return generateConfig.isAfter(start, end) ? [end, start] : [start, end];
}, [hoverRangeValue, generateConfig]);
// ======================= Components =======================
// >>> cellRender
var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender);
// ======================= Components =======================
var PanelComponent = components[internalMode] || DefaultComponents[internalMode] || DatePanel;
// ======================== Context =========================
var parentHackContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext);
var pickerPanelContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, parentHackContext), {}, {
hideHeader: hideHeader
});
}, [parentHackContext, hideHeader]);
// ======================== Warnings ========================
if (true) {
(0,rc_util_es.warning)(!mergedValue || mergedValue.every(function (val) {
return generateConfig.isValidate(val);
}), 'Invalidate date pass to `value` or `defaultValue`.');
}
// ========================= Render =========================
var panelCls = "".concat(mergedPrefixCls, "-panel");
var panelProps = pickProps(props, [
// Week
'showWeek',
// Icons
'prevIcon', 'nextIcon', 'superPrevIcon', 'superNextIcon',
// Disabled
'disabledDate', 'minDate', 'maxDate',
// Hover
'onHover']);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
value: pickerPanelContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: rootRef,
tabIndex: tabIndex,
className: classnames_default()(panelCls, (0,defineProperty["default"])({}, "".concat(panelCls, "-rtl"), direction === 'rtl'))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelComponent, (0,esm_extends["default"])({}, panelProps, {
// Time
showTime: mergedShowTime
// MISC
,
prefixCls: mergedPrefixCls,
locale: filledLocale,
generateConfig: generateConfig
// Mode
,
onModeChange: triggerModeChange
// Value
,
pickerValue: mergedPickerValue,
onPickerValueChange: function onPickerValueChange(nextPickerValue) {
setPickerValue(nextPickerValue, true);
},
value: mergedValue[0],
onSelect: onPanelValueSelect,
values: mergedValue
// Render
,
cellRender: onInternalCellRender
// Hover
,
hoverRangeValue: hoverRangeDate,
hoverValue: hoverValue
}))));
}
var RefPanelPicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PickerPanel));
if (true) {
RefPanelPicker.displayName = 'PanelPicker';
}
// Make support generic
/* harmony default export */ var es_PickerPanel = (RefPanelPicker);
;// ./node_modules/rc-picker/es/PickerInput/Popup/PopupPanel.js
function PopupPanel(props) {
var picker = props.picker,
multiplePanel = props.multiplePanel,
pickerValue = props.pickerValue,
onPickerValueChange = props.onPickerValueChange,
needConfirm = props.needConfirm,
onSubmit = props.onSubmit,
range = props.range,
hoverValue = props.hoverValue;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls,
generateConfig = _React$useContext.generateConfig;
// ======================== Offset ========================
var internalOffsetDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (date, offset) {
return offsetPanelDate(generateConfig, picker, date, offset);
}, [generateConfig, picker]);
var nextPickerValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return internalOffsetDate(pickerValue, 1);
}, [pickerValue, internalOffsetDate]);
// Outside
var onSecondPickerValueChange = function onSecondPickerValueChange(nextDate) {
onPickerValueChange(internalOffsetDate(nextDate, -1));
};
// ======================= Context ========================
var sharedContext = {
onCellDblClick: function onCellDblClick() {
if (needConfirm) {
onSubmit();
}
}
};
var hideHeader = picker === 'time';
// ======================== Props =========================
var pickerProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
hoverValue: null,
hoverRangeValue: null,
hideHeader: hideHeader
});
if (range) {
pickerProps.hoverRangeValue = hoverValue;
} else {
pickerProps.hoverValue = hoverValue;
}
// ======================== Render ========================
// Multiple
if (multiplePanel) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-panels")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedContext), {}, {
hideNext: true
})
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, pickerProps)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedContext), {}, {
hidePrev: true
})
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, (0,esm_extends["default"])({}, pickerProps, {
pickerValue: nextPickerValue,
onPickerValueChange: onSecondPickerValueChange
}))));
}
// Single
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
value: (0,objectSpread2["default"])({}, sharedContext)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, pickerProps));
}
;// ./node_modules/rc-picker/es/PickerInput/Popup/PresetPanel.js
function executeValue(value) {
return typeof value === 'function' ? value() : value;
}
function PresetPanel(props) {
var prefixCls = props.prefixCls,
presets = props.presets,
_onClick = props.onClick,
onHover = props.onHover;
if (!presets.length) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-presets")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", null, presets.map(function (_ref, index) {
var label = _ref.label,
value = _ref.value;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
key: index,
onClick: function onClick() {
_onClick(executeValue(value));
},
onMouseEnter: function onMouseEnter() {
onHover(executeValue(value));
},
onMouseLeave: function onMouseLeave() {
onHover(null);
}
}, label);
})));
}
;// ./node_modules/rc-picker/es/PickerInput/Popup/index.js
function PickerInput_Popup_Popup(props) {
var panelRender = props.panelRender,
internalMode = props.internalMode,
picker = props.picker,
showNow = props.showNow,
range = props.range,
multiple = props.multiple,
_props$activeInfo = props.activeInfo,
activeInfo = _props$activeInfo === void 0 ? [0, 0, 0] : _props$activeInfo,
presets = props.presets,
onPresetHover = props.onPresetHover,
onPresetSubmit = props.onPresetSubmit,
onFocus = props.onFocus,
onBlur = props.onBlur,
onPanelMouseDown = props.onPanelMouseDown,
direction = props.direction,
value = props.value,
onSelect = props.onSelect,
isInvalid = props.isInvalid,
defaultOpenValue = props.defaultOpenValue,
onOk = props.onOk,
onSubmit = props.onSubmit;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls;
var panelPrefixCls = "".concat(prefixCls, "-panel");
var rtl = direction === 'rtl';
// ========================= Refs =========================
var arrowRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ======================== Offset ========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
containerWidth = _React$useState2[0],
setContainerWidth = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
containerOffset = _React$useState4[0],
setContainerOffset = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
arrowOffset = _React$useState6[0],
setArrowOffset = _React$useState6[1];
var onResize = function onResize(info) {
if (info.width) {
setContainerWidth(info.width);
}
};
var _activeInfo = (0,slicedToArray["default"])(activeInfo, 3),
activeInputLeft = _activeInfo[0],
activeInputRight = _activeInfo[1],
selectorWidth = _activeInfo[2];
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
retryTimes = _React$useState8[0],
setRetryTimes = _React$useState8[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setRetryTimes(10);
}, [activeInputLeft]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
// `activeOffset` is always align with the active input element
// So we need only check container contains the `activeOffset`
if (range && wrapperRef.current) {
var _arrowRef$current;
// Offset in case container has border radius
var arrowWidth = ((_arrowRef$current = arrowRef.current) === null || _arrowRef$current === void 0 ? void 0 : _arrowRef$current.offsetWidth) || 0;
// Arrow Offset
var wrapperRect = wrapperRef.current.getBoundingClientRect();
if (!wrapperRect.height || wrapperRect.right < 0) {
setRetryTimes(function (times) {
return Math.max(0, times - 1);
});
return;
}
var nextArrowOffset = (rtl ? activeInputRight - arrowWidth : activeInputLeft) - wrapperRect.left;
setArrowOffset(nextArrowOffset);
// Container Offset
if (containerWidth && containerWidth < selectorWidth) {
var offset = rtl ? wrapperRect.right - (activeInputRight - arrowWidth + containerWidth) : activeInputLeft + arrowWidth - wrapperRect.left - containerWidth;
var safeOffset = Math.max(0, offset);
setContainerOffset(safeOffset);
} else {
setContainerOffset(0);
}
}
}, [retryTimes, rtl, containerWidth, activeInputLeft, activeInputRight, selectorWidth, range]);
// ======================== Custom ========================
function filterEmpty(list) {
return list.filter(function (item) {
return item;
});
}
var valueList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return filterEmpty(miscUtil_toArray(value));
}, [value]);
var isTimePickerEmptyValue = picker === 'time' && !valueList.length;
var footerSubmitValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (isTimePickerEmptyValue) {
return filterEmpty([defaultOpenValue]);
}
return valueList;
}, [isTimePickerEmptyValue, valueList, defaultOpenValue]);
var popupPanelValue = isTimePickerEmptyValue ? defaultOpenValue : valueList;
var disableSubmit = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// Empty is invalid
if (!footerSubmitValue.length) {
return true;
}
return footerSubmitValue.some(function (val) {
return isInvalid(val);
});
}, [footerSubmitValue, isInvalid]);
var onFooterSubmit = function onFooterSubmit() {
// For TimePicker, we will additional trigger the value update
if (isTimePickerEmptyValue) {
onSelect(defaultOpenValue);
}
onOk();
onSubmit();
};
var mergedNodes = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-panel-layout")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PresetPanel, {
prefixCls: prefixCls,
presets: presets,
onClick: onPresetSubmit,
onHover: onPresetHover
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PopupPanel, (0,esm_extends["default"])({}, props, {
value: popupPanelValue
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer_Footer, (0,esm_extends["default"])({}, props, {
showNow: multiple ? false : showNow,
invalid: disableSubmit,
onSubmit: onFooterSubmit
}))));
if (panelRender) {
mergedNodes = panelRender(mergedNodes);
}
// ======================== Render ========================
var containerPrefixCls = "".concat(panelPrefixCls, "-container");
var marginLeft = 'marginLeft';
var marginRight = 'marginRight';
// Container
var renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
onMouseDown: onPanelMouseDown,
tabIndex: -1,
className: classnames_default()(containerPrefixCls, // Used for Today Button style, safe to remove if no need
"".concat(prefixCls, "-").concat(internalMode, "-panel-container")),
style: (0,defineProperty["default"])((0,defineProperty["default"])({}, rtl ? marginRight : marginLeft, containerOffset), rtl ? marginLeft : marginRight, 'auto')
// Still wish not to lose focus on mouse down
// onMouseDown={(e) => {
// // e.preventDefault();
// }}
,
onFocus: onFocus,
onBlur: onBlur
}, mergedNodes);
if (range) {
renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
onMouseDown: onPanelMouseDown,
ref: wrapperRef,
className: classnames_default()("".concat(prefixCls, "-range-wrapper"), "".concat(prefixCls, "-").concat(picker, "-range-wrapper"))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: arrowRef,
className: "".concat(prefixCls, "-range-arrow"),
style: {
left: arrowOffset
}
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onResize
}, renderNode));
}
return renderNode;
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/hooks/useInputProps.js
function useInputProps(props, /** Used for SinglePicker */
postProps) {
var format = props.format,
maskFormat = props.maskFormat,
generateConfig = props.generateConfig,
locale = props.locale,
preserveInvalidOnBlur = props.preserveInvalidOnBlur,
inputReadOnly = props.inputReadOnly,
required = props.required,
ariaRequired = props['aria-required'],
onSubmit = props.onSubmit,
_onFocus = props.onFocus,
_onBlur = props.onBlur,
onInputChange = props.onInputChange,
onInvalid = props.onInvalid,
open = props.open,
onOpenChange = props.onOpenChange,
_onKeyDown = props.onKeyDown,
_onChange = props.onChange,
activeHelp = props.activeHelp,
name = props.name,
autoComplete = props.autoComplete,
id = props.id,
value = props.value,
invalid = props.invalid,
placeholder = props.placeholder,
disabled = props.disabled,
activeIndex = props.activeIndex,
allHelp = props.allHelp,
picker = props.picker;
// ======================== Parser ========================
var parseDate = function parseDate(str, formatStr) {
var parsed = generateConfig.locale.parse(locale.locale, str, [formatStr]);
return parsed && generateConfig.isValidate(parsed) ? parsed : null;
};
// ========================= Text =========================
var firstFormat = format[0];
var getText = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (date) {
return formatValue(date, {
locale: locale,
format: firstFormat,
generateConfig: generateConfig
});
}, [locale, generateConfig, firstFormat]);
var valueTexts = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return value.map(getText);
}, [value, getText]);
// ========================= Size =========================
var size = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var defaultSize = picker === 'time' ? 8 : 10;
var length = typeof firstFormat === 'function' ? firstFormat(generateConfig.getNow()).length : firstFormat.length;
return Math.max(defaultSize, length) + 2;
}, [firstFormat, picker, generateConfig]);
// ======================= Validate =======================
var _validateFormat = function validateFormat(text) {
for (var i = 0; i < format.length; i += 1) {
var singleFormat = format[i];
// Only support string type
if (typeof singleFormat === 'string') {
var parsed = parseDate(text, singleFormat);
if (parsed) {
return parsed;
}
}
}
return false;
};
// ======================== Input =========================
var getInputProps = function getInputProps(index) {
function getProp(propValue) {
return index !== undefined ? propValue[index] : propValue;
}
var pickedAttrs = (0,pickAttrs["default"])(props, {
aria: true,
data: true
});
var inputProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, pickedAttrs), {}, {
// ============== Shared ==============
format: maskFormat,
validateFormat: function validateFormat(text) {
return !!_validateFormat(text);
},
preserveInvalidOnBlur: preserveInvalidOnBlur,
readOnly: inputReadOnly,
required: required,
'aria-required': ariaRequired,
name: name,
autoComplete: autoComplete,
size: size,
// ============= By Index =============
id: getProp(id),
value: getProp(valueTexts) || '',
invalid: getProp(invalid),
placeholder: getProp(placeholder),
active: activeIndex === index,
helped: allHelp || activeHelp && activeIndex === index,
disabled: getProp(disabled),
onFocus: function onFocus(event) {
_onFocus(event, index);
},
onBlur: function onBlur(event) {
// Blur do not trigger close
// Since it may focus to the popup panel
_onBlur(event, index);
},
onSubmit: onSubmit,
// Get validate text value
onChange: function onChange(text) {
onInputChange();
var parsed = _validateFormat(text);
if (parsed) {
onInvalid(false, index);
_onChange(parsed, index);
return;
}
// Tell outer that the value typed is invalid.
// If text is empty, it means valid.
onInvalid(!!text, index);
},
onHelp: function onHelp() {
onOpenChange(true, {
index: index
});
},
onKeyDown: function onKeyDown(event) {
var prevented = false;
_onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(event, function () {
if (true) {
(0,rc_util_es.warning)(false, '`preventDefault` callback is deprecated. Please call `event.preventDefault` directly.');
}
prevented = true;
});
if (!event.defaultPrevented && !prevented) {
switch (event.key) {
case 'Escape':
onOpenChange(false, {
index: index
});
break;
case 'Enter':
if (!open) {
onOpenChange(true);
}
break;
}
}
}
}, postProps === null || postProps === void 0 ? void 0 : postProps({
valueTexts: valueTexts
}));
// ============== Clean Up ==============
Object.keys(inputProps).forEach(function (key) {
if (inputProps[key] === undefined) {
delete inputProps[key];
}
});
return inputProps;
};
return [getInputProps, getText];
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/hooks/useRootProps.js
var propNames = ['onMouseEnter', 'onMouseLeave'];
function useRootProps(props) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return pickProps(props, propNames);
}, [props]);
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/Icon.js
var Icon_excluded = ["icon", "type"],
Icon_excluded2 = ["onClear"];
function Icon_Icon(props) {
var icon = props.icon,
type = props.type,
restProps = (0,objectWithoutProperties["default"])(props, Icon_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls;
return icon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({
className: "".concat(prefixCls, "-").concat(type)
}, restProps), icon) : null;
}
function ClearIcon(_ref) {
var onClear = _ref.onClear,
restProps = (0,objectWithoutProperties["default"])(_ref, Icon_excluded2);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, (0,esm_extends["default"])({}, restProps, {
type: "clear",
role: "button",
onMouseDown: function onMouseDown(e) {
e.preventDefault();
},
onClick: function onClick(e) {
e.stopPropagation();
onClear();
}
}));
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/MaskFormat.js
var FORMAT_KEYS = ['YYYY', 'MM', 'DD', 'HH', 'mm', 'ss', 'SSS'];
// Use Chinese character to avoid conflict with the mask format
var REPLACE_KEY = '顧';
var MaskFormat = /*#__PURE__*/function () {
function MaskFormat(format) {
(0,classCallCheck["default"])(this, MaskFormat);
(0,defineProperty["default"])(this, "format", void 0);
(0,defineProperty["default"])(this, "maskFormat", void 0);
(0,defineProperty["default"])(this, "cells", void 0);
(0,defineProperty["default"])(this, "maskCells", void 0);
this.format = format;
// Generate mask format
var replaceKeys = FORMAT_KEYS.map(function (key) {
return "(".concat(key, ")");
}).join('|');
var replaceReg = new RegExp(replaceKeys, 'g');
this.maskFormat = format.replace(replaceReg,
// Use Chinese character to avoid user use it in format
function (key) {
return REPLACE_KEY.repeat(key.length);
});
// Generate cells
var cellReg = new RegExp("(".concat(FORMAT_KEYS.join('|'), ")"));
var strCells = (format.split(cellReg) || []).filter(function (str) {
return str;
});
var offset = 0;
this.cells = strCells.map(function (text) {
var mask = FORMAT_KEYS.includes(text);
var start = offset;
var end = offset + text.length;
offset = end;
return {
text: text,
mask: mask,
start: start,
end: end
};
});
// Mask cells
this.maskCells = this.cells.filter(function (cell) {
return cell.mask;
});
}
(0,createClass["default"])(MaskFormat, [{
key: "getSelection",
value: function getSelection(maskCellIndex) {
var _ref = this.maskCells[maskCellIndex] || {},
start = _ref.start,
end = _ref.end;
return [start || 0, end || 0];
}
/** Check given text match format */
}, {
key: "match",
value: function match(text) {
for (var i = 0; i < this.maskFormat.length; i += 1) {
var maskChar = this.maskFormat[i];
var textChar = text[i];
if (!textChar || maskChar !== REPLACE_KEY && maskChar !== textChar) {
return false;
}
}
return true;
}
/** Get mask cell count */
}, {
key: "size",
value: function size() {
return this.maskCells.length;
}
}, {
key: "getMaskCellIndex",
value: function getMaskCellIndex(anchorIndex) {
var closetDist = Number.MAX_SAFE_INTEGER;
var closetIndex = 0;
for (var i = 0; i < this.maskCells.length; i += 1) {
var _this$maskCells$i = this.maskCells[i],
start = _this$maskCells$i.start,
end = _this$maskCells$i.end;
if (anchorIndex >= start && anchorIndex <= end) {
return i;
}
var dist = Math.min(Math.abs(anchorIndex - start), Math.abs(anchorIndex - end));
if (dist < closetDist) {
closetDist = dist;
closetIndex = i;
}
}
return closetIndex;
}
}]);
return MaskFormat;
}();
;// ./node_modules/rc-picker/es/PickerInput/Selector/util.js
function getMaskRange(key) {
var PresetRange = {
YYYY: [0, 9999, new Date().getFullYear()],
MM: [1, 12],
DD: [1, 31],
HH: [0, 23],
mm: [0, 59],
ss: [0, 59],
SSS: [0, 999]
};
return PresetRange[key];
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/Input.js
var Input_excluded = ["active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"];
// Format logic
//
// First time on focus:
// 1. check if the text is valid, if not fill with format
// 2. set highlight cell to the first cell
// Cells
// 1. Selection the index cell, set inner `cacheValue` to ''
// 2. Key input filter non-number char, patch after the `cacheValue`
// 1. Replace the `cacheValue` with input align the cell length
// 2. Re-selection the mask cell
// 3. If `cacheValue` match the limit length or cell format (like 1 ~ 12 month), go to next cell
var Selector_Input_Input = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var active = props.active,
_props$showActiveCls = props.showActiveCls,
showActiveCls = _props$showActiveCls === void 0 ? true : _props$showActiveCls,
suffixIcon = props.suffixIcon,
format = props.format,
validateFormat = props.validateFormat,
onChange = props.onChange,
onInput = props.onInput,
helped = props.helped,
onHelp = props.onHelp,
onSubmit = props.onSubmit,
onKeyDown = props.onKeyDown,
_props$preserveInvali = props.preserveInvalidOnBlur,
preserveInvalidOnBlur = _props$preserveInvali === void 0 ? false : _props$preserveInvali,
invalid = props.invalid,
clearIcon = props.clearIcon,
restProps = (0,objectWithoutProperties["default"])(props, Input_excluded);
var value = props.value,
onFocus = props.onFocus,
onBlur = props.onBlur,
onMouseUp = props.onMouseUp;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls,
_React$useContext$inp = _React$useContext.input,
Component = _React$useContext$inp === void 0 ? 'input' : _React$useContext$inp;
var inputPrefixCls = "".concat(prefixCls, "-input");
// ======================== Value =========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
focused = _React$useState2[0],
setFocused = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
internalInputValue = _React$useState4[0],
setInputValue = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(''),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
focusCellText = _React$useState6[0],
setFocusCellText = _React$useState6[1];
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
focusCellIndex = _React$useState8[0],
setFocusCellIndex = _React$useState8[1];
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
forceSelectionSyncMark = _React$useState10[0],
forceSelectionSync = _React$useState10[1];
var inputValue = internalInputValue || '';
// Sync value if needed
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setInputValue(value);
}, [value]);
// ========================= Refs =========================
var holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: holderRef.current,
inputElement: inputRef.current,
focus: function focus(options) {
inputRef.current.focus(options);
},
blur: function blur() {
inputRef.current.blur();
}
};
});
// ======================== Format ========================
var maskFormat = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return new MaskFormat(format || '');
}, [format]);
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (helped) {
return [0, 0];
}
return maskFormat.getSelection(focusCellIndex);
}, [maskFormat, focusCellIndex, helped]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
selectionStart = _React$useMemo2[0],
selectionEnd = _React$useMemo2[1];
// ======================== Modify ========================
// When input modify content, trigger `onHelp` if is not the format
var onModify = function onModify(text) {
if (text && text !== format && text !== value) {
onHelp();
}
};
// ======================== Change ========================
/**
* Triggered by paste, keyDown and focus to show format
*/
var triggerInputChange = (0,rc_util_es.useEvent)(function (text) {
if (validateFormat(text)) {
onChange(text);
}
setInputValue(text);
onModify(text);
});
// Directly trigger `onChange` if `format` is empty
var onInternalChange = function onInternalChange(event) {
// Hack `onChange` with format to do nothing
if (!format) {
var text = event.target.value;
onModify(text);
setInputValue(text);
onChange(text);
}
};
var onFormatPaste = function onFormatPaste(event) {
// Get paste text
var pasteText = event.clipboardData.getData('text');
if (validateFormat(pasteText)) {
triggerInputChange(pasteText);
}
};
// ======================== Mouse =========================
// When `mouseDown` get focus, it's better to not to change the selection
// Since the up position maybe not is the first cell
var mouseDownRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var onFormatMouseDown = function onFormatMouseDown() {
mouseDownRef.current = true;
};
var onFormatMouseUp = function onFormatMouseUp(event) {
var _ref = event.target,
start = _ref.selectionStart;
var closeMaskIndex = maskFormat.getMaskCellIndex(start);
setFocusCellIndex(closeMaskIndex);
// Force update the selection
forceSelectionSync({});
onMouseUp === null || onMouseUp === void 0 || onMouseUp(event);
mouseDownRef.current = false;
};
// ====================== Focus Blur ======================
var onFormatFocus = function onFormatFocus(event) {
setFocused(true);
setFocusCellIndex(0);
setFocusCellText('');
onFocus(event);
};
var onSharedBlur = function onSharedBlur(event) {
onBlur(event);
};
var onFormatBlur = function onFormatBlur(event) {
setFocused(false);
onSharedBlur(event);
};
// ======================== Active ========================
// Check if blur need reset input value
useLockEffect(active, function () {
if (!active && !preserveInvalidOnBlur) {
setInputValue(value);
}
});
// ======================= Keyboard =======================
var onSharedKeyDown = function onSharedKeyDown(event) {
if (event.key === 'Enter' && validateFormat(inputValue)) {
onSubmit();
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
};
var onFormatKeyDown = function onFormatKeyDown(event) {
onSharedKeyDown(event);
var key = event.key;
// Save the cache with cell text
var nextCellText = null;
// Fill in the input
var nextFillText = null;
var maskCellLen = selectionEnd - selectionStart;
var cellFormat = format.slice(selectionStart, selectionEnd);
// Cell Index
var offsetCellIndex = function offsetCellIndex(offset) {
setFocusCellIndex(function (idx) {
var nextIndex = idx + offset;
nextIndex = Math.max(nextIndex, 0);
nextIndex = Math.min(nextIndex, maskFormat.size() - 1);
return nextIndex;
});
};
// Range
var offsetCellValue = function offsetCellValue(offset) {
var _getMaskRange = getMaskRange(cellFormat),
_getMaskRange2 = (0,slicedToArray["default"])(_getMaskRange, 3),
rangeStart = _getMaskRange2[0],
rangeEnd = _getMaskRange2[1],
rangeDefault = _getMaskRange2[2];
var currentText = inputValue.slice(selectionStart, selectionEnd);
var currentTextNum = Number(currentText);
if (isNaN(currentTextNum)) {
return String(rangeDefault ? rangeDefault : offset > 0 ? rangeStart : rangeEnd);
}
var num = currentTextNum + offset;
var range = rangeEnd - rangeStart + 1;
return String(rangeStart + (range + num - rangeStart) % range);
};
switch (key) {
// =============== Remove ===============
case 'Backspace':
case 'Delete':
nextCellText = '';
nextFillText = cellFormat;
break;
// =============== Arrows ===============
// Left key
case 'ArrowLeft':
nextCellText = '';
offsetCellIndex(-1);
break;
// Right key
case 'ArrowRight':
nextCellText = '';
offsetCellIndex(1);
break;
// Up key
case 'ArrowUp':
nextCellText = '';
nextFillText = offsetCellValue(1);
break;
// Down key
case 'ArrowDown':
nextCellText = '';
nextFillText = offsetCellValue(-1);
break;
// =============== Number ===============
default:
if (!isNaN(Number(key))) {
nextCellText = focusCellText + key;
nextFillText = nextCellText;
}
break;
}
// Update cell text
if (nextCellText !== null) {
setFocusCellText(nextCellText);
if (nextCellText.length >= maskCellLen) {
// Go to next cell
offsetCellIndex(1);
setFocusCellText('');
}
}
// Update the input text
if (nextFillText !== null) {
// Replace selection range with `nextCellText`
var nextFocusValue =
// before
inputValue.slice(0, selectionStart) +
// replace
leftPad(nextFillText, maskCellLen) +
// after
inputValue.slice(selectionEnd);
triggerInputChange(nextFocusValue.slice(0, format.length));
}
// Always trigger selection sync after key down
forceSelectionSync({});
};
// ======================== Format ========================
var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
(0,useLayoutEffect["default"])(function () {
if (!focused || !format || mouseDownRef.current) {
return;
}
// Reset with format if not match
if (!maskFormat.match(inputValue)) {
triggerInputChange(format);
return;
}
// Match the selection range
inputRef.current.setSelectionRange(selectionStart, selectionEnd);
// Chrome has the bug anchor position looks not correct but actually correct
rafRef.current = (0,raf["default"])(function () {
inputRef.current.setSelectionRange(selectionStart, selectionEnd);
});
return function () {
raf["default"].cancel(rafRef.current);
};
}, [maskFormat, format, focused, inputValue, focusCellIndex, selectionStart, selectionEnd, forceSelectionSyncMark, triggerInputChange]);
// ======================== Render ========================
// Input props for format
var inputProps = format ? {
onFocus: onFormatFocus,
onBlur: onFormatBlur,
onKeyDown: onFormatKeyDown,
onMouseDown: onFormatMouseDown,
onMouseUp: onFormatMouseUp,
onPaste: onFormatPaste
} : {};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: holderRef,
className: classnames_default()(inputPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({
ref: inputRef,
"aria-invalid": invalid,
autoComplete: "off"
}, restProps, {
onKeyDown: onSharedKeyDown,
onBlur: onSharedBlur
// Replace with format
}, inputProps, {
// Value
value: inputValue,
onChange: onInternalChange
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, {
type: "suffix",
icon: suffixIcon
}), clearIcon);
});
if (true) {
Selector_Input_Input.displayName = 'Input';
}
/* harmony default export */ var PickerInput_Selector_Input = (Selector_Input_Input);
;// ./node_modules/rc-picker/es/PickerInput/Selector/RangeSelector.js
var RangeSelector_excluded = ["id", "prefix", "clearIcon", "suffixIcon", "separator", "activeIndex", "activeHelp", "allHelp", "focused", "onFocus", "onBlur", "onKeyDown", "locale", "generateConfig", "placeholder", "className", "style", "onClick", "onClear", "value", "onChange", "onSubmit", "onInputChange", "format", "maskFormat", "preserveInvalidOnBlur", "onInvalid", "disabled", "invalid", "inputReadOnly", "direction", "onOpenChange", "onActiveInfo", "placement", "onMouseDown", "required", "aria-required", "autoFocus", "tabIndex"],
RangeSelector_excluded2 = ["index"];
function RangeSelector(props, ref) {
var id = props.id,
prefix = props.prefix,
clearIcon = props.clearIcon,
suffixIcon = props.suffixIcon,
_props$separator = props.separator,
separator = _props$separator === void 0 ? '~' : _props$separator,
activeIndex = props.activeIndex,
activeHelp = props.activeHelp,
allHelp = props.allHelp,
focused = props.focused,
onFocus = props.onFocus,
onBlur = props.onBlur,
onKeyDown = props.onKeyDown,
locale = props.locale,
generateConfig = props.generateConfig,
placeholder = props.placeholder,
className = props.className,
style = props.style,
onClick = props.onClick,
onClear = props.onClear,
value = props.value,
onChange = props.onChange,
onSubmit = props.onSubmit,
onInputChange = props.onInputChange,
format = props.format,
maskFormat = props.maskFormat,
preserveInvalidOnBlur = props.preserveInvalidOnBlur,
onInvalid = props.onInvalid,
disabled = props.disabled,
invalid = props.invalid,
inputReadOnly = props.inputReadOnly,
direction = props.direction,
onOpenChange = props.onOpenChange,
onActiveInfo = props.onActiveInfo,
placement = props.placement,
_onMouseDown = props.onMouseDown,
required = props.required,
ariaRequired = props['aria-required'],
autoFocus = props.autoFocus,
tabIndex = props.tabIndex,
restProps = (0,objectWithoutProperties["default"])(props, RangeSelector_excluded);
var rtl = direction === 'rtl';
// ======================== Prefix ========================
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls;
// ========================== Id ==========================
var ids = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (typeof id === 'string') {
return [id];
}
var mergedId = id || {};
return [mergedId.start, mergedId.end];
}, [id]);
// ========================= Refs =========================
var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var inputStartRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var inputEndRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var getInput = function getInput(index) {
var _index;
return (_index = [inputStartRef, inputEndRef][index]) === null || _index === void 0 ? void 0 : _index.current;
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: rootRef.current,
focus: function focus(options) {
if ((0,esm_typeof["default"])(options) === 'object') {
var _getInput;
var _ref = options || {},
_ref$index = _ref.index,
_index2 = _ref$index === void 0 ? 0 : _ref$index,
rest = (0,objectWithoutProperties["default"])(_ref, RangeSelector_excluded2);
(_getInput = getInput(_index2)) === null || _getInput === void 0 || _getInput.focus(rest);
} else {
var _getInput2;
(_getInput2 = getInput(options !== null && options !== void 0 ? options : 0)) === null || _getInput2 === void 0 || _getInput2.focus();
}
},
blur: function blur() {
var _getInput3, _getInput4;
(_getInput3 = getInput(0)) === null || _getInput3 === void 0 || _getInput3.blur();
(_getInput4 = getInput(1)) === null || _getInput4 === void 0 || _getInput4.blur();
}
};
});
// ======================== Props =========================
var rootProps = useRootProps(restProps);
// ===================== Placeholder ======================
var mergedPlaceholder = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return Array.isArray(placeholder) ? placeholder : [placeholder, placeholder];
}, [placeholder]);
// ======================== Inputs ========================
var _useInputProps = useInputProps((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
id: ids,
placeholder: mergedPlaceholder
})),
_useInputProps2 = (0,slicedToArray["default"])(_useInputProps, 1),
getInputProps = _useInputProps2[0];
// ====================== ActiveBar =======================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({
position: 'absolute',
width: 0
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
activeBarStyle = _React$useState2[0],
setActiveBarStyle = _React$useState2[1];
var syncActiveOffset = (0,rc_util_es.useEvent)(function () {
var input = getInput(activeIndex);
if (input) {
var inputRect = input.nativeElement.getBoundingClientRect();
var parentRect = rootRef.current.getBoundingClientRect();
var rectOffset = inputRect.left - parentRect.left;
setActiveBarStyle(function (ori) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, ori), {}, {
width: inputRect.width,
left: rectOffset
});
});
onActiveInfo([inputRect.left, inputRect.right, parentRect.width]);
}
});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
syncActiveOffset();
}, [activeIndex]);
// ======================== Clear =========================
var showClear = clearIcon && (value[0] && !disabled[0] || value[1] && !disabled[1]);
// ======================= Disabled =======================
var startAutoFocus = autoFocus && !disabled[0];
var endAutoFocus = autoFocus && !startAutoFocus && !disabled[1];
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: syncActiveOffset
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, rootProps, {
className: classnames_default()(prefixCls, "".concat(prefixCls, "-range"), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled.every(function (i) {
return i;
})), "".concat(prefixCls, "-invalid"), invalid.some(function (i) {
return i;
})), "".concat(prefixCls, "-rtl"), rtl), className),
style: style,
ref: rootRef,
onClick: onClick
// Not lose current input focus
,
onMouseDown: function onMouseDown(e) {
var target = e.target;
if (target !== inputStartRef.current.inputElement && target !== inputEndRef.current.inputElement) {
e.preventDefault();
}
_onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(e);
}
}), prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-prefix")
}, prefix), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_Input, (0,esm_extends["default"])({
ref: inputStartRef
}, getInputProps(0), {
autoFocus: startAutoFocus,
tabIndex: tabIndex,
"date-range": "start"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-range-separator")
}, separator), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_Input, (0,esm_extends["default"])({
ref: inputEndRef
}, getInputProps(1), {
autoFocus: endAutoFocus,
tabIndex: tabIndex,
"date-range": "end"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-active-bar"),
style: activeBarStyle
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, {
type: "suffix",
icon: suffixIcon
}), showClear && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ClearIcon, {
icon: clearIcon,
onClear: onClear
})));
}
var RefRangeSelector = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RangeSelector);
if (true) {
RefRangeSelector.displayName = 'RangeSelector';
}
/* harmony default export */ var Selector_RangeSelector = (RefRangeSelector);
;// ./node_modules/rc-picker/es/PickerInput/RangePicker.js
function separateConfig(config, defaultConfig) {
var singleConfig = config !== null && config !== void 0 ? config : defaultConfig;
if (Array.isArray(singleConfig)) {
return singleConfig;
}
return [singleConfig, singleConfig];
}
/** Used for change event, it should always be not undefined */
function getActiveRange(activeIndex) {
return activeIndex === 1 ? 'end' : 'start';
}
function RangePicker(props, ref) {
// ========================= Prop =========================
var _useFilledProps = useFilledProps(props, function () {
var disabled = props.disabled,
allowEmpty = props.allowEmpty;
var mergedDisabled = separateConfig(disabled, false);
var mergedAllowEmpty = separateConfig(allowEmpty, false);
return {
disabled: mergedDisabled,
allowEmpty: mergedAllowEmpty
};
}),
_useFilledProps2 = (0,slicedToArray["default"])(_useFilledProps, 6),
filledProps = _useFilledProps2[0],
internalPicker = _useFilledProps2[1],
complexPicker = _useFilledProps2[2],
formatList = _useFilledProps2[3],
maskFormat = _useFilledProps2[4],
isInvalidateDate = _useFilledProps2[5];
var prefixCls = filledProps.prefixCls,
styles = filledProps.styles,
classNames = filledProps.classNames,
defaultValue = filledProps.defaultValue,
value = filledProps.value,
needConfirm = filledProps.needConfirm,
onKeyDown = filledProps.onKeyDown,
disabled = filledProps.disabled,
allowEmpty = filledProps.allowEmpty,
disabledDate = filledProps.disabledDate,
minDate = filledProps.minDate,
maxDate = filledProps.maxDate,
defaultOpen = filledProps.defaultOpen,
open = filledProps.open,
onOpenChange = filledProps.onOpenChange,
locale = filledProps.locale,
generateConfig = filledProps.generateConfig,
picker = filledProps.picker,
showNow = filledProps.showNow,
showToday = filledProps.showToday,
showTime = filledProps.showTime,
mode = filledProps.mode,
onPanelChange = filledProps.onPanelChange,
onCalendarChange = filledProps.onCalendarChange,
onOk = filledProps.onOk,
defaultPickerValue = filledProps.defaultPickerValue,
pickerValue = filledProps.pickerValue,
onPickerValueChange = filledProps.onPickerValueChange,
inputReadOnly = filledProps.inputReadOnly,
suffixIcon = filledProps.suffixIcon,
onFocus = filledProps.onFocus,
onBlur = filledProps.onBlur,
presets = filledProps.presets,
ranges = filledProps.ranges,
components = filledProps.components,
cellRender = filledProps.cellRender,
dateRender = filledProps.dateRender,
monthCellRender = filledProps.monthCellRender,
onClick = filledProps.onClick;
// ========================= Refs =========================
var selectorRef = usePickerRef(ref);
// ========================= Open =========================
var _useOpen = useOpen(open, defaultOpen, disabled, onOpenChange),
_useOpen2 = (0,slicedToArray["default"])(_useOpen, 2),
mergedOpen = _useOpen2[0],
setMergeOpen = _useOpen2[1];
var triggerOpen = function triggerOpen(nextOpen, config) {
// No need to open if all disabled
if (disabled.some(function (fieldDisabled) {
return !fieldDisabled;
}) || !nextOpen) {
setMergeOpen(nextOpen, config);
}
};
// ======================== Values ========================
var _useInnerValue = useInnerValue(generateConfig, locale, formatList, true, false, defaultValue, value, onCalendarChange, onOk),
_useInnerValue2 = (0,slicedToArray["default"])(_useInnerValue, 5),
mergedValue = _useInnerValue2[0],
setInnerValue = _useInnerValue2[1],
getCalendarValue = _useInnerValue2[2],
triggerCalendarChange = _useInnerValue2[3],
triggerOk = _useInnerValue2[4];
var calendarValue = getCalendarValue();
// ======================== Active ========================
var _useRangeActive = useRangeActive(disabled, allowEmpty, mergedOpen),
_useRangeActive2 = (0,slicedToArray["default"])(_useRangeActive, 9),
focused = _useRangeActive2[0],
triggerFocus = _useRangeActive2[1],
lastOperation = _useRangeActive2[2],
activeIndex = _useRangeActive2[3],
setActiveIndex = _useRangeActive2[4],
nextActiveIndex = _useRangeActive2[5],
activeIndexList = _useRangeActive2[6],
updateSubmitIndex = _useRangeActive2[7],
hasActiveSubmitValue = _useRangeActive2[8];
var onSharedFocus = function onSharedFocus(event, index) {
triggerFocus(true);
onFocus === null || onFocus === void 0 || onFocus(event, {
range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)
});
};
var onSharedBlur = function onSharedBlur(event, index) {
triggerFocus(false);
onBlur === null || onBlur === void 0 || onBlur(event, {
range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)
});
};
// ======================= ShowTime =======================
/** Used for Popup panel */
var mergedShowTime = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!showTime) {
return null;
}
var disabledTime = showTime.disabledTime;
var proxyDisabledTime = disabledTime ? function (date) {
var range = getActiveRange(activeIndex);
var fromDate = getFromDate(calendarValue, activeIndexList, activeIndex);
return disabledTime(date, range, {
from: fromDate
});
} : undefined;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, showTime), {}, {
disabledTime: proxyDisabledTime
});
}, [showTime, activeIndex, calendarValue, activeIndexList]);
// ========================= Mode =========================
var _useMergedState = (0,rc_util_es.useMergedState)([picker, picker], {
value: mode
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
modes = _useMergedState2[0],
setModes = _useMergedState2[1];
var mergedMode = modes[activeIndex] || picker;
/** Extends from `mergedMode` to patch `datetime` mode */
var internalMode = mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;
// ====================== PanelCount ======================
var multiplePanel = internalMode === picker && internalMode !== 'time';
// ======================= Show Now =======================
var mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday, true);
// ======================== Value =========================
var _useRangeValue = useRangeValue(filledProps, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, mergedOpen, isInvalidateDate),
_useRangeValue2 = (0,slicedToArray["default"])(_useRangeValue, 2),
/** Trigger `onChange` by check `disabledDate` */
flushSubmit = _useRangeValue2[0],
/** Trigger `onChange` directly without check `disabledDate` */
triggerSubmitChange = _useRangeValue2[1];
// ===================== DisabledDate =====================
var mergedDisabledDate = useRangeDisabledDate(calendarValue, disabled, activeIndexList, generateConfig, locale, disabledDate);
// ======================= Validate =======================
var _useFieldsInvalidate = useFieldsInvalidate(calendarValue, isInvalidateDate, allowEmpty),
_useFieldsInvalidate2 = (0,slicedToArray["default"])(_useFieldsInvalidate, 2),
submitInvalidates = _useFieldsInvalidate2[0],
onSelectorInvalid = _useFieldsInvalidate2[1];
// ===================== Picker Value =====================
var _useRangePickerValue = useRangePickerValue(generateConfig, locale, calendarValue, modes, mergedOpen, activeIndex, internalPicker, multiplePanel, defaultPickerValue, pickerValue, mergedShowTime === null || mergedShowTime === void 0 ? void 0 : mergedShowTime.defaultOpenValue, onPickerValueChange, minDate, maxDate),
_useRangePickerValue2 = (0,slicedToArray["default"])(_useRangePickerValue, 2),
currentPickerValue = _useRangePickerValue2[0],
setCurrentPickerValue = _useRangePickerValue2[1];
// >>> Mode need wait for `pickerValue`
var triggerModeChange = (0,rc_util_es.useEvent)(function (nextPickerValue, nextMode, triggerEvent) {
var clone = fillIndex(modes, activeIndex, nextMode);
if (clone[0] !== modes[0] || clone[1] !== modes[1]) {
setModes(clone);
}
// Compatible with `onPanelChange`
if (onPanelChange && triggerEvent !== false) {
var clonePickerValue = (0,toConsumableArray["default"])(calendarValue);
if (nextPickerValue) {
clonePickerValue[activeIndex] = nextPickerValue;
}
onPanelChange(clonePickerValue, clone);
}
});
// ======================== Change ========================
var fillCalendarValue = function fillCalendarValue(date, index) {
return (
// Trigger change only when date changed
fillIndex(calendarValue, index, date)
);
};
// ======================== Submit ========================
/**
* Trigger by confirm operation.
* This function has already handle the `needConfirm` check logic.
* - Selector: enter key
* - Panel: OK button
*/
var triggerPartConfirm = function triggerPartConfirm(date, skipFocus) {
var nextValue = calendarValue;
if (date) {
nextValue = fillCalendarValue(date, activeIndex);
}
updateSubmitIndex(activeIndex);
// Get next focus index
var nextIndex = nextActiveIndex(nextValue);
// Change calendar value and tell flush it
triggerCalendarChange(nextValue);
flushSubmit(activeIndex, nextIndex === null);
if (nextIndex === null) {
triggerOpen(false, {
force: true
});
} else if (!skipFocus) {
selectorRef.current.focus({
index: nextIndex
});
}
};
// ======================== Click =========================
var onSelectorClick = function onSelectorClick(event) {
var _activeElement;
var rootNode = event.target.getRootNode();
if (!selectorRef.current.nativeElement.contains((_activeElement = rootNode.activeElement) !== null && _activeElement !== void 0 ? _activeElement : document.activeElement)) {
// Click to focus the enabled input
var enabledIndex = disabled.findIndex(function (d) {
return !d;
});
if (enabledIndex >= 0) {
selectorRef.current.focus({
index: enabledIndex
});
}
}
triggerOpen(true);
onClick === null || onClick === void 0 || onClick(event);
};
var onSelectorClear = function onSelectorClear() {
triggerSubmitChange(null);
triggerOpen(false, {
force: true
});
};
// ======================== Hover =========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
hoverSource = _React$useState2[0],
setHoverSource = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
internalHoverValues = _React$useState4[0],
setInternalHoverValues = _React$useState4[1];
var hoverValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return internalHoverValues || calendarValue;
}, [calendarValue, internalHoverValues]);
// Clean up `internalHoverValues` when closed
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!mergedOpen) {
setInternalHoverValues(null);
}
}, [mergedOpen]);
// ========================================================
// == Panels ==
// ========================================================
// Save the offset with active bar position
// const [activeOffset, setActiveOffset] = React.useState(0);
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([0, 0, 0]),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
activeInfo = _React$useState6[0],
setActiveInfo = _React$useState6[1];
// ======================= Presets ========================
var presetList = usePresets(presets, ranges);
var onPresetHover = function onPresetHover(nextValues) {
setInternalHoverValues(nextValues);
setHoverSource('preset');
};
var onPresetSubmit = function onPresetSubmit(nextValues) {
var passed = triggerSubmitChange(nextValues);
if (passed) {
triggerOpen(false, {
force: true
});
}
};
var onNow = function onNow(now) {
triggerPartConfirm(now);
};
// ======================== Panel =========================
var onPanelHover = function onPanelHover(date) {
setInternalHoverValues(date ? fillCalendarValue(date, activeIndex) : null);
setHoverSource('cell');
};
// >>> Focus
var onPanelFocus = function onPanelFocus(event) {
triggerOpen(true);
onSharedFocus(event);
};
// >>> MouseDown
var onPanelMouseDown = function onPanelMouseDown() {
lastOperation('panel');
};
// >>> Calendar
var onPanelSelect = function onPanelSelect(date) {
var clone = fillIndex(calendarValue, activeIndex, date);
// Only trigger calendar event but not update internal `calendarValue` state
triggerCalendarChange(clone);
// >>> Trigger next active if !needConfirm
// Fully logic check `useRangeValue` hook
if (!needConfirm && !complexPicker && internalPicker === internalMode) {
triggerPartConfirm(date);
}
};
// >>> Close
var onPopupClose = function onPopupClose() {
// Close popup
triggerOpen(false);
};
// >>> cellRender
var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender, getActiveRange(activeIndex));
// >>> Value
var panelValue = calendarValue[activeIndex] || null;
// >>> invalid
var isPopupInvalidateDate = (0,rc_util_es.useEvent)(function (date) {
return isInvalidateDate(date, {
activeIndex: activeIndex
});
});
var panelProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var domProps = (0,pickAttrs["default"])(filledProps, false);
var restProps = (0,omit["default"])(filledProps, [].concat((0,toConsumableArray["default"])(Object.keys(domProps)), ['onChange', 'onCalendarChange', 'style', 'className', 'onPanelChange', 'disabledTime']));
return restProps;
}, [filledProps]);
// >>> Render
var panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Popup_Popup, (0,esm_extends["default"])({}, panelProps, {
showNow: mergedShowNow,
showTime: mergedShowTime
// Range
,
range: true,
multiplePanel: multiplePanel,
activeInfo: activeInfo
// Disabled
,
disabledDate: mergedDisabledDate
// Focus
,
onFocus: onPanelFocus,
onBlur: onSharedBlur,
onPanelMouseDown: onPanelMouseDown
// Mode
,
picker: picker,
mode: mergedMode,
internalMode: internalMode,
onPanelChange: triggerModeChange
// Value
,
format: maskFormat,
value: panelValue,
isInvalid: isPopupInvalidateDate,
onChange: null,
onSelect: onPanelSelect
// PickerValue
,
pickerValue: currentPickerValue,
defaultOpenValue: miscUtil_toArray(showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue)[activeIndex],
onPickerValueChange: setCurrentPickerValue
// Hover
,
hoverValue: hoverValues,
onHover: onPanelHover
// Submit
,
needConfirm: needConfirm,
onSubmit: triggerPartConfirm,
onOk: triggerOk
// Preset
,
presets: presetList,
onPresetHover: onPresetHover,
onPresetSubmit: onPresetSubmit
// Now
,
onNow: onNow
// Render
,
cellRender: onInternalCellRender
}));
// ========================================================
// == Selector ==
// ========================================================
// ======================== Change ========================
var onSelectorChange = function onSelectorChange(date, index) {
var clone = fillCalendarValue(date, index);
triggerCalendarChange(clone);
};
var onSelectorInputChange = function onSelectorInputChange() {
lastOperation('input');
};
// ======================= Selector =======================
var onSelectorFocus = function onSelectorFocus(event, index) {
// Check if `needConfirm` but user not submit yet
var activeListLen = activeIndexList.length;
var lastActiveIndex = activeIndexList[activeListLen - 1];
if (activeListLen && lastActiveIndex !== index && needConfirm &&
// Not change index if is not filled
!allowEmpty[lastActiveIndex] && !hasActiveSubmitValue(lastActiveIndex) && calendarValue[lastActiveIndex]) {
selectorRef.current.focus({
index: lastActiveIndex
});
return;
}
lastOperation('input');
triggerOpen(true, {
inherit: true
});
// When click input to switch the field, it will not trigger close.
// Which means it will lose the part confirm and we need fill back.
// ref: https://github.com/ant-design/ant-design/issues/49512
if (activeIndex !== index && mergedOpen && !needConfirm && complexPicker) {
triggerPartConfirm(null, true);
}
setActiveIndex(index);
onSharedFocus(event, index);
};
var onSelectorBlur = function onSelectorBlur(event, index) {
triggerOpen(false);
if (!needConfirm && lastOperation() === 'input') {
var nextIndex = nextActiveIndex(calendarValue);
flushSubmit(activeIndex, nextIndex === null);
}
onSharedBlur(event, index);
};
var onSelectorKeyDown = function onSelectorKeyDown(event, preventDefault) {
if (event.key === 'Tab') {
triggerPartConfirm(null, true);
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, preventDefault);
};
// ======================= Context ========================
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
prefixCls: prefixCls,
locale: locale,
generateConfig: generateConfig,
button: components.button,
input: components.input
};
}, [prefixCls, locale, generateConfig, components.button, components.input]);
// ======================== Effect ========================
// >>> Mode
// Reset for every active
(0,useLayoutEffect["default"])(function () {
if (mergedOpen && activeIndex !== undefined) {
// Legacy compatible. This effect update should not trigger `onPanelChange`
triggerModeChange(null, picker, false);
}
}, [mergedOpen, activeIndex, picker]);
// >>> For complex picker, we need check if need to focus next one
(0,useLayoutEffect["default"])(function () {
var lastOp = lastOperation();
// Trade as confirm on field leave
if (!mergedOpen && lastOp === 'input') {
triggerOpen(false);
triggerPartConfirm(null, true);
}
// Submit with complex picker
if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {
triggerOpen(true);
triggerPartConfirm();
}
}, [mergedOpen]);
// ====================== DevWarning ======================
if (true) {
var isIndexEmpty = function isIndexEmpty(index) {
return (
// Value is empty
!(value !== null && value !== void 0 && value[index]) &&
// DefaultValue is empty
!(defaultValue !== null && defaultValue !== void 0 && defaultValue[index])
);
};
if (disabled.some(function (fieldDisabled, index) {
return fieldDisabled && isIndexEmpty(index) && !allowEmpty[index];
})) {
(0,warning["default"])(false, '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.');
}
}
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_context.Provider, {
value: context
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerTrigger, (0,esm_extends["default"])({}, pickTriggerProps(filledProps), {
popupElement: panel,
popupStyle: styles.popup,
popupClassName: classNames.popup
// Visible
,
visible: mergedOpen,
onClose: onPopupClose
// Range
,
range: true
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_RangeSelector
// Shared
, (0,esm_extends["default"])({}, filledProps, {
// Ref
ref: selectorRef
// Icon
,
suffixIcon: suffixIcon
// Active
,
activeIndex: focused || mergedOpen ? activeIndex : null,
activeHelp: !!internalHoverValues,
allHelp: !!internalHoverValues && hoverSource === 'preset',
focused: focused,
onFocus: onSelectorFocus,
onBlur: onSelectorBlur,
onKeyDown: onSelectorKeyDown,
onSubmit: triggerPartConfirm
// Change
,
value: hoverValues,
maskFormat: maskFormat,
onChange: onSelectorChange,
onInputChange: onSelectorInputChange
// Format
,
format: formatList,
inputReadOnly: inputReadOnly
// Disabled
,
disabled: disabled
// Open
,
open: mergedOpen,
onOpenChange: triggerOpen
// Click
,
onClick: onSelectorClick,
onClear: onSelectorClear
// Invalid
,
invalid: submitInvalidates,
onInvalid: onSelectorInvalid
// Offset
,
onActiveInfo: setActiveInfo
}))));
}
var RefRangePicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RangePicker);
if (true) {
RefRangePicker.displayName = 'RefRangePicker';
}
/* harmony default export */ var PickerInput_RangePicker = (RefRangePicker);
;// ./node_modules/rc-picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js
function MultipleDates(props) {
var prefixCls = props.prefixCls,
value = props.value,
onRemove = props.onRemove,
_props$removeIcon = props.removeIcon,
removeIcon = _props$removeIcon === void 0 ? '×' : _props$removeIcon,
formatDate = props.formatDate,
disabled = props.disabled,
maxTagCount = props.maxTagCount,
placeholder = props.placeholder;
var selectorCls = "".concat(prefixCls, "-selector");
var selectionCls = "".concat(prefixCls, "-selection");
var overflowCls = "".concat(selectionCls, "-overflow");
// ========================= Item =========================
function renderSelector(content, onClose) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()("".concat(selectionCls, "-item")),
title: typeof content === 'string' ? content : null
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(selectionCls, "-item-content")
}, content), !disabled && onClose && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
onMouseDown: function onMouseDown(e) {
e.preventDefault();
},
onClick: onClose,
className: "".concat(selectionCls, "-item-remove")
}, removeIcon));
}
function renderItem(date) {
var displayLabel = formatDate(date);
var onClose = function onClose(event) {
if (event) event.stopPropagation();
onRemove(date);
};
return renderSelector(displayLabel, onClose);
}
// ========================= Rest =========================
function renderRest(omittedValues) {
var content = "+ ".concat(omittedValues.length, " ...");
return renderSelector(content);
}
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: selectorCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es, {
prefixCls: overflowCls,
data: value,
renderItem: renderItem,
renderRest: renderRest
// suffix={inputNode}
,
itemKey: function itemKey(date) {
return formatDate(date);
},
maxCount: maxTagCount
}), !value.length && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-selection-placeholder")
}, placeholder));
}
;// ./node_modules/rc-picker/es/PickerInput/Selector/SingleSelector/index.js
var SingleSelector_excluded = ["id", "open", "prefix", "clearIcon", "suffixIcon", "activeHelp", "allHelp", "focused", "onFocus", "onBlur", "onKeyDown", "locale", "generateConfig", "placeholder", "className", "style", "onClick", "onClear", "internalPicker", "value", "onChange", "onSubmit", "onInputChange", "multiple", "maxTagCount", "format", "maskFormat", "preserveInvalidOnBlur", "onInvalid", "disabled", "invalid", "inputReadOnly", "direction", "onOpenChange", "onMouseDown", "required", "aria-required", "autoFocus", "tabIndex", "removeIcon"];
function SingleSelector_SingleSelector(props, ref) {
var id = props.id,
open = props.open,
prefix = props.prefix,
clearIcon = props.clearIcon,
suffixIcon = props.suffixIcon,
activeHelp = props.activeHelp,
allHelp = props.allHelp,
focused = props.focused,
onFocus = props.onFocus,
onBlur = props.onBlur,
onKeyDown = props.onKeyDown,
locale = props.locale,
generateConfig = props.generateConfig,
placeholder = props.placeholder,
className = props.className,
style = props.style,
onClick = props.onClick,
onClear = props.onClear,
internalPicker = props.internalPicker,
value = props.value,
onChange = props.onChange,
onSubmit = props.onSubmit,
onInputChange = props.onInputChange,
multiple = props.multiple,
maxTagCount = props.maxTagCount,
format = props.format,
maskFormat = props.maskFormat,
preserveInvalidOnBlur = props.preserveInvalidOnBlur,
onInvalid = props.onInvalid,
disabled = props.disabled,
invalid = props.invalid,
inputReadOnly = props.inputReadOnly,
direction = props.direction,
onOpenChange = props.onOpenChange,
_onMouseDown = props.onMouseDown,
required = props.required,
ariaRequired = props['aria-required'],
autoFocus = props.autoFocus,
tabIndex = props.tabIndex,
removeIcon = props.removeIcon,
restProps = (0,objectWithoutProperties["default"])(props, SingleSelector_excluded);
var rtl = direction === 'rtl';
// ======================== Prefix ========================
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
prefixCls = _React$useContext.prefixCls;
// ========================= Refs =========================
var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: rootRef.current,
focus: function focus(options) {
var _inputRef$current;
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus(options);
},
blur: function blur() {
var _inputRef$current2;
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.blur();
}
};
});
// ======================== Props =========================
var rootProps = useRootProps(restProps);
// ======================== Change ========================
var onSingleChange = function onSingleChange(date) {
onChange([date]);
};
var onMultipleRemove = function onMultipleRemove(date) {
var nextValues = value.filter(function (oriDate) {
return oriDate && !isSame(generateConfig, locale, oriDate, date, internalPicker);
});
onChange(nextValues);
// When `open`, it means user is operating the
if (!open) {
onSubmit();
}
};
// ======================== Inputs ========================
var _useInputProps = useInputProps((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
onChange: onSingleChange
}), function (_ref) {
var valueTexts = _ref.valueTexts;
return {
value: valueTexts[0] || '',
active: focused
};
}),
_useInputProps2 = (0,slicedToArray["default"])(_useInputProps, 2),
getInputProps = _useInputProps2[0],
getText = _useInputProps2[1];
// ======================== Clear =========================
var showClear = !!(clearIcon && value.length && !disabled);
// ======================= Multiple =======================
var selectorNode = multiple ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MultipleDates, {
prefixCls: prefixCls,
value: value,
onRemove: onMultipleRemove,
formatDate: getText,
maxTagCount: maxTagCount,
disabled: disabled,
removeIcon: removeIcon,
placeholder: placeholder
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", {
className: "".concat(prefixCls, "-multiple-input"),
value: value.map(getText).join(','),
ref: inputRef,
readOnly: true,
autoFocus: autoFocus,
tabIndex: tabIndex
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, {
type: "suffix",
icon: suffixIcon
}), showClear && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ClearIcon, {
icon: clearIcon,
onClear: onClear
})) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_Input, (0,esm_extends["default"])({
ref: inputRef
}, getInputProps(), {
autoFocus: autoFocus,
tabIndex: tabIndex,
suffixIcon: suffixIcon,
clearIcon: showClear && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ClearIcon, {
icon: clearIcon,
onClear: onClear
}),
showActiveCls: false
}));
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, rootProps, {
className: classnames_default()(prefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-invalid"), invalid), "".concat(prefixCls, "-rtl"), rtl), className),
style: style,
ref: rootRef,
onClick: onClick
// Not lose current input focus
,
onMouseDown: function onMouseDown(e) {
var _inputRef$current3;
var target = e.target;
if (target !== ((_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.inputElement)) {
e.preventDefault();
}
_onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(e);
}
}), prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-prefix")
}, prefix), selectorNode);
}
var RefSingleSelector = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SingleSelector_SingleSelector);
if (true) {
RefSingleSelector.displayName = 'SingleSelector';
}
/* harmony default export */ var PickerInput_Selector_SingleSelector = (RefSingleSelector);
;// ./node_modules/rc-picker/es/PickerInput/SinglePicker.js
// TODO: isInvalidateDate with showTime.disabledTime should not provide `range` prop
/** Internal usage. For cross function get same aligned props */
function Picker(props, ref) {
// ========================= Prop =========================
var _useFilledProps = useFilledProps(props),
_useFilledProps2 = (0,slicedToArray["default"])(_useFilledProps, 6),
filledProps = _useFilledProps2[0],
internalPicker = _useFilledProps2[1],
complexPicker = _useFilledProps2[2],
formatList = _useFilledProps2[3],
maskFormat = _useFilledProps2[4],
isInvalidateDate = _useFilledProps2[5];
var _ref = filledProps,
prefixCls = _ref.prefixCls,
styles = _ref.styles,
classNames = _ref.classNames,
order = _ref.order,
defaultValue = _ref.defaultValue,
value = _ref.value,
needConfirm = _ref.needConfirm,
onChange = _ref.onChange,
onKeyDown = _ref.onKeyDown,
disabled = _ref.disabled,
disabledDate = _ref.disabledDate,
minDate = _ref.minDate,
maxDate = _ref.maxDate,
defaultOpen = _ref.defaultOpen,
open = _ref.open,
onOpenChange = _ref.onOpenChange,
locale = _ref.locale,
generateConfig = _ref.generateConfig,
picker = _ref.picker,
showNow = _ref.showNow,
showToday = _ref.showToday,
showTime = _ref.showTime,
mode = _ref.mode,
onPanelChange = _ref.onPanelChange,
onCalendarChange = _ref.onCalendarChange,
onOk = _ref.onOk,
multiple = _ref.multiple,
defaultPickerValue = _ref.defaultPickerValue,
pickerValue = _ref.pickerValue,
onPickerValueChange = _ref.onPickerValueChange,
inputReadOnly = _ref.inputReadOnly,
suffixIcon = _ref.suffixIcon,
removeIcon = _ref.removeIcon,
onFocus = _ref.onFocus,
onBlur = _ref.onBlur,
presets = _ref.presets,
components = _ref.components,
cellRender = _ref.cellRender,
dateRender = _ref.dateRender,
monthCellRender = _ref.monthCellRender,
onClick = _ref.onClick;
// ========================= Refs =========================
var selectorRef = usePickerRef(ref);
// ========================= Util =========================
function pickerParam(values) {
if (values === null) {
return null;
}
return multiple ? values : values[0];
}
var toggleDates = useToggleDates(generateConfig, locale, internalPicker);
// ========================= Open =========================
var _useOpen = useOpen(open, defaultOpen, [disabled], onOpenChange),
_useOpen2 = (0,slicedToArray["default"])(_useOpen, 2),
mergedOpen = _useOpen2[0],
triggerOpen = _useOpen2[1];
// ======================= Calendar =======================
var onInternalCalendarChange = function onInternalCalendarChange(dates, dateStrings, info) {
if (onCalendarChange) {
var filteredInfo = (0,objectSpread2["default"])({}, info);
delete filteredInfo.range;
onCalendarChange(pickerParam(dates), pickerParam(dateStrings), filteredInfo);
}
};
var onInternalOk = function onInternalOk(dates) {
onOk === null || onOk === void 0 || onOk(pickerParam(dates));
};
// ======================== Values ========================
var _useInnerValue = useInnerValue(generateConfig, locale, formatList, false, order, defaultValue, value, onInternalCalendarChange, onInternalOk),
_useInnerValue2 = (0,slicedToArray["default"])(_useInnerValue, 5),
mergedValue = _useInnerValue2[0],
setInnerValue = _useInnerValue2[1],
getCalendarValue = _useInnerValue2[2],
triggerCalendarChange = _useInnerValue2[3],
triggerOk = _useInnerValue2[4];
var calendarValue = getCalendarValue();
// ======================== Active ========================
// In SinglePicker, we will always get `activeIndex` is 0.
var _useRangeActive = useRangeActive([disabled]),
_useRangeActive2 = (0,slicedToArray["default"])(_useRangeActive, 4),
focused = _useRangeActive2[0],
triggerFocus = _useRangeActive2[1],
lastOperation = _useRangeActive2[2],
activeIndex = _useRangeActive2[3];
var onSharedFocus = function onSharedFocus(event) {
triggerFocus(true);
onFocus === null || onFocus === void 0 || onFocus(event, {});
};
var onSharedBlur = function onSharedBlur(event) {
triggerFocus(false);
onBlur === null || onBlur === void 0 || onBlur(event, {});
};
// ========================= Mode =========================
var _useMergedState = (0,rc_util_es.useMergedState)(picker, {
value: mode
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedMode = _useMergedState2[0],
setMode = _useMergedState2[1];
/** Extends from `mergedMode` to patch `datetime` mode */
var internalMode = mergedMode === 'date' && showTime ? 'datetime' : mergedMode;
// ======================= Show Now =======================
var mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday);
// ======================== Value =========================
var onInternalChange = onChange && function (dates, dateStrings) {
onChange(pickerParam(dates), pickerParam(dateStrings));
};
var _useRangeValue = useRangeValue((0,objectSpread2["default"])((0,objectSpread2["default"])({}, filledProps), {}, {
onChange: onInternalChange
}), mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, [],
//disabled,
formatList, focused, mergedOpen, isInvalidateDate),
_useRangeValue2 = (0,slicedToArray["default"])(_useRangeValue, 2),
/** Trigger `onChange` directly without check `disabledDate` */
triggerSubmitChange = _useRangeValue2[1];
// ======================= Validate =======================
var _useFieldsInvalidate = useFieldsInvalidate(calendarValue, isInvalidateDate),
_useFieldsInvalidate2 = (0,slicedToArray["default"])(_useFieldsInvalidate, 2),
submitInvalidates = _useFieldsInvalidate2[0],
onSelectorInvalid = _useFieldsInvalidate2[1];
var submitInvalidate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return submitInvalidates.some(function (invalidated) {
return invalidated;
});
}, [submitInvalidates]);
// ===================== Picker Value =====================
// Proxy to single pickerValue
var onInternalPickerValueChange = function onInternalPickerValueChange(dates, info) {
if (onPickerValueChange) {
var cleanInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
mode: info.mode[0]
});
delete cleanInfo.range;
onPickerValueChange(dates[0], cleanInfo);
}
};
var _useRangePickerValue = useRangePickerValue(generateConfig, locale, calendarValue, [mergedMode], mergedOpen, activeIndex, internalPicker, false,
// multiplePanel,
defaultPickerValue, pickerValue, miscUtil_toArray(showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue), onInternalPickerValueChange, minDate, maxDate),
_useRangePickerValue2 = (0,slicedToArray["default"])(_useRangePickerValue, 2),
currentPickerValue = _useRangePickerValue2[0],
setCurrentPickerValue = _useRangePickerValue2[1];
// >>> Mode need wait for `pickerValue`
var triggerModeChange = (0,rc_util_es.useEvent)(function (nextPickerValue, nextMode, triggerEvent) {
setMode(nextMode);
// Compatible with `onPanelChange`
if (onPanelChange && triggerEvent !== false) {
var lastPickerValue = nextPickerValue || calendarValue[calendarValue.length - 1];
onPanelChange(lastPickerValue, nextMode);
}
});
// ======================== Submit ========================
/**
* Different with RangePicker, confirm should check `multiple` logic.
* This will never provide `date` instead.
*/
var triggerConfirm = function triggerConfirm() {
triggerSubmitChange(getCalendarValue());
triggerOpen(false, {
force: true
});
};
// ======================== Click =========================
var onSelectorClick = function onSelectorClick(event) {
if (!disabled && !selectorRef.current.nativeElement.contains(document.activeElement)) {
// Click to focus the enabled input
selectorRef.current.focus();
}
triggerOpen(true);
onClick === null || onClick === void 0 || onClick(event);
};
var onSelectorClear = function onSelectorClear() {
triggerSubmitChange(null);
triggerOpen(false, {
force: true
});
};
// ======================== Hover =========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
hoverSource = _React$useState2[0],
setHoverSource = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
internalHoverValue = _React$useState4[0],
setInternalHoverValue = _React$useState4[1];
var hoverValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var values = [internalHoverValue].concat((0,toConsumableArray["default"])(calendarValue)).filter(function (date) {
return date;
});
return multiple ? values : values.slice(0, 1);
}, [calendarValue, internalHoverValue, multiple]);
// Selector values is different with RangePicker
// which can not use `hoverValue` directly
var selectorValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!multiple && internalHoverValue) {
return [internalHoverValue];
}
return calendarValue.filter(function (date) {
return date;
});
}, [calendarValue, internalHoverValue, multiple]);
// Clean up `internalHoverValues` when closed
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!mergedOpen) {
setInternalHoverValue(null);
}
}, [mergedOpen]);
// ========================================================
// == Panels ==
// ========================================================
// ======================= Presets ========================
var presetList = usePresets(presets);
var onPresetHover = function onPresetHover(nextValue) {
setInternalHoverValue(nextValue);
setHoverSource('preset');
};
// TODO: handle this
var onPresetSubmit = function onPresetSubmit(nextValue) {
var nextCalendarValues = multiple ? toggleDates(getCalendarValue(), nextValue) : [nextValue];
var passed = triggerSubmitChange(nextCalendarValues);
if (passed && !multiple) {
triggerOpen(false, {
force: true
});
}
};
var onNow = function onNow(now) {
onPresetSubmit(now);
};
// ======================== Panel =========================
var onPanelHover = function onPanelHover(date) {
setInternalHoverValue(date);
setHoverSource('cell');
};
// >>> Focus
var onPanelFocus = function onPanelFocus(event) {
triggerOpen(true);
onSharedFocus(event);
};
// >>> Calendar
var onPanelSelect = function onPanelSelect(date) {
lastOperation('panel');
// Not change values if multiple and current panel is to match with picker
if (multiple && internalMode !== picker) {
return;
}
var nextValues = multiple ? toggleDates(getCalendarValue(), date) : [date];
// Only trigger calendar event but not update internal `calendarValue` state
triggerCalendarChange(nextValues);
// >>> Trigger next active if !needConfirm
// Fully logic check `useRangeValue` hook
if (!needConfirm && !complexPicker && internalPicker === internalMode) {
triggerConfirm();
}
};
// >>> Close
var onPopupClose = function onPopupClose() {
// Close popup
triggerOpen(false);
};
// >>> cellRender
var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender);
// >>> invalid
var panelProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var domProps = (0,pickAttrs["default"])(filledProps, false);
var restProps = (0,omit["default"])(filledProps, [].concat((0,toConsumableArray["default"])(Object.keys(domProps)), ['onChange', 'onCalendarChange', 'style', 'className', 'onPanelChange']));
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, restProps), {}, {
multiple: filledProps.multiple
});
}, [filledProps]);
// >>> Render
var panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Popup_Popup, (0,esm_extends["default"])({}, panelProps, {
showNow: mergedShowNow,
showTime: showTime
// Disabled
,
disabledDate: disabledDate
// Focus
,
onFocus: onPanelFocus,
onBlur: onSharedBlur
// Mode
,
picker: picker,
mode: mergedMode,
internalMode: internalMode,
onPanelChange: triggerModeChange
// Value
,
format: maskFormat,
value: calendarValue,
isInvalid: isInvalidateDate,
onChange: null,
onSelect: onPanelSelect
// PickerValue
,
pickerValue: currentPickerValue,
defaultOpenValue: showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue,
onPickerValueChange: setCurrentPickerValue
// Hover
,
hoverValue: hoverValues,
onHover: onPanelHover
// Submit
,
needConfirm: needConfirm,
onSubmit: triggerConfirm,
onOk: triggerOk
// Preset
,
presets: presetList,
onPresetHover: onPresetHover,
onPresetSubmit: onPresetSubmit,
onNow: onNow
// Render
,
cellRender: onInternalCellRender
}));
// ========================================================
// == Selector ==
// ========================================================
// ======================== Change ========================
var onSelectorChange = function onSelectorChange(date) {
triggerCalendarChange(date);
};
var onSelectorInputChange = function onSelectorInputChange() {
lastOperation('input');
};
// ======================= Selector =======================
var onSelectorFocus = function onSelectorFocus(event) {
lastOperation('input');
triggerOpen(true, {
inherit: true
});
// setActiveIndex(index);
onSharedFocus(event);
};
var onSelectorBlur = function onSelectorBlur(event) {
triggerOpen(false);
onSharedBlur(event);
};
var onSelectorKeyDown = function onSelectorKeyDown(event, preventDefault) {
if (event.key === 'Tab') {
triggerConfirm();
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, preventDefault);
};
// ======================= Context ========================
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
prefixCls: prefixCls,
locale: locale,
generateConfig: generateConfig,
button: components.button,
input: components.input
};
}, [prefixCls, locale, generateConfig, components.button, components.input]);
// ======================== Effect ========================
// >>> Mode
// Reset for every active
(0,useLayoutEffect["default"])(function () {
if (mergedOpen && activeIndex !== undefined) {
// Legacy compatible. This effect update should not trigger `onPanelChange`
triggerModeChange(null, picker, false);
}
}, [mergedOpen, activeIndex, picker]);
// >>> For complex picker, we need check if need to focus next one
(0,useLayoutEffect["default"])(function () {
var lastOp = lastOperation();
// Trade as confirm on field leave
if (!mergedOpen && lastOp === 'input') {
triggerOpen(false);
triggerConfirm();
}
// Submit with complex picker
if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {
triggerConfirm();
}
}, [mergedOpen]);
// ======================== Render ========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_context.Provider, {
value: context
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerTrigger, (0,esm_extends["default"])({}, pickTriggerProps(filledProps), {
popupElement: panel,
popupStyle: styles.popup,
popupClassName: classNames.popup
// Visible
,
visible: mergedOpen,
onClose: onPopupClose
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_SingleSelector
// Shared
, (0,esm_extends["default"])({}, filledProps, {
// Ref
ref: selectorRef
// Icon
,
suffixIcon: suffixIcon,
removeIcon: removeIcon
// Active
,
activeHelp: !!internalHoverValue,
allHelp: !!internalHoverValue && hoverSource === 'preset',
focused: focused,
onFocus: onSelectorFocus,
onBlur: onSelectorBlur,
onKeyDown: onSelectorKeyDown,
onSubmit: triggerConfirm
// Change
,
value: selectorValues,
maskFormat: maskFormat,
onChange: onSelectorChange,
onInputChange: onSelectorInputChange,
internalPicker: internalPicker
// Format
,
format: formatList,
inputReadOnly: inputReadOnly
// Disabled
,
disabled: disabled
// Open
,
open: mergedOpen,
onOpenChange: triggerOpen
// Click
,
onClick: onSelectorClick,
onClear: onSelectorClear
// Invalid
,
invalid: submitInvalidate,
onInvalid: function onInvalid(invalid) {
// Only `single` mode support type date.
// `multiple` mode can not typing.
onSelectorInvalid(invalid, 0);
}
}))));
}
var RefPicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Picker);
if (true) {
RefPicker.displayName = 'RefPicker';
}
/* harmony default export */ var SinglePicker = (RefPicker);
;// ./node_modules/rc-picker/es/index.js
/**
* What's new?
* - Common
* - [Break] Support special year format, all the year will follow the locale config.
* - Blur all of field will trigger `onChange` if validate
* - Support `preserveInvalidOnBlur` to not to clean input if invalid and remove `changeOnBlur`
* - `pickerValue` is now full controlled
* - `defaultPickerValue` will take effect on every field active with popup opening.
* - [Break] clear button return the event with `onClick`
*
* - Locale
* - Remove `dateFormat` since it's never used
* - Remove `dateTimeFormat` since it's never used
*
* - Picker
* - TimePicker support `changeOnScroll`
* - TimePicker support `millisecond`
* - Support cellMeridiemFormat for AM/PM
* - Get correct `disabledHours` when set `use12Hours`
* - Support `showWeek`
*
* - RangePicker
* - [Break] RangePicker is now not limit the range of clicked field.
* - Trigger `onCalendarChange` when type correct
* - [Break] Not order `value` if given `value` is wrong order.
* - Hover `presets` will show date in input field.
* - [Break] RangePicker go to end field, `pickerValue` will follow the start field if not controlled.
*/
/* harmony default export */ var rc_picker_es = (SinglePicker);
;// ./components/radio/context.ts
const RadioGroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
const RadioGroupContextProvider = RadioGroupContext.Provider;
/* harmony default export */ var radio_context = (RadioGroupContext);
const RadioOptionTypeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
const RadioOptionTypeContextProvider = RadioOptionTypeContext.Provider;
;// ./node_modules/rc-checkbox/es/index.js
var rc_checkbox_es_excluded = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"];
var Checkbox = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-checkbox' : _props$prefixCls,
className = props.className,
style = props.style,
checked = props.checked,
disabled = props.disabled,
_props$defaultChecked = props.defaultChecked,
defaultChecked = _props$defaultChecked === void 0 ? false : _props$defaultChecked,
_props$type = props.type,
type = _props$type === void 0 ? 'checkbox' : _props$type,
title = props.title,
onChange = props.onChange,
inputProps = (0,objectWithoutProperties["default"])(props, rc_checkbox_es_excluded);
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var _useMergedState = (0,useMergedState["default"])(defaultChecked, {
value: checked
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
rawValue = _useMergedState2[0],
setRawValue = _useMergedState2[1];
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
return {
focus: function focus(options) {
var _inputRef$current;
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus(options);
},
blur: function blur() {
var _inputRef$current2;
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.blur();
},
input: inputRef.current,
nativeElement: holderRef.current
};
});
var classString = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-checked"), rawValue), "".concat(prefixCls, "-disabled"), disabled));
var handleChange = function handleChange(e) {
if (disabled) {
return;
}
if (!('checked' in props)) {
setRawValue(e.target.checked);
}
onChange === null || onChange === void 0 || onChange({
target: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
type: type,
checked: e.target.checked
}),
stopPropagation: function stopPropagation() {
e.stopPropagation();
},
preventDefault: function preventDefault() {
e.preventDefault();
},
nativeEvent: e.nativeEvent
});
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classString,
title: title,
style: style,
ref: holderRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", (0,esm_extends["default"])({}, inputProps, {
className: "".concat(prefixCls, "-input"),
ref: inputRef,
onChange: handleChange,
disabled: disabled,
checked: !!rawValue,
type: type
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-inner")
}));
});
/* harmony default export */ var rc_checkbox_es = (Checkbox);
;// ./components/checkbox/useBubbleLock.ts
/**
* When click on the label,
* the event will be stopped to prevent the label from being clicked twice.
* label click -> input click -> label click again
*/
function useBubbleLock(onOriginInputClick) {
const labelClickLockRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const clearLock = () => {
raf["default"].cancel(labelClickLockRef.current);
labelClickLockRef.current = null;
};
const onLabelClick = () => {
clearLock();
labelClickLockRef.current = (0,raf["default"])(() => {
labelClickLockRef.current = null;
});
};
const onInputClick = e => {
if (labelClickLockRef.current) {
e.stopPropagation();
clearLock();
}
onOriginInputClick === null || onOriginInputClick === void 0 ? void 0 : onOriginInputClick(e);
};
return [onLabelClick, onInputClick];
}
// EXTERNAL MODULE: ./components/radio/style/index.ts
var radio_style = __webpack_require__("./components/radio/style/index.ts");
;// ./components/radio/radio.tsx
var radio_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;
};
const InternalRadio = (props, ref) => {
var _a, _b;
const groupContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(radio_context);
const radioOptionTypeContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(RadioOptionTypeContext);
const {
getPrefixCls,
direction,
radio
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const mergedRef = (0,es_ref.composeRef)(ref, innerRef);
const {
isFormItemInput
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Radio');
true ? warning(!('optionType' in props), 'usage', '`optionType` is only support in Radio.Group.') : 0;
}
const onChange = e => {
var _a, _b;
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);
(_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e);
};
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
children,
style,
title
} = props,
restProps = radio_rest(props, ["prefixCls", "className", "rootClassName", "children", "style", "title"]);
const radioPrefixCls = getPrefixCls('radio', customizePrefixCls);
const isButtonType = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === 'button';
const prefixCls = isButtonType ? `${radioPrefixCls}-button` : radioPrefixCls;
// Style
const rootCls = hooks_useCSSVarCls(radioPrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,radio_style["default"])(radioPrefixCls, rootCls);
const radioProps = Object.assign({}, restProps);
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
if (groupContext) {
radioProps.name = groupContext.name;
radioProps.onChange = onChange;
radioProps.checked = props.value === groupContext.value;
radioProps.disabled = (_a = radioProps.disabled) !== null && _a !== void 0 ? _a : groupContext.disabled;
}
radioProps.disabled = (_b = radioProps.disabled) !== null && _b !== void 0 ? _b : disabled;
const wrapperClassString = classnames_default()(`${prefixCls}-wrapper`, {
[`${prefixCls}-wrapper-checked`]: radioProps.checked,
[`${prefixCls}-wrapper-disabled`]: radioProps.disabled,
[`${prefixCls}-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-wrapper-in-form-item`]: isFormItemInput,
[`${prefixCls}-wrapper-block`]: !!(groupContext === null || groupContext === void 0 ? void 0 : groupContext.block)
}, radio === null || radio === void 0 ? void 0 : radio.className, className, rootClassName, hashId, cssVarCls, rootCls);
// ============================ Event Lock ============================
const [onLabelClick, onInputClick] = useBubbleLock(radioProps.onClick);
// ============================== Render ==============================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
component: "Radio",
disabled: radioProps.disabled
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
className: wrapperClassString,
style: Object.assign(Object.assign({}, radio === null || radio === void 0 ? void 0 : radio.style), style),
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
title: title,
onClick: onLabelClick
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_checkbox_es, Object.assign({}, radioProps, {
className: classnames_default()(radioProps.className, {
[TARGET_CLS]: !isButtonType
}),
type: "radio",
prefixCls: prefixCls,
ref: mergedRef,
onClick: onInputClick
})), children !== undefined ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-label`
}, children) : null)));
};
const Radio = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalRadio);
if (true) {
Radio.displayName = 'Radio';
}
/* harmony default export */ var radio_radio = (Radio);
;// ./components/radio/group.tsx
const RadioGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const defaultName = hooks_useId();
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
options,
buttonStyle = 'outline',
disabled,
children,
size: customizeSize,
style,
id,
optionType,
name = defaultName,
defaultValue,
value: customizedValue,
block = false,
onChange,
onMouseEnter,
onMouseLeave,
onFocus,
onBlur
} = props;
const [value, setValue] = (0,useMergedState["default"])(defaultValue, {
value: customizedValue
});
const onRadioChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(event => {
const lastValue = value;
const val = event.target.value;
if (!('value' in props)) {
setValue(val);
}
if (val !== lastValue) {
onChange === null || onChange === void 0 ? void 0 : onChange(event);
}
}, [value, setValue, onChange]);
const prefixCls = getPrefixCls('radio', customizePrefixCls);
const groupPrefixCls = `${prefixCls}-group`;
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,radio_style["default"])(prefixCls, rootCls);
let childrenToRender = children;
// 如果存在 options, 优先使用
if (options && options.length > 0) {
childrenToRender = options.map(option => {
if (typeof option === 'string' || typeof option === 'number') {
// 此处类型自动推导为 string
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radio_radio, {
key: option.toString(),
prefixCls: prefixCls,
disabled: disabled,
value: option,
checked: value === option
}, option);
}
// 此处类型自动推导为 { label: string value: string }
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radio_radio, {
key: `radio-group-value-options-${option.value}`,
prefixCls: prefixCls,
disabled: option.disabled || disabled,
value: option.value,
checked: value === option.value,
title: option.title,
style: option.style,
id: option.id,
required: option.required
}, option.label);
});
}
const mergedSize = (0,useSize["default"])(customizeSize);
const classString = classnames_default()(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {
[`${groupPrefixCls}-${mergedSize}`]: mergedSize,
[`${groupPrefixCls}-rtl`]: direction === 'rtl',
[`${groupPrefixCls}-block`]: block
}, className, rootClassName, hashId, cssVarCls, rootCls);
const memoizedValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
onChange: onRadioChange,
value,
disabled,
name,
optionType,
block
}), [onRadioChange, value, disabled, name, optionType, block]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, (0,pickAttrs["default"])(props, {
aria: true,
data: true
}), {
className: classString,
style: style,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onFocus: onFocus,
onBlur: onBlur,
id: id,
ref: ref
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RadioGroupContextProvider, {
value: memoizedValue
}, childrenToRender)));
});
/* harmony default export */ var group = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(RadioGroup));
;// ./components/radio/radioButton.tsx
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;
};
const RadioButton = (props, ref) => {
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls
} = props,
radioProps = radioButton_rest(props, ["prefixCls"]);
const prefixCls = getPrefixCls('radio', customizePrefixCls);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RadioOptionTypeContextProvider, {
value: "button"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radio_radio, Object.assign({
prefixCls: prefixCls
}, radioProps, {
type: "radio",
ref: ref
})));
};
/* harmony default export */ var radioButton = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RadioButton));
;// ./components/calendar/Header.tsx
const YEAR_SELECT_OFFSET = 10;
const YEAR_SELECT_TOTAL = 20;
function YearSelect(props) {
const {
fullscreen,
validRange,
generateConfig,
locale,
prefixCls,
value,
onChange,
divRef
} = props;
const year = generateConfig.getYear(value || generateConfig.getNow());
let start = year - YEAR_SELECT_OFFSET;
let end = start + YEAR_SELECT_TOTAL;
if (validRange) {
start = generateConfig.getYear(validRange[0]);
end = generateConfig.getYear(validRange[1]) + 1;
}
const suffix = locale && locale.year === '年' ? '年' : '';
const options = [];
for (let index = start; index < end; index++) {
options.push({
label: `${index}${suffix}`,
value: index
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_select, {
size: fullscreen ? undefined : 'small',
options: options,
value: year,
className: `${prefixCls}-year-select`,
onChange: numYear => {
let newDate = generateConfig.setYear(value, numYear);
if (validRange) {
const [startDate, endDate] = validRange;
const newYear = generateConfig.getYear(newDate);
const newMonth = generateConfig.getMonth(newDate);
if (newYear === generateConfig.getYear(endDate) && newMonth > generateConfig.getMonth(endDate)) {
newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(endDate));
}
if (newYear === generateConfig.getYear(startDate) && newMonth < generateConfig.getMonth(startDate)) {
newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(startDate));
}
}
onChange(newDate);
},
getPopupContainer: () => divRef.current
});
}
function MonthSelect(props) {
const {
prefixCls,
fullscreen,
validRange,
value,
generateConfig,
locale,
onChange,
divRef
} = props;
const month = generateConfig.getMonth(value || generateConfig.getNow());
let start = 0;
let end = 11;
if (validRange) {
const [rangeStart, rangeEnd] = validRange;
const currentYear = generateConfig.getYear(value);
if (generateConfig.getYear(rangeEnd) === currentYear) {
end = generateConfig.getMonth(rangeEnd);
}
if (generateConfig.getYear(rangeStart) === currentYear) {
start = generateConfig.getMonth(rangeStart);
}
}
const months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale);
const options = [];
for (let index = start; index <= end; index += 1) {
options.push({
label: months[index],
value: index
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_select, {
size: fullscreen ? undefined : 'small',
className: `${prefixCls}-month-select`,
value: month,
options: options,
onChange: newMonth => {
onChange(generateConfig.setMonth(value, newMonth));
},
getPopupContainer: () => divRef.current
});
}
function ModeSwitch(props) {
const {
prefixCls,
locale,
mode,
fullscreen,
onModeChange
} = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(group, {
onChange: _ref => {
let {
target: {
value
}
} = _ref;
onModeChange(value);
},
value: mode,
size: fullscreen ? undefined : 'small',
className: `${prefixCls}-mode-switch`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radioButton, {
value: "month"
}, locale.month), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radioButton, {
value: "year"
}, locale.year));
}
function CalendarHeader(props) {
const {
prefixCls,
fullscreen,
mode,
onChange,
onModeChange
} = props;
const divRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const formItemInputContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
const mergedFormItemInputContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Object.assign(Object.assign({}, formItemInputContext), {
isFormItemInput: false
}), [formItemInputContext]);
const sharedProps = Object.assign(Object.assign({}, props), {
fullscreen,
divRef
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-header`,
ref: divRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
value: mergedFormItemInputContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(YearSelect, Object.assign({}, sharedProps, {
onChange: v => {
onChange(v, 'year');
}
})), mode === 'month' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MonthSelect, Object.assign({}, sharedProps, {
onChange: v => {
onChange(v, 'month');
}
})))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ModeSwitch, Object.assign({}, sharedProps, {
onModeChange: onModeChange
})));
}
/* harmony default export */ var Header = (CalendarHeader);
// EXTERNAL MODULE: ./components/calendar/locale/en_US.ts
var locale_en_US = __webpack_require__("./components/calendar/locale/en_US.ts");
// EXTERNAL MODULE: ./components/calendar/style/index.ts
var calendar_style = __webpack_require__("./components/calendar/style/index.ts");
;// ./components/calendar/generateCalendar.tsx
const generateCalendar_isSameYear = (date1, date2, config) => {
const {
getYear
} = config;
return date1 && date2 && getYear(date1) === getYear(date2);
};
const generateCalendar_isSameMonth = (date1, date2, config) => {
const {
getMonth
} = config;
return generateCalendar_isSameYear(date1, date2, config) && getMonth(date1) === getMonth(date2);
};
const generateCalendar_isSameDate = (date1, date2, config) => {
const {
getDate
} = config;
return generateCalendar_isSameMonth(date1, date2, config) && getDate(date1) === getDate(date2);
};
const generateCalendar = generateConfig => {
const Calendar = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
dateFullCellRender,
dateCellRender,
monthFullCellRender,
monthCellRender,
cellRender,
fullCellRender,
headerRender,
value,
defaultValue,
disabledDate,
mode,
validRange,
fullscreen = true,
showWeek,
onChange,
onPanelChange,
onSelect
} = props;
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('calendar');
const prefixCls = getPrefixCls('picker', customizePrefixCls);
const calendarPrefixCls = `${prefixCls}-calendar`;
const [wrapCSSVar, hashId, cssVarCls] = (0,calendar_style["default"])(prefixCls, calendarPrefixCls);
const today = generateConfig.getNow();
// ====================== Warning =======================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Calendar');
[['dateFullCellRender', 'fullCellRender'], ['dateCellRender', 'cellRender'], ['monthFullCellRender', 'fullCellRender'], ['monthCellRender', 'cellRender']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
// ====================== State =======================
// Value
const [mergedValue, setMergedValue] = (0,useMergedState["default"])(() => value || generateConfig.getNow(), {
defaultValue,
value
});
// Mode
const [mergedMode, setMergedMode] = (0,useMergedState["default"])('month', {
value: mode
});
const panelMode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => mergedMode === 'year' ? 'month' : 'date', [mergedMode]);
// Disabled Date
const mergedDisabledDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(date => {
const notInRange = validRange ? generateConfig.isAfter(validRange[0], date) || generateConfig.isAfter(date, validRange[1]) : false;
return notInRange || !!(disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date));
}, [disabledDate, validRange]);
// ====================== Events ======================
const triggerPanelChange = (date, newMode) => {
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(date, newMode);
};
const triggerChange = date => {
setMergedValue(date);
if (!generateCalendar_isSameDate(date, mergedValue, generateConfig)) {
// Trigger when month panel switch month
if (panelMode === 'date' && !generateCalendar_isSameMonth(date, mergedValue, generateConfig) || panelMode === 'month' && !generateCalendar_isSameYear(date, mergedValue, generateConfig)) {
triggerPanelChange(date, mergedMode);
}
onChange === null || onChange === void 0 ? void 0 : onChange(date);
}
};
const triggerModeChange = newMode => {
setMergedMode(newMode);
triggerPanelChange(mergedValue, newMode);
};
const onInternalSelect = (date, source) => {
triggerChange(date);
onSelect === null || onSelect === void 0 ? void 0 : onSelect(date, {
source
});
};
// ====================== Render ======================
const dateRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((date, info) => {
if (fullCellRender) {
return fullCellRender(date, info);
}
if (dateFullCellRender) {
return dateFullCellRender(date);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-cell-inner`, `${calendarPrefixCls}-date`, {
[`${calendarPrefixCls}-date-today`]: generateCalendar_isSameDate(today, date, generateConfig)
})
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${calendarPrefixCls}-date-value`
}, String(generateConfig.getDate(date)).padStart(2, '0')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${calendarPrefixCls}-date-content`
}, cellRender ? cellRender(date, info) : dateCellRender === null || dateCellRender === void 0 ? void 0 : dateCellRender(date)));
}, [dateFullCellRender, dateCellRender, cellRender, fullCellRender]);
const monthRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((date, info) => {
if (fullCellRender) {
return fullCellRender(date, info);
}
if (monthFullCellRender) {
return monthFullCellRender(date);
}
const months = info.locale.shortMonths || generateConfig.locale.getShortMonths(info.locale.locale);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-cell-inner`, `${calendarPrefixCls}-date`, {
[`${calendarPrefixCls}-date-today`]: generateCalendar_isSameMonth(today, date, generateConfig)
})
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${calendarPrefixCls}-date-value`
}, months[generateConfig.getMonth(date)]), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${calendarPrefixCls}-date-content`
}, cellRender ? cellRender(date, info) : monthCellRender === null || monthCellRender === void 0 ? void 0 : monthCellRender(date)));
}, [monthFullCellRender, monthCellRender, cellRender, fullCellRender]);
const [contextLocale] = (0,useLocale["default"])('Calendar', locale_en_US["default"]);
const locale = Object.assign(Object.assign({}, contextLocale), props.locale);
const mergedCellRender = (current, info) => {
if (info.type === 'date') {
return dateRender(current, info);
}
if (info.type === 'month') {
return monthRender(current, Object.assign(Object.assign({}, info), {
locale: locale === null || locale === void 0 ? void 0 : locale.lang
}));
}
};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(calendarPrefixCls, {
[`${calendarPrefixCls}-full`]: fullscreen,
[`${calendarPrefixCls}-mini`]: !fullscreen,
[`${calendarPrefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, hashId, cssVarCls),
style: Object.assign(Object.assign({}, contextStyle), style)
}, headerRender ? headerRender({
value: mergedValue,
type: mergedMode,
onChange: nextDate => {
onInternalSelect(nextDate, 'customize');
},
onTypeChange: triggerModeChange
}) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Header, {
prefixCls: calendarPrefixCls,
value: mergedValue,
generateConfig: generateConfig,
mode: mergedMode,
fullscreen: fullscreen,
locale: locale === null || locale === void 0 ? void 0 : locale.lang,
validRange: validRange,
onChange: onInternalSelect,
onModeChange: triggerModeChange
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, {
value: mergedValue,
prefixCls: prefixCls,
locale: locale === null || locale === void 0 ? void 0 : locale.lang,
generateConfig: generateConfig,
cellRender: mergedCellRender,
onSelect: nextDate => {
onInternalSelect(nextDate, panelMode);
},
mode: panelMode,
picker: panelMode,
disabledDate: mergedDisabledDate,
hideHeader: true,
showWeek: showWeek
})));
};
if (true) {
Calendar.displayName = 'Calendar';
}
return Calendar;
};
/* harmony default export */ var calendar_generateCalendar = (generateCalendar);
;// ./components/calendar/index.tsx
const Calendar = calendar_generateCalendar(dayjs);
Calendar.generateCalendar = calendar_generateCalendar;
/* harmony default export */ var calendar = (Calendar);
;// ./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js
// This icon file is generated automatically.
var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
/* harmony default export */ var asn_PlusOutlined = (PlusOutlined);
;// ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusOutlined_PlusOutlined = function PlusOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_PlusOutlined
}));
};
/** */
var PlusOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PlusOutlined_PlusOutlined);
if (true) {
PlusOutlined_RefIcon.displayName = 'PlusOutlined';
}
/* harmony default export */ var icons_PlusOutlined = (PlusOutlined_RefIcon);
;// ./node_modules/rc-tabs/es/TabContext.js
/* harmony default export */ var TabContext = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(null));
;// ./node_modules/rc-tabs/es/hooks/useIndicator.js
var useIndicator = function useIndicator(options) {
var activeTabOffset = options.activeTabOffset,
horizontal = options.horizontal,
rtl = options.rtl,
_options$indicator = options.indicator,
indicator = _options$indicator === void 0 ? {} : _options$indicator;
var size = indicator.size,
_indicator$align = indicator.align,
align = _indicator$align === void 0 ? 'center' : _indicator$align;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
inkStyle = _useState2[0],
setInkStyle = _useState2[1];
var inkBarRafRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var getLength = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(function (origin) {
if (typeof size === 'function') {
return size(origin);
}
if (typeof size === 'number') {
return size;
}
return origin;
}, [size]);
// Delay set ink style to avoid remove tab blink
function cleanInkBarRaf() {
raf["default"].cancel(inkBarRafRef.current);
}
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var newInkStyle = {};
if (activeTabOffset) {
if (horizontal) {
newInkStyle.width = getLength(activeTabOffset.width);
var key = rtl ? 'right' : 'left';
if (align === 'start') {
newInkStyle[key] = activeTabOffset[key];
}
if (align === 'center') {
newInkStyle[key] = activeTabOffset[key] + activeTabOffset.width / 2;
newInkStyle.transform = rtl ? 'translateX(50%)' : 'translateX(-50%)';
}
if (align === 'end') {
newInkStyle[key] = activeTabOffset[key] + activeTabOffset.width;
newInkStyle.transform = 'translateX(-100%)';
}
} else {
newInkStyle.height = getLength(activeTabOffset.height);
if (align === 'start') {
newInkStyle.top = activeTabOffset.top;
}
if (align === 'center') {
newInkStyle.top = activeTabOffset.top + activeTabOffset.height / 2;
newInkStyle.transform = 'translateY(-50%)';
}
if (align === 'end') {
newInkStyle.top = activeTabOffset.top + activeTabOffset.height;
newInkStyle.transform = 'translateY(-100%)';
}
}
}
cleanInkBarRaf();
inkBarRafRef.current = (0,raf["default"])(function () {
setInkStyle(newInkStyle);
});
return cleanInkBarRaf;
}, [activeTabOffset, horizontal, rtl, align, getLength]);
return {
style: inkStyle
};
};
/* harmony default export */ var hooks_useIndicator = (useIndicator);
;// ./node_modules/rc-tabs/es/hooks/useOffsets.js
var DEFAULT_SIZE = {
width: 0,
height: 0,
left: 0,
top: 0
};
function useOffsets(tabs, tabSizes, holderScrollWidth) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var _tabs$;
var map = new Map();
var lastOffset = tabSizes.get((_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key) || DEFAULT_SIZE;
var rightOffset = lastOffset.left + lastOffset.width;
for (var i = 0; i < tabs.length; i += 1) {
var key = tabs[i].key;
var data = tabSizes.get(key);
// Reuse last one when not exist yet
if (!data) {
var _tabs;
data = tabSizes.get((_tabs = tabs[i - 1]) === null || _tabs === void 0 ? void 0 : _tabs.key) || DEFAULT_SIZE;
}
var entity = map.get(key) || (0,objectSpread2["default"])({}, data);
// Right
entity.right = rightOffset - entity.left - entity.width;
// Update entity
map.set(key, entity);
}
return map;
}, [tabs.map(function (tab) {
return tab.key;
}).join('_'), tabSizes, holderScrollWidth]);
}
;// ./node_modules/rc-tabs/es/hooks/useSyncState.js
function useSyncState_useSyncState(defaultState, onChange) {
var stateRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(defaultState);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
forceUpdate = _React$useState2[1];
function setState(updater) {
var newValue = typeof updater === 'function' ? updater(stateRef.current) : updater;
if (newValue !== stateRef.current) {
onChange(newValue, stateRef.current);
}
stateRef.current = newValue;
forceUpdate({});
}
return [stateRef.current, setState];
}
;// ./node_modules/rc-tabs/es/hooks/useTouchMove.js
var MIN_SWIPE_DISTANCE = 0.1;
var STOP_SWIPE_DISTANCE = 0.01;
var REFRESH_INTERVAL = 20;
var SPEED_OFF_MULTIPLE = Math.pow(0.995, REFRESH_INTERVAL);
// ================================= Hook =================================
function useTouchMove(ref, onOffset) {
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
touchPosition = _useState2[0],
setTouchPosition = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
lastTimestamp = _useState4[0],
setLastTimestamp = _useState4[1];
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState6 = (0,slicedToArray["default"])(_useState5, 2),
lastTimeDiff = _useState6[0],
setLastTimeDiff = _useState6[1];
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
_useState8 = (0,slicedToArray["default"])(_useState7, 2),
lastOffset = _useState8[0],
setLastOffset = _useState8[1];
var motionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
// ========================= Events =========================
// >>> Touch events
function onTouchStart(e) {
var _e$touches$ = e.touches[0],
screenX = _e$touches$.screenX,
screenY = _e$touches$.screenY;
setTouchPosition({
x: screenX,
y: screenY
});
window.clearInterval(motionRef.current);
}
function onTouchMove(e) {
if (!touchPosition) return;
// e.preventDefault();
var _e$touches$2 = e.touches[0],
screenX = _e$touches$2.screenX,
screenY = _e$touches$2.screenY;
setTouchPosition({
x: screenX,
y: screenY
});
var offsetX = screenX - touchPosition.x;
var offsetY = screenY - touchPosition.y;
onOffset(offsetX, offsetY);
var now = Date.now();
setLastTimestamp(now);
setLastTimeDiff(now - lastTimestamp);
setLastOffset({
x: offsetX,
y: offsetY
});
}
function onTouchEnd() {
if (!touchPosition) return;
setTouchPosition(null);
setLastOffset(null);
// Swipe if needed
if (lastOffset) {
var distanceX = lastOffset.x / lastTimeDiff;
var distanceY = lastOffset.y / lastTimeDiff;
var absX = Math.abs(distanceX);
var absY = Math.abs(distanceY);
// Skip swipe if low distance
if (Math.max(absX, absY) < MIN_SWIPE_DISTANCE) return;
var currentX = distanceX;
var currentY = distanceY;
motionRef.current = window.setInterval(function () {
if (Math.abs(currentX) < STOP_SWIPE_DISTANCE && Math.abs(currentY) < STOP_SWIPE_DISTANCE) {
window.clearInterval(motionRef.current);
return;
}
currentX *= SPEED_OFF_MULTIPLE;
currentY *= SPEED_OFF_MULTIPLE;
onOffset(currentX * REFRESH_INTERVAL, currentY * REFRESH_INTERVAL);
}, REFRESH_INTERVAL);
}
}
// >>> Wheel event
var lastWheelDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
function onWheel(e) {
var deltaX = e.deltaX,
deltaY = e.deltaY;
// Convert both to x & y since wheel only happened on PC
var mixed = 0;
var absX = Math.abs(deltaX);
var absY = Math.abs(deltaY);
if (absX === absY) {
mixed = lastWheelDirectionRef.current === 'x' ? deltaX : deltaY;
} else if (absX > absY) {
mixed = deltaX;
lastWheelDirectionRef.current = 'x';
} else {
mixed = deltaY;
lastWheelDirectionRef.current = 'y';
}
if (onOffset(-mixed, -mixed)) {
e.preventDefault();
}
}
// ========================= Effect =========================
var touchEventsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
touchEventsRef.current = {
onTouchStart: onTouchStart,
onTouchMove: onTouchMove,
onTouchEnd: onTouchEnd,
onWheel: onWheel
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
function onProxyTouchStart(e) {
touchEventsRef.current.onTouchStart(e);
}
function onProxyTouchMove(e) {
touchEventsRef.current.onTouchMove(e);
}
function onProxyTouchEnd(e) {
touchEventsRef.current.onTouchEnd(e);
}
function onProxyWheel(e) {
touchEventsRef.current.onWheel(e);
}
document.addEventListener('touchmove', onProxyTouchMove, {
passive: false
});
document.addEventListener('touchend', onProxyTouchEnd, {
passive: true
});
// No need to clean up since element removed
ref.current.addEventListener('touchstart', onProxyTouchStart, {
passive: true
});
ref.current.addEventListener('wheel', onProxyWheel, {
passive: false
});
return function () {
document.removeEventListener('touchmove', onProxyTouchMove);
document.removeEventListener('touchend', onProxyTouchEnd);
};
}, []);
}
;// ./node_modules/rc-tabs/es/hooks/useUpdate.js
/**
* Help to merge callback with `useLayoutEffect`.
* One time will only trigger once.
*/
function useUpdate(callback) {
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
count = _useState2[0],
setCount = _useState2[1];
var effectRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
var callbackRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
callbackRef.current = callback;
// Trigger on `useLayoutEffect`
(0,useLayoutEffect.useLayoutUpdateEffect)(function () {
var _callbackRef$current;
(_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 || _callbackRef$current.call(callbackRef);
}, [count]);
// Trigger to update count
return function () {
if (effectRef.current !== count) {
return;
}
effectRef.current += 1;
setCount(effectRef.current);
};
}
function useUpdateState(defaultState) {
var batchRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
forceUpdate = _useState4[1];
var state = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(typeof defaultState === 'function' ? defaultState() : defaultState);
var flushUpdate = useUpdate(function () {
var current = state.current;
batchRef.current.forEach(function (callback) {
current = callback(current);
});
batchRef.current = [];
state.current = current;
forceUpdate({});
});
function updater(callback) {
batchRef.current.push(callback);
flushUpdate();
}
return [state.current, updater];
}
;// ./node_modules/rc-tabs/es/hooks/useVisibleRange.js
var useVisibleRange_DEFAULT_SIZE = {
width: 0,
height: 0,
left: 0,
top: 0,
right: 0
};
function useVisibleRange(tabOffsets, visibleTabContentValue, transform, tabContentSizeValue, addNodeSizeValue, operationNodeSizeValue, _ref) {
var tabs = _ref.tabs,
tabPosition = _ref.tabPosition,
rtl = _ref.rtl;
var charUnit;
var position;
var transformSize;
if (['top', 'bottom'].includes(tabPosition)) {
charUnit = 'width';
position = rtl ? 'right' : 'left';
transformSize = Math.abs(transform);
} else {
charUnit = 'height';
position = 'top';
transformSize = -transform;
}
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
if (!tabs.length) {
return [0, 0];
}
var len = tabs.length;
var endIndex = len;
for (var i = 0; i < len; i += 1) {
var offset = tabOffsets.get(tabs[i].key) || useVisibleRange_DEFAULT_SIZE;
if (Math.floor(offset[position] + offset[charUnit]) > Math.floor(transformSize + visibleTabContentValue)) {
endIndex = i - 1;
break;
}
}
var startIndex = 0;
for (var _i = len - 1; _i >= 0; _i -= 1) {
var _offset = tabOffsets.get(tabs[_i].key) || useVisibleRange_DEFAULT_SIZE;
if (_offset[position] < transformSize) {
startIndex = _i + 1;
break;
}
}
return startIndex >= endIndex ? [0, 0] : [startIndex, endIndex];
}, [tabOffsets, visibleTabContentValue, tabContentSizeValue, addNodeSizeValue, operationNodeSizeValue, transformSize, tabPosition, tabs.map(function (tab) {
return tab.key;
}).join('_'), rtl]);
}
;// ./node_modules/rc-tabs/es/util.js
/**
* We trade Map as deps which may change with same value but different ref object.
* We should make it as hash for deps
* */
function util_stringify(obj) {
var tgt;
if (obj instanceof Map) {
tgt = {};
obj.forEach(function (v, k) {
tgt[k] = v;
});
} else {
tgt = obj;
}
return JSON.stringify(tgt);
}
var RC_TABS_DOUBLE_QUOTE = 'TABS_DQ';
function genDataNodeKey(key) {
return String(key).replace(/"/g, RC_TABS_DOUBLE_QUOTE);
}
function getRemovable(closable, closeIcon, editable, disabled) {
if (
// Only editable tabs can be removed
!editable ||
// Tabs cannot be removed when disabled
disabled ||
// closable is false
closable === false ||
// If closable is undefined, the remove button should be hidden when closeIcon is null or false
closable === undefined && (closeIcon === false || closeIcon === null)) {
return false;
}
return true;
}
;// ./node_modules/rc-tabs/es/TabNavList/AddButton.js
var AddButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
editable = props.editable,
locale = props.locale,
style = props.style;
if (!editable || editable.showAdd === false) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
ref: ref,
type: "button",
className: "".concat(prefixCls, "-nav-add"),
style: style,
"aria-label": (locale === null || locale === void 0 ? void 0 : locale.addAriaLabel) || 'Add tab',
onClick: function onClick(event) {
editable.onEdit('add', {
event: event
});
}
}, editable.addIcon || '+');
});
/* harmony default export */ var TabNavList_AddButton = (AddButton);
;// ./node_modules/rc-tabs/es/TabNavList/ExtraContent.js
var ExtraContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var position = props.position,
prefixCls = props.prefixCls,
extra = props.extra;
if (!extra) {
return null;
}
var content;
// Parse extra
var assertExtra = {};
if ((0,esm_typeof["default"])(extra) === 'object' && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(extra)) {
assertExtra = extra;
} else {
assertExtra.right = extra;
}
if (position === 'right') {
content = assertExtra.right;
}
if (position === 'left') {
content = assertExtra.left;
}
return content ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-extra-content"),
ref: ref
}, content) : null;
});
if (true) {
ExtraContent.displayName = 'ExtraContent';
}
/* harmony default export */ var TabNavList_ExtraContent = (ExtraContent);
;// ./node_modules/rc-tabs/es/TabNavList/OperationNode.js
var OperationNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
id = props.id,
tabs = props.tabs,
locale = props.locale,
mobile = props.mobile,
_props$more = props.more,
moreProps = _props$more === void 0 ? {} : _props$more,
style = props.style,
className = props.className,
editable = props.editable,
tabBarGutter = props.tabBarGutter,
rtl = props.rtl,
removeAriaLabel = props.removeAriaLabel,
onTabClick = props.onTabClick,
getPopupContainer = props.getPopupContainer,
popupClassName = props.popupClassName;
// ======================== Dropdown ========================
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
open = _useState2[0],
setOpen = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
selectedKey = _useState4[0],
setSelectedKey = _useState4[1];
var _moreProps$icon = moreProps.icon,
moreIcon = _moreProps$icon === void 0 ? 'More' : _moreProps$icon;
var popupId = "".concat(id, "-more-popup");
var dropdownPrefix = "".concat(prefixCls, "-dropdown");
var selectedItemId = selectedKey !== null ? "".concat(popupId, "-").concat(selectedKey) : null;
var dropdownAriaLabel = locale === null || locale === void 0 ? void 0 : locale.dropdownAriaLabel;
function onRemoveTab(event, key) {
event.preventDefault();
event.stopPropagation();
editable.onEdit('remove', {
key: key,
event: event
});
}
var menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_menu_es, {
onClick: function onClick(_ref) {
var key = _ref.key,
domEvent = _ref.domEvent;
onTabClick(key, domEvent);
setOpen(false);
},
prefixCls: "".concat(dropdownPrefix, "-menu"),
id: popupId,
tabIndex: -1,
role: "listbox",
"aria-activedescendant": selectedItemId,
selectedKeys: [selectedKey],
"aria-label": dropdownAriaLabel !== undefined ? dropdownAriaLabel : 'expanded dropdown'
}, tabs.map(function (tab) {
var closable = tab.closable,
disabled = tab.disabled,
closeIcon = tab.closeIcon,
key = tab.key,
label = tab.label;
var removable = getRemovable(closable, closeIcon, editable, disabled);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, {
key: key,
id: "".concat(popupId, "-").concat(key),
role: "option",
"aria-controls": id && "".concat(id, "-panel-").concat(key),
disabled: disabled
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, label), removable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
"aria-label": removeAriaLabel || 'remove',
tabIndex: 0,
className: "".concat(dropdownPrefix, "-menu-item-remove"),
onClick: function onClick(e) {
e.stopPropagation();
onRemoveTab(e, key);
}
}, closeIcon || editable.removeIcon || '×'));
}));
function selectOffset(offset) {
var enabledTabs = tabs.filter(function (tab) {
return !tab.disabled;
});
var selectedIndex = enabledTabs.findIndex(function (tab) {
return tab.key === selectedKey;
}) || 0;
var len = enabledTabs.length;
for (var i = 0; i < len; i += 1) {
selectedIndex = (selectedIndex + offset + len) % len;
var tab = enabledTabs[selectedIndex];
if (!tab.disabled) {
setSelectedKey(tab.key);
return;
}
}
}
function onKeyDown(e) {
var which = e.which;
if (!open) {
if ([KeyCode["default"].DOWN, KeyCode["default"].SPACE, KeyCode["default"].ENTER].includes(which)) {
setOpen(true);
e.preventDefault();
}
return;
}
switch (which) {
case KeyCode["default"].UP:
selectOffset(-1);
e.preventDefault();
break;
case KeyCode["default"].DOWN:
selectOffset(1);
e.preventDefault();
break;
case KeyCode["default"].ESC:
setOpen(false);
break;
case KeyCode["default"].SPACE:
case KeyCode["default"].ENTER:
if (selectedKey !== null) {
onTabClick(selectedKey, e);
}
break;
}
}
// ========================= Effect =========================
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
// We use query element here to avoid React strict warning
var ele = document.getElementById(selectedItemId);
if (ele && ele.scrollIntoView) {
ele.scrollIntoView(false);
}
}, [selectedKey]);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (!open) {
setSelectedKey(null);
}
}, [open]);
// ========================= Render =========================
var moreStyle = (0,defineProperty["default"])({}, rtl ? 'marginRight' : 'marginLeft', tabBarGutter);
if (!tabs.length) {
moreStyle.visibility = 'hidden';
moreStyle.order = 1;
}
var overlayClassName = classnames_default()((0,defineProperty["default"])({}, "".concat(dropdownPrefix, "-rtl"), rtl));
var moreNode = mobile ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_dropdown_es, (0,esm_extends["default"])({
prefixCls: dropdownPrefix,
overlay: menu,
visible: tabs.length ? open : false,
onVisibleChange: setOpen,
overlayClassName: classnames_default()(overlayClassName, popupClassName),
mouseEnterDelay: 0.1,
mouseLeaveDelay: 0.1,
getPopupContainer: getPopupContainer
}, moreProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
className: "".concat(prefixCls, "-nav-more"),
style: moreStyle,
"aria-haspopup": "listbox",
"aria-controls": popupId,
id: "".concat(id, "-more"),
"aria-expanded": open,
onKeyDown: onKeyDown
}, moreIcon));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-nav-operations"), className),
style: style,
ref: ref
}, moreNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_AddButton, {
prefixCls: prefixCls,
locale: locale,
editable: editable
}));
});
/* harmony default export */ var TabNavList_OperationNode = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(OperationNode, function (_, next) {
return (
// https://github.com/ant-design/ant-design/issues/32544
// We'd better remove syntactic sugar in `rc-menu` since this has perf issue
next.tabMoving
);
}));
;// ./node_modules/rc-tabs/es/TabNavList/TabNode.js
var TabNode = function TabNode(props) {
var prefixCls = props.prefixCls,
id = props.id,
active = props.active,
focus = props.focus,
_props$tab = props.tab,
key = _props$tab.key,
label = _props$tab.label,
disabled = _props$tab.disabled,
closeIcon = _props$tab.closeIcon,
icon = _props$tab.icon,
closable = props.closable,
renderWrapper = props.renderWrapper,
removeAriaLabel = props.removeAriaLabel,
editable = props.editable,
onClick = props.onClick,
onFocus = props.onFocus,
onBlur = props.onBlur,
onKeyDown = props.onKeyDown,
onMouseDown = props.onMouseDown,
onMouseUp = props.onMouseUp,
style = props.style,
tabCount = props.tabCount,
currentPosition = props.currentPosition;
var tabPrefix = "".concat(prefixCls, "-tab");
var removable = getRemovable(closable, closeIcon, editable, disabled);
function onInternalClick(e) {
if (disabled) {
return;
}
onClick(e);
}
function onRemoveTab(event) {
event.preventDefault();
event.stopPropagation();
editable.onEdit('remove', {
key: key,
event: event
});
}
var labelNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return icon && typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, label) : label;
}, [label, icon]);
var btnRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (focus && btnRef.current) {
btnRef.current.focus();
}
}, [focus]);
var node = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
key: key,
"data-node-key": genDataNodeKey(key),
className: classnames_default()(tabPrefix, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(tabPrefix, "-with-remove"), removable), "".concat(tabPrefix, "-active"), active), "".concat(tabPrefix, "-disabled"), disabled), "".concat(tabPrefix, "-focus"), focus)),
style: style,
onClick: onInternalClick
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: btnRef,
role: "tab",
"aria-selected": active,
id: id && "".concat(id, "-tab-").concat(key),
className: "".concat(tabPrefix, "-btn"),
"aria-controls": id && "".concat(id, "-panel-").concat(key),
"aria-disabled": disabled,
tabIndex: disabled ? null : active ? 0 : -1,
onClick: function onClick(e) {
e.stopPropagation();
onInternalClick(e);
},
onKeyDown: onKeyDown,
onMouseDown: onMouseDown,
onMouseUp: onMouseUp,
onFocus: onFocus,
onBlur: onBlur
}, focus && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
"aria-live": "polite",
style: {
width: 0,
height: 0,
position: 'absolute',
overflow: 'hidden',
opacity: 0
}
}, "Tab ".concat(currentPosition, " of ").concat(tabCount)), icon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(tabPrefix, "-icon")
}, icon), label && labelNode), removable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
role: "tab",
"aria-label": removeAriaLabel || 'remove',
tabIndex: active ? 0 : -1,
className: "".concat(tabPrefix, "-remove"),
onClick: function onClick(e) {
e.stopPropagation();
onRemoveTab(e);
}
}, closeIcon || editable.removeIcon || '×'));
return renderWrapper ? renderWrapper(node) : node;
};
/* harmony default export */ var TabNavList_TabNode = (TabNode);
;// ./node_modules/rc-tabs/es/TabNavList/index.js
/* eslint-disable react-hooks/exhaustive-deps */
var getTabSize = function getTabSize(tab, containerRect) {
// tabListRef
var offsetWidth = tab.offsetWidth,
offsetHeight = tab.offsetHeight,
offsetTop = tab.offsetTop,
offsetLeft = tab.offsetLeft;
var _tab$getBoundingClien = tab.getBoundingClientRect(),
width = _tab$getBoundingClien.width,
height = _tab$getBoundingClien.height,
left = _tab$getBoundingClien.left,
top = _tab$getBoundingClien.top;
// Use getBoundingClientRect to avoid decimal inaccuracy
if (Math.abs(width - offsetWidth) < 1) {
return [width, height, left - containerRect.left, top - containerRect.top];
}
return [offsetWidth, offsetHeight, offsetLeft, offsetTop];
};
var getSize = function getSize(refObj) {
var _ref = refObj.current || {},
_ref$offsetWidth = _ref.offsetWidth,
offsetWidth = _ref$offsetWidth === void 0 ? 0 : _ref$offsetWidth,
_ref$offsetHeight = _ref.offsetHeight,
offsetHeight = _ref$offsetHeight === void 0 ? 0 : _ref$offsetHeight;
// Use getBoundingClientRect to avoid decimal inaccuracy
if (refObj.current) {
var _refObj$current$getBo = refObj.current.getBoundingClientRect(),
width = _refObj$current$getBo.width,
height = _refObj$current$getBo.height;
if (Math.abs(width - offsetWidth) < 1) {
return [width, height];
}
}
return [offsetWidth, offsetHeight];
};
/**
* Convert `SizeInfo` to unit value. Such as [123, 456] with `top` position get `123`
*/
var getUnitValue = function getUnitValue(size, tabPositionTopOrBottom) {
return size[tabPositionTopOrBottom ? 0 : 1];
};
var TabNavList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var className = props.className,
style = props.style,
id = props.id,
animated = props.animated,
activeKey = props.activeKey,
rtl = props.rtl,
extra = props.extra,
editable = props.editable,
locale = props.locale,
tabPosition = props.tabPosition,
tabBarGutter = props.tabBarGutter,
children = props.children,
onTabClick = props.onTabClick,
onTabScroll = props.onTabScroll,
indicator = props.indicator;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TabContext),
prefixCls = _React$useContext.prefixCls,
tabs = _React$useContext.tabs;
var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var extraLeftRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var extraRightRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var tabsWrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var tabListRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var operationsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var innerAddButtonRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var tabPositionTopOrBottom = tabPosition === 'top' || tabPosition === 'bottom';
var _useSyncState = useSyncState_useSyncState(0, function (next, prev) {
if (tabPositionTopOrBottom && onTabScroll) {
onTabScroll({
direction: next > prev ? 'left' : 'right'
});
}
}),
_useSyncState2 = (0,slicedToArray["default"])(_useSyncState, 2),
transformLeft = _useSyncState2[0],
setTransformLeft = _useSyncState2[1];
var _useSyncState3 = useSyncState_useSyncState(0, function (next, prev) {
if (!tabPositionTopOrBottom && onTabScroll) {
onTabScroll({
direction: next > prev ? 'top' : 'bottom'
});
}
}),
_useSyncState4 = (0,slicedToArray["default"])(_useSyncState3, 2),
transformTop = _useSyncState4[0],
setTransformTop = _useSyncState4[1];
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
containerExcludeExtraSize = _useState2[0],
setContainerExcludeExtraSize = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
tabContentSize = _useState4[0],
setTabContentSize = _useState4[1];
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
_useState6 = (0,slicedToArray["default"])(_useState5, 2),
addSize = _useState6[0],
setAddSize = _useState6[1];
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
_useState8 = (0,slicedToArray["default"])(_useState7, 2),
operationSize = _useState8[0],
setOperationSize = _useState8[1];
var _useUpdateState = useUpdateState(new Map()),
_useUpdateState2 = (0,slicedToArray["default"])(_useUpdateState, 2),
tabSizes = _useUpdateState2[0],
setTabSizes = _useUpdateState2[1];
var tabOffsets = useOffsets(tabs, tabSizes, tabContentSize[0]);
// ========================== Unit =========================
var containerExcludeExtraSizeValue = getUnitValue(containerExcludeExtraSize, tabPositionTopOrBottom);
var tabContentSizeValue = getUnitValue(tabContentSize, tabPositionTopOrBottom);
var addSizeValue = getUnitValue(addSize, tabPositionTopOrBottom);
var operationSizeValue = getUnitValue(operationSize, tabPositionTopOrBottom);
var needScroll = Math.floor(containerExcludeExtraSizeValue) < Math.floor(tabContentSizeValue + addSizeValue);
var visibleTabContentValue = needScroll ? containerExcludeExtraSizeValue - operationSizeValue : containerExcludeExtraSizeValue - addSizeValue;
// ========================== Util =========================
var operationsHiddenClassName = "".concat(prefixCls, "-nav-operations-hidden");
var transformMin = 0;
var transformMax = 0;
if (!tabPositionTopOrBottom) {
transformMin = Math.min(0, visibleTabContentValue - tabContentSizeValue);
transformMax = 0;
} else if (rtl) {
transformMin = 0;
transformMax = Math.max(0, tabContentSizeValue - visibleTabContentValue);
} else {
transformMin = Math.min(0, visibleTabContentValue - tabContentSizeValue);
transformMax = 0;
}
function alignInRange(value) {
if (value < transformMin) {
return transformMin;
}
if (value > transformMax) {
return transformMax;
}
return value;
}
// ========================= Mobile ========================
var touchMovingRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
_useState10 = (0,slicedToArray["default"])(_useState9, 2),
lockAnimation = _useState10[0],
setLockAnimation = _useState10[1];
function doLockAnimation() {
setLockAnimation(Date.now());
}
function clearTouchMoving() {
if (touchMovingRef.current) {
clearTimeout(touchMovingRef.current);
}
}
useTouchMove(tabsWrapperRef, function (offsetX, offsetY) {
function doMove(setState, offset) {
setState(function (value) {
var newValue = alignInRange(value + offset);
return newValue;
});
}
// Skip scroll if place is enough
if (!needScroll) {
return false;
}
if (tabPositionTopOrBottom) {
doMove(setTransformLeft, offsetX);
} else {
doMove(setTransformTop, offsetY);
}
clearTouchMoving();
doLockAnimation();
return true;
});
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
clearTouchMoving();
if (lockAnimation) {
touchMovingRef.current = setTimeout(function () {
setLockAnimation(0);
}, 100);
}
return clearTouchMoving;
}, [lockAnimation]);
// ===================== Visible Range =====================
// Render tab node & collect tab offset
var _useVisibleRange = useVisibleRange(tabOffsets,
// Container
visibleTabContentValue,
// Transform
tabPositionTopOrBottom ? transformLeft : transformTop,
// Tabs
tabContentSizeValue,
// Add
addSizeValue,
// Operation
operationSizeValue, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
tabs: tabs
})),
_useVisibleRange2 = (0,slicedToArray["default"])(_useVisibleRange, 2),
visibleStart = _useVisibleRange2[0],
visibleEnd = _useVisibleRange2[1];
// ========================= Scroll ========================
var scrollToTab = (0,useEvent["default"])(function () {
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeKey;
var tabOffset = tabOffsets.get(key) || {
width: 0,
height: 0,
left: 0,
right: 0,
top: 0
};
if (tabPositionTopOrBottom) {
// ============ Align with top & bottom ============
var newTransform = transformLeft;
// RTL
if (rtl) {
if (tabOffset.right < transformLeft) {
newTransform = tabOffset.right;
} else if (tabOffset.right + tabOffset.width > transformLeft + visibleTabContentValue) {
newTransform = tabOffset.right + tabOffset.width - visibleTabContentValue;
}
}
// LTR
else if (tabOffset.left < -transformLeft) {
newTransform = -tabOffset.left;
} else if (tabOffset.left + tabOffset.width > -transformLeft + visibleTabContentValue) {
newTransform = -(tabOffset.left + tabOffset.width - visibleTabContentValue);
}
setTransformTop(0);
setTransformLeft(alignInRange(newTransform));
} else {
// ============ Align with left & right ============
var _newTransform = transformTop;
if (tabOffset.top < -transformTop) {
_newTransform = -tabOffset.top;
} else if (tabOffset.top + tabOffset.height > -transformTop + visibleTabContentValue) {
_newTransform = -(tabOffset.top + tabOffset.height - visibleTabContentValue);
}
setTransformLeft(0);
setTransformTop(alignInRange(_newTransform));
}
});
// ========================= Focus =========================
var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
_useState12 = (0,slicedToArray["default"])(_useState11, 2),
focusKey = _useState12[0],
setFocusKey = _useState12[1];
var _useState13 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState14 = (0,slicedToArray["default"])(_useState13, 2),
isMouse = _useState14[0],
setIsMouse = _useState14[1];
var enabledTabs = tabs.filter(function (tab) {
return !tab.disabled;
}).map(function (tab) {
return tab.key;
});
var onOffset = function onOffset(offset) {
var currentIndex = enabledTabs.indexOf(focusKey || activeKey);
var len = enabledTabs.length;
var nextIndex = (currentIndex + offset + len) % len;
var newKey = enabledTabs[nextIndex];
setFocusKey(newKey);
};
var handleKeyDown = function handleKeyDown(e) {
var code = e.code;
var isRTL = rtl && tabPositionTopOrBottom;
var firstEnabledTab = enabledTabs[0];
var lastEnabledTab = enabledTabs[enabledTabs.length - 1];
switch (code) {
// LEFT
case 'ArrowLeft':
{
if (tabPositionTopOrBottom) {
onOffset(isRTL ? 1 : -1);
}
break;
}
// RIGHT
case 'ArrowRight':
{
if (tabPositionTopOrBottom) {
onOffset(isRTL ? -1 : 1);
}
break;
}
// UP
case 'ArrowUp':
{
e.preventDefault();
if (!tabPositionTopOrBottom) {
onOffset(-1);
}
break;
}
// DOWN
case 'ArrowDown':
{
e.preventDefault();
if (!tabPositionTopOrBottom) {
onOffset(1);
}
break;
}
// HOME
case 'Home':
{
e.preventDefault();
setFocusKey(firstEnabledTab);
break;
}
// END
case 'End':
{
e.preventDefault();
setFocusKey(lastEnabledTab);
break;
}
// Enter & Space
case 'Enter':
case 'Space':
{
e.preventDefault();
onTabClick(focusKey, e);
break;
}
// Backspace
case 'Backspace':
case 'Delete':
{
var removeIndex = enabledTabs.indexOf(focusKey);
var removeTab = tabs.find(function (tab) {
return tab.key === focusKey;
});
var removable = getRemovable(removeTab === null || removeTab === void 0 ? void 0 : removeTab.closable, removeTab === null || removeTab === void 0 ? void 0 : removeTab.closeIcon, editable, removeTab === null || removeTab === void 0 ? void 0 : removeTab.disabled);
if (removable) {
e.preventDefault();
e.stopPropagation();
editable.onEdit('remove', {
key: focusKey,
event: e
});
// when remove last tab, focus previous tab
if (removeIndex === enabledTabs.length - 1) {
onOffset(-1);
} else {
onOffset(1);
}
}
break;
}
}
};
// ========================== Tab ==========================
var tabNodeStyle = {};
if (tabPositionTopOrBottom) {
tabNodeStyle[rtl ? 'marginRight' : 'marginLeft'] = tabBarGutter;
} else {
tabNodeStyle.marginTop = tabBarGutter;
}
var tabNodes = tabs.map(function (tab, i) {
var key = tab.key;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_TabNode, {
id: id,
prefixCls: prefixCls,
key: key,
tab: tab
/* first node should not have margin left */,
style: i === 0 ? undefined : tabNodeStyle,
closable: tab.closable,
editable: editable,
active: key === activeKey,
focus: key === focusKey,
renderWrapper: children,
removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel,
tabCount: enabledTabs.length,
currentPosition: i + 1,
onClick: function onClick(e) {
onTabClick(key, e);
},
onKeyDown: handleKeyDown,
onFocus: function onFocus() {
if (!isMouse) {
setFocusKey(key);
}
scrollToTab(key);
doLockAnimation();
if (!tabsWrapperRef.current) {
return;
}
// Focus element will make scrollLeft change which we should reset back
if (!rtl) {
tabsWrapperRef.current.scrollLeft = 0;
}
tabsWrapperRef.current.scrollTop = 0;
},
onBlur: function onBlur() {
setFocusKey(undefined);
},
onMouseDown: function onMouseDown() {
setIsMouse(true);
},
onMouseUp: function onMouseUp() {
setIsMouse(false);
}
});
});
// Update buttons records
var updateTabSizes = function updateTabSizes() {
return setTabSizes(function () {
var _tabListRef$current;
var newSizes = new Map();
var listRect = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.getBoundingClientRect();
tabs.forEach(function (_ref2) {
var _tabListRef$current2;
var key = _ref2.key;
var btnNode = (_tabListRef$current2 = tabListRef.current) === null || _tabListRef$current2 === void 0 ? void 0 : _tabListRef$current2.querySelector("[data-node-key=\"".concat(genDataNodeKey(key), "\"]"));
if (btnNode) {
var _getTabSize = getTabSize(btnNode, listRect),
_getTabSize2 = (0,slicedToArray["default"])(_getTabSize, 4),
width = _getTabSize2[0],
height = _getTabSize2[1],
left = _getTabSize2[2],
top = _getTabSize2[3];
newSizes.set(key, {
width: width,
height: height,
left: left,
top: top
});
}
});
return newSizes;
});
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
updateTabSizes();
}, [tabs.map(function (tab) {
return tab.key;
}).join('_')]);
var onListHolderResize = useUpdate(function () {
// Update wrapper records
var containerSize = getSize(containerRef);
var extraLeftSize = getSize(extraLeftRef);
var extraRightSize = getSize(extraRightRef);
setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]);
var newAddSize = getSize(innerAddButtonRef);
setAddSize(newAddSize);
var newOperationSize = getSize(operationsRef);
setOperationSize(newOperationSize);
// Which includes add button size
var tabContentFullSize = getSize(tabListRef);
setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]);
// Update buttons records
updateTabSizes();
});
// ======================== Dropdown =======================
var startHiddenTabs = tabs.slice(0, visibleStart);
var endHiddenTabs = tabs.slice(visibleEnd + 1);
var hiddenTabs = [].concat((0,toConsumableArray["default"])(startHiddenTabs), (0,toConsumableArray["default"])(endHiddenTabs));
// =================== Link & Operations ===================
var activeTabOffset = tabOffsets.get(activeKey);
var _useIndicator = hooks_useIndicator({
activeTabOffset: activeTabOffset,
horizontal: tabPositionTopOrBottom,
indicator: indicator,
rtl: rtl
}),
indicatorStyle = _useIndicator.style;
// ========================= Effect ========================
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
scrollToTab();
}, [activeKey, transformMin, transformMax, util_stringify(activeTabOffset), util_stringify(tabOffsets), tabPositionTopOrBottom]);
// Should recalculate when rtl changed
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
onListHolderResize();
// eslint-disable-next-line
}, [rtl]);
// ========================= Render ========================
var hasDropdown = !!hiddenTabs.length;
var wrapPrefix = "".concat(prefixCls, "-nav-wrap");
var pingLeft;
var pingRight;
var pingTop;
var pingBottom;
if (tabPositionTopOrBottom) {
if (rtl) {
pingRight = transformLeft > 0;
pingLeft = transformLeft !== transformMax;
} else {
pingLeft = transformLeft < 0;
pingRight = transformLeft !== transformMin;
}
} else {
pingTop = transformTop < 0;
pingBottom = transformTop !== transformMin;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onListHolderResize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: (0,es_ref.useComposeRef)(ref, containerRef),
role: "tablist",
"aria-orientation": tabPositionTopOrBottom ? 'horizontal' : 'vertical',
className: classnames_default()("".concat(prefixCls, "-nav"), className),
style: style,
onKeyDown: function onKeyDown() {
// No need animation when use keyboard
doLockAnimation();
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_ExtraContent, {
ref: extraLeftRef,
position: "left",
extra: extra,
prefixCls: prefixCls
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onListHolderResize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(wrapPrefix, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(wrapPrefix, "-ping-left"), pingLeft), "".concat(wrapPrefix, "-ping-right"), pingRight), "".concat(wrapPrefix, "-ping-top"), pingTop), "".concat(wrapPrefix, "-ping-bottom"), pingBottom)),
ref: tabsWrapperRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onListHolderResize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: tabListRef,
className: "".concat(prefixCls, "-nav-list"),
style: {
transform: "translate(".concat(transformLeft, "px, ").concat(transformTop, "px)"),
transition: lockAnimation ? 'none' : undefined
}
}, tabNodes, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_AddButton, {
ref: innerAddButtonRef,
prefixCls: prefixCls,
locale: locale,
editable: editable,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, tabNodes.length === 0 ? undefined : tabNodeStyle), {}, {
visibility: hasDropdown ? 'hidden' : null
})
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-ink-bar"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-ink-bar-animated"), animated.inkBar)),
style: indicatorStyle
}))))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_OperationNode, (0,esm_extends["default"])({}, props, {
removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel,
ref: operationsRef,
prefixCls: prefixCls,
tabs: hiddenTabs,
className: !hasDropdown && operationsHiddenClassName,
tabMoving: !!lockAnimation
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_ExtraContent, {
ref: extraRightRef,
position: "right",
extra: extra,
prefixCls: prefixCls
})));
/* eslint-enable */
});
/* harmony default export */ var es_TabNavList = (TabNavList);
;// ./node_modules/rc-tabs/es/TabPanelList/TabPane.js
var TabPane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
className = props.className,
style = props.style,
id = props.id,
active = props.active,
tabKey = props.tabKey,
children = props.children;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
id: id && "".concat(id, "-panel-").concat(tabKey),
role: "tabpanel",
tabIndex: active ? 0 : -1,
"aria-labelledby": id && "".concat(id, "-tab-").concat(tabKey),
"aria-hidden": !active,
style: style,
className: classnames_default()(prefixCls, active && "".concat(prefixCls, "-active"), className),
ref: ref
}, children);
});
if (true) {
TabPane.displayName = 'TabPane';
}
/* harmony default export */ var TabPanelList_TabPane = (TabPane);
;// ./node_modules/rc-tabs/es/TabNavList/Wrapper.js
var Wrapper_excluded = ["renderTabBar"],
Wrapper_excluded2 = ["label", "key"];
// zombieJ: To compatible with `renderTabBar` usage.
// We have to create a TabNavList components.
var TabNavListWrapper = function TabNavListWrapper(_ref) {
var renderTabBar = _ref.renderTabBar,
restProps = (0,objectWithoutProperties["default"])(_ref, Wrapper_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TabContext),
tabs = _React$useContext.tabs;
if (renderTabBar) {
var tabNavBarProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, restProps), {}, {
// Legacy support. We do not use this actually
panes: tabs.map(function (_ref2) {
var label = _ref2.label,
key = _ref2.key,
restTabProps = (0,objectWithoutProperties["default"])(_ref2, Wrapper_excluded2);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabPanelList_TabPane, (0,esm_extends["default"])({
tab: label,
key: key,
tabKey: key
}, restTabProps));
})
});
return renderTabBar(tabNavBarProps, es_TabNavList);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TabNavList, restProps);
};
if (true) {
TabNavListWrapper.displayName = 'TabNavListWrapper';
}
/* harmony default export */ var TabNavList_Wrapper = (TabNavListWrapper);
;// ./node_modules/rc-tabs/es/TabPanelList/index.js
var TabPanelList_excluded = ["key", "forceRender", "style", "className", "destroyInactiveTabPane"];
var TabPanelList = function TabPanelList(props) {
var id = props.id,
activeKey = props.activeKey,
animated = props.animated,
tabPosition = props.tabPosition,
destroyInactiveTabPane = props.destroyInactiveTabPane;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TabContext),
prefixCls = _React$useContext.prefixCls,
tabs = _React$useContext.tabs;
var tabPaneAnimated = animated.tabPane;
var tabPanePrefixCls = "".concat(prefixCls, "-tabpane");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-content-holder"))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-content"), "".concat(prefixCls, "-content-").concat(tabPosition), (0,defineProperty["default"])({}, "".concat(prefixCls, "-content-animated"), tabPaneAnimated))
}, tabs.map(function (item) {
var key = item.key,
forceRender = item.forceRender,
paneStyle = item.style,
paneClassName = item.className,
itemDestroyInactiveTabPane = item.destroyInactiveTabPane,
restTabProps = (0,objectWithoutProperties["default"])(item, TabPanelList_excluded);
var active = key === activeKey;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
key: key,
visible: active,
forceRender: forceRender,
removeOnLeave: !!(destroyInactiveTabPane || itemDestroyInactiveTabPane),
leavedClassName: "".concat(tabPanePrefixCls, "-hidden")
}, animated.tabPaneMotion), function (_ref, ref) {
var motionStyle = _ref.style,
motionClassName = _ref.className;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabPanelList_TabPane, (0,esm_extends["default"])({}, restTabProps, {
prefixCls: tabPanePrefixCls,
id: id,
tabKey: key,
animated: tabPaneAnimated,
active: active,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, paneStyle), motionStyle),
className: classnames_default()(paneClassName, motionClassName),
ref: ref
}));
});
})));
};
/* harmony default export */ var es_TabPanelList = (TabPanelList);
;// ./node_modules/rc-tabs/es/hooks/useAnimateConfig.js
function useAnimateConfig() {
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
inkBar: true,
tabPane: false
};
var mergedAnimated;
if (animated === false) {
mergedAnimated = {
inkBar: false,
tabPane: false
};
} else if (animated === true) {
mergedAnimated = {
inkBar: true,
tabPane: false
};
} else {
mergedAnimated = (0,objectSpread2["default"])({
inkBar: true
}, (0,esm_typeof["default"])(animated) === 'object' ? animated : {});
}
// Enable tabPane animation if provide motion
if (mergedAnimated.tabPaneMotion && mergedAnimated.tabPane === undefined) {
mergedAnimated.tabPane = true;
}
if (!mergedAnimated.tabPaneMotion && mergedAnimated.tabPane) {
if (true) {
(0,warning["default"])(false, '`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work.');
}
mergedAnimated.tabPane = false;
}
return mergedAnimated;
}
;// ./node_modules/rc-tabs/es/Tabs.js
var Tabs_excluded = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"];
// Accessibility https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role
/**
* Should added antd:
* - type
*
* Removed:
* - onNextClick
* - onPrevClick
* - keyboard
*/
// Used for accessibility
var Tabs_uuid = 0;
var Tabs = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var id = props.id,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-tabs' : _props$prefixCls,
className = props.className,
items = props.items,
direction = props.direction,
activeKey = props.activeKey,
defaultActiveKey = props.defaultActiveKey,
editable = props.editable,
animated = props.animated,
_props$tabPosition = props.tabPosition,
tabPosition = _props$tabPosition === void 0 ? 'top' : _props$tabPosition,
tabBarGutter = props.tabBarGutter,
tabBarStyle = props.tabBarStyle,
tabBarExtraContent = props.tabBarExtraContent,
locale = props.locale,
more = props.more,
destroyInactiveTabPane = props.destroyInactiveTabPane,
renderTabBar = props.renderTabBar,
onChange = props.onChange,
onTabClick = props.onTabClick,
onTabScroll = props.onTabScroll,
getPopupContainer = props.getPopupContainer,
popupClassName = props.popupClassName,
indicator = props.indicator,
restProps = (0,objectWithoutProperties["default"])(props, Tabs_excluded);
var tabs = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (items || []).filter(function (item) {
return item && (0,esm_typeof["default"])(item) === 'object' && 'key' in item;
});
}, [items]);
var rtl = direction === 'rtl';
var mergedAnimated = useAnimateConfig(animated);
// ======================== Mobile ========================
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
mobile = _useState2[0],
setMobile = _useState2[1];
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
// Only update on the client side
setMobile(isMobile());
}, []);
// ====================== Active Key ======================
var _useMergedState = (0,useMergedState["default"])(function () {
var _tabs$;
return (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key;
}, {
value: activeKey,
defaultValue: defaultActiveKey
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedActiveKey = _useMergedState2[0],
setMergedActiveKey = _useMergedState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
return tabs.findIndex(function (tab) {
return tab.key === mergedActiveKey;
});
}),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
activeIndex = _useState4[0],
setActiveIndex = _useState4[1];
// Reset active key if not exist anymore
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var newActiveIndex = tabs.findIndex(function (tab) {
return tab.key === mergedActiveKey;
});
if (newActiveIndex === -1) {
var _tabs$newActiveIndex;
newActiveIndex = Math.max(0, Math.min(activeIndex, tabs.length - 1));
setMergedActiveKey((_tabs$newActiveIndex = tabs[newActiveIndex]) === null || _tabs$newActiveIndex === void 0 ? void 0 : _tabs$newActiveIndex.key);
}
setActiveIndex(newActiveIndex);
}, [tabs.map(function (tab) {
return tab.key;
}).join('_'), mergedActiveKey, activeIndex]);
// ===================== Accessibility ====================
var _useMergedState3 = (0,useMergedState["default"])(null, {
value: id
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedId = _useMergedState4[0],
setMergedId = _useMergedState4[1];
// Async generate id to avoid ssr mapping failed
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (!id) {
setMergedId("rc-tabs-".concat( false ? 0 : Tabs_uuid));
Tabs_uuid += 1;
}
}, []);
// ======================== Events ========================
function onInternalTabClick(key, e) {
onTabClick === null || onTabClick === void 0 || onTabClick(key, e);
var isActiveChanged = key !== mergedActiveKey;
setMergedActiveKey(key);
if (isActiveChanged) {
onChange === null || onChange === void 0 || onChange(key);
}
}
// ======================== Render ========================
var sharedProps = {
id: mergedId,
activeKey: mergedActiveKey,
animated: mergedAnimated,
tabPosition: tabPosition,
rtl: rtl,
mobile: mobile
};
var tabNavBarProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedProps), {}, {
editable: editable,
locale: locale,
more: more,
tabBarGutter: tabBarGutter,
onTabClick: onInternalTabClick,
onTabScroll: onTabScroll,
extra: tabBarExtraContent,
style: tabBarStyle,
panes: null,
getPopupContainer: getPopupContainer,
popupClassName: popupClassName,
indicator: indicator
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabContext.Provider, {
value: {
tabs: tabs,
prefixCls: prefixCls
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
ref: ref,
id: id,
className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(tabPosition), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-mobile"), mobile), "".concat(prefixCls, "-editable"), editable), "".concat(prefixCls, "-rtl"), rtl), className)
}, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_Wrapper, (0,esm_extends["default"])({}, tabNavBarProps, {
renderTabBar: renderTabBar
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TabPanelList, (0,esm_extends["default"])({
destroyInactiveTabPane: destroyInactiveTabPane
}, sharedProps, {
animated: mergedAnimated
}))));
});
if (true) {
Tabs.displayName = 'Tabs';
}
/* harmony default export */ var es_Tabs = (Tabs);
;// ./node_modules/rc-tabs/es/index.js
/* harmony default export */ var rc_tabs_es = (es_Tabs);
;// ./components/tabs/hooks/useAnimateConfig.ts
const motion = {
motionAppear: false,
motionEnter: true,
motionLeave: true
};
function useAnimateConfig_useAnimateConfig(prefixCls) {
let animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
inkBar: true,
tabPane: false
};
let mergedAnimated;
if (animated === false) {
mergedAnimated = {
inkBar: false,
tabPane: false
};
} else if (animated === true) {
mergedAnimated = {
inkBar: true,
tabPane: true
};
} else {
mergedAnimated = Object.assign({
inkBar: true
}, typeof animated === 'object' ? animated : {});
}
if (mergedAnimated.tabPane) {
mergedAnimated.tabPaneMotion = Object.assign(Object.assign({}, motion), {
motionName: (0,_util_motion.getTransitionName)(prefixCls, 'switch')
});
}
return mergedAnimated;
}
;// ./components/tabs/hooks/useLegacyItems.ts
var useLegacyItems_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 filter(items) {
return items.filter(item => item);
}
function useLegacyItems(items, children) {
if (true) {
const warning = (0,_util_warning.devUseWarning)('Tabs');
warning.deprecated(!children, 'Tabs.TabPane', 'items');
}
if (items) {
return items;
}
const childrenItems = (0,toArray["default"])(children).map(node => {
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node)) {
const {
key,
props
} = node;
const _a = props || {},
{
tab
} = _a,
restProps = useLegacyItems_rest(_a, ["tab"]);
const item = Object.assign(Object.assign({
key: String(key)
}, restProps), {
label: tab
});
return item;
}
return null;
});
return filter(childrenItems);
}
// EXTERNAL MODULE: ./components/tabs/style/index.ts + 1 modules
var tabs_style = __webpack_require__("./components/tabs/style/index.ts");
;// ./components/tabs/TabPane.ts
const TabPane_TabPane = () => null;
if (true) {
TabPane_TabPane.displayName = 'DeprecatedTabPane';
}
/* harmony default export */ var tabs_TabPane = (TabPane_TabPane);
;// ./components/tabs/index.tsx
var tabs_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;
};
const tabs_Tabs = props => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
const {
type,
className,
rootClassName,
size: customSize,
onEdit,
hideAdd,
centered,
addIcon,
removeIcon,
moreIcon,
more,
popupClassName,
children,
items,
animated,
style,
indicatorSize,
indicator
} = props,
otherProps = tabs_rest(props, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator"]);
const {
prefixCls: customizePrefixCls
} = otherProps;
const {
direction,
tabs,
getPrefixCls,
getPopupContainer
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('tabs', customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,tabs_style["default"])(prefixCls, rootCls);
let editable;
if (type === 'editable-card') {
editable = {
onEdit: (editType, _ref) => {
let {
key,
event
} = _ref;
onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === 'add' ? event : key, editType);
},
removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null),
addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PlusOutlined, null),
showAdd: hideAdd !== true
};
}
const rootPrefixCls = getPrefixCls();
if (true) {
const warning = (0,_util_warning.devUseWarning)('Tabs');
true ? warning(!('onPrevClick' in props) && !('onNextClick' in props), 'breaking', '`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.') : 0;
true ? warning(!(indicatorSize || (tabs === null || tabs === void 0 ? void 0 : tabs.indicatorSize)), 'deprecated', '`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead.') : 0;
}
const size = (0,useSize["default"])(customSize);
const mergedItems = useLegacyItems(items, children);
const mergedAnimated = useAnimateConfig_useAnimateConfig(prefixCls, animated);
const mergedStyle = Object.assign(Object.assign({}, tabs === null || tabs === void 0 ? void 0 : tabs.style), style);
const mergedIndicator = {
align: (_b = indicator === null || indicator === void 0 ? void 0 : indicator.align) !== null && _b !== void 0 ? _b : (_c = tabs === null || tabs === void 0 ? void 0 : tabs.indicator) === null || _c === void 0 ? void 0 : _c.align,
size: (_g = (_e = (_d = indicator === null || indicator === void 0 ? void 0 : indicator.size) !== null && _d !== void 0 ? _d : indicatorSize) !== null && _e !== void 0 ? _e : (_f = tabs === null || tabs === void 0 ? void 0 : tabs.indicator) === null || _f === void 0 ? void 0 : _f.size) !== null && _g !== void 0 ? _g : tabs === null || tabs === void 0 ? void 0 : tabs.indicatorSize
};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tabs_es, Object.assign({
direction: direction,
getPopupContainer: getPopupContainer
}, otherProps, {
items: mergedItems,
className: classnames_default()({
[`${prefixCls}-${size}`]: size,
[`${prefixCls}-card`]: ['card', 'editable-card'].includes(type),
[`${prefixCls}-editable-card`]: type === 'editable-card',
[`${prefixCls}-centered`]: centered
}, tabs === null || tabs === void 0 ? void 0 : tabs.className, className, rootClassName, hashId, cssVarCls, rootCls),
popupClassName: classnames_default()(popupClassName, hashId, cssVarCls, rootCls),
style: mergedStyle,
editable: editable,
more: Object.assign({
icon: (_l = (_k = (_j = (_h = tabs === null || tabs === void 0 ? void 0 : tabs.more) === null || _h === void 0 ? void 0 : _h.icon) !== null && _j !== void 0 ? _j : tabs === null || tabs === void 0 ? void 0 : tabs.moreIcon) !== null && _k !== void 0 ? _k : moreIcon) !== null && _l !== void 0 ? _l : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EllipsisOutlined, null),
transitionName: `${rootPrefixCls}-slide-up`
}, more),
prefixCls: prefixCls,
animated: mergedAnimated,
indicator: mergedIndicator
})));
};
tabs_Tabs.TabPane = tabs_TabPane;
if (true) {
tabs_Tabs.displayName = 'Tabs';
}
/* harmony default export */ var components_tabs = (tabs_Tabs);
;// ./components/card/Grid.tsx
var Grid_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;
};
const Grid = _a => {
var {
prefixCls,
className,
hoverable = true
} = _a,
props = Grid_rest(_a, ["prefixCls", "className", "hoverable"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefix = getPrefixCls('card', prefixCls);
const classString = classnames_default()(`${prefix}-grid`, className, {
[`${prefix}-grid-hoverable`]: hoverable
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, props, {
className: classString
}));
};
/* harmony default export */ var card_Grid = (Grid);
// EXTERNAL MODULE: ./components/card/style/index.ts
var card_style = __webpack_require__("./components/card/style/index.ts");
;// ./components/card/Card.tsx
var Card_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;
};
const ActionNode = props => {
const {
actionClasses,
actions = [],
actionStyle
} = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: actionClasses,
style: actionStyle
}, actions.map((action, index) => {
// Move this out since eslint not allow index key
// And eslint-disable makes conflict with rollup
// ref https://github.com/ant-design/ant-design/issues/46022
const key = `action-${index}`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
style: {
width: `${100 / actions.length}%`
},
key: key
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, action));
}));
};
const Card = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
extra,
headStyle = {},
bodyStyle = {},
title,
loading,
bordered,
variant: customVariant,
size: customizeSize,
type,
cover,
actions,
tabList,
children,
activeTabKey,
defaultActiveTabKey,
tabBarExtraContent,
hoverable,
tabProps = {},
classNames: customClassNames,
styles: customStyles
} = props,
others = Card_rest(props, ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "variant", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"]);
const {
getPrefixCls,
direction,
card
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [variant] = useVariants('card', customVariant, bordered);
// =================Warning===================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Card');
[['headStyle', 'styles.header'], ['bodyStyle', 'styles.body'], ['bordered', 'variant']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
const onTabChange = key => {
var _a;
(_a = props.onTabChange) === null || _a === void 0 ? void 0 : _a.call(props, key);
};
const moduleClass = moduleName => {
var _a;
return classnames_default()((_a = card === null || card === void 0 ? void 0 : card.classNames) === null || _a === void 0 ? void 0 : _a[moduleName], customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames[moduleName]);
};
const moduleStyle = moduleName => {
var _a;
return Object.assign(Object.assign({}, (_a = card === null || card === void 0 ? void 0 : card.styles) === null || _a === void 0 ? void 0 : _a[moduleName]), customStyles === null || customStyles === void 0 ? void 0 : customStyles[moduleName]);
};
const isContainGrid = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
let containGrid = false;
external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.forEach(children, element => {
if ((element === null || element === void 0 ? void 0 : element.type) === card_Grid) {
containGrid = true;
}
});
return containGrid;
}, [children]);
const prefixCls = getPrefixCls('card', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,card_style["default"])(prefixCls);
const loadingBlock = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
loading: true,
active: true,
paragraph: {
rows: 4
},
title: false
}, children);
const hasActiveTabKey = activeTabKey !== undefined;
const extraProps = Object.assign(Object.assign({}, tabProps), {
[hasActiveTabKey ? 'activeKey' : 'defaultActiveKey']: hasActiveTabKey ? activeTabKey : defaultActiveTabKey,
tabBarExtraContent
});
let head;
const mergedSize = (0,useSize["default"])(customizeSize);
const tabSize = !mergedSize || mergedSize === 'default' ? 'large' : mergedSize;
const tabs = tabList ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tabs, Object.assign({
size: tabSize
}, extraProps, {
className: `${prefixCls}-head-tabs`,
onChange: onTabChange,
items: tabList.map(_a => {
var {
tab
} = _a,
item = Card_rest(_a, ["tab"]);
return Object.assign({
label: tab
}, item);
})
}))) : null;
if (title || extra || tabs) {
const headClasses = classnames_default()(`${prefixCls}-head`, moduleClass('header'));
const titleClasses = classnames_default()(`${prefixCls}-head-title`, moduleClass('title'));
const extraClasses = classnames_default()(`${prefixCls}-extra`, moduleClass('extra'));
const mergedHeadStyle = Object.assign(Object.assign({}, headStyle), moduleStyle('header'));
head = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: headClasses,
style: mergedHeadStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-head-wrapper`
}, title && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: titleClasses,
style: moduleStyle('title')
}, title)), extra && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: extraClasses,
style: moduleStyle('extra')
}, extra))), tabs);
}
const coverClasses = classnames_default()(`${prefixCls}-cover`, moduleClass('cover'));
const coverDom = cover ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: coverClasses,
style: moduleStyle('cover')
}, cover)) : null;
const bodyClasses = classnames_default()(`${prefixCls}-body`, moduleClass('body'));
const mergedBodyStyle = Object.assign(Object.assign({}, bodyStyle), moduleStyle('body'));
const body = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: bodyClasses,
style: mergedBodyStyle
}, loading ? loadingBlock : children);
const actionClasses = classnames_default()(`${prefixCls}-actions`, moduleClass('actions'));
const actionDom = (actions === null || actions === void 0 ? void 0 : actions.length) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ActionNode, {
actionClasses: actionClasses,
actionStyle: moduleStyle('actions'),
actions: actions
})) : null;
const divProps = (0,omit["default"])(others, ['onTabChange']);
const classString = classnames_default()(prefixCls, card === null || card === void 0 ? void 0 : card.className, {
[`${prefixCls}-loading`]: loading,
[`${prefixCls}-bordered`]: variant !== 'borderless',
[`${prefixCls}-hoverable`]: hoverable,
[`${prefixCls}-contain-grid`]: isContainGrid,
[`${prefixCls}-contain-tabs`]: tabList === null || tabList === void 0 ? void 0 : tabList.length,
[`${prefixCls}-${mergedSize}`]: mergedSize,
[`${prefixCls}-type-${type}`]: !!type,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, card === null || card === void 0 ? void 0 : card.style), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
ref: ref
}, divProps, {
className: classString,
style: mergedStyle
}), head, coverDom, body, actionDom));
});
/* harmony default export */ var card_Card = (Card);
;// ./components/card/Meta.tsx
var Meta_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;
};
const Meta = props => {
const {
prefixCls: customizePrefixCls,
className,
avatar,
title,
description
} = props,
others = Meta_rest(props, ["prefixCls", "className", "avatar", "title", "description"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('card', customizePrefixCls);
const classString = classnames_default()(`${prefixCls}-meta`, className);
const avatarDom = avatar ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-meta-avatar`
}, avatar)) : null;
const titleDom = title ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-meta-title`
}, title)) : null;
const descriptionDom = description ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-meta-description`
}, description)) : null;
const MetaDetail = titleDom || descriptionDom ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-meta-detail`
}, titleDom, descriptionDom)) : null;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
className: classString
}), avatarDom, MetaDetail);
};
/* harmony default export */ var card_Meta = (Meta);
;// ./components/card/index.tsx
const components_card_Card = card_Card;
components_card_Card.Grid = card_Grid;
components_card_Card.Meta = card_Meta;
if (true) {
components_card_Card.displayName = 'Card';
}
/* harmony default export */ var card = (components_card_Card);
;// ./node_modules/@ant-design/react-slick/es/initial-state.js
var initialState = {
animating: false,
autoplaying: null,
currentDirection: 0,
currentLeft: null,
currentSlide: 0,
direction: 1,
dragging: false,
edgeDragged: false,
initialized: false,
lazyLoadedList: [],
listHeight: null,
listWidth: null,
scrolling: false,
slideCount: null,
slideHeight: null,
slideWidth: null,
swipeLeft: null,
swiped: false,
// used by swipeEvent. differentites between touch and swipe.
swiping: false,
touchObject: {
startX: 0,
startY: 0,
curX: 0,
curY: 0
},
trackStyle: {},
trackWidth: 0,
targetSlide: 0
};
/* harmony default export */ var initial_state = (initialState);
;// ./node_modules/throttle-debounce/esm/index.js
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
/**
* Throttle execution of a function. Especially useful for rate limiting
* execution of handlers on events like resize and scroll.
*
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
* are most useful.
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
* as-is, to `callback` when the throttled-function is executed.
* @param {object} [options] - An object to configure options.
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
* one final time after the last throttled-function call. (After the throttled-function has not been called for
* `delay` milliseconds, the internal counter is reset).
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
* callback will never executed if both noLeading = true and noTrailing = true.
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
* false (at end), schedule `callback` to execute after `delay` ms.
*
* @returns {Function} A new, throttled, function.
*/
function esm_throttle (delay, callback, options) {
var _ref = options || {},
_ref$noTrailing = _ref.noTrailing,
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
_ref$noLeading = _ref.noLeading,
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
_ref$debounceMode = _ref.debounceMode,
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
/*
* After wrapper has stopped being called, this timeout ensures that
* `callback` is executed at the proper times in `throttle` and `end`
* debounce modes.
*/
var timeoutID;
var cancelled = false;
// Keep track of the last time `callback` was executed.
var lastExec = 0;
// Function to clear existing timeout
function clearExistingTimeout() {
if (timeoutID) {
clearTimeout(timeoutID);
}
}
// Function to cancel next exec
function cancel(options) {
var _ref2 = options || {},
_ref2$upcomingOnly = _ref2.upcomingOnly,
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
clearExistingTimeout();
cancelled = !upcomingOnly;
}
/*
* The `wrapper` function encapsulates all of the throttling / debouncing
* functionality and when executed will limit the rate at which `callback`
* is executed.
*/
function wrapper() {
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
arguments_[_key] = arguments[_key];
}
var self = this;
var elapsed = Date.now() - lastExec;
if (cancelled) {
return;
}
// Execute `callback` and update the `lastExec` timestamp.
function exec() {
lastExec = Date.now();
callback.apply(self, arguments_);
}
/*
* If `debounceMode` is true (at begin) this is used to clear the flag
* to allow future `callback` executions.
*/
function clear() {
timeoutID = undefined;
}
if (!noLeading && debounceMode && !timeoutID) {
/*
* Since `wrapper` is being called for the first time and
* `debounceMode` is true (at begin), execute `callback`
* and noLeading != true.
*/
exec();
}
clearExistingTimeout();
if (debounceMode === undefined && elapsed > delay) {
if (noLeading) {
/*
* In throttle mode with noLeading, if `delay` time has
* been exceeded, update `lastExec` and schedule `callback`
* to execute after `delay` ms.
*/
lastExec = Date.now();
if (!noTrailing) {
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
}
} else {
/*
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
* `callback`.
*/
exec();
}
} else if (noTrailing !== true) {
/*
* In trailing throttle mode, since `delay` time has not been
* exceeded, schedule `callback` to execute `delay` ms after most
* recent execution.
*
* If `debounceMode` is true (at begin), schedule `clear` to execute
* after `delay` ms.
*
* If `debounceMode` is false (at end), schedule `callback` to
* execute after `delay` ms.
*/
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
}
}
wrapper.cancel = cancel;
// Return the wrapper function.
return wrapper;
}
/* eslint-disable no-undefined */
/**
* Debounce execution of a function. Debouncing, unlike throttling,
* guarantees that a function is only executed a single time, either at the
* very beginning of a series of calls, or at the very end.
*
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
* to `callback` when the debounced-function is executed.
* @param {object} [options] - An object to configure options.
* @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
*
* @returns {Function} A new, debounced function.
*/
function debounce (delay, callback, options) {
var _ref = options || {},
_ref$atBegin = _ref.atBegin,
atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
return esm_throttle(delay, callback, {
debounceMode: atBegin !== false
});
}
//# sourceMappingURL=index.js.map
;// ./node_modules/@ant-design/react-slick/es/default-props.js
var defaultProps = {
accessibility: true,
adaptiveHeight: false,
afterChange: null,
appendDots: function appendDots(dots) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
style: {
display: "block"
}
}, dots);
},
arrows: true,
autoplay: false,
autoplaySpeed: 3000,
beforeChange: null,
centerMode: false,
centerPadding: "50px",
className: "",
cssEase: "ease",
customPaging: function customPaging(i) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", null, i + 1);
},
dots: false,
dotsClass: "slick-dots",
draggable: true,
easing: "linear",
edgeFriction: 0.35,
fade: false,
focusOnSelect: false,
infinite: true,
initialSlide: 0,
lazyLoad: null,
nextArrow: null,
onEdge: null,
onInit: null,
onLazyLoadError: null,
onReInit: null,
pauseOnDotsHover: false,
pauseOnFocus: false,
pauseOnHover: true,
prevArrow: null,
responsive: null,
rows: 1,
rtl: false,
slide: "div",
slidesPerRow: 1,
slidesToScroll: 1,
slidesToShow: 1,
speed: 500,
swipe: true,
swipeEvent: null,
swipeToSlide: false,
touchMove: true,
touchThreshold: 5,
useCSS: true,
useTransform: true,
variableWidth: false,
vertical: false,
waitForAnimate: true,
asNavFor: null
};
/* harmony default export */ var default_props = (defaultProps);
;// ./node_modules/@ant-design/react-slick/es/utils/innerSliderUtils.js
function clamp(number, lowerBound, upperBound) {
return Math.max(lowerBound, Math.min(number, upperBound));
}
var safePreventDefault = function safePreventDefault(event) {
var passiveEvents = ["onTouchStart", "onTouchMove", "onWheel"];
if (!passiveEvents.includes(event._reactName)) {
event.preventDefault();
}
};
var getOnDemandLazySlides = function getOnDemandLazySlides(spec) {
var onDemandSlides = [];
var startIndex = lazyStartIndex(spec);
var endIndex = lazyEndIndex(spec);
for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {
onDemandSlides.push(slideIndex);
}
}
return onDemandSlides;
};
// return list of slides that need to be present
var getRequiredLazySlides = function getRequiredLazySlides(spec) {
var requiredSlides = [];
var startIndex = lazyStartIndex(spec);
var endIndex = lazyEndIndex(spec);
for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
requiredSlides.push(slideIndex);
}
return requiredSlides;
};
// startIndex that needs to be present
var lazyStartIndex = function lazyStartIndex(spec) {
return spec.currentSlide - lazySlidesOnLeft(spec);
};
var lazyEndIndex = function lazyEndIndex(spec) {
return spec.currentSlide + lazySlidesOnRight(spec);
};
var lazySlidesOnLeft = function lazySlidesOnLeft(spec) {
return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;
};
var lazySlidesOnRight = function lazySlidesOnRight(spec) {
return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;
};
// get width of an element
var innerSliderUtils_getWidth = function getWidth(elem) {
return elem && elem.offsetWidth || 0;
};
var getHeight = function getHeight(elem) {
return elem && elem.offsetHeight || 0;
};
var getSwipeDirection = function getSwipeDirection(touchObject) {
var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var xDist, yDist, r, swipeAngle;
xDist = touchObject.startX - touchObject.curX;
yDist = touchObject.startY - touchObject.curY;
r = Math.atan2(yDist, xDist);
swipeAngle = Math.round(r * 180 / Math.PI);
if (swipeAngle < 0) {
swipeAngle = 360 - Math.abs(swipeAngle);
}
if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {
return "left";
}
if (swipeAngle >= 135 && swipeAngle <= 225) {
return "right";
}
if (verticalSwiping === true) {
if (swipeAngle >= 35 && swipeAngle <= 135) {
return "up";
} else {
return "down";
}
}
return "vertical";
};
// whether or not we can go next
var canGoNext = function canGoNext(spec) {
var canGo = true;
if (!spec.infinite) {
if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {
canGo = false;
} else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {
canGo = false;
}
}
return canGo;
};
// given an object and a list of keys, return new object with given keys
var extractObject = function extractObject(spec, keys) {
var newObject = {};
keys.forEach(function (key) {
return newObject[key] = spec[key];
});
return newObject;
};
// get initialized state
var initializedState = function initializedState(spec) {
// spec also contains listRef, trackRef
var slideCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(spec.children);
var listNode = spec.listRef;
var listWidth = Math.ceil(innerSliderUtils_getWidth(listNode));
var trackNode = spec.trackRef && spec.trackRef.node;
var trackWidth = Math.ceil(innerSliderUtils_getWidth(trackNode));
var slideWidth;
if (!spec.vertical) {
var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;
if (typeof spec.centerPadding === "string" && spec.centerPadding.slice(-1) === "%") {
centerPaddingAdj *= listWidth / 100;
}
slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);
} else {
slideWidth = listWidth;
}
var slideHeight = listNode && getHeight(listNode.querySelector('[data-index="0"]'));
var listHeight = slideHeight * spec.slidesToShow;
var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;
if (spec.rtl && spec.currentSlide === undefined) {
currentSlide = slideCount - 1 - spec.initialSlide;
}
var lazyLoadedList = spec.lazyLoadedList || [];
var slidesToLoad = getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
currentSlide: currentSlide,
lazyLoadedList: lazyLoadedList
}));
lazyLoadedList = lazyLoadedList.concat(slidesToLoad);
var state = {
slideCount: slideCount,
slideWidth: slideWidth,
listWidth: listWidth,
trackWidth: trackWidth,
currentSlide: currentSlide,
slideHeight: slideHeight,
listHeight: listHeight,
lazyLoadedList: lazyLoadedList
};
if (spec.autoplaying === null && spec.autoplay) {
state["autoplaying"] = "playing";
}
return state;
};
var slideHandler = function slideHandler(spec) {
var waitForAnimate = spec.waitForAnimate,
animating = spec.animating,
fade = spec.fade,
infinite = spec.infinite,
index = spec.index,
slideCount = spec.slideCount,
lazyLoad = spec.lazyLoad,
currentSlide = spec.currentSlide,
centerMode = spec.centerMode,
slidesToScroll = spec.slidesToScroll,
slidesToShow = spec.slidesToShow,
useCSS = spec.useCSS;
var lazyLoadedList = spec.lazyLoadedList;
if (waitForAnimate && animating) return {};
var animationSlide = index,
finalSlide,
animationLeft,
finalLeft;
var state = {},
nextState = {};
var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);
if (fade) {
if (!infinite && (index < 0 || index >= slideCount)) return {};
if (index < 0) {
animationSlide = index + slideCount;
} else if (index >= slideCount) {
animationSlide = index - slideCount;
}
if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {
lazyLoadedList = lazyLoadedList.concat(animationSlide);
}
state = {
animating: true,
currentSlide: animationSlide,
lazyLoadedList: lazyLoadedList,
targetSlide: animationSlide
};
nextState = {
animating: false,
targetSlide: animationSlide
};
} else {
finalSlide = animationSlide;
if (animationSlide < 0) {
finalSlide = animationSlide + slideCount;
if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;
} else if (!canGoNext(spec) && animationSlide > currentSlide) {
animationSlide = finalSlide = currentSlide;
} else if (centerMode && animationSlide >= slideCount) {
animationSlide = infinite ? slideCount : slideCount - 1;
finalSlide = infinite ? 0 : slideCount - 1;
} else if (animationSlide >= slideCount) {
finalSlide = animationSlide - slideCount;
if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;
}
if (!infinite && animationSlide + slidesToShow >= slideCount) {
finalSlide = slideCount - slidesToShow;
}
animationLeft = getTrackLeft((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
slideIndex: animationSlide
}));
finalLeft = getTrackLeft((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
slideIndex: finalSlide
}));
if (!infinite) {
if (animationLeft === finalLeft) animationSlide = finalSlide;
animationLeft = finalLeft;
}
if (lazyLoad) {
lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
currentSlide: animationSlide
})));
}
if (!useCSS) {
state = {
currentSlide: finalSlide,
trackStyle: getTrackCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
left: finalLeft
})),
lazyLoadedList: lazyLoadedList,
targetSlide: targetSlide
};
} else {
state = {
animating: true,
currentSlide: finalSlide,
trackStyle: getTrackAnimateCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
left: animationLeft
})),
lazyLoadedList: lazyLoadedList,
targetSlide: targetSlide
};
nextState = {
animating: false,
currentSlide: finalSlide,
trackStyle: getTrackCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
left: finalLeft
})),
swipeLeft: null,
targetSlide: targetSlide
};
}
}
return {
state: state,
nextState: nextState
};
};
var changeSlide = function changeSlide(spec, options) {
var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
var slidesToScroll = spec.slidesToScroll,
slidesToShow = spec.slidesToShow,
slideCount = spec.slideCount,
currentSlide = spec.currentSlide,
previousTargetSlide = spec.targetSlide,
lazyLoad = spec.lazyLoad,
infinite = spec.infinite;
unevenOffset = slideCount % slidesToScroll !== 0;
indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;
if (options.message === "previous") {
slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;
targetSlide = currentSlide - slideOffset;
if (lazyLoad && !infinite) {
previousInt = currentSlide - slideOffset;
targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;
}
if (!infinite) {
targetSlide = previousTargetSlide - slidesToScroll;
}
} else if (options.message === "next") {
slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;
targetSlide = currentSlide + slideOffset;
if (lazyLoad && !infinite) {
targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;
}
if (!infinite) {
targetSlide = previousTargetSlide + slidesToScroll;
}
} else if (options.message === "dots") {
// Click on dots
targetSlide = options.index * options.slidesToScroll;
} else if (options.message === "children") {
// Click on the slides
targetSlide = options.index;
if (infinite) {
var direction = siblingDirection((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
targetSlide: targetSlide
}));
if (targetSlide > options.currentSlide && direction === "left") {
targetSlide = targetSlide - slideCount;
} else if (targetSlide < options.currentSlide && direction === "right") {
targetSlide = targetSlide + slideCount;
}
}
} else if (options.message === "index") {
targetSlide = Number(options.index);
}
return targetSlide;
};
var keyHandler = function keyHandler(e, accessibility, rtl) {
if (e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !accessibility) return "";
if (e.keyCode === 37) return rtl ? "next" : "previous";
if (e.keyCode === 39) return rtl ? "previous" : "next";
return "";
};
var swipeStart = function swipeStart(e, swipe, draggable) {
e.target.tagName === "IMG" && safePreventDefault(e);
if (!swipe || !draggable && e.type.indexOf("mouse") !== -1) return "";
return {
dragging: true,
touchObject: {
startX: e.touches ? e.touches[0].pageX : e.clientX,
startY: e.touches ? e.touches[0].pageY : e.clientY,
curX: e.touches ? e.touches[0].pageX : e.clientX,
curY: e.touches ? e.touches[0].pageY : e.clientY
}
};
};
var swipeMove = function swipeMove(e, spec) {
// spec also contains, trackRef and slideIndex
var scrolling = spec.scrolling,
animating = spec.animating,
vertical = spec.vertical,
swipeToSlide = spec.swipeToSlide,
verticalSwiping = spec.verticalSwiping,
rtl = spec.rtl,
currentSlide = spec.currentSlide,
edgeFriction = spec.edgeFriction,
edgeDragged = spec.edgeDragged,
onEdge = spec.onEdge,
swiped = spec.swiped,
swiping = spec.swiping,
slideCount = spec.slideCount,
slidesToScroll = spec.slidesToScroll,
infinite = spec.infinite,
touchObject = spec.touchObject,
swipeEvent = spec.swipeEvent,
listHeight = spec.listHeight,
listWidth = spec.listWidth;
if (scrolling) return;
if (animating) return safePreventDefault(e);
if (vertical && swipeToSlide && verticalSwiping) safePreventDefault(e);
var swipeLeft,
state = {};
var curLeft = getTrackLeft(spec);
touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;
touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;
touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));
var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));
if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {
return {
scrolling: true
};
}
if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;
var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);
if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;
var dotCount = Math.ceil(slideCount / slidesToScroll);
var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);
var touchSwipeLength = touchObject.swipeLength;
if (!infinite) {
if (currentSlide === 0 && (swipeDirection === "right" || swipeDirection === "down") || currentSlide + 1 >= dotCount && (swipeDirection === "left" || swipeDirection === "up") || !canGoNext(spec) && (swipeDirection === "left" || swipeDirection === "up")) {
touchSwipeLength = touchObject.swipeLength * edgeFriction;
if (edgeDragged === false && onEdge) {
onEdge(swipeDirection);
state["edgeDragged"] = true;
}
}
}
if (!swiped && swipeEvent) {
swipeEvent(swipeDirection);
state["swiped"] = true;
}
if (!vertical) {
if (!rtl) {
swipeLeft = curLeft + touchSwipeLength * positionOffset;
} else {
swipeLeft = curLeft - touchSwipeLength * positionOffset;
}
} else {
swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;
}
if (verticalSwiping) {
swipeLeft = curLeft + touchSwipeLength * positionOffset;
}
state = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
touchObject: touchObject,
swipeLeft: swipeLeft,
trackStyle: getTrackCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
left: swipeLeft
}))
});
if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {
return state;
}
if (touchObject.swipeLength > 10) {
state["swiping"] = true;
safePreventDefault(e);
}
return state;
};
var swipeEnd = function swipeEnd(e, spec) {
var dragging = spec.dragging,
swipe = spec.swipe,
touchObject = spec.touchObject,
listWidth = spec.listWidth,
touchThreshold = spec.touchThreshold,
verticalSwiping = spec.verticalSwiping,
listHeight = spec.listHeight,
swipeToSlide = spec.swipeToSlide,
scrolling = spec.scrolling,
onSwipe = spec.onSwipe,
targetSlide = spec.targetSlide,
currentSlide = spec.currentSlide,
infinite = spec.infinite;
if (!dragging) {
if (swipe) safePreventDefault(e);
return {};
}
var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;
var swipeDirection = getSwipeDirection(touchObject, verticalSwiping);
// reset the state of touch related state variables.
var state = {
dragging: false,
edgeDragged: false,
scrolling: false,
swiping: false,
swiped: false,
swipeLeft: null,
touchObject: {}
};
if (scrolling) {
return state;
}
if (!touchObject.swipeLength) {
return state;
}
if (touchObject.swipeLength > minSwipe) {
safePreventDefault(e);
if (onSwipe) {
onSwipe(swipeDirection);
}
var slideCount, newSlide;
var activeSlide = infinite ? currentSlide : targetSlide;
switch (swipeDirection) {
case "left":
case "up":
newSlide = activeSlide + getSlideCount(spec);
slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
state["currentDirection"] = 0;
break;
case "right":
case "down":
newSlide = activeSlide - getSlideCount(spec);
slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
state["currentDirection"] = 1;
break;
default:
slideCount = activeSlide;
}
state["triggerSlideHandler"] = slideCount;
} else {
// Adjust the track back to it's original position.
var currentLeft = getTrackLeft(spec);
state["trackStyle"] = getTrackAnimateCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
left: currentLeft
}));
}
return state;
};
var getNavigableIndexes = function getNavigableIndexes(spec) {
var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;
var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;
var counter = spec.infinite ? spec.slidesToShow * -1 : 0;
var indexes = [];
while (breakpoint < max) {
indexes.push(breakpoint);
breakpoint = counter + spec.slidesToScroll;
counter += Math.min(spec.slidesToScroll, spec.slidesToShow);
}
return indexes;
};
var checkNavigable = function checkNavigable(spec, index) {
var navigables = getNavigableIndexes(spec);
var prevNavigable = 0;
if (index > navigables[navigables.length - 1]) {
index = navigables[navigables.length - 1];
} else {
for (var n in navigables) {
if (index < navigables[n]) {
index = prevNavigable;
break;
}
prevNavigable = navigables[n];
}
}
return index;
};
var getSlideCount = function getSlideCount(spec) {
var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;
if (spec.swipeToSlide) {
var swipedSlide;
var slickList = spec.listRef;
var slides = slickList.querySelectorAll && slickList.querySelectorAll(".slick-slide") || [];
Array.from(slides).every(function (slide) {
if (!spec.vertical) {
if (slide.offsetLeft - centerOffset + innerSliderUtils_getWidth(slide) / 2 > spec.swipeLeft * -1) {
swipedSlide = slide;
return false;
}
} else {
if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {
swipedSlide = slide;
return false;
}
}
return true;
});
if (!swipedSlide) {
return 0;
}
var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;
var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;
return slidesTraversed;
} else {
return spec.slidesToScroll;
}
};
var checkSpecKeys = function checkSpecKeys(spec, keysArray) {
return (
// eslint-disable-next-line no-prototype-builtins
keysArray.reduce(function (value, key) {
return value && spec.hasOwnProperty(key);
}, true) ? null : console.error("Keys Missing:", spec)
);
};
var getTrackCSS = function getTrackCSS(spec) {
checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth"]);
var trackWidth, trackHeight;
if (!spec.vertical) {
trackWidth = getTotalSlides(spec) * spec.slideWidth;
} else {
var trackChildren = spec.unslick ? spec.slideCount : spec.slideCount + 2 * spec.slidesToShow;
trackHeight = trackChildren * spec.slideHeight;
}
var style = {
opacity: 1,
transition: "",
WebkitTransition: ""
};
if (spec.useTransform) {
var WebkitTransform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
var transform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
var msTransform = !spec.vertical ? "translateX(" + spec.left + "px)" : "translateY(" + spec.left + "px)";
style = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
WebkitTransform: WebkitTransform,
transform: transform,
msTransform: msTransform
});
} else {
if (spec.vertical) {
style["top"] = spec.left;
} else {
style["left"] = spec.left;
}
}
if (spec.fade) style = {
opacity: 1
};
if (trackWidth) style.width = trackWidth;
if (trackHeight) style.height = trackHeight;
// Fallback for IE8
if (window && !window.addEventListener && window.attachEvent) {
if (!spec.vertical) {
style.marginLeft = spec.left + "px";
} else {
style.marginTop = spec.left + "px";
}
}
return style;
};
var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth", "speed", "cssEase"]);
var style = getTrackCSS(spec);
// useCSS is true by default so it can be undefined
if (spec.useTransform) {
style.WebkitTransition = "-webkit-transform " + spec.speed + "ms " + spec.cssEase;
style.transition = "transform " + spec.speed + "ms " + spec.cssEase;
} else {
if (spec.vertical) {
style.transition = "top " + spec.speed + "ms " + spec.cssEase;
} else {
style.transition = "left " + spec.speed + "ms " + spec.cssEase;
}
}
return style;
};
var getTrackLeft = function getTrackLeft(spec) {
if (spec.unslick) {
return 0;
}
checkSpecKeys(spec, ["slideIndex", "trackRef", "infinite", "centerMode", "slideCount", "slidesToShow", "slidesToScroll", "slideWidth", "listWidth", "variableWidth", "slideHeight"]);
var slideIndex = spec.slideIndex,
trackRef = spec.trackRef,
infinite = spec.infinite,
centerMode = spec.centerMode,
slideCount = spec.slideCount,
slidesToShow = spec.slidesToShow,
slidesToScroll = spec.slidesToScroll,
slideWidth = spec.slideWidth,
listWidth = spec.listWidth,
variableWidth = spec.variableWidth,
slideHeight = spec.slideHeight,
fade = spec.fade,
vertical = spec.vertical;
var slideOffset = 0;
var targetLeft;
var targetSlide;
var verticalOffset = 0;
if (fade || spec.slideCount === 1) {
return 0;
}
var slidesToOffset = 0;
if (infinite) {
slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area
// if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children
if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);
}
// shift current slide to center of the frame
if (centerMode) {
slidesToOffset += parseInt(slidesToShow / 2);
}
} else {
if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
slidesToOffset = slidesToShow - slideCount % slidesToScroll;
}
if (centerMode) {
slidesToOffset = parseInt(slidesToShow / 2);
}
}
slideOffset = slidesToOffset * slideWidth;
verticalOffset = slidesToOffset * slideHeight;
if (!vertical) {
targetLeft = slideIndex * slideWidth * -1 + slideOffset;
} else {
targetLeft = slideIndex * slideHeight * -1 + verticalOffset;
}
if (variableWidth === true) {
var targetSlideIndex;
var trackElem = trackRef && trackRef.node;
targetSlideIndex = slideIndex + getPreClones(spec);
targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];
targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;
if (centerMode === true) {
targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;
targetSlide = trackElem && trackElem.children[targetSlideIndex];
targetLeft = 0;
for (var slide = 0; slide < targetSlideIndex; slide++) {
targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;
}
targetLeft -= parseInt(spec.centerPadding);
targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;
}
}
return targetLeft;
};
var getPreClones = function getPreClones(spec) {
if (spec.unslick || !spec.infinite) {
return 0;
}
if (spec.variableWidth) {
return spec.slideCount;
}
return spec.slidesToShow + (spec.centerMode ? 1 : 0);
};
var getPostClones = function getPostClones(spec) {
if (spec.unslick || !spec.infinite) {
return 0;
}
return spec.slideCount;
};
var getTotalSlides = function getTotalSlides(spec) {
return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);
};
var siblingDirection = function siblingDirection(spec) {
if (spec.targetSlide > spec.currentSlide) {
if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {
return "left";
}
return "right";
} else {
if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {
return "right";
}
return "left";
}
};
var slidesOnRight = function slidesOnRight(_ref) {
var slidesToShow = _ref.slidesToShow,
centerMode = _ref.centerMode,
rtl = _ref.rtl,
centerPadding = _ref.centerPadding;
// returns no of slides on the right of active slide
if (centerMode) {
var right = (slidesToShow - 1) / 2 + 1;
if (parseInt(centerPadding) > 0) right += 1;
if (rtl && slidesToShow % 2 === 0) right += 1;
return right;
}
if (rtl) {
return 0;
}
return slidesToShow - 1;
};
var slidesOnLeft = function slidesOnLeft(_ref2) {
var slidesToShow = _ref2.slidesToShow,
centerMode = _ref2.centerMode,
rtl = _ref2.rtl,
centerPadding = _ref2.centerPadding;
// returns no of slides on the left of active slide
if (centerMode) {
var left = (slidesToShow - 1) / 2 + 1;
if (parseInt(centerPadding) > 0) left += 1;
if (!rtl && slidesToShow % 2 === 0) left += 1;
return left;
}
if (rtl) {
return slidesToShow - 1;
}
return 0;
};
var canUseDOM = function canUseDOM() {
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
};
var validSettings = Object.keys(default_props);
function filterSettings(settings) {
return validSettings.reduce(function (acc, settingName) {
if (settings.hasOwnProperty(settingName)) {
acc[settingName] = settings[settingName];
}
return acc;
}, {});
}
;// ./node_modules/@ant-design/react-slick/es/track.js
function track_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
// given specifications/props for a slide, fetch all the classes that need to be applied to the slide
var getSlideClasses = function getSlideClasses(spec) {
var slickActive, slickCenter, slickCloned;
var centerOffset, index;
if (spec.rtl) {
index = spec.slideCount - 1 - spec.index;
} else {
index = spec.index;
}
slickCloned = index < 0 || index >= spec.slideCount;
if (spec.centerMode) {
centerOffset = Math.floor(spec.slidesToShow / 2);
slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;
if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {
slickActive = true;
}
} else {
slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;
}
var focusedSlide;
if (spec.targetSlide < 0) {
focusedSlide = spec.targetSlide + spec.slideCount;
} else if (spec.targetSlide >= spec.slideCount) {
focusedSlide = spec.targetSlide - spec.slideCount;
} else {
focusedSlide = spec.targetSlide;
}
var slickCurrent = index === focusedSlide;
return {
"slick-slide": true,
"slick-active": slickActive,
"slick-center": slickCenter,
"slick-cloned": slickCloned,
"slick-current": slickCurrent // dubious in case of RTL
};
};
var getSlideStyle = function getSlideStyle(spec) {
var style = {};
if (spec.variableWidth === undefined || spec.variableWidth === false) {
style.width = spec.slideWidth;
}
if (spec.fade) {
style.position = "relative";
if (spec.vertical && spec.slideHeight) {
style.top = -spec.index * parseInt(spec.slideHeight);
} else {
style.left = -spec.index * parseInt(spec.slideWidth);
}
style.opacity = spec.currentSlide === spec.index ? 1 : 0;
style.zIndex = spec.currentSlide === spec.index ? 999 : 998;
if (spec.useCSS) {
style.transition = "opacity " + spec.speed + "ms " + spec.cssEase + ", " + "visibility " + spec.speed + "ms " + spec.cssEase;
}
}
return style;
};
var track_getKey = function getKey(child, fallbackKey) {
return child.key + "-" + fallbackKey;
};
var renderSlides = function renderSlides(spec) {
var key;
var slides = [];
var preCloneSlides = [];
var postCloneSlides = [];
var childrenCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(spec.children);
var startIndex = lazyStartIndex(spec);
var endIndex = lazyEndIndex(spec);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(spec.children, function (elem, index) {
var child;
var childOnClickOptions = {
message: "children",
index: index,
slidesToScroll: spec.slidesToScroll,
currentSlide: spec.currentSlide
};
// in case of lazyLoad, whether or not we want to fetch the slide
if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {
child = elem;
} else {
child = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", null);
}
var childStyle = getSlideStyle((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
index: index
}));
var slideClass = child.props.className || "";
var slideClasses = getSlideClasses((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
index: index
}));
// push a cloned element of the desired slide
slides.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
key: "original" + track_getKey(child, index),
"data-index": index,
className: classnames_default()(slideClasses, slideClass),
tabIndex: "-1",
"aria-hidden": !slideClasses["slick-active"],
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({
outline: "none"
}, child.props.style || {}), childStyle),
onClick: function onClick(e) {
child.props && child.props.onClick && child.props.onClick(e);
if (spec.focusOnSelect) {
spec.focusOnSelect(childOnClickOptions);
}
}
}));
// if slide needs to be precloned or postcloned
if (spec.infinite && childrenCount > 1 && spec.fade === false && !spec.unslick) {
var preCloneNo = childrenCount - index;
if (preCloneNo <= getPreClones(spec)) {
key = -preCloneNo;
if (key >= startIndex) {
child = elem;
}
slideClasses = getSlideClasses((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
index: key
}));
preCloneSlides.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
key: "precloned" + track_getKey(child, key),
"data-index": key,
tabIndex: "-1",
className: classnames_default()(slideClasses, slideClass),
"aria-hidden": !slideClasses["slick-active"],
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, child.props.style || {}), childStyle),
onClick: function onClick(e) {
child.props && child.props.onClick && child.props.onClick(e);
if (spec.focusOnSelect) {
spec.focusOnSelect(childOnClickOptions);
}
}
}));
}
key = childrenCount + index;
if (key < endIndex) {
child = elem;
}
slideClasses = getSlideClasses((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
index: key
}));
postCloneSlides.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
key: "postcloned" + track_getKey(child, key),
"data-index": key,
tabIndex: "-1",
className: classnames_default()(slideClasses, slideClass),
"aria-hidden": !slideClasses["slick-active"],
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, child.props.style || {}), childStyle),
onClick: function onClick(e) {
child.props && child.props.onClick && child.props.onClick(e);
if (spec.focusOnSelect) {
spec.focusOnSelect(childOnClickOptions);
}
}
}));
}
});
if (spec.rtl) {
return preCloneSlides.concat(slides, postCloneSlides).reverse();
} else {
return preCloneSlides.concat(slides, postCloneSlides);
}
};
var Track = /*#__PURE__*/function (_React$PureComponent) {
function Track() {
var _this;
(0,classCallCheck["default"])(this, Track);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = track_callSuper(this, Track, [].concat(args));
(0,defineProperty["default"])(_this, "node", null);
(0,defineProperty["default"])(_this, "handleRef", function (ref) {
_this.node = ref;
});
return _this;
}
(0,inherits["default"])(Track, _React$PureComponent);
return (0,createClass["default"])(Track, [{
key: "render",
value: function render() {
var slides = renderSlides(this.props);
var _this$props = this.props,
onMouseEnter = _this$props.onMouseEnter,
onMouseOver = _this$props.onMouseOver,
onMouseLeave = _this$props.onMouseLeave;
var mouseEvents = {
onMouseEnter: onMouseEnter,
onMouseOver: onMouseOver,
onMouseLeave: onMouseLeave
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
ref: this.handleRef,
className: "slick-track",
style: this.props.trackStyle
}, mouseEvents), slides);
}
}]);
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
;// ./node_modules/@ant-design/react-slick/es/dots.js
function dots_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
var getDotCount = function getDotCount(spec) {
var dots;
if (spec.infinite) {
dots = Math.ceil(spec.slideCount / spec.slidesToScroll);
} else {
dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;
}
return dots;
};
var Dots = /*#__PURE__*/function (_React$PureComponent) {
function Dots() {
(0,classCallCheck["default"])(this, Dots);
return dots_callSuper(this, Dots, arguments);
}
(0,inherits["default"])(Dots, _React$PureComponent);
return (0,createClass["default"])(Dots, [{
key: "clickHandler",
value: function clickHandler(options, e) {
// In Autoplay the focus stays on clicked button even after transition
// to next slide. That only goes away by click somewhere outside
e.preventDefault();
this.props.clickHandler(options);
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
onMouseEnter = _this$props.onMouseEnter,
onMouseOver = _this$props.onMouseOver,
onMouseLeave = _this$props.onMouseLeave,
infinite = _this$props.infinite,
slidesToScroll = _this$props.slidesToScroll,
slidesToShow = _this$props.slidesToShow,
slideCount = _this$props.slideCount,
currentSlide = _this$props.currentSlide;
var dotCount = getDotCount({
slideCount: slideCount,
slidesToScroll: slidesToScroll,
slidesToShow: slidesToShow,
infinite: infinite
});
var mouseEvents = {
onMouseEnter: onMouseEnter,
onMouseOver: onMouseOver,
onMouseLeave: onMouseLeave
};
var dots = [];
for (var i = 0; i < dotCount; i++) {
var _rightBound = (i + 1) * slidesToScroll - 1;
var rightBound = infinite ? _rightBound : clamp(_rightBound, 0, slideCount - 1);
var _leftBound = rightBound - (slidesToScroll - 1);
var leftBound = infinite ? _leftBound : clamp(_leftBound, 0, slideCount - 1);
var className = classnames_default()({
"slick-active": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound
});
var dotOptions = {
message: "dots",
index: i,
slidesToScroll: slidesToScroll,
currentSlide: currentSlide
};
var onClick = this.clickHandler.bind(this, dotOptions);
dots = dots.concat( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
key: i,
className: className
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.customPaging(i), {
onClick: onClick
})));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.appendDots(dots), (0,objectSpread2["default"])({
className: this.props.dotsClass
}, mouseEvents));
}
}]);
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
;// ./node_modules/@ant-design/react-slick/es/arrows.js
function arrows_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
function PrevArrow() {
(0,classCallCheck["default"])(this, PrevArrow);
return arrows_callSuper(this, PrevArrow, arguments);
}
(0,inherits["default"])(PrevArrow, _React$PureComponent);
return (0,createClass["default"])(PrevArrow, [{
key: "clickHandler",
value: function clickHandler(options, e) {
if (e) {
e.preventDefault();
}
this.props.clickHandler(options, e);
}
}, {
key: "render",
value: function render() {
var prevClasses = {
"slick-arrow": true,
"slick-prev": true
};
var prevHandler = this.clickHandler.bind(this, {
message: "previous"
});
if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) {
prevClasses["slick-disabled"] = true;
prevHandler = null;
}
var prevArrowProps = {
key: "0",
"data-role": "none",
className: classnames_default()(prevClasses),
style: {
display: "block"
},
onClick: prevHandler
};
var customProps = {
currentSlide: this.props.currentSlide,
slideCount: this.props.slideCount
};
var prevArrow;
if (this.props.prevArrow) {
prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.prevArrow, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, prevArrowProps), customProps));
} else {
prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", (0,esm_extends["default"])({
key: "0",
type: "button"
}, prevArrowProps), " ", "Previous");
}
return prevArrow;
}
}]);
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
function NextArrow() {
(0,classCallCheck["default"])(this, NextArrow);
return arrows_callSuper(this, NextArrow, arguments);
}
(0,inherits["default"])(NextArrow, _React$PureComponent2);
return (0,createClass["default"])(NextArrow, [{
key: "clickHandler",
value: function clickHandler(options, e) {
if (e) {
e.preventDefault();
}
this.props.clickHandler(options, e);
}
}, {
key: "render",
value: function render() {
var nextClasses = {
"slick-arrow": true,
"slick-next": true
};
var nextHandler = this.clickHandler.bind(this, {
message: "next"
});
if (!canGoNext(this.props)) {
nextClasses["slick-disabled"] = true;
nextHandler = null;
}
var nextArrowProps = {
key: "1",
"data-role": "none",
className: classnames_default()(nextClasses),
style: {
display: "block"
},
onClick: nextHandler
};
var customProps = {
currentSlide: this.props.currentSlide,
slideCount: this.props.slideCount
};
var nextArrow;
if (this.props.nextArrow) {
nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.nextArrow, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, nextArrowProps), customProps));
} else {
nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", (0,esm_extends["default"])({
key: "1",
type: "button"
}, nextArrowProps), " ", "Next");
}
return nextArrow;
}
}]);
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
;// ./node_modules/@ant-design/react-slick/es/inner-slider.js
var inner_slider_excluded = ["animating"];
function inner_slider_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
var InnerSlider = /*#__PURE__*/function (_React$Component) {
function InnerSlider(props) {
var _this;
(0,classCallCheck["default"])(this, InnerSlider);
_this = inner_slider_callSuper(this, InnerSlider, [props]);
(0,defineProperty["default"])(_this, "listRefHandler", function (ref) {
return _this.list = ref;
});
(0,defineProperty["default"])(_this, "trackRefHandler", function (ref) {
return _this.track = ref;
});
(0,defineProperty["default"])(_this, "adaptHeight", function () {
if (_this.props.adaptiveHeight && _this.list) {
var elem = _this.list.querySelector("[data-index=\"".concat(_this.state.currentSlide, "\"]"));
_this.list.style.height = getHeight(elem) + "px";
}
});
(0,defineProperty["default"])(_this, "componentDidMount", function () {
_this.props.onInit && _this.props.onInit();
if (_this.props.lazyLoad) {
var slidesToLoad = getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state));
if (slidesToLoad.length > 0) {
_this.setState(function (prevState) {
return {
lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
};
});
if (_this.props.onLazyLoad) {
_this.props.onLazyLoad(slidesToLoad);
}
}
}
var spec = (0,objectSpread2["default"])({
listRef: _this.list,
trackRef: _this.track
}, _this.props);
_this.updateState(spec, true, function () {
_this.adaptHeight();
_this.props.autoplay && _this.autoPlay("playing");
});
if (_this.props.lazyLoad === "progressive") {
_this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000);
}
_this.ro = new ResizeObserver_es(function () {
if (_this.state.animating) {
_this.onWindowResized(false); // don't set trackStyle hence don't break animation
_this.callbackTimers.push(setTimeout(function () {
return _this.onWindowResized();
}, _this.props.speed));
} else {
_this.onWindowResized();
}
});
_this.ro.observe(_this.list);
document.querySelectorAll && Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"), function (slide) {
slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null;
slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null;
});
if (window.addEventListener) {
window.addEventListener("resize", _this.onWindowResized);
} else {
window.attachEvent("onresize", _this.onWindowResized);
}
});
(0,defineProperty["default"])(_this, "componentWillUnmount", function () {
if (_this.animationEndCallback) {
clearTimeout(_this.animationEndCallback);
}
if (_this.lazyLoadTimer) {
clearInterval(_this.lazyLoadTimer);
}
if (_this.callbackTimers.length) {
_this.callbackTimers.forEach(function (timer) {
return clearTimeout(timer);
});
_this.callbackTimers = [];
}
if (window.addEventListener) {
window.removeEventListener("resize", _this.onWindowResized);
} else {
window.detachEvent("onresize", _this.onWindowResized);
}
if (_this.autoplayTimer) {
clearInterval(_this.autoplayTimer);
}
_this.ro.disconnect();
});
(0,defineProperty["default"])(_this, "componentDidUpdate", function (prevProps) {
_this.checkImagesLoad();
_this.props.onReInit && _this.props.onReInit();
if (_this.props.lazyLoad) {
var slidesToLoad = getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state));
if (slidesToLoad.length > 0) {
_this.setState(function (prevState) {
return {
lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
};
});
if (_this.props.onLazyLoad) {
_this.props.onLazyLoad(slidesToLoad);
}
}
}
// if (this.props.onLazyLoad) {
// this.props.onLazyLoad([leftMostSlide])
// }
_this.adaptHeight();
var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({
listRef: _this.list,
trackRef: _this.track
}, _this.props), _this.state);
var setTrackStyle = _this.didPropsChange(prevProps);
setTrackStyle && _this.updateState(spec, setTrackStyle, function () {
if (_this.state.currentSlide >= external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children)) {
_this.changeSlide({
message: "index",
index: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children) - _this.props.slidesToShow,
currentSlide: _this.state.currentSlide
});
}
if (prevProps.autoplay !== _this.props.autoplay || prevProps.autoplaySpeed !== _this.props.autoplaySpeed) {
if (!prevProps.autoplay && _this.props.autoplay) {
_this.autoPlay("playing");
} else if (_this.props.autoplay) {
_this.autoPlay("update");
} else {
_this.pause("paused");
}
}
});
});
(0,defineProperty["default"])(_this, "onWindowResized", function (setTrackStyle) {
if (_this.debouncedResize) _this.debouncedResize.cancel();
_this.debouncedResize = debounce(50, function () {
return _this.resizeWindow(setTrackStyle);
});
_this.debouncedResize();
});
(0,defineProperty["default"])(_this, "resizeWindow", function () {
var setTrackStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var isTrackMounted = Boolean(_this.track && _this.track.node);
// prevent warning: setting state on unmounted component (server side rendering)
if (!isTrackMounted) return;
var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({
listRef: _this.list,
trackRef: _this.track
}, _this.props), _this.state);
_this.updateState(spec, setTrackStyle, function () {
if (_this.props.autoplay) _this.autoPlay("update");else _this.pause("paused");
});
// animating state should be cleared while resizing, otherwise autoplay stops working
_this.setState({
animating: false
});
clearTimeout(_this.animationEndCallback);
delete _this.animationEndCallback;
});
(0,defineProperty["default"])(_this, "updateState", function (spec, setTrackStyle, callback) {
var updatedState = initializedState(spec);
spec = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), updatedState), {}, {
slideIndex: updatedState.currentSlide
});
var targetLeft = getTrackLeft(spec);
spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
left: targetLeft
});
var trackStyle = getTrackCSS(spec);
if (setTrackStyle || external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children) !== external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(spec.children)) {
updatedState["trackStyle"] = trackStyle;
}
_this.setState(updatedState, callback);
});
(0,defineProperty["default"])(_this, "ssrInit", function () {
if (_this.props.variableWidth) {
var _trackWidth = 0,
_trackLeft = 0;
var childrenWidths = [];
var preClones = getPreClones((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
slideCount: _this.props.children.length
}));
var postClones = getPostClones((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
slideCount: _this.props.children.length
}));
_this.props.children.forEach(function (child) {
childrenWidths.push(child.props.style.width);
_trackWidth += child.props.style.width;
});
for (var i = 0; i < preClones; i++) {
_trackLeft += childrenWidths[childrenWidths.length - 1 - i];
_trackWidth += childrenWidths[childrenWidths.length - 1 - i];
}
for (var _i = 0; _i < postClones; _i++) {
_trackWidth += childrenWidths[_i];
}
for (var _i2 = 0; _i2 < _this.state.currentSlide; _i2++) {
_trackLeft += childrenWidths[_i2];
}
var _trackStyle = {
width: _trackWidth + "px",
left: -_trackLeft + "px"
};
if (_this.props.centerMode) {
var currentWidth = "".concat(childrenWidths[_this.state.currentSlide], "px");
_trackStyle.left = "calc(".concat(_trackStyle.left, " + (100% - ").concat(currentWidth, ") / 2 ) ");
}
return {
trackStyle: _trackStyle
};
}
var childrenCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children);
var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
slideCount: childrenCount
});
var slideCount = getPreClones(spec) + getPostClones(spec) + childrenCount;
var trackWidth = 100 / _this.props.slidesToShow * slideCount;
var slideWidth = 100 / slideCount;
var trackLeft = -slideWidth * (getPreClones(spec) + _this.state.currentSlide) * trackWidth / 100;
if (_this.props.centerMode) {
trackLeft += (100 - slideWidth * trackWidth / 100) / 2;
}
var trackStyle = {
width: trackWidth + "%",
left: trackLeft + "%"
};
return {
slideWidth: slideWidth + "%",
trackStyle: trackStyle
};
});
(0,defineProperty["default"])(_this, "checkImagesLoad", function () {
var images = _this.list && _this.list.querySelectorAll && _this.list.querySelectorAll(".slick-slide img") || [];
var imagesCount = images.length,
loadedCount = 0;
Array.prototype.forEach.call(images, function (image) {
var handler = function handler() {
return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized();
};
if (!image.onclick) {
image.onclick = function () {
return image.parentNode.focus();
};
} else {
var prevClickHandler = image.onclick;
image.onclick = function (e) {
prevClickHandler(e);
image.parentNode.focus();
};
}
if (!image.onload) {
if (_this.props.lazyLoad) {
image.onload = function () {
_this.adaptHeight();
_this.callbackTimers.push(setTimeout(_this.onWindowResized, _this.props.speed));
};
} else {
image.onload = handler;
image.onerror = function () {
handler();
_this.props.onLazyLoadError && _this.props.onLazyLoadError();
};
}
}
});
});
(0,defineProperty["default"])(_this, "progressiveLazyLoad", function () {
var slidesToLoad = [];
var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state);
for (var index = _this.state.currentSlide; index < _this.state.slideCount + getPostClones(spec); index++) {
if (_this.state.lazyLoadedList.indexOf(index) < 0) {
slidesToLoad.push(index);
break;
}
}
for (var _index = _this.state.currentSlide - 1; _index >= -getPreClones(spec); _index--) {
if (_this.state.lazyLoadedList.indexOf(_index) < 0) {
slidesToLoad.push(_index);
break;
}
}
if (slidesToLoad.length > 0) {
_this.setState(function (state) {
return {
lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad)
};
});
if (_this.props.onLazyLoad) {
_this.props.onLazyLoad(slidesToLoad);
}
} else {
if (_this.lazyLoadTimer) {
clearInterval(_this.lazyLoadTimer);
delete _this.lazyLoadTimer;
}
}
});
(0,defineProperty["default"])(_this, "slideHandler", function (index) {
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var _this$props = _this.props,
asNavFor = _this$props.asNavFor,
beforeChange = _this$props.beforeChange,
onLazyLoad = _this$props.onLazyLoad,
speed = _this$props.speed,
afterChange = _this$props.afterChange;
// capture currentslide before state is updated
var currentSlide = _this.state.currentSlide;
var _slideHandler = slideHandler((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
index: index
}, _this.props), _this.state), {}, {
trackRef: _this.track,
useCSS: _this.props.useCSS && !dontAnimate
})),
state = _slideHandler.state,
nextState = _slideHandler.nextState;
if (!state) return;
beforeChange && beforeChange(currentSlide, state.currentSlide);
var slidesToLoad = state.lazyLoadedList.filter(function (value) {
return _this.state.lazyLoadedList.indexOf(value) < 0;
});
onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);
if (!_this.props.waitForAnimate && _this.animationEndCallback) {
clearTimeout(_this.animationEndCallback);
afterChange && afterChange(currentSlide);
delete _this.animationEndCallback;
}
_this.setState(state, function () {
// asNavForIndex check is to avoid recursive calls of slideHandler in waitForAnimate=false mode
if (asNavFor && _this.asNavForIndex !== index) {
_this.asNavForIndex = index;
asNavFor.innerSlider.slideHandler(index);
}
if (!nextState) return;
_this.animationEndCallback = setTimeout(function () {
var animating = nextState.animating,
firstBatch = (0,objectWithoutProperties["default"])(nextState, inner_slider_excluded);
_this.setState(firstBatch, function () {
_this.callbackTimers.push(setTimeout(function () {
return _this.setState({
animating: animating
});
}, 10));
afterChange && afterChange(state.currentSlide);
delete _this.animationEndCallback;
});
}, speed);
});
});
(0,defineProperty["default"])(_this, "changeSlide", function (options) {
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state);
var targetSlide = changeSlide(spec, options);
if (targetSlide !== 0 && !targetSlide) return;
if (dontAnimate === true) {
_this.slideHandler(targetSlide, dontAnimate);
} else {
_this.slideHandler(targetSlide);
}
_this.props.autoplay && _this.autoPlay("update");
if (_this.props.focusOnSelect) {
var nodes = _this.list.querySelectorAll(".slick-current");
nodes[0] && nodes[0].focus();
}
});
(0,defineProperty["default"])(_this, "clickHandler", function (e) {
if (_this.clickable === false) {
e.stopPropagation();
e.preventDefault();
}
_this.clickable = true;
});
(0,defineProperty["default"])(_this, "keyHandler", function (e) {
var dir = keyHandler(e, _this.props.accessibility, _this.props.rtl);
dir !== "" && _this.changeSlide({
message: dir
});
});
(0,defineProperty["default"])(_this, "selectHandler", function (options) {
_this.changeSlide(options);
});
(0,defineProperty["default"])(_this, "disableBodyScroll", function () {
var preventDefault = function preventDefault(e) {
e = e || window.event;
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
};
window.ontouchmove = preventDefault;
});
(0,defineProperty["default"])(_this, "enableBodyScroll", function () {
window.ontouchmove = null;
});
(0,defineProperty["default"])(_this, "swipeStart", function (e) {
if (_this.props.verticalSwiping) {
_this.disableBodyScroll();
}
var state = swipeStart(e, _this.props.swipe, _this.props.draggable);
state !== "" && _this.setState(state);
});
(0,defineProperty["default"])(_this, "swipeMove", function (e) {
var state = swipeMove(e, (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
trackRef: _this.track,
listRef: _this.list,
slideIndex: _this.state.currentSlide
}));
if (!state) return;
if (state["swiping"]) {
_this.clickable = false;
}
_this.setState(state);
});
(0,defineProperty["default"])(_this, "swipeEnd", function (e) {
var state = swipeEnd(e, (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
trackRef: _this.track,
listRef: _this.list,
slideIndex: _this.state.currentSlide
}));
if (!state) return;
var triggerSlideHandler = state["triggerSlideHandler"];
delete state["triggerSlideHandler"];
_this.setState(state);
if (triggerSlideHandler === undefined) return;
_this.slideHandler(triggerSlideHandler);
if (_this.props.verticalSwiping) {
_this.enableBodyScroll();
}
});
(0,defineProperty["default"])(_this, "touchEnd", function (e) {
_this.swipeEnd(e);
_this.clickable = true;
});
(0,defineProperty["default"])(_this, "slickPrev", function () {
// this and fellow methods are wrapped in setTimeout
// to make sure initialize setState has happened before
// any of such methods are called
_this.callbackTimers.push(setTimeout(function () {
return _this.changeSlide({
message: "previous"
});
}, 0));
});
(0,defineProperty["default"])(_this, "slickNext", function () {
_this.callbackTimers.push(setTimeout(function () {
return _this.changeSlide({
message: "next"
});
}, 0));
});
(0,defineProperty["default"])(_this, "slickGoTo", function (slide) {
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
slide = Number(slide);
if (isNaN(slide)) return "";
_this.callbackTimers.push(setTimeout(function () {
return _this.changeSlide({
message: "index",
index: slide,
currentSlide: _this.state.currentSlide
}, dontAnimate);
}, 0));
});
(0,defineProperty["default"])(_this, "play", function () {
var nextIndex;
if (_this.props.rtl) {
nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;
} else {
if (canGoNext((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state))) {
nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;
} else {
return false;
}
}
_this.slideHandler(nextIndex);
});
(0,defineProperty["default"])(_this, "autoPlay", function (playType) {
if (_this.autoplayTimer) {
clearInterval(_this.autoplayTimer);
}
var autoplaying = _this.state.autoplaying;
if (playType === "update") {
if (autoplaying === "hovered" || autoplaying === "focused" || autoplaying === "paused") {
return;
}
} else if (playType === "leave") {
if (autoplaying === "paused" || autoplaying === "focused") {
return;
}
} else if (playType === "blur") {
if (autoplaying === "paused" || autoplaying === "hovered") {
return;
}
}
_this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50);
_this.setState({
autoplaying: "playing"
});
});
(0,defineProperty["default"])(_this, "pause", function (pauseType) {
if (_this.autoplayTimer) {
clearInterval(_this.autoplayTimer);
_this.autoplayTimer = null;
}
var autoplaying = _this.state.autoplaying;
if (pauseType === "paused") {
_this.setState({
autoplaying: "paused"
});
} else if (pauseType === "focused") {
if (autoplaying === "hovered" || autoplaying === "playing") {
_this.setState({
autoplaying: "focused"
});
}
} else {
// pauseType is 'hovered'
if (autoplaying === "playing") {
_this.setState({
autoplaying: "hovered"
});
}
}
});
(0,defineProperty["default"])(_this, "onDotsOver", function () {
return _this.props.autoplay && _this.pause("hovered");
});
(0,defineProperty["default"])(_this, "onDotsLeave", function () {
return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
});
(0,defineProperty["default"])(_this, "onTrackOver", function () {
return _this.props.autoplay && _this.pause("hovered");
});
(0,defineProperty["default"])(_this, "onTrackLeave", function () {
return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
});
(0,defineProperty["default"])(_this, "onSlideFocus", function () {
return _this.props.autoplay && _this.pause("focused");
});
(0,defineProperty["default"])(_this, "onSlideBlur", function () {
return _this.props.autoplay && _this.state.autoplaying === "focused" && _this.autoPlay("blur");
});
(0,defineProperty["default"])(_this, "render", function () {
var className = classnames_default()("slick-slider", _this.props.className, {
"slick-vertical": _this.props.vertical,
"slick-initialized": true
});
var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state);
var trackProps = extractObject(spec, ["fade", "cssEase", "speed", "infinite", "centerMode", "focusOnSelect", "currentSlide", "lazyLoad", "lazyLoadedList", "rtl", "slideWidth", "slideHeight", "listHeight", "vertical", "slidesToShow", "slidesToScroll", "slideCount", "trackStyle", "variableWidth", "unslick", "centerPadding", "targetSlide", "useCSS"]);
var pauseOnHover = _this.props.pauseOnHover;
trackProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, trackProps), {}, {
onMouseEnter: pauseOnHover ? _this.onTrackOver : null,
onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,
onMouseOver: pauseOnHover ? _this.onTrackOver : null,
focusOnSelect: _this.props.focusOnSelect && _this.clickable ? _this.selectHandler : null
});
var dots;
if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {
var dotProps = extractObject(spec, ["dotsClass", "slideCount", "slidesToShow", "currentSlide", "slidesToScroll", "clickHandler", "children", "customPaging", "infinite", "appendDots"]);
var pauseOnDotsHover = _this.props.pauseOnDotsHover;
dotProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, dotProps), {}, {
clickHandler: _this.changeSlide,
onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,
onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,
onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null
});
dots = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Dots, dotProps);
}
var prevArrow, nextArrow;
var arrowProps = extractObject(spec, ["infinite", "centerMode", "currentSlide", "slideCount", "slidesToShow", "prevArrow", "nextArrow"]);
arrowProps.clickHandler = _this.changeSlide;
if (_this.props.arrows) {
prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PrevArrow, arrowProps);
nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NextArrow, arrowProps);
}
var verticalHeightStyle = null;
if (_this.props.vertical) {
verticalHeightStyle = {
height: _this.state.listHeight
};
}
var centerPaddingStyle = null;
if (_this.props.vertical === false) {
if (_this.props.centerMode === true) {
centerPaddingStyle = {
padding: "0px " + _this.props.centerPadding
};
}
} else {
if (_this.props.centerMode === true) {
centerPaddingStyle = {
padding: _this.props.centerPadding + " 0px"
};
}
}
var listStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, verticalHeightStyle), centerPaddingStyle);
var touchMove = _this.props.touchMove;
var listProps = {
className: "slick-list",
style: listStyle,
onClick: _this.clickHandler,
onMouseDown: touchMove ? _this.swipeStart : null,
onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
onMouseUp: touchMove ? _this.swipeEnd : null,
onMouseLeave: _this.state.dragging && touchMove ? _this.swipeEnd : null,
onTouchStart: touchMove ? _this.swipeStart : null,
onTouchMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
onTouchEnd: touchMove ? _this.touchEnd : null,
onTouchCancel: _this.state.dragging && touchMove ? _this.swipeEnd : null,
onKeyDown: _this.props.accessibility ? _this.keyHandler : null
};
var innerSliderProps = {
className: className,
dir: "ltr",
style: _this.props.style
};
if (_this.props.unslick) {
listProps = {
className: "slick-list"
};
innerSliderProps = {
className: className,
style: _this.props.style
};
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", innerSliderProps, !_this.props.unslick ? prevArrow : "", /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
ref: _this.listRefHandler
}, listProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Track, (0,esm_extends["default"])({
ref: _this.trackRefHandler
}, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : "", !_this.props.unslick ? dots : "");
});
_this.list = null;
_this.track = null;
_this.state = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, initial_state), {}, {
currentSlide: _this.props.initialSlide,
targetSlide: _this.props.initialSlide ? _this.props.initialSlide : 0,
slideCount: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children)
});
_this.callbackTimers = [];
_this.clickable = true;
_this.debouncedResize = null;
var ssrState = _this.ssrInit();
_this.state = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.state), ssrState);
return _this;
}
(0,inherits["default"])(InnerSlider, _React$Component);
return (0,createClass["default"])(InnerSlider, [{
key: "didPropsChange",
value: function didPropsChange(prevProps) {
var setTrackStyle = false;
for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {
var key = _Object$keys[_i3];
// eslint-disable-next-line no-prototype-builtins
if (!prevProps.hasOwnProperty(key)) {
setTrackStyle = true;
break;
}
if ((0,esm_typeof["default"])(prevProps[key]) === "object" || typeof prevProps[key] === "function" || isNaN(prevProps[key])) {
continue;
}
if (prevProps[key] !== this.props[key]) {
setTrackStyle = true;
break;
}
}
return setTrackStyle || external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(this.props.children) !== external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(prevProps.children);
}
}]);
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
// EXTERNAL MODULE: ./node_modules/json2mq/index.js
var json2mq = __webpack_require__("./node_modules/json2mq/index.js");
var json2mq_default = /*#__PURE__*/__webpack_require__.n(json2mq);
;// ./node_modules/@ant-design/react-slick/es/slider.js
function slider_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
var Slider = /*#__PURE__*/function (_React$Component) {
function Slider(props) {
var _this;
(0,classCallCheck["default"])(this, Slider);
_this = slider_callSuper(this, Slider, [props]);
(0,defineProperty["default"])(_this, "innerSliderRefHandler", function (ref) {
return _this.innerSlider = ref;
});
(0,defineProperty["default"])(_this, "slickPrev", function () {
return _this.innerSlider.slickPrev();
});
(0,defineProperty["default"])(_this, "slickNext", function () {
return _this.innerSlider.slickNext();
});
(0,defineProperty["default"])(_this, "slickGoTo", function (slide) {
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return _this.innerSlider.slickGoTo(slide, dontAnimate);
});
(0,defineProperty["default"])(_this, "slickPause", function () {
return _this.innerSlider.pause("paused");
});
(0,defineProperty["default"])(_this, "slickPlay", function () {
return _this.innerSlider.autoPlay("play");
});
_this.state = {
breakpoint: null
};
_this._responsiveMediaHandlers = [];
return _this;
}
(0,inherits["default"])(Slider, _React$Component);
return (0,createClass["default"])(Slider, [{
key: "media",
value: function media(query, handler) {
// javascript handler for css media query
var mql = window.matchMedia(query);
var listener = function listener(_ref) {
var matches = _ref.matches;
if (matches) {
handler();
}
};
mql.addListener(listener);
listener(mql);
this._responsiveMediaHandlers.push({
mql: mql,
query: query,
listener: listener
});
}
// handles responsive breakpoints
}, {
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
// performance monitoring
//if (process.env.NODE_ENV !== 'production') {
//const { whyDidYouUpdate } = require('why-did-you-update')
//whyDidYouUpdate(React)
//}
if (this.props.responsive) {
var breakpoints = this.props.responsive.map(function (breakpt) {
return breakpt.breakpoint;
});
// sort them in increasing order of their numerical value
breakpoints.sort(function (x, y) {
return x - y;
});
breakpoints.forEach(function (breakpoint, index) {
// media query for each breakpoint
var bQuery;
if (index === 0) {
bQuery = json2mq_default()({
minWidth: 0,
maxWidth: breakpoint
});
} else {
bQuery = json2mq_default()({
minWidth: breakpoints[index - 1] + 1,
maxWidth: breakpoint
});
}
// when not using server side rendering
canUseDOM() && _this2.media(bQuery, function () {
_this2.setState({
breakpoint: breakpoint
});
});
});
// Register media query for full screen. Need to support resize from small to large
// convert javascript object to media query string
var query = json2mq_default()({
minWidth: breakpoints.slice(-1)[0]
});
canUseDOM() && this.media(query, function () {
_this2.setState({
breakpoint: null
});
});
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this._responsiveMediaHandlers.forEach(function (obj) {
obj.mql.removeListener(obj.listener);
});
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var settings;
var newProps;
if (this.state.breakpoint) {
newProps = this.props.responsive.filter(function (resp) {
return resp.breakpoint === _this3.state.breakpoint;
});
settings = newProps[0].settings === "unslick" ? "unslick" : (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, default_props), this.props), newProps[0].settings);
} else {
settings = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, default_props), this.props);
}
// force scrolling by one if centerMode is on
if (settings.centerMode) {
if (settings.slidesToScroll > 1 && "development" !== "production") {
console.warn("slidesToScroll should be equal to 1 in centerMode, you are using ".concat(settings.slidesToScroll));
}
settings.slidesToScroll = 1;
}
// force showing one slide and scrolling by one if the fade mode is on
if (settings.fade) {
if (settings.slidesToShow > 1 && "development" !== "production") {
console.warn("slidesToShow should be equal to 1 when fade is true, you're using ".concat(settings.slidesToShow));
}
if (settings.slidesToScroll > 1 && "development" !== "production") {
console.warn("slidesToScroll should be equal to 1 when fade is true, you're using ".concat(settings.slidesToScroll));
}
settings.slidesToShow = 1;
settings.slidesToScroll = 1;
}
// makes sure that children is an array, even when there is only 1 child
var children = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(this.props.children);
// Children may contain false or null, so we should filter them
// children may also contain string filled with spaces (in certain cases where we use jsx strings)
children = children.filter(function (child) {
if (typeof child === "string") {
return !!child.trim();
}
return !!child;
});
// rows and slidesPerRow logic is handled here
if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {
console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1");
settings.variableWidth = false;
}
var newChildren = [];
var currentWidth = null;
for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {
var newSlide = [];
for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {
var row = [];
for (var k = j; k < j + settings.slidesPerRow; k += 1) {
if (settings.variableWidth && children[k].props.style) {
currentWidth = children[k].props.style.width;
}
if (k >= children.length) break;
row.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children[k], {
key: 100 * i + 10 * j + k,
tabIndex: -1,
style: {
width: "".concat(100 / settings.slidesPerRow, "%"),
display: "inline-block"
}
}));
}
newSlide.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
key: 10 * i + j
}, row));
}
if (settings.variableWidth) {
newChildren.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
key: i,
style: {
width: currentWidth
}
}, newSlide));
} else {
newChildren.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
key: i
}, newSlide));
}
}
if (settings === "unslick") {
var className = "regular slider " + (this.props.className || "");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: className
}, children);
} else if (newChildren.length <= settings.slidesToShow && !settings.infinite) {
settings.unslick = true;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InnerSlider, (0,esm_extends["default"])({
style: this.props.style,
ref: this.innerSliderRefHandler
}, filterSettings(settings)), newChildren);
}
}]);
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
;// ./node_modules/@ant-design/react-slick/es/index.js
/* harmony default export */ var react_slick_es = (Slider);
// EXTERNAL MODULE: ./components/carousel/style/index.ts
var carousel_style = __webpack_require__("./components/carousel/style/index.ts");
;// ./components/carousel/index.tsx
var carousel_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;
};
const dotsClass = 'slick-dots';
const ArrowButton = _a => {
var {
currentSlide,
slideCount
} = _a,
rest = carousel_rest(_a, ["currentSlide", "slideCount"]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", Object.assign({
type: "button"
}, rest));
};
const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
dots = true,
arrows = false,
prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ArrowButton, {
"aria-label": "prev"
}),
nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ArrowButton, {
"aria-label": "next"
}),
draggable = false,
waitForAnimate = false,
dotPosition = 'bottom',
vertical = dotPosition === 'left' || dotPosition === 'right',
rootClassName,
className: customClassName,
style,
id,
autoplay = false,
autoplaySpeed = 3000
} = props,
otherProps = carousel_rest(props, ["dots", "arrows", "prevArrow", "nextArrow", "draggable", "waitForAnimate", "dotPosition", "vertical", "rootClassName", "className", "style", "id", "autoplay", "autoplaySpeed"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('carousel');
const slickRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const goTo = function (slide) {
let dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
slickRef.current.slickGoTo(slide, dontAnimate);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
goTo,
autoPlay: slickRef.current.innerSlider.autoPlay,
innerSlider: slickRef.current.innerSlider,
prev: slickRef.current.slickPrev,
next: slickRef.current.slickNext
}), [slickRef.current]);
const prevCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(props.children));
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (prevCount.current !== external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(props.children)) {
goTo(props.initialSlide || 0, false);
prevCount.current = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(props.children);
}
}, [props.children]);
const newProps = Object.assign({
vertical,
className: classnames_default()(customClassName, contextClassName),
style: Object.assign(Object.assign({}, contextStyle), style),
autoplay: !!autoplay
}, otherProps);
if (newProps.effect === 'fade') {
newProps.fade = true;
}
const prefixCls = getPrefixCls('carousel', newProps.prefixCls);
const enableDots = !!dots;
const dsClass = classnames_default()(dotsClass, `${dotsClass}-${dotPosition}`, typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className);
const [wrapCSSVar, hashId, cssVarCls] = (0,carousel_style["default"])(prefixCls);
const className = classnames_default()(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-vertical`]: newProps.vertical
}, hashId, cssVarCls, rootClassName);
const mergedShowDuration = autoplay && (typeof autoplay === 'object' ? autoplay.dotDuration : false);
const dotDurationStyle = mergedShowDuration ? {
[carousel_style.DotDuration]: `${autoplaySpeed}ms`
} : {};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className,
id: id,
style: dotDurationStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(react_slick_es, Object.assign({
ref: slickRef
}, newProps, {
dots: enableDots,
dotsClass: dsClass,
arrows: arrows,
prevArrow: prevArrow,
nextArrow: nextArrow,
draggable: draggable,
verticalSwiping: vertical,
autoplaySpeed: autoplaySpeed,
waitForAnimate: waitForAnimate
}))));
});
if (true) {
Carousel.displayName = 'Carousel';
}
/* harmony default export */ var carousel = (Carousel);
;// ./node_modules/rc-cascader/es/context.js
var CascaderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
/* harmony default export */ var rc_cascader_es_context = (CascaderContext);
;// ./node_modules/rc-cascader/es/hooks/useSearchOptions.js
var SEARCH_MARK = '__rc_cascader_search_mark__';
var defaultFilter = function defaultFilter(search, options, _ref) {
var _ref$label = _ref.label,
label = _ref$label === void 0 ? '' : _ref$label;
return options.some(function (opt) {
return String(opt[label]).toLowerCase().includes(search.toLowerCase());
});
};
var defaultRender = function defaultRender(inputValue, path, prefixCls, fieldNames) {
return path.map(function (opt) {
return opt[fieldNames.label];
}).join(' / ');
};
var useSearchOptions = function useSearchOptions(search, options, fieldNames, prefixCls, config, enableHalfPath) {
var _config$filter = config.filter,
filter = _config$filter === void 0 ? defaultFilter : _config$filter,
_config$render = config.render,
render = _config$render === void 0 ? defaultRender : _config$render,
_config$limit = config.limit,
limit = _config$limit === void 0 ? 50 : _config$limit,
sort = config.sort;
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var filteredOptions = [];
if (!search) {
return [];
}
function dig(list, pathOptions) {
var parentDisabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
list.forEach(function (option) {
// Perf saving when `sort` is disabled and `limit` is provided
if (!sort && limit !== false && limit > 0 && filteredOptions.length >= limit) {
return;
}
var connectedPathOptions = [].concat((0,toConsumableArray["default"])(pathOptions), [option]);
var children = option[fieldNames.children];
var mergedDisabled = parentDisabled || option.disabled;
// If current option is filterable
if (
// If is leaf option
!children || children.length === 0 ||
// If is changeOnSelect or multiple
enableHalfPath) {
if (filter(search, connectedPathOptions, {
label: fieldNames.label
})) {
var _objectSpread2;
filteredOptions.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, option), {}, (_objectSpread2 = {
disabled: mergedDisabled
}, (0,defineProperty["default"])(_objectSpread2, fieldNames.label, render(search, connectedPathOptions, prefixCls, fieldNames)), (0,defineProperty["default"])(_objectSpread2, SEARCH_MARK, connectedPathOptions), (0,defineProperty["default"])(_objectSpread2, fieldNames.children, undefined), _objectSpread2)));
}
}
if (children) {
dig(option[fieldNames.children], connectedPathOptions, mergedDisabled);
}
});
}
dig(options, []);
// Do sort
if (sort) {
filteredOptions.sort(function (a, b) {
return sort(a[SEARCH_MARK], b[SEARCH_MARK], search, fieldNames);
});
}
return limit !== false && limit > 0 ? filteredOptions.slice(0, limit) : filteredOptions;
}, [search, options, fieldNames, prefixCls, render, enableHalfPath, filter, sort, limit]);
};
/* harmony default export */ var hooks_useSearchOptions = (useSearchOptions);
;// ./node_modules/rc-cascader/es/utils/commonUtil.js
var VALUE_SPLIT = '__RC_CASCADER_SPLIT__';
var SHOW_PARENT = 'SHOW_PARENT';
var SHOW_CHILD = 'SHOW_CHILD';
/**
* Will convert value to string, and join with `VALUE_SPLIT`
*/
function toPathKey(value) {
return value.join(VALUE_SPLIT);
}
/**
* Batch convert value to string, and join with `VALUE_SPLIT`
*/
function toPathKeys(value) {
return value.map(toPathKey);
}
function toPathValueStr(pathKey) {
return pathKey.split(VALUE_SPLIT);
}
function commonUtil_fillFieldNames(fieldNames) {
var _ref = fieldNames || {},
label = _ref.label,
value = _ref.value,
children = _ref.children;
var val = value || 'value';
return {
label: label || 'label',
value: val,
key: val,
children: children || 'children'
};
}
function isLeaf(option, fieldNames) {
var _option$isLeaf, _option;
return (_option$isLeaf = option.isLeaf) !== null && _option$isLeaf !== void 0 ? _option$isLeaf : !((_option = option[fieldNames.children]) !== null && _option !== void 0 && _option.length);
}
function scrollIntoParentView(element) {
var parent = element.parentElement;
if (!parent) {
return;
}
var elementToParent = element.offsetTop - parent.offsetTop; // offsetParent may not be parent.
if (elementToParent - parent.scrollTop < 0) {
parent.scrollTo({
top: elementToParent
});
} else if (elementToParent + element.offsetHeight - parent.scrollTop > parent.offsetHeight) {
parent.scrollTo({
top: elementToParent + element.offsetHeight - parent.offsetHeight
});
}
}
function getFullPathKeys(options, fieldNames) {
return options.map(function (item) {
var _item$SEARCH_MARK;
return (_item$SEARCH_MARK = item[SEARCH_MARK]) === null || _item$SEARCH_MARK === void 0 ? void 0 : _item$SEARCH_MARK.map(function (opt) {
return opt[fieldNames.value];
});
});
}
function isMultipleValue(value) {
return Array.isArray(value) && Array.isArray(value[0]);
}
function toRawValues(value) {
if (!value) {
return [];
}
if (isMultipleValue(value)) {
return value;
}
return (value.length === 0 ? [] : [value]).map(function (val) {
return Array.isArray(val) ? val : [val];
});
}
;// ./node_modules/rc-cascader/es/utils/treeUtil.js
function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedStrategy) {
var valueSet = new Set(pathKeys);
var keyPathEntities = getKeyPathEntities();
return pathKeys.filter(function (key) {
var entity = keyPathEntities[key];
var parent = entity ? entity.parent : null;
var children = entity ? entity.children : null;
if (entity && entity.node.disabled) {
return true;
}
return showCheckedStrategy === SHOW_CHILD ? !(children && children.some(function (child) {
return child.key && valueSet.has(child.key);
})) : !(parent && !parent.node.disabled && valueSet.has(parent.key));
});
}
function toPathOptions(valueCells, options, fieldNames) {
var stringMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
var currentList = options;
var valueOptions = [];
var _loop = function _loop() {
var _currentList, _currentList2, _foundOption$fieldNam;
var valueCell = valueCells[i];
var foundIndex = (_currentList = currentList) === null || _currentList === void 0 ? void 0 : _currentList.findIndex(function (option) {
var val = option[fieldNames.value];
return stringMode ? String(val) === String(valueCell) : val === valueCell;
});
var foundOption = foundIndex !== -1 ? (_currentList2 = currentList) === null || _currentList2 === void 0 ? void 0 : _currentList2[foundIndex] : null;
valueOptions.push({
value: (_foundOption$fieldNam = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.value]) !== null && _foundOption$fieldNam !== void 0 ? _foundOption$fieldNam : valueCell,
index: foundIndex,
option: foundOption
});
currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];
};
for (var i = 0; i < valueCells.length; i += 1) {
_loop();
}
return valueOptions;
}
;// ./node_modules/rc-cascader/es/hooks/useDisplayValues.js
/* harmony default export */ var useDisplayValues = (function (rawValues, options, fieldNames, multiple, displayRender) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var mergedDisplayRender = displayRender ||
// Default displayRender
function (labels) {
var mergedLabels = multiple ? labels.slice(-1) : labels;
var SPLIT = ' / ';
if (mergedLabels.every(function (label) {
return ['string', 'number'].includes((0,esm_typeof["default"])(label));
})) {
return mergedLabels.join(SPLIT);
}
// If exist non-string value, use ReactNode instead
return mergedLabels.reduce(function (list, label, index) {
var keyedLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(label) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(label, {
key: index
}) : label;
if (index === 0) {
return [keyedLabel];
}
return [].concat((0,toConsumableArray["default"])(list), [SPLIT, keyedLabel]);
}, []);
};
return rawValues.map(function (valueCells) {
var _valueOptions;
var valueOptions = toPathOptions(valueCells, options, fieldNames);
var label = mergedDisplayRender(valueOptions.map(function (_ref) {
var _option$fieldNames$la;
var option = _ref.option,
value = _ref.value;
return (_option$fieldNames$la = option === null || option === void 0 ? void 0 : option[fieldNames.label]) !== null && _option$fieldNames$la !== void 0 ? _option$fieldNames$la : value;
}), valueOptions.map(function (_ref2) {
var option = _ref2.option;
return option;
}));
var value = toPathKey(valueCells);
return {
label: label,
value: value,
key: value,
valueCells: valueCells,
disabled: (_valueOptions = valueOptions[valueOptions.length - 1]) === null || _valueOptions === void 0 || (_valueOptions = _valueOptions.option) === null || _valueOptions === void 0 ? void 0 : _valueOptions.disabled
};
});
}, [rawValues, options, fieldNames, displayRender, multiple]);
});
;// ./node_modules/rc-cascader/es/hooks/useMissingValues.js
function useMissingValues(options, fieldNames) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (rawValues) {
var missingValues = [];
var existsValues = [];
rawValues.forEach(function (valueCell) {
var pathOptions = toPathOptions(valueCell, options, fieldNames);
if (pathOptions.every(function (opt) {
return opt.option;
})) {
existsValues.push(valueCell);
} else {
missingValues.push(valueCell);
}
});
return [existsValues, missingValues];
}, [options, fieldNames]);
}
;// ./node_modules/rc-tree/es/utils/keyUtil.js
function getEntity(keyEntities, key) {
return keyEntities[key];
}
;// ./node_modules/rc-tree/es/utils/treeUtil.js
var treeUtil_excluded = ["children"];
function getPosition(level, index) {
return "".concat(level, "-").concat(index);
}
function isTreeNode(node) {
return node && node.type && node.type.isTreeNode;
}
function treeUtil_getKey(key, pos) {
if (key !== null && key !== undefined) {
return key;
}
return pos;
}
function treeUtil_fillFieldNames(fieldNames) {
var _ref = fieldNames || {},
title = _ref.title,
_title = _ref._title,
key = _ref.key,
children = _ref.children;
var mergedTitle = title || 'title';
return {
title: mergedTitle,
_title: _title || [mergedTitle],
key: key || 'key',
children: children || 'children'
};
}
/**
* Warning if TreeNode do not provides key
*/
function warningWithoutKey(treeData, fieldNames) {
var keys = new Map();
function dig(list) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
(list || []).forEach(function (treeNode) {
var key = treeNode[fieldNames.key];
var children = treeNode[fieldNames.children];
(0,warning["default"])(key !== null && key !== undefined, "Tree node must have a certain key: [".concat(path).concat(key, "]"));
var recordKey = String(key);
(0,warning["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 = (0,toArray["default"])(node);
return treeNodes.map(function (treeNode) {
// Filter invalidate node
if (!isTreeNode(treeNode)) {
(0,warning["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 = (0,objectWithoutProperties["default"])(_treeNode$props, treeUtil_excluded);
var dataNode = (0,objectSpread2["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(treeNodeList, expandedKeys, fieldNames) {
var _fillFieldNames = treeUtil_fillFieldNames(fieldNames),
fieldTitles = _fillFieldNames._title,
fieldKey = _fillFieldNames.key,
fieldChildren = _fillFieldNames.children;
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 = treeUtil_getKey(treeNode[fieldKey], pos);
// Pick matched title in field title list
var mergedTitle;
for (var i = 0; i < fieldTitles.length; i += 1) {
var fieldTitle = fieldTitles[i];
if (treeNode[fieldTitle] !== undefined) {
mergedTitle = treeNode[fieldTitle];
break;
}
}
// Add FlattenDataNode into list
// We use `Object.assign` here to save perf since babel's `objectSpread` has perf issue
var flattenNode = Object.assign((0,omit["default"])(treeNode, [].concat((0,toConsumableArray["default"])(fieldTitles), [fieldKey, fieldChildren])), {
title: mergedTitle,
key: mergedKey,
parent: parent,
pos: pos,
children: null,
data: treeNode,
isStart: [].concat((0,toConsumableArray["default"])(parent ? parent.isStart : []), [index === 0]),
isEnd: [].concat((0,toConsumableArray["default"])(parent ? parent.isEnd : []), [index === list.length - 1])
});
flattenList.push(flattenNode);
// Loop treeNode children
if (expandedKeys === true || expandedKeySet.has(mergedKey)) {
flattenNode.children = dig(treeNode[fieldChildren] || [], 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,
// To avoid too many params, let use config instead of origin param
config) {
var mergedConfig = {};
if ((0,esm_typeof["default"])(config) === 'object') {
mergedConfig = config;
} else {
mergedConfig = {
externalGetKey: config
};
}
mergedConfig = mergedConfig || {};
// Init config
var _mergedConfig = mergedConfig,
childrenPropName = _mergedConfig.childrenPropName,
externalGetKey = _mergedConfig.externalGetKey,
fieldNames = _mergedConfig.fieldNames;
var _fillFieldNames2 = treeUtil_fillFieldNames(fieldNames),
fieldKey = _fillFieldNames2.key,
fieldChildren = _fillFieldNames2.children;
var mergeChildrenPropName = childrenPropName || fieldChildren;
// Get keys
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 treeUtil_getKey(node[fieldKey], pos);
};
}
// Process
function processNode(node, index, parent, pathNodes) {
var children = node ? node[mergeChildrenPropName] : dataNodes;
var pos = node ? getPosition(parent.pos, index) : '0';
var connectNodes = node ? [].concat((0,toConsumableArray["default"])(pathNodes), [node]) : [];
// 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,
nodes: connectNodes
};
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
}, connectNodes);
});
}
}
processNode(null);
}
/**
* Convert `treeData` into entity records.
*/
function convertDataToEntities(dataNodes) {
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
initWrapper = _ref2.initWrapper,
processEntity = _ref2.processEntity,
onProcessFinished = _ref2.onProcessFinished,
externalGetKey = _ref2.externalGetKey,
childrenPropName = _ref2.childrenPropName,
fieldNames = _ref2.fieldNames;
var /** @deprecated Use `config.externalGetKey` instead */
legacyExternalGetKey = arguments.length > 2 ? arguments[2] : undefined;
// Init config
var mergedExternalGetKey = externalGetKey || legacyExternalGetKey;
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,
nodes = item.nodes;
var entity = {
node: node,
nodes: nodes,
index: index,
key: key,
pos: pos,
level: level
};
var mergedKey = treeUtil_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: mergedExternalGetKey,
childrenPropName: childrenPropName,
fieldNames: fieldNames
});
if (onProcessFinished) {
onProcessFinished(wrapper);
}
return wrapper;
}
/**
* Get TreeNode props with Tree props.
*/
function getTreeNodeProps(key, _ref3) {
var expandedKeys = _ref3.expandedKeys,
selectedKeys = _ref3.selectedKeys,
loadedKeys = _ref3.loadedKeys,
loadingKeys = _ref3.loadingKeys,
checkedKeys = _ref3.checkedKeys,
halfCheckedKeys = _ref3.halfCheckedKeys,
dragOverNodeKey = _ref3.dragOverNodeKey,
dropPosition = _ref3.dropPosition,
keyEntities = _ref3.keyEntities;
var entity = getEntity(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
// Since the interaction of drag is changed, the semantic of the props are
// not accuracy, I think it should be finally removed
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,
eventKey = props.eventKey;
var eventData = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, data), {}, {
expanded: expanded,
selected: selected,
checked: checked,
loaded: loaded,
loading: loading,
halfChecked: halfChecked,
dragOver: dragOver,
dragOverGapTop: dragOverGapTop,
dragOverGapBottom: dragOverGapBottom,
pos: pos,
active: active,
key: eventKey
});
if (!('props' in eventData)) {
Object.defineProperty(eventData, 'props', {
get: function get() {
(0,warning["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;
}
;// ./node_modules/rc-cascader/es/hooks/useEntities.js
/** Lazy parse options data into conduct-able info to avoid perf issue in single mode */
/* harmony default export */ var useEntities = (function (options, fieldNames) {
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
options: [],
info: {
keyEntities: {},
pathKeyEntities: {}
}
});
var getEntities = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
if (cacheRef.current.options !== options) {
cacheRef.current.options = options;
cacheRef.current.info = convertDataToEntities(options, {
fieldNames: fieldNames,
initWrapper: function initWrapper(wrapper) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, wrapper), {}, {
pathKeyEntities: {}
});
},
processEntity: function processEntity(entity, wrapper) {
var pathKey = entity.nodes.map(function (node) {
return node[fieldNames.value];
}).join(VALUE_SPLIT);
wrapper.pathKeyEntities[pathKey] = entity;
// Overwrite origin key.
// this is very hack but we need let conduct logic work with connect path
entity.key = pathKey;
}
});
}
return cacheRef.current.info.pathKeyEntities;
}, [fieldNames, options]);
return getEntities;
});
;// ./node_modules/rc-cascader/es/hooks/useOptions.js
function useOptions_useOptions(mergedFieldNames, options) {
var mergedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return options || [];
}, [options]);
// Only used in multiple mode, this fn will not call in single mode
var getPathKeyEntities = useEntities(mergedOptions, mergedFieldNames);
/** Convert path key back to value format */
var getValueByKeyPath = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (pathKeys) {
var keyPathEntities = getPathKeyEntities();
return pathKeys.map(function (pathKey) {
var nodes = keyPathEntities[pathKey].nodes;
return nodes.map(function (node) {
return node[mergedFieldNames.value];
});
});
}, [getPathKeyEntities, mergedFieldNames]);
return [mergedOptions, getPathKeyEntities, getValueByKeyPath];
}
;// ./node_modules/rc-cascader/es/hooks/useSearchConfig.js
// Convert `showSearch` to unique config
function useSearchConfig(showSearch) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!showSearch) {
return [false, {}];
}
var searchConfig = {
matchInputWidth: true,
limit: 50
};
if (showSearch && (0,esm_typeof["default"])(showSearch) === 'object') {
searchConfig = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, searchConfig), showSearch);
}
if (searchConfig.limit <= 0) {
searchConfig.limit = false;
if (true) {
(0,warning["default"])(false, "'limit' of showSearch should be positive number or false.");
}
}
return [true, searchConfig];
}, [showSearch]);
}
;// ./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 = !!getEntity(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);
});
(0,warning["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;
}
;// ./node_modules/rc-cascader/es/hooks/useSelect.js
function useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy) {
return function (valuePath) {
if (!multiple) {
triggerChange(valuePath);
} else {
// Prepare conduct required info
var pathKey = toPathKey(valuePath);
var checkedPathKeys = toPathKeys(checkedValues);
var halfCheckedPathKeys = toPathKeys(halfCheckedValues);
var existInChecked = checkedPathKeys.includes(pathKey);
var existInMissing = missingCheckedValues.some(function (valueCells) {
return toPathKey(valueCells) === pathKey;
});
// Do update
var nextCheckedValues = checkedValues;
var nextMissingValues = missingCheckedValues;
if (existInMissing && !existInChecked) {
// Missing value only do filter
nextMissingValues = missingCheckedValues.filter(function (valueCells) {
return toPathKey(valueCells) !== pathKey;
});
} else {
// Update checked key first
var nextRawCheckedKeys = existInChecked ? checkedPathKeys.filter(function (key) {
return key !== pathKey;
}) : [].concat((0,toConsumableArray["default"])(checkedPathKeys), [pathKey]);
var pathKeyEntities = getPathKeyEntities();
// Conduction by selected or not
var checkedKeys;
if (existInChecked) {
var _conductCheck = conductCheck(nextRawCheckedKeys, {
checked: false,
halfCheckedKeys: halfCheckedPathKeys
}, pathKeyEntities);
checkedKeys = _conductCheck.checkedKeys;
} else {
var _conductCheck2 = conductCheck(nextRawCheckedKeys, true, pathKeyEntities);
checkedKeys = _conductCheck2.checkedKeys;
}
// Roll up to parent level keys
var deDuplicatedKeys = formatStrategyValues(checkedKeys, getPathKeyEntities, showCheckedStrategy);
nextCheckedValues = getValueByKeyPath(deDuplicatedKeys);
}
triggerChange([].concat((0,toConsumableArray["default"])(nextMissingValues), (0,toConsumableArray["default"])(nextCheckedValues)));
}
};
}
;// ./node_modules/rc-cascader/es/hooks/useValues.js
function useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues) {
// Fill `rawValues` with checked conduction values
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var _getMissingValues = getMissingValues(rawValues),
_getMissingValues2 = (0,slicedToArray["default"])(_getMissingValues, 2),
existValues = _getMissingValues2[0],
missingValues = _getMissingValues2[1];
if (!multiple || !rawValues.length) {
return [existValues, [], missingValues];
}
var keyPathValues = toPathKeys(existValues);
var keyPathEntities = getPathKeyEntities();
var _conductCheck = conductCheck(keyPathValues, true, keyPathEntities),
checkedKeys = _conductCheck.checkedKeys,
halfCheckedKeys = _conductCheck.halfCheckedKeys;
// Convert key back to value cells
return [getValueByKeyPath(checkedKeys), getValueByKeyPath(halfCheckedKeys), missingValues];
}, [multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues]);
}
;// ./node_modules/rc-cascader/es/OptionList/CacheContent.js
var CacheContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function (_ref) {
var children = _ref.children;
return children;
}, function (_, next) {
return !next.open;
});
if (true) {
CacheContent.displayName = 'CacheContent';
}
/* harmony default export */ var OptionList_CacheContent = (CacheContent);
;// ./node_modules/rc-cascader/es/OptionList/Checkbox.js
function Checkbox_Checkbox(_ref) {
var _classNames;
var prefixCls = _ref.prefixCls,
checked = _ref.checked,
halfChecked = _ref.halfChecked,
disabled = _ref.disabled,
onClick = _ref.onClick,
disableCheckbox = _ref.disableCheckbox;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
checkable = _React$useContext.checkable;
var customCheckbox = typeof checkable !== 'boolean' ? checkable : null;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()("".concat(prefixCls), (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-checked"), checked), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-indeterminate"), !checked && halfChecked), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled || disableCheckbox), _classNames)),
onClick: onClick
}, customCheckbox);
}
;// ./node_modules/rc-cascader/es/OptionList/Column.js
var FIX_LABEL = '__cascader_fix_label__';
function Column(_ref) {
var prefixCls = _ref.prefixCls,
multiple = _ref.multiple,
options = _ref.options,
activeValue = _ref.activeValue,
prevValuePath = _ref.prevValuePath,
onToggleOpen = _ref.onToggleOpen,
onSelect = _ref.onSelect,
onActive = _ref.onActive,
checkedSet = _ref.checkedSet,
halfCheckedSet = _ref.halfCheckedSet,
loadingKeys = _ref.loadingKeys,
isSelectable = _ref.isSelectable,
propsDisabled = _ref.disabled;
var menuPrefixCls = "".concat(prefixCls, "-menu");
var menuItemPrefixCls = "".concat(prefixCls, "-menu-item");
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
fieldNames = _React$useContext.fieldNames,
changeOnSelect = _React$useContext.changeOnSelect,
expandTrigger = _React$useContext.expandTrigger,
expandIcon = _React$useContext.expandIcon,
loadingIcon = _React$useContext.loadingIcon,
dropdownMenuColumnStyle = _React$useContext.dropdownMenuColumnStyle,
optionRender = _React$useContext.optionRender;
var hoverOpen = expandTrigger === 'hover';
var isOptionDisabled = function isOptionDisabled(disabled) {
return propsDisabled || disabled;
};
// ============================ Option ============================
var optionInfoList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return options.map(function (option) {
var _option$FIX_LABEL;
var disabled = option.disabled,
disableCheckbox = option.disableCheckbox;
var searchOptions = option[SEARCH_MARK];
var label = (_option$FIX_LABEL = option[FIX_LABEL]) !== null && _option$FIX_LABEL !== void 0 ? _option$FIX_LABEL : option[fieldNames.label];
var value = option[fieldNames.value];
var isMergedLeaf = isLeaf(option, fieldNames);
// Get real value of option. Search option is different way.
var fullPath = searchOptions ? searchOptions.map(function (opt) {
return opt[fieldNames.value];
}) : [].concat((0,toConsumableArray["default"])(prevValuePath), [value]);
var fullPathKey = toPathKey(fullPath);
var isLoading = loadingKeys.includes(fullPathKey);
// >>>>> checked
var checked = checkedSet.has(fullPathKey);
// >>>>> halfChecked
var halfChecked = halfCheckedSet.has(fullPathKey);
return {
disabled: disabled,
label: label,
value: value,
isLeaf: isMergedLeaf,
isLoading: isLoading,
checked: checked,
halfChecked: halfChecked,
option: option,
disableCheckbox: disableCheckbox,
fullPath: fullPath,
fullPathKey: fullPathKey
};
});
}, [options, checkedSet, fieldNames, halfCheckedSet, loadingKeys, prevValuePath]);
// ============================ Render ============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: menuPrefixCls,
role: "menu"
}, optionInfoList.map(function (_ref2) {
var _classNames;
var disabled = _ref2.disabled,
label = _ref2.label,
value = _ref2.value,
isMergedLeaf = _ref2.isLeaf,
isLoading = _ref2.isLoading,
checked = _ref2.checked,
halfChecked = _ref2.halfChecked,
option = _ref2.option,
fullPath = _ref2.fullPath,
fullPathKey = _ref2.fullPathKey,
disableCheckbox = _ref2.disableCheckbox;
// >>>>> Open
var triggerOpenPath = function triggerOpenPath() {
if (isOptionDisabled(disabled)) {
return;
}
var nextValueCells = (0,toConsumableArray["default"])(fullPath);
if (hoverOpen && isMergedLeaf) {
nextValueCells.pop();
}
onActive(nextValueCells);
};
// >>>>> Selection
var triggerSelect = function triggerSelect() {
if (isSelectable(option) && !isOptionDisabled(disabled)) {
onSelect(fullPath, isMergedLeaf);
}
};
// >>>>> Title
var title;
if (typeof option.title === 'string') {
title = option.title;
} else if (typeof label === 'string') {
title = label;
}
// >>>>> Render
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
key: fullPathKey,
className: classnames_default()(menuItemPrefixCls, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-expand"), !isMergedLeaf), (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-active"), activeValue === value || activeValue === fullPathKey), (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-disabled"), isOptionDisabled(disabled)), (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-loading"), isLoading), _classNames)),
style: dropdownMenuColumnStyle,
role: "menuitemcheckbox",
title: title,
"aria-checked": checked,
"data-path-key": fullPathKey,
onClick: function onClick() {
triggerOpenPath();
if (disableCheckbox) {
return;
}
if (!multiple || isMergedLeaf) {
triggerSelect();
}
},
onDoubleClick: function onDoubleClick() {
if (changeOnSelect) {
onToggleOpen(false);
}
},
onMouseEnter: function onMouseEnter() {
if (hoverOpen) {
triggerOpenPath();
}
},
onMouseDown: function onMouseDown(e) {
// Prevent selector from blurring
e.preventDefault();
}
}, multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Checkbox_Checkbox, {
prefixCls: "".concat(prefixCls, "-checkbox"),
checked: checked,
halfChecked: halfChecked,
disabled: isOptionDisabled(disabled) || disableCheckbox,
disableCheckbox: disableCheckbox,
onClick: function onClick(e) {
if (disableCheckbox) {
return;
}
e.stopPropagation();
triggerSelect();
}
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(menuItemPrefixCls, "-content")
}, optionRender ? optionRender(option) : label), !isLoading && expandIcon && !isMergedLeaf && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(menuItemPrefixCls, "-expand-icon")
}, expandIcon), isLoading && loadingIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(menuItemPrefixCls, "-loading-icon")
}, loadingIcon));
}));
}
;// ./node_modules/rc-cascader/es/OptionList/useActive.js
/**
* Control the active open options path.
*/
var useActive_useActive = function useActive(multiple, open) {
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
values = _React$useContext.values;
var firstValueCells = values[0];
// Record current dropdown active options
// This also control the open status
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
activeValueCells = _React$useState2[0],
setActiveValueCells = _React$useState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!multiple) {
setActiveValueCells(firstValueCells || []);
}
}, /* eslint-disable react-hooks/exhaustive-deps */
[open, firstValueCells]
/* eslint-enable react-hooks/exhaustive-deps */);
return [activeValueCells, setActiveValueCells];
};
/* harmony default export */ var OptionList_useActive = (useActive_useActive);
;// ./node_modules/rc-cascader/es/OptionList/useKeyboard.js
/* harmony default export */ var useKeyboard = (function (ref, options, fieldNames, activeValueCells, setActiveValueCells, onKeyBoardSelect, contextProps) {
var direction = contextProps.direction,
searchValue = contextProps.searchValue,
toggleOpen = contextProps.toggleOpen,
open = contextProps.open;
var rtl = direction === 'rtl';
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var activeIndex = -1;
var currentOptions = options;
var mergedActiveIndexes = [];
var mergedActiveValueCells = [];
var len = activeValueCells.length;
var pathKeys = getFullPathKeys(options, fieldNames);
// Fill validate active value cells and index
var _loop = function _loop(i) {
// Mark the active index for current options
var nextActiveIndex = currentOptions.findIndex(function (option, index) {
return (pathKeys[index] ? toPathKey(pathKeys[index]) : option[fieldNames.value]) === activeValueCells[i];
});
if (nextActiveIndex === -1) {
return 1; // break
}
activeIndex = nextActiveIndex;
mergedActiveIndexes.push(activeIndex);
mergedActiveValueCells.push(activeValueCells[i]);
currentOptions = currentOptions[activeIndex][fieldNames.children];
};
for (var i = 0; i < len && currentOptions; i += 1) {
if (_loop(i)) break;
}
// Fill last active options
var activeOptions = options;
for (var _i = 0; _i < mergedActiveIndexes.length - 1; _i += 1) {
activeOptions = activeOptions[mergedActiveIndexes[_i]][fieldNames.children];
}
return [mergedActiveValueCells, activeIndex, activeOptions, pathKeys];
}, [activeValueCells, fieldNames, options]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 4),
validActiveValueCells = _React$useMemo2[0],
lastActiveIndex = _React$useMemo2[1],
lastActiveOptions = _React$useMemo2[2],
fullPathKeys = _React$useMemo2[3];
// Update active value cells and scroll to target element
var internalSetActiveValueCells = function internalSetActiveValueCells(next) {
setActiveValueCells(next);
};
// Same options offset
var offsetActiveOption = function offsetActiveOption(offset) {
var len = lastActiveOptions.length;
var currentIndex = lastActiveIndex;
if (currentIndex === -1 && offset < 0) {
currentIndex = len;
}
for (var i = 0; i < len; i += 1) {
currentIndex = (currentIndex + offset + len) % len;
var _option = lastActiveOptions[currentIndex];
if (_option && !_option.disabled) {
var nextActiveCells = validActiveValueCells.slice(0, -1).concat(fullPathKeys[currentIndex] ? toPathKey(fullPathKeys[currentIndex]) : _option[fieldNames.value]);
internalSetActiveValueCells(nextActiveCells);
return;
}
}
};
// Different options offset
var prevColumn = function prevColumn() {
if (validActiveValueCells.length > 1) {
var nextActiveCells = validActiveValueCells.slice(0, -1);
internalSetActiveValueCells(nextActiveCells);
} else {
toggleOpen(false);
}
};
var nextColumn = function nextColumn() {
var _lastActiveOptions$la;
var nextOptions = ((_lastActiveOptions$la = lastActiveOptions[lastActiveIndex]) === null || _lastActiveOptions$la === void 0 ? void 0 : _lastActiveOptions$la[fieldNames.children]) || [];
var nextOption = nextOptions.find(function (option) {
return !option.disabled;
});
if (nextOption) {
var nextActiveCells = [].concat((0,toConsumableArray["default"])(validActiveValueCells), [nextOption[fieldNames.value]]);
internalSetActiveValueCells(nextActiveCells);
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
// scrollTo: treeRef.current?.scrollTo,
onKeyDown: function onKeyDown(event) {
var which = event.which;
switch (which) {
// >>> Arrow keys
case KeyCode["default"].UP:
case KeyCode["default"].DOWN:
{
var offset = 0;
if (which === KeyCode["default"].UP) {
offset = -1;
} else if (which === KeyCode["default"].DOWN) {
offset = 1;
}
if (offset !== 0) {
offsetActiveOption(offset);
}
break;
}
case KeyCode["default"].LEFT:
{
if (searchValue) {
break;
}
if (rtl) {
nextColumn();
} else {
prevColumn();
}
break;
}
case KeyCode["default"].RIGHT:
{
if (searchValue) {
break;
}
if (rtl) {
prevColumn();
} else {
nextColumn();
}
break;
}
case KeyCode["default"].BACKSPACE:
{
if (!searchValue) {
prevColumn();
}
break;
}
// >>> Select
case KeyCode["default"].ENTER:
{
if (validActiveValueCells.length) {
var _option2 = lastActiveOptions[lastActiveIndex];
// Search option should revert back of origin options
var originOptions = (_option2 === null || _option2 === void 0 ? void 0 : _option2[SEARCH_MARK]) || [];
if (originOptions.length) {
onKeyBoardSelect(originOptions.map(function (opt) {
return opt[fieldNames.value];
}), originOptions[originOptions.length - 1]);
} else {
onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
}
}
break;
}
// >>> Close
case KeyCode["default"].ESC:
{
toggleOpen(false);
if (open) {
event.stopPropagation();
}
}
}
},
onKeyUp: function onKeyUp() {}
};
});
});
;// ./node_modules/rc-cascader/es/OptionList/List.js
/* eslint-disable default-case */
var RawOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _optionColumns$, _ref3, _classNames;
var prefixCls = props.prefixCls,
multiple = props.multiple,
searchValue = props.searchValue,
toggleOpen = props.toggleOpen,
notFoundContent = props.notFoundContent,
direction = props.direction,
open = props.open,
disabled = props.disabled;
var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var rtl = direction === 'rtl';
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
options = _React$useContext.options,
values = _React$useContext.values,
halfValues = _React$useContext.halfValues,
fieldNames = _React$useContext.fieldNames,
changeOnSelect = _React$useContext.changeOnSelect,
onSelect = _React$useContext.onSelect,
searchOptions = _React$useContext.searchOptions,
dropdownPrefixCls = _React$useContext.dropdownPrefixCls,
loadData = _React$useContext.loadData,
expandTrigger = _React$useContext.expandTrigger;
var mergedPrefixCls = dropdownPrefixCls || prefixCls;
// ========================= loadData =========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
loadingKeys = _React$useState2[0],
setLoadingKeys = _React$useState2[1];
var internalLoadData = function internalLoadData(valueCells) {
// Do not load when search
if (!loadData || searchValue) {
return;
}
var optionList = toPathOptions(valueCells, options, fieldNames);
var rawOptions = optionList.map(function (_ref) {
var option = _ref.option;
return option;
});
var lastOption = rawOptions[rawOptions.length - 1];
if (lastOption && !isLeaf(lastOption, fieldNames)) {
var pathKey = toPathKey(valueCells);
setLoadingKeys(function (keys) {
return [].concat((0,toConsumableArray["default"])(keys), [pathKey]);
});
loadData(rawOptions);
}
};
// zombieJ: This is bad. We should make this same as `rc-tree` to use Promise instead.
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (loadingKeys.length) {
loadingKeys.forEach(function (loadingKey) {
var valueStrCells = toPathValueStr(loadingKey);
var optionList = toPathOptions(valueStrCells, options, fieldNames, true).map(function (_ref2) {
var option = _ref2.option;
return option;
});
var lastOption = optionList[optionList.length - 1];
if (!lastOption || lastOption[fieldNames.children] || isLeaf(lastOption, fieldNames)) {
setLoadingKeys(function (keys) {
return keys.filter(function (key) {
return key !== loadingKey;
});
});
}
});
}
}, [options, loadingKeys, fieldNames]);
// ========================== Values ==========================
var checkedSet = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return new Set(toPathKeys(values));
}, [values]);
var halfCheckedSet = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return new Set(toPathKeys(halfValues));
}, [halfValues]);
// ====================== Accessibility =======================
var _useActive = OptionList_useActive(multiple, open),
_useActive2 = (0,slicedToArray["default"])(_useActive, 2),
activeValueCells = _useActive2[0],
setActiveValueCells = _useActive2[1];
// =========================== Path ===========================
var onPathOpen = function onPathOpen(nextValueCells) {
setActiveValueCells(nextValueCells);
// Trigger loadData
internalLoadData(nextValueCells);
};
var isSelectable = function isSelectable(option) {
if (disabled) {
return false;
}
var optionDisabled = option.disabled;
var isMergedLeaf = isLeaf(option, fieldNames);
return !optionDisabled && (isMergedLeaf || changeOnSelect || multiple);
};
var onPathSelect = function onPathSelect(valuePath, leaf) {
var fromKeyboard = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
onSelect(valuePath);
if (!multiple && (leaf || changeOnSelect && (expandTrigger === 'hover' || fromKeyboard))) {
toggleOpen(false);
}
};
// ========================== Option ==========================
var mergedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (searchValue) {
return searchOptions;
}
return options;
}, [searchValue, searchOptions, options]);
// ========================== Column ==========================
var optionColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var optionList = [{
options: mergedOptions
}];
var currentList = mergedOptions;
var fullPathKeys = getFullPathKeys(currentList, fieldNames);
var _loop = function _loop() {
var activeValueCell = activeValueCells[i];
var currentOption = currentList.find(function (option, index) {
return (fullPathKeys[index] ? toPathKey(fullPathKeys[index]) : option[fieldNames.value]) === activeValueCell;
});
var subOptions = currentOption === null || currentOption === void 0 ? void 0 : currentOption[fieldNames.children];
if (!(subOptions !== null && subOptions !== void 0 && subOptions.length)) {
return 1; // break
}
currentList = subOptions;
optionList.push({
options: subOptions
});
};
for (var i = 0; i < activeValueCells.length; i += 1) {
if (_loop()) break;
}
return optionList;
}, [mergedOptions, activeValueCells, fieldNames]);
// ========================= Keyboard =========================
var onKeyboardSelect = function onKeyboardSelect(selectValueCells, option) {
if (isSelectable(option)) {
onPathSelect(selectValueCells, isLeaf(option, fieldNames), true);
}
};
useKeyboard(ref, mergedOptions, fieldNames, activeValueCells, onPathOpen, onKeyboardSelect, {
direction: direction,
searchValue: searchValue,
toggleOpen: toggleOpen,
open: open
});
// >>>>> Active Scroll
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (searchValue) {
return;
}
for (var i = 0; i < activeValueCells.length; i += 1) {
var _containerRef$current;
var cellPath = activeValueCells.slice(0, i + 1);
var cellKeyPath = toPathKey(cellPath);
var ele = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelector("li[data-path-key=\"".concat(cellKeyPath.replace(/\\{0,2}"/g, '\\"'), "\"]") // matches unescaped double quotes
);
if (ele) {
scrollIntoParentView(ele);
}
}
}, [activeValueCells, searchValue]);
// ========================== Render ==========================
// >>>>> Empty
var isEmpty = !((_optionColumns$ = optionColumns[0]) !== null && _optionColumns$ !== void 0 && (_optionColumns$ = _optionColumns$.options) !== null && _optionColumns$ !== void 0 && _optionColumns$.length);
var emptyList = [(_ref3 = {}, (0,defineProperty["default"])(_ref3, fieldNames.value, '__EMPTY__'), (0,defineProperty["default"])(_ref3, FIX_LABEL, notFoundContent), (0,defineProperty["default"])(_ref3, "disabled", true), _ref3)];
var columnProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
multiple: !isEmpty && multiple,
onSelect: onPathSelect,
onActive: onPathOpen,
onToggleOpen: toggleOpen,
checkedSet: checkedSet,
halfCheckedSet: halfCheckedSet,
loadingKeys: loadingKeys,
isSelectable: isSelectable
});
// >>>>> Columns
var mergedOptionColumns = isEmpty ? [{
options: emptyList
}] : optionColumns;
var columnNodes = mergedOptionColumns.map(function (col, index) {
var prevValuePath = activeValueCells.slice(0, index);
var activeValue = activeValueCells[index];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Column, (0,esm_extends["default"])({
key: index
}, columnProps, {
prefixCls: mergedPrefixCls,
options: col.options,
prevValuePath: prevValuePath,
activeValue: activeValue
}));
});
// >>>>> Render
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList_CacheContent, {
open: open
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(mergedPrefixCls, "-menus"), (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(mergedPrefixCls, "-menu-empty"), isEmpty), (0,defineProperty["default"])(_classNames, "".concat(mergedPrefixCls, "-rtl"), rtl), _classNames)),
ref: containerRef
}, columnNodes));
});
if (true) {
RawOptionList.displayName = 'RawOptionList';
}
/* harmony default export */ var OptionList_List = (RawOptionList);
;// ./node_modules/rc-cascader/es/OptionList/index.js
var OptionList_RefOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var baseProps = useBaseProps();
// >>>>> Render
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList_List, (0,esm_extends["default"])({}, props, baseProps, {
ref: ref
}));
});
/* harmony default export */ var rc_cascader_es_OptionList = (OptionList_RefOptionList);
;// ./node_modules/rc-cascader/es/Panel.js
function noop() {}
function Panel_Panel(props) {
var _classNames;
var _ref = props,
_ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-cascader' : _ref$prefixCls,
style = _ref.style,
className = _ref.className,
options = _ref.options,
checkable = _ref.checkable,
defaultValue = _ref.defaultValue,
value = _ref.value,
fieldNames = _ref.fieldNames,
changeOnSelect = _ref.changeOnSelect,
onChange = _ref.onChange,
showCheckedStrategy = _ref.showCheckedStrategy,
loadData = _ref.loadData,
expandTrigger = _ref.expandTrigger,
_ref$expandIcon = _ref.expandIcon,
expandIcon = _ref$expandIcon === void 0 ? '>' : _ref$expandIcon,
loadingIcon = _ref.loadingIcon,
direction = _ref.direction,
_ref$notFoundContent = _ref.notFoundContent,
notFoundContent = _ref$notFoundContent === void 0 ? 'Not Found' : _ref$notFoundContent,
disabled = _ref.disabled;
// ======================== Multiple ========================
var multiple = !!checkable;
// ========================= Values =========================
var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
value: value,
postState: toRawValues
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
rawValues = _useMergedState2[0],
setRawValues = _useMergedState2[1];
// ========================= FieldNames =========================
var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return commonUtil_fillFieldNames(fieldNames);
}, /* eslint-disable react-hooks/exhaustive-deps */
[JSON.stringify(fieldNames)]
/* eslint-enable react-hooks/exhaustive-deps */);
// =========================== Option ===========================
var _useOptions = useOptions_useOptions(mergedFieldNames, options),
_useOptions2 = (0,slicedToArray["default"])(_useOptions, 3),
mergedOptions = _useOptions2[0],
getPathKeyEntities = _useOptions2[1],
getValueByKeyPath = _useOptions2[2];
// ========================= Values =========================
var getMissingValues = useMissingValues(mergedOptions, mergedFieldNames);
// Fill `rawValues` with checked conduction values
var _useValues = useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues),
_useValues2 = (0,slicedToArray["default"])(_useValues, 3),
checkedValues = _useValues2[0],
halfCheckedValues = _useValues2[1],
missingCheckedValues = _useValues2[2];
// =========================== Change ===========================
var triggerChange = (0,rc_util_es.useEvent)(function (nextValues) {
setRawValues(nextValues);
// Save perf if no need trigger event
if (onChange) {
var nextRawValues = toRawValues(nextValues);
var valueOptions = nextRawValues.map(function (valueCells) {
return toPathOptions(valueCells, mergedOptions, mergedFieldNames).map(function (valueOpt) {
return valueOpt.option;
});
});
var triggerValues = multiple ? nextRawValues : nextRawValues[0];
var triggerOptions = multiple ? valueOptions : valueOptions[0];
onChange(triggerValues, triggerOptions);
}
});
// =========================== Select ===========================
var handleSelection = useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy);
var onInternalSelect = (0,rc_util_es.useEvent)(function (valuePath) {
handleSelection(valuePath);
});
// ======================== Context =========================
var cascaderContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
options: mergedOptions,
fieldNames: mergedFieldNames,
values: checkedValues,
halfValues: halfCheckedValues,
changeOnSelect: changeOnSelect,
onSelect: onInternalSelect,
checkable: checkable,
searchOptions: [],
dropdownPrefixCls: undefined,
loadData: loadData,
expandTrigger: expandTrigger,
expandIcon: expandIcon,
loadingIcon: loadingIcon,
dropdownMenuColumnStyle: undefined
};
}, [mergedOptions, mergedFieldNames, checkedValues, halfCheckedValues, changeOnSelect, onInternalSelect, checkable, loadData, expandTrigger, expandIcon, loadingIcon]);
// ========================= Render =========================
var panelPrefixCls = "".concat(prefixCls, "-panel");
var isEmpty = !mergedOptions.length;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_cascader_es_context.Provider, {
value: cascaderContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(panelPrefixCls, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(panelPrefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty["default"])(_classNames, "".concat(panelPrefixCls, "-empty"), isEmpty), _classNames), className),
style: style
}, isEmpty ? notFoundContent : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList_List, {
prefixCls: prefixCls,
searchValue: "",
multiple: multiple,
toggleOpen: noop,
open: true,
direction: direction,
disabled: disabled
})));
}
;// ./node_modules/rc-cascader/es/utils/warningPropsUtil.js
function warningPropsUtil_warningProps(props) {
var onPopupVisibleChange = props.onPopupVisibleChange,
popupVisible = props.popupVisible,
popupClassName = props.popupClassName,
popupPlacement = props.popupPlacement;
(0,warning["default"])(!onPopupVisibleChange, '`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead.');
(0,warning["default"])(popupVisible === undefined, '`popupVisible` is deprecated. Please use `open` instead.');
(0,warning["default"])(popupClassName === undefined, '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
(0,warning["default"])(popupPlacement === undefined, '`popupPlacement` is deprecated. Please use `placement` instead.');
}
// value in Cascader options should not be null
function warningPropsUtil_warningNullOptions(options, fieldNames) {
if (options) {
var recursiveOptions = function recursiveOptions(optionsList) {
for (var i = 0; i < optionsList.length; i++) {
var option = optionsList[i];
if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
(0,warning["default"])(false, '`value` in Cascader options should not be `null`.');
return true;
}
if (Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]) && recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children])) {
return true;
}
}
};
recursiveOptions(options);
}
}
/* harmony default export */ var utils_warningPropsUtil = (warningPropsUtil_warningProps);
;// ./node_modules/rc-cascader/es/Cascader.js
var Cascader_excluded = ["id", "prefixCls", "fieldNames", "defaultValue", "value", "changeOnSelect", "onChange", "displayRender", "checkable", "autoClearSearchValue", "searchValue", "onSearch", "showSearch", "expandTrigger", "options", "dropdownPrefixCls", "loadData", "popupVisible", "open", "popupClassName", "dropdownClassName", "dropdownMenuColumnStyle", "dropdownStyle", "popupPlacement", "placement", "onDropdownVisibleChange", "onPopupVisibleChange", "expandIcon", "loadingIcon", "children", "dropdownMatchSelectWidth", "showCheckedStrategy", "optionRender"];
var Cascader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var id = props.id,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-cascader' : _props$prefixCls,
fieldNames = props.fieldNames,
defaultValue = props.defaultValue,
value = props.value,
changeOnSelect = props.changeOnSelect,
onChange = props.onChange,
displayRender = props.displayRender,
checkable = props.checkable,
_props$autoClearSearc = props.autoClearSearchValue,
autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
searchValue = props.searchValue,
onSearch = props.onSearch,
showSearch = props.showSearch,
expandTrigger = props.expandTrigger,
options = props.options,
dropdownPrefixCls = props.dropdownPrefixCls,
loadData = props.loadData,
popupVisible = props.popupVisible,
open = props.open,
popupClassName = props.popupClassName,
dropdownClassName = props.dropdownClassName,
dropdownMenuColumnStyle = props.dropdownMenuColumnStyle,
customDropdownStyle = props.dropdownStyle,
popupPlacement = props.popupPlacement,
placement = props.placement,
onDropdownVisibleChange = props.onDropdownVisibleChange,
onPopupVisibleChange = props.onPopupVisibleChange,
_props$expandIcon = props.expandIcon,
expandIcon = _props$expandIcon === void 0 ? '>' : _props$expandIcon,
loadingIcon = props.loadingIcon,
children = props.children,
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? false : _props$dropdownMatchS,
_props$showCheckedStr = props.showCheckedStrategy,
showCheckedStrategy = _props$showCheckedStr === void 0 ? SHOW_PARENT : _props$showCheckedStr,
optionRender = props.optionRender,
restProps = (0,objectWithoutProperties["default"])(props, Cascader_excluded);
var mergedId = useId_useId(id);
var multiple = !!checkable;
// =========================== Values ===========================
var _useMergedState = (0,useMergedState["default"])(defaultValue, {
value: value,
postState: toRawValues
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
rawValues = _useMergedState2[0],
setRawValues = _useMergedState2[1];
// ========================= FieldNames =========================
var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return commonUtil_fillFieldNames(fieldNames);
}, /* eslint-disable react-hooks/exhaustive-deps */
[JSON.stringify(fieldNames)]
/* eslint-enable react-hooks/exhaustive-deps */);
// =========================== Option ===========================
var _useOptions = useOptions_useOptions(mergedFieldNames, options),
_useOptions2 = (0,slicedToArray["default"])(_useOptions, 3),
mergedOptions = _useOptions2[0],
getPathKeyEntities = _useOptions2[1],
getValueByKeyPath = _useOptions2[2];
// =========================== Search ===========================
var _useMergedState3 = (0,useMergedState["default"])('', {
value: searchValue,
postState: function postState(search) {
return search || '';
}
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedSearchValue = _useMergedState4[0],
setSearchValue = _useMergedState4[1];
var onInternalSearch = function onInternalSearch(searchText, info) {
setSearchValue(searchText);
if (info.source !== 'blur' && onSearch) {
onSearch(searchText);
}
};
var _useSearchConfig = useSearchConfig(showSearch),
_useSearchConfig2 = (0,slicedToArray["default"])(_useSearchConfig, 2),
mergedShowSearch = _useSearchConfig2[0],
searchConfig = _useSearchConfig2[1];
var searchOptions = hooks_useSearchOptions(mergedSearchValue, mergedOptions, mergedFieldNames, dropdownPrefixCls || prefixCls, searchConfig, changeOnSelect || multiple);
// =========================== Values ===========================
var getMissingValues = useMissingValues(mergedOptions, mergedFieldNames);
// Fill `rawValues` with checked conduction values
var _useValues = useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues),
_useValues2 = (0,slicedToArray["default"])(_useValues, 3),
checkedValues = _useValues2[0],
halfCheckedValues = _useValues2[1],
missingCheckedValues = _useValues2[2];
var deDuplicatedValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var checkedKeys = toPathKeys(checkedValues);
var deduplicateKeys = formatStrategyValues(checkedKeys, getPathKeyEntities, showCheckedStrategy);
return [].concat((0,toConsumableArray["default"])(missingCheckedValues), (0,toConsumableArray["default"])(getValueByKeyPath(deduplicateKeys)));
}, [checkedValues, getPathKeyEntities, getValueByKeyPath, missingCheckedValues, showCheckedStrategy]);
var displayValues = useDisplayValues(deDuplicatedValues, mergedOptions, mergedFieldNames, multiple, displayRender);
// =========================== Change ===========================
var triggerChange = (0,useEvent["default"])(function (nextValues) {
setRawValues(nextValues);
// Save perf if no need trigger event
if (onChange) {
var nextRawValues = toRawValues(nextValues);
var valueOptions = nextRawValues.map(function (valueCells) {
return toPathOptions(valueCells, mergedOptions, mergedFieldNames).map(function (valueOpt) {
return valueOpt.option;
});
});
var triggerValues = multiple ? nextRawValues : nextRawValues[0];
var triggerOptions = multiple ? valueOptions : valueOptions[0];
onChange(triggerValues, triggerOptions);
}
});
// =========================== Select ===========================
var handleSelection = useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy);
var onInternalSelect = (0,useEvent["default"])(function (valuePath) {
if (!multiple || autoClearSearchValue) {
setSearchValue('');
}
handleSelection(valuePath);
});
// Display Value change logic
var onDisplayValuesChange = function onDisplayValuesChange(_, info) {
if (info.type === 'clear') {
triggerChange([]);
return;
}
// Cascader do not support `add` type. Only support `remove`
var _ref = info.values[0],
valueCells = _ref.valueCells;
onInternalSelect(valueCells);
};
// ============================ Open ============================
var mergedOpen = open !== undefined ? open : popupVisible;
var mergedDropdownClassName = dropdownClassName || popupClassName;
var mergedPlacement = placement || popupPlacement;
var onInternalDropdownVisibleChange = function onInternalDropdownVisibleChange(nextVisible) {
onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(nextVisible);
onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextVisible);
};
// ========================== Warning ===========================
if (true) {
utils_warningPropsUtil(props);
warningPropsUtil_warningNullOptions(mergedOptions, mergedFieldNames);
}
// ========================== Context ===========================
var cascaderContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
options: mergedOptions,
fieldNames: mergedFieldNames,
values: checkedValues,
halfValues: halfCheckedValues,
changeOnSelect: changeOnSelect,
onSelect: onInternalSelect,
checkable: checkable,
searchOptions: searchOptions,
dropdownPrefixCls: dropdownPrefixCls,
loadData: loadData,
expandTrigger: expandTrigger,
expandIcon: expandIcon,
loadingIcon: loadingIcon,
dropdownMenuColumnStyle: dropdownMenuColumnStyle,
optionRender: optionRender
};
}, [mergedOptions, mergedFieldNames, checkedValues, halfCheckedValues, changeOnSelect, onInternalSelect, checkable, searchOptions, dropdownPrefixCls, loadData, expandTrigger, expandIcon, loadingIcon, dropdownMenuColumnStyle, optionRender]);
// ==============================================================
// == Render ==
// ==============================================================
var emptyOptions = !(mergedSearchValue ? searchOptions : mergedOptions).length;
var dropdownStyle =
// Search to match width
mergedSearchValue && searchConfig.matchInputWidth ||
// Empty keep the width
emptyOptions ? {} : {
minWidth: 'auto'
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_cascader_es_context.Provider, {
value: cascaderContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseSelect, (0,esm_extends["default"])({}, restProps, {
// MISC
ref: ref,
id: mergedId,
prefixCls: prefixCls,
autoClearSearchValue: autoClearSearchValue,
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
dropdownStyle: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, dropdownStyle), customDropdownStyle)
// Value
,
displayValues: displayValues,
onDisplayValuesChange: onDisplayValuesChange,
mode: multiple ? 'multiple' : undefined
// Search
,
searchValue: mergedSearchValue,
onSearch: onInternalSearch,
showSearch: mergedShowSearch
// Options
,
OptionList: rc_cascader_es_OptionList,
emptyOptions: emptyOptions
// Open
,
open: mergedOpen,
dropdownClassName: mergedDropdownClassName,
placement: mergedPlacement,
onDropdownVisibleChange: onInternalDropdownVisibleChange
// Children
,
getRawInputElement: function getRawInputElement() {
return children;
}
})));
});
if (true) {
Cascader.displayName = 'Cascader';
}
Cascader.SHOW_PARENT = SHOW_PARENT;
Cascader.SHOW_CHILD = SHOW_CHILD;
Cascader.Panel = Panel_Panel;
/* harmony default export */ var es_Cascader = (Cascader);
;// ./node_modules/rc-cascader/es/index.js
/* harmony default export */ var rc_cascader_es = (es_Cascader);
;// ./components/cascader/hooks/useBase.ts
function useBase(customizePrefixCls, direction) {
const {
getPrefixCls,
direction: rootDirection,
renderEmpty
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const mergedDirection = direction || rootDirection;
const prefixCls = getPrefixCls('select', customizePrefixCls);
const cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls);
return [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty];
}
/* harmony default export */ var hooks_useBase = (useBase);
;// ./components/cascader/hooks/useCheckable.tsx
function useCheckable(cascaderPrefixCls, multiple) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => multiple ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${cascaderPrefixCls}-checkbox-inner`
}) : false, [multiple]);
}
;// ./components/cascader/hooks/useColumnIcons.tsx
const useColumnIcons = (prefixCls, rtl, expandIcon) => {
let mergedExpandIcon = expandIcon;
if (!expandIcon) {
mergedExpandIcon = rtl ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null);
}
const loadingIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-menu-item-loading-icon`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
spin: true
}));
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => [mergedExpandIcon, loadingIcon], [mergedExpandIcon]);
};
/* harmony default export */ var hooks_useColumnIcons = (useColumnIcons);
// EXTERNAL MODULE: ./components/cascader/style/index.ts
var cascader_style = __webpack_require__("./components/cascader/style/index.ts");
// EXTERNAL MODULE: ./components/cascader/style/columns.ts
var columns = __webpack_require__("./components/cascader/style/columns.ts");
;// ./components/cascader/style/panel.ts
// ============================== Panel ===============================
const genPanelStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-panel`]: [(0,columns["default"])(token), {
display: 'inline-flex',
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
borderRadius: token.borderRadiusLG,
overflowX: 'auto',
maxWidth: '100%',
[`${componentCls}-menus`]: {
alignItems: 'stretch'
},
[`${componentCls}-menu`]: {
height: 'auto'
},
'&-empty': {
padding: token.paddingXXS
}
}]
};
};
// ============================== Export ==============================
/* harmony default export */ var panel = ((0,genStyleUtils.genComponentStyleHook)(['Cascader', 'Panel'], token => genPanelStyle(token), cascader_style.prepareComponentToken));
;// ./components/cascader/Panel.tsx
function CascaderPanel(props) {
const {
prefixCls: customizePrefixCls,
className,
multiple,
rootClassName,
notFoundContent,
direction,
expandIcon,
disabled: customDisabled
} = props;
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = hooks_useBase(customizePrefixCls, direction);
const rootCls = hooks_useCSSVarCls(cascaderPrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,cascader_style["default"])(cascaderPrefixCls, rootCls);
panel(cascaderPrefixCls);
const isRtl = mergedDirection === 'rtl';
// ===================== Icon ======================
const [mergedExpandIcon, loadingIcon] = hooks_useColumnIcons(prefixCls, isRtl, expandIcon);
// ===================== Empty =====================
const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "Cascader"
}));
// =================== Multiple ====================
const checkable = useCheckable(cascaderPrefixCls, multiple);
// ==================== Render =====================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Panel_Panel, Object.assign({}, props, {
checkable: checkable,
prefixCls: cascaderPrefixCls,
className: classnames_default()(className, hashId, rootClassName, cssVarCls, rootCls),
notFoundContent: mergedNotFoundContent,
direction: mergedDirection,
expandIcon: mergedExpandIcon,
loadingIcon: loadingIcon,
disabled: mergedDisabled
})));
}
/* harmony default export */ var cascader_Panel = (CascaderPanel);
;// ./components/cascader/index.tsx
var cascader_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;
};
const {
SHOW_CHILD: cascader_SHOW_CHILD,
SHOW_PARENT: cascader_SHOW_PARENT
} = rc_cascader_es;
function highlightKeyword(str, lowerKeyword, prefixCls) {
const cells = str.toLowerCase().split(lowerKeyword).reduce((list, cur, index) => index === 0 ? [cur] : [].concat((0,toConsumableArray["default"])(list), [lowerKeyword, cur]), []);
const fillCells = [];
let start = 0;
cells.forEach((cell, index) => {
const end = start + cell.length;
let originWorld = str.slice(start, end);
start = end;
if (index % 2 === 1) {
originWorld =
/*#__PURE__*/
// eslint-disable-next-line react/no-array-index-key
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-menu-item-keyword`,
key: `separator-${index}`
}, originWorld);
}
fillCells.push(originWorld);
});
return fillCells;
}
const defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {
const optionList = [];
// We do lower here to save perf
const lower = inputValue.toLowerCase();
path.forEach((node, index) => {
if (index !== 0) {
optionList.push(' / ');
}
let label = node[fieldNames.label];
const type = typeof label;
if (type === 'string' || type === 'number') {
label = highlightKeyword(String(label), lower, prefixCls);
}
optionList.push(label);
});
return optionList;
};
const cascader_Cascader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
size: customizeSize,
disabled: customDisabled,
className,
rootClassName,
multiple,
bordered = true,
transitionName,
choiceTransitionName = '',
popupClassName,
dropdownClassName,
expandIcon,
placement,
showSearch,
allowClear = true,
notFoundContent,
direction,
getPopupContainer,
status: customStatus,
showArrow,
builtinPlacements,
style,
variant: customVariant
} = props,
rest = cascader_rest(props, ["prefixCls", "size", "disabled", "className", "rootClassName", "multiple", "bordered", "transitionName", "choiceTransitionName", "popupClassName", "dropdownClassName", "expandIcon", "placement", "showSearch", "allowClear", "notFoundContent", "direction", "getPopupContainer", "status", "showArrow", "builtinPlacements", "style", "variant"]);
const restProps = (0,omit["default"])(rest, ['suffixIcon']);
const {
getPrefixCls,
getPopupContainer: getContextPopupContainer,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('cascader');
const {
popupOverflow
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
// =================== Form =====================
const {
status: contextStatus,
hasFeedback,
isFormItemInput,
feedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Cascader');
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
true ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : 0;
warning.deprecated(!('bordered' in props), 'bordered', 'variant');
}
// ==================== Prefix =====================
const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = hooks_useBase(customizePrefixCls, direction);
const isRtl = mergedDirection === 'rtl';
const rootPrefixCls = getPrefixCls();
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapSelectCSSVar, hashId, cssVarCls] = (0,select_style["default"])(prefixCls, rootCls);
const cascaderRootCls = hooks_useCSSVarCls(cascaderPrefixCls);
const [wrapCascaderCSSVar] = (0,cascader_style["default"])(cascaderPrefixCls, cascaderRootCls);
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const [variant, enableVariantCls] = useVariants('cascader', customVariant, bordered);
// =================== No Found ====================
const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "Cascader"
}));
// =================== Dropdown ====================
const mergedDropdownClassName = classnames_default()(popupClassName || dropdownClassName, `${cascaderPrefixCls}-dropdown`, {
[`${cascaderPrefixCls}-dropdown-rtl`]: mergedDirection === 'rtl'
}, rootClassName, rootCls, cascaderRootCls, hashId, cssVarCls);
// ==================== Search =====================
const mergedShowSearch = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!showSearch) {
return showSearch;
}
let searchConfig = {
render: defaultSearchRender
};
if (typeof showSearch === 'object') {
searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
}
return searchConfig;
}, [showSearch]);
// ===================== Size ======================
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
// ===================== Icon ======================
const [mergedExpandIcon, loadingIcon] = hooks_useColumnIcons(prefixCls, isRtl, expandIcon);
// =================== Multiple ====================
const checkable = useCheckable(cascaderPrefixCls, multiple);
// ===================== Icons =====================
const showSuffixIcon = useShowArrow(props.suffixIcon, showArrow);
const {
suffixIcon,
removeIcon,
clearIcon
} = useIcons(Object.assign(Object.assign({}, props), {
hasFeedback,
feedbackIcon,
showSuffixIcon,
multiple,
prefixCls,
componentName: 'Cascader'
}));
// ===================== Placement =====================
const memoPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (placement !== undefined) {
return placement;
}
return isRtl ? 'bottomRight' : 'bottomLeft';
}, [placement, isRtl]);
const mergedAllowClear = allowClear === true ? {
clearIcon
} : allowClear;
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', (_a = restProps.dropdownStyle) === null || _a === void 0 ? void 0 : _a.zIndex);
// ==================== Render =====================
const renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_cascader_es, Object.assign({
prefixCls: prefixCls,
className: classnames_default()(!customizePrefixCls && cascaderPrefixCls, {
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: isRtl,
[`${prefixCls}-${variant}`]: enableVariantCls,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, contextClassName, className, rootClassName, rootCls, cascaderRootCls, hashId, cssVarCls),
disabled: mergedDisabled,
style: Object.assign(Object.assign({}, contextStyle), style)
}, restProps, {
builtinPlacements: select_mergedBuiltinPlacements(builtinPlacements, popupOverflow),
direction: mergedDirection,
placement: memoPlacement,
notFoundContent: mergedNotFoundContent,
allowClear: mergedAllowClear,
showSearch: mergedShowSearch,
expandIcon: mergedExpandIcon,
suffixIcon: suffixIcon,
removeIcon: removeIcon,
loadingIcon: loadingIcon,
checkable: checkable,
dropdownClassName: mergedDropdownClassName,
dropdownPrefixCls: customizePrefixCls || cascaderPrefixCls,
dropdownStyle: Object.assign(Object.assign({}, restProps.dropdownStyle), {
zIndex
}),
choiceTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, '', choiceTransitionName),
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),
getPopupContainer: getPopupContainer || getContextPopupContainer,
ref: ref
}));
return wrapCascaderCSSVar(wrapSelectCSSVar(renderNode));
});
if (true) {
cascader_Cascader.displayName = 'Cascader';
}
// We don't care debug panel
/* istanbul ignore next */
const cascader_PurePanel = _util_PurePanel(cascader_Cascader, 'dropdownAlign', props => (0,omit["default"])(props, ['visible']));
cascader_Cascader.SHOW_PARENT = cascader_SHOW_PARENT;
cascader_Cascader.SHOW_CHILD = cascader_SHOW_CHILD;
cascader_Cascader.Panel = cascader_Panel;
cascader_Cascader._InternalPanelDoNotUseOrYouWillBeFired = cascader_PurePanel;
/* harmony default export */ var cascader = (cascader_Cascader);
;// ./components/checkbox/GroupContext.ts
const GroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
/* harmony default export */ var checkbox_GroupContext = (GroupContext);
// EXTERNAL MODULE: ./components/checkbox/style/index.ts
var checkbox_style = __webpack_require__("./components/checkbox/style/index.ts");
;// ./components/checkbox/Checkbox.tsx
var Checkbox_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;
};
const InternalCheckbox = (props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
children,
indeterminate = false,
style,
onMouseEnter,
onMouseLeave,
skipGroup = false,
disabled
} = props,
restProps = Checkbox_rest(props, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]);
const {
getPrefixCls,
direction,
checkbox
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const checkboxGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(checkbox_GroupContext);
const {
isFormItemInput
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const contextDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = (_a = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _a !== void 0 ? _a : contextDisabled;
const prevValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(restProps.value);
const checkboxRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const mergedRef = (0,es_ref.composeRef)(ref, checkboxRef);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Checkbox');
true ? warning('checked' in restProps || !!checkboxGroup || !('value' in restProps), 'usage', '`value` is not a valid prop, do you mean `checked`?') : 0;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);
}, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (skipGroup) {
return;
}
if (restProps.value !== prevValue.current) {
checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current);
checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);
prevValue.current = restProps.value;
}
return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value);
}, [restProps.value]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
var _a;
if ((_a = checkboxRef.current) === null || _a === void 0 ? void 0 : _a.input) {
checkboxRef.current.input.indeterminate = indeterminate;
}
}, [indeterminate]);
const prefixCls = getPrefixCls('checkbox', customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,checkbox_style["default"])(prefixCls, rootCls);
const checkboxProps = Object.assign({}, restProps);
if (checkboxGroup && !skipGroup) {
checkboxProps.onChange = function () {
if (restProps.onChange) {
restProps.onChange.apply(restProps, arguments);
}
if (checkboxGroup.toggleOption) {
checkboxGroup.toggleOption({
label: children,
value: restProps.value
});
}
};
checkboxProps.name = checkboxGroup.name;
checkboxProps.checked = checkboxGroup.value.includes(restProps.value);
}
const classString = classnames_default()(`${prefixCls}-wrapper`, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-wrapper-checked`]: checkboxProps.checked,
[`${prefixCls}-wrapper-disabled`]: mergedDisabled,
[`${prefixCls}-wrapper-in-form-item`]: isFormItemInput
}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, cssVarCls, rootCls, hashId);
const checkboxClass = classnames_default()({
[`${prefixCls}-indeterminate`]: indeterminate
}, TARGET_CLS, hashId);
// ============================ Event Lock ============================
const [onLabelClick, onInputClick] = useBubbleLock(checkboxProps.onClick);
// ============================== Render ==============================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
component: "Checkbox",
disabled: mergedDisabled
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
className: classString,
style: Object.assign(Object.assign({}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.style), style),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onClick: onLabelClick
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_checkbox_es, Object.assign({}, checkboxProps, {
onClick: onInputClick,
prefixCls: prefixCls,
className: checkboxClass,
disabled: mergedDisabled,
ref: mergedRef
})), children !== undefined && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-label`
}, children))));
};
const checkbox_Checkbox_Checkbox = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalCheckbox);
if (true) {
checkbox_Checkbox_Checkbox.displayName = 'Checkbox';
}
/* harmony default export */ var checkbox_Checkbox = (checkbox_Checkbox_Checkbox);
;// ./components/checkbox/Group.tsx
var Group_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;
};
const CheckboxGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
defaultValue,
children,
options = [],
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
onChange
} = props,
restProps = Group_rest(props, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]);
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [value, setValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(restProps.value || defaultValue || []);
const [registeredValues, setRegisteredValues] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if ('value' in restProps) {
setValue(restProps.value || []);
}
}, [restProps.value]);
const memoizedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => options.map(option => {
if (typeof option === 'string' || typeof option === 'number') {
return {
label: option,
value: option
};
}
return option;
}), [options]);
const cancelValue = val => {
setRegisteredValues(prevValues => prevValues.filter(v => v !== val));
};
const registerValue = val => {
setRegisteredValues(prevValues => [].concat((0,toConsumableArray["default"])(prevValues), [val]));
};
const toggleOption = option => {
const optionIndex = value.indexOf(option.value);
const newValue = (0,toConsumableArray["default"])(value);
if (optionIndex === -1) {
newValue.push(option.value);
} else {
newValue.splice(optionIndex, 1);
}
if (!('value' in restProps)) {
setValue(newValue);
}
onChange === null || onChange === void 0 ? void 0 : onChange(newValue.filter(val => registeredValues.includes(val)).sort((a, b) => {
const indexA = memoizedOptions.findIndex(opt => opt.value === a);
const indexB = memoizedOptions.findIndex(opt => opt.value === b);
return indexA - indexB;
}));
};
const prefixCls = getPrefixCls('checkbox', customizePrefixCls);
const groupPrefixCls = `${prefixCls}-group`;
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,checkbox_style["default"])(prefixCls, rootCls);
const domProps = (0,omit["default"])(restProps, ['value', 'disabled']);
const childrenNode = options.length ? memoizedOptions.map(option => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(checkbox_Checkbox, {
prefixCls: prefixCls,
key: option.value.toString(),
disabled: 'disabled' in option ? option.disabled : restProps.disabled,
value: option.value,
checked: value.includes(option.value),
onChange: option.onChange,
className: `${groupPrefixCls}-item`,
style: option.style,
title: option.title,
id: option.id,
required: option.required
}, option.label))) : children;
const context = {
toggleOption,
value,
disabled: restProps.disabled,
name: restProps.name,
// https://github.com/ant-design/ant-design/issues/16376
registerValue,
cancelValue
};
const classString = classnames_default()(groupPrefixCls, {
[`${groupPrefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, cssVarCls, rootCls, hashId);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
className: classString,
style: style
}, domProps, {
ref: ref
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(checkbox_GroupContext.Provider, {
value: context
}, childrenNode)));
});
/* harmony default export */ var Group = (CheckboxGroup);
;// ./components/checkbox/index.tsx
const components_checkbox_Checkbox = checkbox_Checkbox;
components_checkbox_Checkbox.Group = Group;
components_checkbox_Checkbox.__ANT_CHECKBOX = true;
if (true) {
components_checkbox_Checkbox.displayName = 'Checkbox';
}
/* harmony default export */ var components_checkbox = (components_checkbox_Checkbox);
;// ./components/grid/RowContext.ts
const RowContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
/* harmony default export */ var grid_RowContext = (RowContext);
// EXTERNAL MODULE: ./components/grid/style/index.ts
var grid_style = __webpack_require__("./components/grid/style/index.ts");
;// ./components/grid/col.tsx
var col_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 parseFlex(flex) {
if (typeof flex === 'number') {
return `${flex} ${flex} auto`;
}
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
return `0 0 ${flex}`;
}
return flex;
}
const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
const Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
gutter,
wrap
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(grid_RowContext);
const {
prefixCls: customizePrefixCls,
span,
order,
offset,
push,
pull,
className,
children,
flex,
style
} = props,
others = col_rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]);
const prefixCls = getPrefixCls('col', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,grid_style.useColStyle)(prefixCls);
// ===================== Size ======================
const sizeStyle = {};
let sizeClassObj = {};
sizes.forEach(size => {
let sizeProps = {};
const propSize = props[size];
if (typeof propSize === 'number') {
sizeProps.span = propSize;
} else if (typeof propSize === 'object') {
sizeProps = propSize || {};
}
delete others[size];
sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {
[`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span !== undefined,
[`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
[`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
[`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
[`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,
[`${prefixCls}-rtl`]: direction === 'rtl'
});
// Responsive flex layout
if (sizeProps.flex) {
sizeClassObj[`${prefixCls}-${size}-flex`] = true;
sizeStyle[`--${prefixCls}-${size}-flex`] = parseFlex(sizeProps.flex);
}
});
// ==================== Normal =====================
const classes = classnames_default()(prefixCls, {
[`${prefixCls}-${span}`]: span !== undefined,
[`${prefixCls}-order-${order}`]: order,
[`${prefixCls}-offset-${offset}`]: offset,
[`${prefixCls}-push-${push}`]: push,
[`${prefixCls}-pull-${pull}`]: pull
}, className, sizeClassObj, hashId, cssVarCls);
const mergedStyle = {};
// Horizontal gutter use padding
if (gutter && gutter[0] > 0) {
const horizontalGutter = gutter[0] / 2;
mergedStyle.paddingLeft = horizontalGutter;
mergedStyle.paddingRight = horizontalGutter;
}
if (flex) {
mergedStyle.flex = parseFlex(flex);
// Hack for Firefox to avoid size issue
// https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
if (wrap === false && !mergedStyle.minWidth) {
mergedStyle.minWidth = 0;
}
}
// ==================== Render =====================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
style: Object.assign(Object.assign(Object.assign({}, mergedStyle), style), sizeStyle),
className: classes,
ref: ref
}), children));
});
if (true) {
Col.displayName = 'Col';
}
/* harmony default export */ var col = (Col);
;// ./components/col/index.tsx
/* harmony default export */ var components_col = (col);
// EXTERNAL MODULE: ./components/collapse/index.tsx + 7 modules
var collapse = __webpack_require__("./components/collapse/index.tsx");
// EXTERNAL MODULE: ./components/color-picker/color.ts
var color = __webpack_require__("./components/color-picker/color.ts");
// EXTERNAL MODULE: ./components/divider/style/index.ts
var divider_style = __webpack_require__("./components/divider/style/index.ts");
;// ./components/divider/index.tsx
var divider_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;
};
const divider_Divider = props => {
const {
getPrefixCls,
direction,
className: dividerClassName,
style: dividerStyle
} = (0,config_provider_context.useComponentConfig)('divider');
const {
prefixCls: customizePrefixCls,
type = 'horizontal',
orientation = 'center',
orientationMargin,
className,
rootClassName,
children,
dashed,
variant = 'solid',
plain,
style
} = props,
restProps = divider_rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "variant", "plain", "style"]);
const prefixCls = getPrefixCls('divider', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,divider_style["default"])(prefixCls);
const hasChildren = !!children;
const mergedOrientation = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (orientation === 'left') {
return direction === 'rtl' ? 'end' : 'start';
}
if (orientation === 'right') {
return direction === 'rtl' ? 'start' : 'end';
}
return orientation;
}, [direction, orientation]);
const hasMarginStart = mergedOrientation === 'start' && orientationMargin != null;
const hasMarginEnd = mergedOrientation === 'end' && orientationMargin != null;
const classString = classnames_default()(prefixCls, dividerClassName, hashId, cssVarCls, `${prefixCls}-${type}`, {
[`${prefixCls}-with-text`]: hasChildren,
[`${prefixCls}-with-text-${mergedOrientation}`]: hasChildren,
[`${prefixCls}-dashed`]: !!dashed,
[`${prefixCls}-${variant}`]: variant !== 'solid',
[`${prefixCls}-plain`]: !!plain,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-no-default-orientation-margin-start`]: hasMarginStart,
[`${prefixCls}-no-default-orientation-margin-end`]: hasMarginEnd
}, className, rootClassName);
const memoizedOrientationMargin = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (typeof orientationMargin === 'number') {
return orientationMargin;
}
if (/^\d+$/.test(orientationMargin)) {
return Number(orientationMargin);
}
return orientationMargin;
}, [orientationMargin]);
const innerStyle = {
marginInlineStart: hasMarginStart ? memoizedOrientationMargin : undefined,
marginInlineEnd: hasMarginEnd ? memoizedOrientationMargin : undefined
};
// Warning children not work in vertical mode
if (true) {
const warning = (0,_util_warning.devUseWarning)('Divider');
true ? warning(!children || type !== 'vertical', 'usage', '`children` not working in `vertical` mode.') : 0;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
className: classString,
style: Object.assign(Object.assign({}, dividerStyle), style)
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-inner-text`,
style: innerStyle
}, children))));
};
if (true) {
divider_Divider.displayName = 'Divider';
}
/* harmony default export */ var divider = (divider_Divider);
// EXTERNAL MODULE: ./node_modules/@rc-component/color-picker/es/index.js + 14 modules
var color_picker_es = __webpack_require__("./node_modules/@rc-component/color-picker/es/index.js");
;// ./node_modules/rc-segmented/es/MotionThumb.js
var calcThumbStyle = function calcThumbStyle(targetElement, vertical) {
if (!targetElement) return null;
var style = {
left: targetElement.offsetLeft,
right: targetElement.parentElement.clientWidth - targetElement.clientWidth - targetElement.offsetLeft,
width: targetElement.clientWidth,
top: targetElement.offsetTop,
bottom: targetElement.parentElement.clientHeight - targetElement.clientHeight - targetElement.offsetTop,
height: targetElement.clientHeight
};
if (vertical) {
// Adjusts positioning and size for vertical layout by setting horizontal properties to 0 and using vertical properties from the style object.
return {
left: 0,
right: 0,
width: 0,
top: style.top,
bottom: style.bottom,
height: style.height
};
}
return {
left: style.left,
right: style.right,
width: style.width,
top: 0,
bottom: 0,
height: 0
};
};
var toPX = function toPX(value) {
return value !== undefined ? "".concat(value, "px") : undefined;
};
function MotionThumb(props) {
var prefixCls = props.prefixCls,
containerRef = props.containerRef,
value = props.value,
getValueIndex = props.getValueIndex,
motionName = props.motionName,
onMotionStart = props.onMotionStart,
onMotionEnd = props.onMotionEnd,
direction = props.direction,
_props$vertical = props.vertical,
vertical = _props$vertical === void 0 ? false : _props$vertical;
var thumbRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
prevValue = _React$useState2[0],
setPrevValue = _React$useState2[1];
// =========================== Effect ===========================
var findValueElement = function findValueElement(val) {
var _containerRef$current;
var index = getValueIndex(val);
var ele = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelectorAll(".".concat(prefixCls, "-item"))[index];
return (ele === null || ele === void 0 ? void 0 : ele.offsetParent) && ele;
};
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
prevStyle = _React$useState4[0],
setPrevStyle = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
nextStyle = _React$useState6[0],
setNextStyle = _React$useState6[1];
(0,useLayoutEffect["default"])(function () {
if (prevValue !== value) {
var prev = findValueElement(prevValue);
var next = findValueElement(value);
var calcPrevStyle = calcThumbStyle(prev, vertical);
var calcNextStyle = calcThumbStyle(next, vertical);
setPrevValue(value);
setPrevStyle(calcPrevStyle);
setNextStyle(calcNextStyle);
if (prev && next) {
onMotionStart();
} else {
onMotionEnd();
}
}
}, [value]);
var thumbStart = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (vertical) {
var _prevStyle$top;
return toPX((_prevStyle$top = prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.top) !== null && _prevStyle$top !== void 0 ? _prevStyle$top : 0);
}
if (direction === 'rtl') {
return toPX(-(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.right));
}
return toPX(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.left);
}, [vertical, direction, prevStyle]);
var thumbActive = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (vertical) {
var _nextStyle$top;
return toPX((_nextStyle$top = nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.top) !== null && _nextStyle$top !== void 0 ? _nextStyle$top : 0);
}
if (direction === 'rtl') {
return toPX(-(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.right));
}
return toPX(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.left);
}, [vertical, direction, nextStyle]);
// =========================== Motion ===========================
var onAppearStart = function onAppearStart() {
if (vertical) {
return {
transform: 'translateY(var(--thumb-start-top))',
height: 'var(--thumb-start-height)'
};
}
return {
transform: 'translateX(var(--thumb-start-left))',
width: 'var(--thumb-start-width)'
};
};
var onAppearActive = function onAppearActive() {
if (vertical) {
return {
transform: 'translateY(var(--thumb-active-top))',
height: 'var(--thumb-active-height)'
};
}
return {
transform: 'translateX(var(--thumb-active-left))',
width: 'var(--thumb-active-width)'
};
};
var onVisibleChanged = function onVisibleChanged() {
setPrevStyle(null);
setNextStyle(null);
onMotionEnd();
};
// =========================== Render ===========================
// No need motion when nothing exist in queue
if (!prevStyle || !nextStyle) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: true,
motionName: motionName,
motionAppear: true,
onAppearStart: onAppearStart,
onAppearActive: onAppearActive,
onVisibleChanged: onVisibleChanged
}, function (_ref, ref) {
var motionClassName = _ref.className,
motionStyle = _ref.style;
var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), {}, {
'--thumb-start-left': thumbStart,
'--thumb-start-width': toPX(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.width),
'--thumb-active-left': thumbActive,
'--thumb-active-width': toPX(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.width),
'--thumb-start-top': thumbStart,
'--thumb-start-height': toPX(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.height),
'--thumb-active-top': thumbActive,
'--thumb-active-height': toPX(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.height)
});
// It's little ugly which should be refactor when @umi/test update to latest jsdom
var motionProps = {
ref: (0,es_ref.composeRef)(thumbRef, ref),
style: mergedStyle,
className: classnames_default()("".concat(prefixCls, "-thumb"), motionClassName)
};
if (false) {}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", motionProps);
});
}
;// ./node_modules/rc-segmented/es/index.js
var rc_segmented_es_excluded = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
function getValidTitle(option) {
if (typeof option.title !== 'undefined') {
return option.title;
}
// read `label` when title is `undefined`
if ((0,esm_typeof["default"])(option.label) !== 'object') {
var _option$label;
return (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toString();
}
}
function normalizeOptions(options) {
return options.map(function (option) {
if ((0,esm_typeof["default"])(option) === 'object' && option !== null) {
var validTitle = getValidTitle(option);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, option), {}, {
title: validTitle
});
}
return {
label: option === null || option === void 0 ? void 0 : option.toString(),
title: option === null || option === void 0 ? void 0 : option.toString(),
value: option
};
});
}
var InternalSegmentedOption = function InternalSegmentedOption(_ref) {
var prefixCls = _ref.prefixCls,
className = _ref.className,
disabled = _ref.disabled,
checked = _ref.checked,
label = _ref.label,
title = _ref.title,
value = _ref.value,
name = _ref.name,
onChange = _ref.onChange,
onFocus = _ref.onFocus,
onBlur = _ref.onBlur,
onKeyDown = _ref.onKeyDown,
onKeyUp = _ref.onKeyUp,
onMouseDown = _ref.onMouseDown;
var handleChange = function handleChange(event) {
if (disabled) {
return;
}
onChange(event, value);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
className: classnames_default()(className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-item-disabled"), disabled)),
onMouseDown: onMouseDown
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", {
name: name,
className: "".concat(prefixCls, "-item-input"),
type: "radio",
disabled: disabled,
checked: checked,
onChange: handleChange,
onFocus: onFocus,
onBlur: onBlur,
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-item-label"),
title: title,
"aria-selected": checked
}, label));
};
var Segmented = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _segmentedOptions$, _classNames2;
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-segmented' : _props$prefixCls,
direction = props.direction,
vertical = props.vertical,
_props$options = props.options,
options = _props$options === void 0 ? [] : _props$options,
disabled = props.disabled,
defaultValue = props.defaultValue,
value = props.value,
name = props.name,
onChange = props.onChange,
_props$className = props.className,
className = _props$className === void 0 ? '' : _props$className,
_props$motionName = props.motionName,
motionName = _props$motionName === void 0 ? 'thumb-motion' : _props$motionName,
restProps = (0,objectWithoutProperties["default"])(props, rc_segmented_es_excluded);
var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var mergedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,es_ref.composeRef)(containerRef, ref);
}, [containerRef, ref]);
var segmentedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return normalizeOptions(options);
}, [options]);
// Note: We should not auto switch value when value not exist in options
// which may break single source of truth.
var _useMergedState = (0,useMergedState["default"])((_segmentedOptions$ = segmentedOptions[0]) === null || _segmentedOptions$ === void 0 ? void 0 : _segmentedOptions$.value, {
value: value,
defaultValue: defaultValue
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
rawValue = _useMergedState2[0],
setRawValue = _useMergedState2[1];
// ======================= Change ========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
thumbShow = _React$useState2[0],
setThumbShow = _React$useState2[1];
var handleChange = function handleChange(event, val) {
setRawValue(val);
onChange === null || onChange === void 0 || onChange(val);
};
var divProps = (0,omit["default"])(restProps, ['children']);
// ======================= Focus ========================
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
isKeyboard = _React$useState4[0],
setIsKeyboard = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
isFocused = _React$useState6[0],
setIsFocused = _React$useState6[1];
var handleFocus = function handleFocus() {
setIsFocused(true);
};
var handleBlur = function handleBlur() {
setIsFocused(false);
};
var handleMouseDown = function handleMouseDown() {
setIsKeyboard(false);
};
// capture keyboard tab interaction for correct focus style
var handleKeyUp = function handleKeyUp(event) {
if (event.key === 'Tab') {
setIsKeyboard(true);
}
};
// ======================= Keyboard ========================
var onOffset = function onOffset(offset) {
var currentIndex = segmentedOptions.findIndex(function (option) {
return option.value === rawValue;
});
var total = segmentedOptions.length;
var nextIndex = (currentIndex + offset + total) % total;
var nextOption = segmentedOptions[nextIndex];
if (nextOption) {
setRawValue(nextOption.value);
onChange === null || onChange === void 0 || onChange(nextOption.value);
}
};
var handleKeyDown = function handleKeyDown(event) {
switch (event.key) {
case 'ArrowLeft':
case 'ArrowUp':
onOffset(-1);
break;
case 'ArrowRight':
case 'ArrowDown':
onOffset(1);
break;
}
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
role: "radiogroup",
"aria-label": "segmented control",
tabIndex: disabled ? undefined : 0
}, divProps, {
className: classnames_default()(prefixCls, (_classNames2 = {}, (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-vertical"), vertical), _classNames2), className),
ref: mergedRef
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-group")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MotionThumb, {
vertical: vertical,
prefixCls: prefixCls,
value: rawValue,
containerRef: containerRef,
motionName: "".concat(prefixCls, "-").concat(motionName),
direction: direction,
getValueIndex: function getValueIndex(val) {
return segmentedOptions.findIndex(function (n) {
return n.value === val;
});
},
onMotionStart: function onMotionStart() {
setThumbShow(true);
},
onMotionEnd: function onMotionEnd() {
setThumbShow(false);
}
}), segmentedOptions.map(function (segmentedOption) {
var _classNames3;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalSegmentedOption, (0,esm_extends["default"])({}, segmentedOption, {
name: name,
key: segmentedOption.value,
prefixCls: prefixCls,
className: classnames_default()(segmentedOption.className, "".concat(prefixCls, "-item"), (_classNames3 = {}, (0,defineProperty["default"])(_classNames3, "".concat(prefixCls, "-item-selected"), segmentedOption.value === rawValue && !thumbShow), (0,defineProperty["default"])(_classNames3, "".concat(prefixCls, "-item-focused"), isFocused && isKeyboard && segmentedOption.value === rawValue), _classNames3)),
checked: segmentedOption.value === rawValue,
onChange: handleChange,
onFocus: handleFocus,
onBlur: handleBlur,
onKeyDown: handleKeyDown,
onKeyUp: handleKeyUp,
onMouseDown: handleMouseDown,
disabled: !!disabled || !!segmentedOption.disabled
}));
})));
});
if (true) {
Segmented.displayName = 'Segmented';
}
var TypedSegmented = Segmented;
/* harmony default export */ var rc_segmented_es = (TypedSegmented);
// EXTERNAL MODULE: ./components/segmented/style/index.ts
var segmented_style = __webpack_require__("./components/segmented/style/index.ts");
;// ./components/segmented/index.tsx
var segmented_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 isSegmentedLabeledOptionWithIcon(option) {
return typeof option === 'object' && !!(option === null || option === void 0 ? void 0 : option.icon);
}
const InternalSegmented = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const defaultName = hooks_useId();
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
block,
options = [],
size: customSize = 'middle',
style,
vertical,
shape = 'default',
name = defaultName
} = props,
restProps = segmented_rest(props, ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical", "shape", "name"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('segmented');
const prefixCls = getPrefixCls('segmented', customizePrefixCls);
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,segmented_style["default"])(prefixCls);
// ===================== Size =====================
const mergedSize = (0,useSize["default"])(customSize);
// syntactic sugar to support `icon` for Segmented Item
const extendedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => options.map(option => {
if (isSegmentedLabeledOptionWithIcon(option)) {
const {
icon,
label
} = option,
restOption = segmented_rest(option, ["icon", "label"]);
return Object.assign(Object.assign({}, restOption), {
label: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-item-icon`
}, icon), label && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, label)))
});
}
return option;
}), [options, prefixCls]);
const cls = classnames_default()(className, rootClassName, contextClassName, {
[`${prefixCls}-block`]: block,
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-vertical`]: vertical,
[`${prefixCls}-shape-${shape}`]: shape === 'round'
}, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_segmented_es, Object.assign({}, restProps, {
name: name,
className: cls,
style: mergedStyle,
options: extendedOptions,
ref: ref,
prefixCls: prefixCls,
direction: direction,
vertical: vertical
})));
});
const segmented_Segmented = InternalSegmented;
if (true) {
segmented_Segmented.displayName = 'Segmented';
}
/* harmony default export */ var segmented = (segmented_Segmented);
;// ./components/color-picker/context.ts
const PanelPickerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
const PanelPresetsContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
// EXTERNAL MODULE: ./components/color-picker/util.ts
var util = __webpack_require__("./components/color-picker/util.ts");
;// ./components/color-picker/components/ColorClear.tsx
const ColorClear = _ref => {
let {
prefixCls,
value,
onChange
} = _ref;
const handleClick = () => {
if (onChange && value && !value.cleared) {
const hsba = value.toHsb();
hsba.a = 0;
const genColor = (0,util.generateColor)(hsba);
genColor.cleared = true;
onChange(genColor);
}
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-clear`,
onClick: handleClick
});
};
/* harmony default export */ var components_ColorClear = (ColorClear);
;// ./components/color-picker/interface.ts
const FORMAT_HEX = 'hex';
const FORMAT_RGB = 'rgb';
const FORMAT_HSB = 'hsb';
;// ./node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js
// This icon file is generated automatically.
var UpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
/* harmony default export */ var asn_UpOutlined = (UpOutlined);
;// ./node_modules/@ant-design/icons/es/icons/UpOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var UpOutlined_UpOutlined = function UpOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_UpOutlined
}));
};
/** */
var UpOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(UpOutlined_UpOutlined);
if (true) {
UpOutlined_RefIcon.displayName = 'UpOutlined';
}
/* harmony default export */ var icons_UpOutlined = (UpOutlined_RefIcon);
;// ./node_modules/@rc-component/mini-decimal/es/supportUtil.js
function supportBigInt() {
return typeof BigInt === 'function';
}
;// ./node_modules/@rc-component/mini-decimal/es/numberUtil.js
function isEmpty(value) {
return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
}
/**
* Format string number to readable number
*/
function trimNumber(numStr) {
var str = numStr.trim();
var negative = str.startsWith('-');
if (negative) {
str = str.slice(1);
}
str = str
// Remove decimal 0. `1.000` => `1.`, `1.100` => `1.1`
.replace(/(\.\d*[^0])0*$/, '$1')
// Remove useless decimal. `1.` => `1`
.replace(/\.0*$/, '')
// Remove integer 0. `0001` => `1`, 000.1' => `.1`
.replace(/^0+/, '');
if (str.startsWith('.')) {
str = "0".concat(str);
}
var trimStr = str || '0';
var splitNumber = trimStr.split('.');
var integerStr = splitNumber[0] || '0';
var decimalStr = splitNumber[1] || '0';
if (integerStr === '0' && decimalStr === '0') {
negative = false;
}
var negativeStr = negative ? '-' : '';
return {
negative: negative,
negativeStr: negativeStr,
trimStr: trimStr,
integerStr: integerStr,
decimalStr: decimalStr,
fullStr: "".concat(negativeStr).concat(trimStr)
};
}
function isE(number) {
var str = String(number);
return !Number.isNaN(Number(str)) && str.includes('e');
}
/**
* [Legacy] Convert 1e-9 to 0.000000001.
* This may lose some precision if user really want 1e-9.
*/
function getNumberPrecision(number) {
var numStr = String(number);
if (isE(number)) {
var precision = Number(numStr.slice(numStr.indexOf('e-') + 2));
var decimalMatch = numStr.match(/\.(\d+)/);
if (decimalMatch !== null && decimalMatch !== void 0 && decimalMatch[1]) {
precision += decimalMatch[1].length;
}
return precision;
}
return numStr.includes('.') && validateNumber(numStr) ? numStr.length - numStr.indexOf('.') - 1 : 0;
}
/**
* Convert number (includes scientific notation) to -xxx.yyy format
*/
function num2str(number) {
var numStr = String(number);
if (isE(number)) {
if (number > Number.MAX_SAFE_INTEGER) {
return String(supportBigInt() ? BigInt(number).toString() : Number.MAX_SAFE_INTEGER);
}
if (number < Number.MIN_SAFE_INTEGER) {
return String(supportBigInt() ? BigInt(number).toString() : Number.MIN_SAFE_INTEGER);
}
numStr = number.toFixed(getNumberPrecision(numStr));
}
return trimNumber(numStr).fullStr;
}
function validateNumber(num) {
if (typeof num === 'number') {
return !Number.isNaN(num);
}
// Empty
if (!num) {
return false;
}
return (
// Normal type: 11.28
/^\s*-?\d+(\.\d+)?\s*$/.test(num) ||
// Pre-number: 1.
/^\s*-?\d+\.\s*$/.test(num) ||
// Post-number: .1
/^\s*-?\.\d+\s*$/.test(num)
);
}
;// ./node_modules/@rc-component/mini-decimal/es/BigIntDecimal.js
var BigIntDecimal = /*#__PURE__*/function () {
/** BigInt will convert `0009` to `9`. We need record the len of decimal */
function BigIntDecimal(value) {
(0,classCallCheck["default"])(this, BigIntDecimal);
(0,defineProperty["default"])(this, "origin", '');
(0,defineProperty["default"])(this, "negative", void 0);
(0,defineProperty["default"])(this, "integer", void 0);
(0,defineProperty["default"])(this, "decimal", void 0);
(0,defineProperty["default"])(this, "decimalLen", void 0);
(0,defineProperty["default"])(this, "empty", void 0);
(0,defineProperty["default"])(this, "nan", void 0);
if (isEmpty(value)) {
this.empty = true;
return;
}
this.origin = String(value);
// Act like Number convert
if (value === '-' || Number.isNaN(value)) {
this.nan = true;
return;
}
var mergedValue = value;
// We need convert back to Number since it require `toFixed` to handle this
if (isE(mergedValue)) {
mergedValue = Number(mergedValue);
}
mergedValue = typeof mergedValue === 'string' ? mergedValue : num2str(mergedValue);
if (validateNumber(mergedValue)) {
var trimRet = trimNumber(mergedValue);
this.negative = trimRet.negative;
var numbers = trimRet.trimStr.split('.');
this.integer = BigInt(numbers[0]);
var decimalStr = numbers[1] || '0';
this.decimal = BigInt(decimalStr);
this.decimalLen = decimalStr.length;
} else {
this.nan = true;
}
}
(0,createClass["default"])(BigIntDecimal, [{
key: "getMark",
value: function getMark() {
return this.negative ? '-' : '';
}
}, {
key: "getIntegerStr",
value: function getIntegerStr() {
return this.integer.toString();
}
/**
* @private get decimal string
*/
}, {
key: "getDecimalStr",
value: function getDecimalStr() {
return this.decimal.toString().padStart(this.decimalLen, '0');
}
/**
* @private Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
* This is used for add function only.
*/
}, {
key: "alignDecimal",
value: function alignDecimal(decimalLength) {
var str = "".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(decimalLength, '0'));
return BigInt(str);
}
}, {
key: "negate",
value: function negate() {
var clone = new BigIntDecimal(this.toString());
clone.negative = !clone.negative;
return clone;
}
}, {
key: "cal",
value: function cal(offset, calculator, calDecimalLen) {
var maxDecimalLength = Math.max(this.getDecimalStr().length, offset.getDecimalStr().length);
var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
var offsetAlignedDecimal = offset.alignDecimal(maxDecimalLength);
var valueStr = calculator(myAlignedDecimal, offsetAlignedDecimal).toString();
var nextDecimalLength = calDecimalLen(maxDecimalLength);
// We need fill string length back to `maxDecimalLength` to avoid parser failed
var _trimNumber = trimNumber(valueStr),
negativeStr = _trimNumber.negativeStr,
trimStr = _trimNumber.trimStr;
var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(nextDecimalLength + 1, '0'));
return new BigIntDecimal("".concat(hydrateValueStr.slice(0, -nextDecimalLength), ".").concat(hydrateValueStr.slice(-nextDecimalLength)));
}
}, {
key: "add",
value: function add(value) {
if (this.isInvalidate()) {
return new BigIntDecimal(value);
}
var offset = new BigIntDecimal(value);
if (offset.isInvalidate()) {
return this;
}
return this.cal(offset, function (num1, num2) {
return num1 + num2;
}, function (len) {
return len;
});
}
}, {
key: "multi",
value: function multi(value) {
var target = new BigIntDecimal(value);
if (this.isInvalidate() || target.isInvalidate()) {
return new BigIntDecimal(NaN);
}
return this.cal(target, function (num1, num2) {
return num1 * num2;
}, function (len) {
return len * 2;
});
}
}, {
key: "isEmpty",
value: function isEmpty() {
return this.empty;
}
}, {
key: "isNaN",
value: function isNaN() {
return this.nan;
}
}, {
key: "isInvalidate",
value: function isInvalidate() {
return this.isEmpty() || this.isNaN();
}
}, {
key: "equals",
value: function equals(target) {
return this.toString() === (target === null || target === void 0 ? void 0 : target.toString());
}
}, {
key: "lessEquals",
value: function lessEquals(target) {
return this.add(target.negate().toString()).toNumber() <= 0;
}
}, {
key: "toNumber",
value: function toNumber() {
if (this.isNaN()) {
return NaN;
}
return Number(this.toString());
}
}, {
key: "toString",
value: function toString() {
var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
if (!safe) {
return this.origin;
}
if (this.isInvalidate()) {
return '';
}
return trimNumber("".concat(this.getMark()).concat(this.getIntegerStr(), ".").concat(this.getDecimalStr())).fullStr;
}
}]);
return BigIntDecimal;
}();
;// ./node_modules/@rc-component/mini-decimal/es/NumberDecimal.js
/**
* We can remove this when IE not support anymore
*/
var NumberDecimal = /*#__PURE__*/function () {
function NumberDecimal(value) {
(0,classCallCheck["default"])(this, NumberDecimal);
(0,defineProperty["default"])(this, "origin", '');
(0,defineProperty["default"])(this, "number", void 0);
(0,defineProperty["default"])(this, "empty", void 0);
if (isEmpty(value)) {
this.empty = true;
return;
}
this.origin = String(value);
this.number = Number(value);
}
(0,createClass["default"])(NumberDecimal, [{
key: "negate",
value: function negate() {
return new NumberDecimal(-this.toNumber());
}
}, {
key: "add",
value: function add(value) {
if (this.isInvalidate()) {
return new NumberDecimal(value);
}
var target = Number(value);
if (Number.isNaN(target)) {
return this;
}
var number = this.number + target;
// [Legacy] Back to safe integer
if (number > Number.MAX_SAFE_INTEGER) {
return new NumberDecimal(Number.MAX_SAFE_INTEGER);
}
if (number < Number.MIN_SAFE_INTEGER) {
return new NumberDecimal(Number.MIN_SAFE_INTEGER);
}
var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
return new NumberDecimal(number.toFixed(maxPrecision));
}
}, {
key: "multi",
value: function multi(value) {
var target = Number(value);
if (this.isInvalidate() || Number.isNaN(target)) {
return new NumberDecimal(NaN);
}
var number = this.number * target;
// [Legacy] Back to safe integer
if (number > Number.MAX_SAFE_INTEGER) {
return new NumberDecimal(Number.MAX_SAFE_INTEGER);
}
if (number < Number.MIN_SAFE_INTEGER) {
return new NumberDecimal(Number.MIN_SAFE_INTEGER);
}
var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
return new NumberDecimal(number.toFixed(maxPrecision));
}
}, {
key: "isEmpty",
value: function isEmpty() {
return this.empty;
}
}, {
key: "isNaN",
value: function isNaN() {
return Number.isNaN(this.number);
}
}, {
key: "isInvalidate",
value: function isInvalidate() {
return this.isEmpty() || this.isNaN();
}
}, {
key: "equals",
value: function equals(target) {
return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
}
}, {
key: "lessEquals",
value: function lessEquals(target) {
return this.add(target.negate().toString()).toNumber() <= 0;
}
}, {
key: "toNumber",
value: function toNumber() {
return this.number;
}
}, {
key: "toString",
value: function toString() {
var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
if (!safe) {
return this.origin;
}
if (this.isInvalidate()) {
return '';
}
return num2str(this.number);
}
}]);
return NumberDecimal;
}();
;// ./node_modules/@rc-component/mini-decimal/es/MiniDecimal.js
/* eslint-disable max-classes-per-file */
// Still support origin export
function getMiniDecimal(value) {
// We use BigInt here.
// Will fallback to Number if not support.
if (supportBigInt()) {
return new BigIntDecimal(value);
}
return new NumberDecimal(value);
}
/**
* Align the logic of toFixed to around like 1.5 => 2.
* If set `cutOnly`, will just remove the over decimal part.
*/
function toFixed(numStr, separatorStr, precision) {
var cutOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
if (numStr === '') {
return '';
}
var _trimNumber = trimNumber(numStr),
negativeStr = _trimNumber.negativeStr,
integerStr = _trimNumber.integerStr,
decimalStr = _trimNumber.decimalStr;
var precisionDecimalStr = "".concat(separatorStr).concat(decimalStr);
var numberWithoutDecimal = "".concat(negativeStr).concat(integerStr);
if (precision >= 0) {
// We will get last + 1 number to check if need advanced number
var advancedNum = Number(decimalStr[precision]);
if (advancedNum >= 5 && !cutOnly) {
var advancedDecimal = getMiniDecimal(numStr).add("".concat(negativeStr, "0.").concat('0'.repeat(precision)).concat(10 - advancedNum));
return toFixed(advancedDecimal.toString(), separatorStr, precision, cutOnly);
}
if (precision === 0) {
return numberWithoutDecimal;
}
return "".concat(numberWithoutDecimal).concat(separatorStr).concat(decimalStr.padEnd(precision, '0').slice(0, precision));
}
if (precisionDecimalStr === '.0') {
return numberWithoutDecimal;
}
return "".concat(numberWithoutDecimal).concat(precisionDecimalStr);
}
;// ./node_modules/@rc-component/mini-decimal/es/index.js
/* harmony default export */ var mini_decimal_es = (getMiniDecimal);
;// ./node_modules/rc-input/es/utils/commonUtils.js
function hasAddon(props) {
return !!(props.addonBefore || props.addonAfter);
}
function hasPrefixSuffix(props) {
return !!(props.prefix || props.suffix || props.allowClear);
}
// TODO: It's better to use `Proxy` replace the `element.value`. But we still need support IE11.
function cloneEvent(event, target, value) {
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var currentTarget = target.cloneNode(true);
// click clear icon
var newEvent = Object.create(event, {
target: {
value: currentTarget
},
currentTarget: {
value: currentTarget
}
});
// Fill data
currentTarget.value = value;
// Fill selection. Some type like `email` not support selection
// https://github.com/ant-design/ant-design/issues/47833
if (typeof target.selectionStart === 'number' && typeof target.selectionEnd === 'number') {
currentTarget.selectionStart = target.selectionStart;
currentTarget.selectionEnd = target.selectionEnd;
}
currentTarget.setSelectionRange = function () {
target.setSelectionRange.apply(target, arguments);
};
return newEvent;
}
function resolveOnChange(target, e, onChange, targetValue) {
if (!onChange) {
return;
}
var event = e;
if (e.type === 'click') {
// Clone a new target for event.
// Avoid the following usage, the setQuery method gets the original value.
//
// const [query, setQuery] = React.useState('');
// <Input
// allowClear
// value={query}
// onChange={(e)=> {
// setQuery((prevStatus) => e.target.value);
// }}
// />
event = cloneEvent(e, target, '');
onChange(event);
return;
}
// Trigger by composition event, this means we need force change the input value
// https://github.com/ant-design/ant-design/issues/45737
// https://github.com/ant-design/ant-design/issues/46598
if (target.type !== 'file' && targetValue !== undefined) {
event = cloneEvent(e, target, targetValue);
onChange(event);
return;
}
onChange(event);
}
function triggerFocus(element, option) {
if (!element) return;
element.focus(option);
// Selection content
var _ref = option || {},
cursor = _ref.cursor;
if (cursor) {
var len = element.value.length;
switch (cursor) {
case 'start':
element.setSelectionRange(0, 0);
break;
case 'end':
element.setSelectionRange(len, len);
break;
default:
element.setSelectionRange(0, len);
}
}
}
;// ./node_modules/rc-input/es/BaseInput.js
var BaseInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
var _props, _props2, _props3;
var inputEl = props.inputElement,
children = props.children,
prefixCls = props.prefixCls,
prefix = props.prefix,
suffix = props.suffix,
addonBefore = props.addonBefore,
addonAfter = props.addonAfter,
className = props.className,
style = props.style,
disabled = props.disabled,
readOnly = props.readOnly,
focused = props.focused,
triggerFocus = props.triggerFocus,
allowClear = props.allowClear,
value = props.value,
handleReset = props.handleReset,
hidden = props.hidden,
classes = props.classes,
classNames = props.classNames,
dataAttrs = props.dataAttrs,
styles = props.styles,
components = props.components,
onClear = props.onClear;
var inputElement = children !== null && children !== void 0 ? children : inputEl;
var AffixWrapperComponent = (components === null || components === void 0 ? void 0 : components.affixWrapper) || 'span';
var GroupWrapperComponent = (components === null || components === void 0 ? void 0 : components.groupWrapper) || 'span';
var WrapperComponent = (components === null || components === void 0 ? void 0 : components.wrapper) || 'span';
var GroupAddonComponent = (components === null || components === void 0 ? void 0 : components.groupAddon) || 'span';
var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var onInputClick = function onInputClick(e) {
var _containerRef$current;
if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {
triggerFocus === null || triggerFocus === void 0 || triggerFocus();
}
};
var hasAffix = hasPrefixSuffix(props);
var element = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inputElement, {
value: value,
className: classnames_default()((_props = inputElement.props) === null || _props === void 0 ? void 0 : _props.className, !hasAffix && (classNames === null || classNames === void 0 ? void 0 : classNames.variant)) || null
});
// ======================== Ref ======================== //
var groupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
return {
nativeElement: groupRef.current || containerRef.current
};
});
// ================== Prefix & Suffix ================== //
if (hasAffix) {
// ================== Clear Icon ================== //
var clearIcon = null;
if (allowClear) {
var needClear = !disabled && !readOnly && value;
var clearIconCls = "".concat(prefixCls, "-clear-icon");
var iconNode = (0,esm_typeof["default"])(allowClear) === 'object' && allowClear !== null && allowClear !== void 0 && allowClear.clearIcon ? allowClear.clearIcon : '✖';
clearIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
type: "button",
tabIndex: -1,
onClick: function onClick(event) {
handleReset === null || handleReset === void 0 || handleReset(event);
onClear === null || onClear === void 0 || onClear();
}
// Do not trigger onBlur when clear input
// https://github.com/ant-design/ant-design/issues/31200
,
onMouseDown: function onMouseDown(e) {
return e.preventDefault();
},
className: classnames_default()(clearIconCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(clearIconCls, "-hidden"), !needClear), "".concat(clearIconCls, "-has-suffix"), !!suffix))
}, iconNode);
}
var affixWrapperPrefixCls = "".concat(prefixCls, "-affix-wrapper");
var affixWrapperCls = classnames_default()(affixWrapperPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(affixWrapperPrefixCls, "-disabled"), disabled), "".concat(affixWrapperPrefixCls, "-focused"), focused), "".concat(affixWrapperPrefixCls, "-readonly"), readOnly), "".concat(affixWrapperPrefixCls, "-input-with-clear-btn"), suffix && allowClear && value), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.variant);
var suffixNode = (suffix || allowClear) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(prefixCls, "-suffix"), classNames === null || classNames === void 0 ? void 0 : classNames.suffix),
style: styles === null || styles === void 0 ? void 0 : styles.suffix
}, clearIcon, suffix);
element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AffixWrapperComponent, (0,esm_extends["default"])({
className: affixWrapperCls,
style: styles === null || styles === void 0 ? void 0 : styles.affixWrapper,
onClick: onInputClick
}, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.affixWrapper, {
ref: containerRef
}), prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(prefixCls, "-prefix"), classNames === null || classNames === void 0 ? void 0 : classNames.prefix),
style: styles === null || styles === void 0 ? void 0 : styles.prefix
}, prefix), element, suffixNode);
}
// ================== Addon ================== //
if (hasAddon(props)) {
var wrapperCls = "".concat(prefixCls, "-group");
var addonCls = "".concat(wrapperCls, "-addon");
var groupWrapperCls = "".concat(wrapperCls, "-wrapper");
var mergedWrapperClassName = classnames_default()("".concat(prefixCls, "-wrapper"), wrapperCls, classes === null || classes === void 0 ? void 0 : classes.wrapper, classNames === null || classNames === void 0 ? void 0 : classNames.wrapper);
var mergedGroupClassName = classnames_default()(groupWrapperCls, (0,defineProperty["default"])({}, "".concat(groupWrapperCls, "-disabled"), disabled), classes === null || classes === void 0 ? void 0 : classes.group, classNames === null || classNames === void 0 ? void 0 : classNames.groupWrapper);
// Need another wrapper for changing display:table to display:inline-block
// and put style prop in wrapper
element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GroupWrapperComponent, {
className: mergedGroupClassName,
ref: groupRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(WrapperComponent, {
className: mergedWrapperClassName
}, addonBefore && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GroupAddonComponent, {
className: addonCls
}, addonBefore), element, addonAfter && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GroupAddonComponent, {
className: addonCls
}, addonAfter)));
}
// `className` and `style` are always on the root element
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(element, {
className: classnames_default()((_props2 = element.props) === null || _props2 === void 0 ? void 0 : _props2.className, className) || null,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, (_props3 = element.props) === null || _props3 === void 0 ? void 0 : _props3.style), style),
hidden: hidden
});
});
/* harmony default export */ var es_BaseInput = (BaseInput);
;// ./node_modules/rc-input/es/hooks/useCount.js
var useCount_excluded = ["show"];
/**
* Cut `value` by the `count.max` prop.
*/
function inCountRange(value, countConfig) {
if (!countConfig.max) {
return true;
}
var count = countConfig.strategy(value);
return count <= countConfig.max;
}
function useCount(count, showCount) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var mergedConfig = {};
if (showCount) {
mergedConfig.show = (0,esm_typeof["default"])(showCount) === 'object' && showCount.formatter ? showCount.formatter : !!showCount;
}
mergedConfig = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedConfig), count);
var _ref = mergedConfig,
show = _ref.show,
rest = (0,objectWithoutProperties["default"])(_ref, useCount_excluded);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rest), {}, {
show: !!show,
showFormatter: typeof show === 'function' ? show : undefined,
strategy: rest.strategy || function (value) {
return value.length;
}
});
}, [count, showCount]);
}
;// ./node_modules/rc-input/es/Input.js
var es_Input_excluded = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "onKeyUp", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"];
var es_Input_Input = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
var autoComplete = props.autoComplete,
onChange = props.onChange,
onFocus = props.onFocus,
onBlur = props.onBlur,
onPressEnter = props.onPressEnter,
onKeyDown = props.onKeyDown,
onKeyUp = props.onKeyUp,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-input' : _props$prefixCls,
disabled = props.disabled,
htmlSize = props.htmlSize,
className = props.className,
maxLength = props.maxLength,
suffix = props.suffix,
showCount = props.showCount,
count = props.count,
_props$type = props.type,
type = _props$type === void 0 ? 'text' : _props$type,
classes = props.classes,
classNames = props.classNames,
styles = props.styles,
_onCompositionStart = props.onCompositionStart,
onCompositionEnd = props.onCompositionEnd,
rest = (0,objectWithoutProperties["default"])(props, es_Input_excluded);
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
focused = _useState2[0],
setFocused = _useState2[1];
var compositionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var keyLockRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var focus = function focus(option) {
if (inputRef.current) {
triggerFocus(inputRef.current, option);
}
};
// ====================== Value =======================
var _useMergedState = (0,useMergedState["default"])(props.defaultValue, {
value: props.value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
value = _useMergedState2[0],
setValue = _useMergedState2[1];
var formatValue = value === undefined || value === null ? '' : String(value);
// =================== Select Range ===================
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
selection = _useState4[0],
setSelection = _useState4[1];
// ====================== Count =======================
var countConfig = useCount(count, showCount);
var mergedMax = countConfig.max || maxLength;
var valueLength = countConfig.strategy(formatValue);
var isOutOfRange = !!mergedMax && valueLength > mergedMax;
// ======================= Ref ========================
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
var _holderRef$current;
return {
focus: focus,
blur: function blur() {
var _inputRef$current;
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
},
setSelectionRange: function setSelectionRange(start, end, direction) {
var _inputRef$current2;
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.setSelectionRange(start, end, direction);
},
select: function select() {
var _inputRef$current3;
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
},
input: inputRef.current,
nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || inputRef.current
};
});
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (keyLockRef.current) {
keyLockRef.current = false;
}
setFocused(function (prev) {
return prev && disabled ? false : prev;
});
}, [disabled]);
var triggerChange = function triggerChange(e, currentValue, info) {
var cutValue = currentValue;
if (!compositionRef.current && countConfig.exceedFormatter && countConfig.max && countConfig.strategy(currentValue) > countConfig.max) {
cutValue = countConfig.exceedFormatter(currentValue, {
max: countConfig.max
});
if (currentValue !== cutValue) {
var _inputRef$current4, _inputRef$current5;
setSelection([((_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.selectionStart) || 0, ((_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.selectionEnd) || 0]);
}
} else if (info.source === 'compositionEnd') {
// Avoid triggering twice
// https://github.com/ant-design/ant-design/issues/46587
return;
}
setValue(cutValue);
if (inputRef.current) {
resolveOnChange(inputRef.current, e, onChange, cutValue);
}
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (selection) {
var _inputRef$current6;
(_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 || _inputRef$current6.setSelectionRange.apply(_inputRef$current6, (0,toConsumableArray["default"])(selection));
}
}, [selection]);
var onInternalChange = function onInternalChange(e) {
triggerChange(e, e.target.value, {
source: 'change'
});
};
var onInternalCompositionEnd = function onInternalCompositionEnd(e) {
compositionRef.current = false;
triggerChange(e, e.currentTarget.value, {
source: 'compositionEnd'
});
onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
};
var handleKeyDown = function handleKeyDown(e) {
if (onPressEnter && e.key === 'Enter' && !keyLockRef.current) {
keyLockRef.current = true;
onPressEnter(e);
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
};
var handleKeyUp = function handleKeyUp(e) {
if (e.key === 'Enter') {
keyLockRef.current = false;
}
onKeyUp === null || onKeyUp === void 0 || onKeyUp(e);
};
var handleFocus = function handleFocus(e) {
setFocused(true);
onFocus === null || onFocus === void 0 || onFocus(e);
};
var handleBlur = function handleBlur(e) {
if (keyLockRef.current) {
keyLockRef.current = false;
}
setFocused(false);
onBlur === null || onBlur === void 0 || onBlur(e);
};
var handleReset = function handleReset(e) {
setValue('');
focus();
if (inputRef.current) {
resolveOnChange(inputRef.current, e, onChange);
}
};
// ====================== Input =======================
var outOfRangeCls = isOutOfRange && "".concat(prefixCls, "-out-of-range");
var getInputElement = function getInputElement() {
// Fix https://fb.me/react-unknown-prop
var otherProps = (0,omit["default"])(props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear',
// Input elements must be either controlled or uncontrolled,
// specify either the value prop, or the defaultValue prop, but not both.
'defaultValue', 'showCount', 'count', 'classes', 'htmlSize', 'styles', 'classNames', 'onClear']);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", (0,esm_extends["default"])({
autoComplete: autoComplete
}, otherProps, {
onChange: onInternalChange,
onFocus: handleFocus,
onBlur: handleBlur,
onKeyDown: handleKeyDown,
onKeyUp: handleKeyUp,
className: classnames_default()(prefixCls, (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), classNames === null || classNames === void 0 ? void 0 : classNames.input),
style: styles === null || styles === void 0 ? void 0 : styles.input,
ref: inputRef,
size: htmlSize,
type: type,
onCompositionStart: function onCompositionStart(e) {
compositionRef.current = true;
_onCompositionStart === null || _onCompositionStart === void 0 || _onCompositionStart(e);
},
onCompositionEnd: onInternalCompositionEnd
}));
};
var getSuffix = function getSuffix() {
// Max length value
var hasMaxLength = Number(mergedMax) > 0;
if (suffix || countConfig.show) {
var dataCount = countConfig.showFormatter ? countConfig.showFormatter({
value: formatValue,
count: valueLength,
maxLength: mergedMax
}) : "".concat(valueLength).concat(hasMaxLength ? " / ".concat(mergedMax) : '');
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, countConfig.show && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(prefixCls, "-show-count-suffix"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-show-count-has-suffix"), !!suffix), classNames === null || classNames === void 0 ? void 0 : classNames.count),
style: (0,objectSpread2["default"])({}, styles === null || styles === void 0 ? void 0 : styles.count)
}, dataCount), suffix);
}
return null;
};
// ====================== Render ======================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_BaseInput, (0,esm_extends["default"])({}, rest, {
prefixCls: prefixCls,
className: classnames_default()(className, outOfRangeCls),
handleReset: handleReset,
value: formatValue,
focused: focused,
triggerFocus: focus,
suffix: getSuffix(),
disabled: disabled,
classes: classes,
classNames: classNames,
styles: styles
}), getInputElement());
});
/* harmony default export */ var es_Input = (es_Input_Input);
;// ./node_modules/rc-input/es/index.js
/* harmony default export */ var rc_input_es = (es_Input);
;// ./node_modules/rc-util/es/proxyObject.js
/**
* Proxy object if environment supported
*/
function proxyObject(obj, extendProps) {
if (typeof Proxy !== 'undefined' && obj) {
return new Proxy(obj, {
get: function get(target, prop) {
if (extendProps[prop]) {
return extendProps[prop];
}
// Proxy origin property
var originProp = target[prop];
return typeof originProp === 'function' ? originProp.bind(target) : originProp;
}
});
}
return obj;
}
;// ./node_modules/rc-input-number/es/hooks/useCursor.js
/**
* Keep input cursor in the correct position if possible.
* Is this necessary since we have `formatter` which may mass the content?
*/
function useCursor(input, focused) {
var selectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
function recordCursor() {
// Record position
try {
var start = input.selectionStart,
end = input.selectionEnd,
value = input.value;
var beforeTxt = value.substring(0, start);
var afterTxt = value.substring(end);
selectionRef.current = {
start: start,
end: end,
value: value,
beforeTxt: beforeTxt,
afterTxt: afterTxt
};
} catch (e) {
// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
}
/**
* Restore logic:
* 1. back string same
* 2. start string same
*/
function restoreCursor() {
if (input && selectionRef.current && focused) {
try {
var value = input.value;
var _selectionRef$current = selectionRef.current,
beforeTxt = _selectionRef$current.beforeTxt,
afterTxt = _selectionRef$current.afterTxt,
start = _selectionRef$current.start;
var startPos = value.length;
if (value.startsWith(beforeTxt)) {
startPos = beforeTxt.length;
} else if (value.endsWith(afterTxt)) {
startPos = value.length - selectionRef.current.afterTxt.length;
} else {
var beforeLastChar = beforeTxt[start - 1];
var newIndex = value.indexOf(beforeLastChar, start - 1);
if (newIndex !== -1) {
startPos = newIndex + 1;
}
}
input.setSelectionRange(startPos, startPos);
} catch (e) {
(0,warning["default"])(false, "Something warning of cursor restore. Please fire issue about this: ".concat(e.message));
}
}
}
return [recordCursor, restoreCursor];
}
;// ./node_modules/rc-util/es/hooks/useMobile.js
/**
* Hook to detect if the user is on a mobile device
* Notice that this hook will only detect the device type in effect, so it will always be false in server side
*/
var useMobile = function useMobile() {
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
mobile = _useState2[0],
setMobile = _useState2[1];
(0,useLayoutEffect["default"])(function () {
setMobile(isMobile());
}, []);
return mobile;
};
/* harmony default export */ var hooks_useMobile = (useMobile);
;// ./node_modules/rc-input-number/es/StepHandler.js
/* eslint-disable react/no-unknown-property */
/**
* When click and hold on a button - the speed of auto changing the value.
*/
var STEP_INTERVAL = 200;
/**
* When click and hold on a button - the delay before auto changing the value.
*/
var STEP_DELAY = 600;
function StepHandler(_ref) {
var prefixCls = _ref.prefixCls,
upNode = _ref.upNode,
downNode = _ref.downNode,
upDisabled = _ref.upDisabled,
downDisabled = _ref.downDisabled,
onStep = _ref.onStep;
// ======================== Step ========================
var stepTimeoutRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var frameIds = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
var onStepRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
onStepRef.current = onStep;
var onStopStep = function onStopStep() {
clearTimeout(stepTimeoutRef.current);
};
// We will interval update step when hold mouse down
var onStepMouseDown = function onStepMouseDown(e, up) {
e.preventDefault();
onStopStep();
onStepRef.current(up);
// Loop step for interval
function loopStep() {
onStepRef.current(up);
stepTimeoutRef.current = setTimeout(loopStep, STEP_INTERVAL);
}
// First time press will wait some time to trigger loop step update
stepTimeoutRef.current = setTimeout(loopStep, STEP_DELAY);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
onStopStep();
frameIds.current.forEach(function (id) {
return raf["default"].cancel(id);
});
};
}, []);
// ======================= Render =======================
var isMobile = hooks_useMobile();
if (isMobile) {
return null;
}
var handlerClassName = "".concat(prefixCls, "-handler");
var upClassName = classnames_default()(handlerClassName, "".concat(handlerClassName, "-up"), (0,defineProperty["default"])({}, "".concat(handlerClassName, "-up-disabled"), upDisabled));
var downClassName = classnames_default()(handlerClassName, "".concat(handlerClassName, "-down"), (0,defineProperty["default"])({}, "".concat(handlerClassName, "-down-disabled"), downDisabled));
// fix: https://github.com/ant-design/ant-design/issues/43088
// In Safari, When we fire onmousedown and onmouseup events in quick succession,
// there may be a problem that the onmouseup events are executed first,
// resulting in a disordered program execution.
// So, we need to use requestAnimationFrame to ensure that the onmouseup event is executed after the onmousedown event.
var safeOnStopStep = function safeOnStopStep() {
return frameIds.current.push((0,raf["default"])(onStopStep));
};
var sharedHandlerProps = {
unselectable: 'on',
role: 'button',
onMouseUp: safeOnStopStep,
onMouseLeave: safeOnStopStep
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(handlerClassName, "-wrap")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({}, sharedHandlerProps, {
onMouseDown: function onMouseDown(e) {
onStepMouseDown(e, true);
},
"aria-label": "Increase Value",
"aria-disabled": upDisabled,
className: upClassName
}), upNode || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
unselectable: "on",
className: "".concat(prefixCls, "-handler-up-inner")
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({}, sharedHandlerProps, {
onMouseDown: function onMouseDown(e) {
onStepMouseDown(e, false);
},
"aria-label": "Decrease Value",
"aria-disabled": downDisabled,
className: downClassName
}), downNode || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
unselectable: "on",
className: "".concat(prefixCls, "-handler-down-inner")
})));
}
;// ./node_modules/rc-input-number/es/utils/numberUtil.js
function getDecupleSteps(step) {
var stepStr = typeof step === 'number' ? num2str(step) : trimNumber(step).fullStr;
var hasPoint = stepStr.includes('.');
if (!hasPoint) {
return step + '0';
}
return trimNumber(stepStr.replace(/(\d)\.(\d)/g, '$1$2.')).fullStr;
}
;// ./node_modules/rc-input-number/es/hooks/useFrame.js
/**
* Always trigger latest once when call multiple time
*/
/* harmony default export */ var useFrame = (function () {
var idRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
var cleanUp = function cleanUp() {
raf["default"].cancel(idRef.current);
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return cleanUp;
}, []);
return function (callback) {
cleanUp();
idRef.current = (0,raf["default"])(function () {
callback();
});
};
});
;// ./node_modules/rc-input-number/es/InputNumber.js
var InputNumber_excluded = ["prefixCls", "className", "style", "min", "max", "step", "defaultValue", "value", "disabled", "readOnly", "upHandler", "downHandler", "keyboard", "changeOnWheel", "controls", "classNames", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "changeOnBlur", "domRef"],
InputNumber_excluded2 = ["disabled", "style", "prefixCls", "value", "prefix", "suffix", "addonBefore", "addonAfter", "className", "classNames"];
/**
* We support `stringMode` which need handle correct type when user call in onChange
* format max or min value
* 1. if isInvalid return null
* 2. if precision is undefined, return decimal
* 3. format with precision
* I. if max > 0, round down with precision. Example: max= 3.5, precision=0 afterFormat: 3
* II. if max < 0, round up with precision. Example: max= -3.5, precision=0 afterFormat: -4
* III. if min > 0, round up with precision. Example: min= 3.5, precision=0 afterFormat: 4
* IV. if min < 0, round down with precision. Example: max= -3.5, precision=0 afterFormat: -3
*/
var getDecimalValue = function getDecimalValue(stringMode, decimalValue) {
if (stringMode || decimalValue.isEmpty()) {
return decimalValue.toString();
}
return decimalValue.toNumber();
};
var getDecimalIfValidate = function getDecimalIfValidate(value) {
var decimal = mini_decimal_es(value);
return decimal.isInvalidate() ? null : decimal;
};
var InternalInputNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
className = props.className,
style = props.style,
min = props.min,
max = props.max,
_props$step = props.step,
step = _props$step === void 0 ? 1 : _props$step,
defaultValue = props.defaultValue,
value = props.value,
disabled = props.disabled,
readOnly = props.readOnly,
upHandler = props.upHandler,
downHandler = props.downHandler,
keyboard = props.keyboard,
_props$changeOnWheel = props.changeOnWheel,
changeOnWheel = _props$changeOnWheel === void 0 ? false : _props$changeOnWheel,
_props$controls = props.controls,
controls = _props$controls === void 0 ? true : _props$controls,
classNames = props.classNames,
stringMode = props.stringMode,
parser = props.parser,
formatter = props.formatter,
precision = props.precision,
decimalSeparator = props.decimalSeparator,
onChange = props.onChange,
onInput = props.onInput,
onPressEnter = props.onPressEnter,
onStep = props.onStep,
_props$changeOnBlur = props.changeOnBlur,
changeOnBlur = _props$changeOnBlur === void 0 ? true : _props$changeOnBlur,
domRef = props.domRef,
inputProps = (0,objectWithoutProperties["default"])(props, InputNumber_excluded);
var inputClassName = "".concat(prefixCls, "-input");
var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
focus = _React$useState2[0],
setFocus = _React$useState2[1];
var userTypingRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var compositionRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var shiftKeyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
// ============================ Value =============================
// Real value control
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
return mini_decimal_es(value !== null && value !== void 0 ? value : defaultValue);
}),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
decimalValue = _React$useState4[0],
setDecimalValue = _React$useState4[1];
function setUncontrolledDecimalValue(newDecimal) {
if (value === undefined) {
setDecimalValue(newDecimal);
}
}
// ====================== Parser & Formatter ======================
/**
* `precision` is used for formatter & onChange.
* It will auto generate by `value` & `step`.
* But it will not block user typing.
*
* Note: Auto generate `precision` is used for legacy logic.
* We should remove this since we already support high precision with BigInt.
*
* @param number Provide which number should calculate precision
* @param userTyping Change by user typing
*/
var getPrecision = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (numStr, userTyping) {
if (userTyping) {
return undefined;
}
if (precision >= 0) {
return precision;
}
return Math.max(getNumberPrecision(numStr), getNumberPrecision(step));
}, [precision, step]);
// >>> Parser
var mergedParser = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (num) {
var numStr = String(num);
if (parser) {
return parser(numStr);
}
var parsedStr = numStr;
if (decimalSeparator) {
parsedStr = parsedStr.replace(decimalSeparator, '.');
}
// [Legacy] We still support auto convert `$ 123,456` to `123456`
return parsedStr.replace(/[^\w.-]+/g, '');
}, [parser, decimalSeparator]);
// >>> Formatter
var inputValueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef('');
var mergedFormatter = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (number, userTyping) {
if (formatter) {
return formatter(number, {
userTyping: userTyping,
input: String(inputValueRef.current)
});
}
var str = typeof number === 'number' ? num2str(number) : number;
// User typing will not auto format with precision directly
if (!userTyping) {
var mergedPrecision = getPrecision(str, userTyping);
if (validateNumber(str) && (decimalSeparator || mergedPrecision >= 0)) {
// Separator
var separatorStr = decimalSeparator || '.';
str = toFixed(str, separatorStr, mergedPrecision);
}
}
return str;
}, [formatter, getPrecision, decimalSeparator]);
// ========================== InputValue ==========================
/**
* Input text value control
*
* User can not update input content directly. It updates with follow rules by priority:
* 1. controlled `value` changed
* * [SPECIAL] Typing like `1.` should not immediately convert to `1`
* 2. User typing with format (not precision)
* 3. Blur or Enter trigger revalidate
*/
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
var initValue = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
if (decimalValue.isInvalidate() && ['string', 'number'].includes((0,esm_typeof["default"])(initValue))) {
return Number.isNaN(initValue) ? '' : initValue;
}
return mergedFormatter(decimalValue.toString(), false);
}),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
inputValue = _React$useState6[0],
setInternalInputValue = _React$useState6[1];
inputValueRef.current = inputValue;
// Should always be string
function setInputValue(newValue, userTyping) {
setInternalInputValue(mergedFormatter(
// Invalidate number is sometime passed by external control, we should let it go
// Otherwise is controlled by internal interactive logic which check by userTyping
// You can ref 'show limited value when input is not focused' test for more info.
newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping));
}
// >>> Max & Min limit
var maxDecimal = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getDecimalIfValidate(max);
}, [max, precision]);
var minDecimal = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getDecimalIfValidate(min);
}, [min, precision]);
var upDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!maxDecimal || !decimalValue || decimalValue.isInvalidate()) {
return false;
}
return maxDecimal.lessEquals(decimalValue);
}, [maxDecimal, decimalValue]);
var downDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!minDecimal || !decimalValue || decimalValue.isInvalidate()) {
return false;
}
return decimalValue.lessEquals(minDecimal);
}, [minDecimal, decimalValue]);
// Cursor controller
var _useCursor = useCursor(inputRef.current, focus),
_useCursor2 = (0,slicedToArray["default"])(_useCursor, 2),
recordCursor = _useCursor2[0],
restoreCursor = _useCursor2[1];
// ============================= Data =============================
/**
* Find target value closet within range.
* e.g. [11, 28]:
* 3 => 11
* 23 => 23
* 99 => 28
*/
var getRangeValue = function getRangeValue(target) {
// target > max
if (maxDecimal && !target.lessEquals(maxDecimal)) {
return maxDecimal;
}
// target < min
if (minDecimal && !minDecimal.lessEquals(target)) {
return minDecimal;
}
return null;
};
/**
* Check value is in [min, max] range
*/
var isInRange = function isInRange(target) {
return !getRangeValue(target);
};
/**
* Trigger `onChange` if value validated and not equals of origin.
* Return the value that re-align in range.
*/
var triggerValueUpdate = function triggerValueUpdate(newValue, userTyping) {
var updateValue = newValue;
var isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();
// Skip align value when trigger value is empty.
// We just trigger onChange(null)
// This should not block user typing
if (!updateValue.isEmpty() && !userTyping) {
// Revert value in range if needed
updateValue = getRangeValue(updateValue) || updateValue;
isRangeValidate = true;
}
if (!readOnly && !disabled && isRangeValidate) {
var numStr = updateValue.toString();
var mergedPrecision = getPrecision(numStr, userTyping);
if (mergedPrecision >= 0) {
updateValue = mini_decimal_es(toFixed(numStr, '.', mergedPrecision));
// When to fixed. The value may out of min & max range.
// 4 in [0, 3.8] => 3.8 => 4 (toFixed)
if (!isInRange(updateValue)) {
updateValue = mini_decimal_es(toFixed(numStr, '.', mergedPrecision, true));
}
}
// Trigger event
if (!updateValue.equals(decimalValue)) {
setUncontrolledDecimalValue(updateValue);
onChange === null || onChange === void 0 || onChange(updateValue.isEmpty() ? null : getDecimalValue(stringMode, updateValue));
// Reformat input if value is not controlled
if (value === undefined) {
setInputValue(updateValue, userTyping);
}
}
return updateValue;
}
return decimalValue;
};
// ========================== User Input ==========================
var onNextPromise = useFrame();
// >>> Collect input value
var collectInputValue = function collectInputValue(inputStr) {
recordCursor();
// Update inputValue in case input can not parse as number
// Refresh ref value immediately since it may used by formatter
inputValueRef.current = inputStr;
setInternalInputValue(inputStr);
// Parse number
if (!compositionRef.current) {
var finalValue = mergedParser(inputStr);
var finalDecimal = mini_decimal_es(finalValue);
if (!finalDecimal.isNaN()) {
triggerValueUpdate(finalDecimal, true);
}
}
// Trigger onInput later to let user customize value if they want to handle something after onChange
onInput === null || onInput === void 0 || onInput(inputStr);
// optimize for chinese input experience
// https://github.com/ant-design/ant-design/issues/8196
onNextPromise(function () {
var nextInputStr = inputStr;
if (!parser) {
nextInputStr = inputStr.replace(/。/g, '.');
}
if (nextInputStr !== inputStr) {
collectInputValue(nextInputStr);
}
});
};
// >>> Composition
var onCompositionStart = function onCompositionStart() {
compositionRef.current = true;
};
var onCompositionEnd = function onCompositionEnd() {
compositionRef.current = false;
collectInputValue(inputRef.current.value);
};
// >>> Input
var onInternalInput = function onInternalInput(e) {
collectInputValue(e.target.value);
};
// ============================= Step =============================
var onInternalStep = function onInternalStep(up) {
var _inputRef$current;
// Ignore step since out of range
if (up && upDisabled || !up && downDisabled) {
return;
}
// Clear typing status since it may be caused by up & down key.
// We should sync with input value.
userTypingRef.current = false;
var stepDecimal = mini_decimal_es(shiftKeyRef.current ? getDecupleSteps(step) : step);
if (!up) {
stepDecimal = stepDecimal.negate();
}
var target = (decimalValue || mini_decimal_es(0)).add(stepDecimal.toString());
var updatedValue = triggerValueUpdate(target, false);
onStep === null || onStep === void 0 || onStep(getDecimalValue(stringMode, updatedValue), {
offset: shiftKeyRef.current ? getDecupleSteps(step) : step,
type: up ? 'up' : 'down'
});
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
};
// ============================ Flush =============================
/**
* Flush current input content to trigger value change & re-formatter input if needed.
* This will always flush input value for update.
* If it's invalidate, will fallback to last validate value.
*/
var flushInputValue = function flushInputValue(userTyping) {
var parsedValue = mini_decimal_es(mergedParser(inputValue));
var formatValue;
if (!parsedValue.isNaN()) {
// Only validate value or empty value can be re-fill to inputValue
// Reassign the formatValue within ranged of trigger control
formatValue = triggerValueUpdate(parsedValue, userTyping);
} else {
formatValue = triggerValueUpdate(decimalValue, userTyping);
}
if (value !== undefined) {
// Reset back with controlled value first
setInputValue(decimalValue, false);
} else if (!formatValue.isNaN()) {
// Reset input back since no validate value
setInputValue(formatValue, false);
}
};
// Solve the issue of the event triggering sequence when entering numbers in chinese input (Safari)
var onBeforeInput = function onBeforeInput() {
userTypingRef.current = true;
};
var onKeyDown = function onKeyDown(event) {
var key = event.key,
shiftKey = event.shiftKey;
userTypingRef.current = true;
shiftKeyRef.current = shiftKey;
if (key === 'Enter') {
if (!compositionRef.current) {
userTypingRef.current = false;
}
flushInputValue(false);
onPressEnter === null || onPressEnter === void 0 || onPressEnter(event);
}
if (keyboard === false) {
return;
}
// Do step
if (!compositionRef.current && ['Up', 'ArrowUp', 'Down', 'ArrowDown'].includes(key)) {
onInternalStep(key === 'Up' || key === 'ArrowUp');
event.preventDefault();
}
};
var onKeyUp = function onKeyUp() {
userTypingRef.current = false;
shiftKeyRef.current = false;
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (changeOnWheel && focus) {
var onWheel = function onWheel(event) {
// moving mouse wheel rises wheel event with deltaY < 0
// scroll value grows from top to bottom, as screen Y coordinate
onInternalStep(event.deltaY < 0);
event.preventDefault();
};
var input = inputRef.current;
if (input) {
// React onWheel is passive and we can't preventDefault() in it.
// That's why we should subscribe with DOM listener
// https://stackoverflow.com/questions/63663025/react-onwheel-handler-cant-preventdefault-because-its-a-passive-event-listenev
input.addEventListener('wheel', onWheel, {
passive: false
});
return function () {
return input.removeEventListener('wheel', onWheel);
};
}
}
});
// >>> Focus & Blur
var onBlur = function onBlur() {
if (changeOnBlur) {
flushInputValue(false);
}
setFocus(false);
userTypingRef.current = false;
};
// ========================== Controlled ==========================
// Input by precision & formatter
(0,useLayoutEffect.useLayoutUpdateEffect)(function () {
if (!decimalValue.isInvalidate()) {
setInputValue(decimalValue, false);
}
}, [precision, formatter]);
// Input by value
(0,useLayoutEffect.useLayoutUpdateEffect)(function () {
var newValue = mini_decimal_es(value);
setDecimalValue(newValue);
var currentParsedValue = mini_decimal_es(mergedParser(inputValue));
// When user typing from `1.2` to `1.`, we should not convert to `1` immediately.
// But let it go if user set `formatter`
if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {
// Update value as effect
setInputValue(newValue, userTypingRef.current);
}
}, [value]);
// ============================ Cursor ============================
(0,useLayoutEffect.useLayoutUpdateEffect)(function () {
if (formatter) {
restoreCursor();
}
}, [inputValue]);
// ============================ Render ============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: domRef,
className: classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-focused"), focus), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-readonly"), readOnly), "".concat(prefixCls, "-not-a-number"), decimalValue.isNaN()), "".concat(prefixCls, "-out-of-range"), !decimalValue.isInvalidate() && !isInRange(decimalValue))),
style: style,
onFocus: function onFocus() {
setFocus(true);
},
onBlur: onBlur,
onKeyDown: onKeyDown,
onKeyUp: onKeyUp,
onCompositionStart: onCompositionStart,
onCompositionEnd: onCompositionEnd,
onBeforeInput: onBeforeInput
}, controls && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StepHandler, {
prefixCls: prefixCls,
upNode: upHandler,
downNode: downHandler,
upDisabled: upDisabled,
downDisabled: downDisabled,
onStep: onInternalStep
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(inputClassName, "-wrap")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", (0,esm_extends["default"])({
autoComplete: "off",
role: "spinbutton",
"aria-valuemin": min,
"aria-valuemax": max,
"aria-valuenow": decimalValue.isInvalidate() ? null : decimalValue.toString(),
step: step
}, inputProps, {
ref: (0,es_ref.composeRef)(inputRef, ref),
className: inputClassName,
value: inputValue,
onChange: onInternalInput,
disabled: disabled,
readOnly: readOnly
}))));
});
var InputNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var disabled = props.disabled,
style = props.style,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-input-number' : _props$prefixCls,
value = props.value,
prefix = props.prefix,
suffix = props.suffix,
addonBefore = props.addonBefore,
addonAfter = props.addonAfter,
className = props.className,
classNames = props.classNames,
rest = (0,objectWithoutProperties["default"])(props, InputNumber_excluded2);
var holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var inputNumberDomRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var inputFocusRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var focus = function focus(option) {
if (inputFocusRef.current) {
triggerFocus(inputFocusRef.current, option);
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return proxyObject(inputFocusRef.current, {
focus: focus,
nativeElement: holderRef.current.nativeElement || inputNumberDomRef.current
});
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseInput, {
className: className,
triggerFocus: focus,
prefixCls: prefixCls,
value: value,
disabled: disabled,
style: style,
prefix: prefix,
suffix: suffix,
addonAfter: addonAfter,
addonBefore: addonBefore,
classNames: classNames,
components: {
affixWrapper: 'div',
groupWrapper: 'div',
wrapper: 'div',
groupAddon: 'div'
},
ref: holderRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalInputNumber, (0,esm_extends["default"])({
prefixCls: prefixCls,
disabled: disabled,
ref: inputFocusRef,
domRef: inputNumberDomRef,
className: classNames === null || classNames === void 0 ? void 0 : classNames.input
}, rest)));
});
if (true) {
InputNumber.displayName = 'InputNumber';
}
/* harmony default export */ var es_InputNumber = (InputNumber);
;// ./node_modules/rc-input-number/es/index.js
/* harmony default export */ var rc_input_number_es = (es_InputNumber);
// EXTERNAL MODULE: ./components/input-number/style/index.ts + 1 modules
var input_number_style = __webpack_require__("./components/input-number/style/index.ts");
;// ./components/input-number/index.tsx
var input_number_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;
};
const input_number_InputNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
if (true) {
const typeWarning = (0,_util_warning.devUseWarning)('InputNumber');
typeWarning.deprecated(!('bordered' in props), 'bordered', 'variant');
typeWarning(!(props.type === 'number' && props.changeOnWheel), 'usage', 'When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.');
}
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => inputRef.current);
const {
className,
rootClassName,
size: customizeSize,
disabled: customDisabled,
prefixCls: customizePrefixCls,
addonBefore,
addonAfter,
prefix,
suffix,
bordered,
readOnly,
status: customStatus,
controls,
variant: customVariant
} = props,
others = input_number_rest(props, ["className", "rootClassName", "size", "disabled", "prefixCls", "addonBefore", "addonAfter", "prefix", "suffix", "bordered", "readOnly", "status", "controls", "variant"]);
const prefixCls = getPrefixCls('input-number', customizePrefixCls);
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,input_number_style["default"])(prefixCls, rootCls);
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
let upIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_UpOutlined, {
className: `${prefixCls}-handler-up-inner`
});
let downIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, {
className: `${prefixCls}-handler-down-inner`
});
const controlsTemp = typeof controls === 'boolean' ? controls : undefined;
if (typeof controls === 'object') {
upIcon = typeof controls.upIcon === 'undefined' ? upIcon : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-handler-up-inner`
}, controls.upIcon));
downIcon = typeof controls.downIcon === 'undefined' ? downIcon : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-handler-down-inner`
}, controls.downIcon));
}
const {
hasFeedback,
status: contextStatus,
isFormItemInput,
feedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const [variant, enableVariantCls] = useVariants('inputNumber', customVariant, bordered);
const suffixNode = hasFeedback && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, feedbackIcon);
const inputNumberClass = classnames_default()({
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-in-form-item`]: isFormItemInput
}, hashId);
const wrapperClassName = `${prefixCls}-group`;
const element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_input_number_es, Object.assign({
ref: inputRef,
disabled: mergedDisabled,
className: classnames_default()(cssVarCls, rootCls, className, rootClassName, compactItemClassnames),
upHandler: upIcon,
downHandler: downIcon,
prefixCls: prefixCls,
readOnly: readOnly,
controls: controlsTemp,
prefix: prefix,
suffix: suffixNode || suffix,
addonBefore: addonBefore && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
form: true,
space: true
}, addonBefore)),
addonAfter: addonAfter && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
form: true,
space: true
}, addonAfter)),
classNames: {
input: inputNumberClass,
variant: classnames_default()({
[`${prefixCls}-${variant}`]: enableVariantCls
}, getStatusClassNames(prefixCls, mergedStatus, hasFeedback)),
affixWrapper: classnames_default()({
[`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-affix-wrapper-without-controls`]: controls === false
}, hashId),
wrapper: classnames_default()({
[`${wrapperClassName}-rtl`]: direction === 'rtl'
}, hashId),
groupWrapper: classnames_default()({
[`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls
}, getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)
}
}, others));
return wrapCSSVar(element);
});
const TypedInputNumber = input_number_InputNumber;
/** @private Internal Component. Do not use in your production. */
const PureInputNumber = props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
theme: {
components: {
InputNumber: {
handleVisible: true
}
}
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_number_InputNumber, Object.assign({}, props))));
if (true) {
TypedInputNumber.displayName = 'InputNumber';
}
TypedInputNumber._InternalPanelDoNotUseOrYouWillBeFired = PureInputNumber;
/* harmony default export */ var input_number = (TypedInputNumber);
;// ./components/color-picker/components/ColorSteppers.tsx
const ColorSteppers = _ref => {
let {
prefixCls,
min = 0,
max = 100,
value,
onChange,
className,
formatter
} = _ref;
const colorSteppersPrefixCls = `${prefixCls}-steppers`;
const [stepValue, setStepValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value);
// Update step value
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (!Number.isNaN(value)) {
setStepValue(value);
}
}, [value]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(input_number, {
className: classnames_default()(colorSteppersPrefixCls, className),
min: min,
max: max,
value: stepValue,
formatter: formatter,
size: "small",
onChange: step => {
if (!value) {
setStepValue(step || 0);
}
onChange === null || onChange === void 0 ? void 0 : onChange(step);
}
});
};
/* harmony default export */ var components_ColorSteppers = (ColorSteppers);
;// ./components/color-picker/components/ColorAlphaInput.tsx
const ColorAlphaInput = _ref => {
let {
prefixCls,
value,
onChange
} = _ref;
const colorAlphaInputPrefixCls = `${prefixCls}-alpha-input`;
const [alphaValue, setAlphaValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)((0,util.generateColor)(value || '#000'));
// Update step value
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (value) {
setAlphaValue(value);
}
}, [value]);
const handleAlphaChange = step => {
const hsba = alphaValue.toHsb();
hsba.a = (step || 0) / 100;
const genColor = (0,util.generateColor)(hsba);
if (!value) {
setAlphaValue(genColor);
}
onChange === null || onChange === void 0 ? void 0 : onChange(genColor);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
value: (0,util.getColorAlpha)(alphaValue),
prefixCls: prefixCls,
formatter: step => `${step}%`,
className: colorAlphaInputPrefixCls,
onChange: handleAlphaChange
});
};
/* harmony default export */ var components_ColorAlphaInput = (ColorAlphaInput);
;// ./components/_util/getAllowClear.tsx
const getAllowClear = allowClear => {
let mergedAllowClear;
if (typeof allowClear === 'object' && (allowClear === null || allowClear === void 0 ? void 0 : allowClear.clearIcon)) {
mergedAllowClear = allowClear;
} else if (allowClear) {
mergedAllowClear = {
clearIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseCircleFilled, null)
};
}
return mergedAllowClear;
};
/* harmony default export */ var _util_getAllowClear = (getAllowClear);
;// ./components/input/hooks/useRemovePasswordTimeout.ts
function useRemovePasswordTimeout(inputRef, triggerOnMount) {
const removePasswordTimeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
const removePasswordTimeout = () => {
removePasswordTimeoutRef.current.push(setTimeout(() => {
var _a, _b, _c, _d;
if (((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) && ((_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.input.getAttribute('type')) === 'password' && ((_c = inputRef.current) === null || _c === void 0 ? void 0 : _c.input.hasAttribute('value'))) {
(_d = inputRef.current) === null || _d === void 0 ? void 0 : _d.input.removeAttribute('value');
}
}));
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (triggerOnMount) {
removePasswordTimeout();
}
return () => removePasswordTimeoutRef.current.forEach(timer => {
if (timer) {
clearTimeout(timer);
}
});
}, []);
return removePasswordTimeout;
}
// EXTERNAL MODULE: ./components/input/style/index.ts
var input_style = __webpack_require__("./components/input/style/index.ts");
;// ./components/input/utils.ts
function utils_hasPrefixSuffix(props) {
return !!(props.prefix || props.suffix || props.allowClear || props.showCount);
}
;// ./components/input/Input.tsx
var Input_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;
};
const input_Input_Input = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
const {
prefixCls: customizePrefixCls,
bordered = true,
status: customStatus,
size: customSize,
disabled: customDisabled,
onBlur,
onFocus,
suffix,
allowClear,
addonAfter,
addonBefore,
className,
style,
styles,
rootClassName,
onChange,
classNames: classes,
variant: customVariant
} = props,
rest = Input_rest(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant"]);
if (true) {
const {
deprecated
} = (0,_util_warning.devUseWarning)('Input');
deprecated(!('bordered' in props), 'bordered', 'variant');
}
const {
getPrefixCls,
direction,
allowClear: contextAllowClear,
autoComplete: contextAutoComplete,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('input');
const prefixCls = getPrefixCls('input', customizePrefixCls);
const inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapSharedCSSVar, hashId, cssVarCls] = (0,input_style.useSharedStyle)(prefixCls, rootClassName);
const [wrapCSSVar] = (0,input_style["default"])(prefixCls, rootCls);
// ===================== Compact Item =====================
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
// ===================== Size =====================
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customSize !== null && customSize !== void 0 ? customSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
// ===================== Status =====================
const {
status: contextStatus,
hasFeedback,
feedbackIcon
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
// ===================== Focus warning =====================
const inputHasPrefixSuffix = utils_hasPrefixSuffix(props) || !!hasFeedback;
const prevHasPrefixSuffix = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(inputHasPrefixSuffix);
/* eslint-disable react-hooks/rules-of-hooks */
if (true) {
const warning = (0,_util_warning.devUseWarning)('Input');
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
var _a;
if (inputHasPrefixSuffix && !prevHasPrefixSuffix.current) {
true ? warning(document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input), 'usage', `When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ`) : 0;
}
prevHasPrefixSuffix.current = inputHasPrefixSuffix;
}, [inputHasPrefixSuffix]);
}
/* eslint-enable */
// ===================== Remove Password value =====================
const removePasswordTimeout = useRemovePasswordTimeout(inputRef, true);
const handleBlur = e => {
removePasswordTimeout();
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
};
const handleFocus = e => {
removePasswordTimeout();
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
};
const handleChange = e => {
removePasswordTimeout();
onChange === null || onChange === void 0 ? void 0 : onChange(e);
};
const suffixNode = (hasFeedback || suffix) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, suffix, hasFeedback && feedbackIcon));
const mergedAllowClear = _util_getAllowClear(allowClear !== null && allowClear !== void 0 ? allowClear : contextAllowClear);
const [variant, enableVariantCls] = useVariants('input', customVariant, bordered);
return wrapSharedCSSVar(wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_input_es, Object.assign({
ref: (0,es_ref.composeRef)(ref, inputRef),
prefixCls: prefixCls,
autoComplete: contextAutoComplete
}, rest, {
disabled: mergedDisabled,
onBlur: handleBlur,
onFocus: handleFocus,
style: Object.assign(Object.assign({}, contextStyle), style),
styles: Object.assign(Object.assign({}, contextStyles), styles),
suffix: suffixNode,
allowClear: mergedAllowClear,
className: classnames_default()(className, rootClassName, cssVarCls, rootCls, compactItemClassnames, contextClassName),
onChange: handleChange,
addonBefore: addonBefore && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
form: true,
space: true
}, addonBefore)),
addonAfter: addonAfter && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
form: true,
space: true
}, addonAfter)),
classNames: Object.assign(Object.assign(Object.assign({}, classes), contextClassNames), {
input: classnames_default()({
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-rtl`]: direction === 'rtl'
}, classes === null || classes === void 0 ? void 0 : classes.input, contextClassNames.input, hashId),
variant: classnames_default()({
[`${prefixCls}-${variant}`]: enableVariantCls
}, getStatusClassNames(prefixCls, mergedStatus)),
affixWrapper: classnames_default()({
[`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl'
}, hashId),
wrapper: classnames_default()({
[`${prefixCls}-group-rtl`]: direction === 'rtl'
}, hashId),
groupWrapper: classnames_default()({
[`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls
}, getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)
})
}))));
});
if (true) {
input_Input_Input.displayName = 'Input';
}
/* harmony default export */ var input_Input = (input_Input_Input);
;// ./components/color-picker/components/ColorHexInput.tsx
const hexReg = /(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i;
const isHexString = hex => hexReg.test(`#${hex}`);
const ColorHexInput = _ref => {
let {
prefixCls,
value,
onChange
} = _ref;
const colorHexInputPrefixCls = `${prefixCls}-hex-input`;
const [hexValue, setHexValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => value ? (0,color.toHexFormat)(value.toHexString()) : undefined);
// Update step value
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (value) {
setHexValue((0,color.toHexFormat)(value.toHexString()));
}
}, [value]);
const handleHexChange = e => {
const originValue = e.target.value;
setHexValue((0,color.toHexFormat)(originValue));
if (isHexString((0,color.toHexFormat)(originValue, true))) {
onChange === null || onChange === void 0 ? void 0 : onChange((0,util.generateColor)(originValue));
}
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(input_Input, {
className: colorHexInputPrefixCls,
value: hexValue,
prefix: "#",
onChange: handleHexChange,
size: "small"
});
};
/* harmony default export */ var components_ColorHexInput = (ColorHexInput);
;// ./components/color-picker/components/ColorHsbInput.tsx
const ColorHsbInput = _ref => {
let {
prefixCls,
value,
onChange
} = _ref;
const colorHsbInputPrefixCls = `${prefixCls}-hsb-input`;
const [hsbValue, setHsbValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)((0,util.generateColor)(value || '#000'));
// Update step value
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (value) {
setHsbValue(value);
}
}, [value]);
const handleHsbChange = (step, type) => {
const hsb = hsbValue.toHsb();
hsb[type] = type === 'h' ? step : (step || 0) / 100;
const genColor = (0,util.generateColor)(hsb);
if (!value) {
setHsbValue(genColor);
}
onChange === null || onChange === void 0 ? void 0 : onChange(genColor);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: colorHsbInputPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
max: 360,
min: 0,
value: Number(hsbValue.toHsb().h),
prefixCls: prefixCls,
className: colorHsbInputPrefixCls,
formatter: step => (0,util.getRoundNumber)(step || 0).toString(),
onChange: step => handleHsbChange(Number(step), 'h')
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
max: 100,
min: 0,
value: Number(hsbValue.toHsb().s) * 100,
prefixCls: prefixCls,
className: colorHsbInputPrefixCls,
formatter: step => `${(0,util.getRoundNumber)(step || 0)}%`,
onChange: step => handleHsbChange(Number(step), 's')
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
max: 100,
min: 0,
value: Number(hsbValue.toHsb().b) * 100,
prefixCls: prefixCls,
className: colorHsbInputPrefixCls,
formatter: step => `${(0,util.getRoundNumber)(step || 0)}%`,
onChange: step => handleHsbChange(Number(step), 'b')
}));
};
/* harmony default export */ var components_ColorHsbInput = (ColorHsbInput);
;// ./components/color-picker/components/ColorRgbInput.tsx
const ColorRgbInput = _ref => {
let {
prefixCls,
value,
onChange
} = _ref;
const colorRgbInputPrefixCls = `${prefixCls}-rgb-input`;
const [rgbValue, setRgbValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)((0,util.generateColor)(value || '#000'));
// Update step value
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (value) {
setRgbValue(value);
}
}, [value]);
const handleRgbChange = (step, type) => {
const rgb = rgbValue.toRgb();
rgb[type] = step || 0;
const genColor = (0,util.generateColor)(rgb);
if (!value) {
setRgbValue(genColor);
}
onChange === null || onChange === void 0 ? void 0 : onChange(genColor);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: colorRgbInputPrefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
max: 255,
min: 0,
value: Number(rgbValue.toRgb().r),
prefixCls: prefixCls,
className: colorRgbInputPrefixCls,
onChange: step => handleRgbChange(Number(step), 'r')
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
max: 255,
min: 0,
value: Number(rgbValue.toRgb().g),
prefixCls: prefixCls,
className: colorRgbInputPrefixCls,
onChange: step => handleRgbChange(Number(step), 'g')
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
max: 255,
min: 0,
value: Number(rgbValue.toRgb().b),
prefixCls: prefixCls,
className: colorRgbInputPrefixCls,
onChange: step => handleRgbChange(Number(step), 'b')
}));
};
/* harmony default export */ var components_ColorRgbInput = (ColorRgbInput);
;// ./components/color-picker/components/ColorInput.tsx
const selectOptions = [FORMAT_HEX, FORMAT_HSB, FORMAT_RGB].map(format => ({
value: format,
label: format.toUpperCase()
}));
const ColorInput = props => {
const {
prefixCls,
format,
value,
disabledAlpha,
onFormatChange,
onChange,
disabledFormat
} = props;
const [colorFormat, setColorFormat] = (0,useMergedState["default"])(FORMAT_HEX, {
value: format,
onChange: onFormatChange
});
const colorInputPrefixCls = `${prefixCls}-input`;
const handleFormatChange = newFormat => {
setColorFormat(newFormat);
};
const steppersNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
const inputProps = {
value,
prefixCls,
onChange
};
switch (colorFormat) {
case FORMAT_HSB:
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorHsbInput, Object.assign({}, inputProps));
case FORMAT_RGB:
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorRgbInput, Object.assign({}, inputProps));
// case FORMAT_HEX:
default:
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorHexInput, Object.assign({}, inputProps));
}
}, [colorFormat, prefixCls, value, onChange]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${colorInputPrefixCls}-container`
}, !disabledFormat && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_select, {
value: colorFormat,
variant: "borderless",
getPopupContainer: current => current,
popupMatchSelectWidth: 68,
placement: "bottomRight",
onChange: handleFormatChange,
className: `${prefixCls}-format-select`,
size: "small",
options: selectOptions
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: colorInputPrefixCls
}, steppersNode), !disabledAlpha && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorAlphaInput, {
prefixCls: prefixCls,
value: value,
onChange: onChange
})));
};
/* harmony default export */ var components_ColorInput = (ColorInput);
;// ./node_modules/rc-slider/es/util.js
function util_getOffset(value, min, max) {
return (value - min) / (max - min);
}
function getDirectionStyle(direction, value, min, max) {
var offset = util_getOffset(value, min, max);
var positionStyle = {};
switch (direction) {
case 'rtl':
positionStyle.right = "".concat(offset * 100, "%");
positionStyle.transform = 'translateX(50%)';
break;
case 'btt':
positionStyle.bottom = "".concat(offset * 100, "%");
positionStyle.transform = 'translateY(50%)';
break;
case 'ttb':
positionStyle.top = "".concat(offset * 100, "%");
positionStyle.transform = 'translateY(-50%)';
break;
default:
positionStyle.left = "".concat(offset * 100, "%");
positionStyle.transform = 'translateX(-50%)';
break;
}
return positionStyle;
}
/** Return index value if is list or return value directly */
function getIndex(value, index) {
return Array.isArray(value) ? value[index] : value;
}
;// ./node_modules/rc-slider/es/context.js
var SliderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
min: 0,
max: 0,
direction: 'ltr',
step: 1,
includedStart: 0,
includedEnd: 0,
tabIndex: 0,
keyboard: true,
styles: {},
classNames: {}
});
/* harmony default export */ var rc_slider_es_context = (SliderContext);
/** @private NOT PROMISE AVAILABLE. DO NOT USE IN PRODUCTION. */
var UnstableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
;// ./node_modules/rc-slider/es/Handles/Handle.js
var Handle_excluded = ["prefixCls", "value", "valueIndex", "onStartMove", "onDelete", "style", "render", "dragging", "draggingDelete", "onOffsetChange", "onChangeComplete", "onFocus", "onMouseEnter"];
var Handle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
value = props.value,
valueIndex = props.valueIndex,
onStartMove = props.onStartMove,
onDelete = props.onDelete,
style = props.style,
render = props.render,
dragging = props.dragging,
draggingDelete = props.draggingDelete,
onOffsetChange = props.onOffsetChange,
onChangeComplete = props.onChangeComplete,
onFocus = props.onFocus,
onMouseEnter = props.onMouseEnter,
restProps = (0,objectWithoutProperties["default"])(props, Handle_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
min = _React$useContext.min,
max = _React$useContext.max,
direction = _React$useContext.direction,
disabled = _React$useContext.disabled,
keyboard = _React$useContext.keyboard,
range = _React$useContext.range,
tabIndex = _React$useContext.tabIndex,
ariaLabelForHandle = _React$useContext.ariaLabelForHandle,
ariaLabelledByForHandle = _React$useContext.ariaLabelledByForHandle,
ariaRequired = _React$useContext.ariaRequired,
ariaValueTextFormatterForHandle = _React$useContext.ariaValueTextFormatterForHandle,
styles = _React$useContext.styles,
classNames = _React$useContext.classNames;
var handlePrefixCls = "".concat(prefixCls, "-handle");
// ============================ Events ============================
var onInternalStartMove = function onInternalStartMove(e) {
if (!disabled) {
onStartMove(e, valueIndex);
}
};
var onInternalFocus = function onInternalFocus(e) {
onFocus === null || onFocus === void 0 || onFocus(e, valueIndex);
};
var onInternalMouseEnter = function onInternalMouseEnter(e) {
onMouseEnter(e, valueIndex);
};
// =========================== Keyboard ===========================
var onKeyDown = function onKeyDown(e) {
if (!disabled && keyboard) {
var offset = null;
// Change the value
switch (e.which || e.keyCode) {
case KeyCode["default"].LEFT:
offset = direction === 'ltr' || direction === 'btt' ? -1 : 1;
break;
case KeyCode["default"].RIGHT:
offset = direction === 'ltr' || direction === 'btt' ? 1 : -1;
break;
// Up is plus
case KeyCode["default"].UP:
offset = direction !== 'ttb' ? 1 : -1;
break;
// Down is minus
case KeyCode["default"].DOWN:
offset = direction !== 'ttb' ? -1 : 1;
break;
case KeyCode["default"].HOME:
offset = 'min';
break;
case KeyCode["default"].END:
offset = 'max';
break;
case KeyCode["default"].PAGE_UP:
offset = 2;
break;
case KeyCode["default"].PAGE_DOWN:
offset = -2;
break;
case KeyCode["default"].BACKSPACE:
case KeyCode["default"].DELETE:
onDelete(valueIndex);
break;
}
if (offset !== null) {
e.preventDefault();
onOffsetChange(offset, valueIndex);
}
}
};
var handleKeyUp = function handleKeyUp(e) {
switch (e.which || e.keyCode) {
case KeyCode["default"].LEFT:
case KeyCode["default"].RIGHT:
case KeyCode["default"].UP:
case KeyCode["default"].DOWN:
case KeyCode["default"].HOME:
case KeyCode["default"].END:
case KeyCode["default"].PAGE_UP:
case KeyCode["default"].PAGE_DOWN:
onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete();
break;
}
};
// ============================ Offset ============================
var positionStyle = getDirectionStyle(direction, value, min, max);
// ============================ Render ============================
var divProps = {};
if (valueIndex !== null) {
var _getIndex;
divProps = {
tabIndex: disabled ? null : getIndex(tabIndex, valueIndex),
role: 'slider',
'aria-valuemin': min,
'aria-valuemax': max,
'aria-valuenow': value,
'aria-disabled': disabled,
'aria-label': getIndex(ariaLabelForHandle, valueIndex),
'aria-labelledby': getIndex(ariaLabelledByForHandle, valueIndex),
'aria-required': getIndex(ariaRequired, valueIndex),
'aria-valuetext': (_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value),
'aria-orientation': direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical',
onMouseDown: onInternalStartMove,
onTouchStart: onInternalStartMove,
onFocus: onInternalFocus,
onMouseEnter: onInternalMouseEnter,
onKeyDown: onKeyDown,
onKeyUp: handleKeyUp
};
}
var handleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
ref: ref,
className: classnames_default()(handlePrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), valueIndex !== null && range), "".concat(handlePrefixCls, "-dragging"), dragging), "".concat(handlePrefixCls, "-dragging-delete"), draggingDelete), classNames.handle),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, positionStyle), style), styles.handle)
}, divProps, restProps));
// Customize
if (render) {
handleNode = render(handleNode, {
index: valueIndex,
prefixCls: prefixCls,
value: value,
dragging: dragging,
draggingDelete: draggingDelete
});
}
return handleNode;
});
if (true) {
Handle.displayName = 'Handle';
}
/* harmony default export */ var Handles_Handle = (Handle);
;// ./node_modules/rc-slider/es/Handles/index.js
var Handles_excluded = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "draggingDelete", "onFocus"];
var Handles = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
style = props.style,
onStartMove = props.onStartMove,
onOffsetChange = props.onOffsetChange,
values = props.values,
handleRender = props.handleRender,
activeHandleRender = props.activeHandleRender,
draggingIndex = props.draggingIndex,
draggingDelete = props.draggingDelete,
onFocus = props.onFocus,
restProps = (0,objectWithoutProperties["default"])(props, Handles_excluded);
var handlesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
// =========================== Active ===========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
activeVisible = _React$useState2[0],
setActiveVisible = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
activeIndex = _React$useState4[0],
setActiveIndex = _React$useState4[1];
var onActive = function onActive(index) {
setActiveIndex(index);
setActiveVisible(true);
};
var onHandleFocus = function onHandleFocus(e, index) {
onActive(index);
onFocus === null || onFocus === void 0 || onFocus(e);
};
var onHandleMouseEnter = function onHandleMouseEnter(e, index) {
onActive(index);
};
// =========================== Render ===========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
focus: function focus(index) {
var _handlesRef$current$i;
(_handlesRef$current$i = handlesRef.current[index]) === null || _handlesRef$current$i === void 0 || _handlesRef$current$i.focus();
},
hideHelp: function hideHelp() {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(function () {
setActiveVisible(false);
});
}
};
});
// =========================== Render ===========================
// Handle Props
var handleProps = (0,objectSpread2["default"])({
prefixCls: prefixCls,
onStartMove: onStartMove,
onOffsetChange: onOffsetChange,
render: handleRender,
onFocus: onHandleFocus,
onMouseEnter: onHandleMouseEnter
}, restProps);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, values.map(function (value, index) {
var dragging = draggingIndex === index;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Handles_Handle, (0,esm_extends["default"])({
ref: function ref(node) {
if (!node) {
delete handlesRef.current[index];
} else {
handlesRef.current[index] = node;
}
},
dragging: dragging,
draggingDelete: dragging && draggingDelete,
style: getIndex(style, index),
key: index,
value: value,
valueIndex: index
}, handleProps));
}), activeHandleRender && activeVisible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Handles_Handle, (0,esm_extends["default"])({
key: "a11y"
}, handleProps, {
value: values[activeIndex],
valueIndex: null,
dragging: draggingIndex !== -1,
draggingDelete: draggingDelete,
render: activeHandleRender,
style: {
pointerEvents: 'none'
},
tabIndex: null,
"aria-hidden": true
})));
});
if (true) {
Handles.displayName = 'Handles';
}
/* harmony default export */ var es_Handles = (Handles);
;// ./node_modules/rc-slider/es/Marks/Mark.js
var Mark = function Mark(props) {
var prefixCls = props.prefixCls,
style = props.style,
children = props.children,
value = props.value,
_onClick = props.onClick;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
min = _React$useContext.min,
max = _React$useContext.max,
direction = _React$useContext.direction,
includedStart = _React$useContext.includedStart,
includedEnd = _React$useContext.includedEnd,
included = _React$useContext.included;
var textCls = "".concat(prefixCls, "-text");
// ============================ Offset ============================
var positionStyle = getDirectionStyle(direction, value, min, max);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(textCls, (0,defineProperty["default"])({}, "".concat(textCls, "-active"), included && includedStart <= value && value <= includedEnd)),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, positionStyle), style),
onMouseDown: function onMouseDown(e) {
e.stopPropagation();
},
onClick: function onClick() {
_onClick(value);
}
}, children);
};
/* harmony default export */ var Marks_Mark = (Mark);
;// ./node_modules/rc-slider/es/Marks/index.js
var Marks = function Marks(props) {
var prefixCls = props.prefixCls,
marks = props.marks,
onClick = props.onClick;
var markPrefixCls = "".concat(prefixCls, "-mark");
// Not render mark if empty
if (!marks.length) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: markPrefixCls
}, marks.map(function (_ref) {
var value = _ref.value,
style = _ref.style,
label = _ref.label;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Marks_Mark, {
key: value,
prefixCls: markPrefixCls,
style: style,
value: value,
onClick: onClick
}, label);
}));
};
/* harmony default export */ var es_Marks = (Marks);
;// ./node_modules/rc-slider/es/Steps/Dot.js
var Dot = function Dot(props) {
var prefixCls = props.prefixCls,
value = props.value,
style = props.style,
activeStyle = props.activeStyle;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
min = _React$useContext.min,
max = _React$useContext.max,
direction = _React$useContext.direction,
included = _React$useContext.included,
includedStart = _React$useContext.includedStart,
includedEnd = _React$useContext.includedEnd;
var dotClassName = "".concat(prefixCls, "-dot");
var active = included && includedStart <= value && value <= includedEnd;
// ============================ Offset ============================
var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getDirectionStyle(direction, value, min, max)), typeof style === 'function' ? style(value) : style);
if (active) {
mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedStyle), typeof activeStyle === 'function' ? activeStyle(value) : activeStyle);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(dotClassName, (0,defineProperty["default"])({}, "".concat(dotClassName, "-active"), active)),
style: mergedStyle
});
};
/* harmony default export */ var Steps_Dot = (Dot);
;// ./node_modules/rc-slider/es/Steps/index.js
var Steps = function Steps(props) {
var prefixCls = props.prefixCls,
marks = props.marks,
dots = props.dots,
style = props.style,
activeStyle = props.activeStyle;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
min = _React$useContext.min,
max = _React$useContext.max,
step = _React$useContext.step;
var stepDots = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var dotSet = new Set();
// Add marks
marks.forEach(function (mark) {
dotSet.add(mark.value);
});
// Fill dots
if (dots && step !== null) {
var current = min;
while (current <= max) {
dotSet.add(current);
current += step;
}
}
return Array.from(dotSet);
}, [min, max, step, dots, marks]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-step")
}, stepDots.map(function (dotValue) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Steps_Dot, {
prefixCls: prefixCls,
key: dotValue,
value: dotValue,
style: style,
activeStyle: activeStyle
});
}));
};
/* harmony default export */ var es_Steps = (Steps);
;// ./node_modules/rc-slider/es/Tracks/Track.js
var Track_Track = function Track(props) {
var prefixCls = props.prefixCls,
style = props.style,
start = props.start,
end = props.end,
index = props.index,
onStartMove = props.onStartMove,
replaceCls = props.replaceCls;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
direction = _React$useContext.direction,
min = _React$useContext.min,
max = _React$useContext.max,
disabled = _React$useContext.disabled,
range = _React$useContext.range,
classNames = _React$useContext.classNames;
var trackPrefixCls = "".concat(prefixCls, "-track");
var offsetStart = util_getOffset(start, min, max);
var offsetEnd = util_getOffset(end, min, max);
// ============================ Events ============================
var onInternalStartMove = function onInternalStartMove(e) {
if (!disabled && onStartMove) {
onStartMove(e, -1);
}
};
// ============================ Render ============================
var positionStyle = {};
switch (direction) {
case 'rtl':
positionStyle.right = "".concat(offsetStart * 100, "%");
positionStyle.width = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
break;
case 'btt':
positionStyle.bottom = "".concat(offsetStart * 100, "%");
positionStyle.height = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
break;
case 'ttb':
positionStyle.top = "".concat(offsetStart * 100, "%");
positionStyle.height = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
break;
default:
positionStyle.left = "".concat(offsetStart * 100, "%");
positionStyle.width = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
}
var className = replaceCls || classnames_default()(trackPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(trackPrefixCls, "-").concat(index + 1), index !== null && range), "".concat(prefixCls, "-track-draggable"), onStartMove), classNames.track);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, positionStyle), style),
onMouseDown: onInternalStartMove,
onTouchStart: onInternalStartMove
});
};
/* harmony default export */ var Tracks_Track = (Track_Track);
;// ./node_modules/rc-slider/es/Tracks/index.js
var Tracks = function Tracks(props) {
var prefixCls = props.prefixCls,
style = props.style,
values = props.values,
startPoint = props.startPoint,
onStartMove = props.onStartMove;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
included = _React$useContext.included,
range = _React$useContext.range,
min = _React$useContext.min,
styles = _React$useContext.styles,
classNames = _React$useContext.classNames;
// =========================== List ===========================
var trackList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!range) {
// null value do not have track
if (values.length === 0) {
return [];
}
var startValue = startPoint !== null && startPoint !== void 0 ? startPoint : min;
var endValue = values[0];
return [{
start: Math.min(startValue, endValue),
end: Math.max(startValue, endValue)
}];
}
// Multiple
var list = [];
for (var i = 0; i < values.length - 1; i += 1) {
list.push({
start: values[i],
end: values[i + 1]
});
}
return list;
}, [values, range, startPoint, min]);
if (!included) {
return null;
}
// ========================== Render ==========================
var tracksNode = trackList !== null && trackList !== void 0 && trackList.length && (classNames.tracks || styles.tracks) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Tracks_Track, {
index: null,
prefixCls: prefixCls,
start: trackList[0].start,
end: trackList[trackList.length - 1].end,
replaceCls: classnames_default()(classNames.tracks, "".concat(prefixCls, "-tracks")),
style: styles.tracks
}) : null;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, tracksNode, trackList.map(function (_ref, index) {
var start = _ref.start,
end = _ref.end;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Tracks_Track, {
index: index,
prefixCls: prefixCls,
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getIndex(style, index)), styles.track),
start: start,
end: end,
key: index,
onStartMove: onStartMove
});
}));
};
/* harmony default export */ var es_Tracks = (Tracks);
;// ./node_modules/rc-slider/es/hooks/useDrag.js
/** Drag to delete offset. It's a user experience number for dragging out */
var REMOVE_DIST = 130;
function useDrag_getPosition(e) {
var obj = 'targetTouches' in e ? e.targetTouches[0] : e;
return {
pageX: obj.pageX,
pageY: obj.pageY
};
}
function useDrag(containerRef, direction, rawValues, min, max, formatValue, triggerChange, finishChange, offsetValues, editable, minCount) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
draggingValue = _React$useState2[0],
setDraggingValue = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
draggingIndex = _React$useState4[0],
setDraggingIndex = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
draggingDelete = _React$useState6[0],
setDraggingDelete = _React$useState6[1];
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(rawValues),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
cacheValues = _React$useState8[0],
setCacheValues = _React$useState8[1];
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(rawValues),
_React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
originValues = _React$useState10[0],
setOriginValues = _React$useState10[1];
var mouseMoveEventRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var mouseUpEventRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var touchEventTargetRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(UnstableContext),
onDragStart = _React$useContext.onDragStart,
onDragChange = _React$useContext.onDragChange;
(0,useLayoutEffect["default"])(function () {
if (draggingIndex === -1) {
setCacheValues(rawValues);
}
}, [rawValues, draggingIndex]);
// Clean up event
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
document.removeEventListener('mousemove', mouseMoveEventRef.current);
document.removeEventListener('mouseup', mouseUpEventRef.current);
if (touchEventTargetRef.current) {
touchEventTargetRef.current.removeEventListener('touchmove', mouseMoveEventRef.current);
touchEventTargetRef.current.removeEventListener('touchend', mouseUpEventRef.current);
}
};
}, []);
var flushValues = function flushValues(nextValues, nextValue, deleteMark) {
// Perf: Only update state when value changed
if (nextValue !== undefined) {
setDraggingValue(nextValue);
}
setCacheValues(nextValues);
var changeValues = nextValues;
if (deleteMark) {
changeValues = nextValues.filter(function (_, i) {
return i !== draggingIndex;
});
}
triggerChange(changeValues);
if (onDragChange) {
onDragChange({
rawValues: nextValues,
deleteIndex: deleteMark ? draggingIndex : -1,
draggingIndex: draggingIndex,
draggingValue: nextValue
});
}
};
var updateCacheValue = (0,useEvent["default"])(function (valueIndex, offsetPercent, deleteMark) {
if (valueIndex === -1) {
// >>>> Dragging on the track
var startValue = originValues[0];
var endValue = originValues[originValues.length - 1];
var maxStartOffset = min - startValue;
var maxEndOffset = max - endValue;
// Get valid offset
var offset = offsetPercent * (max - min);
offset = Math.max(offset, maxStartOffset);
offset = Math.min(offset, maxEndOffset);
// Use first value to revert back of valid offset (like steps marks)
var formatStartValue = formatValue(startValue + offset);
offset = formatStartValue - startValue;
var cloneCacheValues = originValues.map(function (val) {
return val + offset;
});
flushValues(cloneCacheValues);
} else {
// >>>> Dragging on the handle
var offsetDist = (max - min) * offsetPercent;
// Always start with the valueIndex origin value
var cloneValues = (0,toConsumableArray["default"])(cacheValues);
cloneValues[valueIndex] = originValues[valueIndex];
var next = offsetValues(cloneValues, offsetDist, valueIndex, 'dist');
flushValues(next.values, next.value, deleteMark);
}
});
var onStartMove = function onStartMove(e, valueIndex, startValues) {
e.stopPropagation();
// 如果是点击 track 触发的,需要传入变化后的初始值,而不能直接用 rawValues
var initialValues = startValues || rawValues;
var originValue = initialValues[valueIndex];
setDraggingIndex(valueIndex);
setDraggingValue(originValue);
setOriginValues(initialValues);
setCacheValues(initialValues);
setDraggingDelete(false);
var _getPosition = useDrag_getPosition(e),
startX = _getPosition.pageX,
startY = _getPosition.pageY;
// We declare it here since closure can't get outer latest value
var deleteMark = false;
// Internal trigger event
if (onDragStart) {
onDragStart({
rawValues: initialValues,
draggingIndex: valueIndex,
draggingValue: originValue
});
}
// Moving
var onMouseMove = function onMouseMove(event) {
event.preventDefault();
var _getPosition2 = useDrag_getPosition(event),
moveX = _getPosition2.pageX,
moveY = _getPosition2.pageY;
var offsetX = moveX - startX;
var offsetY = moveY - startY;
var _containerRef$current = containerRef.current.getBoundingClientRect(),
width = _containerRef$current.width,
height = _containerRef$current.height;
var offSetPercent;
var removeDist;
switch (direction) {
case 'btt':
offSetPercent = -offsetY / height;
removeDist = offsetX;
break;
case 'ttb':
offSetPercent = offsetY / height;
removeDist = offsetX;
break;
case 'rtl':
offSetPercent = -offsetX / width;
removeDist = offsetY;
break;
default:
offSetPercent = offsetX / width;
removeDist = offsetY;
}
// Check if need mark remove
deleteMark = editable ? Math.abs(removeDist) > REMOVE_DIST && minCount < cacheValues.length : false;
setDraggingDelete(deleteMark);
updateCacheValue(valueIndex, offSetPercent, deleteMark);
};
// End
var onMouseUp = function onMouseUp(event) {
event.preventDefault();
document.removeEventListener('mouseup', onMouseUp);
document.removeEventListener('mousemove', onMouseMove);
if (touchEventTargetRef.current) {
touchEventTargetRef.current.removeEventListener('touchmove', mouseMoveEventRef.current);
touchEventTargetRef.current.removeEventListener('touchend', mouseUpEventRef.current);
}
mouseMoveEventRef.current = null;
mouseUpEventRef.current = null;
touchEventTargetRef.current = null;
finishChange(deleteMark);
setDraggingIndex(-1);
setDraggingDelete(false);
};
document.addEventListener('mouseup', onMouseUp);
document.addEventListener('mousemove', onMouseMove);
e.currentTarget.addEventListener('touchend', onMouseUp);
e.currentTarget.addEventListener('touchmove', onMouseMove);
mouseMoveEventRef.current = onMouseMove;
mouseUpEventRef.current = onMouseUp;
touchEventTargetRef.current = e.currentTarget;
};
// Only return cache value when it mapping with rawValues
var returnValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var sourceValues = (0,toConsumableArray["default"])(rawValues).sort(function (a, b) {
return a - b;
});
var targetValues = (0,toConsumableArray["default"])(cacheValues).sort(function (a, b) {
return a - b;
});
var counts = {};
targetValues.forEach(function (val) {
counts[val] = (counts[val] || 0) + 1;
});
sourceValues.forEach(function (val) {
counts[val] = (counts[val] || 0) - 1;
});
var maxDiffCount = editable ? 1 : 0;
var diffCount = Object.values(counts).reduce(function (prev, next) {
return prev + Math.abs(next);
}, 0);
return diffCount <= maxDiffCount ? cacheValues : rawValues;
}, [rawValues, cacheValues, editable]);
return [draggingIndex, draggingValue, draggingDelete, returnValues, onStartMove];
}
/* harmony default export */ var hooks_useDrag = (useDrag);
;// ./node_modules/rc-slider/es/hooks/useOffset.js
/** Format the value in the range of [min, max] */
/** Format value align with step */
/** Format value align with step & marks */
function useOffset(min, max, step, markList, allowCross, pushable) {
var formatRangeValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
return Math.max(min, Math.min(max, val));
}, [min, max]);
var formatStepValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
if (step !== null) {
var stepValue = min + Math.round((formatRangeValue(val) - min) / step) * step;
// Cut number in case to be like 0.30000000000000004
var getDecimal = function getDecimal(num) {
return (String(num).split('.')[1] || '').length;
};
var maxDecimal = Math.max(getDecimal(step), getDecimal(max), getDecimal(min));
var fixedValue = Number(stepValue.toFixed(maxDecimal));
return min <= fixedValue && fixedValue <= max ? fixedValue : null;
}
return null;
}, [step, min, max, formatRangeValue]);
var formatValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
var formatNextValue = formatRangeValue(val);
// List align values
var alignValues = markList.map(function (mark) {
return mark.value;
});
if (step !== null) {
alignValues.push(formatStepValue(val));
}
// min & max
alignValues.push(min, max);
// Align with marks
var closeValue = alignValues[0];
var closeDist = max - min;
alignValues.forEach(function (alignValue) {
var dist = Math.abs(formatNextValue - alignValue);
if (dist <= closeDist) {
closeValue = alignValue;
closeDist = dist;
}
});
return closeValue;
}, [min, max, markList, step, formatRangeValue, formatStepValue]);
// ========================== Offset ==========================
// Single Value
var offsetValue = function offsetValue(values, offset, valueIndex) {
var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
if (typeof offset === 'number') {
var nextValue;
var originValue = values[valueIndex];
// Only used for `dist` mode
var targetDistValue = originValue + offset;
// Compare next step value & mark value which is best match
var potentialValues = [];
markList.forEach(function (mark) {
potentialValues.push(mark.value);
});
// Min & Max
potentialValues.push(min, max);
// In case origin value is align with mark but not with step
potentialValues.push(formatStepValue(originValue));
// Put offset step value also
var sign = offset > 0 ? 1 : -1;
if (mode === 'unit') {
potentialValues.push(formatStepValue(originValue + sign * step));
} else {
potentialValues.push(formatStepValue(targetDistValue));
}
// Find close one
potentialValues = potentialValues.filter(function (val) {
return val !== null;
})
// Remove reverse value
.filter(function (val) {
return offset < 0 ? val <= originValue : val >= originValue;
});
if (mode === 'unit') {
// `unit` mode can not contain itself
potentialValues = potentialValues.filter(function (val) {
return val !== originValue;
});
}
var compareValue = mode === 'unit' ? originValue : targetDistValue;
nextValue = potentialValues[0];
var valueDist = Math.abs(nextValue - compareValue);
potentialValues.forEach(function (potentialValue) {
var dist = Math.abs(potentialValue - compareValue);
if (dist < valueDist) {
nextValue = potentialValue;
valueDist = dist;
}
});
// Out of range will back to range
if (nextValue === undefined) {
return offset < 0 ? min : max;
}
// `dist` mode
if (mode === 'dist') {
return nextValue;
}
// `unit` mode may need another round
if (Math.abs(offset) > 1) {
var cloneValues = (0,toConsumableArray["default"])(values);
cloneValues[valueIndex] = nextValue;
return offsetValue(cloneValues, offset - sign, valueIndex, mode);
}
return nextValue;
} else if (offset === 'min') {
return min;
} else if (offset === 'max') {
return max;
}
};
/** Same as `offsetValue` but return `changed` mark to tell value changed */
var offsetChangedValue = function offsetChangedValue(values, offset, valueIndex) {
var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
var originValue = values[valueIndex];
var nextValue = offsetValue(values, offset, valueIndex, mode);
return {
value: nextValue,
changed: nextValue !== originValue
};
};
var needPush = function needPush(dist) {
return pushable === null && dist === 0 || typeof pushable === 'number' && dist < pushable;
};
// Values
var offsetValues = function offsetValues(values, offset, valueIndex) {
var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
var nextValues = values.map(formatValue);
var originValue = nextValues[valueIndex];
var nextValue = offsetValue(nextValues, offset, valueIndex, mode);
nextValues[valueIndex] = nextValue;
if (allowCross === false) {
// >>>>> Allow Cross
var pushNum = pushable || 0;
// ============ AllowCross ===============
if (valueIndex > 0 && nextValues[valueIndex - 1] !== originValue) {
nextValues[valueIndex] = Math.max(nextValues[valueIndex], nextValues[valueIndex - 1] + pushNum);
}
if (valueIndex < nextValues.length - 1 && nextValues[valueIndex + 1] !== originValue) {
nextValues[valueIndex] = Math.min(nextValues[valueIndex], nextValues[valueIndex + 1] - pushNum);
}
} else if (typeof pushable === 'number' || pushable === null) {
// >>>>> Pushable
// =============== Push ==================
// >>>>>> Basic push
// End values
for (var i = valueIndex + 1; i < nextValues.length; i += 1) {
var changed = true;
while (needPush(nextValues[i] - nextValues[i - 1]) && changed) {
var _offsetChangedValue = offsetChangedValue(nextValues, 1, i);
nextValues[i] = _offsetChangedValue.value;
changed = _offsetChangedValue.changed;
}
}
// Start values
for (var _i = valueIndex; _i > 0; _i -= 1) {
var _changed = true;
while (needPush(nextValues[_i] - nextValues[_i - 1]) && _changed) {
var _offsetChangedValue2 = offsetChangedValue(nextValues, -1, _i - 1);
nextValues[_i - 1] = _offsetChangedValue2.value;
_changed = _offsetChangedValue2.changed;
}
}
// >>>>> Revert back to safe push range
// End to Start
for (var _i2 = nextValues.length - 1; _i2 > 0; _i2 -= 1) {
var _changed2 = true;
while (needPush(nextValues[_i2] - nextValues[_i2 - 1]) && _changed2) {
var _offsetChangedValue3 = offsetChangedValue(nextValues, -1, _i2 - 1);
nextValues[_i2 - 1] = _offsetChangedValue3.value;
_changed2 = _offsetChangedValue3.changed;
}
}
// Start to End
for (var _i3 = 0; _i3 < nextValues.length - 1; _i3 += 1) {
var _changed3 = true;
while (needPush(nextValues[_i3 + 1] - nextValues[_i3]) && _changed3) {
var _offsetChangedValue4 = offsetChangedValue(nextValues, 1, _i3 + 1);
nextValues[_i3 + 1] = _offsetChangedValue4.value;
_changed3 = _offsetChangedValue4.changed;
}
}
}
return {
value: nextValues[valueIndex],
values: nextValues
};
};
return [formatValue, offsetValues];
}
;// ./node_modules/rc-slider/es/hooks/useRange.js
function useRange(range) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
if (range === true || !range) {
return [!!range, false, false, 0];
}
var editable = range.editable,
draggableTrack = range.draggableTrack,
minCount = range.minCount,
maxCount = range.maxCount;
if (true) {
(0,warning.warning)(!editable || !draggableTrack, '`editable` can not work with `draggableTrack`.');
}
return [true, editable, !editable && draggableTrack, minCount || 0, maxCount];
}, [range]);
}
;// ./node_modules/rc-slider/es/Slider.js
/**
* New:
* - click mark to update range value
* - handleRender
* - Fix handle with count not correct
* - Fix pushable not work in some case
* - No more FindDOMNode
* - Move all position related style into inline style
* - Key: up is plus, down is minus
* - fix Key with step = null not align with marks
* - Change range should not trigger onChange
* - keyboard support pushable
*/
var Slider_Slider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-slider' : _props$prefixCls,
className = props.className,
style = props.style,
classNames = props.classNames,
styles = props.styles,
id = props.id,
_props$disabled = props.disabled,
disabled = _props$disabled === void 0 ? false : _props$disabled,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
autoFocus = props.autoFocus,
onFocus = props.onFocus,
onBlur = props.onBlur,
_props$min = props.min,
min = _props$min === void 0 ? 0 : _props$min,
_props$max = props.max,
max = _props$max === void 0 ? 100 : _props$max,
_props$step = props.step,
step = _props$step === void 0 ? 1 : _props$step,
value = props.value,
defaultValue = props.defaultValue,
range = props.range,
count = props.count,
onChange = props.onChange,
onBeforeChange = props.onBeforeChange,
onAfterChange = props.onAfterChange,
onChangeComplete = props.onChangeComplete,
_props$allowCross = props.allowCross,
allowCross = _props$allowCross === void 0 ? true : _props$allowCross,
_props$pushable = props.pushable,
pushable = _props$pushable === void 0 ? false : _props$pushable,
reverse = props.reverse,
vertical = props.vertical,
_props$included = props.included,
included = _props$included === void 0 ? true : _props$included,
startPoint = props.startPoint,
trackStyle = props.trackStyle,
handleStyle = props.handleStyle,
railStyle = props.railStyle,
dotStyle = props.dotStyle,
activeDotStyle = props.activeDotStyle,
marks = props.marks,
dots = props.dots,
handleRender = props.handleRender,
activeHandleRender = props.activeHandleRender,
track = props.track,
_props$tabIndex = props.tabIndex,
tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
ariaLabelForHandle = props.ariaLabelForHandle,
ariaLabelledByForHandle = props.ariaLabelledByForHandle,
ariaRequired = props.ariaRequired,
ariaValueTextFormatterForHandle = props.ariaValueTextFormatterForHandle;
var handlesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var direction = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (vertical) {
return reverse ? 'ttb' : 'btt';
}
return reverse ? 'rtl' : 'ltr';
}, [reverse, vertical]);
// ============================ Range =============================
var _useRange = useRange(range),
_useRange2 = (0,slicedToArray["default"])(_useRange, 5),
rangeEnabled = _useRange2[0],
rangeEditable = _useRange2[1],
rangeDraggableTrack = _useRange2[2],
minCount = _useRange2[3],
maxCount = _useRange2[4];
var mergedMin = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return isFinite(min) ? min : 0;
}, [min]);
var mergedMax = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return isFinite(max) ? max : 100;
}, [max]);
// ============================= Step =============================
var mergedStep = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return step !== null && step <= 0 ? 1 : step;
}, [step]);
// ============================= Push =============================
var mergedPush = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (typeof pushable === 'boolean') {
return pushable ? mergedStep : false;
}
return pushable >= 0 ? pushable : false;
}, [pushable, mergedStep]);
// ============================ Marks =============================
var markList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return Object.keys(marks || {}).map(function (key) {
var mark = marks[key];
var markObj = {
value: Number(key)
};
if (mark && (0,esm_typeof["default"])(mark) === 'object' && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mark) && ('label' in mark || 'style' in mark)) {
markObj.style = mark.style;
markObj.label = mark.label;
} else {
markObj.label = mark;
}
return markObj;
}).filter(function (_ref) {
var label = _ref.label;
return label || typeof label === 'number';
}).sort(function (a, b) {
return a.value - b.value;
});
}, [marks]);
// ============================ Format ============================
var _useOffset = useOffset(mergedMin, mergedMax, mergedStep, markList, allowCross, mergedPush),
_useOffset2 = (0,slicedToArray["default"])(_useOffset, 2),
formatValue = _useOffset2[0],
offsetValues = _useOffset2[1];
// ============================ Values ============================
var _useMergedState = (0,useMergedState["default"])(defaultValue, {
value: value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedValue = _useMergedState2[0],
setValue = _useMergedState2[1];
var rawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var valueList = mergedValue === null || mergedValue === undefined ? [] : Array.isArray(mergedValue) ? mergedValue : [mergedValue];
var _valueList = (0,slicedToArray["default"])(valueList, 1),
_valueList$ = _valueList[0],
val0 = _valueList$ === void 0 ? mergedMin : _valueList$;
var returnValues = mergedValue === null ? [] : [val0];
// Format as range
if (rangeEnabled) {
returnValues = (0,toConsumableArray["default"])(valueList);
// When count provided or value is `undefined`, we fill values
if (count || mergedValue === undefined) {
var pointCount = count >= 0 ? count + 1 : 2;
returnValues = returnValues.slice(0, pointCount);
// Fill with count
while (returnValues.length < pointCount) {
var _returnValues;
returnValues.push((_returnValues = returnValues[returnValues.length - 1]) !== null && _returnValues !== void 0 ? _returnValues : mergedMin);
}
}
returnValues.sort(function (a, b) {
return a - b;
});
}
// Align in range
returnValues.forEach(function (val, index) {
returnValues[index] = formatValue(val);
});
return returnValues;
}, [mergedValue, rangeEnabled, mergedMin, count, formatValue]);
// =========================== onChange ===========================
var getTriggerValue = function getTriggerValue(triggerValues) {
return rangeEnabled ? triggerValues : triggerValues[0];
};
var triggerChange = (0,useEvent["default"])(function (nextValues) {
// Order first
var cloneNextValues = (0,toConsumableArray["default"])(nextValues).sort(function (a, b) {
return a - b;
});
// Trigger event if needed
if (onChange && !(0,isEqual["default"])(cloneNextValues, rawValues, true)) {
onChange(getTriggerValue(cloneNextValues));
}
// We set this later since it will re-render component immediately
setValue(cloneNextValues);
});
var finishChange = (0,useEvent["default"])(function (draggingDelete) {
// Trigger from `useDrag` will tell if it's a delete action
if (draggingDelete) {
handlesRef.current.hideHelp();
}
var finishValue = getTriggerValue(rawValues);
onAfterChange === null || onAfterChange === void 0 || onAfterChange(finishValue);
(0,warning["default"])(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');
onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(finishValue);
});
var onDelete = function onDelete(index) {
if (disabled || !rangeEditable || rawValues.length <= minCount) {
return;
}
var cloneNextValues = (0,toConsumableArray["default"])(rawValues);
cloneNextValues.splice(index, 1);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(cloneNextValues));
triggerChange(cloneNextValues);
var nextFocusIndex = Math.max(0, index - 1);
handlesRef.current.hideHelp();
handlesRef.current.focus(nextFocusIndex);
};
var _useDrag = hooks_useDrag(containerRef, direction, rawValues, mergedMin, mergedMax, formatValue, triggerChange, finishChange, offsetValues, rangeEditable, minCount),
_useDrag2 = (0,slicedToArray["default"])(_useDrag, 5),
draggingIndex = _useDrag2[0],
draggingValue = _useDrag2[1],
draggingDelete = _useDrag2[2],
cacheValues = _useDrag2[3],
onStartDrag = _useDrag2[4];
/**
* When `rangeEditable` will insert a new value in the values array.
* Else it will replace the value in the values array.
*/
var changeToCloseValue = function changeToCloseValue(newValue, e) {
if (!disabled) {
// Create new values
var cloneNextValues = (0,toConsumableArray["default"])(rawValues);
var valueIndex = 0;
var valueBeforeIndex = 0; // Record the index which value < newValue
var valueDist = mergedMax - mergedMin;
rawValues.forEach(function (val, index) {
var dist = Math.abs(newValue - val);
if (dist <= valueDist) {
valueDist = dist;
valueIndex = index;
}
if (val < newValue) {
valueBeforeIndex = index;
}
});
var focusIndex = valueIndex;
if (rangeEditable && valueDist !== 0 && (!maxCount || rawValues.length < maxCount)) {
cloneNextValues.splice(valueBeforeIndex + 1, 0, newValue);
focusIndex = valueBeforeIndex + 1;
} else {
cloneNextValues[valueIndex] = newValue;
}
// Fill value to match default 2 (only when `rawValues` is empty)
if (rangeEnabled && !rawValues.length && count === undefined) {
cloneNextValues.push(newValue);
}
var nextValue = getTriggerValue(cloneNextValues);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(nextValue);
triggerChange(cloneNextValues);
if (e) {
var _document$activeEleme, _document$activeEleme2;
(_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || (_document$activeEleme2 = _document$activeEleme.blur) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.call(_document$activeEleme);
handlesRef.current.focus(focusIndex);
onStartDrag(e, focusIndex, cloneNextValues);
} else {
// https://github.com/ant-design/ant-design/issues/49997
onAfterChange === null || onAfterChange === void 0 || onAfterChange(nextValue);
(0,warning["default"])(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');
onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(nextValue);
}
}
};
// ============================ Click =============================
var onSliderMouseDown = function onSliderMouseDown(e) {
e.preventDefault();
var _containerRef$current = containerRef.current.getBoundingClientRect(),
width = _containerRef$current.width,
height = _containerRef$current.height,
left = _containerRef$current.left,
top = _containerRef$current.top,
bottom = _containerRef$current.bottom,
right = _containerRef$current.right;
var clientX = e.clientX,
clientY = e.clientY;
var percent;
switch (direction) {
case 'btt':
percent = (bottom - clientY) / height;
break;
case 'ttb':
percent = (clientY - top) / height;
break;
case 'rtl':
percent = (right - clientX) / width;
break;
default:
percent = (clientX - left) / width;
}
var nextValue = mergedMin + percent * (mergedMax - mergedMin);
changeToCloseValue(formatValue(nextValue), e);
};
// =========================== Keyboard ===========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
keyboardValue = _React$useState2[0],
setKeyboardValue = _React$useState2[1];
var onHandleOffsetChange = function onHandleOffsetChange(offset, valueIndex) {
if (!disabled) {
var next = offsetValues(rawValues, offset, valueIndex);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));
triggerChange(next.values);
setKeyboardValue(next.value);
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (keyboardValue !== null) {
var valueIndex = rawValues.indexOf(keyboardValue);
if (valueIndex >= 0) {
handlesRef.current.focus(valueIndex);
}
}
setKeyboardValue(null);
}, [keyboardValue]);
// ============================= Drag =============================
var mergedDraggableTrack = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (rangeDraggableTrack && mergedStep === null) {
if (true) {
(0,warning["default"])(false, '`draggableTrack` is not supported when `step` is `null`.');
}
return false;
}
return rangeDraggableTrack;
}, [rangeDraggableTrack, mergedStep]);
var onStartMove = (0,useEvent["default"])(function (e, valueIndex) {
onStartDrag(e, valueIndex);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));
});
// Auto focus for updated handle
var dragging = draggingIndex !== -1;
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!dragging) {
var valueIndex = rawValues.lastIndexOf(draggingValue);
handlesRef.current.focus(valueIndex);
}
}, [dragging]);
// =========================== Included ===========================
var sortedCacheValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return (0,toConsumableArray["default"])(cacheValues).sort(function (a, b) {
return a - b;
});
}, [cacheValues]);
// Provide a range values with included [min, max]
// Used for Track, Mark & Dot
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!rangeEnabled) {
return [mergedMin, sortedCacheValues[0]];
}
return [sortedCacheValues[0], sortedCacheValues[sortedCacheValues.length - 1]];
}, [sortedCacheValues, rangeEnabled, mergedMin]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
includedStart = _React$useMemo2[0],
includedEnd = _React$useMemo2[1];
// ============================= Refs =============================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
focus: function focus() {
handlesRef.current.focus(0);
},
blur: function blur() {
var _containerRef$current2;
var _document = document,
activeElement = _document.activeElement;
if ((_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(activeElement)) {
activeElement === null || activeElement === void 0 || activeElement.blur();
}
}
};
});
// ========================== Auto Focus ==========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (autoFocus) {
handlesRef.current.focus(0);
}
}, []);
// =========================== Context ============================
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
min: mergedMin,
max: mergedMax,
direction: direction,
disabled: disabled,
keyboard: keyboard,
step: mergedStep,
included: included,
includedStart: includedStart,
includedEnd: includedEnd,
range: rangeEnabled,
tabIndex: tabIndex,
ariaLabelForHandle: ariaLabelForHandle,
ariaLabelledByForHandle: ariaLabelledByForHandle,
ariaRequired: ariaRequired,
ariaValueTextFormatterForHandle: ariaValueTextFormatterForHandle,
styles: styles || {},
classNames: classNames || {}
};
}, [mergedMin, mergedMax, direction, disabled, keyboard, mergedStep, included, includedStart, includedEnd, rangeEnabled, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaRequired, ariaValueTextFormatterForHandle, styles, classNames]);
// ============================ Render ============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_slider_es_context.Provider, {
value: context
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: containerRef,
className: classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-vertical"), vertical), "".concat(prefixCls, "-horizontal"), !vertical), "".concat(prefixCls, "-with-marks"), markList.length)),
style: style,
onMouseDown: onSliderMouseDown,
id: id
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-rail"), classNames === null || classNames === void 0 ? void 0 : classNames.rail),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, railStyle), styles === null || styles === void 0 ? void 0 : styles.rail)
}), track !== false && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Tracks, {
prefixCls: prefixCls,
style: trackStyle,
values: rawValues,
startPoint: startPoint,
onStartMove: mergedDraggableTrack ? onStartMove : undefined
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Steps, {
prefixCls: prefixCls,
marks: markList,
dots: dots,
style: dotStyle,
activeStyle: activeDotStyle
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Handles, {
ref: handlesRef,
prefixCls: prefixCls,
style: handleStyle,
values: cacheValues,
draggingIndex: draggingIndex,
draggingDelete: draggingDelete,
onStartMove: onStartMove,
onOffsetChange: onHandleOffsetChange,
onFocus: onFocus,
onBlur: onBlur,
handleRender: handleRender,
activeHandleRender: activeHandleRender,
onChangeComplete: finishChange,
onDelete: rangeEditable ? onDelete : undefined
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Marks, {
prefixCls: prefixCls,
marks: markList,
onClick: changeToCloseValue
})));
});
if (true) {
Slider_Slider.displayName = 'Slider';
}
/* harmony default export */ var es_Slider = (Slider_Slider);
;// ./node_modules/rc-slider/es/index.js
/* harmony default export */ var rc_slider_es = (es_Slider);
;// ./components/slider/Context.ts
/** @private Internal context. Do not use in your production. */
const SliderInternalContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
/* harmony default export */ var slider_Context = (SliderInternalContext);
;// ./components/slider/SliderTooltip.tsx
const SliderTooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
open,
draggingDelete
} = props;
const innerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
const mergedOpen = open && !draggingDelete;
const rafRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
function cancelKeepAlign() {
raf["default"].cancel(rafRef.current);
rafRef.current = null;
}
function keepAlign() {
rafRef.current = (0,raf["default"])(() => {
var _a;
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.forceAlign();
rafRef.current = null;
});
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (mergedOpen) {
keepAlign();
} else {
cancelKeepAlign();
}
return cancelKeepAlign;
}, [mergedOpen, props.title]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({
ref: (0,es_ref.composeRef)(innerRef, ref)
}, props, {
open: mergedOpen
}));
});
if (true) {
SliderTooltip.displayName = 'SliderTooltip';
}
/* harmony default export */ var slider_SliderTooltip = (SliderTooltip);
// EXTERNAL MODULE: ./components/slider/style/index.ts
var slider_style = __webpack_require__("./components/slider/style/index.ts");
;// ./components/slider/useRafLock.ts
function useRafLock() {
const [state, setState] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const cleanup = () => {
raf["default"].cancel(rafRef.current);
};
const setDelayState = nextState => {
cleanup();
if (nextState) {
setState(nextState);
} else {
rafRef.current = (0,raf["default"])(() => {
setState(nextState);
});
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => cleanup, []);
return [state, setDelayState];
}
;// ./components/slider/index.tsx
var slider_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 getTipFormatter(tipFormatter, legacyTipFormatter) {
if (tipFormatter || tipFormatter === null) {
return tipFormatter;
}
if (legacyTipFormatter || legacyTipFormatter === null) {
return legacyTipFormatter;
}
return val => typeof val === 'number' ? val.toString() : '';
}
const slider_Slider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
range,
className,
rootClassName,
style,
disabled,
// Deprecated Props
tooltipPrefixCls: legacyTooltipPrefixCls,
tipFormatter: legacyTipFormatter,
tooltipVisible: legacyTooltipVisible,
getTooltipPopupContainer: legacyGetTooltipPopupContainer,
tooltipPlacement: legacyTooltipPlacement,
tooltip = {},
onChangeComplete,
classNames: sliderClassNames,
styles
} = props,
restProps = slider_rest(props, ["prefixCls", "range", "className", "rootClassName", "style", "disabled", "tooltipPrefixCls", "tipFormatter", "tooltipVisible", "getTooltipPopupContainer", "tooltipPlacement", "tooltip", "onChangeComplete", "classNames", "styles"]);
const {
vertical
} = props;
const {
getPrefixCls,
direction: contextDirection,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles,
getPopupContainer
} = (0,config_provider_context.useComponentConfig)('slider');
const contextDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_DisabledContext);
const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;
// ============================= Context ==============================
const {
handleRender: contextHandleRender,
direction: internalContextDirection
} = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(slider_Context);
const mergedDirection = internalContextDirection || contextDirection;
const isRTL = mergedDirection === 'rtl';
// =============================== Open ===============================
const [hoverOpen, setHoverOpen] = useRafLock();
const [focusOpen, setFocusOpen] = useRafLock();
const tooltipProps = Object.assign({}, tooltip);
const {
open: tooltipOpen,
placement: tooltipPlacement,
getPopupContainer: getTooltipPopupContainer,
prefixCls: customizeTooltipPrefixCls,
formatter: tipFormatter
} = tooltipProps;
const lockOpen = tooltipOpen !== null && tooltipOpen !== void 0 ? tooltipOpen : legacyTooltipVisible;
const activeOpen = (hoverOpen || focusOpen) && lockOpen !== false;
const mergedTipFormatter = getTipFormatter(tipFormatter, legacyTipFormatter);
// ============================= Change ==============================
const [dragging, setDragging] = useRafLock();
const onInternalChangeComplete = nextValues => {
onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(nextValues);
setDragging(false);
};
// ============================ Placement ============================
const getTooltipPlacement = (placement, vert) => {
if (placement) {
return placement;
}
if (!vert) {
return 'top';
}
return isRTL ? 'left' : 'right';
};
// ============================== Style ===============================
const prefixCls = getPrefixCls('slider', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,slider_style["default"])(prefixCls);
const rootClassNames = classnames_default()(className, contextClassName, contextClassNames.root, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.root, rootClassName, {
[`${prefixCls}-rtl`]: isRTL,
[`${prefixCls}-lock`]: dragging
}, hashId, cssVarCls);
// make reverse default on rtl direction
if (isRTL && !restProps.vertical) {
restProps.reverse = !restProps.reverse;
}
// ============================= Warning ==============================
// Warning for deprecated usage
if (true) {
const warning = (0,_util_warning.devUseWarning)('Slider');
[['tooltipPrefixCls', 'prefixCls'], ['getTooltipPopupContainer', 'getPopupContainer'], ['tipFormatter', 'formatter'], ['tooltipPlacement', 'placement'], ['tooltipVisible', 'open']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, `tooltip.${newName}`);
});
}
// ============================== Handle ==============================
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
const onMouseUp = () => {
// Delay for 1 frame to make the click to enable hide tooltip
// even when the handle is focused
(0,raf["default"])(() => {
setFocusOpen(false);
}, 1);
};
document.addEventListener('mouseup', onMouseUp);
return () => {
document.removeEventListener('mouseup', onMouseUp);
};
}, []);
const useActiveTooltipHandle = range && !lockOpen;
const handleRender = contextHandleRender || ((node, info) => {
const {
index
} = info;
const nodeProps = node.props;
function proxyEvent(eventName, event, triggerRestPropsEvent) {
var _a, _b, _c, _d;
if (triggerRestPropsEvent) {
(_b = (_a = restProps)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, event);
}
(_d = (_c = nodeProps)[eventName]) === null || _d === void 0 ? void 0 : _d.call(_c, event);
}
const passedProps = Object.assign(Object.assign({}, nodeProps), {
onMouseEnter: e => {
setHoverOpen(true);
proxyEvent('onMouseEnter', e);
},
onMouseLeave: e => {
setHoverOpen(false);
proxyEvent('onMouseLeave', e);
},
onMouseDown: e => {
setFocusOpen(true);
setDragging(true);
proxyEvent('onMouseDown', e);
},
onFocus: e => {
var _a;
setFocusOpen(true);
(_a = restProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(restProps, e);
proxyEvent('onFocus', e, true);
},
onBlur: e => {
var _a;
setFocusOpen(false);
(_a = restProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(restProps, e);
proxyEvent('onBlur', e, true);
}
});
const cloneNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(node, passedProps);
const open = (!!lockOpen || activeOpen) && mergedTipFormatter !== null;
// Wrap on handle with Tooltip when is single mode or multiple with all show tooltip
if (!useActiveTooltipHandle) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(slider_SliderTooltip, Object.assign({}, tooltipProps, {
prefixCls: getPrefixCls('tooltip', customizeTooltipPrefixCls !== null && customizeTooltipPrefixCls !== void 0 ? customizeTooltipPrefixCls : legacyTooltipPrefixCls),
title: mergedTipFormatter ? mergedTipFormatter(info.value) : '',
open: open,
placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),
key: index,
classNames: {
root: `${prefixCls}-tooltip`
},
getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer
}), cloneNode);
}
return cloneNode;
});
// ========================== Active Handle ===========================
const activeHandleRender = useActiveTooltipHandle ? (handle, info) => {
const cloneNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(handle, {
style: Object.assign(Object.assign({}, handle.props.style), {
visibility: 'hidden'
})
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(slider_SliderTooltip, Object.assign({}, tooltipProps, {
prefixCls: getPrefixCls('tooltip', customizeTooltipPrefixCls !== null && customizeTooltipPrefixCls !== void 0 ? customizeTooltipPrefixCls : legacyTooltipPrefixCls),
title: mergedTipFormatter ? mergedTipFormatter(info.value) : '',
open: mergedTipFormatter !== null && activeOpen,
placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),
key: "tooltip",
classNames: {
root: `${prefixCls}-tooltip`
},
getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer,
draggingDelete: info.draggingDelete
}), cloneNode);
} : undefined;
// ============================== Render ==============================
const rootStyle = Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), styles === null || styles === void 0 ? void 0 : styles.root), style);
const mergedTracks = Object.assign(Object.assign({}, contextStyles.tracks), styles === null || styles === void 0 ? void 0 : styles.tracks);
const mergedTracksClassNames = classnames_default()(contextClassNames.tracks, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.tracks);
return wrapCSSVar(
/*#__PURE__*/
// @ts-ignore
external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_slider_es, Object.assign({}, restProps, {
classNames: Object.assign({
handle: classnames_default()(contextClassNames.handle, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.handle),
rail: classnames_default()(contextClassNames.rail, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.rail),
track: classnames_default()(contextClassNames.track, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.track)
}, mergedTracksClassNames ? {
tracks: mergedTracksClassNames
} : {}),
styles: Object.assign({
handle: Object.assign(Object.assign({}, contextStyles.handle), styles === null || styles === void 0 ? void 0 : styles.handle),
rail: Object.assign(Object.assign({}, contextStyles.rail), styles === null || styles === void 0 ? void 0 : styles.rail),
track: Object.assign(Object.assign({}, contextStyles.track), styles === null || styles === void 0 ? void 0 : styles.track)
}, Object.keys(mergedTracks).length ? {
tracks: mergedTracks
} : {}),
step: restProps.step,
range: range,
className: rootClassNames,
style: rootStyle,
disabled: mergedDisabled,
ref: ref,
prefixCls: prefixCls,
handleRender: handleRender,
activeHandleRender: activeHandleRender,
onChangeComplete: onInternalChangeComplete
})));
});
if (true) {
slider_Slider.displayName = 'Slider';
}
/* harmony default export */ var slider = (slider_Slider);
;// ./components/color-picker/components/ColorSlider.tsx
var ColorSlider_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;
};
const GradientColorSlider = props => {
const {
prefixCls,
colors,
type,
color,
range = false,
className,
activeIndex,
onActive,
onDragStart,
onDragChange,
onKeyDelete
} = props,
restProps = ColorSlider_rest(props, ["prefixCls", "colors", "type", "color", "range", "className", "activeIndex", "onActive", "onDragStart", "onDragChange", "onKeyDelete"]);
const sliderProps = Object.assign(Object.assign({}, restProps), {
track: false
});
// ========================== Background ==========================
const linearCss = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const colorsStr = colors.map(c => `${c.color} ${c.percent}%`).join(', ');
return `linear-gradient(90deg, ${colorsStr})`;
}, [colors]);
const pointColor = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!color || !type) {
return null;
}
if (type === 'alpha') {
return color.toRgbString();
}
return `hsl(${color.toHsb().h}, 100%, 50%)`;
}, [color, type]);
// ======================= Context: Slider ========================
const onInternalDragStart = (0,useEvent["default"])(onDragStart);
const onInternalDragChange = (0,useEvent["default"])(onDragChange);
const unstableContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
onDragStart: onInternalDragStart,
onDragChange: onInternalDragChange
}), []);
// ======================= Context: Render ========================
const handleRender = (0,useEvent["default"])((ori, info) => {
const {
onFocus,
style,
className: handleCls,
onKeyDown
} = ori.props;
// Point Color
const mergedStyle = Object.assign({}, style);
if (type === 'gradient') {
mergedStyle.background = (0,util.getGradientPercentColor)(colors, info.value);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(ori, {
onFocus: e => {
onActive === null || onActive === void 0 ? void 0 : onActive(info.index);
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
},
style: mergedStyle,
className: classnames_default()(handleCls, {
[`${prefixCls}-slider-handle-active`]: activeIndex === info.index
}),
onKeyDown: e => {
if ((e.key === 'Delete' || e.key === 'Backspace') && onKeyDelete) {
onKeyDelete(info.index);
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
}
});
});
const sliderContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
direction: 'ltr',
handleRender
}), []);
// ============================ Render ============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(slider_Context.Provider, {
value: sliderContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UnstableContext.Provider, {
value: unstableContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(slider, Object.assign({}, sliderProps, {
className: classnames_default()(className, `${prefixCls}-slider`),
tooltip: {
open: false
},
range: {
editable: range,
minCount: 2
},
styles: {
rail: {
background: linearCss
},
handle: pointColor ? {
background: pointColor
} : {}
},
classNames: {
rail: `${prefixCls}-slider-rail`,
handle: `${prefixCls}-slider-handle`
}
}))));
};
const SingleColorSlider = props => {
const {
value,
onChange,
onChangeComplete
} = props;
const singleOnChange = v => onChange(v[0]);
const singleOnChangeComplete = v => onChangeComplete(v[0]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GradientColorSlider, Object.assign({}, props, {
value: [value],
onChange: singleOnChange,
onChangeComplete: singleOnChangeComplete
}));
};
/* harmony default export */ var ColorSlider = (SingleColorSlider);
;// ./components/color-picker/components/PanelPicker/GradientColorBar.tsx
function sortColors(colors) {
return (0,toConsumableArray["default"])(colors).sort((a, b) => a.percent - b.percent);
}
/**
* GradientColorBar will auto show when the mode is `gradient`.
*/
const GradientColorBar = props => {
const {
prefixCls,
mode,
onChange,
onChangeComplete,
onActive,
activeIndex,
onGradientDragging,
colors
} = props;
const isGradient = mode === 'gradient';
// ============================= Colors =============================
const colorList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => colors.map(info => ({
percent: info.percent,
color: info.color.toRgbString()
})), [colors]);
const values = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => colorList.map(info => info.percent), [colorList]);
// ============================== Drag ==============================
const colorsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(colorList);
// Record current colors
const onDragStart = _ref => {
let {
rawValues,
draggingIndex,
draggingValue
} = _ref;
if (rawValues.length > colorList.length) {
// Add new node
const newPointColor = (0,util.getGradientPercentColor)(colorList, draggingValue);
const nextColors = (0,toConsumableArray["default"])(colorList);
nextColors.splice(draggingIndex, 0, {
percent: draggingValue,
color: newPointColor
});
colorsRef.current = nextColors;
} else {
colorsRef.current = colorList;
}
onGradientDragging(true);
onChange(new color.AggregationColor(sortColors(colorsRef.current)), true);
};
// Adjust color when dragging
const onDragChange = _ref2 => {
let {
deleteIndex,
draggingIndex,
draggingValue
} = _ref2;
let nextColors = (0,toConsumableArray["default"])(colorsRef.current);
if (deleteIndex !== -1) {
nextColors.splice(deleteIndex, 1);
} else {
nextColors[draggingIndex] = Object.assign(Object.assign({}, nextColors[draggingIndex]), {
percent: draggingValue
});
nextColors = sortColors(nextColors);
}
onChange(new color.AggregationColor(nextColors), true);
};
// ============================== Key ===============================
const onKeyDelete = index => {
const nextColors = (0,toConsumableArray["default"])(colorList);
nextColors.splice(index, 1);
const nextColor = new color.AggregationColor(nextColors);
onChange(nextColor);
onChangeComplete(nextColor);
};
// ============================= Change =============================
const onInternalChangeComplete = nextValues => {
onChangeComplete(new color.AggregationColor(colorList));
// Reset `activeIndex` if out of range
if (activeIndex >= nextValues.length) {
onActive(nextValues.length - 1);
}
onGradientDragging(false);
};
// ============================= Render =============================
if (!isGradient) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GradientColorSlider, {
min: 0,
max: 100,
prefixCls: prefixCls,
className: `${prefixCls}-gradient-slider`,
colors: colorList,
color: null,
value: values,
range: true,
onChangeComplete: onInternalChangeComplete,
disabled: false,
type: "gradient",
// Active
activeIndex: activeIndex,
onActive: onActive,
// Drag
onDragStart: onDragStart,
onDragChange: onDragChange,
onKeyDelete: onKeyDelete
});
};
/* harmony default export */ var PanelPicker_GradientColorBar = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(GradientColorBar));
;// ./components/color-picker/components/PanelPicker/index.tsx
var PanelPicker_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;
};
const components = {
slider: ColorSlider
};
const PanelPicker = () => {
const panelPickerContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PanelPickerContext);
const {
mode,
onModeChange,
modeOptions,
prefixCls,
allowClear,
value,
disabledAlpha,
onChange,
onClear,
onChangeComplete,
activeIndex,
gradientDragging
} = panelPickerContext,
injectProps = PanelPicker_rest(panelPickerContext, ["mode", "onModeChange", "modeOptions", "prefixCls", "allowClear", "value", "disabledAlpha", "onChange", "onClear", "onChangeComplete", "activeIndex", "gradientDragging"]);
// ============================ Colors ============================
const colors = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
if (!value.cleared) {
return value.getColors();
}
return [{
percent: 0,
color: new color.AggregationColor('')
}, {
percent: 100,
color: new color.AggregationColor('')
}];
}, [value]);
// ========================= Single Color =========================
const isSingle = !value.isGradient();
// We cache the point color in case user drag the gradient point across another one
const [lockedColor, setLockedColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(value);
// Use layout effect here since `useEffect` will cause a blink when mouseDown
(0,useLayoutEffect["default"])(() => {
var _a;
if (!isSingle) {
setLockedColor((_a = colors[activeIndex]) === null || _a === void 0 ? void 0 : _a.color);
}
}, [gradientDragging, activeIndex]);
const activeColor = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
var _a;
if (isSingle) {
return value;
}
// Use cache when dragging. User can not operation panel when dragging.
if (gradientDragging) {
return lockedColor;
}
return (_a = colors[activeIndex]) === null || _a === void 0 ? void 0 : _a.color;
}, [value, activeIndex, isSingle, lockedColor, gradientDragging]);
// ========================= Picker Color =========================
const [pickerColor, setPickerColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(activeColor);
const [forceSync, setForceSync] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0);
const mergedPickerColor = (pickerColor === null || pickerColor === void 0 ? void 0 : pickerColor.equals(activeColor)) ? activeColor : pickerColor;
(0,useLayoutEffect["default"])(() => {
setPickerColor(activeColor);
}, [forceSync, activeColor === null || activeColor === void 0 ? void 0 : activeColor.toHexString()]);
// ============================ Change ============================
const fillColor = (nextColor, info) => {
let submitColor = (0,util.generateColor)(nextColor);
// Fill alpha color to 100% if origin is cleared color
if (value.cleared) {
const rgb = submitColor.toRgb();
// Auto fill color if origin is `0/0/0` to enhance user experience
if (!rgb.r && !rgb.g && !rgb.b && info) {
const {
type: infoType,
value: infoValue = 0
} = info;
submitColor = new color.AggregationColor({
h: infoType === 'hue' ? infoValue : 0,
s: 1,
b: 1,
a: infoType === 'alpha' ? infoValue / 100 : 1
});
} else {
submitColor = (0,util.genAlphaColor)(submitColor);
}
}
if (mode === 'single') {
return submitColor;
}
const nextColors = (0,toConsumableArray["default"])(colors);
nextColors[activeIndex] = Object.assign(Object.assign({}, nextColors[activeIndex]), {
color: submitColor
});
return new color.AggregationColor(nextColors);
};
const onPickerChange = (colorValue, fromPicker, info) => {
const nextColor = fillColor(colorValue, info);
setPickerColor(nextColor.isGradient() ? nextColor.getColors()[activeIndex].color : nextColor);
onChange(nextColor, fromPicker);
};
const onInternalChangeComplete = (nextColor, info) => {
// Trigger complete event
onChangeComplete(fillColor(nextColor, info));
// Back of origin color in case in controlled
// This will set after `onChangeComplete` to avoid `setState` trigger rerender
// which will make `fillColor` get wrong `color.cleared` state
setForceSync(ori => ori + 1);
};
const onInputChange = colorValue => {
onChange(fillColor(colorValue));
};
// ============================ Render ============================
// Operation bar
let operationNode = null;
const showMode = modeOptions.length > 1;
if (allowClear || showMode) {
operationNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-operation`
}, showMode && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(segmented, {
size: "small",
options: modeOptions,
value: mode,
onChange: onModeChange
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorClear, Object.assign({
prefixCls: prefixCls,
value: value,
onChange: clearColor => {
onChange(clearColor);
onClear === null || onClear === void 0 ? void 0 : onClear();
}
}, injectProps)));
}
// Return
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, operationNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PanelPicker_GradientColorBar, Object.assign({}, panelPickerContext, {
colors: colors
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(color_picker_es["default"], {
prefixCls: prefixCls,
value: mergedPickerColor === null || mergedPickerColor === void 0 ? void 0 : mergedPickerColor.toHsb(),
disabledAlpha: disabledAlpha,
onChange: (colorValue, info) => {
onPickerChange(colorValue, true, info);
},
onChangeComplete: (colorValue, info) => {
onInternalChangeComplete(colorValue, info);
},
components: components
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorInput, Object.assign({
value: activeColor,
onChange: onInputChange,
prefixCls: prefixCls,
disabledAlpha: disabledAlpha
}, injectProps)));
};
/* harmony default export */ var components_PanelPicker = (PanelPicker);
// EXTERNAL MODULE: ./components/color-picker/components/ColorPresets.tsx
var ColorPresets = __webpack_require__("./components/color-picker/components/ColorPresets.tsx");
;// ./components/color-picker/components/PanelPresets.tsx
const PanelPresets = () => {
const {
prefixCls,
value,
presets,
onChange
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PanelPresetsContext);
return Array.isArray(presets) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ColorPresets["default"], {
value: value,
presets: presets,
prefixCls: prefixCls,
onChange: onChange
})) : null;
};
/* harmony default export */ var components_PanelPresets = (PanelPresets);
;// ./components/color-picker/ColorPickerPanel.tsx
const ColorPickerPanel = props => {
const {
prefixCls,
presets,
panelRender,
value,
onChange,
onClear,
allowClear,
disabledAlpha,
mode,
onModeChange,
modeOptions,
onChangeComplete,
activeIndex,
onActive,
format,
onFormatChange,
gradientDragging,
onGradientDragging,
disabledFormat
} = props;
const colorPickerPanelPrefixCls = `${prefixCls}-inner`;
// ===================== Context ======================
const panelContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
prefixCls,
value,
onChange,
onClear,
allowClear,
disabledAlpha,
mode,
onModeChange,
modeOptions,
onChangeComplete,
activeIndex,
onActive,
format,
onFormatChange,
gradientDragging,
onGradientDragging,
disabledFormat
}), [prefixCls, value, onChange, onClear, allowClear, disabledAlpha, mode, onModeChange, modeOptions, onChangeComplete, activeIndex, onActive, format, onFormatChange, gradientDragging, onGradientDragging, disabledFormat]);
const presetContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
prefixCls,
value,
presets,
onChange
}), [prefixCls, value, presets, onChange]);
// ====================== Render ======================
const innerPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${colorPickerPanelPrefixCls}-content`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_PanelPicker, null), Array.isArray(presets) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(divider, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_PanelPresets, null));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PanelPickerContext.Provider, {
value: panelContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PanelPresetsContext.Provider, {
value: presetContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: colorPickerPanelPrefixCls
}, typeof panelRender === 'function' ? panelRender(innerPanel, {
components: {
Picker: components_PanelPicker,
Presets: components_PanelPresets
}
}) : innerPanel)));
};
if (true) {
ColorPickerPanel.displayName = 'ColorPickerPanel';
}
/* harmony default export */ var color_picker_ColorPickerPanel = (ColorPickerPanel);
;// ./components/color-picker/components/ColorTrigger.tsx
var ColorTrigger_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;
};
const ColorTrigger = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
const {
color,
prefixCls,
open,
disabled,
format,
className,
showText,
activeIndex
} = props,
rest = ColorTrigger_rest(props, ["color", "prefixCls", "open", "disabled", "format", "className", "showText", "activeIndex"]);
const colorTriggerPrefixCls = `${prefixCls}-trigger`;
const colorTextPrefixCls = `${colorTriggerPrefixCls}-text`;
const colorTextCellPrefixCls = `${colorTextPrefixCls}-cell`;
const [locale] = (0,useLocale["default"])('ColorPicker');
// ============================== Text ==============================
const desc = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
if (!showText) {
return '';
}
if (typeof showText === 'function') {
return showText(color);
}
if (color.cleared) {
return locale.transparent;
}
if (color.isGradient()) {
return color.getColors().map((c, index) => {
const inactive = activeIndex !== -1 && activeIndex !== index;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
key: index,
className: classnames_default()(colorTextCellPrefixCls, inactive && `${colorTextCellPrefixCls}-inactive`)
}, c.color.toRgbString(), " ", c.percent, "%");
});
}
const hexString = color.toHexString().toUpperCase();
const alpha = (0,util.getColorAlpha)(color);
switch (format) {
case 'rgb':
return color.toRgbString();
case 'hsb':
return color.toHsbString();
// case 'hex':
default:
return alpha < 100 ? `${hexString.slice(0, 7)},${alpha}%` : hexString;
}
}, [color, format, showText, activeIndex]);
// ============================= Render =============================
const containerNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => color.cleared ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorClear, {
prefixCls: prefixCls
})) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(color_picker_es.ColorBlock, {
prefixCls: prefixCls,
color: color.toCssString()
})), [color, prefixCls]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
ref: ref,
className: classnames_default()(colorTriggerPrefixCls, className, {
[`${colorTriggerPrefixCls}-active`]: open,
[`${colorTriggerPrefixCls}-disabled`]: disabled
})
}, (0,pickAttrs["default"])(rest)), containerNode, showText && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: colorTextPrefixCls
}, desc));
});
/* harmony default export */ var components_ColorTrigger = (ColorTrigger);
;// ./components/color-picker/hooks/useModeColor.ts
/**
* Combine the `color` and `mode` to make sure sync of state.
*/
function useModeColor(defaultValue, value, mode) {
const [locale] = (0,useLocale["default"])('ColorPicker');
// ======================== Base ========================
// Color
const [mergedColor, setMergedColor] = (0,useMergedState["default"])(defaultValue, {
value
});
// Mode
const [modeState, setModeState] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('single');
const [modeOptionList, modeSet] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const list = (Array.isArray(mode) ? mode : [mode]).filter(m => m);
if (!list.length) {
list.push('single');
}
const modes = new Set(list);
const optionList = [];
const pushOption = (modeType, localeTxt) => {
if (modes.has(modeType)) {
optionList.push({
label: localeTxt,
value: modeType
});
}
};
pushOption('single', locale.singleColor);
pushOption('gradient', locale.gradientColor);
return [optionList, modes];
}, [mode]);
// ======================== Post ========================
// We need align `mode` with `color` state
// >>>>> Color
const [cacheColor, setCacheColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
const setColor = (0,useEvent["default"])(nextColor => {
setCacheColor(nextColor);
setMergedColor(nextColor);
});
const postColor = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const colorObj = (0,util.generateColor)(mergedColor || '');
// Use `cacheColor` in case the color is `cleared`
return colorObj.equals(cacheColor) ? cacheColor : colorObj;
}, [mergedColor, cacheColor]);
// >>>>> Mode
const postMode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a;
if (modeSet.has(modeState)) {
return modeState;
}
return (_a = modeOptionList[0]) === null || _a === void 0 ? void 0 : _a.value;
}, [modeSet, modeState, modeOptionList]);
// ======================= Effect =======================
// Dynamic update mode when color change
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
setModeState(postColor.isGradient() ? 'gradient' : 'single');
}, [postColor]);
// ======================= Return =======================
return [postColor, setColor, postMode, setModeState, modeOptionList];
}
// EXTERNAL MODULE: ./components/color-picker/style/index.ts + 5 modules
var color_picker_style = __webpack_require__("./components/color-picker/style/index.ts");
;// ./components/color-picker/ColorPicker.tsx
var ColorPicker_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;
};
const ColorPicker = props => {
const {
mode,
value,
defaultValue,
format,
defaultFormat,
allowClear = false,
presets,
children,
trigger = 'click',
open,
disabled,
placement = 'bottomLeft',
arrow = true,
panelRender,
showText,
style,
className,
size: customizeSize,
rootClassName,
prefixCls: customizePrefixCls,
styles,
disabledAlpha = false,
onFormatChange,
onChange,
onClear,
onOpenChange,
onChangeComplete,
getPopupContainer,
autoAdjustOverflow = true,
destroyTooltipOnHide,
disabledFormat
} = props,
rest = ColorPicker_rest(props, ["mode", "value", "defaultValue", "format", "defaultFormat", "allowClear", "presets", "children", "trigger", "open", "disabled", "placement", "arrow", "panelRender", "showText", "style", "className", "size", "rootClassName", "prefixCls", "styles", "disabledAlpha", "onFormatChange", "onChange", "onClear", "onOpenChange", "onChangeComplete", "getPopupContainer", "autoAdjustOverflow", "destroyTooltipOnHide", "disabledFormat"]);
const {
getPrefixCls,
direction,
colorPicker
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const contextDisabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_DisabledContext);
const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;
const [popupOpen, setPopupOpen] = (0,useMergedState["default"])(false, {
value: open,
postState: openData => !mergedDisabled && openData,
onChange: onOpenChange
});
const [formatValue, setFormatValue] = (0,useMergedState["default"])(format, {
value: format,
defaultValue: defaultFormat,
onChange: onFormatChange
});
const prefixCls = getPrefixCls('color-picker', customizePrefixCls);
// ================== Value & Mode =================
const [mergedColor, setColor, modeState, setModeState, modeOptions] = useModeColor(defaultValue, value, mode);
const isAlphaColor = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => (0,util.getColorAlpha)(mergedColor) < 100, [mergedColor]);
// ==================== Change =====================
// To enhance user experience, we cache the gradient color when switch from gradient to single
// If user not modify single color, we will use the cached gradient color.
const [cachedGradientColor, setCachedGradientColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null);
const onInternalChangeComplete = color => {
if (onChangeComplete) {
let changeColor = (0,util.generateColor)(color);
// ignore alpha color
if (disabledAlpha && isAlphaColor) {
changeColor = (0,util.genAlphaColor)(color);
}
onChangeComplete(changeColor);
}
};
const onInternalChange = (data, changeFromPickerDrag) => {
let color = (0,util.generateColor)(data);
// ignore alpha color
if (disabledAlpha && isAlphaColor) {
color = (0,util.genAlphaColor)(color);
}
setColor(color);
setCachedGradientColor(null);
// Trigger change event
if (onChange) {
onChange(color, color.toCssString());
}
// Only for drag-and-drop color picking
if (!changeFromPickerDrag) {
onInternalChangeComplete(color);
}
};
// =================== Gradient ====================
const [activeIndex, setActiveIndex] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0);
const [gradientDragging, setGradientDragging] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false);
// Mode change should also trigger color change
const onInternalModeChange = newMode => {
setModeState(newMode);
if (newMode === 'single' && mergedColor.isGradient()) {
setActiveIndex(0);
onInternalChange(new color.AggregationColor(mergedColor.getColors()[0].color));
// Should after `onInternalChange` since it will clear the cached color
setCachedGradientColor(mergedColor);
} else if (newMode === 'gradient' && !mergedColor.isGradient()) {
const baseColor = isAlphaColor ? (0,util.genAlphaColor)(mergedColor) : mergedColor;
onInternalChange(new color.AggregationColor(cachedGradientColor || [{
percent: 0,
color: baseColor
}, {
percent: 100,
color: baseColor
}]));
}
};
// ================== Form Status ==================
const {
status: contextStatus
} = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(FormItemInputContext);
// ==================== Compact ====================
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
// ===================== Style =====================
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,color_picker_style["default"])(prefixCls, rootCls);
const rtlCls = {
[`${prefixCls}-rtl`]: direction
};
const mergedRootCls = classnames_default()(rootClassName, cssVarCls, rootCls, rtlCls);
const mergedCls = classnames_default()(getStatusClassNames(prefixCls, contextStatus), {
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-lg`]: mergedSize === 'large'
}, compactItemClassnames, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.className, mergedRootCls, className, hashId);
const mergedPopupCls = classnames_default()(prefixCls, mergedRootCls);
// ===================== Warning ======================
if (true) {
const warning = (0,_util_warning.devUseWarning)('ColorPicker');
true ? warning(!(disabledAlpha && isAlphaColor), 'usage', '`disabledAlpha` will make the alpha to be 100% when use alpha color.') : 0;
}
const popoverProps = {
open: popupOpen,
trigger,
placement,
arrow,
rootClassName,
getPopupContainer,
autoAdjustOverflow,
destroyTooltipOnHide
};
const mergedStyle = Object.assign(Object.assign({}, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.style), style);
// ============================ zIndex ============================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(popover, Object.assign({
style: styles === null || styles === void 0 ? void 0 : styles.popup,
styles: {
body: styles === null || styles === void 0 ? void 0 : styles.popupOverlayInner
},
onOpenChange: visible => {
if (!visible || !mergedDisabled) {
setPopupOpen(visible);
}
},
content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
form: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(color_picker_ColorPickerPanel, {
mode: modeState,
onModeChange: onInternalModeChange,
modeOptions: modeOptions,
prefixCls: prefixCls,
value: mergedColor,
allowClear: allowClear,
disabled: mergedDisabled,
disabledAlpha: disabledAlpha,
presets: presets,
panelRender: panelRender,
format: formatValue,
onFormatChange: setFormatValue,
onChange: onInternalChange,
onChangeComplete: onInternalChangeComplete,
onClear: onClear,
activeIndex: activeIndex,
onActive: setActiveIndex,
gradientDragging: gradientDragging,
onGradientDragging: setGradientDragging,
disabledFormat: disabledFormat
})),
classNames: {
root: mergedPopupCls
}
}, popoverProps), children || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorTrigger, Object.assign({
activeIndex: popupOpen ? activeIndex : -1,
open: popupOpen,
className: mergedCls,
style: mergedStyle,
prefixCls: prefixCls,
disabled: mergedDisabled,
showText: showText,
format: formatValue
}, rest, {
color: mergedColor
})))));
};
if (true) {
ColorPicker.displayName = 'ColorPicker';
}
const ColorPicker_PurePanel = _util_PurePanel(ColorPicker, undefined, props => Object.assign(Object.assign({}, props), {
placement: 'bottom',
autoAdjustOverflow: false
}), 'color-picker', /* istanbul ignore next */
prefixCls => prefixCls);
ColorPicker._InternalPanelDoNotUseOrYouWillBeFired = ColorPicker_PurePanel;
/* harmony default export */ var color_picker_ColorPicker = (ColorPicker);
;// ./components/color-picker/index.tsx
/* harmony default export */ var color_picker = (color_picker_ColorPicker);
;// ./node_modules/@ant-design/icons-svg/es/asn/CalendarOutlined.js
// This icon file is generated automatically.
var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
/* harmony default export */ var asn_CalendarOutlined = (CalendarOutlined);
;// ./node_modules/@ant-design/icons/es/icons/CalendarOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CalendarOutlined_CalendarOutlined = function CalendarOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CalendarOutlined
}));
};
/** */
var CalendarOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CalendarOutlined_CalendarOutlined);
if (true) {
CalendarOutlined_RefIcon.displayName = 'CalendarOutlined';
}
/* harmony default export */ var icons_CalendarOutlined = (CalendarOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/ClockCircleOutlined.js
// This icon file is generated automatically.
var ClockCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, "name": "clock-circle", "theme": "outlined" };
/* harmony default export */ var asn_ClockCircleOutlined = (ClockCircleOutlined);
;// ./node_modules/@ant-design/icons/es/icons/ClockCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ClockCircleOutlined_ClockCircleOutlined = function ClockCircleOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_ClockCircleOutlined
}));
};
/** */
var ClockCircleOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ClockCircleOutlined_ClockCircleOutlined);
if (true) {
ClockCircleOutlined_RefIcon.displayName = 'ClockCircleOutlined';
}
/* harmony default export */ var icons_ClockCircleOutlined = (ClockCircleOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/SwapRightOutlined.js
// This icon file is generated automatically.
var SwapRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" } }] }, "name": "swap-right", "theme": "outlined" };
/* harmony default export */ var asn_SwapRightOutlined = (SwapRightOutlined);
;// ./node_modules/@ant-design/icons/es/icons/SwapRightOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SwapRightOutlined_SwapRightOutlined = function SwapRightOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_SwapRightOutlined
}));
};
/** */
var SwapRightOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SwapRightOutlined_SwapRightOutlined);
if (true) {
SwapRightOutlined_RefIcon.displayName = 'SwapRightOutlined';
}
/* harmony default export */ var icons_SwapRightOutlined = (SwapRightOutlined_RefIcon);
// EXTERNAL MODULE: ./components/date-picker/locale/en_US.ts + 1 modules
var date_picker_locale_en_US = __webpack_require__("./components/date-picker/locale/en_US.ts");
// EXTERNAL MODULE: ./components/date-picker/style/index.ts + 2 modules
var date_picker_style = __webpack_require__("./components/date-picker/style/index.ts");
;// ./components/date-picker/util.ts
function getPlaceholder(locale, picker, customizePlaceholder) {
if (customizePlaceholder !== undefined) {
return customizePlaceholder;
}
if (picker === 'year' && locale.lang.yearPlaceholder) {
return locale.lang.yearPlaceholder;
}
if (picker === 'quarter' && locale.lang.quarterPlaceholder) {
return locale.lang.quarterPlaceholder;
}
if (picker === 'month' && locale.lang.monthPlaceholder) {
return locale.lang.monthPlaceholder;
}
if (picker === 'week' && locale.lang.weekPlaceholder) {
return locale.lang.weekPlaceholder;
}
if (picker === 'time' && locale.timePickerLocale.placeholder) {
return locale.timePickerLocale.placeholder;
}
return locale.lang.placeholder;
}
function getRangePlaceholder(locale, picker, customizePlaceholder) {
if (customizePlaceholder !== undefined) {
return customizePlaceholder;
}
if (picker === 'year' && locale.lang.yearPlaceholder) {
return locale.lang.rangeYearPlaceholder;
}
if (picker === 'quarter' && locale.lang.quarterPlaceholder) {
return locale.lang.rangeQuarterPlaceholder;
}
if (picker === 'month' && locale.lang.monthPlaceholder) {
return locale.lang.rangeMonthPlaceholder;
}
if (picker === 'week' && locale.lang.weekPlaceholder) {
return locale.lang.rangeWeekPlaceholder;
}
if (picker === 'time' && locale.timePickerLocale.placeholder) {
return locale.timePickerLocale.rangePlaceholder;
}
return locale.lang.rangePlaceholder;
}
function util_useIcons(props, prefixCls) {
const {
allowClear = true
} = props;
const {
clearIcon,
removeIcon
} = useIcons(Object.assign(Object.assign({}, props), {
prefixCls,
componentName: 'DatePicker'
}));
const mergedAllowClear = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (allowClear === false) {
return false;
}
const allowClearConfig = allowClear === true ? {} : allowClear;
return Object.assign({
clearIcon: clearIcon
}, allowClearConfig);
}, [allowClear, clearIcon]);
return [mergedAllowClear, removeIcon];
}
;// ./components/date-picker/generatePicker/constant.ts
const [WEEK, WEEKPICKER] = ['week', 'WeekPicker'];
const [MONTH, MONTHPICKER] = ['month', 'MonthPicker'];
const [YEAR, YEARPICKER] = ['year', 'YearPicker'];
const [QUARTER, QUARTERPICKER] = ['quarter', 'QuarterPicker'];
const [TIME, TIMEPICKER] = ['time', 'TimePicker'];
;// ./components/date-picker/PickerButton.tsx
const PickerButton = props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({
size: "small",
type: "primary"
}, props)));
/* harmony default export */ var date_picker_PickerButton = (PickerButton);
;// ./components/date-picker/generatePicker/useComponents.ts
function useComponents(components) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Object.assign({
button: date_picker_PickerButton
}, components), [components]);
}
;// ./components/date-picker/generatePicker/generateRangePicker.tsx
var generateRangePicker_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;
};
const generateRangePicker = generateConfig => {
const RangePicker = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
getPopupContainer: customGetPopupContainer,
components,
className,
style,
placement,
size: customizeSize,
disabled: customDisabled,
bordered = true,
placeholder,
popupClassName,
dropdownClassName,
status: customStatus,
rootClassName,
variant: customVariant,
picker
} = props,
restProps = generateRangePicker_rest(props, ["prefixCls", "getPopupContainer", "components", "className", "style", "placement", "size", "disabled", "bordered", "placeholder", "popupClassName", "dropdownClassName", "status", "rootClassName", "variant", "picker"]);
const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const {
getPrefixCls,
direction,
getPopupContainer,
rangePicker
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('picker', customizePrefixCls);
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const rootPrefixCls = getPrefixCls();
const [variant, enableVariantCls] = useVariants('rangePicker', customVariant, bordered);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,date_picker_style["default"])(prefixCls, rootCls);
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)('DatePicker.RangePicker');
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
warning.deprecated(!('bordered' in props), 'bordered', 'variant');
}
// ===================== Icon =====================
const [mergedAllowClear] = util_useIcons(props, prefixCls);
// ================== components ==================
const mergedComponents = useComponents(components);
// ===================== Size =====================
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
// ===================== FormItemInput =====================
const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
const {
hasFeedback,
status: contextStatus,
feedbackIcon
} = formItemContext;
const suffixNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, picker === TIME ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ClockCircleOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CalendarOutlined, null), hasFeedback && feedbackIcon);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => innerRef.current);
const [contextLocale] = (0,useLocale["default"])('Calendar', date_picker_locale_en_US["default"]);
const locale = Object.assign(Object.assign({}, contextLocale), props.locale);
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('DatePicker', (_a = props.popupStyle) === null || _a === void 0 ? void 0 : _a.zIndex);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
space: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_RangePicker, Object.assign({
separator: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
"aria-label": "to",
className: `${prefixCls}-separator`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SwapRightOutlined, null)),
disabled: mergedDisabled,
ref: innerRef,
placement: placement,
placeholder: getRangePlaceholder(locale, picker, placeholder),
suffixIcon: suffixNode,
prevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-prev-icon`
}),
nextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-next-icon`
}),
superPrevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-super-prev-icon`
}),
superNextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-super-next-icon`
}),
transitionName: `${rootPrefixCls}-slide-up`,
picker: picker
}, restProps, {
className: classnames_default()({
[`${prefixCls}-${mergedSize}`]: mergedSize,
[`${prefixCls}-${variant}`]: enableVariantCls
}, getStatusClassNames(prefixCls, getMergedStatus(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, className, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.className, cssVarCls, rootCls, rootClassName),
style: Object.assign(Object.assign({}, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.style), style),
locale: locale.lang,
prefixCls: prefixCls,
getPopupContainer: customGetPopupContainer || getPopupContainer,
generateConfig: generateConfig,
components: mergedComponents,
direction: direction,
classNames: {
popup: classnames_default()(hashId, popupClassName || dropdownClassName, cssVarCls, rootCls, rootClassName)
},
styles: {
popup: Object.assign(Object.assign({}, props.popupStyle), {
zIndex
})
},
allowClear: mergedAllowClear
}))));
});
if (true) {
RangePicker.displayName = 'RangePicker';
}
return RangePicker;
};
/* harmony default export */ var generatePicker_generateRangePicker = (generateRangePicker);
;// ./components/date-picker/generatePicker/generateSinglePicker.tsx
var generateSinglePicker_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;
};
const generatePicker = generateConfig => {
const getPicker = (picker, displayName) => {
const consumerName = displayName === TIMEPICKER ? 'timePicker' : 'datePicker';
const Picker = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
getPopupContainer: customizeGetPopupContainer,
components,
style,
className,
rootClassName,
size: customizeSize,
bordered,
placement,
placeholder,
popupClassName,
dropdownClassName,
disabled: customDisabled,
status: customStatus,
variant: customVariant,
onCalendarChange
} = props,
restProps = generateSinglePicker_rest(props, ["prefixCls", "getPopupContainer", "components", "style", "className", "rootClassName", "size", "bordered", "placement", "placeholder", "popupClassName", "dropdownClassName", "disabled", "status", "variant", "onCalendarChange"]);
const {
getPrefixCls,
direction,
getPopupContainer,
// Consume different styles according to different names
[consumerName]: consumerStyle
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('picker', customizePrefixCls);
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const [variant, enableVariantCls] = useVariants('datePicker', customVariant, bordered);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,date_picker_style["default"])(prefixCls, rootCls);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => innerRef.current);
const additionalProps = {
showToday: true
};
const mergedPicker = picker || props.picker;
const rootPrefixCls = getPrefixCls();
// ==================== Legacy =====================
const {
onSelect,
multiple
} = restProps;
const hasLegacyOnSelect = onSelect && picker === 'time' && !multiple;
const onInternalCalendarChange = (date, dateStr, info) => {
onCalendarChange === null || onCalendarChange === void 0 ? void 0 : onCalendarChange(date, dateStr, info);
if (hasLegacyOnSelect) {
onSelect(date);
}
};
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)(displayName || 'DatePicker');
true ? warning(picker !== 'quarter', 'deprecated', `DatePicker.${displayName} is legacy usage. Please use DatePicker[picker='${picker}'] directly.`) : 0;
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
warning.deprecated(!('bordered' in props), 'bordered', 'variant');
warning.deprecated(!hasLegacyOnSelect, 'onSelect', 'onCalendarChange');
}
// ===================== Icon =====================
const [mergedAllowClear, removeIcon] = util_useIcons(props, prefixCls);
// ================== components ==================
const mergedComponents = useComponents(components);
// ===================== Size =====================
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
// ===================== FormItemInput =====================
const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
const {
hasFeedback,
status: contextStatus,
feedbackIcon
} = formItemContext;
const suffixNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, mergedPicker === 'time' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ClockCircleOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CalendarOutlined, null), hasFeedback && feedbackIcon);
const [contextLocale] = (0,useLocale["default"])('DatePicker', date_picker_locale_en_US["default"]);
const locale = Object.assign(Object.assign({}, contextLocale), props.locale);
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('DatePicker', (_a = props.popupStyle) === null || _a === void 0 ? void 0 : _a.zIndex);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
space: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_picker_es, Object.assign({
ref: innerRef,
placeholder: getPlaceholder(locale, mergedPicker, placeholder),
suffixIcon: suffixNode,
placement: placement,
prevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-prev-icon`
}),
nextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-next-icon`
}),
superPrevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-super-prev-icon`
}),
superNextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-super-next-icon`
}),
transitionName: `${rootPrefixCls}-slide-up`,
picker: picker,
onCalendarChange: onInternalCalendarChange
}, additionalProps, restProps, {
locale: locale.lang,
className: classnames_default()({
[`${prefixCls}-${mergedSize}`]: mergedSize,
[`${prefixCls}-${variant}`]: enableVariantCls
}, getStatusClassNames(prefixCls, getMergedStatus(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, consumerStyle === null || consumerStyle === void 0 ? void 0 : consumerStyle.className, className, cssVarCls, rootCls, rootClassName),
style: Object.assign(Object.assign({}, consumerStyle === null || consumerStyle === void 0 ? void 0 : consumerStyle.style), style),
prefixCls: prefixCls,
getPopupContainer: customizeGetPopupContainer || getPopupContainer,
generateConfig: generateConfig,
components: mergedComponents,
direction: direction,
disabled: mergedDisabled,
classNames: {
popup: classnames_default()(hashId, cssVarCls, rootCls, rootClassName, popupClassName || dropdownClassName)
},
styles: {
popup: Object.assign(Object.assign({}, props.popupStyle), {
zIndex
})
},
allowClear: mergedAllowClear,
removeIcon: removeIcon
}))));
});
if ( true && displayName) {
Picker.displayName = displayName;
}
return Picker;
};
const DatePicker = getPicker();
const WeekPicker = getPicker(WEEK, WEEKPICKER);
const MonthPicker = getPicker(MONTH, MONTHPICKER);
const YearPicker = getPicker(YEAR, YEARPICKER);
const QuarterPicker = getPicker(QUARTER, QUARTERPICKER);
const TimePicker = getPicker(TIME, TIMEPICKER);
return {
DatePicker,
WeekPicker,
MonthPicker,
YearPicker,
TimePicker,
QuarterPicker
};
};
/* harmony default export */ var generateSinglePicker = (generatePicker);
;// ./components/date-picker/generatePicker/index.tsx
const generatePicker_generatePicker = generateConfig => {
// =========================== Picker ===========================
const {
DatePicker,
WeekPicker,
MonthPicker,
YearPicker,
TimePicker,
QuarterPicker
} = generateSinglePicker(generateConfig);
// ======================== Range Picker ========================
const RangePicker = generatePicker_generateRangePicker(generateConfig);
const MergedDatePicker = DatePicker;
MergedDatePicker.WeekPicker = WeekPicker;
MergedDatePicker.MonthPicker = MonthPicker;
MergedDatePicker.YearPicker = YearPicker;
MergedDatePicker.RangePicker = RangePicker;
MergedDatePicker.TimePicker = TimePicker;
MergedDatePicker.QuarterPicker = QuarterPicker;
if (true) {
MergedDatePicker.displayName = 'DatePicker';
}
return MergedDatePicker;
};
/* harmony default export */ var date_picker_generatePicker = (generatePicker_generatePicker);
;// ./components/date-picker/index.tsx
const DatePicker = date_picker_generatePicker(dayjs);
// We don't care debug panel
/* istanbul ignore next */
const date_picker_PurePanel = _util_PurePanel(DatePicker, 'popupAlign', undefined, 'picker');
DatePicker._InternalPanelDoNotUseOrYouWillBeFired = date_picker_PurePanel;
const PureRangePanel = _util_PurePanel(DatePicker.RangePicker, 'popupAlign', undefined, 'picker');
DatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = PureRangePanel;
DatePicker.generatePicker = date_picker_generatePicker;
/* harmony default export */ var date_picker = (DatePicker);
;// ./components/descriptions/constant.ts
const DEFAULT_COLUMN_MAP = {
xxl: 3,
xl: 3,
lg: 3,
md: 3,
sm: 2,
xs: 1
};
/* harmony default export */ var constant = (DEFAULT_COLUMN_MAP);
;// ./components/descriptions/DescriptionsContext.ts
const DescriptionsContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
/* harmony default export */ var descriptions_DescriptionsContext = (DescriptionsContext);
;// ./components/descriptions/hooks/useItems.ts
var hooks_useItems_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;
};
// Convert children into items
const transChildren2Items = childNodes => (0,toArray["default"])(childNodes).map(node => Object.assign(Object.assign({}, node === null || node === void 0 ? void 0 : node.props), {
key: node.key
}));
function useItems_useItems(screens, items, children) {
const mergedItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() =>
// Take `items` first or convert `children` into items
items || transChildren2Items(children), [items, children]);
const responsiveItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => mergedItems.map(_a => {
var {
span
} = _a,
restItem = hooks_useItems_rest(_a, ["span"]);
if (span === 'filled') {
return Object.assign(Object.assign({}, restItem), {
filled: true
});
}
return Object.assign(Object.assign({}, restItem), {
span: typeof span === 'number' ? span : matchScreen(screens, span)
});
}), [mergedItems, screens]);
return responsiveItems;
}
;// ./components/descriptions/hooks/useRow.ts
var useRow_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;
};
// Calculate the sum of span in a row
function getCalcRows(rowItems, mergedColumn) {
let rows = [];
let tmpRow = [];
let exceed = false;
let count = 0;
rowItems.filter(n => n).forEach(rowItem => {
const {
filled
} = rowItem,
restItem = useRow_rest(rowItem, ["filled"]);
if (filled) {
tmpRow.push(restItem);
rows.push(tmpRow);
// reset
tmpRow = [];
count = 0;
return;
}
const restSpan = mergedColumn - count;
count += rowItem.span || 1;
if (count >= mergedColumn) {
if (count > mergedColumn) {
exceed = true;
tmpRow.push(Object.assign(Object.assign({}, restItem), {
span: restSpan
}));
} else {
tmpRow.push(restItem);
}
rows.push(tmpRow);
// reset
tmpRow = [];
count = 0;
} else {
tmpRow.push(restItem);
}
});
if (tmpRow.length > 0) {
rows.push(tmpRow);
}
rows = rows.map(rows => {
const count = rows.reduce((acc, item) => acc + (item.span || 1), 0);
if (count < mergedColumn) {
// If the span of the last element in the current row is less than the column, then add its span to the remaining columns
const last = rows[rows.length - 1];
last.span = mergedColumn - (count - (last.span || 1));
return rows;
}
return rows;
});
return [rows, exceed];
}
const useRow = (mergedColumn, items) => {
const [rows, exceed] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => getCalcRows(items, mergedColumn), [items, mergedColumn]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Descriptions');
true ? warning(!exceed, 'usage', 'Sum of column `span` in a line not match `column` of Descriptions.') : 0;
}
return rows;
};
/* harmony default export */ var hooks_useRow = (useRow);
;// ./components/descriptions/Item.ts
// JSX Structure Syntactic Sugar. Never reach the render code.
/* istanbul ignore next */
const DescriptionsItem = _ref => {
let {
children
} = _ref;
return children;
};
/* harmony default export */ var descriptions_Item = (DescriptionsItem);
;// ./components/descriptions/Cell.tsx
function notEmpty(val) {
return val !== undefined && val !== null;
}
const Cell = props => {
const {
itemPrefixCls,
component,
span,
className,
style,
labelStyle,
contentStyle,
bordered,
label,
content,
colon,
type,
styles
} = props;
const Component = component;
const descContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(descriptions_DescriptionsContext);
const {
classNames: descriptionsClassNames
} = descContext;
if (bordered) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
className: classnames_default()({
[`${itemPrefixCls}-item-label`]: type === 'label',
[`${itemPrefixCls}-item-content`]: type === 'content',
[`${descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.label}`]: type === 'label',
[`${descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.content}`]: type === 'content'
}, className),
style: style,
colSpan: span
}, notEmpty(label) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: Object.assign(Object.assign({}, labelStyle), styles === null || styles === void 0 ? void 0 : styles.label)
}, label), notEmpty(content) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: Object.assign(Object.assign({}, labelStyle), styles === null || styles === void 0 ? void 0 : styles.content)
}, content));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
className: classnames_default()(`${itemPrefixCls}-item`, className),
style: style,
colSpan: span
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${itemPrefixCls}-item-container`
}, (label || label === 0) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(`${itemPrefixCls}-item-label`, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.label, {
[`${itemPrefixCls}-item-no-colon`]: !colon
}),
style: Object.assign(Object.assign({}, labelStyle), styles === null || styles === void 0 ? void 0 : styles.label)
}, label)), (content || content === 0) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(`${itemPrefixCls}-item-content`, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.content),
style: Object.assign(Object.assign({}, contentStyle), styles === null || styles === void 0 ? void 0 : styles.content)
}, content))));
};
/* harmony default export */ var descriptions_Cell = (Cell);
;// ./components/descriptions/Row.tsx
function renderCells(items, _ref, _ref2) {
let {
colon,
prefixCls,
bordered
} = _ref;
let {
component,
type,
showLabel,
showContent,
labelStyle: rootLabelStyle,
contentStyle: rootContentStyle,
styles: rootStyles
} = _ref2;
return items.map((_ref3, index) => {
let {
label,
children,
prefixCls: itemPrefixCls = prefixCls,
className,
style,
labelStyle,
contentStyle,
span = 1,
key,
styles
} = _ref3;
if (typeof component === 'string') {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Cell, {
key: `${type}-${key || index}`,
className: className,
style: style,
styles: {
label: Object.assign(Object.assign(Object.assign(Object.assign({}, rootLabelStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.label), labelStyle), styles === null || styles === void 0 ? void 0 : styles.label),
content: Object.assign(Object.assign(Object.assign(Object.assign({}, rootContentStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.content), contentStyle), styles === null || styles === void 0 ? void 0 : styles.content)
},
span: span,
colon: colon,
component: component,
itemPrefixCls: itemPrefixCls,
bordered: bordered,
label: showLabel ? label : null,
content: showContent ? children : null,
type: type
});
}
return [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Cell, {
key: `label-${key || index}`,
className: className,
style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, rootLabelStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.label), style), labelStyle), styles === null || styles === void 0 ? void 0 : styles.label),
span: 1,
colon: colon,
component: component[0],
itemPrefixCls: itemPrefixCls,
bordered: bordered,
label: label,
type: "label"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Cell, {
key: `content-${key || index}`,
className: className,
style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, rootContentStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.content), style), contentStyle), styles === null || styles === void 0 ? void 0 : styles.content),
span: span * 2 - 1,
component: component[1],
itemPrefixCls: itemPrefixCls,
bordered: bordered,
content: children,
type: "content"
})];
});
}
const Row = props => {
const descContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(descriptions_DescriptionsContext);
const {
prefixCls,
vertical,
row,
index,
bordered
} = props;
if (vertical) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
key: `label-${index}`,
className: `${prefixCls}-row`
}, renderCells(row, props, Object.assign({
component: 'th',
type: 'label',
showLabel: true
}, descContext))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
key: `content-${index}`,
className: `${prefixCls}-row`
}, renderCells(row, props, Object.assign({
component: 'td',
type: 'content',
showContent: true
}, descContext))));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
key: index,
className: `${prefixCls}-row`
}, renderCells(row, props, Object.assign({
component: bordered ? ['th', 'td'] : 'td',
type: 'item',
showLabel: true,
showContent: true
}, descContext)));
};
/* harmony default export */ var descriptions_Row = (Row);
// EXTERNAL MODULE: ./components/descriptions/style/index.ts
var descriptions_style = __webpack_require__("./components/descriptions/style/index.ts");
;// ./components/descriptions/index.tsx
var descriptions_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;
};
/* eslint-disable react/no-array-index-key */
const Descriptions = props => {
const {
prefixCls: customizePrefixCls,
title,
extra,
column,
colon = true,
bordered,
layout,
children,
className,
rootClassName,
style,
size: customizeSize,
labelStyle,
contentStyle,
styles,
items,
classNames: descriptionsClassNames
} = props,
restProps = descriptions_rest(props, ["prefixCls", "title", "extra", "column", "colon", "bordered", "layout", "children", "className", "rootClassName", "style", "size", "labelStyle", "contentStyle", "styles", "items", "classNames"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('descriptions');
const prefixCls = getPrefixCls('descriptions', customizePrefixCls);
const screens = hooks_useBreakpoint();
// ============================== Warn ==============================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Descriptions');
[['labelStyle', 'styles={{ label: {} }}'], ['contentStyle', 'styles={{ content: {} }}']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
}
// Column count
const mergedColumn = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a;
if (typeof column === 'number') {
return column;
}
return (_a = matchScreen(screens, Object.assign(Object.assign({}, constant), column))) !== null && _a !== void 0 ? _a : 3;
}, [screens, column]);
// Items with responsive
const mergedItems = useItems_useItems(screens, items, children);
const mergedSize = (0,useSize["default"])(customizeSize);
const rows = hooks_useRow(mergedColumn, mergedItems);
const [wrapCSSVar, hashId, cssVarCls] = (0,descriptions_style["default"])(prefixCls);
// ======================== Render ========================
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
labelStyle,
contentStyle,
styles: {
content: Object.assign(Object.assign({}, contextStyles.content), styles === null || styles === void 0 ? void 0 : styles.content),
label: Object.assign(Object.assign({}, contextStyles.label), styles === null || styles === void 0 ? void 0 : styles.label)
},
classNames: {
label: classnames_default()(contextClassNames.label, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.label),
content: classnames_default()(contextClassNames.content, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.content)
}
}), [labelStyle, contentStyle, styles, descriptionsClassNames, contextClassNames, contextStyles]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_DescriptionsContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
className: classnames_default()(prefixCls, contextClassName, contextClassNames.root, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.root, {
[`${prefixCls}-${mergedSize}`]: mergedSize && mergedSize !== 'default',
[`${prefixCls}-bordered`]: !!bordered,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId, cssVarCls),
style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyle), contextStyles.root), styles === null || styles === void 0 ? void 0 : styles.root), style)
}, restProps), (title || extra) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-header`, contextClassNames.header, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.header),
style: Object.assign(Object.assign({}, contextStyles.header), styles === null || styles === void 0 ? void 0 : styles.header)
}, title && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-title`, contextClassNames.title, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.title),
style: Object.assign(Object.assign({}, contextStyles.title), styles === null || styles === void 0 ? void 0 : styles.title)
}, title)), extra && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-extra`, contextClassNames.extra, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.extra),
style: Object.assign(Object.assign({}, contextStyles.extra), styles === null || styles === void 0 ? void 0 : styles.extra)
}, extra)))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-view`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("table", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tbody", null, rows.map((row, index) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Row, {
key: index,
index: index,
colon: colon,
prefixCls: prefixCls,
vertical: layout === 'vertical',
bordered: bordered,
row: row
})))))))));
};
if (true) {
Descriptions.displayName = 'Descriptions';
}
Descriptions.Item = descriptions_Item;
/* harmony default export */ var descriptions = (Descriptions);
;// ./node_modules/rc-drawer/es/context.js
var DrawerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
var context_RefContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
/* harmony default export */ var rc_drawer_es_context = (DrawerContext);
;// ./node_modules/rc-drawer/es/DrawerPanel.js
var DrawerPanel_excluded = ["prefixCls", "className", "containerRef"];
var DrawerPanel = function DrawerPanel(props) {
var prefixCls = props.prefixCls,
className = props.className,
containerRef = props.containerRef,
restProps = (0,objectWithoutProperties["default"])(props, DrawerPanel_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_RefContext),
panelRef = _React$useContext.panel;
var mergedRef = (0,es_ref.useComposeRef)(panelRef, containerRef);
// =============================== Render ===============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
className: classnames_default()("".concat(prefixCls, "-content"), className),
role: "dialog",
ref: mergedRef
}, (0,pickAttrs["default"])(props, {
aria: true
}), {
"aria-modal": "true"
}, restProps));
};
if (true) {
DrawerPanel.displayName = 'DrawerPanel';
}
/* harmony default export */ var es_DrawerPanel = (DrawerPanel);
;// ./node_modules/rc-drawer/es/util.js
function parseWidthHeight(value) {
if (typeof value === 'string' && String(Number(value)) === value) {
(0,warning["default"])(false, 'Invalid value type of `width` or `height` which should be number type instead.');
return Number(value);
}
return value;
}
function warnCheck(props) {
(0,warning["default"])(!('wrapperClassName' in props), "'wrapperClassName' is removed. Please use 'rootClassName' instead.");
(0,warning["default"])((0,canUseDom["default"])() || !props.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.");
}
;// ./node_modules/rc-drawer/es/DrawerPopup.js
var DrawerPopup_sentinelStyle = {
width: 0,
height: 0,
overflow: 'hidden',
outline: 'none',
position: 'absolute'
};
function DrawerPopup(props, ref) {
var _ref, _pushConfig$distance, _pushConfig;
var prefixCls = props.prefixCls,
open = props.open,
placement = props.placement,
inline = props.inline,
push = props.push,
forceRender = props.forceRender,
autoFocus = props.autoFocus,
keyboard = props.keyboard,
drawerClassNames = props.classNames,
rootClassName = props.rootClassName,
rootStyle = props.rootStyle,
zIndex = props.zIndex,
className = props.className,
id = props.id,
style = props.style,
motion = props.motion,
width = props.width,
height = props.height,
children = props.children,
mask = props.mask,
maskClosable = props.maskClosable,
maskMotion = props.maskMotion,
maskClassName = props.maskClassName,
maskStyle = props.maskStyle,
afterOpenChange = props.afterOpenChange,
onClose = props.onClose,
onMouseEnter = props.onMouseEnter,
onMouseOver = props.onMouseOver,
onMouseLeave = props.onMouseLeave,
onClick = props.onClick,
onKeyDown = props.onKeyDown,
onKeyUp = props.onKeyUp,
styles = props.styles,
drawerRender = props.drawerRender;
// ================================ Refs ================================
var panelRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var sentinelStartRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var sentinelEndRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return panelRef.current;
});
var onPanelKeyDown = function onPanelKeyDown(event) {
var keyCode = event.keyCode,
shiftKey = event.shiftKey;
switch (keyCode) {
// Tab active
case KeyCode["default"].TAB:
{
if (keyCode === KeyCode["default"].TAB) {
if (!shiftKey && document.activeElement === sentinelEndRef.current) {
var _sentinelStartRef$cur;
(_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 || _sentinelStartRef$cur.focus({
preventScroll: true
});
} else if (shiftKey && document.activeElement === sentinelStartRef.current) {
var _sentinelEndRef$curre;
(_sentinelEndRef$curre = sentinelEndRef.current) === null || _sentinelEndRef$curre === void 0 || _sentinelEndRef$curre.focus({
preventScroll: true
});
}
}
break;
}
// Close
case KeyCode["default"].ESC:
{
if (onClose && keyboard) {
event.stopPropagation();
onClose(event);
}
break;
}
}
};
// ========================== Control ===========================
// Auto Focus
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (open && autoFocus) {
var _panelRef$current;
(_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 || _panelRef$current.focus({
preventScroll: true
});
}
}, [open]);
// ============================ Push ============================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
pushed = _React$useState2[0],
setPushed = _React$useState2[1];
var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_drawer_es_context);
// Merge push distance
var pushConfig;
if (typeof push === 'boolean') {
pushConfig = push ? {} : {
distance: 0
};
} else {
pushConfig = push || {};
}
var pushDistance = (_ref = (_pushConfig$distance = (_pushConfig = pushConfig) === null || _pushConfig === void 0 ? void 0 : _pushConfig.distance) !== null && _pushConfig$distance !== void 0 ? _pushConfig$distance : parentContext === null || parentContext === void 0 ? void 0 : parentContext.pushDistance) !== null && _ref !== void 0 ? _ref : 180;
var mergedContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
pushDistance: pushDistance,
push: function push() {
setPushed(true);
},
pull: function pull() {
setPushed(false);
}
};
}, [pushDistance]);
// ========================= ScrollLock =========================
// Tell parent to push
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (open) {
var _parentContext$push;
parentContext === null || parentContext === void 0 || (_parentContext$push = parentContext.push) === null || _parentContext$push === void 0 || _parentContext$push.call(parentContext);
} else {
var _parentContext$pull;
parentContext === null || parentContext === void 0 || (_parentContext$pull = parentContext.pull) === null || _parentContext$pull === void 0 || _parentContext$pull.call(parentContext);
}
}, [open]);
// Clean up
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
var _parentContext$pull2;
parentContext === null || parentContext === void 0 || (_parentContext$pull2 = parentContext.pull) === null || _parentContext$pull2 === void 0 || _parentContext$pull2.call(parentContext);
};
}, []);
// ============================ Mask ============================
var maskNode = mask && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
key: "mask"
}, maskMotion, {
visible: open
}), function (_ref2, maskRef) {
var motionMaskClassName = _ref2.className,
motionMaskStyle = _ref2.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-mask"), motionMaskClassName, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.mask, maskClassName),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionMaskStyle), maskStyle), styles === null || styles === void 0 ? void 0 : styles.mask),
onClick: maskClosable && open ? onClose : undefined,
ref: maskRef
});
});
// =========================== Panel ============================
var motionProps = typeof motion === 'function' ? motion(placement) : motion;
var wrapperStyle = {};
if (pushed && pushDistance) {
switch (placement) {
case 'top':
wrapperStyle.transform = "translateY(".concat(pushDistance, "px)");
break;
case 'bottom':
wrapperStyle.transform = "translateY(".concat(-pushDistance, "px)");
break;
case 'left':
wrapperStyle.transform = "translateX(".concat(pushDistance, "px)");
break;
default:
wrapperStyle.transform = "translateX(".concat(-pushDistance, "px)");
break;
}
}
if (placement === 'left' || placement === 'right') {
wrapperStyle.width = parseWidthHeight(width);
} else {
wrapperStyle.height = parseWidthHeight(height);
}
var eventHandlers = {
onMouseEnter: onMouseEnter,
onMouseOver: onMouseOver,
onMouseLeave: onMouseLeave,
onClick: onClick,
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
};
var panelNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
key: "panel"
}, motionProps, {
visible: open,
forceRender: forceRender,
onVisibleChanged: function onVisibleChanged(nextVisible) {
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(nextVisible);
},
removeOnLeave: false,
leavedClassName: "".concat(prefixCls, "-content-wrapper-hidden")
}), function (_ref3, motionRef) {
var motionClassName = _ref3.className,
motionStyle = _ref3.style;
var content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DrawerPanel, (0,esm_extends["default"])({
id: id,
containerRef: motionRef,
prefixCls: prefixCls,
className: classnames_default()(className, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.content),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), styles === null || styles === void 0 ? void 0 : styles.content)
}, (0,pickAttrs["default"])(props, {
aria: true
}), eventHandlers), children);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
className: classnames_default()("".concat(prefixCls, "-content-wrapper"), drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.wrapper, motionClassName),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, wrapperStyle), motionStyle), styles === null || styles === void 0 ? void 0 : styles.wrapper)
}, (0,pickAttrs["default"])(props, {
data: true
})), drawerRender ? drawerRender(content) : content);
});
// =========================== Render ===========================
var containerStyle = (0,objectSpread2["default"])({}, rootStyle);
if (zIndex) {
containerStyle.zIndex = zIndex;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_drawer_es_context.Provider, {
value: mergedContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), rootClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-open"), open), "".concat(prefixCls, "-inline"), inline)),
style: containerStyle,
tabIndex: -1,
ref: panelRef,
onKeyDown: onPanelKeyDown
}, maskNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
tabIndex: 0,
ref: sentinelStartRef,
style: DrawerPopup_sentinelStyle,
"aria-hidden": "true",
"data-sentinel": "start"
}), panelNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
tabIndex: 0,
ref: sentinelEndRef,
style: DrawerPopup_sentinelStyle,
"aria-hidden": "true",
"data-sentinel": "end"
})));
}
var RefDrawerPopup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DrawerPopup);
if (true) {
RefDrawerPopup.displayName = 'DrawerPopup';
}
/* harmony default export */ var es_DrawerPopup = (RefDrawerPopup);
;// ./node_modules/rc-drawer/es/Drawer.js
var Drawer = function Drawer(props) {
var _props$open = props.open,
open = _props$open === void 0 ? false : _props$open,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'right' : _props$placement,
_props$autoFocus = props.autoFocus,
autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
_props$width = props.width,
width = _props$width === void 0 ? 378 : _props$width,
_props$mask = props.mask,
mask = _props$mask === void 0 ? true : _props$mask,
_props$maskClosable = props.maskClosable,
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
getContainer = props.getContainer,
forceRender = props.forceRender,
afterOpenChange = props.afterOpenChange,
destroyOnClose = props.destroyOnClose,
onMouseEnter = props.onMouseEnter,
onMouseOver = props.onMouseOver,
onMouseLeave = props.onMouseLeave,
onClick = props.onClick,
onKeyDown = props.onKeyDown,
onKeyUp = props.onKeyUp,
panelRef = props.panelRef;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
animatedVisible = _React$useState2[0],
setAnimatedVisible = _React$useState2[1];
// ============================= Warn =============================
if (true) {
warnCheck(props);
}
// ============================= Open =============================
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
mounted = _React$useState4[0],
setMounted = _React$useState4[1];
(0,useLayoutEffect["default"])(function () {
setMounted(true);
}, []);
var mergedOpen = mounted ? open : false;
// ============================ Focus =============================
var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var lastActiveRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
(0,useLayoutEffect["default"])(function () {
if (mergedOpen) {
lastActiveRef.current = document.activeElement;
}
}, [mergedOpen]);
// ============================= Open =============================
var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) {
var _popupRef$current;
setAnimatedVisible(nextVisible);
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(nextVisible);
if (!nextVisible && lastActiveRef.current && !((_popupRef$current = popupRef.current) !== null && _popupRef$current !== void 0 && _popupRef$current.contains(lastActiveRef.current))) {
var _lastActiveRef$curren;
(_lastActiveRef$curren = lastActiveRef.current) === null || _lastActiveRef$curren === void 0 || _lastActiveRef$curren.focus({
preventScroll: true
});
}
};
// =========================== Context ============================
var refContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
panel: panelRef
};
}, [panelRef]);
// ============================ Render ============================
if (!forceRender && !animatedVisible && !mergedOpen && destroyOnClose) {
return null;
}
var eventHandlers = {
onMouseEnter: onMouseEnter,
onMouseOver: onMouseOver,
onMouseLeave: onMouseLeave,
onClick: onClick,
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
};
var drawerPopupProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
open: mergedOpen,
prefixCls: prefixCls,
placement: placement,
autoFocus: autoFocus,
keyboard: keyboard,
width: width,
mask: mask,
maskClosable: maskClosable,
inline: getContainer === false,
afterOpenChange: internalAfterOpenChange,
ref: popupRef
}, eventHandlers);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_RefContext.Provider, {
value: refContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
open: mergedOpen || forceRender || animatedVisible,
autoDestroy: false,
getContainer: getContainer,
autoLock: mask && (mergedOpen || animatedVisible)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DrawerPopup, drawerPopupProps)));
};
if (true) {
Drawer.displayName = 'Drawer';
}
/* harmony default export */ var es_Drawer = (Drawer);
;// ./node_modules/rc-drawer/es/index.js
// export this package's api
/* harmony default export */ var rc_drawer_es = (es_Drawer);
;// ./components/drawer/DrawerPanel.tsx
const DrawerPanel_DrawerPanel = props => {
var _a, _b;
const {
prefixCls,
title,
footer,
extra,
loading,
onClose,
headerStyle,
bodyStyle,
footerStyle,
children,
classNames: drawerClassNames,
styles: drawerStyles
} = props;
const drawerContext = (0,config_provider_context.useComponentConfig)('drawer');
const customCloseIconRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(icon => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
onClick: onClose,
"aria-label": "Close",
className: `${prefixCls}-close`
}, icon)), [onClose]);
const [mergedClosable, mergedCloseIcon] = useClosable(pickClosable(props), pickClosable(drawerContext), {
closable: true,
closeIconRender: customCloseIconRender
});
const headerNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b;
if (!title && !mergedClosable) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: Object.assign(Object.assign(Object.assign({}, (_a = drawerContext.styles) === null || _a === void 0 ? void 0 : _a.header), headerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.header),
className: classnames_default()(`${prefixCls}-header`, {
[`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra
}, (_b = drawerContext.classNames) === null || _b === void 0 ? void 0 : _b.header, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.header)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-header-title`
}, mergedCloseIcon, title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-title`
}, title)), extra && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-extra`
}, extra));
}, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]);
const footerNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b;
if (!footer) {
return null;
}
const footerClassName = `${prefixCls}-footer`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(footerClassName, (_a = drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.footer, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.footer),
style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext.styles) === null || _b === void 0 ? void 0 : _b.footer), footerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.footer)
}, footer);
}, [footer, footerStyle, prefixCls]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, headerNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-body`, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.body, (_a = drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.body),
style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext.styles) === null || _b === void 0 ? void 0 : _b.body), bodyStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.body)
}, loading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
active: true,
title: false,
paragraph: {
rows: 5
},
className: `${prefixCls}-body-skeleton`
})) : children), footerNode);
};
/* harmony default export */ var drawer_DrawerPanel = (DrawerPanel_DrawerPanel);
// EXTERNAL MODULE: ./components/drawer/style/index.ts + 1 modules
var drawer_style = __webpack_require__("./components/drawer/style/index.ts");
;// ./components/drawer/index.tsx
var drawer_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;
};
const _SizeTypes = ['default', 'large'];
const defaultPushState = {
distance: 180
};
const drawer_Drawer = props => {
var _a;
const {
rootClassName,
width,
height,
size = 'default',
mask = true,
push = defaultPushState,
open,
afterOpenChange,
onClose,
prefixCls: customizePrefixCls,
getContainer: customizeGetContainer,
style,
className,
// Deprecated
visible,
afterVisibleChange,
maskStyle,
drawerStyle,
contentWrapperStyle
} = props,
rest = drawer_rest(props, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "style", "className", "visible", "afterVisibleChange", "maskStyle", "drawerStyle", "contentWrapperStyle"]);
const {
getPopupContainer,
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('drawer');
const prefixCls = getPrefixCls('drawer', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,drawer_style["default"])(prefixCls);
const getContainer =
// 有可能为 false,所以不能直接判断
customizeGetContainer === undefined && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer;
const drawerClassName = classnames_default()({
'no-mask': !mask,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, rootClassName, hashId, cssVarCls);
// ========================== Warning ===========================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Drawer');
[['visible', 'open'], ['afterVisibleChange', 'afterOpenChange'], ['headerStyle', 'styles.header'], ['bodyStyle', 'styles.body'], ['footerStyle', 'styles.footer'], ['contentWrapperStyle', 'styles.wrapper'], ['maskStyle', 'styles.mask'], ['drawerStyle', 'styles.content']].forEach(_ref => {
let [deprecatedName, newName] = _ref;
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
});
if (getContainer !== undefined && ((_a = props.style) === null || _a === void 0 ? void 0 : _a.position) === 'absolute') {
true ? warning(false, 'breaking', '`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.') : 0;
}
}
// ============================ Size ============================
const mergedWidth = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => width !== null && width !== void 0 ? width : size === 'large' ? 736 : 378, [width, size]);
const mergedHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => height !== null && height !== void 0 ? height : size === 'large' ? 736 : 378, [height, size]);
// =========================== Motion ===========================
const maskMotion = {
motionName: (0,_util_motion.getTransitionName)(prefixCls, 'mask-motion'),
motionAppear: true,
motionEnter: true,
motionLeave: true,
motionDeadline: 500
};
const panelMotion = motionPlacement => ({
motionName: (0,_util_motion.getTransitionName)(prefixCls, `panel-motion-${motionPlacement}`),
motionAppear: true,
motionEnter: true,
motionLeave: true,
motionDeadline: 500
});
// ============================ Refs ============================
// Select `ant-drawer-content` by `panelRef`
const panelRef = usePanelRef();
// ============================ zIndex ============================
const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Drawer', rest.zIndex);
// =========================== Render ===========================
const {
classNames: propClassNames = {},
styles: propStyles = {}
} = rest;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
form: true,
space: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
value: contextZIndex
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_drawer_es, Object.assign({
prefixCls: prefixCls,
onClose: onClose,
maskMotion: maskMotion,
motion: panelMotion
}, rest, {
classNames: {
mask: classnames_default()(propClassNames.mask, contextClassNames.mask),
content: classnames_default()(propClassNames.content, contextClassNames.content),
wrapper: classnames_default()(propClassNames.wrapper, contextClassNames.wrapper)
},
styles: {
mask: Object.assign(Object.assign(Object.assign({}, propStyles.mask), maskStyle), contextStyles.mask),
content: Object.assign(Object.assign(Object.assign({}, propStyles.content), drawerStyle), contextStyles.content),
wrapper: Object.assign(Object.assign(Object.assign({}, propStyles.wrapper), contentWrapperStyle), contextStyles.wrapper)
},
open: open !== null && open !== void 0 ? open : visible,
mask: mask,
push: push,
width: mergedWidth,
height: mergedHeight,
style: Object.assign(Object.assign({}, contextStyle), style),
className: classnames_default()(contextClassName, className),
rootClassName: drawerClassName,
getContainer: getContainer,
afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,
panelRef: panelRef,
zIndex: zIndex
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(drawer_DrawerPanel, Object.assign({
prefixCls: prefixCls
}, rest, {
onClose: onClose
}))))));
};
/** @private Internal Component. Do not use in your production. */
const drawer_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
style,
className,
placement = 'right'
} = props,
restProps = drawer_rest(props, ["prefixCls", "style", "className", "placement"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('drawer', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,drawer_style["default"])(prefixCls);
const cls = classnames_default()(prefixCls, `${prefixCls}-pure`, `${prefixCls}-${placement}`, hashId, cssVarCls, className);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: cls,
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(drawer_DrawerPanel, Object.assign({
prefixCls: prefixCls
}, restProps))));
};
drawer_Drawer._InternalPanelDoNotUseOrYouWillBeFired = drawer_PurePanel;
if (true) {
drawer_Drawer.displayName = 'Drawer';
}
/* harmony default export */ var drawer = (drawer_Drawer);
;// ./components/_util/gapSize.ts
function isPresetSize(size) {
return ['small', 'middle', 'large'].includes(size);
}
function isValidGapNumber(size) {
if (!size) {
// The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.
return false;
}
return typeof size === 'number' && !Number.isNaN(size);
}
;// ./components/space/context.ts
const SpaceContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
latestIndex: 0
});
const SpaceContextProvider = SpaceContext.Provider;
;// ./components/space/Item.tsx
const space_Item_Item = _ref => {
let {
className,
index,
children,
split,
style
} = _ref;
const {
latestIndex
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SpaceContext);
if (children === null || children === undefined) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className,
style: style
}, children), index < latestIndex && split && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${className}-split`
}, split));
};
/* harmony default export */ var space_Item = (space_Item_Item);
;// ./components/space/index.tsx
var space_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;
};
const InternalSpace = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a;
const {
getPrefixCls,
direction: directionConfig,
size: contextSize,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('space');
const {
size = contextSize !== null && contextSize !== void 0 ? contextSize : 'small',
align,
className,
rootClassName,
children,
direction = 'horizontal',
prefixCls: customizePrefixCls,
split,
style,
wrap = false,
classNames: customClassNames,
styles
} = props,
otherProps = space_rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]);
const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];
const isPresetVerticalSize = isPresetSize(verticalSize);
const isPresetHorizontalSize = isPresetSize(horizontalSize);
const isValidVerticalSize = isValidGapNumber(verticalSize);
const isValidHorizontalSize = isValidGapNumber(horizontalSize);
const childNodes = (0,toArray["default"])(children, {
keepEmpty: true
});
const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;
const prefixCls = getPrefixCls('space', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,space_style["default"])(prefixCls);
const cls = classnames_default()(prefixCls, contextClassName, hashId, `${prefixCls}-${direction}`, {
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
[`${prefixCls}-align-${mergedAlign}`]: mergedAlign,
[`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,
[`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize
}, className, rootClassName, cssVarCls);
const itemClassName = classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : contextClassNames.item);
// Calculate latest one
let latestIndex = 0;
const nodes = childNodes.map((child, i) => {
var _a;
if (child !== null && child !== undefined) {
latestIndex = i;
}
const key = (child === null || child === void 0 ? void 0 : child.key) || `${itemClassName}-${i}`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(space_Item, {
className: itemClassName,
key: key,
index: i,
split: split,
style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : contextStyles.item
}, child);
});
const spaceContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
latestIndex
}), [latestIndex]);
// =========================== Render ===========================
if (childNodes.length === 0) {
return null;
}
const gapStyle = {};
if (wrap) {
gapStyle.flexWrap = 'wrap';
}
if (!isPresetHorizontalSize && isValidHorizontalSize) {
gapStyle.columnGap = horizontalSize;
}
if (!isPresetVerticalSize && isValidVerticalSize) {
gapStyle.rowGap = verticalSize;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
ref: ref,
className: cls,
style: Object.assign(Object.assign(Object.assign({}, gapStyle), contextStyle), style)
}, otherProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SpaceContextProvider, {
value: spaceContext
}, nodes)));
});
const Space = InternalSpace;
Space.Compact = space_Compact;
if (true) {
Space.displayName = 'Space';
}
/* harmony default export */ var space = (Space);
;// ./components/dropdown/dropdown-button.tsx
var dropdown_button_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;
};
const DropdownButton = props => {
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
type = 'default',
danger,
disabled,
loading,
onClick,
htmlType,
children,
className,
menu,
arrow,
autoFocus,
overlay,
trigger,
align,
open,
onOpenChange,
placement,
getPopupContainer,
href,
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EllipsisOutlined, null),
title,
buttonsRender = buttons => buttons,
mouseEnterDelay,
mouseLeaveDelay,
overlayClassName,
overlayStyle,
destroyPopupOnHide,
dropdownRender
} = props,
restProps = dropdown_button_rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]);
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
const buttonPrefixCls = `${prefixCls}-button`;
const dropdownProps = {
menu,
arrow,
autoFocus,
align,
disabled,
trigger: disabled ? [] : trigger,
onOpenChange,
getPopupContainer: getPopupContainer || getContextPopupContainer,
mouseEnterDelay,
mouseLeaveDelay,
overlayClassName,
overlayStyle,
destroyPopupOnHide,
dropdownRender
};
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const classes = classnames_default()(buttonPrefixCls, compactItemClassnames, className);
if ('overlay' in props) {
dropdownProps.overlay = overlay;
}
if ('open' in props) {
dropdownProps.open = open;
}
if ('placement' in props) {
dropdownProps.placement = placement;
} else {
dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';
}
const leftButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
type: type,
danger: danger,
disabled: disabled,
loading: loading,
onClick: onClick,
htmlType: htmlType,
href: href,
title: title
}, children);
const rightButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
type: type,
danger: danger,
icon: icon
});
const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(space.Compact, Object.assign({
className: classes,
size: compactSize,
block: true
}, restProps), leftButtonToRender, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(dropdown, Object.assign({}, dropdownProps), rightButtonToRender));
};
DropdownButton.__ANT_BUTTON = true;
/* harmony default export */ var dropdown_button = (DropdownButton);
;// ./components/dropdown/index.tsx
const components_dropdown_Dropdown = dropdown;
components_dropdown_Dropdown.Button = dropdown_button;
/* harmony default export */ var components_dropdown = (components_dropdown_Dropdown);
// EXTERNAL MODULE: ./components/flex/style/index.ts
var flex_style = __webpack_require__("./components/flex/style/index.ts");
// EXTERNAL MODULE: ./components/flex/utils.ts
var utils = __webpack_require__("./components/flex/utils.ts");
;// ./components/flex/index.tsx
var flex_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;
};
const Flex = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
rootClassName,
className,
style,
flex,
gap,
children,
vertical = false,
component: Component = 'div'
} = props,
othersProps = flex_rest(props, ["prefixCls", "rootClassName", "className", "style", "flex", "gap", "children", "vertical", "component"]);
const {
flex: ctxFlex,
direction: ctxDirection,
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('flex', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,flex_style["default"])(prefixCls);
const mergedVertical = vertical !== null && vertical !== void 0 ? vertical : ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.vertical;
const mergedCls = classnames_default()(className, rootClassName, ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.className, prefixCls, hashId, cssVarCls, (0,utils["default"])(prefixCls, props), {
[`${prefixCls}-rtl`]: ctxDirection === 'rtl',
[`${prefixCls}-gap-${gap}`]: isPresetSize(gap),
[`${prefixCls}-vertical`]: mergedVertical
});
const mergedStyle = Object.assign(Object.assign({}, ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.style), style);
if (flex) {
mergedStyle.flex = flex;
}
if (gap && !isPresetSize(gap)) {
mergedStyle.gap = gap;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, Object.assign({
ref: ref,
className: mergedCls,
style: mergedStyle
}, (0,omit["default"])(othersProps, ['justify', 'wrap', 'align'])), children));
});
if (true) {
Flex.displayName = 'Flex';
}
/* harmony default export */ var flex = (Flex);
;// ./components/float-button/context.ts
const FloatButtonGroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(undefined);
const {
Provider: FloatButtonGroupProvider
} = FloatButtonGroupContext;
/* harmony default export */ var float_button_context = (FloatButtonGroupContext);
;// ./node_modules/@ant-design/icons-svg/es/asn/FileTextOutlined.js
// This icon file is generated automatically.
var FileTextOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" };
/* harmony default export */ var asn_FileTextOutlined = (FileTextOutlined);
;// ./node_modules/@ant-design/icons/es/icons/FileTextOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FileTextOutlined_FileTextOutlined = function FileTextOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_FileTextOutlined
}));
};
/** */
var FileTextOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FileTextOutlined_FileTextOutlined);
if (true) {
FileTextOutlined_RefIcon.displayName = 'FileTextOutlined';
}
/* harmony default export */ var icons_FileTextOutlined = (FileTextOutlined_RefIcon);
;// ./components/float-button/FloatButtonContent.tsx
var FloatButtonContent_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;
};
const FloatButtonContent = props => {
const {
icon,
description,
prefixCls,
className
} = props,
rest = FloatButtonContent_rest(props, ["icon", "description", "prefixCls", "className"]);
const defaultElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-icon`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_FileTextOutlined, null));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({}, rest, {
className: classnames_default()(className, `${prefixCls}-content`)
}), icon || description ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, icon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-icon`
}, icon), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-description`
}, description))) : defaultElement);
};
/* harmony default export */ var float_button_FloatButtonContent = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.memo)(FloatButtonContent));
// EXTERNAL MODULE: ./components/float-button/style/index.ts + 2 modules
var float_button_style = __webpack_require__("./components/float-button/style/index.ts");
;// ./components/float-button/FloatButton.tsx
var FloatButton_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;
};
const floatButtonPrefixCls = 'float-btn';
const InternalFloatButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
type = 'default',
shape = 'circle',
icon,
description,
tooltip,
htmlType = 'button',
badge = {}
} = props,
restProps = FloatButton_rest(props, ["prefixCls", "className", "rootClassName", "style", "type", "shape", "icon", "description", "tooltip", "htmlType", "badge"]);
const {
getPrefixCls,
direction
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const groupShape = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(float_button_context);
const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,float_button_style["default"])(prefixCls, rootCls);
const mergedShape = groupShape || shape;
const classString = classnames_default()(hashId, cssVarCls, rootCls, prefixCls, className, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${mergedShape}`, {
[`${prefixCls}-rtl`]: direction === 'rtl'
});
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex);
const mergedStyle = Object.assign(Object.assign({}, style), {
zIndex
});
// 虽然在 ts 中已经 omit 过了,但是为了防止多余的属性被透传进来,这里再 omit 一遍,以防万一
const badgeProps = (0,omit["default"])(badge, ['title', 'children', 'status', 'text']);
let buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-body`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(float_button_FloatButtonContent, {
prefixCls: prefixCls,
description: description,
icon: icon
}));
if ('badge' in props) {
buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_badge, Object.assign({}, badgeProps), buttonNode);
}
if ('tooltip' in props) {
buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_tooltip, {
title: tooltip,
placement: direction === 'rtl' ? 'right' : 'left'
}, buttonNode);
}
if (true) {
const warning = (0,_util_warning.devUseWarning)('FloatButton');
true ? warning(!(shape === 'circle' && description), 'usage', 'supported only when `shape` is `square`. Due to narrow space for text, short sentence is recommended.') : 0;
}
return wrapCSSVar(props.href ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", Object.assign({
ref: ref
}, restProps, {
className: classString,
style: mergedStyle
}), buttonNode)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", Object.assign({
ref: ref
}, restProps, {
className: classString,
style: mergedStyle,
type: htmlType
}), buttonNode)));
});
const FloatButton = InternalFloatButton;
if (true) {
FloatButton.displayName = 'FloatButton';
}
/* harmony default export */ var float_button_FloatButton = (FloatButton);
;// ./components/float-button/BackTop.tsx
var BackTop_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;
};
const BackTop_BackTop = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
type = 'default',
shape = 'circle',
visibilityHeight = 400,
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_VerticalAlignTopOutlined, null),
target,
onClick,
duration = 450
} = props,
restProps = BackTop_rest(props, ["prefixCls", "className", "type", "shape", "visibilityHeight", "icon", "target", "onClick", "duration"]);
const [visible, setVisible] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(visibilityHeight === 0);
const internalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => ({
nativeElement: internalRef.current
}));
const getDefaultTarget = () => {
var _a;
return ((_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window;
};
const handleScroll = _util_throttleByAnimationFrame(e => {
const scrollTop = _util_getScroll(e.target);
setVisible(scrollTop >= visibilityHeight);
});
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
const getTarget = target || getDefaultTarget;
const container = getTarget();
handleScroll({
target: container
});
container === null || container === void 0 ? void 0 : container.addEventListener('scroll', handleScroll);
return () => {
handleScroll.cancel();
container === null || container === void 0 ? void 0 : container.removeEventListener('scroll', handleScroll);
};
}, [target]);
const scrollToTop = e => {
scrollTo(0, {
getContainer: target || getDefaultTarget,
duration
});
onClick === null || onClick === void 0 ? void 0 : onClick(e);
};
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const groupShape = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(float_button_context);
const mergedShape = groupShape || shape;
const contentProps = Object.assign({
prefixCls,
icon,
type,
shape: mergedShape
}, restProps);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es["default"], {
visible: visible,
motionName: `${rootPrefixCls}-fade`
}, (_ref, setRef) => {
let {
className: motionClassName
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(float_button_FloatButton, Object.assign({
ref: (0,es_ref.composeRef)(internalRef, setRef)
}, contentProps, {
onClick: scrollToTop,
className: classnames_default()(className, motionClassName)
}));
});
});
if (true) {
BackTop_BackTop.displayName = 'BackTop';
}
/* harmony default export */ var float_button_BackTop = (BackTop_BackTop);
;// ./components/float-button/FloatButtonGroup.tsx
var FloatButtonGroup_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;
};
const FloatButtonGroup = props => {
var _a;
const {
prefixCls: customizePrefixCls,
className,
style,
shape = 'circle',
type = 'default',
placement = 'top',
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_FileTextOutlined, null),
closeIcon,
description,
trigger,
children,
onOpenChange,
open: customOpen,
onClick: onTriggerButtonClick
} = props,
floatButtonProps = FloatButtonGroup_rest(props, ["prefixCls", "className", "style", "shape", "type", "placement", "icon", "closeIcon", "description", "trigger", "children", "onOpenChange", "open", "onClick"]);
const {
direction,
getPrefixCls,
closeIcon: contextCloseIcon
} = (0,config_provider_context.useComponentConfig)('floatButtonGroup');
const mergedCloseIcon = (_a = closeIcon !== null && closeIcon !== void 0 ? closeIcon : contextCloseIcon) !== null && _a !== void 0 ? _a : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, null);
const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,float_button_style["default"])(prefixCls, rootCls);
const groupPrefixCls = `${prefixCls}-group`;
const isMenuMode = trigger && ['click', 'hover'].includes(trigger);
const isValidPlacement = placement && ['top', 'left', 'right', 'bottom'].includes(placement);
const groupCls = classnames_default()(groupPrefixCls, hashId, cssVarCls, rootCls, className, {
[`${groupPrefixCls}-rtl`]: direction === 'rtl',
[`${groupPrefixCls}-${shape}`]: shape,
[`${groupPrefixCls}-${shape}-shadow`]: !isMenuMode,
[`${groupPrefixCls}-${placement}`]: isMenuMode && isValidPlacement // 只有菜单模式才支持弹出方向
});
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex);
const mergedStyle = Object.assign(Object.assign({}, style), {
zIndex
});
const wrapperCls = classnames_default()(hashId, `${groupPrefixCls}-wrap`);
const [open, setOpen] = (0,useMergedState["default"])(false, {
value: customOpen
});
const floatButtonGroupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
// ========================== Open ==========================
const hoverTrigger = trigger === 'hover';
const clickTrigger = trigger === 'click';
const triggerOpen = (0,useEvent["default"])(nextOpen => {
if (open !== nextOpen) {
setOpen(nextOpen);
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen);
}
});
// ===================== Trigger: Hover =====================
const onMouseEnter = () => {
if (hoverTrigger) {
triggerOpen(true);
}
};
const onMouseLeave = () => {
if (hoverTrigger) {
triggerOpen(false);
}
};
// ===================== Trigger: Click =====================
const onInternalTriggerButtonClick = e => {
if (clickTrigger) {
triggerOpen(!open);
}
onTriggerButtonClick === null || onTriggerButtonClick === void 0 ? void 0 : onTriggerButtonClick(e);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
if (clickTrigger) {
const onDocClick = e => {
var _a;
// Skip if click on the group
if ((_a = floatButtonGroupRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
return;
}
triggerOpen(false);
};
document.addEventListener('click', onDocClick, {
capture: true
});
return () => document.removeEventListener('click', onDocClick, {
capture: true
});
}
}, [clickTrigger]);
// ======================== Warning =========================
if (true) {
const warning = (0,_util_warning.devUseWarning)('FloatButton.Group');
true ? warning(!('open' in props) || !!trigger, 'usage', '`open` need to be used together with `trigger`') : 0;
}
// ========================= Render =========================
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(FloatButtonGroupProvider, {
value: shape
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: floatButtonGroupRef,
className: groupCls,
style: mergedStyle,
// Hover trigger
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave
}, isMenuMode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es["default"], {
visible: open,
motionName: `${groupPrefixCls}-wrap`
}, _ref => {
let {
className: motionClassName
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(motionClassName, wrapperCls)
}, children);
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(float_button_FloatButton, Object.assign({
type: type,
icon: open ? mergedCloseIcon : icon,
description: description,
"aria-label": props['aria-label'],
className: `${groupPrefixCls}-trigger`,
onClick: onInternalTriggerButtonClick
}, floatButtonProps)))) : children)));
};
/* harmony default export */ var float_button_FloatButtonGroup = (FloatButtonGroup);
;// ./components/float-button/PurePanel.tsx
var float_button_PurePanel_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;
};
/* eslint-disable react/no-array-index-key */
const PureFloatButton = _a => {
var {
backTop
} = _a,
props = float_button_PurePanel_rest(_a, ["backTop"]);
return backTop ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(float_button_BackTop, Object.assign({}, props, {
visibilityHeight: 0
})) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(float_button_FloatButton, Object.assign({}, props));
};
/** @private Internal Component. Do not use in your production. */
const float_button_PurePanel_PurePanel = _a => {
var {
className,
items
} = _a,
props = float_button_PurePanel_rest(_a, ["className", "items"]);
const {
prefixCls: customizePrefixCls
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
const pureCls = `${prefixCls}-pure`;
if (items) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(float_button_FloatButtonGroup, Object.assign({
className: classnames_default()(className, pureCls)
}, props), items.map((item, index) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureFloatButton, Object.assign({
key: index
}, item)))));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureFloatButton, Object.assign({
className: classnames_default()(className, pureCls)
}, props));
};
/* harmony default export */ var float_button_PurePanel = (float_button_PurePanel_PurePanel);
;// ./components/float-button/index.tsx
float_button_FloatButton.BackTop = float_button_BackTop;
float_button_FloatButton.Group = float_button_FloatButtonGroup;
float_button_FloatButton._InternalPanelDoNotUseOrYouWillBeFired = float_button_PurePanel;
/* harmony default export */ var float_button = (float_button_FloatButton);
;// ./components/form/hooks/useDebounce.ts
function useDebounce(value) {
const [cacheValue, setCacheValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const timeout = setTimeout(() => {
setCacheValue(value);
}, value.length ? 0 : 10);
return () => {
clearTimeout(timeout);
};
}, [value]);
return cacheValue;
}
// EXTERNAL MODULE: ./components/form/style/index.ts + 1 modules
var form_style = __webpack_require__("./components/form/style/index.ts");
;// ./components/form/ErrorList.tsx
const ErrorList_EMPTY_LIST = [];
function toErrorEntity(error, prefix, errorStatus) {
let index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
return {
key: typeof error === 'string' ? error : `${prefix}-${index}`,
error,
errorStatus
};
}
const ErrorList = _ref => {
let {
help,
helpStatus,
errors = ErrorList_EMPTY_LIST,
warnings = ErrorList_EMPTY_LIST,
className: rootClassName,
fieldId,
onVisibleChanged
} = _ref;
const {
prefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemPrefixContext);
const baseClassName = `${prefixCls}-item-explain`;
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,form_style["default"])(prefixCls, rootCls);
const collapseMotion = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,_util_motion["default"])(prefixCls), [prefixCls]);
// We have to debounce here again since somewhere use ErrorList directly still need no shaking
// ref: https://github.com/ant-design/ant-design/issues/36336
const debounceErrors = useDebounce(errors);
const debounceWarnings = useDebounce(warnings);
const fullKeyList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (help !== undefined && help !== null) {
return [toErrorEntity(help, 'help', helpStatus)];
}
return [].concat((0,toConsumableArray["default"])(debounceErrors.map((error, index) => toErrorEntity(error, 'error', 'error', index))), (0,toConsumableArray["default"])(debounceWarnings.map((warning, index) => toErrorEntity(warning, 'warning', 'warning', index))));
}, [help, helpStatus, debounceErrors, debounceWarnings]);
const filledKeyFullKeyList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const keysCount = {};
fullKeyList.forEach(_ref2 => {
let {
key
} = _ref2;
keysCount[key] = (keysCount[key] || 0) + 1;
});
return fullKeyList.map((entity, index) => Object.assign(Object.assign({}, entity), {
key: keysCount[entity.key] > 1 ? `${entity.key}-fallback-${index}` : entity.key
}));
}, [fullKeyList]);
const helpProps = {};
if (fieldId) {
helpProps.id = `${fieldId}_help`;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
motionDeadline: collapseMotion.motionDeadline,
motionName: `${prefixCls}-show-help`,
visible: !!filledKeyFullKeyList.length,
onVisibleChanged: onVisibleChanged
}, holderProps => {
const {
className: holderClassName,
style: holderStyle
} = holderProps;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, helpProps, {
className: classnames_default()(baseClassName, holderClassName, cssVarCls, rootCls, rootClassName, hashId),
style: holderStyle
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es.CSSMotionList, Object.assign({
keys: filledKeyFullKeyList
}, (0,_util_motion["default"])(prefixCls), {
motionName: `${prefixCls}-show-help-item`,
component: false
}), itemProps => {
const {
key,
error,
errorStatus,
className: itemClassName,
style: itemStyle
} = itemProps;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
key: key,
className: classnames_default()(itemClassName, {
[`${baseClassName}-${errorStatus}`]: errorStatus
}),
style: itemStyle
}, error);
}));
}));
};
/* harmony default export */ var form_ErrorList = (ErrorList);
;// ./components/form/util.ts
// form item name black list. in form ,you can use form.id get the form item element.
// use object hasOwnProperty will get better performance if black list is longer.
const formItemNameBlackList = ['parentNode'];
// default form item id prefix.
const defaultItemNamePrefixCls = 'form_item';
function util_toArray(candidate) {
if (candidate === undefined || candidate === false) return [];
return Array.isArray(candidate) ? candidate : [candidate];
}
function getFieldId(namePath, formName) {
if (!namePath.length) {
return undefined;
}
const mergedId = namePath.join('_');
if (formName) {
return `${formName}_${mergedId}`;
}
const isIllegalName = formItemNameBlackList.includes(mergedId);
return isIllegalName ? `${defaultItemNamePrefixCls}_${mergedId}` : mergedId;
}
/**
* Get merged status by meta or passed `validateStatus`.
*/
function getStatus(errors, warnings, meta, defaultValidateStatus, hasFeedback, validateStatus) {
let status = defaultValidateStatus;
if (validateStatus !== undefined) {
status = validateStatus;
} else if (meta.validating) {
status = 'validating';
} else if (errors.length) {
status = 'error';
} else if (warnings.length) {
status = 'warning';
} else if (meta.touched || hasFeedback && meta.validated) {
// success feedback should display when pass hasFeedback prop and current value is valid value
status = 'success';
}
return status;
}
;// ./components/form/hooks/useForm.ts
var useForm_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 toNamePathStr(name) {
const namePath = util_toArray(name);
return namePath.join('_');
}
function getFieldDOMNode(name, wrapForm) {
const field = wrapForm.getFieldInstance(name);
const fieldDom = (0,findDOMNode.getDOM)(field);
if (fieldDom) {
return fieldDom;
}
const fieldId = getFieldId(util_toArray(name), wrapForm.__INTERNAL__.name);
if (fieldId) {
return document.getElementById(fieldId);
}
}
function useForm_useForm(form) {
const [rcForm] = es_useForm();
const itemsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
const wrapForm = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => form !== null && form !== void 0 ? form : Object.assign(Object.assign({}, rcForm), {
__INTERNAL__: {
itemRef: name => node => {
const namePathStr = toNamePathStr(name);
if (node) {
itemsRef.current[namePathStr] = node;
} else {
delete itemsRef.current[namePathStr];
}
}
},
scrollToField: function (name) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const {
focus
} = options,
restOpt = useForm_rest(options, ["focus"]);
const node = getFieldDOMNode(name, wrapForm);
if (node) {
dist_e(node, Object.assign({
scrollMode: 'if-needed',
block: 'nearest'
}, restOpt));
// Focus if scroll success
if (focus) {
wrapForm.focusField(name);
}
}
},
focusField: name => {
var _a, _b;
const itemRef = wrapForm.getFieldInstance(name);
if (typeof (itemRef === null || itemRef === void 0 ? void 0 : itemRef.focus) === 'function') {
itemRef.focus();
} else {
(_b = (_a = getFieldDOMNode(name, wrapForm)) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
}
},
getFieldInstance: name => {
const namePathStr = toNamePathStr(name);
return itemsRef.current[namePathStr];
}
}), [form, rcForm]);
return [wrapForm];
}
;// ./components/form/hooks/useFormWarning.ts
const names = {};
function useFormWarning(_ref) {
let {
name
} = _ref;
const warning = (0,_util_warning.devUseWarning)('Form');
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (name) {
names[name] = (names[name] || 0) + 1;
true ? warning(names[name] <= 1, 'usage', 'There exist multiple Form with same `name`.') : 0;
return () => {
names[name] -= 1;
};
}
}, [name]);
}
;// ./components/form/Form.tsx
var Form_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;
};
const Form_InternalForm = (props, ref) => {
const contextDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const {
getPrefixCls,
direction,
requiredMark: contextRequiredMark,
colon: contextColon,
scrollToFirstError: contextScrollToFirstError,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('form');
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
size,
disabled = contextDisabled,
form,
colon,
labelAlign,
labelWrap,
labelCol,
wrapperCol,
hideRequiredMark,
layout = 'horizontal',
scrollToFirstError,
requiredMark,
onFinishFailed,
name,
style,
feedbackIcons,
variant
} = props,
restFormProps = Form_rest(props, ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons", "variant"]);
const mergedSize = (0,useSize["default"])(size);
const contextValidateMessages = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(validateMessagesContext);
if (true) {
// eslint-disable-next-line react-hooks/rules-of-hooks
useFormWarning(props);
}
const mergedRequiredMark = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (requiredMark !== undefined) {
return requiredMark;
}
if (hideRequiredMark) {
return false;
}
if (contextRequiredMark !== undefined) {
return contextRequiredMark;
}
return true;
}, [hideRequiredMark, requiredMark, contextRequiredMark]);
const mergedColon = colon !== null && colon !== void 0 ? colon : contextColon;
const prefixCls = getPrefixCls('form', customizePrefixCls);
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,form_style["default"])(prefixCls, rootCls);
const formClassName = classnames_default()(prefixCls, `${prefixCls}-${layout}`, {
[`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,
// todo: remove in next major version
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${mergedSize}`]: mergedSize
}, cssVarCls, rootCls, hashId, contextClassName, className, rootClassName);
const [wrapForm] = useForm_useForm(form);
const {
__INTERNAL__
} = wrapForm;
__INTERNAL__.name = name;
const formContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
name,
labelAlign,
labelCol,
labelWrap,
wrapperCol,
vertical: layout === 'vertical',
colon: mergedColon,
requiredMark: mergedRequiredMark,
itemRef: __INTERNAL__.itemRef,
form: wrapForm,
feedbackIcons
}), [name, labelAlign, labelCol, wrapperCol, layout, mergedColon, mergedRequiredMark, wrapForm, feedbackIcons]);
const nativeElementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => {
var _a;
return Object.assign(Object.assign({}, wrapForm), {
nativeElement: (_a = nativeElementRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement
});
});
const scrollToField = (options, fieldName) => {
if (options) {
let defaultScrollToFirstError = {
block: 'nearest'
};
if (typeof options === 'object') {
defaultScrollToFirstError = Object.assign(Object.assign({}, defaultScrollToFirstError), options);
}
wrapForm.scrollToField(fieldName, defaultScrollToFirstError);
}
};
const onInternalFinishFailed = errorInfo => {
onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errorInfo);
if (errorInfo.errorFields.length) {
const fieldName = errorInfo.errorFields[0].name;
if (scrollToFirstError !== undefined) {
scrollToField(scrollToFirstError, fieldName);
return;
}
if (contextScrollToFirstError !== undefined) {
scrollToField(contextScrollToFirstError, fieldName);
}
}
};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VariantContext.Provider, {
value: variant
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DisabledContextProvider, {
disabled: disabled
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SizeContext["default"].Provider, {
value: mergedSize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_FormProvider, {
// This is not list in API, we pass with spread
validateMessages: contextValidateMessages
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_FormContext.Provider, {
value: formContextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_field_form_es, Object.assign({
id: name
}, restFormProps, {
name: name,
onFinishFailed: onInternalFinishFailed,
form: wrapForm,
ref: nativeElementRef,
style: Object.assign(Object.assign({}, contextStyle), style),
className: formClassName
}))))))));
};
const Form_Form = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Form_InternalForm);
if (true) {
Form_Form.displayName = 'Form';
}
/* harmony default export */ var form_Form = (Form_Form);
;// ./components/form/hooks/useChildren.ts
function useChildren_useChildren(children) {
if (typeof children === 'function') {
return children;
}
const childList = (0,toArray["default"])(children);
return childList.length <= 1 ? childList[0] : childList;
}
;// ./components/form/hooks/useFormItemStatus.ts
const useFormItemStatus = () => {
const {
status,
errors = [],
warnings = []
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Form.Item');
true ? warning(status !== undefined, 'usage', 'Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus') : 0;
}
return {
status,
errors,
warnings
};
};
// Only used for compatible package. Not promise this will work on future version.
useFormItemStatus.Context = FormItemInputContext;
/* harmony default export */ var hooks_useFormItemStatus = (useFormItemStatus);
;// ./components/form/hooks/useFrameState.ts
function useFrameState(defaultValue) {
const [value, setValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(defaultValue);
const frameRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const batchRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
const destroyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
destroyRef.current = false;
return () => {
destroyRef.current = true;
raf["default"].cancel(frameRef.current);
frameRef.current = null;
};
}, []);
function setFrameValue(updater) {
if (destroyRef.current) {
return;
}
if (frameRef.current === null) {
batchRef.current = [];
frameRef.current = (0,raf["default"])(() => {
frameRef.current = null;
setValue(prevValue => {
let current = prevValue;
batchRef.current.forEach(func => {
current = func(current);
});
return current;
});
});
}
batchRef.current.push(updater);
}
return [value, setFrameValue];
}
;// ./components/form/hooks/useItemRef.ts
function useItemRef() {
const {
itemRef
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
const cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
function getRef(name, children) {
// Outer caller already check the `supportRef`
const childrenRef = children && typeof children === 'object' && (0,es_ref.getNodeRef)(children);
const nameStr = name.join('_');
if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {
cacheRef.current.name = nameStr;
cacheRef.current.originRef = childrenRef;
cacheRef.current.ref = (0,es_ref.composeRef)(itemRef(name), childrenRef);
}
return cacheRef.current.ref;
}
return getRef;
}
;// ./components/grid/hooks/useGutter.ts
function useGutter(gutter, screens) {
const results = [undefined, undefined];
const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, undefined];
// By default use as `xs`
const mergedScreens = screens || {
xs: true,
sm: true,
md: true,
lg: true,
xl: true,
xxl: true
};
normalizedGutter.forEach((g, index) => {
if (typeof g === 'object' && g !== null) {
for (let i = 0; i < responsiveArray.length; i++) {
const breakpoint = responsiveArray[i];
if (mergedScreens[breakpoint] && g[breakpoint] !== undefined) {
results[index] = g[breakpoint];
break;
}
}
} else {
results[index] = g;
}
});
return results;
}
;// ./components/grid/row.tsx
var row_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;
};
const _RowAligns = ['top', 'middle', 'bottom', 'stretch'];
const _RowJustify = ['start', 'end', 'center', 'space-around', 'space-between', 'space-evenly'];
function useMergedPropByScreen(oriProp, screen) {
const [prop, setProp] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(typeof oriProp === 'string' ? oriProp : '');
const calcMergedAlignOrJustify = () => {
if (typeof oriProp === 'string') {
setProp(oriProp);
}
if (typeof oriProp !== 'object') {
return;
}
for (let i = 0; i < responsiveArray.length; i++) {
const breakpoint = responsiveArray[i];
// if do not match, do nothing
if (!screen || !screen[breakpoint]) {
continue;
}
const curVal = oriProp[breakpoint];
if (curVal !== undefined) {
setProp(curVal);
return;
}
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
calcMergedAlignOrJustify();
}, [JSON.stringify(oriProp), screen]);
return prop;
}
const row_Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
justify,
align,
className,
style,
children,
gutter = 0,
wrap
} = props,
others = row_rest(props, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]);
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const screens = hooks_useBreakpoint(true, null);
const mergedAlign = useMergedPropByScreen(align, screens);
const mergedJustify = useMergedPropByScreen(justify, screens);
const prefixCls = getPrefixCls('row', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,grid_style.useRowStyle)(prefixCls);
const gutters = useGutter(gutter, screens);
const classes = classnames_default()(prefixCls, {
[`${prefixCls}-no-wrap`]: wrap === false,
[`${prefixCls}-${mergedJustify}`]: mergedJustify,
[`${prefixCls}-${mergedAlign}`]: mergedAlign,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, hashId, cssVarCls);
// Add gutter related style
const rowStyle = {};
const horizontalGutter = gutters[0] != null && gutters[0] > 0 ? gutters[0] / -2 : undefined;
if (horizontalGutter) {
rowStyle.marginLeft = horizontalGutter;
rowStyle.marginRight = horizontalGutter;
}
// "gutters" is a new array in each rendering phase, it'll make 'React.useMemo' effectless.
// So we deconstruct "gutters" variable here.
const [gutterH, gutterV] = gutters;
rowStyle.rowGap = gutterV;
const rowContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
gutter: [gutterH, gutterV],
wrap
}), [gutterH, gutterV, wrap]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(grid_RowContext.Provider, {
value: rowContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
className: classes,
style: Object.assign(Object.assign({}, rowStyle), style),
ref: ref
}), children)));
});
if (true) {
row_Row.displayName = 'Row';
}
/* harmony default export */ var row = (row_Row);
;// ./components/form/style/fallbackCmp.ts
/**
* Fallback of IE.
* Safe to remove.
*/
// Style as inline component
// ============================= Fallback =============================
const genFallbackStyle = token => {
const {
formItemCls
} = token;
return {
'@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)': {
// Fallback for IE, safe to remove we not support it anymore
[`${formItemCls}-control`]: {
display: 'flex'
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var fallbackCmp = ((0,genStyleUtils.genSubStyleComponent)(['Form', 'item-item'], (token, _ref) => {
let {
rootPrefixCls
} = _ref;
const formToken = (0,form_style.prepareToken)(token, rootPrefixCls);
return [genFallbackStyle(formToken)];
}));
;// ./components/form/FormItemInput.tsx
var FormItemInput_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;
};
const GRID_MAX = 24;
const FormItemInput = props => {
const {
prefixCls,
status,
labelCol,
wrapperCol,
children,
errors,
warnings,
_internalItemRender: formItemRender,
extra,
help,
fieldId,
marginBottom,
onErrorVisibleChanged,
label
} = props;
const baseClassName = `${prefixCls}-item`;
const formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
const mergedWrapperCol = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
let mergedWrapper = Object.assign({}, wrapperCol || formContext.wrapperCol || {});
if (label === null && !labelCol && !wrapperCol && formContext.labelCol) {
const list = [undefined, 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
list.forEach(size => {
const _size = size ? [size] : [];
const formLabel = (0,rc_util_es.get)(formContext.labelCol, _size);
const formLabelObj = typeof formLabel === 'object' ? formLabel : {};
const wrapper = (0,rc_util_es.get)(mergedWrapper, _size);
const wrapperObj = typeof wrapper === 'object' ? wrapper : {};
if ('span' in formLabelObj && !('offset' in wrapperObj) && formLabelObj.span < GRID_MAX) {
mergedWrapper = (0,rc_util_es.set)(mergedWrapper, [].concat(_size, ['offset']), formLabelObj.span);
}
});
}
return mergedWrapper;
}, [wrapperCol, formContext]);
const className = classnames_default()(`${baseClassName}-control`, mergedWrapperCol.className);
// Pass to sub FormItem should not with col info
const subFormContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const {
labelCol,
wrapperCol
} = formContext,
rest = FormItemInput_rest(formContext, ["labelCol", "wrapperCol"]);
return rest;
}, [formContext]);
const extraRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const [extraHeight, setExtraHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
(0,useLayoutEffect["default"])(() => {
if (extra && extraRef.current) {
setExtraHeight(extraRef.current.clientHeight);
} else {
setExtraHeight(0);
}
}, [extra]);
const inputDom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${baseClassName}-control-input`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${baseClassName}-control-input-content`
}, children));
const formItemContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
prefixCls,
status
}), [prefixCls, status]);
const errorListDom = marginBottom !== null || errors.length || warnings.length ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemPrefixContext.Provider, {
value: formItemContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(form_ErrorList, {
fieldId: fieldId,
errors: errors,
warnings: warnings,
help: help,
helpStatus: status,
className: `${baseClassName}-explain-connected`,
onVisibleChanged: onErrorVisibleChanged
}))) : null;
const extraProps = {};
if (fieldId) {
extraProps.id = `${fieldId}_extra`;
}
// If extra = 0, && will goes wrong
// 0&&error -> 0
const extraDom = extra ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, extraProps, {
className: `${baseClassName}-extra`,
ref: extraRef
}), extra)) : null;
const additionalDom = errorListDom || extraDom ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${baseClassName}-additional`,
style: marginBottom ? {
minHeight: marginBottom + extraHeight
} : {}
}, errorListDom, extraDom)) : null;
const dom = formItemRender && formItemRender.mark === 'pro_table_render' && formItemRender.render ? formItemRender.render(props, {
input: inputDom,
errorList: errorListDom,
extra: extraDom
}) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, inputDom, additionalDom));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_FormContext.Provider, {
value: subFormContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(col, Object.assign({}, mergedWrapperCol, {
className: className
}), dom), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(fallbackCmp, {
prefixCls: prefixCls
}));
};
/* harmony default export */ var form_FormItemInput = (FormItemInput);
;// ./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js
// This icon file is generated automatically.
var QuestionCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" };
/* harmony default export */ var asn_QuestionCircleOutlined = (QuestionCircleOutlined);
;// ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var QuestionCircleOutlined_QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_QuestionCircleOutlined
}));
};
/** */
var QuestionCircleOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(QuestionCircleOutlined_QuestionCircleOutlined);
if (true) {
QuestionCircleOutlined_RefIcon.displayName = 'QuestionCircleOutlined';
}
/* harmony default export */ var icons_QuestionCircleOutlined = (QuestionCircleOutlined_RefIcon);
;// ./components/form/FormItemLabel.tsx
var FormItemLabel_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 toTooltipProps(tooltip) {
if (!tooltip) {
return null;
}
if (typeof tooltip === 'object' && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(tooltip)) {
return tooltip;
}
return {
title: tooltip
};
}
const FormItemLabel = _ref => {
let {
prefixCls,
label,
htmlFor,
labelCol,
labelAlign,
colon,
required,
requiredMark,
tooltip,
vertical
} = _ref;
var _a;
const [formLocale] = (0,useLocale["default"])('Form');
const {
labelAlign: contextLabelAlign,
labelCol: contextLabelCol,
labelWrap,
colon: contextColon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
if (!label) {
return null;
}
const mergedLabelCol = labelCol || contextLabelCol || {};
const mergedLabelAlign = labelAlign || contextLabelAlign;
const labelClsBasic = `${prefixCls}-item-label`;
const labelColClassName = classnames_default()(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {
[`${labelClsBasic}-wrap`]: !!labelWrap
});
let labelChildren = label;
// Keep label is original where there should have no colon
const computedColon = colon === true || contextColon !== false && colon !== false;
const haveColon = computedColon && !vertical;
// Remove duplicated user input colon
if (haveColon && typeof label === 'string' && label.trim()) {
labelChildren = label.replace(/[:|:]\s*$/, '');
}
// Tooltip
const tooltipProps = toTooltipProps(tooltip);
if (tooltipProps) {
const {
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_QuestionCircleOutlined, null)
} = tooltipProps,
restTooltipProps = FormItemLabel_rest(tooltipProps, ["icon"]);
const tooltipNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, restTooltipProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(icon, {
className: `${prefixCls}-item-tooltip`,
title: '',
onClick: e => {
// Prevent label behavior in tooltip icon
// https://github.com/ant-design/ant-design/issues/46154
e.preventDefault();
},
tabIndex: null
}));
labelChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, labelChildren, tooltipNode);
}
// Required Mark
const isOptionalMark = requiredMark === 'optional';
const isRenderMark = typeof requiredMark === 'function';
const hideRequiredMark = requiredMark === false;
if (isRenderMark) {
labelChildren = requiredMark(labelChildren, {
required: !!required
});
} else if (isOptionalMark && !required) {
labelChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, labelChildren, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-item-optional`,
title: ""
}, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = en_US["default"].Form) === null || _a === void 0 ? void 0 : _a.optional)));
}
// https://github.com/ant-design/ant-design/pull/52950#discussion_r1980880316
let markType;
if (hideRequiredMark) {
markType = 'hidden';
} else if (isOptionalMark || isRenderMark) {
markType = 'optional';
}
const labelClassName = classnames_default()({
[`${prefixCls}-item-required`]: required,
[`${prefixCls}-item-required-mark-${markType}`]: markType,
[`${prefixCls}-item-no-colon`]: !computedColon
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(col, Object.assign({}, mergedLabelCol, {
className: labelColClassName
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
htmlFor: htmlFor,
className: labelClassName,
title: typeof label === 'string' ? label : ''
}, labelChildren));
};
/* harmony default export */ var form_FormItemLabel = (FormItemLabel);
;// ./components/form/FormItem/StatusProvider.tsx
const iconMap = {
success: icons_CheckCircleFilled,
warning: icons_ExclamationCircleFilled,
error: icons_CloseCircleFilled,
validating: icons_LoadingOutlined
};
function StatusProvider(_ref) {
let {
children,
errors,
warnings,
hasFeedback,
validateStatus,
prefixCls,
meta,
noStyle
} = _ref;
const itemPrefixCls = `${prefixCls}-item`;
const {
feedbackIcons
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
const mergedValidateStatus = getStatus(errors, warnings, meta, null, !!hasFeedback, validateStatus);
const {
isFormItemInput: parentIsFormItemInput,
status: parentStatus,
hasFeedback: parentHasFeedback,
feedbackIcon: parentFeedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
// ====================== Context =======================
const formItemStatusContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a;
let feedbackIcon;
if (hasFeedback) {
const customIcons = hasFeedback !== true && hasFeedback.icons || feedbackIcons;
const customIconNode = mergedValidateStatus && ((_a = customIcons === null || customIcons === void 0 ? void 0 : customIcons({
status: mergedValidateStatus,
errors,
warnings
})) === null || _a === void 0 ? void 0 : _a[mergedValidateStatus]);
const IconNode = mergedValidateStatus && iconMap[mergedValidateStatus];
feedbackIcon = customIconNode !== false && IconNode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)
}, customIconNode || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IconNode, null))) : null;
}
const context = {
status: mergedValidateStatus || '',
errors,
warnings,
hasFeedback: !!hasFeedback,
feedbackIcon,
isFormItemInput: true
};
// No style will follow parent context
if (noStyle) {
context.status = (mergedValidateStatus !== null && mergedValidateStatus !== void 0 ? mergedValidateStatus : parentStatus) || '';
context.isFormItemInput = parentIsFormItemInput;
context.hasFeedback = !!(hasFeedback !== null && hasFeedback !== void 0 ? hasFeedback : parentHasFeedback);
context.feedbackIcon = hasFeedback !== undefined ? context.feedbackIcon : parentFeedbackIcon;
}
return context;
}, [mergedValidateStatus, hasFeedback, noStyle, parentIsFormItemInput, parentStatus]);
// ======================= Render =======================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
value: formItemStatusContext
}, children);
}
;// ./components/form/FormItem/ItemHolder.tsx
var ItemHolder_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 ItemHolder(props) {
const {
prefixCls,
className,
rootClassName,
style,
help,
errors,
warnings,
validateStatus,
meta,
hasFeedback,
hidden,
children,
fieldId,
required,
isRequired,
onSubItemMetaChange,
layout
} = props,
restProps = ItemHolder_rest(props, ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange", "layout"]);
const itemPrefixCls = `${prefixCls}-item`;
const {
requiredMark,
vertical: formVertical
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
const vertical = formVertical || layout === 'vertical';
// ======================== Margin ========================
const itemRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const debounceErrors = useDebounce(errors);
const debounceWarnings = useDebounce(warnings);
const hasHelp = help !== undefined && help !== null;
const hasError = !!(hasHelp || errors.length || warnings.length);
const isOnScreen = !!itemRef.current && isVisible(itemRef.current);
const [marginBottom, setMarginBottom] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
(0,useLayoutEffect["default"])(() => {
if (hasError && itemRef.current) {
// The element must be part of the DOMTree to use getComputedStyle
// https://stackoverflow.com/questions/35360711/getcomputedstyle-returns-a-cssstyledeclaration-but-all-properties-are-empty-on-a
const itemStyle = getComputedStyle(itemRef.current);
setMarginBottom(parseInt(itemStyle.marginBottom, 10));
}
}, [hasError, isOnScreen]);
const onErrorVisibleChanged = nextVisible => {
if (!nextVisible) {
setMarginBottom(null);
}
};
// ======================== Status ========================
const getValidateState = function () {
let isDebounce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
const _errors = isDebounce ? debounceErrors : meta.errors;
const _warnings = isDebounce ? debounceWarnings : meta.warnings;
return getStatus(_errors, _warnings, meta, '', !!hasFeedback, validateStatus);
};
const mergedValidateStatus = getValidateState();
// ======================== Render ========================
const itemClassName = classnames_default()(itemPrefixCls, className, rootClassName, {
[`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,
// Status
[`${itemPrefixCls}-has-feedback`]: mergedValidateStatus && hasFeedback,
[`${itemPrefixCls}-has-success`]: mergedValidateStatus === 'success',
[`${itemPrefixCls}-has-warning`]: mergedValidateStatus === 'warning',
[`${itemPrefixCls}-has-error`]: mergedValidateStatus === 'error',
[`${itemPrefixCls}-is-validating`]: mergedValidateStatus === 'validating',
[`${itemPrefixCls}-hidden`]: hidden,
// Layout
[`${itemPrefixCls}-${layout}`]: layout
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: itemClassName,
style: style,
ref: itemRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(row, Object.assign({
className: `${itemPrefixCls}-row`
}, (0,omit["default"])(restProps, ['_internalItemRender', 'colon', 'dependencies', 'extra', 'fieldKey', 'getValueFromEvent', 'getValueProps', 'htmlFor', 'id',
// It is deprecated because `htmlFor` is its replacement.
'initialValue', 'isListField', 'label', 'labelAlign', 'labelCol', 'labelWrap', 'messageVariables', 'name', 'normalize', 'noStyle', 'preserve', 'requiredMark', 'rules', 'shouldUpdate', 'trigger', 'tooltip', 'validateFirst', 'validateTrigger', 'valuePropName', 'wrapperCol', 'validateDebounce'])), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(form_FormItemLabel, Object.assign({
htmlFor: fieldId
}, props, {
requiredMark: requiredMark,
required: required !== null && required !== void 0 ? required : isRequired,
prefixCls: prefixCls,
vertical: vertical
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(form_FormItemInput, Object.assign({}, props, meta, {
errors: debounceErrors,
warnings: debounceWarnings,
prefixCls: prefixCls,
status: mergedValidateStatus,
help: help,
marginBottom: marginBottom,
onErrorVisibleChanged: onErrorVisibleChanged
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(NoStyleItemContext.Provider, {
value: onSubItemMetaChange
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StatusProvider, {
prefixCls: prefixCls,
meta: meta,
errors: meta.errors,
warnings: meta.warnings,
hasFeedback: hasFeedback,
// Already calculated
validateStatus: mergedValidateStatus
}, children)))), !!marginBottom && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${itemPrefixCls}-margin-offset`,
style: {
marginBottom: -marginBottom
}
})));
}
;// ./components/form/FormItem/index.tsx
const NAME_SPLIT = '__SPLIT__';
const _ValidateStatuses = ['success', 'warning', 'error', 'validating', ''];
// https://github.com/ant-design/ant-design/issues/46417
// `getValueProps` may modify the value props name,
// we should check if the control is similar.
function isSimilarControl(a, b) {
const keysA = Object.keys(a);
const keysB = Object.keys(b);
return keysA.length === keysB.length && keysA.every(key => {
const propValueA = a[key];
const propValueB = b[key];
return propValueA === propValueB || typeof propValueA === 'function' || typeof propValueB === 'function';
});
}
const MemoInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(_ref => {
let {
children
} = _ref;
return children;
}, (prev, next) => isSimilarControl(prev.control, next.control) && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));
function genEmptyMeta() {
return {
errors: [],
warnings: [],
touched: false,
validating: false,
name: [],
validated: false
};
}
function InternalFormItem(props) {
const {
name,
noStyle,
className,
dependencies,
prefixCls: customizePrefixCls,
shouldUpdate,
rules,
children,
required,
label,
messageVariables,
trigger = 'onChange',
validateTrigger,
hidden,
help,
layout
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
name: formName
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
const mergedChildren = useChildren_useChildren(children);
const isRenderProps = typeof mergedChildren === 'function';
const notifyParentMetaChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(NoStyleItemContext);
const {
validateTrigger: contextValidateTrigger
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FieldContext);
const mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;
const hasName = !(name === undefined || name === null);
const prefixCls = getPrefixCls('form', customizePrefixCls);
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,form_style["default"])(prefixCls, rootCls);
// ========================= Warn =========================
const warning = (0,_util_warning.devUseWarning)('Form.Item');
if (true) {
true ? warning(name !== null, 'usage', '`null` is passed as `name` property') : 0;
}
// ========================= MISC =========================
// Get `noStyle` required info
const listContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_ListContext);
const fieldKeyPathRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ======================== Errors ========================
// >>>>> Collect sub field errors
const [subFieldErrors, setSubFieldErrors] = useFrameState({});
// >>>>> Current field errors
const [meta, setMeta] = (0,useState["default"])(() => genEmptyMeta());
const onMetaChange = nextMeta => {
// This keyInfo is not correct when field is removed
// Since origin keyManager no longer keep the origin key anymore
// Which means we need cache origin one and reuse when removed
const keyInfo = listContext === null || listContext === void 0 ? void 0 : listContext.getKey(nextMeta.name);
// Destroy will reset all the meta
setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);
// Bump to parent since noStyle
if (noStyle && help !== false && notifyParentMetaChange) {
let namePath = nextMeta.name;
if (!nextMeta.destroy) {
if (keyInfo !== undefined) {
const [fieldKey, restPath] = keyInfo;
namePath = [fieldKey].concat((0,toConsumableArray["default"])(restPath));
fieldKeyPathRef.current = namePath;
}
} else {
// Use origin cache data
namePath = fieldKeyPathRef.current || namePath;
}
notifyParentMetaChange(nextMeta, namePath);
}
};
// >>>>> Collect noStyle Field error to the top FormItem
const onSubItemMetaChange = (subMeta, uniqueKeys) => {
// Only `noStyle` sub item will trigger
setSubFieldErrors(prevSubFieldErrors => {
const clone = Object.assign({}, prevSubFieldErrors);
// name: ['user', 1] + key: [4] = ['user', 4]
const mergedNamePath = [].concat((0,toConsumableArray["default"])(subMeta.name.slice(0, -1)), (0,toConsumableArray["default"])(uniqueKeys));
const mergedNameKey = mergedNamePath.join(NAME_SPLIT);
if (subMeta.destroy) {
// Remove
delete clone[mergedNameKey];
} else {
// Update
clone[mergedNameKey] = subMeta;
}
return clone;
});
};
// >>>>> Get merged errors
const [mergedErrors, mergedWarnings] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const errorList = (0,toConsumableArray["default"])(meta.errors);
const warningList = (0,toConsumableArray["default"])(meta.warnings);
Object.values(subFieldErrors).forEach(subFieldError => {
errorList.push.apply(errorList, (0,toConsumableArray["default"])(subFieldError.errors || []));
warningList.push.apply(warningList, (0,toConsumableArray["default"])(subFieldError.warnings || []));
});
return [errorList, warningList];
}, [subFieldErrors, meta.errors, meta.warnings]);
// ===================== Children Ref =====================
const getItemRef = useItemRef();
// ======================== Render ========================
function renderLayout(baseChildren, fieldId, isRequired) {
if (noStyle && !hidden) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StatusProvider, {
prefixCls: prefixCls,
hasFeedback: props.hasFeedback,
validateStatus: props.validateStatus,
meta: meta,
errors: mergedErrors,
warnings: mergedWarnings,
noStyle: true
}, baseChildren);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ItemHolder, Object.assign({
key: "row"
}, props, {
className: classnames_default()(className, cssVarCls, rootCls, hashId),
prefixCls: prefixCls,
fieldId: fieldId,
isRequired: isRequired,
errors: mergedErrors,
warnings: mergedWarnings,
meta: meta,
onSubItemMetaChange: onSubItemMetaChange,
layout: layout
}), baseChildren);
}
if (!hasName && !isRenderProps && !dependencies) {
return wrapCSSVar(renderLayout(mergedChildren));
}
let variables = {};
if (typeof label === 'string') {
variables.label = label;
} else if (name) {
variables.label = String(name);
}
if (messageVariables) {
variables = Object.assign(Object.assign({}, variables), messageVariables);
}
// >>>>> With Field
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Field, Object.assign({}, props, {
messageVariables: variables,
trigger: trigger,
validateTrigger: mergedValidateTrigger,
onMetaChange: onMetaChange
}), (control, renderMeta, context) => {
const mergedName = util_toArray(name).length && renderMeta ? renderMeta.name : [];
const fieldId = getFieldId(mergedName, formName);
const isRequired = required !== undefined ? required : !!(rules === null || rules === void 0 ? void 0 : rules.some(rule => {
if (rule && typeof rule === 'object' && rule.required && !rule.warningOnly) {
return true;
}
if (typeof rule === 'function') {
const ruleEntity = rule(context);
return (ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.required) && !(ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.warningOnly);
}
return false;
}));
// ======================= Children =======================
const mergedControl = Object.assign({}, control);
let childNode = null;
true ? warning(!(shouldUpdate && dependencies), 'usage', "`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.") : 0;
if (Array.isArray(mergedChildren) && hasName) {
true ? warning(false, 'usage', 'A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item.') : 0;
childNode = mergedChildren;
} else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {
true ? warning(!!(shouldUpdate || dependencies), 'usage', 'A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.') : 0;
true ? warning(!hasName, 'usage', 'A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.') : 0;
} else if (dependencies && !isRenderProps && !hasName) {
true ? warning(false, 'usage', 'Must set `name` or use a render function when `dependencies` is set.') : 0;
} else if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedChildren)) {
true ? warning(mergedChildren.props.defaultValue === undefined, 'usage', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.') : 0;
const childProps = Object.assign(Object.assign({}, mergedChildren.props), mergedControl);
if (!childProps.id) {
childProps.id = fieldId;
}
if (help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {
const describedbyArr = [];
if (help || mergedErrors.length > 0) {
describedbyArr.push(`${fieldId}_help`);
}
if (props.extra) {
describedbyArr.push(`${fieldId}_extra`);
}
childProps['aria-describedby'] = describedbyArr.join(' ');
}
if (mergedErrors.length > 0) {
childProps['aria-invalid'] = 'true';
}
if (isRequired) {
childProps['aria-required'] = 'true';
}
if ((0,es_ref.supportRef)(mergedChildren)) {
childProps.ref = getItemRef(mergedName, mergedChildren);
}
// We should keep user origin event handler
const triggers = new Set([].concat((0,toConsumableArray["default"])(util_toArray(trigger)), (0,toConsumableArray["default"])(util_toArray(mergedValidateTrigger))));
triggers.forEach(eventName => {
childProps[eventName] = function () {
var _a2, _c2;
var _a, _b, _c;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
(_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));
(_c = (_b = mergedChildren.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));
};
});
// List of props that need to be watched for changes -> if changes are detected in MemoInput -> rerender
const watchingChildProps = [childProps['aria-required'], childProps['aria-invalid'], childProps['aria-describedby']];
childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MemoInput, {
control: mergedControl,
update: mergedChildren,
childProps: watchingChildProps
}, (0,reactNode.cloneElement)(mergedChildren, childProps));
} else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {
childNode = mergedChildren(context);
} else {
true ? warning(!mergedName.length || !!noStyle, 'usage', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.') : 0;
childNode = mergedChildren;
}
return renderLayout(childNode, fieldId, isRequired);
}));
}
const FormItem = InternalFormItem;
FormItem.useStatus = hooks_useFormItemStatus;
/* harmony default export */ var form_FormItem = (FormItem);
;// ./components/form/FormList.tsx
var FormList_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;
};
const FormList = _a => {
var {
prefixCls: customizePrefixCls,
children
} = _a,
props = FormList_rest(_a, ["prefixCls", "children"]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Form.List');
true ? warning(typeof props.name === 'number' || (Array.isArray(props.name) ? !!props.name.length : !!props.name), 'usage', 'Miss `name` prop.') : 0;
}
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('form', customizePrefixCls);
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
prefixCls,
status: 'error'
}), [prefixCls]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_List, Object.assign({}, props), (fields, operation, meta) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemPrefixContext.Provider, {
value: contextValue
}, children(fields.map(field => Object.assign(Object.assign({}, field), {
fieldKey: field.key
})), operation, {
errors: meta.errors,
warnings: meta.warnings
}))));
};
/* harmony default export */ var form_FormList = (FormList);
;// ./components/form/hooks/useFormInstance.ts
function useFormInstance() {
const {
form
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
return form;
}
;// ./components/form/index.tsx
const components_form_Form = form_Form;
components_form_Form.Item = form_FormItem;
components_form_Form.List = form_FormList;
components_form_Form.ErrorList = form_ErrorList;
components_form_Form.useForm = useForm_useForm;
components_form_Form.useFormInstance = useFormInstance;
components_form_Form.useWatch = es_useWatch;
components_form_Form.Provider = context_FormProvider;
components_form_Form.create = () => {
true ? (0,_util_warning["default"])(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.') : 0;
};
/* harmony default export */ var components_form = (components_form_Form);
;// ./components/grid/index.tsx
// Do not export params
function grid_useBreakpoint() {
return hooks_useBreakpoint();
}
/* harmony default export */ var grid = ({
useBreakpoint: grid_useBreakpoint
});
;// ./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js
// This icon file is generated automatically.
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
;// ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_EyeOutlined
}));
};
/** */
var EyeOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EyeOutlined_EyeOutlined);
if (true) {
EyeOutlined_RefIcon.displayName = 'EyeOutlined';
}
/* harmony default export */ var icons_EyeOutlined = (EyeOutlined_RefIcon);
;// ./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 css_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 = css_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 css_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)) {
css_set(node, x, name[x]);
}
}
return css_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 css_getScroll() {
return {
scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),
scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)
};
}
function css_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)
};
}
;// ./node_modules/rc-util/es/Dom/addEventListener.js
function addEventListenerWrap(target, eventType, cb, option) {
/* eslint camelcase: 2 */
var callback = (external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default()).unstable_batchedUpdates ? function run(e) {
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().unstable_batchedUpdates(cb, e);
} : cb;
if (target !== null && target !== void 0 && target.addEventListener) {
target.addEventListener(eventType, callback, option);
}
return {
remove: function remove() {
if (target !== null && target !== void 0 && target.removeEventListener) {
target.removeEventListener(eventType, callback, option);
}
}
};
}
;// ./node_modules/rc-image/es/context.js
var PreviewGroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
;// ./node_modules/rc-image/es/Operations.js
var Operations = function Operations(props) {
var visible = props.visible,
maskTransitionName = props.maskTransitionName,
getContainer = props.getContainer,
prefixCls = props.prefixCls,
rootClassName = props.rootClassName,
icons = props.icons,
countRender = props.countRender,
showSwitch = props.showSwitch,
showProgress = props.showProgress,
current = props.current,
transform = props.transform,
count = props.count,
scale = props.scale,
minScale = props.minScale,
maxScale = props.maxScale,
closeIcon = props.closeIcon,
onActive = props.onActive,
onClose = props.onClose,
onZoomIn = props.onZoomIn,
onZoomOut = props.onZoomOut,
onRotateRight = props.onRotateRight,
onRotateLeft = props.onRotateLeft,
onFlipX = props.onFlipX,
onFlipY = props.onFlipY,
onReset = props.onReset,
toolbarRender = props.toolbarRender,
zIndex = props.zIndex,
image = props.image;
var groupContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PreviewGroupContext);
var rotateLeft = icons.rotateLeft,
rotateRight = icons.rotateRight,
zoomIn = icons.zoomIn,
zoomOut = icons.zoomOut,
close = icons.close,
left = icons.left,
right = icons.right,
flipX = icons.flipX,
flipY = icons.flipY;
var toolClassName = "".concat(prefixCls, "-operations-operation");
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var onKeyDown = function onKeyDown(e) {
if (e.keyCode === KeyCode["default"].ESC) {
onClose();
}
};
if (visible) {
window.addEventListener('keydown', onKeyDown);
}
return function () {
window.removeEventListener('keydown', onKeyDown);
};
}, [visible]);
var handleActive = function handleActive(e, offset) {
e.preventDefault();
e.stopPropagation();
onActive(offset);
};
var renderOperation = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (_ref) {
var type = _ref.type,
disabled = _ref.disabled,
onClick = _ref.onClick,
icon = _ref.icon;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
key: type,
className: classnames_default()(toolClassName, "".concat(prefixCls, "-operations-operation-").concat(type), (0,defineProperty["default"])({}, "".concat(prefixCls, "-operations-operation-disabled"), !!disabled)),
onClick: onClick
}, icon);
}, [toolClassName, prefixCls]);
var switchPrevNode = showSwitch ? renderOperation({
icon: left,
onClick: function onClick(e) {
return handleActive(e, -1);
},
type: 'prev',
disabled: current === 0
}) : undefined;
var switchNextNode = showSwitch ? renderOperation({
icon: right,
onClick: function onClick(e) {
return handleActive(e, 1);
},
type: 'next',
disabled: current === count - 1
}) : undefined;
var flipYNode = renderOperation({
icon: flipY,
onClick: onFlipY,
type: 'flipY'
});
var flipXNode = renderOperation({
icon: flipX,
onClick: onFlipX,
type: 'flipX'
});
var rotateLeftNode = renderOperation({
icon: rotateLeft,
onClick: onRotateLeft,
type: 'rotateLeft'
});
var rotateRightNode = renderOperation({
icon: rotateRight,
onClick: onRotateRight,
type: 'rotateRight'
});
var zoomOutNode = renderOperation({
icon: zoomOut,
onClick: onZoomOut,
type: 'zoomOut',
disabled: scale <= minScale
});
var zoomInNode = renderOperation({
icon: zoomIn,
onClick: onZoomIn,
type: 'zoomIn',
disabled: scale === maxScale
});
var toolbarNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-operations")
}, flipYNode, flipXNode, rotateLeftNode, rotateRightNode, zoomOutNode, zoomInNode);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
visible: visible,
motionName: maskTransitionName
}, function (_ref2) {
var className = _ref2.className,
style = _ref2.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
open: true,
getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : document.body
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-operations-wrapper"), className, rootClassName),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
zIndex: zIndex
})
}, closeIcon === null ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
className: "".concat(prefixCls, "-close"),
onClick: onClose
}, closeIcon || close), showSwitch && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-switch-left"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-switch-left-disabled"), current === 0)),
onClick: function onClick(e) {
return handleActive(e, -1);
}
}, left), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-switch-right"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-switch-right-disabled"), current === count - 1)),
onClick: function onClick(e) {
return handleActive(e, 1);
}
}, right)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-footer")
}, showProgress && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-progress")
}, countRender ? countRender(current + 1, count) : "".concat(current + 1, " / ").concat(count)), toolbarRender ? toolbarRender(toolbarNode, (0,objectSpread2["default"])((0,objectSpread2["default"])({
icons: {
prevIcon: switchPrevNode,
nextIcon: switchNextNode,
flipYIcon: flipYNode,
flipXIcon: flipXNode,
rotateLeftIcon: rotateLeftNode,
rotateRightIcon: rotateRightNode,
zoomOutIcon: zoomOutNode,
zoomInIcon: zoomInNode
},
actions: {
onActive: onActive,
onFlipY: onFlipY,
onFlipX: onFlipX,
onRotateLeft: onRotateLeft,
onRotateRight: onRotateRight,
onZoomOut: onZoomOut,
onZoomIn: onZoomIn,
onReset: onReset,
onClose: onClose
},
transform: transform
}, groupContext ? {
current: current,
total: count
} : {}), {}, {
image: image
})) : toolbarNode)));
});
};
/* harmony default export */ var es_Operations = (Operations);
;// ./node_modules/rc-image/es/hooks/useImageTransform.js
var initialTransform = {
x: 0,
y: 0,
rotate: 0,
scale: 1,
flipX: false,
flipY: false
};
function useImageTransform(imgRef, minScale, maxScale, onTransform) {
var frame = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var queue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(initialTransform),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
transform = _useState2[0],
setTransform = _useState2[1];
var resetTransform = function resetTransform(action) {
setTransform(initialTransform);
if (!(0,isEqual["default"])(initialTransform, transform)) {
onTransform === null || onTransform === void 0 || onTransform({
transform: initialTransform,
action: action
});
}
};
/** Direct update transform */
var updateTransform = function updateTransform(newTransform, action) {
if (frame.current === null) {
queue.current = [];
frame.current = (0,raf["default"])(function () {
setTransform(function (preState) {
var memoState = preState;
queue.current.forEach(function (queueState) {
memoState = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, memoState), queueState);
});
frame.current = null;
onTransform === null || onTransform === void 0 || onTransform({
transform: memoState,
action: action
});
return memoState;
});
});
}
queue.current.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, transform), newTransform));
};
/** Scale according to the position of centerX and centerY */
var dispatchZoomChange = function dispatchZoomChange(ratio, action, centerX, centerY, isTouch) {
var _imgRef$current = imgRef.current,
width = _imgRef$current.width,
height = _imgRef$current.height,
offsetWidth = _imgRef$current.offsetWidth,
offsetHeight = _imgRef$current.offsetHeight,
offsetLeft = _imgRef$current.offsetLeft,
offsetTop = _imgRef$current.offsetTop;
var newRatio = ratio;
var newScale = transform.scale * ratio;
if (newScale > maxScale) {
newScale = maxScale;
newRatio = maxScale / transform.scale;
} else if (newScale < minScale) {
// For mobile interactions, allow scaling down to the minimum scale.
newScale = isTouch ? newScale : minScale;
newRatio = newScale / transform.scale;
}
/** Default center point scaling */
var mergedCenterX = centerX !== null && centerX !== void 0 ? centerX : innerWidth / 2;
var mergedCenterY = centerY !== null && centerY !== void 0 ? centerY : innerHeight / 2;
var diffRatio = newRatio - 1;
/** Deviation calculated from image size */
var diffImgX = diffRatio * width * 0.5;
var diffImgY = diffRatio * height * 0.5;
/** The difference between the click position and the edge of the document */
var diffOffsetLeft = diffRatio * (mergedCenterX - transform.x - offsetLeft);
var diffOffsetTop = diffRatio * (mergedCenterY - transform.y - offsetTop);
/** Final positioning */
var newX = transform.x - (diffOffsetLeft - diffImgX);
var newY = transform.y - (diffOffsetTop - diffImgY);
/**
* When zooming the image
* When the image size is smaller than the width and height of the window, the position is initialized
*/
if (ratio < 1 && newScale === 1) {
var mergedWidth = offsetWidth * newScale;
var mergedHeight = offsetHeight * newScale;
var _getClientSize = getClientSize(),
clientWidth = _getClientSize.width,
clientHeight = _getClientSize.height;
if (mergedWidth <= clientWidth && mergedHeight <= clientHeight) {
newX = 0;
newY = 0;
}
}
updateTransform({
x: newX,
y: newY,
scale: newScale
}, action);
};
return {
transform: transform,
resetTransform: resetTransform,
updateTransform: updateTransform,
dispatchZoomChange: dispatchZoomChange
};
}
;// ./node_modules/rc-image/es/getFixScaleEleTransPosition.js
function fixPoint(key, start, width, clientWidth) {
var startAddWidth = start + width;
var offsetStart = (width - clientWidth) / 2;
if (width > clientWidth) {
if (start > 0) {
return (0,defineProperty["default"])({}, key, offsetStart);
}
if (start < 0 && startAddWidth < clientWidth) {
return (0,defineProperty["default"])({}, key, -offsetStart);
}
} else if (start < 0 || startAddWidth > clientWidth) {
return (0,defineProperty["default"])({}, key, start < 0 ? offsetStart : -offsetStart);
}
return {};
}
/**
* Fix positon x,y point when
*
* Ele width && height < client
* - Back origin
*
* - Ele width | height > clientWidth | clientHeight
* - left | top > 0 -> Back 0
* - left | top + width | height < clientWidth | clientHeight -> Back left | top + width | height === clientWidth | clientHeight
*
* Regardless of other
*/
function getFixScaleEleTransPosition(width, height, left, top) {
var _getClientSize = getClientSize(),
clientWidth = _getClientSize.width,
clientHeight = _getClientSize.height;
var fixPos = null;
if (width <= clientWidth && height <= clientHeight) {
fixPos = {
x: 0,
y: 0
};
} else if (width > clientWidth || height > clientHeight) {
fixPos = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, fixPoint('x', left, width, clientWidth)), fixPoint('y', top, height, clientHeight));
}
return fixPos;
}
;// ./node_modules/rc-image/es/previewConfig.js
/** Scale the ratio base */
var BASE_SCALE_RATIO = 1;
/** The maximum zoom ratio when the mouse zooms in, adjustable */
var WHEEL_MAX_SCALE_RATIO = 1;
;// ./node_modules/rc-image/es/hooks/useMouseEvent.js
function useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTransform, dispatchZoomChange) {
var rotate = transform.rotate,
scale = transform.scale,
x = transform.x,
y = transform.y;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
isMoving = _useState2[0],
setMoving = _useState2[1];
var startPositionInfo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
diffX: 0,
diffY: 0,
transformX: 0,
transformY: 0
});
var onMouseDown = function onMouseDown(event) {
// Only allow main button
if (!movable || event.button !== 0) return;
event.preventDefault();
event.stopPropagation();
startPositionInfo.current = {
diffX: event.pageX - x,
diffY: event.pageY - y,
transformX: x,
transformY: y
};
setMoving(true);
};
var onMouseMove = function onMouseMove(event) {
if (visible && isMoving) {
updateTransform({
x: event.pageX - startPositionInfo.current.diffX,
y: event.pageY - startPositionInfo.current.diffY
}, 'move');
}
};
var onMouseUp = function onMouseUp() {
if (visible && isMoving) {
setMoving(false);
/** No need to restore the position when the picture is not moved, So as not to interfere with the click */
var _startPositionInfo$cu = startPositionInfo.current,
transformX = _startPositionInfo$cu.transformX,
transformY = _startPositionInfo$cu.transformY;
var hasChangedPosition = x !== transformX && y !== transformY;
if (!hasChangedPosition) return;
var width = imgRef.current.offsetWidth * scale;
var height = imgRef.current.offsetHeight * scale;
// eslint-disable-next-line @typescript-eslint/no-shadow
var _imgRef$current$getBo = imgRef.current.getBoundingClientRect(),
left = _imgRef$current$getBo.left,
top = _imgRef$current$getBo.top;
var isRotate = rotate % 180 !== 0;
var fixState = getFixScaleEleTransPosition(isRotate ? height : width, isRotate ? width : height, left, top);
if (fixState) {
updateTransform((0,objectSpread2["default"])({}, fixState), 'dragRebound');
}
}
};
var onWheel = function onWheel(event) {
if (!visible || event.deltaY == 0) return;
// Scale ratio depends on the deltaY size
var scaleRatio = Math.abs(event.deltaY / 100);
// Limit the maximum scale ratio
var mergedScaleRatio = Math.min(scaleRatio, WHEEL_MAX_SCALE_RATIO);
// Scale the ratio each time
var ratio = BASE_SCALE_RATIO + mergedScaleRatio * scaleStep;
if (event.deltaY > 0) {
ratio = BASE_SCALE_RATIO / ratio;
}
dispatchZoomChange(ratio, 'wheel', event.clientX, event.clientY);
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var onTopMouseUpListener;
var onTopMouseMoveListener;
var onMouseUpListener;
var onMouseMoveListener;
if (movable) {
onMouseUpListener = addEventListenerWrap(window, 'mouseup', onMouseUp, false);
onMouseMoveListener = addEventListenerWrap(window, 'mousemove', onMouseMove, false);
try {
// Resolve if in iframe lost event
/* istanbul ignore next */
if (window.top !== window.self) {
onTopMouseUpListener = addEventListenerWrap(window.top, 'mouseup', onMouseUp, false);
onTopMouseMoveListener = addEventListenerWrap(window.top, 'mousemove', onMouseMove, false);
}
} catch (error) {
/* istanbul ignore next */
(0,warning.warning)(false, "[rc-image] ".concat(error));
}
}
return function () {
var _onMouseUpListener, _onMouseMoveListener, _onTopMouseUpListener, _onTopMouseMoveListen;
(_onMouseUpListener = onMouseUpListener) === null || _onMouseUpListener === void 0 || _onMouseUpListener.remove();
(_onMouseMoveListener = onMouseMoveListener) === null || _onMouseMoveListener === void 0 || _onMouseMoveListener.remove();
/* istanbul ignore next */
(_onTopMouseUpListener = onTopMouseUpListener) === null || _onTopMouseUpListener === void 0 || _onTopMouseUpListener.remove();
/* istanbul ignore next */
(_onTopMouseMoveListen = onTopMouseMoveListener) === null || _onTopMouseMoveListen === void 0 || _onTopMouseMoveListen.remove();
};
}, [visible, isMoving, x, y, rotate, movable]);
return {
isMoving: isMoving,
onMouseDown: onMouseDown,
onMouseMove: onMouseMove,
onMouseUp: onMouseUp,
onWheel: onWheel
};
}
;// ./node_modules/rc-image/es/util.js
function isImageValid(src) {
return new Promise(function (resolve) {
if (!src) {
resolve(false);
return;
}
var img = document.createElement('img');
img.onerror = function () {
return resolve(false);
};
img.onload = function () {
return resolve(true);
};
img.src = src;
});
}
;// ./node_modules/rc-image/es/hooks/useStatus.js
function useStatus(_ref) {
var src = _ref.src,
isCustomPlaceholder = _ref.isCustomPlaceholder,
fallback = _ref.fallback;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(isCustomPlaceholder ? 'loading' : 'normal'),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
status = _useState2[0],
setStatus = _useState2[1];
var isLoaded = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var isError = status === 'error';
// https://github.com/react-component/image/pull/187
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var isCurrentSrc = true;
isImageValid(src).then(function (isValid) {
// https://github.com/ant-design/ant-design/issues/44948
// If src changes, the previous setStatus should not be triggered
if (!isValid && isCurrentSrc) {
setStatus('error');
}
});
return function () {
isCurrentSrc = false;
};
}, [src]);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (isCustomPlaceholder && !isLoaded.current) {
setStatus('loading');
} else if (isError) {
setStatus('normal');
}
}, [src]);
var onLoad = function onLoad() {
setStatus('normal');
};
var getImgRef = function getImgRef(img) {
isLoaded.current = false;
if (status === 'loading' && img !== null && img !== void 0 && img.complete && (img.naturalWidth || img.naturalHeight)) {
isLoaded.current = true;
onLoad();
}
};
var srcAndOnload = isError && fallback ? {
src: fallback
} : {
onLoad: onLoad,
src: src
};
return [getImgRef, srcAndOnload, status];
}
;// ./node_modules/rc-image/es/hooks/useTouchEvent.js
function getDistance(a, b) {
var x = a.x - b.x;
var y = a.y - b.y;
return Math.hypot(x, y);
}
function getCenter(oldPoint1, oldPoint2, newPoint1, newPoint2) {
// Calculate the distance each point has moved
var distance1 = getDistance(oldPoint1, newPoint1);
var distance2 = getDistance(oldPoint2, newPoint2);
// If both distances are 0, return the original points
if (distance1 === 0 && distance2 === 0) {
return [oldPoint1.x, oldPoint1.y];
}
// Calculate the ratio of the distances
var ratio = distance1 / (distance1 + distance2);
// Calculate the new center point based on the ratio
var x = oldPoint1.x + ratio * (oldPoint2.x - oldPoint1.x);
var y = oldPoint1.y + ratio * (oldPoint2.y - oldPoint1.y);
return [x, y];
}
function useTouchEvent(imgRef, movable, visible, minScale, transform, updateTransform, dispatchZoomChange) {
var rotate = transform.rotate,
scale = transform.scale,
x = transform.x,
y = transform.y;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
isTouching = _useState2[0],
setIsTouching = _useState2[1];
var touchPointInfo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
point1: {
x: 0,
y: 0
},
point2: {
x: 0,
y: 0
},
eventType: 'none'
});
var updateTouchPointInfo = function updateTouchPointInfo(values) {
touchPointInfo.current = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, touchPointInfo.current), values);
};
var onTouchStart = function onTouchStart(event) {
if (!movable) return;
event.stopPropagation();
setIsTouching(true);
var _event$touches = event.touches,
touches = _event$touches === void 0 ? [] : _event$touches;
if (touches.length > 1) {
// touch zoom
updateTouchPointInfo({
point1: {
x: touches[0].clientX,
y: touches[0].clientY
},
point2: {
x: touches[1].clientX,
y: touches[1].clientY
},
eventType: 'touchZoom'
});
} else {
// touch move
updateTouchPointInfo({
point1: {
x: touches[0].clientX - x,
y: touches[0].clientY - y
},
eventType: 'move'
});
}
};
var onTouchMove = function onTouchMove(event) {
var _event$touches2 = event.touches,
touches = _event$touches2 === void 0 ? [] : _event$touches2;
var _touchPointInfo$curre = touchPointInfo.current,
point1 = _touchPointInfo$curre.point1,
point2 = _touchPointInfo$curre.point2,
eventType = _touchPointInfo$curre.eventType;
if (touches.length > 1 && eventType === 'touchZoom') {
// touch zoom
var newPoint1 = {
x: touches[0].clientX,
y: touches[0].clientY
};
var newPoint2 = {
x: touches[1].clientX,
y: touches[1].clientY
};
var _getCenter = getCenter(point1, point2, newPoint1, newPoint2),
_getCenter2 = (0,slicedToArray["default"])(_getCenter, 2),
centerX = _getCenter2[0],
centerY = _getCenter2[1];
var ratio = getDistance(newPoint1, newPoint2) / getDistance(point1, point2);
dispatchZoomChange(ratio, 'touchZoom', centerX, centerY, true);
updateTouchPointInfo({
point1: newPoint1,
point2: newPoint2,
eventType: 'touchZoom'
});
} else if (eventType === 'move') {
// touch move
updateTransform({
x: touches[0].clientX - point1.x,
y: touches[0].clientY - point1.y
}, 'move');
updateTouchPointInfo({
eventType: 'move'
});
}
};
var onTouchEnd = function onTouchEnd() {
if (!visible) return;
if (isTouching) {
setIsTouching(false);
}
updateTouchPointInfo({
eventType: 'none'
});
if (minScale > scale) {
/** When the scaling ratio is less than the minimum scaling ratio, reset the scaling ratio */
return updateTransform({
x: 0,
y: 0,
scale: minScale
}, 'touchZoom');
}
var width = imgRef.current.offsetWidth * scale;
var height = imgRef.current.offsetHeight * scale;
// eslint-disable-next-line @typescript-eslint/no-shadow
var _imgRef$current$getBo = imgRef.current.getBoundingClientRect(),
left = _imgRef$current$getBo.left,
top = _imgRef$current$getBo.top;
var isRotate = rotate % 180 !== 0;
var fixState = getFixScaleEleTransPosition(isRotate ? height : width, isRotate ? width : height, left, top);
if (fixState) {
updateTransform((0,objectSpread2["default"])({}, fixState), 'dragRebound');
}
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var onTouchMoveListener;
if (visible && movable) {
onTouchMoveListener = addEventListenerWrap(window, 'touchmove', function (e) {
return e.preventDefault();
}, {
passive: false
});
}
return function () {
var _onTouchMoveListener;
(_onTouchMoveListener = onTouchMoveListener) === null || _onTouchMoveListener === void 0 || _onTouchMoveListener.remove();
};
}, [visible, movable]);
return {
isTouching: isTouching,
onTouchStart: onTouchStart,
onTouchMove: onTouchMove,
onTouchEnd: onTouchEnd
};
}
;// ./node_modules/rc-image/es/Preview.js
var Preview_excluded = ["fallback", "src", "imgRef"],
Preview_excluded2 = ["prefixCls", "src", "alt", "imageInfo", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"];
var PreviewImage = function PreviewImage(_ref) {
var fallback = _ref.fallback,
src = _ref.src,
imgRef = _ref.imgRef,
props = (0,objectWithoutProperties["default"])(_ref, Preview_excluded);
var _useStatus = useStatus({
src: src,
fallback: fallback
}),
_useStatus2 = (0,slicedToArray["default"])(_useStatus, 2),
getImgRef = _useStatus2[0],
srcAndOnload = _useStatus2[1];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("img", (0,esm_extends["default"])({
ref: function ref(_ref2) {
imgRef.current = _ref2;
getImgRef(_ref2);
}
}, props, srcAndOnload));
};
var Preview = function Preview(props) {
var prefixCls = props.prefixCls,
src = props.src,
alt = props.alt,
imageInfo = props.imageInfo,
fallback = props.fallback,
_props$movable = props.movable,
movable = _props$movable === void 0 ? true : _props$movable,
onClose = props.onClose,
visible = props.visible,
_props$icons = props.icons,
icons = _props$icons === void 0 ? {} : _props$icons,
rootClassName = props.rootClassName,
closeIcon = props.closeIcon,
getContainer = props.getContainer,
_props$current = props.current,
current = _props$current === void 0 ? 0 : _props$current,
_props$count = props.count,
count = _props$count === void 0 ? 1 : _props$count,
countRender = props.countRender,
_props$scaleStep = props.scaleStep,
scaleStep = _props$scaleStep === void 0 ? 0.5 : _props$scaleStep,
_props$minScale = props.minScale,
minScale = _props$minScale === void 0 ? 1 : _props$minScale,
_props$maxScale = props.maxScale,
maxScale = _props$maxScale === void 0 ? 50 : _props$maxScale,
_props$transitionName = props.transitionName,
transitionName = _props$transitionName === void 0 ? 'zoom' : _props$transitionName,
_props$maskTransition = props.maskTransitionName,
maskTransitionName = _props$maskTransition === void 0 ? 'fade' : _props$maskTransition,
imageRender = props.imageRender,
imgCommonProps = props.imgCommonProps,
toolbarRender = props.toolbarRender,
onTransform = props.onTransform,
onChange = props.onChange,
restProps = (0,objectWithoutProperties["default"])(props, Preview_excluded2);
var imgRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var groupContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PreviewGroupContext);
var showLeftOrRightSwitches = groupContext && count > 1;
var showOperationsProgress = groupContext && count >= 1;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(true),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
enableTransition = _useState2[0],
setEnableTransition = _useState2[1];
var _useImageTransform = useImageTransform(imgRef, minScale, maxScale, onTransform),
transform = _useImageTransform.transform,
resetTransform = _useImageTransform.resetTransform,
updateTransform = _useImageTransform.updateTransform,
dispatchZoomChange = _useImageTransform.dispatchZoomChange;
var _useMouseEvent = useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTransform, dispatchZoomChange),
isMoving = _useMouseEvent.isMoving,
onMouseDown = _useMouseEvent.onMouseDown,
onWheel = _useMouseEvent.onWheel;
var _useTouchEvent = useTouchEvent(imgRef, movable, visible, minScale, transform, updateTransform, dispatchZoomChange),
isTouching = _useTouchEvent.isTouching,
onTouchStart = _useTouchEvent.onTouchStart,
onTouchMove = _useTouchEvent.onTouchMove,
onTouchEnd = _useTouchEvent.onTouchEnd;
var rotate = transform.rotate,
scale = transform.scale;
var wrapClassName = classnames_default()((0,defineProperty["default"])({}, "".concat(prefixCls, "-moving"), isMoving));
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (!enableTransition) {
setEnableTransition(true);
}
}, [enableTransition]);
var onAfterClose = function onAfterClose() {
resetTransform('close');
};
var onZoomIn = function onZoomIn() {
dispatchZoomChange(BASE_SCALE_RATIO + scaleStep, 'zoomIn');
};
var onZoomOut = function onZoomOut() {
dispatchZoomChange(BASE_SCALE_RATIO / (BASE_SCALE_RATIO + scaleStep), 'zoomOut');
};
var onRotateRight = function onRotateRight() {
updateTransform({
rotate: rotate + 90
}, 'rotateRight');
};
var onRotateLeft = function onRotateLeft() {
updateTransform({
rotate: rotate - 90
}, 'rotateLeft');
};
var onFlipX = function onFlipX() {
updateTransform({
flipX: !transform.flipX
}, 'flipX');
};
var onFlipY = function onFlipY() {
updateTransform({
flipY: !transform.flipY
}, 'flipY');
};
var onReset = function onReset() {
resetTransform('reset');
};
var onActive = function onActive(offset) {
var position = current + offset;
if (!Number.isInteger(position) || position < 0 || position > count - 1) {
return;
}
setEnableTransition(false);
resetTransform(offset < 0 ? 'prev' : 'next');
onChange === null || onChange === void 0 || onChange(position, current);
};
var onKeyDown = function onKeyDown(event) {
if (!visible || !showLeftOrRightSwitches) return;
if (event.keyCode === KeyCode["default"].LEFT) {
onActive(-1);
} else if (event.keyCode === KeyCode["default"].RIGHT) {
onActive(1);
}
};
var onDoubleClick = function onDoubleClick(event) {
if (visible) {
if (scale !== 1) {
updateTransform({
x: 0,
y: 0,
scale: 1
}, 'doubleClick');
} else {
dispatchZoomChange(BASE_SCALE_RATIO + scaleStep, 'doubleClick', event.clientX, event.clientY);
}
}
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var onKeyDownListener = addEventListenerWrap(window, 'keydown', onKeyDown, false);
return function () {
onKeyDownListener.remove();
};
}, [visible, showLeftOrRightSwitches, current]);
var imgNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewImage, (0,esm_extends["default"])({}, imgCommonProps, {
width: props.width,
height: props.height,
imgRef: imgRef,
className: "".concat(prefixCls, "-img"),
alt: alt,
style: {
transform: "translate3d(".concat(transform.x, "px, ").concat(transform.y, "px, 0) scale3d(").concat(transform.flipX ? '-' : '').concat(scale, ", ").concat(transform.flipY ? '-' : '').concat(scale, ", 1) rotate(").concat(rotate, "deg)"),
transitionDuration: (!enableTransition || isTouching) && '0s'
},
fallback: fallback,
src: src,
onWheel: onWheel,
onMouseDown: onMouseDown,
onDoubleClick: onDoubleClick,
onTouchStart: onTouchStart,
onTouchMove: onTouchMove,
onTouchEnd: onTouchEnd,
onTouchCancel: onTouchEnd
}));
var image = (0,objectSpread2["default"])({
url: src,
alt: alt
}, imageInfo);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_dialog_es, (0,esm_extends["default"])({
transitionName: transitionName,
maskTransitionName: maskTransitionName,
closable: false,
keyboard: true,
prefixCls: prefixCls,
onClose: onClose,
visible: visible,
classNames: {
wrapper: wrapClassName
},
rootClassName: rootClassName,
getContainer: getContainer
}, restProps, {
afterClose: onAfterClose
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-img-wrapper")
}, imageRender ? imageRender(imgNode, (0,objectSpread2["default"])({
transform: transform,
image: image
}, groupContext ? {
current: current
} : {})) : imgNode)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Operations, {
visible: visible,
transform: transform,
maskTransitionName: maskTransitionName,
closeIcon: closeIcon,
getContainer: getContainer,
prefixCls: prefixCls,
rootClassName: rootClassName,
icons: icons,
countRender: countRender,
showSwitch: showLeftOrRightSwitches,
showProgress: showOperationsProgress,
current: current,
count: count,
scale: scale,
minScale: minScale,
maxScale: maxScale,
toolbarRender: toolbarRender,
onActive: onActive,
onZoomIn: onZoomIn,
onZoomOut: onZoomOut,
onRotateRight: onRotateRight,
onRotateLeft: onRotateLeft,
onFlipX: onFlipX,
onFlipY: onFlipY,
onClose: onClose,
onReset: onReset,
zIndex: restProps.zIndex !== undefined ? restProps.zIndex + 1 : undefined,
image: image
}));
};
/* harmony default export */ var es_Preview = (Preview);
;// ./node_modules/rc-image/es/common.js
var COMMON_PROPS = ['crossOrigin', 'decoding', 'draggable', 'loading', 'referrerPolicy', 'sizes', 'srcSet', 'useMap', 'alt'];
;// ./node_modules/rc-image/es/hooks/usePreviewItems.js
/**
* Merge props provided `items` or context collected images
*/
function usePreviewItems(items) {
// Context collection image data
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
images = _React$useState2[0],
setImages = _React$useState2[1];
var registerImage = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (id, data) {
setImages(function (imgs) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, imgs), {}, (0,defineProperty["default"])({}, id, data));
});
return function () {
setImages(function (imgs) {
var cloneImgs = (0,objectSpread2["default"])({}, imgs);
delete cloneImgs[id];
return cloneImgs;
});
};
}, []);
// items
var mergedItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// use `items` first
if (items) {
return items.map(function (item) {
if (typeof item === 'string') {
return {
data: {
src: item
}
};
}
var data = {};
Object.keys(item).forEach(function (key) {
if (['src'].concat((0,toConsumableArray["default"])(COMMON_PROPS)).includes(key)) {
data[key] = item[key];
}
});
return {
data: data
};
});
}
// use registered images secondly
return Object.keys(images).reduce(function (total, id) {
var _images$id = images[id],
canPreview = _images$id.canPreview,
data = _images$id.data;
if (canPreview) {
total.push({
data: data,
id: id
});
}
return total;
}, []);
}, [items, images]);
return [mergedItems, registerImage, !!items];
}
;// ./node_modules/rc-image/es/PreviewGroup.js
var PreviewGroup_excluded = ["visible", "onVisibleChange", "getContainer", "current", "movable", "minScale", "maxScale", "countRender", "closeIcon", "onChange", "onTransform", "toolbarRender", "imageRender"],
PreviewGroup_excluded2 = ["src"];
var PreviewGroup_Group = function Group(_ref) {
var _mergedItems$current;
var _ref$previewPrefixCls = _ref.previewPrefixCls,
previewPrefixCls = _ref$previewPrefixCls === void 0 ? 'rc-image-preview' : _ref$previewPrefixCls,
children = _ref.children,
_ref$icons = _ref.icons,
icons = _ref$icons === void 0 ? {} : _ref$icons,
items = _ref.items,
preview = _ref.preview,
fallback = _ref.fallback;
var _ref2 = (0,esm_typeof["default"])(preview) === 'object' ? preview : {},
previewVisible = _ref2.visible,
onVisibleChange = _ref2.onVisibleChange,
getContainer = _ref2.getContainer,
currentIndex = _ref2.current,
movable = _ref2.movable,
minScale = _ref2.minScale,
maxScale = _ref2.maxScale,
countRender = _ref2.countRender,
closeIcon = _ref2.closeIcon,
onChange = _ref2.onChange,
onTransform = _ref2.onTransform,
toolbarRender = _ref2.toolbarRender,
imageRender = _ref2.imageRender,
dialogProps = (0,objectWithoutProperties["default"])(_ref2, PreviewGroup_excluded);
// ========================== Items ===========================
var _usePreviewItems = usePreviewItems(items),
_usePreviewItems2 = (0,slicedToArray["default"])(_usePreviewItems, 3),
mergedItems = _usePreviewItems2[0],
register = _usePreviewItems2[1],
fromItems = _usePreviewItems2[2];
// ========================= Preview ==========================
// >>> Index
var _useMergedState = (0,useMergedState["default"])(0, {
value: currentIndex
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
current = _useMergedState2[0],
setCurrent = _useMergedState2[1];
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
keepOpenIndex = _useState2[0],
setKeepOpenIndex = _useState2[1];
// >>> Image
var _ref3 = ((_mergedItems$current = mergedItems[current]) === null || _mergedItems$current === void 0 ? void 0 : _mergedItems$current.data) || {},
src = _ref3.src,
imgCommonProps = (0,objectWithoutProperties["default"])(_ref3, PreviewGroup_excluded2);
// >>> Visible
var _useMergedState3 = (0,useMergedState["default"])(!!previewVisible, {
value: previewVisible,
onChange: function onChange(val, prevVal) {
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(val, prevVal, current);
}
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
isShowPreview = _useMergedState4[0],
setShowPreview = _useMergedState4[1];
// >>> Position
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
mousePosition = _useState4[0],
setMousePosition = _useState4[1];
var onPreviewFromImage = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (id, imageSrc, mouseX, mouseY) {
var index = fromItems ? mergedItems.findIndex(function (item) {
return item.data.src === imageSrc;
}) : mergedItems.findIndex(function (item) {
return item.id === id;
});
setCurrent(index < 0 ? 0 : index);
setShowPreview(true);
setMousePosition({
x: mouseX,
y: mouseY
});
setKeepOpenIndex(true);
}, [mergedItems, fromItems]);
// Reset current when reopen
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (isShowPreview) {
if (!keepOpenIndex) {
setCurrent(0);
}
} else {
setKeepOpenIndex(false);
}
}, [isShowPreview]);
// ========================== Events ==========================
var onInternalChange = function onInternalChange(next, prev) {
setCurrent(next);
onChange === null || onChange === void 0 || onChange(next, prev);
};
var onPreviewClose = function onPreviewClose() {
setShowPreview(false);
setMousePosition(null);
};
// ========================= Context ==========================
var previewGroupContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
register: register,
onPreview: onPreviewFromImage
};
}, [register, onPreviewFromImage]);
// ========================== Render ==========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PreviewGroupContext.Provider, {
value: previewGroupContext
}, children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Preview, (0,esm_extends["default"])({
"aria-hidden": !isShowPreview,
movable: movable,
visible: isShowPreview,
prefixCls: previewPrefixCls,
closeIcon: closeIcon,
onClose: onPreviewClose,
mousePosition: mousePosition,
imgCommonProps: imgCommonProps,
src: src,
fallback: fallback,
icons: icons,
minScale: minScale,
maxScale: maxScale,
getContainer: getContainer,
current: current,
count: mergedItems.length,
countRender: countRender,
onTransform: onTransform,
toolbarRender: toolbarRender,
imageRender: imageRender,
onChange: onInternalChange
}, dialogProps)));
};
/* harmony default export */ var PreviewGroup = (PreviewGroup_Group);
;// ./node_modules/rc-image/es/hooks/useRegisterImage.js
var uid = 0;
function useRegisterImage(canPreview, data) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
uid += 1;
return String(uid);
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
id = _React$useState2[0];
var groupContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PreviewGroupContext);
var registerData = {
data: data,
canPreview: canPreview
};
// Keep order start
// Resolve https://github.com/ant-design/ant-design/issues/28881
// Only need unRegister when component unMount
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (groupContext) {
return groupContext.register(id, registerData);
}
}, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (groupContext) {
groupContext.register(id, registerData);
}
}, [canPreview, data]);
return id;
}
;// ./node_modules/rc-image/es/Image.js
var Image_excluded = ["src", "alt", "onPreviewClose", "prefixCls", "previewPrefixCls", "placeholder", "fallback", "width", "height", "style", "preview", "className", "onClick", "onError", "wrapperClassName", "wrapperStyle", "rootClassName"],
Image_excluded2 = ["src", "visible", "onVisibleChange", "getContainer", "mask", "maskClassName", "movable", "icons", "scaleStep", "minScale", "maxScale", "imageRender", "toolbarRender"];
var ImageInternal = function ImageInternal(props) {
var imgSrc = props.src,
alt = props.alt,
onInitialPreviewClose = props.onPreviewClose,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-image' : _props$prefixCls,
_props$previewPrefixC = props.previewPrefixCls,
previewPrefixCls = _props$previewPrefixC === void 0 ? "".concat(prefixCls, "-preview") : _props$previewPrefixC,
placeholder = props.placeholder,
fallback = props.fallback,
width = props.width,
height = props.height,
style = props.style,
_props$preview = props.preview,
preview = _props$preview === void 0 ? true : _props$preview,
className = props.className,
onClick = props.onClick,
onError = props.onError,
wrapperClassName = props.wrapperClassName,
wrapperStyle = props.wrapperStyle,
rootClassName = props.rootClassName,
otherProps = (0,objectWithoutProperties["default"])(props, Image_excluded);
var isCustomPlaceholder = placeholder && placeholder !== true;
var _ref = (0,esm_typeof["default"])(preview) === 'object' ? preview : {},
previewSrc = _ref.src,
_ref$visible = _ref.visible,
previewVisible = _ref$visible === void 0 ? undefined : _ref$visible,
_ref$onVisibleChange = _ref.onVisibleChange,
onPreviewVisibleChange = _ref$onVisibleChange === void 0 ? onInitialPreviewClose : _ref$onVisibleChange,
_ref$getContainer = _ref.getContainer,
getPreviewContainer = _ref$getContainer === void 0 ? undefined : _ref$getContainer,
previewMask = _ref.mask,
maskClassName = _ref.maskClassName,
movable = _ref.movable,
icons = _ref.icons,
scaleStep = _ref.scaleStep,
minScale = _ref.minScale,
maxScale = _ref.maxScale,
imageRender = _ref.imageRender,
toolbarRender = _ref.toolbarRender,
dialogProps = (0,objectWithoutProperties["default"])(_ref, Image_excluded2);
var src = previewSrc !== null && previewSrc !== void 0 ? previewSrc : imgSrc;
var _useMergedState = (0,useMergedState["default"])(!!previewVisible, {
value: previewVisible,
onChange: onPreviewVisibleChange
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
isShowPreview = _useMergedState2[0],
setShowPreview = _useMergedState2[1];
var _useStatus = useStatus({
src: imgSrc,
isCustomPlaceholder: isCustomPlaceholder,
fallback: fallback
}),
_useStatus2 = (0,slicedToArray["default"])(_useStatus, 3),
getImgRef = _useStatus2[0],
srcAndOnload = _useStatus2[1],
status = _useStatus2[2];
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
mousePosition = _useState2[0],
setMousePosition = _useState2[1];
var groupContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PreviewGroupContext);
var canPreview = !!preview;
var onPreviewClose = function onPreviewClose() {
setShowPreview(false);
setMousePosition(null);
};
var wrapperClass = classnames_default()(prefixCls, wrapperClassName, rootClassName, (0,defineProperty["default"])({}, "".concat(prefixCls, "-error"), status === 'error'));
// ========================= ImageProps =========================
var imgCommonProps = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var obj = {};
COMMON_PROPS.forEach(function (prop) {
if (props[prop] !== undefined) {
obj[prop] = props[prop];
}
});
return obj;
}, COMMON_PROPS.map(function (prop) {
return props[prop];
}));
// ========================== Register ==========================
var registerData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, imgCommonProps), {}, {
src: src
});
}, [src, imgCommonProps]);
var imageId = useRegisterImage(canPreview, registerData);
// ========================== Preview ===========================
var onPreview = function onPreview(e) {
var _getOffset = css_getOffset(e.target),
left = _getOffset.left,
top = _getOffset.top;
if (groupContext) {
groupContext.onPreview(imageId, src, left, top);
} else {
setMousePosition({
x: left,
y: top
});
setShowPreview(true);
}
onClick === null || onClick === void 0 || onClick(e);
};
// =========================== Render ===========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, otherProps, {
className: wrapperClass,
onClick: canPreview ? onPreview : onClick,
style: (0,objectSpread2["default"])({
width: width,
height: height
}, wrapperStyle)
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", (0,esm_extends["default"])({}, imgCommonProps, {
className: classnames_default()("".concat(prefixCls, "-img"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-img-placeholder"), placeholder === true), className),
style: (0,objectSpread2["default"])({
height: height
}, style),
ref: getImgRef
}, srcAndOnload, {
width: width,
height: height,
onError: onError
})), status === 'loading' && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
"aria-hidden": "true",
className: "".concat(prefixCls, "-placeholder")
}, placeholder), previewMask && canPreview && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-mask"), maskClassName),
style: {
display: (style === null || style === void 0 ? void 0 : style.display) === 'none' ? 'none' : undefined
}
}, previewMask)), !groupContext && canPreview && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Preview, (0,esm_extends["default"])({
"aria-hidden": !isShowPreview,
visible: isShowPreview,
prefixCls: previewPrefixCls,
onClose: onPreviewClose,
mousePosition: mousePosition,
src: src,
alt: alt,
imageInfo: {
width: width,
height: height
},
fallback: fallback,
getContainer: getPreviewContainer,
icons: icons,
movable: movable,
scaleStep: scaleStep,
minScale: minScale,
maxScale: maxScale,
rootClassName: rootClassName,
imageRender: imageRender,
imgCommonProps: imgCommonProps,
toolbarRender: toolbarRender
}, dialogProps)));
};
ImageInternal.PreviewGroup = PreviewGroup;
if (true) {
ImageInternal.displayName = 'Image';
}
/* harmony default export */ var es_Image = (ImageInternal);
;// ./node_modules/rc-image/es/index.js
/* harmony default export */ var rc_image_es = (es_Image);
;// ./node_modules/@ant-design/icons-svg/es/asn/RotateLeftOutlined.js
// This icon file is generated automatically.
var RotateLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { "tag": "path", "attrs": { "d": "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, "name": "rotate-left", "theme": "outlined" };
/* harmony default export */ var asn_RotateLeftOutlined = (RotateLeftOutlined);
;// ./node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RotateLeftOutlined_RotateLeftOutlined = function RotateLeftOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_RotateLeftOutlined
}));
};
/** */
var RotateLeftOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RotateLeftOutlined_RotateLeftOutlined);
if (true) {
RotateLeftOutlined_RefIcon.displayName = 'RotateLeftOutlined';
}
/* harmony default export */ var icons_RotateLeftOutlined = (RotateLeftOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/RotateRightOutlined.js
// This icon file is generated automatically.
var RotateRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { "tag": "path", "attrs": { "d": "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, "name": "rotate-right", "theme": "outlined" };
/* harmony default export */ var asn_RotateRightOutlined = (RotateRightOutlined);
;// ./node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RotateRightOutlined_RotateRightOutlined = function RotateRightOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_RotateRightOutlined
}));
};
/** */
var RotateRightOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RotateRightOutlined_RotateRightOutlined);
if (true) {
RotateRightOutlined_RefIcon.displayName = 'RotateRightOutlined';
}
/* harmony default export */ var icons_RotateRightOutlined = (RotateRightOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/SwapOutlined.js
// This icon file is generated automatically.
var SwapOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "swap", "theme": "outlined" };
/* harmony default export */ var asn_SwapOutlined = (SwapOutlined);
;// ./node_modules/@ant-design/icons/es/icons/SwapOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SwapOutlined_SwapOutlined = function SwapOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_SwapOutlined
}));
};
/** */
var SwapOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SwapOutlined_SwapOutlined);
if (true) {
SwapOutlined_RefIcon.displayName = 'SwapOutlined';
}
/* harmony default export */ var icons_SwapOutlined = (SwapOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/ZoomInOutlined.js
// This icon file is generated automatically.
var ZoomInOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-in", "theme": "outlined" };
/* harmony default export */ var asn_ZoomInOutlined = (ZoomInOutlined);
;// ./node_modules/@ant-design/icons/es/icons/ZoomInOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ZoomInOutlined_ZoomInOutlined = function ZoomInOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_ZoomInOutlined
}));
};
/** */
var ZoomInOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ZoomInOutlined_ZoomInOutlined);
if (true) {
ZoomInOutlined_RefIcon.displayName = 'ZoomInOutlined';
}
/* harmony default export */ var icons_ZoomInOutlined = (ZoomInOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/ZoomOutOutlined.js
// This icon file is generated automatically.
var ZoomOutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-out", "theme": "outlined" };
/* harmony default export */ var asn_ZoomOutOutlined = (ZoomOutOutlined);
;// ./node_modules/@ant-design/icons/es/icons/ZoomOutOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ZoomOutOutlined_ZoomOutOutlined = function ZoomOutOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_ZoomOutOutlined
}));
};
/** */
var ZoomOutOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ZoomOutOutlined_ZoomOutOutlined);
if (true) {
ZoomOutOutlined_RefIcon.displayName = 'ZoomOutOutlined';
}
/* harmony default export */ var icons_ZoomOutOutlined = (ZoomOutOutlined_RefIcon);
// EXTERNAL MODULE: ./components/image/style/index.ts
var image_style = __webpack_require__("./components/image/style/index.ts");
;// ./components/image/PreviewGroup.tsx
var PreviewGroup_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;
};
const icons = {
rotateLeft: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_RotateLeftOutlined, null),
rotateRight: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_RotateRightOutlined, null),
zoomIn: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ZoomInOutlined, null),
zoomOut: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ZoomOutOutlined, null),
close: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null),
left: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null),
right: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null),
flipX: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SwapOutlined, null),
flipY: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SwapOutlined, {
rotate: 90
})
};
const InternalPreviewGroup = _a => {
var {
previewPrefixCls: customizePrefixCls,
preview
} = _a,
otherProps = PreviewGroup_rest(_a, ["previewPrefixCls", "preview"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('image', customizePrefixCls);
const previewPrefixCls = `${prefixCls}-preview`;
const rootPrefixCls = getPrefixCls();
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,image_style["default"])(prefixCls, rootCls);
const [zIndex] = (0,useZIndex.useZIndex)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);
const mergedPreview = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a;
if (preview === false) {
return preview;
}
const _preview = typeof preview === 'object' ? preview : {};
const mergedRootClassName = classnames_default()(hashId, cssVarCls, rootCls, (_a = _preview.rootClassName) !== null && _a !== void 0 ? _a : '');
return Object.assign(Object.assign({}, _preview), {
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom', _preview.transitionName),
maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'fade', _preview.maskTransitionName),
rootClassName: mergedRootClassName,
zIndex
});
}, [preview]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_image_es.PreviewGroup, Object.assign({
preview: mergedPreview,
previewPrefixCls: previewPrefixCls,
icons: icons
}, otherProps)));
};
/* harmony default export */ var image_PreviewGroup = (InternalPreviewGroup);
;// ./components/image/index.tsx
var image_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;
};
const image_Image = props => {
const {
prefixCls: customizePrefixCls,
preview,
className,
rootClassName,
style
} = props,
otherProps = image_rest(props, ["prefixCls", "preview", "className", "rootClassName", "style"]);
const {
getPrefixCls,
getPopupContainer: getContextPopupContainer,
className: contextClassName,
style: contextStyle,
preview: contextPreview
} = (0,config_provider_context.useComponentConfig)('image');
const [imageLocale] = (0,useLocale["default"])('Image');
const prefixCls = getPrefixCls('image', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,image_style["default"])(prefixCls, rootCls);
const mergedRootClassName = classnames_default()(rootClassName, hashId, cssVarCls, rootCls);
const mergedClassName = classnames_default()(className, hashId, contextClassName);
const [zIndex] = (0,useZIndex.useZIndex)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);
const mergedPreview = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (preview === false) {
return preview;
}
const _preview = typeof preview === 'object' ? preview : {};
const {
getContainer,
closeIcon,
rootClassName
} = _preview,
restPreviewProps = image_rest(_preview, ["getContainer", "closeIcon", "rootClassName"]);
return Object.assign(Object.assign({
mask: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-mask-info`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeOutlined, null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview)),
icons: icons
}, restPreviewProps), {
rootClassName: classnames_default()(mergedRootClassName, rootClassName),
getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom', _preview.transitionName),
maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'fade', _preview.maskTransitionName),
zIndex,
closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : contextPreview === null || contextPreview === void 0 ? void 0 : contextPreview.closeIcon
});
}, [preview, imageLocale, contextPreview === null || contextPreview === void 0 ? void 0 : contextPreview.closeIcon]);
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_image_es, Object.assign({
prefixCls: prefixCls,
preview: mergedPreview,
rootClassName: mergedRootClassName,
className: mergedClassName,
style: mergedStyle
}, otherProps)));
};
image_Image.PreviewGroup = image_PreviewGroup;
if (true) {
image_Image.displayName = 'Image';
}
/* harmony default export */ var components_image = (image_Image);
;// ./components/input/Group.tsx
/** @deprecated Please use `Space.Compact` */
const Group_Group = props => {
const {
getPrefixCls,
direction
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
className
} = props;
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
const inputPrefixCls = getPrefixCls('input');
const [wrapCSSVar, hashId, cssVarCls] = (0,input_style["default"])(inputPrefixCls);
const cls = classnames_default()(prefixCls, cssVarCls, {
[`${prefixCls}-lg`]: props.size === 'large',
[`${prefixCls}-sm`]: props.size === 'small',
[`${prefixCls}-compact`]: props.compact,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, hashId, className);
const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
const groupFormItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
isFormItemInput: false
}), [formItemContext]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Input.Group');
warning.deprecated(false, 'Input.Group', 'Space.Compact');
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: cls,
style: props.style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
onFocus: props.onFocus,
onBlur: props.onBlur
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
value: groupFormItemContext
}, props.children)));
};
/* harmony default export */ var input_Group = (Group_Group);
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var cssinjs_utils_es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/input/style/token.ts
var input_style_token = __webpack_require__("./components/input/style/token.ts");
;// ./components/input/style/otp.ts
// =============================== OTP ================================
const genOTPStyle = token => {
const {
componentCls,
paddingXS
} = token;
return {
[componentCls]: {
display: 'inline-flex',
alignItems: 'center',
flexWrap: 'nowrap',
columnGap: paddingXS,
'&-rtl': {
direction: 'rtl'
},
[`${componentCls}-input`]: {
textAlign: 'center',
paddingInline: token.paddingXXS
},
// ================= Size =================
[`&${componentCls}-sm ${componentCls}-input`]: {
paddingInline: token.calc(token.paddingXXS).div(2).equal()
},
[`&${componentCls}-lg ${componentCls}-input`]: {
paddingInline: token.paddingXS
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var otp = ((0,genStyleUtils.genStyleHooks)(['Input', 'OTP'], token => {
const inputToken = (0,cssinjs_utils_es.mergeToken)(token, (0,input_style_token.initInputToken)(token));
return [genOTPStyle(inputToken)];
}, input_style_token.initComponentToken));
;// ./components/input/OTP/OTPInput.tsx
var OTPInput_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;
};
const OTPInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
value,
onChange,
onActiveChange,
index,
mask
} = props,
restProps = OTPInput_rest(props, ["value", "onChange", "onActiveChange", "index", "mask"]);
const internalValue = value && typeof mask === 'string' ? mask : value;
const onInternalChange = e => {
onChange(index, e.target.value);
};
// ========================== Ref ===========================
const inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => inputRef.current);
// ========================= Focus ==========================
const syncSelection = () => {
(0,raf["default"])(() => {
var _a;
const inputEle = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input;
if (document.activeElement === inputEle && inputEle) {
inputEle.select();
}
});
};
// ======================== Keyboard ========================
const onInternalKeyDown = event => {
const {
key,
ctrlKey,
metaKey
} = event;
if (key === 'ArrowLeft') {
onActiveChange(index - 1);
} else if (key === 'ArrowRight') {
onActiveChange(index + 1);
} else if (key === 'z' && (ctrlKey || metaKey)) {
event.preventDefault();
}
syncSelection();
};
const onInternalKeyUp = e => {
if (e.key === 'Backspace' && !value) {
onActiveChange(index - 1);
}
syncSelection();
};
// ========================= Render =========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, Object.assign({
type: mask === true ? 'password' : 'text'
}, restProps, {
ref: inputRef,
value: internalValue,
onInput: onInternalChange,
onFocus: syncSelection,
onKeyDown: onInternalKeyDown,
onKeyUp: onInternalKeyUp,
onMouseDown: syncSelection,
onMouseUp: syncSelection
}));
});
/* harmony default export */ var OTP_OTPInput = (OTPInput);
;// ./components/input/OTP/index.tsx
var OTP_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 strToArr(str) {
return (str || '').split('');
}
const Separator = props => {
const {
index,
prefixCls,
separator
} = props;
const separatorNode = typeof separator === 'function' ? separator(index) : separator;
if (!separatorNode) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-separator`
}, separatorNode);
};
const OTP = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
length = 6,
size: customSize,
defaultValue,
value,
onChange,
formatter,
separator,
variant,
disabled,
status: customStatus,
autoFocus,
mask,
type,
onInput,
inputMode
} = props,
restProps = OTP_rest(props, ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "separator", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Input.OTP');
true ? warning(!(typeof mask === 'string' && mask.length > 1), 'usage', '`mask` prop should be a single character.') : 0;
}
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('otp', customizePrefixCls);
const domAttrs = (0,pickAttrs["default"])(restProps, {
aria: true,
data: true,
attr: true
});
// ========================= Root =========================
// Style
const [wrapCSSVar, hashId, cssVarCls] = otp(prefixCls);
// ========================= Size =========================
const mergedSize = (0,useSize["default"])(ctx => customSize !== null && customSize !== void 0 ? customSize : ctx);
// ======================== Status ========================
const formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(formContext.status, customStatus);
const proxyFormContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, formContext), {
status: mergedStatus,
hasFeedback: false,
feedbackIcon: null
}), [formContext, mergedStatus]);
// ========================= Refs =========================
const containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const refs = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
focus: () => {
var _a;
(_a = refs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
},
blur: () => {
var _a;
for (let i = 0; i < length; i += 1) {
(_a = refs.current[i]) === null || _a === void 0 ? void 0 : _a.blur();
}
},
nativeElement: containerRef.current
}));
// ======================= Formatter ======================
const internalFormatter = txt => formatter ? formatter(txt) : txt;
// ======================== Values ========================
const [valueCells, setValueCells] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => strToArr(internalFormatter(defaultValue || '')));
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (value !== undefined) {
setValueCells(strToArr(value));
}
}, [value]);
const triggerValueCellsChange = (0,useEvent["default"])(nextValueCells => {
setValueCells(nextValueCells);
if (onInput) {
onInput(nextValueCells);
}
// Trigger if all cells are filled
if (onChange && nextValueCells.length === length && nextValueCells.every(c => c) && nextValueCells.some((c, index) => valueCells[index] !== c)) {
onChange(nextValueCells.join(''));
}
});
const patchValue = (0,useEvent["default"])((index, txt) => {
let nextCells = (0,toConsumableArray["default"])(valueCells);
// Fill cells till index
for (let i = 0; i < index; i += 1) {
if (!nextCells[i]) {
nextCells[i] = '';
}
}
if (txt.length <= 1) {
nextCells[index] = txt;
} else {
nextCells = nextCells.slice(0, index).concat(strToArr(txt));
}
nextCells = nextCells.slice(0, length);
// Clean the last empty cell
for (let i = nextCells.length - 1; i >= 0; i -= 1) {
if (nextCells[i]) {
break;
}
nextCells.pop();
}
// Format if needed
const formattedValue = internalFormatter(nextCells.map(c => c || ' ').join(''));
nextCells = strToArr(formattedValue).map((c, i) => {
if (c === ' ' && !nextCells[i]) {
return nextCells[i];
}
return c;
});
return nextCells;
});
// ======================== Change ========================
const onInputChange = (index, txt) => {
var _a;
const nextCells = patchValue(index, txt);
const nextIndex = Math.min(index + txt.length, length - 1);
if (nextIndex !== index && nextCells[index] !== undefined) {
(_a = refs.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
}
triggerValueCellsChange(nextCells);
};
const onInputActiveChange = nextIndex => {
var _a;
(_a = refs.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
};
// ======================== Render ========================
const inputSharedProps = {
variant,
disabled,
status: mergedStatus,
mask,
type,
inputMode
};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, domAttrs, {
ref: containerRef,
className: classnames_default()(prefixCls, {
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-rtl`]: direction === 'rtl'
}, cssVarCls, hashId)
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
value: proxyFormContext
}, Array.from({
length
}).map((_, index) => {
const key = `otp-${index}`;
const singleValue = valueCells[index] || '';
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
key: key
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OTP_OTPInput, Object.assign({
ref: inputEle => {
refs.current[index] = inputEle;
},
index: index,
size: mergedSize,
htmlSize: 1,
className: `${prefixCls}-input`,
onChange: onInputChange,
value: singleValue,
onActiveChange: onInputActiveChange,
autoFocus: index === 0 && autoFocus
}, inputSharedProps)), index < length - 1 && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Separator, {
separator: separator,
index: index,
prefixCls: prefixCls
})));
}))));
});
/* harmony default export */ var input_OTP = (OTP);
;// ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
// This icon file is generated automatically.
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
;// ./node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_EyeInvisibleOutlined
}));
};
/** */
var EyeInvisibleOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined);
if (true) {
EyeInvisibleOutlined_RefIcon.displayName = 'EyeInvisibleOutlined';
}
/* harmony default export */ var icons_EyeInvisibleOutlined = (EyeInvisibleOutlined_RefIcon);
;// ./components/input/Password.tsx
var Password_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;
};
const defaultIconRender = visible => visible ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeInvisibleOutlined, null);
const actionMap = {
click: 'onClick',
hover: 'onMouseOver'
};
const Password = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
disabled: customDisabled,
action = 'click',
visibilityToggle = true,
iconRender = defaultIconRender
} = props;
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
const [visible, setVisible] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
const inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (visibilityControlled) {
setVisible(visibilityToggle.visible);
}
}, [visibilityControlled, visibilityToggle]);
// Remove Password value
const removePasswordTimeout = useRemovePasswordTimeout(inputRef);
const onVisibleChange = () => {
var _a;
if (mergedDisabled) {
return;
}
if (visible) {
removePasswordTimeout();
}
const nextVisible = !visible;
setVisible(nextVisible);
if (typeof visibilityToggle === 'object') {
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, nextVisible);
}
};
const getIcon = prefixCls => {
const iconTrigger = actionMap[action] || '';
const icon = iconRender(visible);
const iconProps = {
[iconTrigger]: onVisibleChange,
className: `${prefixCls}-icon`,
key: 'passwordIcon',
onMouseDown: e => {
// Prevent focused state lost
// https://github.com/ant-design/ant-design/issues/15173
e.preventDefault();
},
onMouseUp: e => {
// Prevent caret position change
// https://github.com/ant-design/ant-design/issues/23524
e.preventDefault();
}
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? icon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, icon), iconProps);
};
const {
className,
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
size
} = props,
restProps = Password_rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
const suffixIcon = visibilityToggle && getIcon(prefixCls);
const inputClassName = classnames_default()(prefixCls, className, {
[`${prefixCls}-${size}`]: !!size
});
const omittedProps = Object.assign(Object.assign({}, (0,omit["default"])(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
type: visible ? 'text' : 'password',
className: inputClassName,
prefixCls: inputPrefixCls,
suffix: suffixIcon
});
if (size) {
omittedProps.size = size;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, Object.assign({
ref: (0,es_ref.composeRef)(ref, inputRef)
}, omittedProps));
});
if (true) {
Password.displayName = 'Input.Password';
}
/* harmony default export */ var input_Password = (Password);
;// ./components/input/Search.tsx
var Search_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;
};
const Search = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
className,
size: customizeSize,
suffix,
enterButton = false,
addonAfter,
loading,
disabled,
onSearch: customOnSearch,
onChange: customOnChange,
onCompositionStart,
onCompositionEnd
} = props,
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const composedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
const {
compactSize
} = useCompactItemContext(prefixCls, direction);
const size = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
const inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const onChange = e => {
if ((e === null || e === void 0 ? void 0 : e.target) && e.type === 'click' && customOnSearch) {
customOnSearch(e.target.value, e, {
source: 'clear'
});
}
customOnChange === null || customOnChange === void 0 ? void 0 : customOnChange(e);
};
const onMouseDown = e => {
var _a;
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
e.preventDefault();
}
};
const onSearch = e => {
var _a, _b;
if (customOnSearch) {
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {
source: 'input'
});
}
};
const onPressEnter = e => {
if (composedRef.current || loading) {
return;
}
onSearch(e);
};
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, null) : null;
const btnClassName = `${prefixCls}-button`;
let button;
const enterButtonAsElement = enterButton || {};
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
if (isAntdButton || enterButtonAsElement.type === 'button') {
button = (0,reactNode.cloneElement)(enterButtonAsElement, Object.assign({
onMouseDown,
onClick: e => {
var _a, _b;
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
onSearch(e);
},
key: 'enterButton'
}, isAntdButton ? {
className: btnClassName,
size
} : {}));
} else {
button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
className: btnClassName,
type: enterButton ? 'primary' : undefined,
size: size,
disabled: disabled,
key: "enterButton",
onMouseDown: onMouseDown,
onClick: onSearch,
loading: loading,
icon: searchIcon
}, enterButton);
}
if (addonAfter) {
button = [button, (0,reactNode.cloneElement)(addonAfter, {
key: 'addonAfter'
})];
}
const cls = classnames_default()(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${size}`]: !!size,
[`${prefixCls}-with-button`]: !!enterButton
}, className);
const newProps = Object.assign(Object.assign({}, restProps), {
className: cls,
prefixCls: inputPrefixCls,
type: 'search'
});
const handleOnCompositionStart = e => {
composedRef.current = true;
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
};
const handleOnCompositionEnd = e => {
composedRef.current = false;
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, Object.assign({
ref: (0,es_ref.composeRef)(inputRef, ref),
onPressEnter: onPressEnter
}, newProps, {
size: size,
onCompositionStart: handleOnCompositionStart,
onCompositionEnd: handleOnCompositionEnd,
addonAfter: button,
suffix: suffix,
onChange: onChange,
disabled: disabled
}));
});
if (true) {
Search.displayName = 'Search';
}
/* harmony default export */ var input_Search = (Search);
;// ./node_modules/rc-textarea/es/calculateNodeHeight.js
// Thanks to https://github.com/andreypopp/react-textarea-autosize/
/**
* calculateNodeHeight(uiTextNode, useCache = false)
*/
var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n";
var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', 'word-break', 'white-space'];
var computedStyleCache = {};
var hiddenTextarea;
function calculateNodeStyling(node) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
if (useCache && computedStyleCache[nodeRef]) {
return computedStyleCache[nodeRef];
}
var style = window.getComputedStyle(node);
var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
var sizingStyle = SIZING_STYLE.map(function (name) {
return "".concat(name, ":").concat(style.getPropertyValue(name));
}).join(';');
var nodeInfo = {
sizingStyle: sizingStyle,
paddingSize: paddingSize,
borderSize: borderSize,
boxSizing: boxSizing
};
if (useCache && nodeRef) {
computedStyleCache[nodeRef] = nodeInfo;
}
return nodeInfo;
}
function calculateAutoSizeStyle(uiTextNode) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
if (!hiddenTextarea) {
hiddenTextarea = document.createElement('textarea');
hiddenTextarea.setAttribute('tab-index', '-1');
hiddenTextarea.setAttribute('aria-hidden', 'true');
// fix: A form field element should have an id or name attribute
// A form field element has neither an id nor a name attribute. This might prevent the browser from correctly autofilling the form.
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
hiddenTextarea.setAttribute('name', 'hiddenTextarea');
document.body.appendChild(hiddenTextarea);
}
// Fix wrap="off" issue
// https://github.com/ant-design/ant-design/issues/6577
if (uiTextNode.getAttribute('wrap')) {
hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
} else {
hiddenTextarea.removeAttribute('wrap');
}
// Copy all CSS properties that have an impact on the height of the content in
// the textbox
var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
paddingSize = _calculateNodeStyling.paddingSize,
borderSize = _calculateNodeStyling.borderSize,
boxSizing = _calculateNodeStyling.boxSizing,
sizingStyle = _calculateNodeStyling.sizingStyle;
// Need to have the overflow attribute to hide the scrollbar otherwise
// text-lines will not calculated properly as the shadow will technically be
// narrower for content
hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
var minHeight = undefined;
var maxHeight = undefined;
var overflowY;
var height = hiddenTextarea.scrollHeight;
if (boxSizing === 'border-box') {
// border-box: add border, since height = content + padding + border
height += borderSize;
} else if (boxSizing === 'content-box') {
// remove padding, since height = content
height -= paddingSize;
}
if (minRows !== null || maxRows !== null) {
// measure height of a textarea with a single row
hiddenTextarea.value = ' ';
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
if (minRows !== null) {
minHeight = singleRowHeight * minRows;
if (boxSizing === 'border-box') {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
}
if (maxRows !== null) {
maxHeight = singleRowHeight * maxRows;
if (boxSizing === 'border-box') {
maxHeight = maxHeight + paddingSize + borderSize;
}
overflowY = height > maxHeight ? '' : 'hidden';
height = Math.min(maxHeight, height);
}
}
var style = {
height: height,
overflowY: overflowY,
resize: 'none'
};
if (minHeight) {
style.minHeight = minHeight;
}
if (maxHeight) {
style.maxHeight = maxHeight;
}
return style;
}
;// ./node_modules/rc-textarea/es/ResizableTextArea.js
var ResizableTextArea_excluded = ["prefixCls", "defaultValue", "value", "autoSize", "onResize", "className", "style", "disabled", "onChange", "onInternalAutoSize"];
var RESIZE_START = 0;
var RESIZE_MEASURING = 1;
var RESIZE_STABLE = 2;
var ResizableTextArea = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _ref = props,
prefixCls = _ref.prefixCls,
defaultValue = _ref.defaultValue,
value = _ref.value,
autoSize = _ref.autoSize,
onResize = _ref.onResize,
className = _ref.className,
style = _ref.style,
disabled = _ref.disabled,
onChange = _ref.onChange,
onInternalAutoSize = _ref.onInternalAutoSize,
restProps = (0,objectWithoutProperties["default"])(_ref, ResizableTextArea_excluded);
// =============================== Value ================================
var _useMergedState = (0,useMergedState["default"])(defaultValue, {
value: value,
postState: function postState(val) {
return val !== null && val !== void 0 ? val : '';
}
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedValue = _useMergedState2[0],
setMergedValue = _useMergedState2[1];
var onInternalChange = function onInternalChange(event) {
setMergedValue(event.target.value);
onChange === null || onChange === void 0 || onChange(event);
};
// ================================ Ref =================================
var textareaRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
textArea: textareaRef.current
};
});
// ============================== AutoSize ==============================
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (autoSize && (0,esm_typeof["default"])(autoSize) === 'object') {
return [autoSize.minRows, autoSize.maxRows];
}
return [];
}, [autoSize]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
minRows = _React$useMemo2[0],
maxRows = _React$useMemo2[1];
var needAutoSize = !!autoSize;
// =============================== Scroll ===============================
// https://github.com/ant-design/ant-design/issues/21870
var fixFirefoxAutoScroll = function fixFirefoxAutoScroll() {
try {
// FF has bug with jump of scroll to top. We force back here.
if (document.activeElement === textareaRef.current) {
var _textareaRef$current = textareaRef.current,
selectionStart = _textareaRef$current.selectionStart,
selectionEnd = _textareaRef$current.selectionEnd,
scrollTop = _textareaRef$current.scrollTop;
// Fix Safari bug which not rollback when break line
// This makes Chinese IME can't input. Do not fix this
// const { value: tmpValue } = textareaRef.current;
// textareaRef.current.value = '';
// textareaRef.current.value = tmpValue;
textareaRef.current.setSelectionRange(selectionStart, selectionEnd);
textareaRef.current.scrollTop = scrollTop;
}
} catch (e) {
// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
};
// =============================== Resize ===============================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(RESIZE_STABLE),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
resizeState = _React$useState2[0],
setResizeState = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
autoSizeStyle = _React$useState4[0],
setAutoSizeStyle = _React$useState4[1];
var startResize = function startResize() {
setResizeState(RESIZE_START);
if (false) {}
};
// Change to trigger resize measure
(0,useLayoutEffect["default"])(function () {
if (needAutoSize) {
startResize();
}
}, [value, minRows, maxRows, needAutoSize]);
(0,useLayoutEffect["default"])(function () {
if (resizeState === RESIZE_START) {
setResizeState(RESIZE_MEASURING);
} else if (resizeState === RESIZE_MEASURING) {
var textareaStyles = calculateAutoSizeStyle(textareaRef.current, false, minRows, maxRows);
// Safari has bug that text will keep break line on text cut when it's prev is break line.
// ZombieJ: This not often happen. So we just skip it.
// const { selectionStart, selectionEnd, scrollTop } = textareaRef.current;
// const { value: tmpValue } = textareaRef.current;
// textareaRef.current.value = '';
// textareaRef.current.value = tmpValue;
// if (document.activeElement === textareaRef.current) {
// textareaRef.current.scrollTop = scrollTop;
// textareaRef.current.setSelectionRange(selectionStart, selectionEnd);
// }
setResizeState(RESIZE_STABLE);
setAutoSizeStyle(textareaStyles);
} else {
fixFirefoxAutoScroll();
}
}, [resizeState]);
// We lock resize trigger by raf to avoid Safari warning
var resizeRafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var cleanRaf = function cleanRaf() {
raf["default"].cancel(resizeRafRef.current);
};
var onInternalResize = function onInternalResize(size) {
if (resizeState === RESIZE_STABLE) {
onResize === null || onResize === void 0 || onResize(size);
if (autoSize) {
cleanRaf();
resizeRafRef.current = (0,raf["default"])(function () {
startResize();
});
}
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return cleanRaf;
}, []);
// =============================== Render ===============================
var mergedAutoSizeStyle = needAutoSize ? autoSizeStyle : null;
var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), mergedAutoSizeStyle);
if (resizeState === RESIZE_START || resizeState === RESIZE_MEASURING) {
mergedStyle.overflowY = 'hidden';
mergedStyle.overflowX = 'hidden';
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onInternalResize,
disabled: !(autoSize || onResize)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("textarea", (0,esm_extends["default"])({}, restProps, {
ref: textareaRef,
style: mergedStyle,
className: classnames_default()(prefixCls, className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled)),
disabled: disabled,
value: mergedValue,
onChange: onInternalChange
})));
});
/* harmony default export */ var es_ResizableTextArea = (ResizableTextArea);
;// ./node_modules/rc-textarea/es/TextArea.js
var TextArea_excluded = ["defaultValue", "value", "onFocus", "onBlur", "onChange", "allowClear", "maxLength", "onCompositionStart", "onCompositionEnd", "suffix", "prefixCls", "showCount", "count", "className", "style", "disabled", "hidden", "classNames", "styles", "onResize", "onClear", "onPressEnter", "readOnly", "autoSize", "onKeyDown"];
var TextArea = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
var _countConfig$max;
var defaultValue = _ref.defaultValue,
customValue = _ref.value,
onFocus = _ref.onFocus,
onBlur = _ref.onBlur,
onChange = _ref.onChange,
allowClear = _ref.allowClear,
maxLength = _ref.maxLength,
onCompositionStart = _ref.onCompositionStart,
onCompositionEnd = _ref.onCompositionEnd,
suffix = _ref.suffix,
_ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-textarea' : _ref$prefixCls,
showCount = _ref.showCount,
count = _ref.count,
className = _ref.className,
style = _ref.style,
disabled = _ref.disabled,
hidden = _ref.hidden,
classNames = _ref.classNames,
styles = _ref.styles,
onResize = _ref.onResize,
onClear = _ref.onClear,
onPressEnter = _ref.onPressEnter,
readOnly = _ref.readOnly,
autoSize = _ref.autoSize,
onKeyDown = _ref.onKeyDown,
rest = (0,objectWithoutProperties["default"])(_ref, TextArea_excluded);
var _useMergedState = (0,useMergedState["default"])(defaultValue, {
value: customValue,
defaultValue: defaultValue
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
value = _useMergedState2[0],
setValue = _useMergedState2[1];
var formatValue = value === undefined || value === null ? '' : String(value);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
focused = _React$useState2[0],
setFocused = _React$useState2[1];
var compositionRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(false);
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
textareaResized = _React$useState4[0],
setTextareaResized = _React$useState4[1];
// =============================== Ref ================================
var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var resizableTextAreaRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var getTextArea = function getTextArea() {
var _resizableTextAreaRef;
return (_resizableTextAreaRef = resizableTextAreaRef.current) === null || _resizableTextAreaRef === void 0 ? void 0 : _resizableTextAreaRef.textArea;
};
var focus = function focus() {
getTextArea().focus();
};
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
var _holderRef$current;
return {
resizableTextArea: resizableTextAreaRef.current,
focus: focus,
blur: function blur() {
getTextArea().blur();
},
nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || getTextArea()
};
});
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
setFocused(function (prev) {
return !disabled && prev;
});
}, [disabled]);
// =========================== Select Range ===========================
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
selection = _React$useState6[0],
setSelection = _React$useState6[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
if (selection) {
var _getTextArea;
(_getTextArea = getTextArea()).setSelectionRange.apply(_getTextArea, (0,toConsumableArray["default"])(selection));
}
}, [selection]);
// ============================== Count ===============================
var countConfig = useCount(count, showCount);
var mergedMax = (_countConfig$max = countConfig.max) !== null && _countConfig$max !== void 0 ? _countConfig$max : maxLength;
// Max length value
var hasMaxLength = Number(mergedMax) > 0;
var valueLength = countConfig.strategy(formatValue);
var isOutOfRange = !!mergedMax && valueLength > mergedMax;
// ============================== Change ==============================
var triggerChange = function triggerChange(e, currentValue) {
var cutValue = currentValue;
if (!compositionRef.current && countConfig.exceedFormatter && countConfig.max && countConfig.strategy(currentValue) > countConfig.max) {
cutValue = countConfig.exceedFormatter(currentValue, {
max: countConfig.max
});
if (currentValue !== cutValue) {
setSelection([getTextArea().selectionStart || 0, getTextArea().selectionEnd || 0]);
}
}
setValue(cutValue);
resolveOnChange(e.currentTarget, e, onChange, cutValue);
};
// =========================== Value Update ===========================
var onInternalCompositionStart = function onInternalCompositionStart(e) {
compositionRef.current = true;
onCompositionStart === null || onCompositionStart === void 0 || onCompositionStart(e);
};
var onInternalCompositionEnd = function onInternalCompositionEnd(e) {
compositionRef.current = false;
triggerChange(e, e.currentTarget.value);
onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
};
var onInternalChange = function onInternalChange(e) {
triggerChange(e, e.target.value);
};
var handleKeyDown = function handleKeyDown(e) {
if (e.key === 'Enter' && onPressEnter) {
onPressEnter(e);
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
};
var handleFocus = function handleFocus(e) {
setFocused(true);
onFocus === null || onFocus === void 0 || onFocus(e);
};
var handleBlur = function handleBlur(e) {
setFocused(false);
onBlur === null || onBlur === void 0 || onBlur(e);
};
// ============================== Reset ===============================
var handleReset = function handleReset(e) {
setValue('');
focus();
resolveOnChange(getTextArea(), e, onChange);
};
var suffixNode = suffix;
var dataCount;
if (countConfig.show) {
if (countConfig.showFormatter) {
dataCount = countConfig.showFormatter({
value: formatValue,
count: valueLength,
maxLength: mergedMax
});
} else {
dataCount = "".concat(valueLength).concat(hasMaxLength ? " / ".concat(mergedMax) : '');
}
suffixNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, suffixNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(prefixCls, "-data-count"), classNames === null || classNames === void 0 ? void 0 : classNames.count),
style: styles === null || styles === void 0 ? void 0 : styles.count
}, dataCount));
}
var handleResize = function handleResize(size) {
var _getTextArea2;
onResize === null || onResize === void 0 || onResize(size);
if ((_getTextArea2 = getTextArea()) !== null && _getTextArea2 !== void 0 && _getTextArea2.style.height) {
setTextareaResized(true);
}
};
var isPureTextArea = !autoSize && !showCount && !allowClear;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_BaseInput, {
ref: holderRef,
value: formatValue,
allowClear: allowClear,
handleReset: handleReset,
suffix: suffixNode,
prefixCls: prefixCls,
classNames: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, classNames), {}, {
affixWrapper: classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-show-count"), showCount), "".concat(prefixCls, "-textarea-allow-clear"), allowClear))
}),
disabled: disabled,
focused: focused,
className: classnames_default()(className, isOutOfRange && "".concat(prefixCls, "-out-of-range")),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), textareaResized && !isPureTextArea ? {
height: 'auto'
} : {}),
dataAttrs: {
affixWrapper: {
'data-count': typeof dataCount === 'string' ? dataCount : undefined
}
},
hidden: hidden,
readOnly: readOnly,
onClear: onClear
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_ResizableTextArea, (0,esm_extends["default"])({}, rest, {
autoSize: autoSize,
maxLength: maxLength,
onKeyDown: handleKeyDown,
onChange: onInternalChange,
onFocus: handleFocus,
onBlur: handleBlur,
onCompositionStart: onInternalCompositionStart,
onCompositionEnd: onInternalCompositionEnd,
className: classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.textarea),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, styles === null || styles === void 0 ? void 0 : styles.textarea), {}, {
resize: style === null || style === void 0 ? void 0 : style.resize
}),
disabled: disabled,
prefixCls: prefixCls,
onResize: handleResize,
ref: resizableTextAreaRef,
readOnly: readOnly
})));
});
/* harmony default export */ var es_TextArea = (TextArea);
;// ./node_modules/rc-textarea/es/index.js
/* harmony default export */ var rc_textarea_es = (es_TextArea);
;// ./components/input/hooks/useHandleResizeWrapper.ts
const ELEMENT_GAP = 2;
const adjustElementWidth = (width, wrapper) => {
if (wrapper.offsetWidth - width < ELEMENT_GAP) {
// The textarea's width is increased
wrapper.style.width = `${width + ELEMENT_GAP}px`;
} else if (wrapper.offsetWidth - width > ELEMENT_GAP) {
// The textarea's width is decreased
wrapper.style.width = `${width + ELEMENT_GAP}px`;
}
};
const useHandleResizeWrapper = () => {
const handleResizeWrapper = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(rcTextArea => {
if (!rcTextArea) {
return;
}
if (rcTextArea.resizableTextArea.textArea.style.width.includes('px')) {
const width = Number.parseInt(rcTextArea.resizableTextArea.textArea.style.width.replace(/px/, ''));
(0,raf["default"])(() => adjustElementWidth(width, rcTextArea.nativeElement));
}
}, []);
return handleResizeWrapper;
};
/* harmony default export */ var hooks_useHandleResizeWrapper = (useHandleResizeWrapper);
;// ./components/input/style/textarea.ts
const genTextAreaStyle = token => {
const {
componentCls,
paddingLG
} = token;
const textareaPrefixCls = `${componentCls}-textarea`;
return {
[textareaPrefixCls]: {
position: 'relative',
'&-show-count': {
// https://github.com/ant-design/ant-design/issues/33049
[`> ${componentCls}`]: {
height: '100%'
},
[`${componentCls}-data-count`]: {
position: 'absolute',
bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),
insetInlineEnd: 0,
color: token.colorTextDescription,
whiteSpace: 'nowrap',
pointerEvents: 'none'
}
},
[`
&-allow-clear > ${componentCls},
&-affix-wrapper${textareaPrefixCls}-has-feedback ${componentCls}
`]: {
paddingInlineEnd: paddingLG
},
[`&-affix-wrapper${componentCls}-affix-wrapper`]: {
padding: 0,
[`> textarea${componentCls}`]: {
fontSize: 'inherit',
border: 'none',
outline: 'none',
background: 'transparent',
minHeight: token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal(),
'&:focus': {
boxShadow: 'none !important'
}
},
[`${componentCls}-suffix`]: {
margin: 0,
'> *:not(:last-child)': {
marginInline: 0
},
// Clear Icon
[`${componentCls}-clear-icon`]: {
position: 'absolute',
insetInlineEnd: token.paddingInline,
insetBlockStart: token.paddingXS
},
// Feedback Icon
[`${textareaPrefixCls}-suffix`]: {
position: 'absolute',
top: 0,
insetInlineEnd: token.paddingInline,
bottom: 0,
zIndex: 1,
display: 'inline-flex',
alignItems: 'center',
margin: 'auto',
pointerEvents: 'none'
}
}
},
[`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {
[`${componentCls}-suffix`]: {
[`${componentCls}-clear-icon`]: {
insetInlineEnd: token.paddingInlineSM
}
}
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var style_textarea = ((0,genStyleUtils.genStyleHooks)(['Input', 'TextArea'], token => {
const inputToken = (0,cssinjs_utils_es.mergeToken)(token, (0,input_style_token.initInputToken)(token));
return [genTextAreaStyle(inputToken)];
}, input_style_token.initComponentToken, {
resetFont: false
}));
;// ./components/input/TextArea.tsx
var TextArea_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;
};
const TextArea_TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
bordered = true,
size: customizeSize,
disabled: customDisabled,
status: customStatus,
allowClear,
classNames: classes,
rootClassName,
className,
style,
styles,
variant: customVariant,
showCount
} = props,
rest = TextArea_rest(props, ["prefixCls", "bordered", "size", "disabled", "status", "allowClear", "classNames", "rootClassName", "className", "style", "styles", "variant", "showCount"]);
if (true) {
const {
deprecated
} = (0,_util_warning.devUseWarning)('TextArea');
deprecated(!('bordered' in props), 'bordered', 'variant');
}
const {
getPrefixCls,
direction,
allowClear: contextAllowClear,
autoComplete: contextAutoComplete,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('textArea');
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
// ===================== Status =====================
const {
status: contextStatus,
hasFeedback,
feedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
// ===================== Ref =====================
const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => {
var _a;
return {
resizableTextArea: (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea,
focus: option => {
var _a, _b;
triggerFocus((_b = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) === null || _b === void 0 ? void 0 : _b.textArea, option);
},
blur: () => {
var _a;
return (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.blur();
}
};
});
const prefixCls = getPrefixCls('input', customizePrefixCls);
// ===================== Style =====================
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapSharedCSSVar, hashId, cssVarCls] = (0,input_style.useSharedStyle)(prefixCls, rootClassName);
const [wrapCSSVar] = style_textarea(prefixCls, rootCls);
// ===================== Compact Item =====================
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
// ===================== Size =====================
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
const [variant, enableVariantCls] = useVariants('textArea', customVariant, bordered);
const mergedAllowClear = _util_getAllowClear(allowClear !== null && allowClear !== void 0 ? allowClear : contextAllowClear);
const handleResizeWrapper = hooks_useHandleResizeWrapper();
return wrapSharedCSSVar(wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_textarea_es, Object.assign({
autoComplete: contextAutoComplete
}, rest, {
style: Object.assign(Object.assign({}, contextStyle), style),
styles: Object.assign(Object.assign({}, contextStyles), styles),
disabled: mergedDisabled,
allowClear: mergedAllowClear,
className: classnames_default()(cssVarCls, rootCls, className, rootClassName, compactItemClassnames, contextClassName),
classNames: Object.assign(Object.assign(Object.assign({}, classes), contextClassNames), {
textarea: classnames_default()({
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-lg`]: mergedSize === 'large'
}, hashId, classes === null || classes === void 0 ? void 0 : classes.textarea, contextClassNames.textarea),
variant: classnames_default()({
[`${prefixCls}-${variant}`]: enableVariantCls
}, getStatusClassNames(prefixCls, mergedStatus)),
affixWrapper: classnames_default()(`${prefixCls}-textarea-affix-wrapper`, {
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-textarea-show-count`]: props.showCount || ((_a = props.count) === null || _a === void 0 ? void 0 : _a.show)
}, hashId)
}),
prefixCls: prefixCls,
suffix: hasFeedback && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-textarea-suffix`
}, feedbackIcon),
showCount: showCount,
ref: innerRef,
onResize: size => {
var _a;
(_a = rest.onResize) === null || _a === void 0 ? void 0 : _a.call(rest, size);
showCount && handleResizeWrapper(innerRef.current);
}
}))));
});
/* harmony default export */ var input_TextArea = (TextArea_TextArea);
;// ./components/input/index.tsx
const components_input_Input = input_Input;
components_input_Input.Group = input_Group;
components_input_Input.Search = input_Search;
components_input_Input.TextArea = input_TextArea;
components_input_Input.Password = input_Password;
components_input_Input.OTP = input_OTP;
/* harmony default export */ var input = (components_input_Input);
;// ./components/layout/hooks/useHasSider.ts
function useHasSider(siders, children, hasSider) {
if (typeof hasSider === 'boolean') {
return hasSider;
}
if (siders.length) {
return true;
}
const childNodes = (0,toArray["default"])(children);
return childNodes.some(node => node.type === layout_Sider);
}
;// ./components/layout/layout.tsx
var layout_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 generator(_ref) {
let {
suffixCls,
tagName,
displayName
} = _ref;
return BasicComponent => {
const Adapter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(BasicComponent, Object.assign({
ref: ref,
suffixCls: suffixCls,
tagName: tagName
}, props))));
if (true) {
Adapter.displayName = displayName;
}
return Adapter;
};
}
const Basic = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
suffixCls,
className,
tagName: TagName
} = props,
others = layout_rest(props, ["prefixCls", "suffixCls", "className", "tagName"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('layout', customizePrefixCls);
const [wrapSSR, hashId, cssVarCls] = (0,layout_style["default"])(prefixCls);
const prefixWithSuffixCls = suffixCls ? `${prefixCls}-${suffixCls}` : prefixCls;
return wrapSSR(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TagName, Object.assign({
className: classnames_default()(customizePrefixCls || prefixWithSuffixCls, className, hashId, cssVarCls),
ref: ref
}, others)));
});
const BasicLayout = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [siders, setSiders] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
children,
hasSider,
tagName: Tag,
style
} = props,
others = layout_rest(props, ["prefixCls", "className", "rootClassName", "children", "hasSider", "tagName", "style"]);
const passedProps = (0,omit["default"])(others, ['suffixCls']);
const {
getPrefixCls,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('layout');
const prefixCls = getPrefixCls('layout', customizePrefixCls);
const mergedHasSider = useHasSider(siders, children, hasSider);
const [wrapCSSVar, hashId, cssVarCls] = (0,layout_style["default"])(prefixCls);
const classString = classnames_default()(prefixCls, {
[`${prefixCls}-has-sider`]: mergedHasSider,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, hashId, cssVarCls);
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
siderHook: {
addSider: id => {
setSiders(prev => [].concat((0,toConsumableArray["default"])(prev), [id]));
},
removeSider: id => {
setSiders(prev => prev.filter(currentId => currentId !== id));
}
}
}), []);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(LayoutContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Tag, Object.assign({
ref: ref,
className: classString,
style: Object.assign(Object.assign({}, contextStyle), style)
}, passedProps), children)));
});
const Layout = generator({
tagName: 'div',
displayName: 'Layout'
})(BasicLayout);
const layout_Header = generator({
suffixCls: 'header',
tagName: 'header',
displayName: 'Header'
})(Basic);
const layout_Footer = generator({
suffixCls: 'footer',
tagName: 'footer',
displayName: 'Footer'
})(Basic);
const layout_Content = generator({
suffixCls: 'content',
tagName: 'main',
displayName: 'Content'
})(Basic);
/* harmony default export */ var layout = (Layout);
;// ./components/layout/index.tsx
const layout_Layout = layout;
layout_Layout.Header = layout_Header;
layout_Layout.Footer = layout_Footer;
layout_Layout.Content = layout_Content;
layout_Layout.Sider = layout_Sider;
layout_Layout._InternalSiderContext = SiderContext;
/* harmony default export */ var components_layout = (layout_Layout);
;// ./components/_util/extendsObject.ts
const extendsObject = function () {
const result = Object.assign({}, arguments.length <= 0 ? undefined : arguments[0]);
for (let i = 1; i < arguments.length; i++) {
const obj = i < 0 || arguments.length <= i ? undefined : arguments[i];
if (obj) {
Object.keys(obj).forEach(key => {
const val = obj[key];
if (val !== undefined) {
result[key] = val;
}
});
}
}
return result;
};
/* harmony default export */ var _util_extendsObject = (extendsObject);
;// ./node_modules/@ant-design/icons-svg/es/asn/DoubleLeftOutlined.js
// This icon file is generated automatically.
var DoubleLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, "name": "double-left", "theme": "outlined" };
/* harmony default export */ var asn_DoubleLeftOutlined = (DoubleLeftOutlined);
;// ./node_modules/@ant-design/icons/es/icons/DoubleLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DoubleLeftOutlined_DoubleLeftOutlined = function DoubleLeftOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_DoubleLeftOutlined
}));
};
/** */
var DoubleLeftOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DoubleLeftOutlined_DoubleLeftOutlined);
if (true) {
DoubleLeftOutlined_RefIcon.displayName = 'DoubleLeftOutlined';
}
/* harmony default export */ var icons_DoubleLeftOutlined = (DoubleLeftOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js
// This icon file is generated automatically.
var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" };
/* harmony default export */ var asn_DoubleRightOutlined = (DoubleRightOutlined);
;// ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DoubleRightOutlined_DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_DoubleRightOutlined
}));
};
/** */
var DoubleRightOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DoubleRightOutlined_DoubleRightOutlined);
if (true) {
DoubleRightOutlined_RefIcon.displayName = 'DoubleRightOutlined';
}
/* harmony default export */ var icons_DoubleRightOutlined = (DoubleRightOutlined_RefIcon);
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
var zh_CN = __webpack_require__("./node_modules/rc-pagination/es/locale/zh_CN.js");
;// ./node_modules/rc-pagination/es/Options.js
var defaultPageSizeOptions = [10, 20, 50, 100];
var Options = function Options(props) {
var _props$pageSizeOption = props.pageSizeOptions,
pageSizeOptions = _props$pageSizeOption === void 0 ? defaultPageSizeOptions : _props$pageSizeOption,
locale = props.locale,
changeSize = props.changeSize,
pageSize = props.pageSize,
goButton = props.goButton,
quickGo = props.quickGo,
rootPrefixCls = props.rootPrefixCls,
disabled = props.disabled,
buildOptionText = props.buildOptionText,
showSizeChanger = props.showSizeChanger,
sizeChangerRender = props.sizeChangerRender;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(''),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
goInputText = _React$useState2[0],
setGoInputText = _React$useState2[1];
var getValidValue = function getValidValue() {
return !goInputText || Number.isNaN(goInputText) ? undefined : Number(goInputText);
};
var mergeBuildOptionText = typeof buildOptionText === 'function' ? buildOptionText : function (value) {
return "".concat(value, " ").concat(locale.items_per_page);
};
var handleChange = function handleChange(e) {
setGoInputText(e.target.value);
};
var handleBlur = function handleBlur(e) {
if (goButton || goInputText === '') {
return;
}
setGoInputText('');
if (e.relatedTarget && (e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-item-link")) >= 0 || e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-item")) >= 0)) {
return;
}
quickGo === null || quickGo === void 0 || quickGo(getValidValue());
};
var go = function go(e) {
if (goInputText === '') {
return;
}
if (e.keyCode === KeyCode["default"].ENTER || e.type === 'click') {
setGoInputText('');
quickGo === null || quickGo === void 0 || quickGo(getValidValue());
}
};
var getPageSizeOptions = function getPageSizeOptions() {
if (pageSizeOptions.some(function (option) {
return option.toString() === pageSize.toString();
})) {
return pageSizeOptions;
}
return pageSizeOptions.concat([pageSize]).sort(function (a, b) {
var numberA = Number.isNaN(Number(a)) ? 0 : Number(a);
var numberB = Number.isNaN(Number(b)) ? 0 : Number(b);
return numberA - numberB;
});
};
// ============== cls ==============
var prefixCls = "".concat(rootPrefixCls, "-options");
// ============== render ==============
if (!showSizeChanger && !quickGo) {
return null;
}
var changeSelect = null;
var goInput = null;
var gotoButton = null;
// >>>>> Size Changer
if (showSizeChanger && sizeChangerRender) {
changeSelect = sizeChangerRender({
disabled: disabled,
size: pageSize,
onSizeChange: function onSizeChange(nextValue) {
changeSize === null || changeSize === void 0 || changeSize(Number(nextValue));
},
'aria-label': locale.page_size,
className: "".concat(prefixCls, "-size-changer"),
options: getPageSizeOptions().map(function (opt) {
return {
label: mergeBuildOptionText(opt),
value: opt
};
})
});
}
// >>>>> Quick Go
if (quickGo) {
if (goButton) {
gotoButton = typeof goButton === 'boolean' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
type: "button",
onClick: go,
onKeyUp: go,
disabled: disabled,
className: "".concat(prefixCls, "-quick-jumper-button")
}, locale.jump_to_confirm) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
onClick: go,
onKeyUp: go
}, goButton);
}
goInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-quick-jumper")
}, locale.jump_to, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
disabled: disabled,
type: "text",
value: goInputText,
onChange: handleChange,
onKeyUp: go,
onBlur: handleBlur,
"aria-label": locale.page
}), locale.page, gotoButton);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
className: prefixCls
}, changeSelect, goInput);
};
if (true) {
Options.displayName = 'Options';
}
/* harmony default export */ var es_Options = (Options);
;// ./node_modules/rc-pagination/es/Pager.js
/* eslint react/prop-types: 0 */
var Pager = function Pager(props) {
var rootPrefixCls = props.rootPrefixCls,
page = props.page,
active = props.active,
className = props.className,
showTitle = props.showTitle,
onClick = props.onClick,
onKeyPress = props.onKeyPress,
itemRender = props.itemRender;
var prefixCls = "".concat(rootPrefixCls, "-item");
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(page), (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-active"), active), "".concat(prefixCls, "-disabled"), !page), className);
var handleClick = function handleClick() {
onClick(page);
};
var handleKeyPress = function handleKeyPress(e) {
onKeyPress(e, onClick, page);
};
var pager = itemRender(page, 'page', /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
rel: "nofollow"
}, page));
return pager ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? String(page) : null,
className: cls,
onClick: handleClick,
onKeyDown: handleKeyPress,
tabIndex: 0
}, pager) : null;
};
if (true) {
Pager.displayName = 'Pager';
}
/* harmony default export */ var es_Pager = (Pager);
;// ./node_modules/rc-pagination/es/Pagination.js
var defaultItemRender = function defaultItemRender(page, type, element) {
return element;
};
function Pagination_noop() {}
function isInteger(v) {
var value = Number(v);
return typeof value === 'number' && !Number.isNaN(value) && isFinite(value) && Math.floor(value) === value;
}
function calculatePage(p, pageSize, total) {
var _pageSize = typeof p === 'undefined' ? pageSize : p;
return Math.floor((total - 1) / _pageSize) + 1;
}
var Pagination = function Pagination(props) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-pagination' : _props$prefixCls,
_props$selectPrefixCl = props.selectPrefixCls,
selectPrefixCls = _props$selectPrefixCl === void 0 ? 'rc-select' : _props$selectPrefixCl,
className = props.className,
currentProp = props.current,
_props$defaultCurrent = props.defaultCurrent,
defaultCurrent = _props$defaultCurrent === void 0 ? 1 : _props$defaultCurrent,
_props$total = props.total,
total = _props$total === void 0 ? 0 : _props$total,
pageSizeProp = props.pageSize,
_props$defaultPageSiz = props.defaultPageSize,
defaultPageSize = _props$defaultPageSiz === void 0 ? 10 : _props$defaultPageSiz,
_props$onChange = props.onChange,
onChange = _props$onChange === void 0 ? Pagination_noop : _props$onChange,
hideOnSinglePage = props.hideOnSinglePage,
align = props.align,
_props$showPrevNextJu = props.showPrevNextJumpers,
showPrevNextJumpers = _props$showPrevNextJu === void 0 ? true : _props$showPrevNextJu,
showQuickJumper = props.showQuickJumper,
showLessItems = props.showLessItems,
_props$showTitle = props.showTitle,
showTitle = _props$showTitle === void 0 ? true : _props$showTitle,
_props$onShowSizeChan = props.onShowSizeChange,
onShowSizeChange = _props$onShowSizeChan === void 0 ? Pagination_noop : _props$onShowSizeChan,
_props$locale = props.locale,
locale = _props$locale === void 0 ? zh_CN["default"] : _props$locale,
style = props.style,
_props$totalBoundaryS = props.totalBoundaryShowSizeChanger,
totalBoundaryShowSizeChanger = _props$totalBoundaryS === void 0 ? 50 : _props$totalBoundaryS,
disabled = props.disabled,
simple = props.simple,
showTotal = props.showTotal,
_props$showSizeChange = props.showSizeChanger,
showSizeChanger = _props$showSizeChange === void 0 ? total > totalBoundaryShowSizeChanger : _props$showSizeChange,
sizeChangerRender = props.sizeChangerRender,
pageSizeOptions = props.pageSizeOptions,
_props$itemRender = props.itemRender,
itemRender = _props$itemRender === void 0 ? defaultItemRender : _props$itemRender,
jumpPrevIcon = props.jumpPrevIcon,
jumpNextIcon = props.jumpNextIcon,
prevIcon = props.prevIcon,
nextIcon = props.nextIcon;
var paginationRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
var _useMergedState = (0,useMergedState["default"])(10, {
value: pageSizeProp,
defaultValue: defaultPageSize
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
pageSize = _useMergedState2[0],
setPageSize = _useMergedState2[1];
var _useMergedState3 = (0,useMergedState["default"])(1, {
value: currentProp,
defaultValue: defaultCurrent,
postState: function postState(c) {
return Math.max(1, Math.min(c, calculatePage(undefined, pageSize, total)));
}
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
current = _useMergedState4[0],
setCurrent = _useMergedState4[1];
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(current),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
internalInputVal = _React$useState2[0],
setInternalInputVal = _React$useState2[1];
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
setInternalInputVal(current);
}, [current]);
var hasOnChange = onChange !== Pagination_noop;
var hasCurrent = ('current' in props);
if (true) {
(0,warning["default"])(hasCurrent ? hasOnChange : true, 'You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.');
}
var jumpPrevPage = Math.max(1, current - (showLessItems ? 3 : 5));
var jumpNextPage = Math.min(calculatePage(undefined, pageSize, total), current + (showLessItems ? 3 : 5));
function getItemIcon(icon, label) {
var iconNode = icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
type: "button",
"aria-label": label,
className: "".concat(prefixCls, "-item-link")
});
if (typeof icon === 'function') {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icon, (0,objectSpread2["default"])({}, props));
}
return iconNode;
}
function getValidValue(e) {
var inputValue = e.target.value;
var allPages = calculatePage(undefined, pageSize, total);
var value;
if (inputValue === '') {
value = inputValue;
} else if (Number.isNaN(Number(inputValue))) {
value = internalInputVal;
} else if (inputValue >= allPages) {
value = allPages;
} else {
value = Number(inputValue);
}
return value;
}
function isValid(page) {
return isInteger(page) && page !== current && isInteger(total) && total > 0;
}
var shouldDisplayQuickJumper = total > pageSize ? showQuickJumper : false;
/**
* prevent "up arrow" key reseting cursor position within textbox
* @see https://stackoverflow.com/a/1081114
*/
function handleKeyDown(event) {
if (event.keyCode === KeyCode["default"].UP || event.keyCode === KeyCode["default"].DOWN) {
event.preventDefault();
}
}
function handleKeyUp(event) {
var value = getValidValue(event);
if (value !== internalInputVal) {
setInternalInputVal(value);
}
switch (event.keyCode) {
case KeyCode["default"].ENTER:
handleChange(value);
break;
case KeyCode["default"].UP:
handleChange(value - 1);
break;
case KeyCode["default"].DOWN:
handleChange(value + 1);
break;
default:
break;
}
}
function handleBlur(event) {
handleChange(getValidValue(event));
}
function changePageSize(size) {
var newCurrent = calculatePage(size, pageSize, total);
var nextCurrent = current > newCurrent && newCurrent !== 0 ? newCurrent : current;
setPageSize(size);
setInternalInputVal(nextCurrent);
onShowSizeChange === null || onShowSizeChange === void 0 || onShowSizeChange(current, size);
setCurrent(nextCurrent);
onChange === null || onChange === void 0 || onChange(nextCurrent, size);
}
function handleChange(page) {
if (isValid(page) && !disabled) {
var currentPage = calculatePage(undefined, pageSize, total);
var newPage = page;
if (page > currentPage) {
newPage = currentPage;
} else if (page < 1) {
newPage = 1;
}
if (newPage !== internalInputVal) {
setInternalInputVal(newPage);
}
setCurrent(newPage);
onChange === null || onChange === void 0 || onChange(newPage, pageSize);
return newPage;
}
return current;
}
var hasPrev = current > 1;
var hasNext = current < calculatePage(undefined, pageSize, total);
function prevHandle() {
if (hasPrev) handleChange(current - 1);
}
function nextHandle() {
if (hasNext) handleChange(current + 1);
}
function jumpPrevHandle() {
handleChange(jumpPrevPage);
}
function jumpNextHandle() {
handleChange(jumpNextPage);
}
function runIfEnter(event, callback) {
if (event.key === 'Enter' || event.charCode === KeyCode["default"].ENTER || event.keyCode === KeyCode["default"].ENTER) {
for (var _len = arguments.length, restParams = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
restParams[_key - 2] = arguments[_key];
}
callback.apply(void 0, restParams);
}
}
function runIfEnterPrev(event) {
runIfEnter(event, prevHandle);
}
function runIfEnterNext(event) {
runIfEnter(event, nextHandle);
}
function runIfEnterJumpPrev(event) {
runIfEnter(event, jumpPrevHandle);
}
function runIfEnterJumpNext(event) {
runIfEnter(event, jumpNextHandle);
}
function renderPrev(prevPage) {
var prevButton = itemRender(prevPage, 'prev', getItemIcon(prevIcon, 'prev page'));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(prevButton) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(prevButton, {
disabled: !hasPrev
}) : prevButton;
}
function renderNext(nextPage) {
var nextButton = itemRender(nextPage, 'next', getItemIcon(nextIcon, 'next page'));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(nextButton) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(nextButton, {
disabled: !hasNext
}) : nextButton;
}
function handleGoTO(event) {
if (event.type === 'click' || event.keyCode === KeyCode["default"].ENTER) {
handleChange(internalInputVal);
}
}
var jumpPrev = null;
var dataOrAriaAttributeProps = (0,pickAttrs["default"])(props, {
aria: true,
data: true
});
var totalText = showTotal && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
className: "".concat(prefixCls, "-total-text")
}, showTotal(total, [total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > total ? total : current * pageSize]));
var jumpNext = null;
var allPages = calculatePage(undefined, pageSize, total);
// ================== Render ==================
// When hideOnSinglePage is true and there is only 1 page, hide the pager
if (hideOnSinglePage && total <= pageSize) {
return null;
}
var pagerList = [];
var pagerProps = {
rootPrefixCls: prefixCls,
onClick: handleChange,
onKeyPress: runIfEnter,
showTitle: showTitle,
itemRender: itemRender,
page: -1
};
var prevPage = current - 1 > 0 ? current - 1 : 0;
var nextPage = current + 1 < allPages ? current + 1 : allPages;
var goButton = showQuickJumper && showQuickJumper.goButton;
// ================== Simple ==================
// FIXME: ts type
var isReadOnly = (0,esm_typeof["default"])(simple) === 'object' ? simple.readOnly : !simple;
var gotoButton = goButton;
var simplePager = null;
if (simple) {
// ====== Simple quick jump ======
if (goButton) {
if (typeof goButton === 'boolean') {
gotoButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
type: "button",
onClick: handleGoTO,
onKeyUp: handleGoTO
}, locale.jump_to_confirm);
} else {
gotoButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
onClick: handleGoTO,
onKeyUp: handleGoTO
}, goButton);
}
gotoButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? "".concat(locale.jump_to).concat(current, "/").concat(allPages) : null,
className: "".concat(prefixCls, "-simple-pager")
}, gotoButton);
}
simplePager = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? "".concat(current, "/").concat(allPages) : null,
className: "".concat(prefixCls, "-simple-pager")
}, isReadOnly ? internalInputVal : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
type: "text",
"aria-label": locale.jump_to,
value: internalInputVal,
disabled: disabled,
onKeyDown: handleKeyDown,
onKeyUp: handleKeyUp,
onChange: handleKeyUp,
onBlur: handleBlur,
size: 3
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: "".concat(prefixCls, "-slash")
}, "/"), allPages);
}
// ====================== Normal ======================
var pageBufferSize = showLessItems ? 1 : 2;
if (allPages <= 3 + pageBufferSize * 2) {
if (!allPages) {
pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
key: "noPager",
page: 1,
className: "".concat(prefixCls, "-item-disabled")
})));
}
for (var i = 1; i <= allPages; i += 1) {
pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
key: i,
page: i,
active: current === i
})));
}
} else {
var prevItemTitle = showLessItems ? locale.prev_3 : locale.prev_5;
var nextItemTitle = showLessItems ? locale.next_3 : locale.next_5;
var jumpPrevContent = itemRender(jumpPrevPage, 'jump-prev', getItemIcon(jumpPrevIcon, 'prev page'));
var jumpNextContent = itemRender(jumpNextPage, 'jump-next', getItemIcon(jumpNextIcon, 'next page'));
if (showPrevNextJumpers) {
jumpPrev = jumpPrevContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? prevItemTitle : null,
key: "prev",
onClick: jumpPrevHandle,
tabIndex: 0,
onKeyDown: runIfEnterJumpPrev,
className: classnames_default()("".concat(prefixCls, "-jump-prev"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-jump-prev-custom-icon"), !!jumpPrevIcon))
}, jumpPrevContent) : null;
jumpNext = jumpNextContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? nextItemTitle : null,
key: "next",
onClick: jumpNextHandle,
tabIndex: 0,
onKeyDown: runIfEnterJumpNext,
className: classnames_default()("".concat(prefixCls, "-jump-next"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-jump-next-custom-icon"), !!jumpNextIcon))
}, jumpNextContent) : null;
}
var left = Math.max(1, current - pageBufferSize);
var right = Math.min(current + pageBufferSize, allPages);
if (current - 1 <= pageBufferSize) {
right = 1 + pageBufferSize * 2;
}
if (allPages - current <= pageBufferSize) {
left = allPages - pageBufferSize * 2;
}
for (var _i = left; _i <= right; _i += 1) {
pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
key: _i,
page: _i,
active: current === _i
})));
}
if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) {
pagerList[0] = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(pagerList[0], {
className: classnames_default()("".concat(prefixCls, "-item-after-jump-prev"), pagerList[0].props.className)
});
pagerList.unshift(jumpPrev);
}
if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
var lastOne = pagerList[pagerList.length - 1];
pagerList[pagerList.length - 1] = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(lastOne, {
className: classnames_default()("".concat(prefixCls, "-item-before-jump-next"), lastOne.props.className)
});
pagerList.push(jumpNext);
}
if (left !== 1) {
pagerList.unshift( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
key: 1,
page: 1
})));
}
if (right !== allPages) {
pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
key: allPages,
page: allPages
})));
}
}
var prev = renderPrev(prevPage);
if (prev) {
var prevDisabled = !hasPrev || !allPages;
prev = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? locale.prev_page : null,
onClick: prevHandle,
tabIndex: prevDisabled ? null : 0,
onKeyDown: runIfEnterPrev,
className: classnames_default()("".concat(prefixCls, "-prev"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), prevDisabled)),
"aria-disabled": prevDisabled
}, prev);
}
var next = renderNext(nextPage);
if (next) {
var nextDisabled, nextTabIndex;
if (simple) {
nextDisabled = !hasNext;
nextTabIndex = hasPrev ? 0 : null;
} else {
nextDisabled = !hasNext || !allPages;
nextTabIndex = nextDisabled ? null : 0;
}
next = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
title: showTitle ? locale.next_page : null,
onClick: nextHandle,
tabIndex: nextTabIndex,
onKeyDown: runIfEnterNext,
className: classnames_default()("".concat(prefixCls, "-next"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), nextDisabled)),
"aria-disabled": nextDisabled
}, next);
}
var cls = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-start"), align === 'start'), "".concat(prefixCls, "-center"), align === 'center'), "".concat(prefixCls, "-end"), align === 'end'), "".concat(prefixCls, "-simple"), simple), "".concat(prefixCls, "-disabled"), disabled));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", (0,esm_extends["default"])({
className: cls,
style: style,
ref: paginationRef
}, dataOrAriaAttributeProps), totalText, prev, simple ? simplePager : pagerList, next, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Options, {
locale: locale,
rootPrefixCls: prefixCls,
disabled: disabled,
selectPrefixCls: selectPrefixCls,
changeSize: changePageSize,
pageSize: pageSize,
pageSizeOptions: pageSizeOptions,
quickGo: shouldDisplayQuickJumper ? handleChange : null,
goButton: gotoButton,
showSizeChanger: showSizeChanger,
sizeChangerRender: sizeChangerRender
}));
};
if (true) {
Pagination.displayName = 'Pagination';
}
/* harmony default export */ var es_Pagination = (Pagination);
;// ./node_modules/rc-pagination/es/index.js
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/en_US.js
var es_locale_en_US = __webpack_require__("./node_modules/rc-pagination/es/locale/en_US.js");
// EXTERNAL MODULE: ./components/pagination/style/index.ts
var pagination_style = __webpack_require__("./components/pagination/style/index.ts");
;// ./components/pagination/style/bordered.ts
const genBorderedStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}${componentCls}-bordered${componentCls}-disabled:not(${componentCls}-mini)`]: {
'&, &:hover': {
[`${componentCls}-item-link`]: {
borderColor: token.colorBorder
}
},
'&:focus-visible': {
[`${componentCls}-item-link`]: {
borderColor: token.colorBorder
}
},
[`${componentCls}-item, ${componentCls}-item-link`]: {
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
[`&:hover:not(${componentCls}-item-active)`]: {
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
a: {
color: token.colorTextDisabled
}
},
[`&${componentCls}-item-active`]: {
backgroundColor: token.itemActiveBgDisabled
}
},
[`${componentCls}-prev, ${componentCls}-next`]: {
'&:hover button': {
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
color: token.colorTextDisabled
},
[`${componentCls}-item-link`]: {
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder
}
}
},
[`${componentCls}${componentCls}-bordered:not(${componentCls}-mini)`]: {
[`${componentCls}-prev, ${componentCls}-next`]: {
'&:hover button': {
borderColor: token.colorPrimaryHover,
backgroundColor: token.itemBg
},
[`${componentCls}-item-link`]: {
backgroundColor: token.itemLinkBg,
borderColor: token.colorBorder
},
[`&:hover ${componentCls}-item-link`]: {
borderColor: token.colorPrimary,
backgroundColor: token.itemBg,
color: token.colorPrimary
},
[`&${componentCls}-disabled`]: {
[`${componentCls}-item-link`]: {
borderColor: token.colorBorder,
color: token.colorTextDisabled
}
}
},
[`${componentCls}-item`]: {
backgroundColor: token.itemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
[`&:hover:not(${componentCls}-item-active)`]: {
borderColor: token.colorPrimary,
backgroundColor: token.itemBg,
a: {
color: token.colorPrimary
}
},
'&-active': {
borderColor: token.colorPrimary
}
}
}
};
};
/* harmony default export */ var bordered = ((0,genStyleUtils.genSubStyleComponent)(['Pagination', 'bordered'], token => {
const paginationToken = (0,pagination_style.prepareToken)(token);
return [genBorderedStyle(paginationToken)];
}, pagination_style.prepareComponentToken));
;// ./components/pagination/useShowSizeChanger.ts
function useShowSizeChanger(showSizeChanger) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (typeof showSizeChanger === 'boolean') {
return [showSizeChanger, {}];
}
if (showSizeChanger && typeof showSizeChanger === 'object') {
return [true, showSizeChanger];
}
return [undefined, undefined];
}, [showSizeChanger]);
}
;// ./components/pagination/Pagination.tsx
var Pagination_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;
};
const Pagination_Pagination = props => {
const {
align,
prefixCls: customizePrefixCls,
selectPrefixCls: customizeSelectPrefixCls,
className,
rootClassName,
style,
size: customizeSize,
locale: customLocale,
responsive,
showSizeChanger,
selectComponentClass,
pageSizeOptions
} = props,
restProps = Pagination_rest(props, ["align", "prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "responsive", "showSizeChanger", "selectComponentClass", "pageSizeOptions"]);
const {
xs
} = hooks_useBreakpoint(responsive);
const [, token] = (0,useToken["default"])();
const {
getPrefixCls,
direction,
showSizeChanger: contextShowSizeChangerConfig,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('pagination');
const prefixCls = getPrefixCls('pagination', customizePrefixCls);
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,pagination_style["default"])(prefixCls);
// ============================== Size ==============================
const mergedSize = (0,useSize["default"])(customizeSize);
const isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);
// ============================= Locale =============================
const [contextLocale] = (0,useLocale["default"])('Pagination', es_locale_en_US["default"]);
const locale = Object.assign(Object.assign({}, contextLocale), customLocale);
// ========================== Size Changer ==========================
// Merge the props showSizeChanger
const [propShowSizeChanger, propSizeChangerSelectProps] = useShowSizeChanger(showSizeChanger);
const [contextShowSizeChanger, contextSizeChangerSelectProps] = useShowSizeChanger(contextShowSizeChangerConfig);
const mergedShowSizeChanger = propShowSizeChanger !== null && propShowSizeChanger !== void 0 ? propShowSizeChanger : contextShowSizeChanger;
const mergedShowSizeChangerSelectProps = propSizeChangerSelectProps !== null && propSizeChangerSelectProps !== void 0 ? propSizeChangerSelectProps : contextSizeChangerSelectProps;
const SizeChanger = selectComponentClass || components_select;
// Generate options
const mergedPageSizeOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
return pageSizeOptions ? pageSizeOptions.map(option => Number(option)) : undefined;
}, [pageSizeOptions]);
// Render size changer
const sizeChangerRender = info => {
var _a;
const {
disabled,
size: pageSize,
onSizeChange,
'aria-label': ariaLabel,
className: sizeChangerClassName,
options
} = info;
const {
className: propSizeChangerClassName,
onChange: propSizeChangerOnChange
} = mergedShowSizeChangerSelectProps || {};
// Origin Select is using Select.Option,
// So it make the option value must be string
// Just for compatible
const selectedValue = (_a = options.find(option => String(option.value) === String(pageSize))) === null || _a === void 0 ? void 0 : _a.value;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SizeChanger, Object.assign({
disabled: disabled,
showSearch: true,
popupMatchSelectWidth: false,
getPopupContainer: triggerNode => triggerNode.parentNode,
"aria-label": ariaLabel,
options: options
}, mergedShowSizeChangerSelectProps, {
value: selectedValue,
onChange: (nextSize, option) => {
onSizeChange === null || onSizeChange === void 0 ? void 0 : onSizeChange(nextSize);
propSizeChangerOnChange === null || propSizeChangerOnChange === void 0 ? void 0 : propSizeChangerOnChange(nextSize, option);
},
size: isSmall ? 'small' : 'middle',
className: classnames_default()(sizeChangerClassName, propSizeChangerClassName)
}));
};
if (true) {
const warning = (0,_util_warning.devUseWarning)('Pagination');
true ? warning(!selectComponentClass, 'usage', '`selectComponentClass` is not official api which will be removed.') : 0;
}
// ============================= Render =============================
const iconsProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const ellipsis = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-item-ellipsis`
}, "\u2022\u2022\u2022");
const prevIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
className: `${prefixCls}-item-link`,
type: "button",
tabIndex: -1
}, direction === 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null));
const nextIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
className: `${prefixCls}-item-link`,
type: "button",
tabIndex: -1
}, direction === 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null));
const jumpPrevIcon =
/*#__PURE__*/
// biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
className: `${prefixCls}-item-link`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-item-container`
}, direction === 'rtl' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleRightOutlined, {
className: `${prefixCls}-item-link-icon`
})) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleLeftOutlined, {
className: `${prefixCls}-item-link-icon`
})), ellipsis));
const jumpNextIcon =
/*#__PURE__*/
// biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
className: `${prefixCls}-item-link`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-item-container`
}, direction === 'rtl' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleLeftOutlined, {
className: `${prefixCls}-item-link-icon`
})) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleRightOutlined, {
className: `${prefixCls}-item-link-icon`
})), ellipsis));
return {
prevIcon,
nextIcon,
jumpPrevIcon,
jumpNextIcon
};
}, [direction, prefixCls]);
const selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
const extendedClassName = classnames_default()({
[`${prefixCls}-${align}`]: !!align,
[`${prefixCls}-mini`]: isSmall,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-bordered`]: token.wireframe
}, contextClassName, className, rootClassName, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, token.wireframe && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(bordered, {
prefixCls: prefixCls
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Pagination, Object.assign({}, iconsProps, restProps, {
style: mergedStyle,
prefixCls: prefixCls,
selectPrefixCls: selectPrefixCls,
className: extendedClassName,
locale: locale,
pageSizeOptions: mergedPageSizeOptions,
showSizeChanger: mergedShowSizeChanger,
sizeChangerRender: sizeChangerRender
}))));
};
if (true) {
Pagination_Pagination.displayName = 'Pagination';
}
/* harmony default export */ var pagination_Pagination = (Pagination_Pagination);
;// ./components/pagination/index.tsx
/* harmony default export */ var components_pagination = (pagination_Pagination);
;// ./components/spin/Indicator/Progress.tsx
const viewSize = 100;
const borderWidth = viewSize / 5;
const radius = viewSize / 2 - borderWidth / 2;
const circumference = radius * 2 * Math.PI;
const position = 50;
const CustomCircle = props => {
const {
dotClassName,
style,
hasCircleCls
} = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
className: classnames_default()(`${dotClassName}-circle`, {
[`${dotClassName}-circle-bg`]: hasCircleCls
}),
r: radius,
cx: position,
cy: position,
strokeWidth: borderWidth,
style: style
});
};
const Progress = _ref => {
let {
percent,
prefixCls
} = _ref;
const dotClassName = `${prefixCls}-dot`;
const holderClassName = `${dotClassName}-holder`;
const hideClassName = `${holderClassName}-hidden`;
const [render, setRender] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
// ==================== Visible =====================
(0,useLayoutEffect["default"])(() => {
if (percent !== 0) {
setRender(true);
}
}, [percent !== 0]);
// ==================== Progress ====================
const safePtg = Math.max(Math.min(percent, 100), 0);
// ===================== Render =====================
if (!render) {
return null;
}
const circleStyle = {
strokeDashoffset: `${circumference / 4}`,
strokeDasharray: `${circumference * safePtg / 100} ${circumference * (100 - safePtg) / 100}`
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(holderClassName, `${dotClassName}-progress`, safePtg <= 0 && hideClassName)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
viewBox: `0 0 ${viewSize} ${viewSize}`,
// biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: progressbar could be readonly
role: "progressbar",
"aria-valuemin": 0,
"aria-valuemax": 100,
"aria-valuenow": safePtg
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CustomCircle, {
dotClassName: dotClassName,
hasCircleCls: true
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CustomCircle, {
dotClassName: dotClassName,
style: circleStyle
})));
};
/* harmony default export */ var Indicator_Progress = (Progress);
;// ./components/spin/Indicator/Looper.tsx
function Looper(props) {
const {
prefixCls,
percent = 0
} = props;
const dotClassName = `${prefixCls}-dot`;
const holderClassName = `${dotClassName}-holder`;
const hideClassName = `${holderClassName}-hidden`;
// ===================== Render =====================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(holderClassName, percent > 0 && hideClassName)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(dotClassName, `${prefixCls}-dot-spin`)
}, [1, 2, 3, 4].map(i => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("i", {
className: `${prefixCls}-dot-item`,
key: i
}))))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Indicator_Progress, {
prefixCls: prefixCls,
percent: percent
}));
}
;// ./components/spin/Indicator/index.tsx
function Indicator(props) {
const {
prefixCls,
indicator,
percent
} = props;
const dotClassName = `${prefixCls}-dot`;
if (indicator && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(indicator)) {
return (0,reactNode.cloneElement)(indicator, {
className: classnames_default()(indicator.props.className, dotClassName),
percent
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Looper, {
prefixCls: prefixCls,
percent: percent
});
}
// EXTERNAL MODULE: ./components/spin/style/index.ts
var spin_style = __webpack_require__("./components/spin/style/index.ts");
;// ./components/spin/usePercent.ts
const AUTO_INTERVAL = 200;
const STEP_BUCKETS = [[30, 0.05], [70, 0.03], [96, 0.01]];
function usePercent(spinning, percent) {
const [mockPercent, setMockPercent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const mockIntervalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const isAuto = percent === 'auto';
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (isAuto && spinning) {
setMockPercent(0);
mockIntervalRef.current = setInterval(() => {
setMockPercent(prev => {
const restPTG = 100 - prev;
for (let i = 0; i < STEP_BUCKETS.length; i += 1) {
const [limit, stepPtg] = STEP_BUCKETS[i];
if (prev <= limit) {
return prev + restPTG * stepPtg;
}
}
return prev;
});
}, AUTO_INTERVAL);
}
return () => {
clearInterval(mockIntervalRef.current);
};
}, [isAuto, spinning]);
return isAuto ? mockPercent : percent;
}
;// ./components/spin/index.tsx
var spin_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;
};
const _SpinSizes = ['small', 'default', 'large'];
// Render indicator
let defaultIndicator;
function shouldDelay(spinning, delay) {
return !!spinning && !!delay && !Number.isNaN(Number(delay));
}
const Spin = props => {
var _a;
const {
prefixCls: customizePrefixCls,
spinning: customSpinning = true,
delay = 0,
className,
rootClassName,
size = 'default',
tip,
wrapperClassName,
style,
children,
fullscreen = false,
indicator,
percent
} = props,
restProps = spin_rest(props, ["prefixCls", "spinning", "delay", "className", "rootClassName", "size", "tip", "wrapperClassName", "style", "children", "fullscreen", "indicator", "percent"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle,
indicator: contextIndicator
} = (0,config_provider_context.useComponentConfig)('spin');
const prefixCls = getPrefixCls('spin', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,spin_style["default"])(prefixCls);
const [spinning, setSpinning] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => customSpinning && !shouldDelay(customSpinning, delay));
const mergedPercent = usePercent(spinning, percent);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (customSpinning) {
const showSpinning = debounce(delay, () => {
setSpinning(true);
});
showSpinning();
return () => {
var _a;
(_a = showSpinning === null || showSpinning === void 0 ? void 0 : showSpinning.cancel) === null || _a === void 0 ? void 0 : _a.call(showSpinning);
};
}
setSpinning(false);
}, [delay, customSpinning]);
const isNestedPattern = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => typeof children !== 'undefined' && !fullscreen, [children, fullscreen]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Spin');
true ? warning(!tip || isNestedPattern || fullscreen, 'usage', '`tip` only work in nest or fullscreen pattern.') : 0;
}
const spinClassName = classnames_default()(prefixCls, contextClassName, {
[`${prefixCls}-sm`]: size === 'small',
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-spinning`]: spinning,
[`${prefixCls}-show-text`]: !!tip,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, !fullscreen && rootClassName, hashId, cssVarCls);
const containerClassName = classnames_default()(`${prefixCls}-container`, {
[`${prefixCls}-blur`]: spinning
});
const mergedIndicator = (_a = indicator !== null && indicator !== void 0 ? indicator : contextIndicator) !== null && _a !== void 0 ? _a : defaultIndicator;
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
const spinElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, restProps, {
style: mergedStyle,
className: spinClassName,
"aria-live": "polite",
"aria-busy": spinning
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Indicator, {
prefixCls: prefixCls,
indicator: mergedIndicator,
percent: mergedPercent
}), tip && (isNestedPattern || fullscreen) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-text`
}, tip)) : null);
if (isNestedPattern) {
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, restProps, {
className: classnames_default()(`${prefixCls}-nested-loading`, wrapperClassName, hashId, cssVarCls)
}), spinning && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
key: "loading"
}, spinElement), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: containerClassName,
key: "container"
}, children)));
}
if (fullscreen) {
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-fullscreen`, {
[`${prefixCls}-fullscreen-show`]: spinning
}, rootClassName, hashId, cssVarCls)
}, spinElement));
}
return wrapCSSVar(spinElement);
};
Spin.setDefaultIndicator = indicator => {
defaultIndicator = indicator;
};
if (true) {
Spin.displayName = 'Spin';
}
/* harmony default export */ var spin = (Spin);
;// ./components/list/context.ts
const context_ListContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
const ListConsumer = context_ListContext.Consumer;
;// ./components/list/Item.tsx
var Item_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;
};
const Item_Meta = _a => {
var {
prefixCls: customizePrefixCls,
className,
avatar,
title,
description
} = _a,
others = Item_rest(_a, ["prefixCls", "className", "avatar", "title", "description"]);
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('list', customizePrefixCls);
const classString = classnames_default()(`${prefixCls}-item-meta`, className);
const content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-item-meta-content`
}, title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("h4", {
className: `${prefixCls}-item-meta-title`
}, title), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-item-meta-description`
}, description));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({}, others, {
className: classString
}), avatar && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-item-meta-avatar`
}, avatar), (title || description) && content);
};
const Item_InternalItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
children,
actions,
extra,
styles,
className,
classNames: customizeClassNames,
colStyle
} = props,
others = Item_rest(props, ["prefixCls", "children", "actions", "extra", "styles", "className", "classNames", "colStyle"]);
const {
grid,
itemLayout
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(context_ListContext);
const {
getPrefixCls,
list
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const moduleClass = moduleName => {
var _a, _b;
return classnames_default()((_b = (_a = list === null || list === void 0 ? void 0 : list.item) === null || _a === void 0 ? void 0 : _a.classNames) === null || _b === void 0 ? void 0 : _b[moduleName], customizeClassNames === null || customizeClassNames === void 0 ? void 0 : customizeClassNames[moduleName]);
};
const moduleStyle = moduleName => {
var _a, _b;
return Object.assign(Object.assign({}, (_b = (_a = list === null || list === void 0 ? void 0 : list.item) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b[moduleName]), styles === null || styles === void 0 ? void 0 : styles[moduleName]);
};
const isItemContainsTextNodeAndNotSingular = () => {
let result = false;
external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.forEach(children, element => {
if (typeof element === 'string') {
result = true;
}
});
return result && external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(children) > 1;
};
const isFlexMode = () => {
if (itemLayout === 'vertical') {
return !!extra;
}
return !isItemContainsTextNodeAndNotSingular();
};
const prefixCls = getPrefixCls('list', customizePrefixCls);
const actionsContent = actions && actions.length > 0 && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
className: classnames_default()(`${prefixCls}-item-action`, moduleClass('actions')),
key: "actions",
style: moduleStyle('actions')
}, actions.map((action, i) => (
/*#__PURE__*/
// eslint-disable-next-line react/no-array-index-key
external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
key: `${prefixCls}-item-action-${i}`
}, action, i !== actions.length - 1 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("em", {
className: `${prefixCls}-item-action-split`
}))))));
const Element = grid ? 'div' : 'li';
const itemChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Element, Object.assign({}, others, !grid ? {
ref
} : {}, {
className: classnames_default()(`${prefixCls}-item`, {
[`${prefixCls}-item-no-flex`]: !isFlexMode()
}, className)
}), itemLayout === 'vertical' && extra ? [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-item-main`,
key: "content"
}, children, actionsContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(`${prefixCls}-item-extra`, moduleClass('extra')),
key: "extra",
style: moduleStyle('extra')
}, extra)] : [children, actionsContent, (0,reactNode.cloneElement)(extra, {
key: 'extra'
})]);
return grid ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(col, {
ref: ref,
flex: 1,
style: colStyle
}, itemChildren)) : itemChildren;
});
const list_Item_Item = Item_InternalItem;
list_Item_Item.Meta = Item_Meta;
/* harmony default export */ var list_Item = (list_Item_Item);
// EXTERNAL MODULE: ./components/list/style/index.ts
var list_style = __webpack_require__("./components/list/style/index.ts");
;// ./components/list/index.tsx
var list_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 InternalList(_a, ref) {
var {
pagination = false,
prefixCls: customizePrefixCls,
bordered = false,
split = true,
className,
rootClassName,
style,
children,
itemLayout,
loadMore,
grid,
dataSource = [],
size: customizeSize,
header,
footer,
loading = false,
rowKey,
renderItem,
locale
} = _a,
rest = list_rest(_a, ["pagination", "prefixCls", "bordered", "split", "className", "rootClassName", "style", "children", "itemLayout", "loadMore", "grid", "dataSource", "size", "header", "footer", "loading", "rowKey", "renderItem", "locale"]);
const paginationObj = pagination && typeof pagination === 'object' ? pagination : {};
const [paginationCurrent, setPaginationCurrent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(paginationObj.defaultCurrent || 1);
const [paginationSize, setPaginationSize] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(paginationObj.defaultPageSize || 10);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('list');
const {
renderEmpty
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const defaultPaginationProps = {
current: 1,
total: 0
};
const triggerPaginationEvent = eventName => (page, pageSize) => {
var _a;
setPaginationCurrent(page);
setPaginationSize(pageSize);
if (pagination) {
(_a = pagination === null || pagination === void 0 ? void 0 : pagination[eventName]) === null || _a === void 0 ? void 0 : _a.call(pagination, page, pageSize);
}
};
const onPaginationChange = triggerPaginationEvent('onChange');
const onPaginationShowSizeChange = triggerPaginationEvent('onShowSizeChange');
const renderInnerItem = (item, index) => {
if (!renderItem) return null;
let key;
if (typeof rowKey === 'function') {
key = rowKey(item);
} else if (rowKey) {
key = item[rowKey];
} else {
key = item.key;
}
if (!key) {
key = `list-item-${index}`;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
key: key
}, renderItem(item, index));
};
const isSomethingAfterLastItem = () => !!(loadMore || pagination || footer);
const prefixCls = getPrefixCls('list', customizePrefixCls);
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,list_style["default"])(prefixCls);
let loadingProp = loading;
if (typeof loadingProp === 'boolean') {
loadingProp = {
spinning: loadingProp
};
}
const isLoading = !!(loadingProp === null || loadingProp === void 0 ? void 0 : loadingProp.spinning);
const mergedSize = (0,useSize["default"])(customizeSize);
// large => lg
// small => sm
let sizeCls = '';
switch (mergedSize) {
case 'large':
sizeCls = 'lg';
break;
case 'small':
sizeCls = 'sm';
break;
default:
break;
}
const classString = classnames_default()(prefixCls, {
[`${prefixCls}-vertical`]: itemLayout === 'vertical',
[`${prefixCls}-${sizeCls}`]: sizeCls,
[`${prefixCls}-split`]: split,
[`${prefixCls}-bordered`]: bordered,
[`${prefixCls}-loading`]: isLoading,
[`${prefixCls}-grid`]: !!grid,
[`${prefixCls}-something-after-last-item`]: isSomethingAfterLastItem(),
[`${prefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, hashId, cssVarCls);
const paginationProps = _util_extendsObject(defaultPaginationProps, {
total: dataSource.length,
current: paginationCurrent,
pageSize: paginationSize
}, pagination || {});
const largestPage = Math.ceil(paginationProps.total / paginationProps.pageSize);
if (paginationProps.current > largestPage) {
paginationProps.current = largestPage;
}
const paginationContent = pagination && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-pagination`)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_pagination, Object.assign({
align: "end"
}, paginationProps, {
onChange: onPaginationChange,
onShowSizeChange: onPaginationShowSizeChange
}))));
let splitDataSource = (0,toConsumableArray["default"])(dataSource);
if (pagination) {
if (dataSource.length > (paginationProps.current - 1) * paginationProps.pageSize) {
splitDataSource = (0,toConsumableArray["default"])(dataSource).splice((paginationProps.current - 1) * paginationProps.pageSize, paginationProps.pageSize);
}
}
const needResponsive = Object.keys(grid || {}).some(key => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key));
const screens = hooks_useBreakpoint(needResponsive);
const currentBreakpoint = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
for (let i = 0; i < responsiveArray.length; i += 1) {
const breakpoint = responsiveArray[i];
if (screens[breakpoint]) {
return breakpoint;
}
}
return undefined;
}, [screens]);
const colStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!grid) {
return undefined;
}
const columnCount = currentBreakpoint && grid[currentBreakpoint] ? grid[currentBreakpoint] : grid.column;
if (columnCount) {
return {
width: `${100 / columnCount}%`,
maxWidth: `${100 / columnCount}%`
};
}
}, [JSON.stringify(grid), currentBreakpoint]);
let childrenContent = isLoading && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
minHeight: 53
}
});
if (splitDataSource.length > 0) {
const items = splitDataSource.map((item, index) => renderInnerItem(item, index));
childrenContent = grid ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(row, {
gutter: grid.gutter
}, external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.map(items, child => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
key: child === null || child === void 0 ? void 0 : child.key,
style: colStyle
}, child))))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: `${prefixCls}-items`
}, items));
} else if (!children && !isLoading) {
childrenContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-empty-text`
}, (locale === null || locale === void 0 ? void 0 : locale.emptyText) || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('List')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "List"
}));
}
const paginationPosition = paginationProps.position || 'bottom';
const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
grid,
itemLayout
}), [JSON.stringify(grid), itemLayout]);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_ListContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
ref: ref,
style: Object.assign(Object.assign({}, contextStyle), style),
className: classString
}, rest), (paginationPosition === 'top' || paginationPosition === 'both') && paginationContent, header && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-header`
}, header), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, Object.assign({}, loadingProp), childrenContent, children), footer && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-footer`
}, footer), loadMore || (paginationPosition === 'bottom' || paginationPosition === 'both') && paginationContent)));
}
const ListWithForwardRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalList);
if (true) {
ListWithForwardRef.displayName = 'List';
}
const list_List = ListWithForwardRef;
list_List.Item = list_Item;
/* harmony default export */ var list = (list_List);
;// ./node_modules/rc-mentions/es/hooks/useEffectState.js
/**
* Trigger a callback on state change
*/
function useEffectState_useEffectState() {
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
id: 0,
callback: null
}),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
effectId = _useState2[0],
setEffectId = _useState2[1];
var update = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (callback) {
setEffectId(function (_ref) {
var id = _ref.id;
return {
id: id + 1,
callback: callback
};
});
}, []);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var _effectId$callback;
(_effectId$callback = effectId.callback) === null || _effectId$callback === void 0 || _effectId$callback.call(effectId);
}, [effectId]);
return update;
}
;// ./node_modules/rc-mentions/es/MentionsContext.js
/* tslint:disable: no-object-literal-type-assertion */
// We will never use default, here only to fix TypeScript warning
var MentionsContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var es_MentionsContext = (MentionsContext);
;// ./node_modules/rc-mentions/es/DropdownMenu.js
/**
* We only use Menu to display the candidate.
* The focus is controlled by textarea to make accessibility easy.
*/
function DropdownMenu(props) {
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_MentionsContext),
notFoundContent = _React$useContext.notFoundContent,
activeIndex = _React$useContext.activeIndex,
setActiveIndex = _React$useContext.setActiveIndex,
selectOption = _React$useContext.selectOption,
onFocus = _React$useContext.onFocus,
onBlur = _React$useContext.onBlur,
onScroll = _React$useContext.onScroll;
var prefixCls = props.prefixCls,
options = props.options;
var activeOption = options[activeIndex] || {};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_menu_es, {
prefixCls: "".concat(prefixCls, "-menu"),
activeKey: activeOption.key,
onSelect: function onSelect(_ref) {
var key = _ref.key;
var option = options.find(function (_ref2) {
var optionKey = _ref2.key;
return optionKey === key;
});
selectOption(option);
},
onFocus: onFocus,
onBlur: onBlur,
onScroll: onScroll
}, options.map(function (option, index) {
var key = option.key,
disabled = option.disabled,
className = option.className,
style = option.style,
label = option.label;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, {
key: key,
disabled: disabled,
className: className,
style: style,
onMouseEnter: function onMouseEnter() {
setActiveIndex(index);
}
}, label);
}), !options.length && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, {
disabled: true
}, notFoundContent));
}
/* harmony default export */ var es_DropdownMenu = (DropdownMenu);
;// ./node_modules/rc-mentions/es/KeywordTrigger.js
var KeywordTrigger_BUILT_IN_PLACEMENTS = {
bottomRight: {
points: ['tl', 'br'],
offset: [0, 4],
overflow: {
adjustX: 1,
adjustY: 1
}
},
bottomLeft: {
points: ['tr', 'bl'],
offset: [0, 4],
overflow: {
adjustX: 1,
adjustY: 1
}
},
topRight: {
points: ['bl', 'tr'],
offset: [0, -4],
overflow: {
adjustX: 1,
adjustY: 1
}
},
topLeft: {
points: ['br', 'tl'],
offset: [0, -4],
overflow: {
adjustX: 1,
adjustY: 1
}
}
};
var KeywordTrigger = function KeywordTrigger(props) {
var prefixCls = props.prefixCls,
options = props.options,
children = props.children,
visible = props.visible,
transitionName = props.transitionName,
getPopupContainer = props.getPopupContainer,
dropdownClassName = props.dropdownClassName,
direction = props.direction,
placement = props.placement;
var dropdownPrefix = "".concat(prefixCls, "-dropdown");
var dropdownElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DropdownMenu, {
prefixCls: dropdownPrefix,
options: options
});
var dropdownPlacement = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var popupPlacement;
if (direction === 'rtl') {
popupPlacement = placement === 'top' ? 'topLeft' : 'bottomLeft';
} else {
popupPlacement = placement === 'top' ? 'topRight' : 'bottomRight';
}
return popupPlacement;
}, [direction, placement]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, {
prefixCls: dropdownPrefix,
popupVisible: visible,
popup: dropdownElement,
popupPlacement: dropdownPlacement,
popupTransitionName: transitionName,
builtinPlacements: KeywordTrigger_BUILT_IN_PLACEMENTS,
getPopupContainer: getPopupContainer,
popupClassName: dropdownClassName
}, children);
};
/* harmony default export */ var es_KeywordTrigger = (KeywordTrigger);
;// ./node_modules/rc-mentions/es/Option.js
var Option_Option = function Option() {
return null;
};
/* harmony default export */ var rc_mentions_es_Option = (Option_Option);
;// ./node_modules/rc-mentions/es/util.js
/**
* Cut input selection into 2 part and return text before selection start
*/
function getBeforeSelectionText(input) {
var selectionStart = input.selectionStart;
return input.value.slice(0, selectionStart);
}
/**
* Find the last match prefix index
*/
function getLastMeasureIndex(text, prefix) {
return prefix.reduce(function (lastMatch, prefixStr) {
var lastIndex = text.lastIndexOf(prefixStr);
if (lastIndex > lastMatch.location) {
return {
location: lastIndex,
prefix: prefixStr
};
}
return lastMatch;
}, {
location: -1,
prefix: ''
});
}
function lower(char) {
return (char || '').toLowerCase();
}
function reduceText(text, targetText, split) {
var firstChar = text[0];
if (!firstChar || firstChar === split) {
return text;
}
// Reuse rest text as it can
var restText = text;
var targetTextLen = targetText.length;
for (var i = 0; i < targetTextLen; i += 1) {
if (lower(restText[i]) !== lower(targetText[i])) {
restText = restText.slice(i);
break;
} else if (i === targetTextLen - 1) {
restText = restText.slice(targetTextLen);
}
}
return restText;
}
/**
* Paint targetText into current text:
* text: little@litest
* targetText: light
* => little @light test
*/
function replaceWithMeasure(text, measureConfig) {
var measureLocation = measureConfig.measureLocation,
prefix = measureConfig.prefix,
targetText = measureConfig.targetText,
selectionStart = measureConfig.selectionStart,
split = measureConfig.split;
// Before text will append one space if have other text
var beforeMeasureText = text.slice(0, measureLocation);
if (beforeMeasureText[beforeMeasureText.length - split.length] === split) {
beforeMeasureText = beforeMeasureText.slice(0, beforeMeasureText.length - split.length);
}
if (beforeMeasureText) {
beforeMeasureText = "".concat(beforeMeasureText).concat(split);
}
// Cut duplicate string with current targetText
var restText = reduceText(text.slice(selectionStart), targetText.slice(selectionStart - measureLocation - prefix.length), split);
if (restText.slice(0, split.length) === split) {
restText = restText.slice(split.length);
}
var connectedStartText = "".concat(beforeMeasureText).concat(prefix).concat(targetText).concat(split);
return {
text: "".concat(connectedStartText).concat(restText),
selectionLocation: connectedStartText.length
};
}
function setInputSelection(input, location) {
input.setSelectionRange(location, location);
/**
* Reset caret into view.
* Since this function always called by user control, it's safe to focus element.
*/
input.blur();
input.focus();
}
function util_validateSearch(text, split) {
return !split || text.indexOf(split) === -1;
}
function util_filterOption(input, _ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value;
var lowerCase = input.toLowerCase();
return value.toLowerCase().indexOf(lowerCase) !== -1;
}
;// ./node_modules/rc-mentions/es/Mentions.js
var Mentions_excluded = ["prefixCls", "className", "style", "prefix", "split", "notFoundContent", "value", "defaultValue", "children", "options", "open", "allowClear", "silent", "validateSearch", "filterOption", "onChange", "onKeyDown", "onKeyUp", "onPressEnter", "onSearch", "onSelect", "onFocus", "onBlur", "transitionName", "placement", "direction", "getPopupContainer", "dropdownClassName", "rows", "visible", "onPopupScroll"],
Mentions_excluded2 = ["suffix", "prefixCls", "defaultValue", "value", "allowClear", "onChange", "classNames", "className", "disabled", "onClear"];
var InternalMentions = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
var prefixCls = props.prefixCls,
className = props.className,
style = props.style,
_props$prefix = props.prefix,
prefix = _props$prefix === void 0 ? '@' : _props$prefix,
_props$split = props.split,
split = _props$split === void 0 ? ' ' : _props$split,
_props$notFoundConten = props.notFoundContent,
notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,
value = props.value,
defaultValue = props.defaultValue,
children = props.children,
options = props.options,
open = props.open,
allowClear = props.allowClear,
silent = props.silent,
_props$validateSearch = props.validateSearch,
validateSearch = _props$validateSearch === void 0 ? util_validateSearch : _props$validateSearch,
_props$filterOption = props.filterOption,
filterOption = _props$filterOption === void 0 ? util_filterOption : _props$filterOption,
onChange = props.onChange,
onKeyDown = props.onKeyDown,
onKeyUp = props.onKeyUp,
onPressEnter = props.onPressEnter,
onSearch = props.onSearch,
onSelect = props.onSelect,
onFocus = props.onFocus,
onBlur = props.onBlur,
transitionName = props.transitionName,
placement = props.placement,
direction = props.direction,
getPopupContainer = props.getPopupContainer,
dropdownClassName = props.dropdownClassName,
_props$rows = props.rows,
rows = _props$rows === void 0 ? 1 : _props$rows,
visible = props.visible,
onPopupScroll = props.onPopupScroll,
restProps = (0,objectWithoutProperties["default"])(props, Mentions_excluded);
var mergedPrefix = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return Array.isArray(prefix) ? prefix : [prefix];
}, [prefix]);
// =============================== Refs ===============================
var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var textareaRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var measureRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var getTextArea = function getTextArea() {
var _textareaRef$current;
return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 || (_textareaRef$current = _textareaRef$current.resizableTextArea) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.textArea;
};
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
var _textareaRef$current4;
return {
focus: function focus() {
var _textareaRef$current2;
return (_textareaRef$current2 = textareaRef.current) === null || _textareaRef$current2 === void 0 ? void 0 : _textareaRef$current2.focus();
},
blur: function blur() {
var _textareaRef$current3;
return (_textareaRef$current3 = textareaRef.current) === null || _textareaRef$current3 === void 0 ? void 0 : _textareaRef$current3.blur();
},
textarea: (_textareaRef$current4 = textareaRef.current) === null || _textareaRef$current4 === void 0 || (_textareaRef$current4 = _textareaRef$current4.resizableTextArea) === null || _textareaRef$current4 === void 0 ? void 0 : _textareaRef$current4.textArea,
nativeElement: containerRef.current
};
});
// ============================== State ===============================
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
measuring = _useState2[0],
setMeasuring = _useState2[1];
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
measureText = _useState4[0],
setMeasureText = _useState4[1];
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
_useState6 = (0,slicedToArray["default"])(_useState5, 2),
measurePrefix = _useState6[0],
setMeasurePrefix = _useState6[1];
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState8 = (0,slicedToArray["default"])(_useState7, 2),
measureLocation = _useState8[0],
setMeasureLocation = _useState8[1];
var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
_useState10 = (0,slicedToArray["default"])(_useState9, 2),
activeIndex = _useState10[0],
setActiveIndex = _useState10[1];
var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState12 = (0,slicedToArray["default"])(_useState11, 2),
isFocus = _useState12[0],
setIsFocus = _useState12[1];
// ============================== Value ===============================
var _useMergedState = (0,useMergedState["default"])('', {
defaultValue: defaultValue,
value: value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedValue = _useMergedState2[0],
setMergedValue = _useMergedState2[1];
// =============================== Open ===============================
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
// Sync measure div top with textarea for rc-trigger usage
if (measuring && measureRef.current) {
measureRef.current.scrollTop = getTextArea().scrollTop;
}
}, [measuring]);
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if (open) {
if (true) {
(0,warning["default"])(false, '`open` of Mentions is only used for debug usage. Do not use in you production.');
}
for (var i = 0; i < mergedPrefix.length; i += 1) {
var curPrefix = mergedPrefix[i];
var index = mergedValue.lastIndexOf(curPrefix);
if (index >= 0) {
return [true, '', curPrefix, index];
}
}
}
return [measuring, measureText, measurePrefix, measureLocation];
}, [open, measuring, mergedPrefix, mergedValue, measureText, measurePrefix, measureLocation]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 4),
mergedMeasuring = _React$useMemo2[0],
mergedMeasureText = _React$useMemo2[1],
mergedMeasurePrefix = _React$useMemo2[2],
mergedMeasureLocation = _React$useMemo2[3];
// ============================== Option ==============================
var getOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(function (targetMeasureText) {
var list;
if (options && options.length > 0) {
list = options.map(function (item) {
var _item$key;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
key: (_item$key = item === null || item === void 0 ? void 0 : item.key) !== null && _item$key !== void 0 ? _item$key : item.value
});
});
} else {
list = (0,toArray["default"])(children).map(function (_ref) {
var optionProps = _ref.props,
key = _ref.key;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, optionProps), {}, {
label: optionProps.children,
key: key || optionProps.value
});
});
}
return list.filter(function (option) {
/** Return all result if `filterOption` is false. */
if (filterOption === false) {
return true;
}
return filterOption(targetMeasureText, option);
});
}, [children, options, filterOption]);
var mergedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
return getOptions(mergedMeasureText);
}, [getOptions, mergedMeasureText]);
// ============================= Measure ==============================
// Mark that we will reset input selection to target position when user select option
var onSelectionEffect = useEffectState_useEffectState();
var startMeasure = function startMeasure(nextMeasureText, nextMeasurePrefix, nextMeasureLocation) {
setMeasuring(true);
setMeasureText(nextMeasureText);
setMeasurePrefix(nextMeasurePrefix);
setMeasureLocation(nextMeasureLocation);
setActiveIndex(0);
};
var stopMeasure = function stopMeasure(callback) {
setMeasuring(false);
setMeasureLocation(0);
setMeasureText('');
onSelectionEffect(callback);
};
// ============================== Change ==============================
var triggerChange = function triggerChange(nextValue) {
setMergedValue(nextValue);
onChange === null || onChange === void 0 || onChange(nextValue);
};
var onInternalChange = function onInternalChange(_ref2) {
var nextValue = _ref2.target.value;
triggerChange(nextValue);
};
var selectOption = function selectOption(option) {
var _getTextArea;
var _option$value = option.value,
mentionValue = _option$value === void 0 ? '' : _option$value;
var _replaceWithMeasure = replaceWithMeasure(mergedValue, {
measureLocation: mergedMeasureLocation,
targetText: mentionValue,
prefix: mergedMeasurePrefix,
selectionStart: (_getTextArea = getTextArea()) === null || _getTextArea === void 0 ? void 0 : _getTextArea.selectionStart,
split: split
}),
text = _replaceWithMeasure.text,
selectionLocation = _replaceWithMeasure.selectionLocation;
triggerChange(text);
stopMeasure(function () {
// We need restore the selection position
setInputSelection(getTextArea(), selectionLocation);
});
onSelect === null || onSelect === void 0 || onSelect(option, mergedMeasurePrefix);
};
// ============================= KeyEvent =============================
// Check if hit the measure keyword
var onInternalKeyDown = function onInternalKeyDown(event) {
var which = event.which;
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
// Skip if not measuring
if (!mergedMeasuring) {
return;
}
if (which === KeyCode["default"].UP || which === KeyCode["default"].DOWN) {
// Control arrow function
var optionLen = mergedOptions.length;
var offset = which === KeyCode["default"].UP ? -1 : 1;
var newActiveIndex = (activeIndex + offset + optionLen) % optionLen;
setActiveIndex(newActiveIndex);
event.preventDefault();
} else if (which === KeyCode["default"].ESC) {
stopMeasure();
} else if (which === KeyCode["default"].ENTER) {
// Measure hit
event.preventDefault();
// loading skip
if (silent) {
return;
}
if (!mergedOptions.length) {
stopMeasure();
return;
}
var _option = mergedOptions[activeIndex];
selectOption(_option);
}
};
/**
* When to start measure:
* 1. When user press `prefix`
* 2. When measureText !== prevMeasureText
* - If measure hit
* - If measuring
*
* When to stop measure:
* 1. Selection is out of range
* 2. Contains `space`
* 3. ESC or select one
*/
var onInternalKeyUp = function onInternalKeyUp(event) {
var key = event.key,
which = event.which;
var target = event.target;
var selectionStartText = getBeforeSelectionText(target);
var _getLastMeasureIndex = getLastMeasureIndex(selectionStartText, mergedPrefix),
measureIndex = _getLastMeasureIndex.location,
nextMeasurePrefix = _getLastMeasureIndex.prefix;
// If the client implements an onKeyUp handler, call it
onKeyUp === null || onKeyUp === void 0 || onKeyUp(event);
// Skip if match the white key list
if ([KeyCode["default"].ESC, KeyCode["default"].UP, KeyCode["default"].DOWN, KeyCode["default"].ENTER].indexOf(which) !== -1) {
return;
}
if (measureIndex !== -1) {
var nextMeasureText = selectionStartText.slice(measureIndex + nextMeasurePrefix.length);
var validateMeasure = validateSearch(nextMeasureText, split);
var matchOption = !!getOptions(nextMeasureText).length;
if (validateMeasure) {
// adding AltGraph also fort azert keyboard
if (key === nextMeasurePrefix || key === 'Shift' || which === KeyCode["default"].ALT || key === 'AltGraph' || mergedMeasuring || nextMeasureText !== mergedMeasureText && matchOption) {
startMeasure(nextMeasureText, nextMeasurePrefix, measureIndex);
}
} else if (mergedMeasuring) {
// Stop if measureText is invalidate
stopMeasure();
}
/**
* We will trigger `onSearch` to developer since they may use for async update.
* If met `space` means user finished searching.
*/
if (onSearch && validateMeasure) {
onSearch(nextMeasureText, nextMeasurePrefix);
}
} else if (mergedMeasuring) {
stopMeasure();
}
};
var onInternalPressEnter = function onInternalPressEnter(event) {
if (!mergedMeasuring && onPressEnter) {
onPressEnter(event);
}
};
// ============================ Focus Blur ============================
var focusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var onInternalFocus = function onInternalFocus(event) {
window.clearTimeout(focusRef.current);
if (!isFocus && event && onFocus) {
onFocus(event);
}
setIsFocus(true);
};
var onInternalBlur = function onInternalBlur(event) {
focusRef.current = window.setTimeout(function () {
setIsFocus(false);
stopMeasure();
onBlur === null || onBlur === void 0 || onBlur(event);
}, 0);
};
var onDropdownFocus = function onDropdownFocus() {
onInternalFocus();
};
var onDropdownBlur = function onDropdownBlur() {
onInternalBlur();
};
// ============================== Scroll ===============================
var onInternalPopupScroll = function onInternalPopupScroll(event) {
onPopupScroll === null || onPopupScroll === void 0 || onPopupScroll(event);
};
// ============================== Render ==============================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(prefixCls, className),
style: style,
ref: containerRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_textarea_es, (0,esm_extends["default"])({
ref: textareaRef,
value: mergedValue
}, restProps, {
rows: rows,
onChange: onInternalChange,
onKeyDown: onInternalKeyDown,
onKeyUp: onInternalKeyUp,
onPressEnter: onInternalPressEnter,
onFocus: onInternalFocus,
onBlur: onInternalBlur
})), mergedMeasuring && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: measureRef,
className: "".concat(prefixCls, "-measure")
}, mergedValue.slice(0, mergedMeasureLocation), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_MentionsContext.Provider, {
value: {
notFoundContent: notFoundContent,
activeIndex: activeIndex,
setActiveIndex: setActiveIndex,
selectOption: selectOption,
onFocus: onDropdownFocus,
onBlur: onDropdownBlur,
onScroll: onInternalPopupScroll
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_KeywordTrigger, {
prefixCls: prefixCls,
transitionName: transitionName,
placement: placement,
direction: direction,
options: mergedOptions,
visible: true,
getPopupContainer: getPopupContainer,
dropdownClassName: dropdownClassName
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, mergedMeasurePrefix))), mergedValue.slice(mergedMeasureLocation + mergedMeasurePrefix.length)));
});
var Mentions = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (_ref3, ref) {
var suffix = _ref3.suffix,
_ref3$prefixCls = _ref3.prefixCls,
prefixCls = _ref3$prefixCls === void 0 ? 'rc-mentions' : _ref3$prefixCls,
defaultValue = _ref3.defaultValue,
customValue = _ref3.value,
allowClear = _ref3.allowClear,
onChange = _ref3.onChange,
classes = _ref3.classNames,
className = _ref3.className,
disabled = _ref3.disabled,
onClear = _ref3.onClear,
rest = (0,objectWithoutProperties["default"])(_ref3, Mentions_excluded2);
// =============================== Ref ================================
var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var mentionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
var _holderRef$current, _mentionRef$current;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mentionRef.current), {}, {
nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || ((_mentionRef$current = mentionRef.current) === null || _mentionRef$current === void 0 ? void 0 : _mentionRef$current.nativeElement)
});
});
// ============================== Value ===============================
var _useMergedState3 = (0,useMergedState["default"])('', {
defaultValue: defaultValue,
value: customValue
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedValue = _useMergedState4[0],
setMergedValue = _useMergedState4[1];
// ============================== Change ==============================
var triggerChange = function triggerChange(currentValue) {
setMergedValue(currentValue);
onChange === null || onChange === void 0 || onChange(currentValue);
};
// ============================== Reset ===============================
var handleReset = function handleReset() {
triggerChange('');
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_BaseInput, {
suffix: suffix,
prefixCls: prefixCls,
value: mergedValue,
allowClear: allowClear,
handleReset: handleReset,
className: className,
classNames: classes,
disabled: disabled,
ref: holderRef,
onClear: onClear
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InternalMentions, (0,esm_extends["default"])({
className: classes === null || classes === void 0 ? void 0 : classes.mentions,
prefixCls: prefixCls,
ref: mentionRef,
onChange: triggerChange,
disabled: disabled
}, rest)));
});
Mentions.Option = rc_mentions_es_Option;
/* harmony default export */ var es_Mentions = (Mentions);
;// ./node_modules/rc-mentions/es/index.js
/* harmony default export */ var rc_mentions_es = (es_Mentions);
;// ./components/_util/toList.ts
function toList(candidate) {
let skipEmpty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (skipEmpty && (candidate === undefined || candidate === null)) return [];
return Array.isArray(candidate) ? candidate : [candidate];
}
// EXTERNAL MODULE: ./components/mentions/style/index.ts
var mentions_style = __webpack_require__("./components/mentions/style/index.ts");
;// ./components/mentions/index.tsx
var mentions_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;
};
const {
Option: mentions_Option
} = rc_mentions_es;
function loadingFilterOption() {
return true;
}
const mentions_InternalMentions = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
disabled,
loading,
filterOption,
children,
notFoundContent,
options,
status: customStatus,
allowClear = false,
popupClassName,
style,
variant: customVariant
} = props,
restProps = mentions_rest(props, ["prefixCls", "className", "rootClassName", "disabled", "loading", "filterOption", "children", "notFoundContent", "options", "status", "allowClear", "popupClassName", "style", "variant"]);
const [focused, setFocused] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const mergedRef = (0,es_ref.composeRef)(ref, innerRef);
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Mentions');
warning.deprecated(!children, 'Mentions.Option', 'options');
}
const {
getPrefixCls,
renderEmpty,
direction,
mentions: contextMentions
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
status: contextStatus,
hasFeedback,
feedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
const onFocus = function () {
if (restProps.onFocus) {
restProps.onFocus.apply(restProps, arguments);
}
setFocused(true);
};
const onBlur = function () {
if (restProps.onBlur) {
restProps.onBlur.apply(restProps, arguments);
}
setFocused(false);
};
const notFoundContentEle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (notFoundContent !== undefined) {
return notFoundContent;
}
return (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "Select"
});
}, [notFoundContent, renderEmpty]);
const mentionOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (loading) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(mentions_Option, {
value: "ANTD_SEARCHING",
disabled: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, {
size: "small"
}));
}
return children;
}, [loading, children]);
const mergedOptions = loading ? [{
value: 'ANTD_SEARCHING',
disabled: true,
label: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, {
size: "small"
})
}] : options;
const mentionsfilterOption = loading ? loadingFilterOption : filterOption;
const prefixCls = getPrefixCls('mentions', customizePrefixCls);
const mergedAllowClear = _util_getAllowClear(allowClear);
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,mentions_style["default"])(prefixCls, rootCls);
const [variant, enableVariantCls] = useVariants('mentions', customVariant);
const suffixNode = hasFeedback && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, feedbackIcon);
const mergedClassName = classnames_default()(contextMentions === null || contextMentions === void 0 ? void 0 : contextMentions.className, className, rootClassName, cssVarCls, rootCls);
const mentions = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_mentions_es, Object.assign({
silent: loading,
prefixCls: prefixCls,
notFoundContent: notFoundContentEle,
className: mergedClassName,
disabled: disabled,
allowClear: mergedAllowClear,
direction: direction,
style: Object.assign(Object.assign({}, contextMentions === null || contextMentions === void 0 ? void 0 : contextMentions.style), style)
}, restProps, {
filterOption: mentionsfilterOption,
onFocus: onFocus,
onBlur: onBlur,
dropdownClassName: classnames_default()(popupClassName, rootClassName, hashId, cssVarCls, rootCls),
ref: mergedRef,
options: mergedOptions,
suffix: suffixNode,
classNames: {
mentions: classnames_default()({
[`${prefixCls}-disabled`]: disabled,
[`${prefixCls}-focused`]: focused,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, hashId),
variant: classnames_default()({
[`${prefixCls}-${variant}`]: enableVariantCls
}, getStatusClassNames(prefixCls, mergedStatus)),
affixWrapper: hashId
}
}), mentionOptions);
return wrapCSSVar(mentions);
});
const mentions_Mentions = mentions_InternalMentions;
if (true) {
mentions_Mentions.displayName = 'Mentions';
}
mentions_Mentions.Option = mentions_Option;
// We don't care debug panel
/* istanbul ignore next */
const mentions_PurePanel = _util_PurePanel(mentions_Mentions, undefined, undefined, 'mentions');
mentions_Mentions._InternalPanelDoNotUseOrYouWillBeFired = mentions_PurePanel;
mentions_Mentions.getMentions = function () {
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const {
prefix = '@',
split = ' '
} = config;
const prefixList = toList(prefix);
return value.split(split).map(function () {
let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
let hitPrefix = null;
prefixList.some(prefixStr => {
const startStr = str.slice(0, prefixStr.length);
if (startStr === prefixStr) {
hitPrefix = prefixStr;
return true;
}
return false;
});
if (hitPrefix !== null) {
return {
prefix: hitPrefix,
value: str.slice(hitPrefix.length)
};
}
return null;
}).filter(entity => !!entity && !!entity.value);
};
/* harmony default export */ var mentions = (mentions_Mentions);
;// ./components/message/index.tsx
let message = null;
let act = callback => callback();
let taskQueue = [];
let defaultGlobalConfig = {};
function getGlobalContext() {
const {
getContainer,
duration,
rtl,
maxCount,
top
} = defaultGlobalConfig;
const mergedContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || document.body;
return {
getContainer: () => mergedContainer,
duration,
rtl,
maxCount,
top
};
}
const GlobalHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
messageConfig,
sync
} = props;
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = defaultGlobalConfig.prefixCls || getPrefixCls('message');
const appConfig = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AppConfigContext);
const [api, holder] = useInternalMessage(Object.assign(Object.assign(Object.assign({}, messageConfig), {
prefixCls
}), appConfig.message));
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => {
const instance = Object.assign({}, api);
Object.keys(instance).forEach(method => {
instance[method] = function () {
sync();
return api[method].apply(api, arguments);
};
});
return {
instance,
sync
};
});
return holder;
});
const GlobalHolderWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((_, ref) => {
const [messageConfig, setMessageConfig] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(getGlobalContext);
const sync = () => {
setMessageConfig(getGlobalContext);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(sync, []);
const global = globalConfig();
const rootPrefixCls = global.getRootPrefixCls();
const rootIconPrefixCls = global.getIconPrefixCls();
const theme = global.getTheme();
const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GlobalHolder, {
ref: ref,
sync: sync,
messageConfig: messageConfig
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(config_provider, {
prefixCls: rootPrefixCls,
iconPrefixCls: rootIconPrefixCls,
theme: theme
}, global.holderRender ? global.holderRender(dom) : dom);
});
function flushNotice() {
if (!message) {
const holderFragment = document.createDocumentFragment();
const newMessage = {
fragment: holderFragment
};
message = newMessage;
// Delay render to avoid sync issue
act(() => {
const reactRender = getReactRender();
reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GlobalHolderWrapper, {
ref: node => {
const {
instance,
sync
} = node || {};
// React 18 test env will throw if call immediately in ref
Promise.resolve().then(() => {
if (!newMessage.instance && instance) {
newMessage.instance = instance;
newMessage.sync = sync;
flushNotice();
}
});
}
}), holderFragment);
});
return;
}
// Notification not ready
if (!message.instance) {
return;
}
// >>> Execute task
taskQueue.forEach(task => {
const {
type,
skipped
} = task;
// Only `skipped` when user call notice but cancel it immediately
// and instance not ready
if (!skipped) {
switch (type) {
case 'open':
{
act(() => {
const closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));
closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);
task.setCloseFn(closeFn);
});
break;
}
case 'destroy':
act(() => {
message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);
});
break;
// Other type open
default:
{
act(() => {
var _message$instance;
const closeFn = (_message$instance = message.instance)[type].apply(_message$instance, (0,toConsumableArray["default"])(task.args));
closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);
task.setCloseFn(closeFn);
});
}
}
}
});
// Clean up
taskQueue = [];
}
// ==============================================================================
// == Export ==
// ==============================================================================
function setMessageGlobalConfig(config) {
defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);
// Trigger sync for it
act(() => {
var _a;
(_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);
});
}
function message_open(config) {
const result = wrapPromiseFn(resolve => {
let closeFn;
const task = {
type: 'open',
config,
resolve,
setCloseFn: fn => {
closeFn = fn;
}
};
taskQueue.push(task);
return () => {
if (closeFn) {
act(() => {
closeFn();
});
} else {
task.skipped = true;
}
};
});
flushNotice();
return result;
}
function typeOpen(type, args) {
const global = globalConfig();
if ( true && !global.holderRender) {
warnContext('message');
}
const result = wrapPromiseFn(resolve => {
let closeFn;
const task = {
type,
args,
resolve,
setCloseFn: fn => {
closeFn = fn;
}
};
taskQueue.push(task);
return () => {
if (closeFn) {
act(() => {
closeFn();
});
} else {
task.skipped = true;
}
};
});
flushNotice();
return result;
}
const destroy = key => {
taskQueue.push({
type: 'destroy',
key
});
flushNotice();
};
const methods = ['success', 'info', 'warning', 'error', 'loading'];
const baseStaticMethods = {
open: message_open,
destroy,
config: setMessageGlobalConfig,
useMessage: useMessage,
_InternalPanelDoNotUseOrYouWillBeFired: message_PurePanel
};
const staticMethods = baseStaticMethods;
methods.forEach(type => {
staticMethods[type] = function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return typeOpen(type, args);
};
});
// ==============================================================================
// == Test ==
// ==============================================================================
const message_noop = () => {};
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let actWrapper = message_noop;
if (false) {}
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let actDestroy = message_noop;
if (false) {}
/* harmony default export */ var components_message = (staticMethods);
;// ./components/modal/PurePanel.tsx
var modal_PurePanel_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;
};
const modal_PurePanel_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
className,
closeIcon,
closable,
type,
title,
children,
footer
} = props,
restProps = modal_PurePanel_rest(props, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const rootPrefixCls = getPrefixCls();
const prefixCls = customizePrefixCls || getPrefixCls('modal');
const rootCls = hooks_useCSSVarCls(rootPrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,modal_style["default"])(prefixCls, rootCls);
const confirmPrefixCls = `${prefixCls}-confirm`;
// Choose target props by confirm mark
let additionalProps = {};
if (type) {
additionalProps = {
closable: closable !== null && closable !== void 0 ? closable : false,
title: '',
footer: '',
children: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ConfirmContent, Object.assign({}, props, {
prefixCls: prefixCls,
confirmPrefixCls: confirmPrefixCls,
rootPrefixCls: rootPrefixCls,
content: children
})))
};
} else {
additionalProps = {
closable: closable !== null && closable !== void 0 ? closable : true,
title,
footer: footer !== null && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer, Object.assign({}, props)),
children
};
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Content_Panel, Object.assign({
prefixCls: prefixCls,
className: classnames_default()(hashId, `${prefixCls}-pure-panel`, type && confirmPrefixCls, type && `${confirmPrefixCls}-${type}`, className, cssVarCls, rootCls)
}, restProps, {
closeIcon: renderCloseIcon(prefixCls, closeIcon),
closable: closable
}, additionalProps)));
};
/* harmony default export */ var modal_PurePanel = (withPureRenderTheme(modal_PurePanel_PurePanel));
;// ./components/modal/index.tsx
function modalWarn(props) {
return confirm_confirm(withWarn(props));
}
const components_modal_Modal = modal_Modal;
components_modal_Modal.useModal = modal_useModal;
components_modal_Modal.info = function infoFn(props) {
return confirm_confirm(withInfo(props));
};
components_modal_Modal.success = function successFn(props) {
return confirm_confirm(withSuccess(props));
};
components_modal_Modal.error = function errorFn(props) {
return confirm_confirm(withError(props));
};
components_modal_Modal.warning = modalWarn;
components_modal_Modal.warn = modalWarn;
components_modal_Modal.confirm = function confirmFn(props) {
return confirm_confirm(withConfirm(props));
};
components_modal_Modal.destroyAll = function destroyAllFn() {
while (modal_destroyFns.length) {
const close = modal_destroyFns.pop();
if (close) {
close();
}
}
};
components_modal_Modal.config = modalGlobalConfig;
components_modal_Modal._InternalPanelDoNotUseOrYouWillBeFired = modal_PurePanel;
if (true) {
components_modal_Modal.displayName = 'Modal';
}
/* harmony default export */ var modal = (components_modal_Modal);
;// ./components/notification/index.tsx
let notification = null;
let notification_act = callback => callback();
let notification_taskQueue = [];
let notification_defaultGlobalConfig = {};
function notification_getGlobalContext() {
const {
getContainer,
rtl,
maxCount,
top,
bottom,
showProgress,
pauseOnHover
} = notification_defaultGlobalConfig;
const mergedContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || document.body;
return {
getContainer: () => mergedContainer,
rtl,
maxCount,
top,
bottom,
showProgress,
pauseOnHover
};
}
const notification_GlobalHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
const {
notificationConfig,
sync
} = props;
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = notification_defaultGlobalConfig.prefixCls || getPrefixCls('notification');
const appConfig = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AppConfigContext);
const [api, holder] = useInternalNotification(Object.assign(Object.assign(Object.assign({}, notificationConfig), {
prefixCls
}), appConfig.notification));
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(sync, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => {
const instance = Object.assign({}, api);
Object.keys(instance).forEach(method => {
instance[method] = function () {
sync();
return api[method].apply(api, arguments);
};
});
return {
instance,
sync
};
});
return holder;
});
const notification_GlobalHolderWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((_, ref) => {
const [notificationConfig, setNotificationConfig] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(notification_getGlobalContext);
const sync = () => {
setNotificationConfig(notification_getGlobalContext);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(sync, []);
const global = globalConfig();
const rootPrefixCls = global.getRootPrefixCls();
const rootIconPrefixCls = global.getIconPrefixCls();
const theme = global.getTheme();
const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(notification_GlobalHolder, {
ref: ref,
sync: sync,
notificationConfig: notificationConfig
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(config_provider, {
prefixCls: rootPrefixCls,
iconPrefixCls: rootIconPrefixCls,
theme: theme
}, global.holderRender ? global.holderRender(dom) : dom);
});
function notification_flushNotice() {
if (!notification) {
const holderFragment = document.createDocumentFragment();
const newNotification = {
fragment: holderFragment
};
notification = newNotification;
// Delay render to avoid sync issue
notification_act(() => {
const reactRender = getReactRender();
reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(notification_GlobalHolderWrapper, {
ref: node => {
const {
instance,
sync
} = node || {};
Promise.resolve().then(() => {
if (!newNotification.instance && instance) {
newNotification.instance = instance;
newNotification.sync = sync;
notification_flushNotice();
}
});
}
}), holderFragment);
});
return;
}
// Notification not ready
if (!notification.instance) {
return;
}
// >>> Execute task
notification_taskQueue.forEach(task => {
switch (task.type) {
case 'open':
{
notification_act(() => {
notification.instance.open(Object.assign(Object.assign({}, notification_defaultGlobalConfig), task.config));
});
break;
}
case 'destroy':
notification_act(() => {
notification === null || notification === void 0 ? void 0 : notification.instance.destroy(task.key);
});
break;
}
});
// Clean up
notification_taskQueue = [];
}
// ==============================================================================
// == Export ==
// ==============================================================================
function setNotificationGlobalConfig(config) {
notification_defaultGlobalConfig = Object.assign(Object.assign({}, notification_defaultGlobalConfig), config);
// Trigger sync for it
notification_act(() => {
var _a;
(_a = notification === null || notification === void 0 ? void 0 : notification.sync) === null || _a === void 0 ? void 0 : _a.call(notification);
});
}
function notification_open(config) {
const global = globalConfig();
if ( true && !global.holderRender) {
warnContext('notification');
}
notification_taskQueue.push({
type: 'open',
config
});
notification_flushNotice();
}
const notification_destroy = key => {
notification_taskQueue.push({
type: 'destroy',
key
});
notification_flushNotice();
};
const notification_methods = ['success', 'info', 'warning', 'error'];
const notification_baseStaticMethods = {
open: notification_open,
destroy: notification_destroy,
config: setNotificationGlobalConfig,
useNotification: useNotification_useNotification,
_InternalPanelDoNotUseOrYouWillBeFired: notification_PurePanel
};
const notification_staticMethods = notification_baseStaticMethods;
notification_methods.forEach(type => {
notification_staticMethods[type] = config => notification_open(Object.assign(Object.assign({}, config), {
type
}));
});
// ==============================================================================
// == Test ==
// ==============================================================================
const notification_noop = () => {};
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let notification_actWrapper = notification_noop;
if (false) {}
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let notification_actDestroy = notification_noop;
if (false) {}
/* harmony default export */ var components_notification = (notification_staticMethods);
// EXTERNAL MODULE: ./components/popconfirm/style/index.ts
var popconfirm_style = __webpack_require__("./components/popconfirm/style/index.ts");
;// ./components/popconfirm/PurePanel.tsx
var popconfirm_PurePanel_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;
};
const PurePanel_Overlay = props => {
const {
prefixCls,
okButtonProps,
cancelButtonProps,
title,
description,
cancelText,
okText,
okType = 'primary',
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
showCancel = true,
close,
onConfirm,
onCancel,
onPopupClick
} = props;
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [contextLocale] = (0,useLocale["default"])('Popconfirm', en_US["default"].Popconfirm);
const titleNode = getRenderPropValue(title);
const descriptionNode = getRenderPropValue(description);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-inner-content`,
onClick: onPopupClick
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-message`
}, icon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-message-icon`
}, icon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-message-text`
}, titleNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-title`
}, titleNode), descriptionNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-description`
}, descriptionNode))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-buttons`
}, showCancel && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({
onClick: onCancel,
size: "small"
}, cancelButtonProps), cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ActionButton, {
buttonProps: Object.assign(Object.assign({
size: 'small'
}, convertLegacyProps(okType)), okButtonProps),
actionFn: onConfirm,
close: close,
prefixCls: getPrefixCls('btn'),
quitOnNullishReturnValue: true,
emitEvent: true
}, okText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText))));
};
const popconfirm_PurePanel_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
placement,
className,
style
} = props,
restProps = popconfirm_PurePanel_rest(props, ["prefixCls", "placement", "className", "style"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
const [wrapCSSVar] = (0,popconfirm_style["default"])(prefixCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(popover_PurePanel, {
placement: placement,
className: classnames_default()(prefixCls, className),
style: style,
content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PurePanel_Overlay, Object.assign({
prefixCls: prefixCls
}, restProps))
}));
};
/* harmony default export */ var popconfirm_PurePanel = (popconfirm_PurePanel_PurePanel);
;// ./components/popconfirm/index.tsx
var popconfirm_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;
};
const InternalPopconfirm = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a, _b;
const {
prefixCls: customizePrefixCls,
placement = 'top',
trigger = 'click',
okType = 'primary',
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
children,
overlayClassName,
onOpenChange,
onVisibleChange,
overlayStyle,
styles,
classNames: popconfirmClassNames
} = props,
restProps = popconfirm_rest(props, ["prefixCls", "placement", "trigger", "okType", "icon", "children", "overlayClassName", "onOpenChange", "onVisibleChange", "overlayStyle", "styles", "classNames"]);
const {
getPrefixCls,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = (0,config_provider_context.useComponentConfig)('popconfirm');
const [open, setOpen] = (0,useMergedState["default"])(false, {
value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,
defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible
});
const settingOpen = (value, e) => {
setOpen(value, true);
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(value);
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);
};
const close = e => {
settingOpen(false, e);
};
const onConfirm = e => {
var _a;
return (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
};
const onCancel = e => {
var _a;
settingOpen(false, e);
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
};
const onInternalOpenChange = (value, e) => {
const {
disabled = false
} = props;
if (disabled) {
return;
}
settingOpen(value, e);
};
const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
const rootClassNames = classnames_default()(prefixCls, contextClassName, overlayClassName, contextClassNames.root, popconfirmClassNames === null || popconfirmClassNames === void 0 ? void 0 : popconfirmClassNames.root);
const bodyClassNames = classnames_default()(contextClassNames.body, popconfirmClassNames === null || popconfirmClassNames === void 0 ? void 0 : popconfirmClassNames.body);
const [wrapCSSVar] = (0,popconfirm_style["default"])(prefixCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(popover, Object.assign({}, (0,omit["default"])(restProps, ['title']), {
trigger: trigger,
placement: placement,
onOpenChange: onInternalOpenChange,
open: open,
ref: ref,
classNames: {
root: rootClassNames,
body: bodyClassNames
},
styles: {
root: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
body: Object.assign(Object.assign({}, contextStyles.body), styles === null || styles === void 0 ? void 0 : styles.body)
},
content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PurePanel_Overlay, Object.assign({
okType: okType,
icon: icon
}, props, {
prefixCls: prefixCls,
close: close,
onConfirm: onConfirm,
onCancel: onCancel
})),
"data-popover-inject": true
}), children));
});
const Popconfirm = InternalPopconfirm;
// We don't care debug panel
/* istanbul ignore next */
Popconfirm._InternalPanelDoNotUseOrYouWillBeFired = popconfirm_PurePanel;
if (true) {
Popconfirm.displayName = 'Popconfirm';
}
/* harmony default export */ var popconfirm = (Popconfirm);
;// ./node_modules/rc-progress/es/common.js
var common_defaultProps = {
percent: 0,
prefixCls: 'rc-progress',
strokeColor: '#2db7f5',
strokeLinecap: 'round',
strokeWidth: 1,
trailColor: '#D9D9D9',
trailWidth: 1,
gapPosition: 'bottom'
};
var useTransitionDuration = function useTransitionDuration() {
var pathsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
var prevTimeStamp = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var now = Date.now();
var updated = false;
pathsRef.current.forEach(function (path) {
if (!path) {
return;
}
updated = true;
var pathStyle = path.style;
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
if (prevTimeStamp.current && now - prevTimeStamp.current < 100) {
pathStyle.transitionDuration = '0s, 0s';
}
});
if (updated) {
prevTimeStamp.current = Date.now();
}
});
return pathsRef.current;
};
;// ./node_modules/rc-progress/es/Line.js
var Line_excluded = ["className", "percent", "prefixCls", "strokeColor", "strokeLinecap", "strokeWidth", "style", "trailColor", "trailWidth", "transition"];
var Line = function Line(props) {
var _defaultProps$props = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common_defaultProps), props),
className = _defaultProps$props.className,
percent = _defaultProps$props.percent,
prefixCls = _defaultProps$props.prefixCls,
strokeColor = _defaultProps$props.strokeColor,
strokeLinecap = _defaultProps$props.strokeLinecap,
strokeWidth = _defaultProps$props.strokeWidth,
style = _defaultProps$props.style,
trailColor = _defaultProps$props.trailColor,
trailWidth = _defaultProps$props.trailWidth,
transition = _defaultProps$props.transition,
restProps = (0,objectWithoutProperties["default"])(_defaultProps$props, Line_excluded);
// eslint-disable-next-line no-param-reassign
delete restProps.gapPosition;
var percentList = Array.isArray(percent) ? percent : [percent];
var strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor];
var paths = useTransitionDuration();
var center = strokeWidth / 2;
var right = 100 - strokeWidth / 2;
var pathString = "M ".concat(strokeLinecap === 'round' ? center : 0, ",").concat(center, "\n L ").concat(strokeLinecap === 'round' ? right : 100, ",").concat(center);
var viewBoxString = "0 0 100 ".concat(strokeWidth);
var stackPtg = 0;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", (0,esm_extends["default"])({
className: classnames_default()("".concat(prefixCls, "-line"), className),
viewBox: viewBoxString,
preserveAspectRatio: "none",
style: style
}, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
className: "".concat(prefixCls, "-line-trail"),
d: pathString,
strokeLinecap: strokeLinecap,
stroke: trailColor,
strokeWidth: trailWidth || strokeWidth,
fillOpacity: "0"
}), percentList.map(function (ptg, index) {
var dashPercent = 1;
switch (strokeLinecap) {
case 'round':
dashPercent = 1 - strokeWidth / 100;
break;
case 'square':
dashPercent = 1 - strokeWidth / 2 / 100;
break;
default:
dashPercent = 1;
break;
}
var pathStyle = {
strokeDasharray: "".concat(ptg * dashPercent, "px, 100px"),
strokeDashoffset: "-".concat(stackPtg, "px"),
transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear'
};
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
stackPtg += ptg;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
key: index,
className: "".concat(prefixCls, "-line-path"),
d: pathString,
strokeLinecap: strokeLinecap,
stroke: color,
strokeWidth: strokeWidth,
fillOpacity: "0",
ref: function ref(elem) {
// https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
// React will call the ref callback with the DOM element when the component mounts,
// and call it with `null` when it unmounts.
// Refs are guaranteed to be up-to-date before componentDidMount or componentDidUpdate fires.
paths[index] = elem;
},
style: pathStyle
});
}));
};
if (true) {
Line.displayName = 'Line';
}
/* harmony default export */ var es_Line = (Line);
;// ./node_modules/rc-progress/es/hooks/useId.js
var es_hooks_useId_uuid = 0;
/** Is client side and not jsdom */
var hooks_useId_isBrowserClient = true && (0,canUseDom["default"])();
/** Get unique id for accessibility usage */
function useId_getUUID() {
var retId;
// Test never reach
/* istanbul ignore if */
if (hooks_useId_isBrowserClient) {
retId = es_hooks_useId_uuid;
es_hooks_useId_uuid += 1;
} else {
retId = 'TEST_OR_SSR';
}
return retId;
}
/* harmony default export */ var es_hooks_useId = (function (id) {
// Inner id for accessibility usage. Only work in client side
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
innerId = _React$useState2[0],
setInnerId = _React$useState2[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
setInnerId("rc_progress_".concat(useId_getUUID()));
}, []);
return id || innerId;
});
;// ./node_modules/rc-progress/es/Circle/PtgCircle.js
var Block = function Block(_ref) {
var bg = _ref.bg,
children = _ref.children;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
width: '100%',
height: '100%',
background: bg
}
}, children);
};
function getPtgColors(color, scale) {
return Object.keys(color).map(function (key) {
var parsedKey = parseFloat(key);
var ptgKey = "".concat(Math.floor(parsedKey * scale), "%");
return "".concat(color[key], " ").concat(ptgKey);
});
}
var PtgCircle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
color = props.color,
gradientId = props.gradientId,
radius = props.radius,
circleStyleForStack = props.style,
ptg = props.ptg,
strokeLinecap = props.strokeLinecap,
strokeWidth = props.strokeWidth,
size = props.size,
gapDegree = props.gapDegree;
var isGradient = color && (0,esm_typeof["default"])(color) === 'object';
var stroke = isGradient ? "#FFF" : undefined;
// ========================== Circle ==========================
var halfSize = size / 2;
var circleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
className: "".concat(prefixCls, "-circle-path"),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: stroke,
strokeLinecap: strokeLinecap,
strokeWidth: strokeWidth,
opacity: ptg === 0 ? 0 : 1,
style: circleStyleForStack,
ref: ref
});
// ========================== Render ==========================
if (!isGradient) {
return circleNode;
}
var maskId = "".concat(gradientId, "-conic");
var fromDeg = gapDegree ? "".concat(180 + gapDegree / 2, "deg") : '0deg';
var conicColors = getPtgColors(color, (360 - gapDegree) / 360);
var linearColors = getPtgColors(color, 1);
var conicColorBg = "conic-gradient(from ".concat(fromDeg, ", ").concat(conicColors.join(', '), ")");
var linearColorBg = "linear-gradient(to ".concat(gapDegree ? 'bottom' : 'top', ", ").concat(linearColors.join(', '), ")");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("mask", {
id: maskId
}, circleNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("foreignObject", {
x: 0,
y: 0,
width: size,
height: size,
mask: "url(#".concat(maskId, ")")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Block, {
bg: linearColorBg
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Block, {
bg: conicColorBg
}))));
});
if (true) {
PtgCircle.displayName = 'PtgCircle';
}
/* harmony default export */ var Circle_PtgCircle = (PtgCircle);
;// ./node_modules/rc-progress/es/Circle/util.js
var VIEW_BOX_SIZE = 100;
var getCircleStyle = function getCircleStyle(perimeter, perimeterWithoutGap, offset, percent, rotateDeg, gapDegree, gapPosition, strokeColor, strokeLinecap, strokeWidth) {
var stepSpace = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
var offsetDeg = offset / 100 * 360 * ((360 - gapDegree) / 360);
var positionDeg = gapDegree === 0 ? 0 : {
bottom: 0,
top: 180,
left: 90,
right: -90
}[gapPosition];
var strokeDashoffset = (100 - percent) / 100 * perimeterWithoutGap;
// Fix percent accuracy when strokeLinecap is round
// https://github.com/ant-design/ant-design/issues/35009
if (strokeLinecap === 'round' && percent !== 100) {
strokeDashoffset += strokeWidth / 2;
// when percent is small enough (<= 1%), keep smallest value to avoid it's disappearance
if (strokeDashoffset >= perimeterWithoutGap) {
strokeDashoffset = perimeterWithoutGap - 0.01;
}
}
var halfSize = VIEW_BOX_SIZE / 2;
return {
stroke: typeof strokeColor === 'string' ? strokeColor : undefined,
strokeDasharray: "".concat(perimeterWithoutGap, "px ").concat(perimeter),
strokeDashoffset: strokeDashoffset + stepSpace,
transform: "rotate(".concat(rotateDeg + offsetDeg + positionDeg, "deg)"),
transformOrigin: "".concat(halfSize, "px ").concat(halfSize, "px"),
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s',
fillOpacity: 0
};
};
;// ./node_modules/rc-progress/es/Circle/index.js
var Circle_excluded = ["id", "prefixCls", "steps", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor", "percent"];
function Circle_toArray(value) {
var mergedValue = value !== null && value !== void 0 ? value : [];
return Array.isArray(mergedValue) ? mergedValue : [mergedValue];
}
var Circle = function Circle(props) {
var _defaultProps$props = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common_defaultProps), props),
id = _defaultProps$props.id,
prefixCls = _defaultProps$props.prefixCls,
steps = _defaultProps$props.steps,
strokeWidth = _defaultProps$props.strokeWidth,
trailWidth = _defaultProps$props.trailWidth,
_defaultProps$props$g = _defaultProps$props.gapDegree,
gapDegree = _defaultProps$props$g === void 0 ? 0 : _defaultProps$props$g,
gapPosition = _defaultProps$props.gapPosition,
trailColor = _defaultProps$props.trailColor,
strokeLinecap = _defaultProps$props.strokeLinecap,
style = _defaultProps$props.style,
className = _defaultProps$props.className,
strokeColor = _defaultProps$props.strokeColor,
percent = _defaultProps$props.percent,
restProps = (0,objectWithoutProperties["default"])(_defaultProps$props, Circle_excluded);
var halfSize = VIEW_BOX_SIZE / 2;
var mergedId = es_hooks_useId(id);
var gradientId = "".concat(mergedId, "-gradient");
var radius = halfSize - strokeWidth / 2;
var perimeter = Math.PI * 2 * radius;
var rotateDeg = gapDegree > 0 ? 90 + gapDegree / 2 : -90;
var perimeterWithoutGap = perimeter * ((360 - gapDegree) / 360);
var _ref = (0,esm_typeof["default"])(steps) === 'object' ? steps : {
count: steps,
gap: 2
},
stepCount = _ref.count,
stepGap = _ref.gap;
var percentList = Circle_toArray(percent);
var strokeColorList = Circle_toArray(strokeColor);
var gradient = strokeColorList.find(function (color) {
return color && (0,esm_typeof["default"])(color) === 'object';
});
var isConicGradient = gradient && (0,esm_typeof["default"])(gradient) === 'object';
var mergedStrokeLinecap = isConicGradient ? 'butt' : strokeLinecap;
var circleStyle = getCircleStyle(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, trailColor, mergedStrokeLinecap, strokeWidth);
var paths = useTransitionDuration();
var getStokeList = function getStokeList() {
var stackPtg = 0;
return percentList.map(function (ptg, index) {
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
var circleStyleForStack = getCircleStyle(perimeter, perimeterWithoutGap, stackPtg, ptg, rotateDeg, gapDegree, gapPosition, color, mergedStrokeLinecap, strokeWidth);
stackPtg += ptg;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Circle_PtgCircle, {
key: index,
color: color,
ptg: ptg,
radius: radius,
prefixCls: prefixCls,
gradientId: gradientId,
style: circleStyleForStack,
strokeLinecap: mergedStrokeLinecap,
strokeWidth: strokeWidth,
gapDegree: gapDegree,
ref: function ref(elem) {
// https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
// React will call the ref callback with the DOM element when the component mounts,
// and call it with `null` when it unmounts.
// Refs are guaranteed to be up-to-date before componentDidMount or componentDidUpdate fires.
paths[index] = elem;
},
size: VIEW_BOX_SIZE
});
}).reverse();
};
var getStepStokeList = function getStepStokeList() {
// only show the first percent when pass steps
var current = Math.round(stepCount * (percentList[0] / 100));
var stepPtg = 100 / stepCount;
var stackPtg = 0;
return new Array(stepCount).fill(null).map(function (_, index) {
var color = index <= current - 1 ? strokeColorList[0] : trailColor;
var stroke = color && (0,esm_typeof["default"])(color) === 'object' ? "url(#".concat(gradientId, ")") : undefined;
var circleStyleForStack = getCircleStyle(perimeter, perimeterWithoutGap, stackPtg, stepPtg, rotateDeg, gapDegree, gapPosition, color, 'butt', strokeWidth, stepGap);
stackPtg += (perimeterWithoutGap - circleStyleForStack.strokeDashoffset + stepGap) * 100 / perimeterWithoutGap;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
key: index,
className: "".concat(prefixCls, "-circle-path"),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: stroke,
strokeWidth: strokeWidth,
opacity: 1,
style: circleStyleForStack,
ref: function ref(elem) {
paths[index] = elem;
}
});
});
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", (0,esm_extends["default"])({
className: classnames_default()("".concat(prefixCls, "-circle"), className),
viewBox: "0 0 ".concat(VIEW_BOX_SIZE, " ").concat(VIEW_BOX_SIZE),
style: style,
id: id,
role: "presentation"
}, restProps), !stepCount && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
className: "".concat(prefixCls, "-circle-trail"),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: trailColor,
strokeLinecap: mergedStrokeLinecap,
strokeWidth: trailWidth || strokeWidth,
style: circleStyle
}), stepCount ? getStepStokeList() : getStokeList());
};
if (true) {
Circle.displayName = 'Circle';
}
/* harmony default export */ var es_Circle = (Circle);
;// ./node_modules/rc-progress/es/index.js
/* harmony default export */ var rc_progress_es = ({
Line: es_Line,
Circle: es_Circle
});
;// ./components/progress/utils.ts
function validProgress(progress) {
if (!progress || progress < 0) {
return 0;
}
if (progress > 100) {
return 100;
}
return progress;
}
function getSuccessPercent(_ref) {
let {
success,
successPercent
} = _ref;
let percent = successPercent;
/** @deprecated Use `percent` instead */
if (success && 'progress' in success) {
percent = success.progress;
}
if (success && 'percent' in success) {
percent = success.percent;
}
return percent;
}
const getPercentage = _ref2 => {
let {
percent,
success,
successPercent
} = _ref2;
const realSuccessPercent = validProgress(getSuccessPercent({
success,
successPercent
}));
return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];
};
const getStrokeColor = _ref3 => {
let {
success = {},
strokeColor
} = _ref3;
const {
strokeColor: successColor
} = success;
return [successColor || colors_es.presetPrimaryColors.green, strokeColor || null];
};
const utils_getSize = (size, type, extra) => {
var _a, _b, _c, _d;
let width = -1;
let height = -1;
if (type === 'step') {
const steps = extra.steps;
const strokeWidth = extra.strokeWidth;
if (typeof size === 'string' || typeof size === 'undefined') {
width = size === 'small' ? 2 : 14;
height = strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : 8;
} else if (typeof size === 'number') {
[width, height] = [size, size];
} else {
[width = 14, height = 8] = Array.isArray(size) ? size : [size.width, size.height];
}
width *= steps;
} else if (type === 'line') {
const strokeWidth = extra === null || extra === void 0 ? void 0 : extra.strokeWidth;
if (typeof size === 'string' || typeof size === 'undefined') {
height = strokeWidth || (size === 'small' ? 6 : 8);
} else if (typeof size === 'number') {
[width, height] = [size, size];
} else {
[width = -1, height = 8] = Array.isArray(size) ? size : [size.width, size.height];
}
} else if (type === 'circle' || type === 'dashboard') {
if (typeof size === 'string' || typeof size === 'undefined') {
[width, height] = size === 'small' ? [60, 60] : [120, 120];
} else if (typeof size === 'number') {
[width, height] = [size, size];
} else if (Array.isArray(size)) {
width = (_b = (_a = size[0]) !== null && _a !== void 0 ? _a : size[1]) !== null && _b !== void 0 ? _b : 120;
height = (_d = (_c = size[0]) !== null && _c !== void 0 ? _c : size[1]) !== null && _d !== void 0 ? _d : 120;
}
}
return [width, height];
};
;// ./components/progress/Circle.tsx
const CIRCLE_MIN_STROKE_WIDTH = 3;
const getMinPercent = width => CIRCLE_MIN_STROKE_WIDTH / width * 100;
const Circle_Circle = props => {
const {
prefixCls,
trailColor = null,
strokeLinecap = 'round',
gapPosition,
gapDegree,
width: originWidth = 120,
type,
children,
success,
size = originWidth,
steps
} = props;
const [width, height] = utils_getSize(size, 'circle');
let {
strokeWidth
} = props;
if (strokeWidth === undefined) {
strokeWidth = Math.max(getMinPercent(width), 6);
}
const circleStyle = {
width,
height,
fontSize: width * 0.15 + 6
};
const realGapDegree = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
// Support gapDeg = 0 when type = 'dashboard'
if (gapDegree || gapDegree === 0) {
return gapDegree;
}
if (type === 'dashboard') {
return 75;
}
return undefined;
}, [gapDegree, type]);
const percentArray = getPercentage(props);
const gapPos = gapPosition || type === 'dashboard' && 'bottom' || undefined;
// using className to style stroke color
const isGradient = Object.prototype.toString.call(props.strokeColor) === '[object Object]';
const strokeColor = getStrokeColor({
success,
strokeColor: props.strokeColor
});
const wrapperClassName = classnames_default()(`${prefixCls}-inner`, {
[`${prefixCls}-circle-gradient`]: isGradient
});
const circleContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Circle, {
steps: steps,
percent: steps ? percentArray[1] : percentArray,
strokeWidth: strokeWidth,
trailWidth: strokeWidth,
strokeColor: steps ? strokeColor[1] : strokeColor,
strokeLinecap: strokeLinecap,
trailColor: trailColor,
prefixCls: prefixCls,
gapDegree: realGapDegree,
gapPosition: gapPos
});
const smallCircle = width <= 20;
const node = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: wrapperClassName,
style: circleStyle
}, circleContent, !smallCircle && children);
if (smallCircle) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
title: children
}, node);
}
return node;
};
/* harmony default export */ var progress_Circle = (Circle_Circle);
// EXTERNAL MODULE: ./components/progress/style/index.ts
var progress_style = __webpack_require__("./components/progress/style/index.ts");
;// ./components/progress/Line.tsx
var Line_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;
};
/**
* @example
* {
* "0%": "#afc163",
* "75%": "#009900",
* "50%": "green", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
* "25%": "#66FF00",
* "100%": "#ffffff"
* }
*/
const sortGradient = gradients => {
let tempArr = [];
Object.keys(gradients).forEach(key => {
const formattedKey = parseFloat(key.replace(/%/g, ''));
if (!Number.isNaN(formattedKey)) {
tempArr.push({
key: formattedKey,
value: gradients[key]
});
}
});
tempArr = tempArr.sort((a, b) => a.key - b.key);
return tempArr.map(_ref => {
let {
key,
value
} = _ref;
return `${value} ${key}%`;
}).join(', ');
};
/**
* Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and
* butter, there is the bug. And... Besides women, there is the code.
*
* @example
* {
* "0%": "#afc163",
* "25%": "#66FF00",
* "50%": "#00CC00", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
* "75%": "#009900", // #00CC00 50%, #009900 75%, #ffffff 100%)
* "100%": "#ffffff"
* }
*/
const handleGradient = (strokeColor, directionConfig) => {
const {
from = colors_es.presetPrimaryColors.blue,
to = colors_es.presetPrimaryColors.blue,
direction = directionConfig === 'rtl' ? 'to left' : 'to right'
} = strokeColor,
rest = Line_rest(strokeColor, ["from", "to", "direction"]);
if (Object.keys(rest).length !== 0) {
const sortedGradients = sortGradient(rest);
const background = `linear-gradient(${direction}, ${sortedGradients})`;
return {
background,
[progress_style.LineStrokeColorVar]: background
};
}
const background = `linear-gradient(${direction}, ${from}, ${to})`;
return {
background,
[progress_style.LineStrokeColorVar]: background
};
};
const Line_Line = props => {
const {
prefixCls,
direction: directionConfig,
percent,
size,
strokeWidth,
strokeColor,
strokeLinecap = 'round',
children,
trailColor = null,
percentPosition,
success
} = props;
const {
align: infoAlign,
type: infoPosition
} = percentPosition;
const backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : {
[progress_style.LineStrokeColorVar]: strokeColor,
background: strokeColor
};
const borderRadius = strokeLinecap === 'square' || strokeLinecap === 'butt' ? 0 : undefined;
const mergedSize = size !== null && size !== void 0 ? size : [-1, strokeWidth || (size === 'small' ? 6 : 8)];
const [width, height] = utils_getSize(mergedSize, 'line', {
strokeWidth
});
if (true) {
const warning = (0,_util_warning.devUseWarning)('Progress');
warning.deprecated(!('strokeWidth' in props), 'strokeWidth', 'size');
}
const trailStyle = {
backgroundColor: trailColor || undefined,
borderRadius
};
const percentStyle = Object.assign(Object.assign({
width: `${validProgress(percent)}%`,
height,
borderRadius
}, backgroundProps), {
[progress_style.Percent]: validProgress(percent) / 100
});
const successPercent = getSuccessPercent(props);
const successPercentStyle = {
width: `${validProgress(successPercent)}%`,
height,
borderRadius,
backgroundColor: success === null || success === void 0 ? void 0 : success.strokeColor
};
const outerStyle = {
width: width < 0 ? '100%' : width
};
const lineInner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-inner`,
style: trailStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-bg`, `${prefixCls}-bg-${infoPosition}`),
style: percentStyle
}, infoPosition === 'inner' && children), successPercent !== undefined && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-success-bg`,
style: successPercentStyle
})));
const isOuterStart = infoPosition === 'outer' && infoAlign === 'start';
const isOuterEnd = infoPosition === 'outer' && infoAlign === 'end';
return infoPosition === 'outer' && infoAlign === 'center' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-layout-bottom`
}, lineInner, children)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-outer`,
style: outerStyle
}, isOuterStart && children, lineInner, isOuterEnd && children));
};
/* harmony default export */ var progress_Line = (Line_Line);
;// ./components/progress/Steps.tsx
const Steps_Steps = props => {
const {
size,
steps,
rounding: customRounding = Math.round,
percent = 0,
strokeWidth = 8,
strokeColor,
trailColor = null,
prefixCls,
children
} = props;
const current = customRounding(steps * (percent / 100));
const stepWidth = size === 'small' ? 2 : 14;
const mergedSize = size !== null && size !== void 0 ? size : [stepWidth, strokeWidth];
const [width, height] = utils_getSize(mergedSize, 'step', {
steps,
strokeWidth
});
const unitWidth = width / steps;
const styledSteps = Array.from({
length: steps
});
for (let i = 0; i < steps; i++) {
const color = Array.isArray(strokeColor) ? strokeColor[i] : strokeColor;
styledSteps[i] = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
key: i,
className: classnames_default()(`${prefixCls}-steps-item`, {
[`${prefixCls}-steps-item-active`]: i <= current - 1
}),
style: {
backgroundColor: i <= current - 1 ? color : trailColor,
width: unitWidth,
height
}
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-steps-outer`
}, styledSteps, children);
};
/* harmony default export */ var progress_Steps = (Steps_Steps);
;// ./components/progress/progress.tsx
var progress_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;
};
const ProgressTypes = ['line', 'circle', 'dashboard'];
const ProgressStatuses = ['normal', 'exception', 'active', 'success'];
const progress_Progress = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
steps,
strokeColor,
percent = 0,
size = 'default',
showInfo = true,
type = 'line',
status,
format,
style,
percentPosition = {}
} = props,
restProps = progress_rest(props, ["prefixCls", "className", "rootClassName", "steps", "strokeColor", "percent", "size", "showInfo", "type", "status", "format", "style", "percentPosition"]);
const {
align: infoAlign = 'end',
type: infoPosition = 'outer'
} = percentPosition;
const strokeColorNotArray = Array.isArray(strokeColor) ? strokeColor[0] : strokeColor;
const strokeColorNotGradient = typeof strokeColor === 'string' || Array.isArray(strokeColor) ? strokeColor : undefined;
const strokeColorIsBright = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (strokeColorNotArray) {
const color = typeof strokeColorNotArray === 'string' ? strokeColorNotArray : Object.values(strokeColorNotArray)[0];
return new fast_color_es.FastColor(color).isLight();
}
return false;
}, [strokeColor]);
const percentNumber = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b;
const successPercent = getSuccessPercent(props);
return parseInt(successPercent !== undefined ? (_a = successPercent !== null && successPercent !== void 0 ? successPercent : 0) === null || _a === void 0 ? void 0 : _a.toString() : (_b = percent !== null && percent !== void 0 ? percent : 0) === null || _b === void 0 ? void 0 : _b.toString(), 10);
}, [percent, props.success, props.successPercent]);
const progressStatus = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!ProgressStatuses.includes(status) && percentNumber >= 100) {
return 'success';
}
return status || 'normal';
}, [status, percentNumber]);
const {
getPrefixCls,
direction,
progress: progressStyle
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('progress', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,progress_style["default"])(prefixCls);
const isLineType = type === 'line';
const isPureLineType = isLineType && !steps;
const progressInfo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!showInfo) {
return null;
}
const successPercent = getSuccessPercent(props);
let text;
const textFormatter = format || (number => `${number}%`);
const isBrightInnerColor = isLineType && strokeColorIsBright && infoPosition === 'inner';
if (infoPosition === 'inner' || format || progressStatus !== 'exception' && progressStatus !== 'success') {
text = textFormatter(validProgress(percent), validProgress(successPercent));
} else if (progressStatus === 'exception') {
text = isLineType ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null);
} else if (progressStatus === 'success') {
text = isLineType ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, null);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(`${prefixCls}-text`, {
[`${prefixCls}-text-bright`]: isBrightInnerColor,
[`${prefixCls}-text-${infoAlign}`]: isPureLineType,
[`${prefixCls}-text-${infoPosition}`]: isPureLineType
}),
title: typeof text === 'string' ? text : undefined
}, text);
}, [showInfo, percent, percentNumber, progressStatus, type, prefixCls, format]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Progress');
warning.deprecated(!('successPercent' in props), 'successPercent', 'success.percent');
warning.deprecated(!('width' in props), 'width', 'size');
if (type === 'circle' || type === 'dashboard') {
if (Array.isArray(size)) {
true ? warning(false, 'usage', 'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.') : 0;
} else if (typeof size === 'object') {
true ? warning(false, 'usage', 'Type "circle" and "dashboard" do not accept object as `size`, please use number or preset size instead.') : 0;
}
}
if (props.success && 'progress' in props.success) {
warning.deprecated(false, 'success.progress', 'success.percent');
}
}
let progress;
// Render progress shape
if (type === 'line') {
progress = steps ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(progress_Steps, Object.assign({}, props, {
strokeColor: strokeColorNotGradient,
prefixCls: prefixCls,
steps: typeof steps === 'object' ? steps.count : steps
}), progressInfo)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(progress_Line, Object.assign({}, props, {
strokeColor: strokeColorNotArray,
prefixCls: prefixCls,
direction: direction,
percentPosition: {
align: infoAlign,
type: infoPosition
}
}), progressInfo));
} else if (type === 'circle' || type === 'dashboard') {
progress = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(progress_Circle, Object.assign({}, props, {
strokeColor: strokeColorNotArray,
prefixCls: prefixCls,
progressStatus: progressStatus
}), progressInfo);
}
const classString = classnames_default()(prefixCls, `${prefixCls}-status-${progressStatus}`, {
[`${prefixCls}-${type === 'dashboard' && 'circle' || type}`]: type !== 'line',
[`${prefixCls}-inline-circle`]: type === 'circle' && utils_getSize(size, 'circle')[0] <= 20,
[`${prefixCls}-line`]: isPureLineType,
[`${prefixCls}-line-align-${infoAlign}`]: isPureLineType,
[`${prefixCls}-line-position-${infoPosition}`]: isPureLineType,
[`${prefixCls}-steps`]: steps,
[`${prefixCls}-show-info`]: showInfo,
[`${prefixCls}-${size}`]: typeof size === 'string',
[`${prefixCls}-rtl`]: direction === 'rtl'
}, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.className, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
ref: ref,
style: Object.assign(Object.assign({}, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.style), style),
className: classString,
role: "progressbar",
"aria-valuenow": percentNumber,
"aria-valuemin": 0,
"aria-valuemax": 100
}, (0,omit["default"])(restProps, ['trailColor', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeLinecap', 'success', 'successPercent'])), progress));
});
if (true) {
progress_Progress.displayName = 'Progress';
}
/* harmony default export */ var progress = (progress_Progress);
;// ./components/progress/index.tsx
/* harmony default export */ var components_progress = (progress);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
;// ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
function _createForOfIteratorHelper(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (!t) {
if (Array.isArray(r) || (t = (0,unsupportedIterableToArray["default"])(r)) || e && r && "number" == typeof r.length) {
t && (r = t);
var _n = 0,
F = function F() {};
return {
s: F,
n: function n() {
return _n >= r.length ? {
done: !0
} : {
done: !1,
value: r[_n++]
};
},
e: function e(r) {
throw r;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var o,
a = !0,
u = !1;
return {
s: function s() {
t = t.call(r);
},
n: function n() {
var r = t.next();
return a = r.done, r;
},
e: function e(r) {
u = !0, o = r;
},
f: function f() {
try {
a || null == t["return"] || t["return"]();
} finally {
if (u) throw o;
}
}
};
}
;// ./node_modules/@rc-component/qrcode/es/libs/qrcodegen.js
var _class, _class2;
// Copyright (c) Project Nayuki. (MIT License)
// https://www.nayuki.io/page/qr-code-generator-library
// Modification with code reorder and prettier
// --------------------------------------------
// Appends the given number of low-order bits of the given value
// to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.
function appendBits(val, len, bb) {
if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError('Value out of range');
for (var i = len - 1; i >= 0; i-- // Append bit by bit
) bb.push(val >>> i & 1);
}
// Returns true iff the i'th bit of x is set to 1.
function getBit(x, i) {
return (x >>> i & 1) != 0;
}
// Throws an exception if the given condition is false.
function assert(cond) {
if (!cond) throw new Error('Assertion error');
}
/*---- Public helper enumeration ----*/
/*
* Describes how a segment's data bits are numbererpreted. Immutable.
*/
var Mode = /*#__PURE__*/function () {
function Mode(modeBits, numBitsCharCount) {
(0,classCallCheck["default"])(this, Mode);
/*-- Constructor and fields --*/
// The mode indicator bits, which is a unumber4 value (range 0 to 15).
(0,defineProperty["default"])(this, "modeBits", void 0);
// Number of character count bits for three different version ranges.
(0,defineProperty["default"])(this, "numBitsCharCount", void 0);
this.modeBits = modeBits;
this.numBitsCharCount = numBitsCharCount;
}
/*-- Method --*/
// (Package-private) Returns the bit width of the character count field for a segment in
// this mode in a QR Code at the given version number. The result is in the range [0, 16].
(0,createClass["default"])(Mode, [{
key: "numCharCountBits",
value: function numCharCountBits(ver) {
return this.numBitsCharCount[Math.floor((ver + 7) / 17)];
}
}]);
return Mode;
}();
/*---- Public helper enumeration ----*/
/*
* The error correction level in a QR Code symbol. Immutable.
*/
_class = Mode;
/*-- Constants --*/
(0,defineProperty["default"])(Mode, "NUMERIC", new _class(0x1, [10, 12, 14]));
(0,defineProperty["default"])(Mode, "ALPHANUMERIC", new _class(0x2, [9, 11, 13]));
(0,defineProperty["default"])(Mode, "BYTE", new _class(0x4, [8, 16, 16]));
(0,defineProperty["default"])(Mode, "KANJI", new _class(0x8, [8, 10, 12]));
(0,defineProperty["default"])(Mode, "ECI", new _class(0x7, [0, 0, 0]));
var Ecc = /*#__PURE__*/(0,createClass["default"])(function Ecc(ordinal, formatBits) {
(0,classCallCheck["default"])(this, Ecc);
// The QR Code can tolerate about 30% erroneous codewords
/*-- Constructor and fields --*/
// In the range 0 to 3 (unsigned 2-bit numbereger).
(0,defineProperty["default"])(this, "ordinal", void 0);
// (Package-private) In the range 0 to 3 (unsigned 2-bit numbereger).
(0,defineProperty["default"])(this, "formatBits", void 0);
this.ordinal = ordinal;
this.formatBits = formatBits;
});
/*
* A segment of character/binary/control data in a QR Code symbol.
* Instances of this class are immutable.
* The mid-level way to create a segment is to take the payload data
* and call a static factory function such as QrSegment.makeNumeric().
* The low-level way to create a segment is to custom-make the bit buffer
* and call the QrSegment() constructor with appropriate values.
* This segment class imposes no length restrictions, but QR Codes have restrictions.
* Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
* Any segment longer than this is meaningless for the purpose of generating QR Codes.
*/
_class2 = Ecc;
/*-- Constants --*/
(0,defineProperty["default"])(Ecc, "LOW", new _class2(0, 1));
// The QR Code can tolerate about 7% erroneous codewords
(0,defineProperty["default"])(Ecc, "MEDIUM", new _class2(1, 0));
// The QR Code can tolerate about 15% erroneous codewords
(0,defineProperty["default"])(Ecc, "QUARTILE", new _class2(2, 3));
// The QR Code can tolerate about 25% erroneous codewords
(0,defineProperty["default"])(Ecc, "HIGH", new _class2(3, 2));
var QrSegment = /*#__PURE__*/function () {
// Creates a new QR Code segment with the given attributes and data.
// The character count (numChars) must agree with the mode and the bit buffer length,
// but the constranumber isn't checked. The given bit buffer is cloned and stored.
function QrSegment(mode, numChars, bitData) {
(0,classCallCheck["default"])(this, QrSegment);
/*-- Constructor (low level) and fields --*/
// The mode indicator of this segment.
(0,defineProperty["default"])(this, "mode", void 0);
// The length of this segment's unencoded data. Measured in characters for
// numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
// Always zero or positive. Not the same as the data's bit length.
(0,defineProperty["default"])(this, "numChars", void 0);
// The data bits of this segment. Accessed through getData().
(0,defineProperty["default"])(this, "bitData", void 0);
this.mode = mode;
this.numChars = numChars;
this.bitData = bitData;
if (numChars < 0) throw new RangeError('Invalid argument');
this.bitData = bitData.slice(); // Make defensive copy
}
/*-- Methods --*/
// Returns a new copy of the data bits of this segment.
(0,createClass["default"])(QrSegment, [{
key: "getData",
value: function getData() {
return this.bitData.slice(); // Make defensive copy
}
// (Package-private) Calculates and returns the number of bits needed to encode the given segments at
// the given version. The result is infinity if a segment has too many characters to fit its length field.
}], [{
key: "makeBytes",
value: /*-- Static factory functions (mid level) --*/
// Returns a segment representing the given binary data encoded in
// byte mode. All input byte arrays are acceptable. Any text string
// can be converted to UTF-8 bytes and encoded as a byte mode segment.
function makeBytes(data) {
var bb = [];
var _iterator = _createForOfIteratorHelper(data),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var b = _step.value;
appendBits(b, 8, bb);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return new QrSegment(Mode.BYTE, data.length, bb);
}
// Returns a segment representing the given string of decimal digits encoded in numeric mode.
}, {
key: "makeNumeric",
value: function makeNumeric(digits) {
if (!QrSegment.isNumeric(digits)) throw new RangeError('String contains non-numeric characters');
var bb = [];
for (var i = 0; i < digits.length;) {
// Consume up to 3 digits per iteration
var n = Math.min(digits.length - i, 3);
appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);
i += n;
}
return new QrSegment(Mode.NUMERIC, digits.length, bb);
}
// Returns a segment representing the given text string encoded in alphanumeric mode.
// The characters allowed are: 0 to 9, A to Z (uppercase only), space,
// dollar, percent, asterisk, plus, hyphen, period, slash, colon.
}, {
key: "makeAlphanumeric",
value: function makeAlphanumeric(text) {
if (!QrSegment.isAlphanumeric(text)) throw new RangeError('String contains unencodable characters in alphanumeric mode');
var bb = [];
var i;
for (i = 0; i + 2 <= text.length; i += 2) {
// Process groups of 2
var temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;
temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));
appendBits(temp, 11, bb);
}
if (i < text.length)
// 1 character remaining
appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);
return new QrSegment(Mode.ALPHANUMERIC, text.length, bb);
}
// Returns a new mutable list of zero or more segments to represent the given Unicode text string.
// The result may use various segment modes and switch modes to optimize the length of the bit stream.
}, {
key: "makeSegments",
value: function makeSegments(text) {
// Select the most efficient segment encoding automatically
if (text == '') return [];else if (QrSegment.isNumeric(text)) return [QrSegment.makeNumeric(text)];else if (QrSegment.isAlphanumeric(text)) return [QrSegment.makeAlphanumeric(text)];else return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];
}
// Returns a segment representing an Extended Channel Interpretation
// (ECI) designator with the given assignment value.
}, {
key: "makeEci",
value: function makeEci(assignVal) {
var bb = [];
if (assignVal < 0) throw new RangeError('ECI assignment value out of range');else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);else if (assignVal < 1 << 14) {
appendBits(2, 2, bb);
appendBits(assignVal, 14, bb);
} else if (assignVal < 1000000) {
appendBits(6, 3, bb);
appendBits(assignVal, 21, bb);
} else throw new RangeError('ECI assignment value out of range');
return new QrSegment(Mode.ECI, 0, bb);
}
// Tests whether the given string can be encoded as a segment in numeric mode.
// A string is encodable iff each character is in the range 0 to 9.
}, {
key: "isNumeric",
value: function isNumeric(text) {
return QrSegment.NUMERIC_REGEX.test(text);
}
// Tests whether the given string can be encoded as a segment in alphanumeric mode.
// A string is encodable iff each character is in the following set: 0 to 9, A to Z
// (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
}, {
key: "isAlphanumeric",
value: function isAlphanumeric(text) {
return QrSegment.ALPHANUMERIC_REGEX.test(text);
}
}, {
key: "getTotalBits",
value: function getTotalBits(segs, version) {
var result = 0;
var _iterator2 = _createForOfIteratorHelper(segs),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var seg = _step2.value;
var ccbits = seg.mode.numCharCountBits(version);
if (seg.numChars >= 1 << ccbits) return Infinity; // The segment's length doesn't fit the field's bit width
result += 4 + ccbits + seg.bitData.length;
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
return result;
}
// Returns a new array of bytes representing the given string encoded in UTF-8.
}, {
key: "toUtf8ByteArray",
value: function toUtf8ByteArray(input) {
var str = encodeURI(input);
var result = [];
for (var i = 0; i < str.length; i++) {
if (str.charAt(i) != '%') result.push(str.charCodeAt(i));else {
result.push(parseInt(str.substring(i + 1, i + 3), 16));
i += 2;
}
}
return result;
}
/*-- Constants --*/
// Describes precisely all strings that are encodable in numeric mode.
}]);
return QrSegment;
}();
/*
* A QR Code symbol, which is a type of two-dimension barcode.
* Invented by Denso Wave and described in the ISO/IEC 18004 standard.
* Instances of this class represent an immutable square grid of dark and light cells.
* The class provides static factory functions to create a QR Code from text or binary data.
* The class covers the QR Code Model 2 specification, supporting all versions (sizes)
* from 1 to 40, all 4 error correction levels, and 4 character encoding modes.
*
* Ways to create a QR Code object:
* - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().
* - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().
* - Low level: Custom-make the array of data codeword bytes (including
* segment headers and final padding, excluding error correction codewords),
* supply the appropriate version number, and call the QrCode() constructor.
* (Note that all ways require supplying the desired error correction level.)
*/
(0,defineProperty["default"])(QrSegment, "NUMERIC_REGEX", /^[0-9]*$/);
// Describes precisely all strings that are encodable in alphanumeric mode.
(0,defineProperty["default"])(QrSegment, "ALPHANUMERIC_REGEX", /^[A-Z0-9 $%*+.\/:-]*$/);
// The set of all legal characters in alphanumeric mode,
// where each character value maps to the index in the string.
(0,defineProperty["default"])(QrSegment, "ALPHANUMERIC_CHARSET", '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:');
var QrCode = /*#__PURE__*/function () {
// Creates a new QR Code with the given version number,
// error correction level, data codeword bytes, and mask number.
// This is a low-level API that most users should not use directly.
// A mid-level API is the encodeSegments() function.
function QrCode(
// The version number of this QR Code, which is between 1 and 40 (inclusive).
// This determines the size of this barcode.
version,
// The error correction level used in this QR Code.
errorCorrectionLevel, dataCodewords, oriMsk) {
(0,classCallCheck["default"])(this, QrCode);
/*-- Fields --*/
// The width and height of this QR Code, measured in modules, between
// 21 and 177 (inclusive). This is equal to version * 4 + 17.
(0,defineProperty["default"])(this, "size", void 0);
// The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).
// Even if a QR Code is created with automatic masking requested (mask = -1),
// the resulting object still has a mask value between 0 and 7.
(0,defineProperty["default"])(this, "mask", void 0);
// The modules of this QR Code (false = light, true = dark).
// Immutable after constructor finishes. Accessed through getModule().
(0,defineProperty["default"])(this, "modules", []);
// Indicates function modules that are not subjected to masking. Discarded when constructor finishes.
(0,defineProperty["default"])(this, "isFunction", []);
/*-- Constructor (low level) and fields --*/
// The version number of this QR Code, which is between 1 and 40 (inclusive).
// This determines the size of this barcode.
(0,defineProperty["default"])(this, "version", void 0);
// The error correction level used in this QR Code.
(0,defineProperty["default"])(this, "errorCorrectionLevel", void 0);
var msk = oriMsk;
this.version = version;
this.errorCorrectionLevel = errorCorrectionLevel;
// Check scalar arguments
if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION) throw new RangeError('Version value out of range');
if (msk < -1 || msk > 7) throw new RangeError('Mask value out of range');
this.size = version * 4 + 17;
// Initialize both grids to be size*size arrays of Boolean false
var row = [];
for (var i = 0; i < this.size; i++) row.push(false);
for (var _i = 0; _i < this.size; _i++) {
this.modules.push(row.slice()); // Initially all light
this.isFunction.push(row.slice());
}
// Compute ECC, draw modules
this.drawFunctionPatterns();
var allCodewords = this.addEccAndInterleave(dataCodewords);
this.drawCodewords(allCodewords);
// Do masking
if (msk == -1) {
// Automatically choose best mask
var minPenalty = 1000000000;
for (var _i2 = 0; _i2 < 8; _i2++) {
this.applyMask(_i2);
this.drawFormatBits(_i2);
var penalty = this.getPenaltyScore();
if (penalty < minPenalty) {
msk = _i2;
minPenalty = penalty;
}
this.applyMask(_i2); // Undoes the mask due to XOR
}
}
assert(0 <= msk && msk <= 7);
this.mask = msk;
this.applyMask(msk); // Apply the final choice of mask
this.drawFormatBits(msk); // Overwrite old format bits
this.isFunction = [];
}
/*-- Accessor methods --*/
// Returns the color of the module (pixel) at the given coordinates, which is false
// for light or true for dark. The top left corner has the coordinates (x=0, y=0).
// If the given coordinates are out of bounds, then false (light) is returned.
(0,createClass["default"])(QrCode, [{
key: "getModule",
value: function getModule(x, y) {
return 0 <= x && x < this.size && 0 <= y && y < this.size && this.modules[y][x];
}
// Modified to expose modules for easy access
}, {
key: "getModules",
value: function getModules() {
return this.modules;
}
/*-- Private helper methods for constructor: Drawing function modules --*/
// Reads this object's version field, and draws and marks all function modules.
}, {
key: "drawFunctionPatterns",
value: function drawFunctionPatterns() {
// Draw horizontal and vertical timing patterns
for (var i = 0; i < this.size; i++) {
this.setFunctionModule(6, i, i % 2 == 0);
this.setFunctionModule(i, 6, i % 2 == 0);
}
// Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
this.drawFinderPattern(3, 3);
this.drawFinderPattern(this.size - 4, 3);
this.drawFinderPattern(3, this.size - 4);
// Draw numerous alignment patterns
var alignPatPos = this.getAlignmentPatternPositions();
var numAlign = alignPatPos.length;
for (var _i3 = 0; _i3 < numAlign; _i3++) {
for (var j = 0; j < numAlign; j++) {
// Don't draw on the three finder corners
if (!(_i3 == 0 && j == 0 || _i3 == 0 && j == numAlign - 1 || _i3 == numAlign - 1 && j == 0)) this.drawAlignmentPattern(alignPatPos[_i3], alignPatPos[j]);
}
}
// Draw configuration data
this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor
this.drawVersion();
}
// Draws two copies of the format bits (with its own error correction code)
// based on the given mask and this object's error correction level field.
}, {
key: "drawFormatBits",
value: function drawFormatBits(mask) {
// Calculate error correction code and pack bits
var data = this.errorCorrectionLevel.formatBits << 3 | mask; // errCorrLvl is unumber2, mask is unumber3
var rem = data;
for (var i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 0x537;
var bits = (data << 10 | rem) ^ 0x5412; // unumber15
assert(bits >>> 15 == 0);
// Draw first copy
for (var _i4 = 0; _i4 <= 5; _i4++) this.setFunctionModule(8, _i4, getBit(bits, _i4));
this.setFunctionModule(8, 7, getBit(bits, 6));
this.setFunctionModule(8, 8, getBit(bits, 7));
this.setFunctionModule(7, 8, getBit(bits, 8));
for (var _i5 = 9; _i5 < 15; _i5++) this.setFunctionModule(14 - _i5, 8, getBit(bits, _i5));
// Draw second copy
for (var _i6 = 0; _i6 < 8; _i6++) this.setFunctionModule(this.size - 1 - _i6, 8, getBit(bits, _i6));
for (var _i7 = 8; _i7 < 15; _i7++) this.setFunctionModule(8, this.size - 15 + _i7, getBit(bits, _i7));
this.setFunctionModule(8, this.size - 8, true); // Always dark
}
// Draws two copies of the version bits (with its own error correction code),
// based on this object's version field, iff 7 <= version <= 40.
}, {
key: "drawVersion",
value: function drawVersion() {
if (this.version < 7) return;
// Calculate error correction code and pack bits
var rem = this.version; // version is unumber6, in the range [7, 40]
for (var i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 0x1f25;
var bits = this.version << 12 | rem; // unumber18
assert(bits >>> 18 == 0);
// Draw two copies
for (var _i8 = 0; _i8 < 18; _i8++) {
var color = getBit(bits, _i8);
var a = this.size - 11 + _i8 % 3;
var b = Math.floor(_i8 / 3);
this.setFunctionModule(a, b, color);
this.setFunctionModule(b, a, color);
}
}
// Draws a 9*9 finder pattern including the border separator,
// with the center module at (x, y). Modules can be out of bounds.
}, {
key: "drawFinderPattern",
value: function drawFinderPattern(x, y) {
for (var dy = -4; dy <= 4; dy++) {
for (var dx = -4; dx <= 4; dx++) {
var dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm
var xx = x + dx;
var yy = y + dy;
if (0 <= xx && xx < this.size && 0 <= yy && yy < this.size) this.setFunctionModule(xx, yy, dist != 2 && dist != 4);
}
}
}
// Draws a 5*5 alignment pattern, with the center module
// at (x, y). All modules must be in bounds.
}, {
key: "drawAlignmentPattern",
value: function drawAlignmentPattern(x, y) {
for (var dy = -2; dy <= 2; dy++) {
for (var dx = -2; dx <= 2; dx++) this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);
}
}
// Sets the color of a module and marks it as a function module.
// Only used by the constructor. Coordinates must be in bounds.
}, {
key: "setFunctionModule",
value: function setFunctionModule(x, y, isDark) {
this.modules[y][x] = isDark;
this.isFunction[y][x] = true;
}
/*-- Private helper methods for constructor: Codewords and masking --*/
// Returns a new byte string representing the given data with the appropriate error correction
// codewords appended to it, based on this object's version and error correction level.
}, {
key: "addEccAndInterleave",
value: function addEccAndInterleave(data) {
var ver = this.version;
var ecl = this.errorCorrectionLevel;
if (data.length != QrCode.getNumDataCodewords(ver, ecl)) throw new RangeError('Invalid argument');
// Calculate parameter numbers
var numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
var blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];
var rawCodewords = Math.floor(QrCode.getNumRawDataModules(ver) / 8);
var numShortBlocks = numBlocks - rawCodewords % numBlocks;
var shortBlockLen = Math.floor(rawCodewords / numBlocks);
// Split data numbero blocks and append ECC to each block
var blocks = [];
var rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);
for (var i = 0, k = 0; i < numBlocks; i++) {
var dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));
k += dat.length;
var ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);
if (i < numShortBlocks) dat.push(0);
blocks.push(dat.concat(ecc));
}
// Interleave (not concatenate) the bytes from every block numbero a single sequence
var result = [];
var _loop = function _loop(_i9) {
blocks.forEach(function (block, j) {
// Skip the padding byte in short blocks
if (_i9 != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[_i9]);
});
};
for (var _i9 = 0; _i9 < blocks[0].length; _i9++) {
_loop(_i9);
}
assert(result.length == rawCodewords);
return result;
}
// Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
// data area of this QR Code. Function modules need to be marked off before this is called.
}, {
key: "drawCodewords",
value: function drawCodewords(data) {
if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8)) throw new RangeError('Invalid argument');
var i = 0; // Bit index numbero the data
// Do the funny zigzag scan
for (var right = this.size - 1; right >= 1; right -= 2) {
// Index of right column in each column pair
if (right == 6) right = 5;
for (var vert = 0; vert < this.size; vert++) {
// Vertical counter
for (var j = 0; j < 2; j++) {
var x = right - j; // Actual x coordinate
var upward = (right + 1 & 2) == 0;
var y = upward ? this.size - 1 - vert : vert; // Actual y coordinate
if (!this.isFunction[y][x] && i < data.length * 8) {
this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));
i++;
}
// If this QR Code has any remainder bits (0 to 7), they were assigned as
// 0/false/light by the constructor and are left unchanged by this method
}
}
}
assert(i == data.length * 8);
}
// XORs the codeword modules in this QR Code with the given mask pattern.
// The function modules must be marked and the codeword bits must be drawn
// before masking. Due to the arithmetic of XOR, calling applyMask() with
// the same mask value a second time will undo the mask. A final well-formed
// QR Code needs exactly one (not zero, two, etc.) mask applied.
}, {
key: "applyMask",
value: function applyMask(mask) {
if (mask < 0 || mask > 7) throw new RangeError('Mask value out of range');
for (var y = 0; y < this.size; y++) {
for (var x = 0; x < this.size; x++) {
var invert = void 0;
switch (mask) {
case 0:
invert = (x + y) % 2 == 0;
break;
case 1:
invert = y % 2 == 0;
break;
case 2:
invert = x % 3 == 0;
break;
case 3:
invert = (x + y) % 3 == 0;
break;
case 4:
invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;
break;
case 5:
invert = x * y % 2 + x * y % 3 == 0;
break;
case 6:
invert = (x * y % 2 + x * y % 3) % 2 == 0;
break;
case 7:
invert = ((x + y) % 2 + x * y % 3) % 2 == 0;
break;
default:
throw new Error('Unreachable');
}
if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x];
}
}
}
// Calculates and returns the penalty score based on state of this QR Code's current modules.
// This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
}, {
key: "getPenaltyScore",
value: function getPenaltyScore() {
var result = 0;
// Adjacent modules in row having same color, and finder-like patterns
for (var y = 0; y < this.size; y++) {
var runColor = false;
var runX = 0;
var runHistory = [0, 0, 0, 0, 0, 0, 0];
for (var x = 0; x < this.size; x++) {
if (this.modules[y][x] == runColor) {
runX++;
if (runX == 5) result += QrCode.PENALTY_N1;else if (runX > 5) result++;
} else {
this.finderPenaltyAddHistory(runX, runHistory);
if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;
runColor = this.modules[y][x];
runX = 1;
}
}
result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;
}
// Adjacent modules in column having same color, and finder-like patterns
for (var _x = 0; _x < this.size; _x++) {
var _runColor = false;
var runY = 0;
var _runHistory = [0, 0, 0, 0, 0, 0, 0];
for (var _y = 0; _y < this.size; _y++) {
if (this.modules[_y][_x] == _runColor) {
runY++;
if (runY == 5) result += QrCode.PENALTY_N1;else if (runY > 5) result++;
} else {
this.finderPenaltyAddHistory(runY, _runHistory);
if (!_runColor) result += this.finderPenaltyCountPatterns(_runHistory) * QrCode.PENALTY_N3;
_runColor = this.modules[_y][_x];
runY = 1;
}
}
result += this.finderPenaltyTerminateAndCount(_runColor, runY, _runHistory) * QrCode.PENALTY_N3;
}
// 2*2 blocks of modules having same color
for (var _y2 = 0; _y2 < this.size - 1; _y2++) {
for (var _x2 = 0; _x2 < this.size - 1; _x2++) {
var color = this.modules[_y2][_x2];
if (color == this.modules[_y2][_x2 + 1] && color == this.modules[_y2 + 1][_x2] && color == this.modules[_y2 + 1][_x2 + 1]) result += QrCode.PENALTY_N2;
}
}
// Balance of dark and light modules
var dark = 0;
var _iterator3 = _createForOfIteratorHelper(this.modules),
_step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var row = _step3.value;
dark = row.reduce(function (sum, color) {
return sum + (color ? 1 : 0);
}, dark);
}
} catch (err) {
_iterator3.e(err);
} finally {
_iterator3.f();
}
var total = this.size * this.size; // Note that size is odd, so dark/total != 1/2
// Compute the smallest numbereger k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
var k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;
assert(0 <= k && k <= 9);
result += k * QrCode.PENALTY_N4;
assert(0 <= result && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4
return result;
}
/*-- Private helper functions --*/
// Returns an ascending list of positions of alignment patterns for this version number.
// Each position is in the range [0,177), and are used on both the x and y axes.
// This could be implemented as lookup table of 40 variable-length lists of numberegers.
}, {
key: "getAlignmentPatternPositions",
value: function getAlignmentPatternPositions() {
if (this.version == 1) return [];else {
var numAlign = Math.floor(this.version / 7) + 2;
var step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
var result = [6];
for (var pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);
return result;
}
}
// Returns the number of data bits that can be stored in a QR Code of the given version number, after
// all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
// The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
}, {
key: "finderPenaltyCountPatterns",
value:
// Can only be called immediately after a light run is added, and
// returns either 0, 1, or 2. A helper function for getPenaltyScore().
function finderPenaltyCountPatterns(runHistory) {
var n = runHistory[1];
assert(n <= this.size * 3);
var core = n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;
return (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) + (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0);
}
// Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().
}, {
key: "finderPenaltyTerminateAndCount",
value: function finderPenaltyTerminateAndCount(currentRunColor, oriCurrentRunLength, runHistory) {
var currentRunLength = oriCurrentRunLength;
if (currentRunColor) {
// Terminate dark run
this.finderPenaltyAddHistory(currentRunLength, runHistory);
currentRunLength = 0;
}
currentRunLength += this.size; // Add light border to final run
this.finderPenaltyAddHistory(currentRunLength, runHistory);
return this.finderPenaltyCountPatterns(runHistory);
}
// Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
}, {
key: "finderPenaltyAddHistory",
value: function finderPenaltyAddHistory(oriCurrentRunLength, runHistory) {
var currentRunLength = oriCurrentRunLength;
if (runHistory[0] == 0) currentRunLength += this.size; // Add light border to initial run
runHistory.pop();
runHistory.unshift(currentRunLength);
}
/*-- Constants and tables --*/
// The minimum version number supported in the QR Code Model 2 standard.
}], [{
key: "encodeText",
value: /*-- Static factory functions (high level) --*/
// Returns a QR Code representing the given Unicode text string at the given error correction level.
// As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer
// Unicode code ponumbers (not UTF-16 code units) if the low error correction level is used. The smallest possible
// QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the
// ecl argument if it can be done without increasing the version.
function encodeText(text, ecl) {
var segs = QrSegment.makeSegments(text);
return QrCode.encodeSegments(segs, ecl);
}
// Returns a QR Code representing the given binary data at the given error correction level.
// This function always encodes using the binary segment mode, not any text mode. The maximum number of
// bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.
// The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
}, {
key: "encodeBinary",
value: function encodeBinary(data, ecl) {
var seg = QrSegment.makeBytes(data);
return QrCode.encodeSegments([seg], ecl);
}
/*-- Static factory functions (mid level) --*/
// Returns a QR Code representing the given segments with the given encoding parameters.
// The smallest possible QR Code version within the given range is automatically
// chosen for the output. Iff boostEcl is true, then the ECC level of the result
// may be higher than the ecl argument if it can be done without increasing the
// version. The mask number is either between 0 to 7 (inclusive) to force that
// mask, or -1 to automatically choose an appropriate mask (which may be slow).
// This function allows the user to create a custom sequence of segments that switches
// between modes (such as alphanumeric and byte) to encode text in less space.
// This is a mid-level API; the high-level API is encodeText() and encodeBinary().
}, {
key: "encodeSegments",
value: function encodeSegments(segs, oriEcl) {
var minVersion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var maxVersion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 40;
var mask = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
var boostEcl = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) || mask < -1 || mask > 7) throw new RangeError('Invalid value');
// Find the minimal version number to use
var version;
var dataUsedBits;
for (version = minVersion;; version++) {
var _dataCapacityBits = QrCode.getNumDataCodewords(version, oriEcl) * 8; // Number of data bits available
var usedBits = QrSegment.getTotalBits(segs, version);
if (usedBits <= _dataCapacityBits) {
dataUsedBits = usedBits;
break; // This version number is found to be suitable
}
if (version >= maxVersion)
// All versions in the range could not fit the given data
throw new RangeError('Data too long');
}
var ecl = oriEcl;
// Increase the error correction level while the data still fits in the current version number
for (var _i10 = 0, _arr = [Ecc.MEDIUM, Ecc.QUARTILE, Ecc.HIGH]; _i10 < _arr.length; _i10++) {
var newEcl = _arr[_i10];
// From low to high
if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8) ecl = newEcl;
}
// Concatenate all segments to create the data bit string
var bb = [];
var _iterator4 = _createForOfIteratorHelper(segs),
_step4;
try {
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
var seg = _step4.value;
appendBits(seg.mode.modeBits, 4, bb);
appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
var _iterator5 = _createForOfIteratorHelper(seg.getData()),
_step5;
try {
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
var b = _step5.value;
bb.push(b);
}
} catch (err) {
_iterator5.e(err);
} finally {
_iterator5.f();
}
}
} catch (err) {
_iterator4.e(err);
} finally {
_iterator4.f();
}
assert(bb.length == dataUsedBits);
// Add terminator and pad up to a byte if applicable
var dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;
assert(bb.length <= dataCapacityBits);
appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);
appendBits(0, (8 - bb.length % 8) % 8, bb);
assert(bb.length % 8 == 0);
// Pad with alternating bytes until data capacity is reached
for (var padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11) appendBits(padByte, 8, bb);
// Pack bits numbero bytes in big endian
var dataCodewords = [];
while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);
bb.forEach(function (b, i) {
return dataCodewords[i >>> 3] |= b << 7 - (i & 7);
});
// Create the QR Code object
return new QrCode(version, ecl, dataCodewords, mask);
}
}, {
key: "getNumRawDataModules",
value: function getNumRawDataModules(ver) {
if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) throw new RangeError('Version number out of range');
var result = (16 * ver + 128) * ver + 64;
if (ver >= 2) {
var numAlign = Math.floor(ver / 7) + 2;
result -= (25 * numAlign - 10) * numAlign - 55;
if (ver >= 7) result -= 36;
}
assert(208 <= result && result <= 29648);
return result;
}
// Returns the number of 8-bit data (i.e. not error correction) codewords contained in any
// QR Code of the given version number and error correction level, with remainder bits discarded.
// This stateless pure function could be implemented as a (40*4)-cell lookup table.
}, {
key: "getNumDataCodewords",
value: function getNumDataCodewords(ver, ecl) {
return Math.floor(QrCode.getNumRawDataModules(ver) / 8) - QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
}
// Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
// implemented as a lookup table over all possible parameter values, instead of as an algorithm.
}, {
key: "reedSolomonComputeDivisor",
value: function reedSolomonComputeDivisor(degree) {
if (degree < 1 || degree > 255) throw new RangeError('Degree out of range');
// Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.
// For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the unumber8 array [255, 8, 93].
var result = [];
for (var i = 0; i < degree - 1; i++) result.push(0);
result.push(1); // Start off with the monomial x^0
// Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),
// and drop the highest monomial term which is always 1x^degree.
// Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
var root = 1;
for (var _i11 = 0; _i11 < degree; _i11++) {
// Multiply the current product by (x - r^i)
for (var j = 0; j < result.length; j++) {
result[j] = QrCode.reedSolomonMultiply(result[j], root);
if (j + 1 < result.length) result[j] ^= result[j + 1];
}
root = QrCode.reedSolomonMultiply(root, 0x02);
}
return result;
}
// Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
}, {
key: "reedSolomonComputeRemainder",
value: function reedSolomonComputeRemainder(data, divisor) {
var result = divisor.map(function () {
return 0;
});
var _iterator6 = _createForOfIteratorHelper(data),
_step6;
try {
var _loop2 = function _loop2() {
var b = _step6.value;
// Polynomial division
var factor = b ^ result.shift();
result.push(0);
divisor.forEach(function (coef, i) {
return result[i] ^= QrCode.reedSolomonMultiply(coef, factor);
});
};
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
_loop2();
}
} catch (err) {
_iterator6.e(err);
} finally {
_iterator6.f();
}
return result;
}
// Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
// are unsigned 8-bit numberegers. This could be implemented as a lookup table of 256*256 entries of unumber8.
}, {
key: "reedSolomonMultiply",
value: function reedSolomonMultiply(x, y) {
if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError('Byte out of range');
// Russian peasant multiplication
var z = 0;
for (var i = 7; i >= 0; i--) {
z = z << 1 ^ (z >>> 7) * 0x11d;
z ^= (y >>> i & 1) * x;
}
assert(z >>> 8 == 0);
return z;
}
}]);
return QrCode;
}();
(0,defineProperty["default"])(QrCode, "MIN_VERSION", 1);
// The maximum version number supported in the QR Code Model 2 standard.
(0,defineProperty["default"])(QrCode, "MAX_VERSION", 40);
// For use in getPenaltyScore(), when evaluating which mask is best.
(0,defineProperty["default"])(QrCode, "PENALTY_N1", 3);
(0,defineProperty["default"])(QrCode, "PENALTY_N2", 3);
(0,defineProperty["default"])(QrCode, "PENALTY_N3", 40);
(0,defineProperty["default"])(QrCode, "PENALTY_N4", 10);
(0,defineProperty["default"])(QrCode, "ECC_CODEWORDS_PER_BLOCK", [
// Version: (note that index 0 is for padding, and is set to an illegal value)
//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
[-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
// Low
[-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
// Medium
[-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
// Quartile
[-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30] // High
]);
(0,defineProperty["default"])(QrCode, "NUM_ERROR_CORRECTION_BLOCKS", [
// Version: (note that index 0 is for padding, and is set to an illegal value)
//0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
[-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],
// Low
[-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],
// Medium
[-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68],
// Quartile
[-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81] // High
]);
;// ./node_modules/@rc-component/qrcode/es/utils.js
// Part logic is from `qrcode.react`. (ISC License)
// https://github.com/zpao/qrcode.react
// ==========================================================
// =================== ERROR_LEVEL ==========================
var ERROR_LEVEL_MAP = {
L: Ecc.LOW,
M: Ecc.MEDIUM,
Q: Ecc.QUARTILE,
H: Ecc.HIGH
};
// =================== DEFAULT_VALUE ==========================
var utils_DEFAULT_SIZE = 128;
var DEFAULT_LEVEL = 'L';
var DEFAULT_BACKGROUND_COLOR = '#FFFFFF';
var DEFAULT_FRONT_COLOR = '#000000';
var DEFAULT_NEED_MARGIN = false;
var DEFAULT_MINVERSION = 1;
var SPEC_MARGIN_SIZE = 4;
var DEFAULT_MARGIN_SIZE = 0;
var DEFAULT_IMG_SCALE = 0.1;
// =================== UTILS ==========================
/**
* Generate a path string from modules
* @param modules
* @param margin
* @returns
*/
function generatePath(modules) {
var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var ops = [];
modules.forEach(function (row, y) {
var start = null;
row.forEach(function (cell, x) {
if (!cell && start !== null) {
ops.push("M".concat(start + margin, " ").concat(y + margin, "h").concat(x - start, "v1H").concat(start + margin, "z"));
start = null;
return;
}
if (x === row.length - 1) {
if (!cell) {
return;
}
if (start === null) {
ops.push("M".concat(x + margin, ",").concat(y + margin, " h1v1H").concat(x + margin, "z"));
} else {
ops.push("M".concat(start + margin, ",").concat(y + margin, " h").concat(x + 1 - start, "v1H").concat(start + margin, "z"));
}
return;
}
if (cell && start === null) {
start = x;
}
});
});
return ops.join('');
}
/**
* Excavate modules
* @param modules
* @param excavation
* @returns
*/
function excavateModules(modules, excavation) {
return modules.slice().map(function (row, y) {
if (y < excavation.y || y >= excavation.y + excavation.h) {
return row;
}
return row.map(function (cell, x) {
if (x < excavation.x || x >= excavation.x + excavation.w) {
return cell;
}
return false;
});
});
}
/**
* Get image settings
* @param cells The modules of the QR code
* @param size The size of the QR code
* @param margin
* @param imageSettings
* @returns
*/
function getImageSettings(cells, size, margin, imageSettings) {
if (imageSettings == null) {
return null;
}
var numCells = cells.length + margin * 2;
var defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);
var scale = numCells / size;
var w = (imageSettings.width || defaultSize) * scale;
var h = (imageSettings.height || defaultSize) * scale;
var x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;
var y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;
var opacity = imageSettings.opacity == null ? 1 : imageSettings.opacity;
var excavation = null;
if (imageSettings.excavate) {
var floorX = Math.floor(x);
var floorY = Math.floor(y);
var ceilW = Math.ceil(w + x - floorX);
var ceilH = Math.ceil(h + y - floorY);
excavation = {
x: floorX,
y: floorY,
w: ceilW,
h: ceilH
};
}
var crossOrigin = imageSettings.crossOrigin;
return {
x: x,
y: y,
h: h,
w: w,
excavation: excavation,
opacity: opacity,
crossOrigin: crossOrigin
};
}
/**
* Get margin size
* @param needMargin Whether need margin
* @param marginSize Custom margin size
* @returns
*/
function getMarginSize(needMargin, marginSize) {
if (marginSize != null) {
return Math.floor(marginSize);
}
return needMargin ? SPEC_MARGIN_SIZE : DEFAULT_MARGIN_SIZE;
}
/**
* Check if Path2D is supported
*/
var isSupportPath2d = function () {
try {
new Path2D().addPath(new Path2D());
} catch (e) {
return false;
}
return true;
}();
;// ./node_modules/@rc-component/qrcode/es/hooks/useQRCode.js
function useQRCode(_ref) {
var value = _ref.value,
level = _ref.level,
minVersion = _ref.minVersion,
includeMargin = _ref.includeMargin,
marginSize = _ref.marginSize,
imageSettings = _ref.imageSettings,
size = _ref.size;
var qrcode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var segments = QrSegment.makeSegments(value);
return QrCode.encodeSegments(segments, ERROR_LEVEL_MAP[level], minVersion);
}, [value, level, minVersion]);
var _useMemo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var cs = qrcode.getModules();
var mg = getMarginSize(includeMargin, marginSize);
var ncs = cs.length + mg * 2;
var cis = getImageSettings(cs, size, mg, imageSettings);
return {
cells: cs,
margin: mg,
numCells: ncs,
calculatedImageSettings: cis
};
}, [qrcode, size, imageSettings, includeMargin, marginSize]),
cells = _useMemo.cells,
margin = _useMemo.margin,
numCells = _useMemo.numCells,
calculatedImageSettings = _useMemo.calculatedImageSettings;
return {
qrcode: qrcode,
margin: margin,
cells: cells,
numCells: numCells,
calculatedImageSettings: calculatedImageSettings
};
}
;// ./node_modules/@rc-component/qrcode/es/QRCodeCanvas.js
var QRCodeCanvas_excluded = ["value", "size", "level", "bgColor", "fgColor", "includeMargin", "minVersion", "marginSize", "style", "imageSettings"];
var QRCodeCanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function QRCodeCanvas(props, forwardedRef) {
var value = props.value,
_props$size = props.size,
size = _props$size === void 0 ? utils_DEFAULT_SIZE : _props$size,
_props$level = props.level,
level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,
_props$bgColor = props.bgColor,
bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,
_props$fgColor = props.fgColor,
fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,
_props$includeMargin = props.includeMargin,
includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,
_props$minVersion = props.minVersion,
minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,
marginSize = props.marginSize,
style = props.style,
imageSettings = props.imageSettings,
otherProps = (0,objectWithoutProperties["default"])(props, QRCodeCanvas_excluded);
var imgSrc = imageSettings === null || imageSettings === void 0 ? void 0 : imageSettings.src;
var _canvas = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var _image = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var setCanvasRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) {
_canvas.current = node;
if (typeof forwardedRef === 'function') {
forwardedRef(node);
} else if (forwardedRef) {
forwardedRef.current = node;
}
}, [forwardedRef]);
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
setIsImageLoaded = _useState2[1];
var _useQRCode = useQRCode({
value: value,
level: level,
minVersion: minVersion,
includeMargin: includeMargin,
marginSize: marginSize,
imageSettings: imageSettings,
size: size
}),
margin = _useQRCode.margin,
cells = _useQRCode.cells,
numCells = _useQRCode.numCells,
calculatedImageSettings = _useQRCode.calculatedImageSettings;
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (_canvas.current != null) {
var canvas = _canvas.current;
var ctx = canvas.getContext('2d');
if (!ctx) {
return;
}
var cellsToDraw = cells;
var image = _image.current;
var haveImageToRender = calculatedImageSettings != null && image !== null && image.complete && image.naturalHeight !== 0 && image.naturalWidth !== 0;
if (haveImageToRender) {
if (calculatedImageSettings.excavation != null) {
cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);
}
}
var pixelRatio = window.devicePixelRatio || 1;
canvas.height = canvas.width = size * pixelRatio;
var scale = size / numCells * pixelRatio;
ctx.scale(scale, scale);
ctx.fillStyle = bgColor;
ctx.fillRect(0, 0, numCells, numCells);
ctx.fillStyle = fgColor;
if (isSupportPath2d) {
ctx.fill(new Path2D(generatePath(cellsToDraw, margin)));
} else {
cells.forEach(function (row, rdx) {
row.forEach(function (cell, cdx) {
if (cell) {
ctx.fillRect(cdx + margin, rdx + margin, 1, 1);
}
});
});
}
if (calculatedImageSettings) {
ctx.globalAlpha = calculatedImageSettings.opacity;
}
if (haveImageToRender) {
ctx.drawImage(image, calculatedImageSettings.x + margin, calculatedImageSettings.y + margin, calculatedImageSettings.w, calculatedImageSettings.h);
}
}
});
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
setIsImageLoaded(false);
}, [imgSrc]);
var canvasStyle = (0,objectSpread2["default"])({
height: size,
width: size
}, style);
var img = null;
if (imgSrc != null) {
img = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("img", {
src: imgSrc,
key: imgSrc,
style: {
display: 'none'
},
onLoad: function onLoad() {
setIsImageLoaded(true);
},
ref: _image
// when crossOrigin is not set, the image will be tainted
// and the canvas cannot be exported to an image
,
crossOrigin: calculatedImageSettings === null || calculatedImageSettings === void 0 ? void 0 : calculatedImageSettings.crossOrigin
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("canvas", (0,esm_extends["default"])({
style: canvasStyle,
height: size,
width: size,
ref: setCanvasRef,
role: "img"
}, otherProps)), img);
});
QRCodeCanvas.displayName = 'QRCodeCanvas';
;// ./node_modules/@rc-component/qrcode/es/QRCodeSVG.js
var QRCodeSVG_excluded = ["value", "size", "level", "bgColor", "fgColor", "includeMargin", "minVersion", "title", "marginSize", "imageSettings"];
var QRCodeSVG = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function QRCodeSVG(props, forwardedRef) {
var value = props.value,
_props$size = props.size,
size = _props$size === void 0 ? utils_DEFAULT_SIZE : _props$size,
_props$level = props.level,
level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,
_props$bgColor = props.bgColor,
bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,
_props$fgColor = props.fgColor,
fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,
_props$includeMargin = props.includeMargin,
includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,
_props$minVersion = props.minVersion,
minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,
title = props.title,
marginSize = props.marginSize,
imageSettings = props.imageSettings,
otherProps = (0,objectWithoutProperties["default"])(props, QRCodeSVG_excluded);
var _useQRCode = useQRCode({
value: value,
level: level,
minVersion: minVersion,
includeMargin: includeMargin,
marginSize: marginSize,
imageSettings: imageSettings,
size: size
}),
margin = _useQRCode.margin,
cells = _useQRCode.cells,
numCells = _useQRCode.numCells,
calculatedImageSettings = _useQRCode.calculatedImageSettings;
var cellsToDraw = cells;
var image = null;
if (imageSettings != null && calculatedImageSettings != null) {
if (calculatedImageSettings.excavation != null) {
cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);
}
image = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("image", {
href: imageSettings.src,
height: calculatedImageSettings.h,
width: calculatedImageSettings.w,
x: calculatedImageSettings.x + margin,
y: calculatedImageSettings.y + margin,
preserveAspectRatio: "none",
opacity: calculatedImageSettings.opacity
// when crossOrigin is not set, the image will be tainted
// and the canvas cannot be exported to an image
,
crossOrigin: calculatedImageSettings.crossOrigin
});
}
var fgPath = generatePath(cellsToDraw, margin);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", (0,esm_extends["default"])({
height: size,
width: size,
viewBox: "0 0 ".concat(numCells, " ").concat(numCells),
ref: forwardedRef,
role: "img"
}, otherProps), !!title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("title", null, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
fill: bgColor,
d: "M0,0 h".concat(numCells, "v").concat(numCells, "H0z"),
shapeRendering: "crispEdges"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
fill: fgColor,
d: fgPath,
shapeRendering: "crispEdges"
}), image);
});
QRCodeSVG.displayName = 'QRCodeSVG';
;// ./node_modules/@rc-component/qrcode/es/index.js
;// ./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js
// This icon file is generated automatically.
var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
;// ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_ReloadOutlined
}));
};
/** */
var ReloadOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ReloadOutlined_ReloadOutlined);
if (true) {
ReloadOutlined_RefIcon.displayName = 'ReloadOutlined';
}
/* harmony default export */ var icons_ReloadOutlined = (ReloadOutlined_RefIcon);
;// ./components/qr-code/QrcodeStatus.tsx
const defaultSpin = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(spin, null);
function QRcodeStatus(_ref) {
let {
prefixCls,
locale,
onRefresh,
statusRender,
status
} = _ref;
const defaultExpiredNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("p", {
className: `${prefixCls}-expired`
}, locale === null || locale === void 0 ? void 0 : locale.expired), onRefresh && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, {
type: "link",
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_ReloadOutlined, null),
onClick: onRefresh
}, locale === null || locale === void 0 ? void 0 : locale.refresh)));
const defaultScannedNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("p", {
className: `${prefixCls}-scanned`
}, locale === null || locale === void 0 ? void 0 : locale.scanned);
const defaultNodes = {
expired: defaultExpiredNode,
loading: defaultSpin,
scanned: defaultScannedNode
};
const defaultStatusRender = info => defaultNodes[info.status];
const mergedStatusRender = statusRender !== null && statusRender !== void 0 ? statusRender : defaultStatusRender;
return mergedStatusRender({
status,
locale,
onRefresh
});
}
// EXTERNAL MODULE: ./components/qr-code/style/index.ts
var qr_code_style = __webpack_require__("./components/qr-code/style/index.ts");
;// ./components/qr-code/index.tsx
var qr_code_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;
};
const QRCode = props => {
var _a, _b, _c, _d;
const [, token] = (0,useToken["default"])();
const {
value,
type = 'canvas',
icon = '',
size = 160,
iconSize,
color = token.colorText,
errorLevel = 'M',
status = 'active',
bordered = true,
onRefresh,
style,
className,
rootClassName,
prefixCls: customizePrefixCls,
bgColor = 'transparent',
statusRender
} = props,
rest = qr_code_rest(props, ["value", "type", "icon", "size", "iconSize", "color", "errorLevel", "status", "bordered", "onRefresh", "style", "className", "rootClassName", "prefixCls", "bgColor", "statusRender"]);
const {
getPrefixCls
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('qrcode', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,qr_code_style["default"])(prefixCls);
const imageSettings = {
src: icon,
x: undefined,
y: undefined,
height: typeof iconSize === 'number' ? iconSize : (_a = iconSize === null || iconSize === void 0 ? void 0 : iconSize.height) !== null && _a !== void 0 ? _a : 40,
width: typeof iconSize === 'number' ? iconSize : (_b = iconSize === null || iconSize === void 0 ? void 0 : iconSize.width) !== null && _b !== void 0 ? _b : 40,
excavate: true,
crossOrigin: 'anonymous'
};
const a11yProps = (0,pickAttrs["default"])(rest, true);
const restProps = (0,omit["default"])(rest, Object.keys(a11yProps));
const qrCodeProps = Object.assign({
value,
size,
level: errorLevel,
bgColor,
fgColor: color,
style: {
width: style === null || style === void 0 ? void 0 : style.width,
height: style === null || style === void 0 ? void 0 : style.height
},
imageSettings: icon ? imageSettings : undefined
}, a11yProps);
const [locale] = (0,useLocale["default"])('QRCode');
if (true) {
const warning = (0,_util_warning.devUseWarning)('QRCode');
true ? warning(!!value, 'usage', 'need to receive `value` props') : 0;
true ? warning(!(icon && errorLevel === 'L'), 'usage', 'ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.') : 0;
}
if (!value) {
return null;
}
const mergedCls = classnames_default()(prefixCls, className, rootClassName, hashId, cssVarCls, {
[`${prefixCls}-borderless`]: !bordered
});
const mergedStyle = Object.assign(Object.assign({
backgroundColor: bgColor
}, style), {
width: (_c = style === null || style === void 0 ? void 0 : style.width) !== null && _c !== void 0 ? _c : size,
height: (_d = style === null || style === void 0 ? void 0 : style.height) !== null && _d !== void 0 ? _d : size
});
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({}, restProps, {
className: mergedCls,
style: mergedStyle
}), status !== 'active' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-mask`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(QRcodeStatus, {
prefixCls: prefixCls,
locale: locale,
status: status,
onRefresh: onRefresh,
statusRender: statusRender
}))), type === 'canvas' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(QRCodeCanvas, Object.assign({}, qrCodeProps)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(QRCodeSVG, Object.assign({}, qrCodeProps))));
};
if (true) {
QRCode.displayName = 'QRCode';
}
/* harmony default export */ var qr_code = (QRCode);
;// ./components/radio/index.tsx
const radio_Radio = radio_radio;
radio_Radio.Button = radioButton;
radio_Radio.Group = group;
radio_Radio.__ANT_RADIO = true;
/* harmony default export */ var components_radio = (radio_Radio);
;// ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js
// This icon file is generated automatically.
var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" };
/* harmony default export */ var asn_StarFilled = (StarFilled);
;// ./node_modules/@ant-design/icons/es/icons/StarFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var StarFilled_StarFilled = function StarFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_StarFilled
}));
};
/** */
var StarFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(StarFilled_StarFilled);
if (true) {
StarFilled_RefIcon.displayName = 'StarFilled';
}
/* harmony default export */ var icons_StarFilled = (StarFilled_RefIcon);
;// ./node_modules/rc-rate/es/Star.js
function Star(props, ref) {
var disabled = props.disabled,
prefixCls = props.prefixCls,
character = props.character,
characterRender = props.characterRender,
index = props.index,
count = props.count,
value = props.value,
allowHalf = props.allowHalf,
focused = props.focused,
onHover = props.onHover,
onClick = props.onClick;
// =========================== Events ===========================
var onInternalHover = function onInternalHover(e) {
onHover(e, index);
};
var onInternalClick = function onInternalClick(e) {
onClick(e, index);
};
var onInternalKeyDown = function onInternalKeyDown(e) {
if (e.keyCode === KeyCode["default"].ENTER) {
onClick(e, index);
}
};
// =========================== Render ===========================
// >>>>> ClassName
var starValue = index + 1;
var classNameList = new Set([prefixCls]);
// TODO: Current we just refactor from CC to FC. This logic seems can be optimized.
if (value === 0 && index === 0 && focused) {
classNameList.add("".concat(prefixCls, "-focused"));
} else if (allowHalf && value + 0.5 >= starValue && value < starValue) {
classNameList.add("".concat(prefixCls, "-half"));
classNameList.add("".concat(prefixCls, "-active"));
if (focused) {
classNameList.add("".concat(prefixCls, "-focused"));
}
} else {
if (starValue <= value) {
classNameList.add("".concat(prefixCls, "-full"));
} else {
classNameList.add("".concat(prefixCls, "-zero"));
}
if (starValue === value && focused) {
classNameList.add("".concat(prefixCls, "-focused"));
}
}
// >>>>> Node
var characterNode = typeof character === 'function' ? character(props) : character;
var start = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
className: classnames_default()(Array.from(classNameList)),
ref: ref
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
onClick: disabled ? null : onInternalClick,
onKeyDown: disabled ? null : onInternalKeyDown,
onMouseMove: disabled ? null : onInternalHover,
role: "radio",
"aria-checked": value > index ? 'true' : 'false',
"aria-posinset": index + 1,
"aria-setsize": count,
tabIndex: disabled ? -1 : 0
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-first")
}, characterNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-second")
}, characterNode)));
if (characterRender) {
start = characterRender(start, props);
}
return start;
}
/* harmony default export */ var es_Star = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Star));
;// ./node_modules/rc-rate/es/useRefs.js
function useRefs() {
var nodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
function getRef(index) {
return nodeRef.current[index];
}
function setRef(index) {
return function (node) {
nodeRef.current[index] = node;
};
}
return [getRef, setRef];
}
;// ./node_modules/rc-rate/es/util.js
function es_util_getScroll(w) {
var ret = w.pageXOffset;
var method = 'scrollLeft';
if (typeof ret !== 'number') {
var d = w.document;
// ie6,7,8 standard mode
ret = d.documentElement[method];
if (typeof ret !== 'number') {
// quirks mode
ret = d.body[method];
}
}
return ret;
}
function getClientPosition(elem) {
var x;
var y;
var doc = elem.ownerDocument;
var body = doc.body;
var docElem = doc && doc.documentElement;
var box = elem.getBoundingClientRect();
x = box.left;
y = box.top;
x -= docElem.clientLeft || body.clientLeft || 0;
y -= docElem.clientTop || body.clientTop || 0;
return {
left: x,
top: y
};
}
function getOffsetLeft(el) {
var pos = getClientPosition(el);
var doc = el.ownerDocument;
// Only IE use `parentWindow`
var w = doc.defaultView || doc.parentWindow;
pos.left += es_util_getScroll(w);
return pos.left;
}
;// ./node_modules/rc-rate/es/Rate.js
var Rate_excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "keyboard", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"];
function Rate(props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls,
className = props.className,
defaultValue = props.defaultValue,
propValue = props.value,
_props$count = props.count,
count = _props$count === void 0 ? 5 : _props$count,
_props$allowHalf = props.allowHalf,
allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf,
_props$allowClear = props.allowClear,
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
_props$character = props.character,
character = _props$character === void 0 ? '★' : _props$character,
characterRender = props.characterRender,
disabled = props.disabled,
_props$direction = props.direction,
direction = _props$direction === void 0 ? 'ltr' : _props$direction,
_props$tabIndex = props.tabIndex,
tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
autoFocus = props.autoFocus,
onHoverChange = props.onHoverChange,
onChange = props.onChange,
onFocus = props.onFocus,
onBlur = props.onBlur,
onKeyDown = props.onKeyDown,
onMouseLeave = props.onMouseLeave,
restProps = (0,objectWithoutProperties["default"])(props, Rate_excluded);
var _useRefs = useRefs(),
_useRefs2 = (0,slicedToArray["default"])(_useRefs, 2),
getStarRef = _useRefs2[0],
setStarRef = _useRefs2[1];
var rateRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
// ============================ Ref =============================
var triggerFocus = function triggerFocus() {
if (!disabled) {
var _rateRef$current;
(_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 || _rateRef$current.focus();
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
return {
focus: triggerFocus,
blur: function blur() {
if (!disabled) {
var _rateRef$current2;
(_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 || _rateRef$current2.blur();
}
}
};
});
// =========================== Value ============================
var _useMergedState = (0,useMergedState["default"])(defaultValue || 0, {
value: propValue
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
value = _useMergedState2[0],
setValue = _useMergedState2[1];
var _useMergedState3 = (0,useMergedState["default"])(null),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
cleanedValue = _useMergedState4[0],
setCleanedValue = _useMergedState4[1];
var getStarValue = function getStarValue(index, x) {
var reverse = direction === 'rtl';
var starValue = index + 1;
if (allowHalf) {
var starEle = getStarRef(index);
var leftDis = getOffsetLeft(starEle);
var width = starEle.clientWidth;
if (reverse && x - leftDis > width / 2) {
starValue -= 0.5;
} else if (!reverse && x - leftDis < width / 2) {
starValue -= 0.5;
}
}
return starValue;
};
// >>>>> Change
var changeValue = function changeValue(nextValue) {
setValue(nextValue);
onChange === null || onChange === void 0 || onChange(nextValue);
};
// =========================== Focus ============================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
focused = _React$useState2[0],
setFocused = _React$useState2[1];
var onInternalFocus = function onInternalFocus() {
setFocused(true);
onFocus === null || onFocus === void 0 || onFocus();
};
var onInternalBlur = function onInternalBlur() {
setFocused(false);
onBlur === null || onBlur === void 0 || onBlur();
};
// =========================== Hover ============================
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
hoverValue = _React$useState4[0],
setHoverValue = _React$useState4[1];
var onHover = function onHover(event, index) {
var nextHoverValue = getStarValue(index, event.pageX);
if (nextHoverValue !== cleanedValue) {
setHoverValue(nextHoverValue);
setCleanedValue(null);
}
onHoverChange === null || onHoverChange === void 0 || onHoverChange(nextHoverValue);
};
var onMouseLeaveCallback = function onMouseLeaveCallback(event) {
if (!disabled) {
setHoverValue(null);
setCleanedValue(null);
onHoverChange === null || onHoverChange === void 0 || onHoverChange(undefined);
}
if (event) {
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(event);
}
};
// =========================== Click ============================
var onClick = function onClick(event, index) {
var newValue = getStarValue(index, event.pageX);
var isReset = false;
if (allowClear) {
isReset = newValue === value;
}
onMouseLeaveCallback();
changeValue(isReset ? 0 : newValue);
setCleanedValue(isReset ? newValue : null);
};
var onInternalKeyDown = function onInternalKeyDown(event) {
var keyCode = event.keyCode;
var reverse = direction === 'rtl';
var step = allowHalf ? 0.5 : 1;
if (keyboard) {
if (keyCode === KeyCode["default"].RIGHT && value < count && !reverse) {
changeValue(value + step);
event.preventDefault();
} else if (keyCode === KeyCode["default"].LEFT && value > 0 && !reverse) {
changeValue(value - step);
event.preventDefault();
} else if (keyCode === KeyCode["default"].RIGHT && value > 0 && reverse) {
changeValue(value - step);
event.preventDefault();
} else if (keyCode === KeyCode["default"].LEFT && value < count && reverse) {
changeValue(value + step);
event.preventDefault();
}
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
};
// =========================== Effect ===========================
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
if (autoFocus && !disabled) {
triggerFocus();
}
}, []);
// =========================== Render ===========================
// >>> Star
var starNodes = new Array(count).fill(0).map(function (item, index) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Star, {
ref: setStarRef(index),
index: index,
count: count,
disabled: disabled,
prefixCls: "".concat(prefixCls, "-star"),
allowHalf: allowHalf,
value: hoverValue === null ? value : hoverValue,
onClick: onClick,
onHover: onHover,
key: item || index,
character: character,
characterRender: characterRender,
focused: focused
});
});
var classString = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-rtl"), direction === 'rtl'));
// >>> Node
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", (0,esm_extends["default"])({
className: classString,
onMouseLeave: onMouseLeaveCallback,
tabIndex: disabled ? -1 : tabIndex,
onFocus: disabled ? null : onInternalFocus,
onBlur: disabled ? null : onInternalBlur,
onKeyDown: disabled ? null : onInternalKeyDown,
ref: rateRef
}, (0,pickAttrs["default"])(restProps, {
aria: true,
data: true,
attr: true
})), starNodes);
}
/* harmony default export */ var es_Rate = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Rate));
;// ./node_modules/rc-rate/es/index.js
/* harmony default export */ var rc_rate_es = (es_Rate);
// EXTERNAL MODULE: ./components/rate/style/index.ts
var rate_style = __webpack_require__("./components/rate/style/index.ts");
;// ./components/rate/index.tsx
var rate_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;
};
const rate_Rate = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls,
className,
rootClassName,
style,
tooltips,
character = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_StarFilled, null),
disabled: customDisabled
} = props,
rest = rate_rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character", "disabled"]);
const characterRender = (node, _ref) => {
let {
index
} = _ref;
if (!tooltips) {
return node;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
title: tooltips[index]
}, node);
};
const {
getPrefixCls,
direction,
rate
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const ratePrefixCls = getPrefixCls('rate', prefixCls);
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,rate_style["default"])(ratePrefixCls);
const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_rate_es, Object.assign({
ref: ref,
character: character,
characterRender: characterRender,
disabled: mergedDisabled
}, rest, {
className: classnames_default()(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),
style: mergedStyle,
prefixCls: ratePrefixCls,
direction: direction
})));
});
if (true) {
rate_Rate.displayName = 'Rate';
}
/* harmony default export */ var rate = (rate_Rate);
;// ./node_modules/@ant-design/icons-svg/es/asn/WarningFilled.js
// This icon file is generated automatically.
var WarningFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "warning", "theme": "filled" };
/* harmony default export */ var asn_WarningFilled = (WarningFilled);
;// ./node_modules/@ant-design/icons/es/icons/WarningFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var WarningFilled_WarningFilled = function WarningFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_WarningFilled
}));
};
/** */
var WarningFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(WarningFilled_WarningFilled);
if (true) {
WarningFilled_RefIcon.displayName = 'WarningFilled';
}
/* harmony default export */ var icons_WarningFilled = (WarningFilled_RefIcon);
;// ./components/result/noFound.tsx
const NoFound = () => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
width: "252",
height: "294"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "No Found"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("defs", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M0 .387h251.772v251.772H0z"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
transform: "translate(0 .012)"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("mask", {
fill: "#fff"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",
fill: "#E4EBF7",
mask: "url(#b)"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
stroke: "#FFF",
strokeWidth: "2",
d: "M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",
fill: "#1677ff"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",
fill: "#FFB594"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",
fill: "#CBD1D1"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",
fill: "#2B0849"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",
fill: "#A4AABA"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",
fill: "#CBD1D1"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",
fill: "#2B0849"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",
fill: "#A4AABA"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",
fill: "#7BB2F9"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M107.275 222.1s2.773-1.11 6.102-3.884",
stroke: "#648BD8",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",
fill: "#192064"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",
fill: "#192064"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",
fill: "#520038"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",
fill: "#552950"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
stroke: "#DB836E",
strokeWidth: "1.118",
strokeLinecap: "round",
strokeLinejoin: "round",
d: "M110.13 74.84l-.896 1.61-.298 4.357h-2.228"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M110.846 74.481s1.79-.716 2.506.537",
stroke: "#5C2552",
strokeWidth: "1.118",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",
stroke: "#DB836E",
strokeWidth: "1.118",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M103.287 72.93s1.83 1.113 4.137.954",
stroke: "#5C2552",
strokeWidth: "1.118",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",
stroke: "#DB836E",
strokeWidth: "1.118",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",
stroke: "#E4EBF7",
strokeWidth: "1.101",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M129.405 122.865s-5.272 7.403-9.422 10.768",
stroke: "#E4EBF7",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M119.306 107.329s.452 4.366-2.127 32.062",
stroke: "#E4EBF7",
strokeWidth: "1.101",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",
fill: "#F2D7AD"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",
fill: "#F4D19D"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",
fill: "#F2D7AD"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
fill: "#CC9B6E",
d: "M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",
fill: "#F4D19D"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
fill: "#CC9B6E",
d: "M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
fill: "#CC9B6E",
d: "M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",
stroke: "#DB836E",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",
stroke: "#DB836E",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",
stroke: "#DB836E",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",
fill: "#5BA02E"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",
fill: "#92C110"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",
fill: "#F2D7AD"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M88.979 89.48s7.776 5.384 16.6 2.842",
stroke: "#E4EBF7",
strokeWidth: "1.101",
strokeLinecap: "round",
strokeLinejoin: "round"
}))));
/* harmony default export */ var noFound = (NoFound);
;// ./components/result/serverError.tsx
const ServerError = () => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
width: "254",
height: "294"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "Server Error"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("defs", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M0 .335h253.49v253.49H0z"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M0 293.665h253.49V.401H0z"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
transform: "translate(0 .067)"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("mask", {
fill: "#fff"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",
fill: "#E4EBF7",
mask: "url(#b)"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",
fill: "#FF603B"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",
fill: "#FFB594"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",
fill: "#FFB594"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",
fill: "#520038"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",
fill: "#552950"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
stroke: "#DB836E",
strokeWidth: "1.063",
strokeLinecap: "round",
strokeLinejoin: "round",
d: "M99.206 73.644l-.9 1.62-.3 4.38h-2.24"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M99.926 73.284s1.8-.72 2.52.54",
stroke: "#5C2552",
strokeWidth: "1.117",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",
stroke: "#DB836E",
strokeWidth: "1.117",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M92.326 71.724s1.84 1.12 4.16.96",
stroke: "#5C2552",
strokeWidth: "1.117",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",
stroke: "#DB836E",
strokeWidth: "1.063",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",
stroke: "#E4EBF7",
strokeWidth: "1.136",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",
stroke: "#E4EBF7",
strokeWidth: "1.085",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",
fill: "#CBD1D1"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",
fill: "#2B0849"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",
fill: "#A4AABA"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",
fill: "#CBD1D1"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",
fill: "#2B0849"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",
fill: "#A4AABA"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",
fill: "#7BB2F9"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",
stroke: "#648BD8",
strokeWidth: "1.085",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M96.973 219.373s2.882-1.153 6.34-4.034",
stroke: "#648BD8",
strokeWidth: "1.032",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",
stroke: "#648BD8",
strokeWidth: "1.085",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",
fill: "#192064"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",
fill: "#192064"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",
stroke: "#648BD8",
strokeWidth: "1.085",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",
stroke: "#E4EBF7",
strokeWidth: "1.085",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",
stroke: "#DB836E",
strokeWidth: ".774",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",
stroke: "#E59788",
strokeWidth: ".774",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",
stroke: "#E59788",
strokeWidth: ".774",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M109.278 112.533s3.38-3.613 7.575-4.662",
stroke: "#E4EBF7",
strokeWidth: "1.085",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M107.375 123.006s9.697-2.745 11.445-.88",
stroke: "#E59788",
strokeWidth: ".774",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",
stroke: "#BFCDDD",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",
fill: "#A3B4C6"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",
fill: "#A3B4C6"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("mask", {
fill: "#fff"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
fill: "#A3B4C6",
mask: "url(#d)",
d: "M154.098 190.096h70.513v-84.617h-70.513z"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",
fill: "#BFCDDD",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",
fill: "#FFF",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",
fill: "#BFCDDD",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",
stroke: "#7C90A5",
strokeWidth: "1.124",
strokeLinecap: "round",
strokeLinejoin: "round",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",
fill: "#FFF",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",
fill: "#BFCDDD",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M177.259 207.217v11.52M201.05 207.217v11.52",
stroke: "#A3B4C6",
strokeWidth: "1.124",
strokeLinecap: "round",
strokeLinejoin: "round",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",
fill: "#5BA02E",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",
fill: "#92C110",
mask: "url(#d)"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",
fill: "#F2D7AD",
mask: "url(#d)"
}))));
/* harmony default export */ var serverError = (ServerError);
// EXTERNAL MODULE: ./components/result/style/index.ts
var result_style = __webpack_require__("./components/result/style/index.ts");
;// ./components/result/unauthorized.tsx
const Unauthorized = () => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
width: "251",
height: "294"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "Unauthorized"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",
fill: "#E4EBF7"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",
stroke: "#FFF",
strokeWidth: "2"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
stroke: "#FFF",
strokeWidth: "2",
d: "M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",
fill: "#A26EF4"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",
fill: "#5BA02E"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",
fill: "#92C110"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",
fill: "#F2D7AD"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",
fill: "#FFB594"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M78.18 94.656s.911 7.41-4.914 13.078",
stroke: "#E4EBF7",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",
stroke: "#E4EBF7",
strokeWidth: ".932",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",
fill: "#FFB594"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",
fill: "#5C2552"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
stroke: "#DB836E",
strokeWidth: "1.145",
strokeLinecap: "round",
strokeLinejoin: "round",
d: "M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",
fill: "#552950"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M91.132 86.786s5.269 4.957 12.679 2.327",
stroke: "#DB836E",
strokeWidth: "1.145",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",
fill: "#DB836E"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",
stroke: "#5C2552",
strokeWidth: "1.526",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",
stroke: "#DB836E",
strokeWidth: "1.145",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",
stroke: "#E4EBF7",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M66.508 86.763s-1.598 8.83-6.697 14.078",
stroke: "#E4EBF7",
strokeWidth: "1.114",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M128.31 87.934s3.013 4.121 4.06 11.785",
stroke: "#E4EBF7",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M64.09 84.816s-6.03 9.912-13.607 9.903",
stroke: "#DB836E",
strokeWidth: ".795",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",
fill: "#FFC6A0"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M130.532 85.488s4.588 5.757 11.619 6.214",
stroke: "#DB836E",
strokeWidth: ".75",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M121.708 105.73s-.393 8.564-1.34 13.612",
stroke: "#E4EBF7",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M115.784 161.512s-3.57-1.488-2.678-7.14",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",
fill: "#CBD1D1"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",
fill: "#2B0849"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",
fill: "#A4AABA"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",
fill: "#CBD1D1"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",
fill: "#2B0849"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",
fill: "#A4AABA"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",
fill: "#7BB2F9"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M108.459 220.905s2.759-1.104 6.07-3.863",
stroke: "#648BD8",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",
fill: "#192064"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",
fill: "#FFF"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",
fill: "#192064"
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
d: "M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",
stroke: "#648BD8",
strokeWidth: "1.051",
strokeLinecap: "round",
strokeLinejoin: "round"
}))));
/* harmony default export */ var unauthorized = (Unauthorized);
;// ./components/result/index.tsx
const IconMap = {
success: icons_CheckCircleFilled,
error: icons_CloseCircleFilled,
info: icons_ExclamationCircleFilled,
warning: icons_WarningFilled
};
const ExceptionMap = {
'404': noFound,
'500': serverError,
'403': unauthorized
};
// ExceptionImageMap keys
const ExceptionStatus = Object.keys(ExceptionMap);
const result_Icon = _ref => {
let {
prefixCls,
icon,
status
} = _ref;
const className = classnames_default()(`${prefixCls}-icon`);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Result');
true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
}
if (ExceptionStatus.includes(`${status}`)) {
const SVGComponent = ExceptionMap[status];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${className} ${prefixCls}-image`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SVGComponent, null));
}
const iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IconMap[status]);
if (icon === null || icon === false) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className
}, icon || iconNode);
};
const Extra = _ref2 => {
let {
prefixCls,
extra
} = _ref2;
if (!extra) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-extra`
}, extra);
};
const Result = _ref3 => {
let {
prefixCls: customizePrefixCls,
className: customizeClassName,
rootClassName,
subTitle,
title,
style,
children,
status = 'info',
icon,
extra
} = _ref3;
const {
getPrefixCls,
direction,
result
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('result', customizePrefixCls);
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,result_style["default"])(prefixCls);
const className = classnames_default()(prefixCls, `${prefixCls}-${status}`, customizeClassName, result === null || result === void 0 ? void 0 : result.className, rootClassName, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.style), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className,
style: mergedStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(result_Icon, {
prefixCls: prefixCls,
status: status,
icon: icon
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-title`
}, title), subTitle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-subtitle`
}, subTitle), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Extra, {
prefixCls: prefixCls,
extra: extra
}), children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-content`
}, children)));
};
Result.PRESENTED_IMAGE_403 = ExceptionMap['403'];
Result.PRESENTED_IMAGE_404 = ExceptionMap['404'];
Result.PRESENTED_IMAGE_500 = ExceptionMap['500'];
if (true) {
Result.displayName = 'Result';
}
/* harmony default export */ var result = (Result);
;// ./components/row/index.tsx
/* harmony default export */ var components_row = (row);
;// ./components/statistic/Number.tsx
const StatisticNumber = props => {
const {
value,
formatter,
precision,
decimalSeparator,
groupSeparator = '',
prefixCls
} = props;
let valueNode;
if (typeof formatter === 'function') {
// Customize formatter
valueNode = formatter(value);
} else {
// Internal formatter
const val = String(value);
const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
// Process if illegal number
if (!cells || val === '-') {
valueNode = val;
} else {
const negative = cells[1];
let int = cells[2] || '0';
let decimal = cells[4] || '';
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
if (typeof precision === 'number') {
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
}
if (decimal) {
decimal = `${decimalSeparator}${decimal}`;
}
valueNode = [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: "int",
className: `${prefixCls}-content-value-int`
}, negative, int), decimal && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: "decimal",
className: `${prefixCls}-content-value-decimal`
}, decimal))];
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-content-value`
}, valueNode);
};
/* harmony default export */ var statistic_Number = (StatisticNumber);
// EXTERNAL MODULE: ./components/statistic/style/index.ts
var statistic_style = __webpack_require__("./components/statistic/style/index.ts");
;// ./components/statistic/Statistic.tsx
var Statistic_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;
};
const Statistic = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
valueStyle,
value = 0,
title,
valueRender,
prefix,
suffix,
loading = false,
/* --- FormatConfig starts --- */
formatter,
precision,
decimalSeparator = '.',
groupSeparator = ',',
/* --- FormatConfig starts --- */
onMouseEnter,
onMouseLeave
} = props,
rest = Statistic_rest(props, ["prefixCls", "className", "rootClassName", "style", "valueStyle", "value", "title", "valueRender", "prefix", "suffix", "loading", "formatter", "precision", "decimalSeparator", "groupSeparator", "onMouseEnter", "onMouseLeave"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('statistic');
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,statistic_style["default"])(prefixCls);
const valueNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(statistic_Number, {
decimalSeparator: decimalSeparator,
groupSeparator: groupSeparator,
prefixCls: prefixCls,
formatter: formatter,
precision: precision,
value: value
});
const cls = classnames_default()(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, hashId, cssVarCls);
const restProps = (0,pickAttrs["default"])(rest, {
aria: true,
data: true
});
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, restProps, {
className: cls,
style: Object.assign(Object.assign({}, contextStyle), style),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave
}), title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-title`
}, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
paragraph: false,
loading: loading,
className: `${prefixCls}-skeleton`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: valueStyle,
className: `${prefixCls}-content`
}, prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-content-prefix`
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-content-suffix`
}, suffix)))));
};
if (true) {
Statistic.displayName = 'Statistic';
}
/* harmony default export */ var statistic_Statistic = (Statistic);
;// ./components/statistic/utils.ts
// Countdown
const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365],
// years
['M', 1000 * 60 * 60 * 24 * 30],
// months
['D', 1000 * 60 * 60 * 24],
// days
['H', 1000 * 60 * 60],
// hours
['m', 1000 * 60],
// minutes
['s', 1000],
// seconds
['S', 1] // million seconds
];
function formatTimeStr(duration, format) {
let leftDuration = duration;
const escapeRegex = /\[[^\]]*]/g;
const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
const templateText = format.replace(escapeRegex, '[]');
const replacedText = timeUnits.reduce((current, _ref) => {
let [name, unit] = _ref;
if (current.includes(name)) {
const value = Math.floor(leftDuration / unit);
leftDuration -= value * unit;
return current.replace(new RegExp(`${name}+`, 'g'), match => {
const len = match.length;
return value.toString().padStart(len, '0');
});
}
return current;
}, templateText);
let index = 0;
return replacedText.replace(escapeRegex, () => {
const match = keepList[index];
index += 1;
return match;
});
}
function formatCountdown(value, config) {
const {
format = ''
} = config;
const target = new Date(value).getTime();
const current = Date.now();
const diff = Math.max(target - current, 0);
return formatTimeStr(diff, format);
}
;// ./components/statistic/Countdown.tsx
var Countdown_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;
};
const Countdown_REFRESH_INTERVAL = 1000 / 30;
function getTime(value) {
return new Date(value).getTime();
}
const Countdown = props => {
const {
value,
format = 'HH:mm:ss',
onChange,
onFinish
} = props,
rest = Countdown_rest(props, ["value", "format", "onChange", "onFinish"]);
const forceUpdate = useForceUpdate();
const countdown = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const stopTimer = () => {
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
if (countdown.current) {
clearInterval(countdown.current);
countdown.current = null;
}
};
const syncTimer = () => {
const timestamp = getTime(value);
if (timestamp >= Date.now()) {
countdown.current = setInterval(() => {
forceUpdate();
onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now());
if (timestamp < Date.now()) {
stopTimer();
}
}, Countdown_REFRESH_INTERVAL);
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
syncTimer();
return () => {
if (countdown.current) {
clearInterval(countdown.current);
countdown.current = null;
}
};
}, [value]);
const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), {
format
}));
const valueRender = node => (0,reactNode.cloneElement)(node, {
title: undefined
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(statistic_Statistic, Object.assign({}, rest, {
value: value,
valueRender: valueRender,
formatter: formatter
}));
};
/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(Countdown));
;// ./components/statistic/index.tsx
statistic_Statistic.Countdown = statistic_Countdown;
/* harmony default export */ var statistic = (statistic_Statistic);
;// ./node_modules/rc-steps/es/Step.js
var Step_excluded = ["className", "prefixCls", "style", "active", "status", "iconPrefix", "icon", "wrapperStyle", "stepNumber", "disabled", "description", "title", "subTitle", "progressDot", "stepIcon", "tailContent", "icons", "stepIndex", "onStepClick", "onClick", "render"];
/* eslint react/prop-types: 0 */
function Step_isString(str) {
return typeof str === 'string';
}
function Step(props) {
var _classNames2;
var className = props.className,
prefixCls = props.prefixCls,
style = props.style,
active = props.active,
status = props.status,
iconPrefix = props.iconPrefix,
icon = props.icon,
wrapperStyle = props.wrapperStyle,
stepNumber = props.stepNumber,
disabled = props.disabled,
description = props.description,
title = props.title,
subTitle = props.subTitle,
progressDot = props.progressDot,
stepIcon = props.stepIcon,
tailContent = props.tailContent,
icons = props.icons,
stepIndex = props.stepIndex,
onStepClick = props.onStepClick,
onClick = props.onClick,
render = props.render,
restProps = (0,objectWithoutProperties["default"])(props, Step_excluded);
// ========================= Click ==========================
var clickable = !!onStepClick && !disabled;
var accessibilityProps = {};
if (clickable) {
accessibilityProps.role = 'button';
accessibilityProps.tabIndex = 0;
accessibilityProps.onClick = function (e) {
onClick === null || onClick === void 0 ? void 0 : onClick(e);
onStepClick(stepIndex);
};
accessibilityProps.onKeyDown = function (e) {
var which = e.which;
if (which === KeyCode["default"].ENTER || which === KeyCode["default"].SPACE) {
onStepClick(stepIndex);
}
};
}
// ========================= Render =========================
var renderIconNode = function renderIconNode() {
var _classNames;
var iconNode;
var iconClassName = classnames_default()("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && Step_isString(icon)), (0,defineProperty["default"])(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && (icons && !icons.finish || !icons)), (0,defineProperty["default"])(_classNames, "".concat(iconPrefix, "icon-cross"), !icon && status === 'error' && (icons && !icons.error || !icons)), _classNames));
var iconDot = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon-dot")
});
// `progressDot` enjoy the highest priority
if (progressDot) {
if (typeof progressDot === 'function') {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, progressDot(iconDot, {
index: stepNumber - 1,
status: status,
title: title,
description: description
}));
} else {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, iconDot);
}
} else if (icon && !Step_isString(icon)) {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icon);
} else if (icons && icons.finish && status === 'finish') {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icons.finish);
} else if (icons && icons.error && status === 'error') {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icons.error);
} else if (icon || status === 'finish' || status === 'error') {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: iconClassName
});
} else {
iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, stepNumber);
}
if (stepIcon) {
iconNode = stepIcon({
index: stepNumber - 1,
status: status,
title: title,
description: description,
node: iconNode
});
}
return iconNode;
};
var mergedStatus = status || 'wait';
var classString = classnames_default()("".concat(prefixCls, "-item"), "".concat(prefixCls, "-item-").concat(mergedStatus), className, (_classNames2 = {}, (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-item-custom"), icon), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-item-active"), active), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-item-disabled"), disabled === true), _classNames2));
var stepItemStyle = (0,objectSpread2["default"])({}, style);
var stepNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, restProps, {
className: classString,
style: stepItemStyle
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
onClick: onClick
}, accessibilityProps, {
className: "".concat(prefixCls, "-item-container")
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-item-tail")
}, tailContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-item-icon")
}, renderIconNode()), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-item-content")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-item-title")
}, title, subTitle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
title: typeof subTitle === 'string' ? subTitle : undefined,
className: "".concat(prefixCls, "-item-subtitle")
}, subTitle)), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-item-description")
}, description))));
if (render) {
stepNode = render(stepNode) || null;
}
return stepNode;
}
/* harmony default export */ var es_Step = (Step);
;// ./node_modules/rc-steps/es/Steps.js
var Steps_excluded = ["prefixCls", "style", "className", "children", "direction", "type", "labelPlacement", "iconPrefix", "status", "size", "current", "progressDot", "stepIcon", "initial", "icons", "onChange", "itemRender", "items"];
/* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */
function es_Steps_Steps(props) {
var _classNames;
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-steps' : _props$prefixCls,
_props$style = props.style,
style = _props$style === void 0 ? {} : _props$style,
className = props.className,
children = props.children,
_props$direction = props.direction,
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
_props$type = props.type,
type = _props$type === void 0 ? 'default' : _props$type,
_props$labelPlacement = props.labelPlacement,
labelPlacement = _props$labelPlacement === void 0 ? 'horizontal' : _props$labelPlacement,
_props$iconPrefix = props.iconPrefix,
iconPrefix = _props$iconPrefix === void 0 ? 'rc' : _props$iconPrefix,
_props$status = props.status,
status = _props$status === void 0 ? 'process' : _props$status,
size = props.size,
_props$current = props.current,
current = _props$current === void 0 ? 0 : _props$current,
_props$progressDot = props.progressDot,
progressDot = _props$progressDot === void 0 ? false : _props$progressDot,
stepIcon = props.stepIcon,
_props$initial = props.initial,
initial = _props$initial === void 0 ? 0 : _props$initial,
icons = props.icons,
onChange = props.onChange,
itemRender = props.itemRender,
_props$items = props.items,
items = _props$items === void 0 ? [] : _props$items,
restProps = (0,objectWithoutProperties["default"])(props, Steps_excluded);
var isNav = type === 'navigation';
var isInline = type === 'inline';
// inline type requires fixed progressDot direction size.
var mergedProgressDot = isInline || progressDot;
var mergedDirection = isInline ? 'horizontal' : direction;
var mergedSize = isInline ? undefined : size;
var adjustedLabelPlacement = mergedProgressDot ? 'vertical' : labelPlacement;
var classString = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(mergedDirection), className, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-label-").concat(adjustedLabelPlacement), mergedDirection === 'horizontal'), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-dot"), !!mergedProgressDot), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-navigation"), isNav), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-inline"), isInline), _classNames));
var onStepClick = function onStepClick(next) {
if (onChange && current !== next) {
onChange(next);
}
};
var renderStep = function renderStep(item, index) {
var mergedItem = (0,objectSpread2["default"])({}, item);
var stepNumber = initial + index;
// fix tail color
if (status === 'error' && index === current - 1) {
mergedItem.className = "".concat(prefixCls, "-next-error");
}
if (!mergedItem.status) {
if (stepNumber === current) {
mergedItem.status = status;
} else if (stepNumber < current) {
mergedItem.status = 'finish';
} else {
mergedItem.status = 'wait';
}
}
if (isInline) {
mergedItem.icon = undefined;
mergedItem.subTitle = undefined;
}
if (!mergedItem.render && itemRender) {
mergedItem.render = function (stepItem) {
return itemRender(mergedItem, stepItem);
};
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Step, (0,esm_extends["default"])({}, mergedItem, {
active: stepNumber === current,
stepNumber: stepNumber + 1,
stepIndex: stepNumber,
key: stepNumber,
prefixCls: prefixCls,
iconPrefix: iconPrefix,
wrapperStyle: style,
progressDot: mergedProgressDot,
stepIcon: stepIcon,
icons: icons,
onStepClick: onChange && onStepClick
}));
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
className: classString,
style: style
}, restProps), items.filter(function (item) {
return item;
}).map(renderStep));
}
es_Steps_Steps.Step = es_Step;
/* harmony default export */ var rc_steps_es_Steps = (es_Steps_Steps);
;// ./node_modules/rc-steps/es/index.js
/* harmony default export */ var rc_steps_es = (rc_steps_es_Steps);
// EXTERNAL MODULE: ./components/steps/style/index.ts + 10 modules
var steps_style = __webpack_require__("./components/steps/style/index.ts");
;// ./components/steps/useLegacyItems.ts
function useLegacyItems_filter(items) {
return items.filter(item => item);
}
function useLegacyItems_useLegacyItems(items, children) {
if (false) {}
if (items) {
return items;
}
const childrenItems = (0,toArray["default"])(children).map(node => {
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node)) {
const {
props
} = node;
const item = Object.assign({}, props);
return item;
}
return null;
});
return useLegacyItems_filter(childrenItems);
}
;// ./components/steps/index.tsx
var steps_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;
};
const steps_Steps = props => {
const {
percent,
size: customizeSize,
className,
rootClassName,
direction,
items,
responsive = true,
current = 0,
children,
style
} = props,
restProps = steps_rest(props, ["percent", "size", "className", "rootClassName", "direction", "items", "responsive", "current", "children", "style"]);
const {
xs
} = hooks_useBreakpoint(responsive);
const {
getPrefixCls,
direction: rtlDirection,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('steps');
const realDirectionValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => responsive && xs ? 'vertical' : direction, [xs, direction]);
const size = (0,useSize["default"])(customizeSize);
const prefixCls = getPrefixCls('steps', props.prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,steps_style["default"])(prefixCls);
const isInline = props.type === 'inline';
const iconPrefix = getPrefixCls('', props.iconPrefix);
const mergedItems = useLegacyItems_useLegacyItems(items, children);
const mergedPercent = isInline ? undefined : percent;
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
const stepsClassName = classnames_default()(contextClassName, {
[`${prefixCls}-rtl`]: rtlDirection === 'rtl',
[`${prefixCls}-with-progress`]: mergedPercent !== undefined
}, className, rootClassName, hashId, cssVarCls);
const icons = {
finish: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, {
className: `${prefixCls}-finish-icon`
}),
error: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
className: `${prefixCls}-error-icon`
})
};
const stepIconRender = _ref => {
let {
node,
status
} = _ref;
if (status === 'process' && mergedPercent !== undefined) {
// currently it's hard-coded, since we can't easily read the actually width of icon
const progressWidth = size === 'small' ? 32 : 40;
// iconWithProgress
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-progress-icon`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_progress, {
type: "circle",
percent: mergedPercent,
size: progressWidth,
strokeWidth: 4,
format: () => null
}), node);
}
return node;
};
const itemRender = (item, stepItem) => item.description ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
title: item.description
}, stepItem) : stepItem;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_steps_es, Object.assign({
icons: icons
}, restProps, {
style: mergedStyle,
current: current,
size: size,
items: mergedItems,
itemRender: isInline ? itemRender : undefined,
stepIcon: stepIconRender,
direction: realDirectionValue,
prefixCls: prefixCls,
iconPrefix: iconPrefix,
className: stepsClassName
})));
};
steps_Steps.Step = rc_steps_es.Step;
if (true) {
steps_Steps.displayName = 'Steps';
}
/* harmony default export */ var steps = (steps_Steps);
;// ./node_modules/rc-switch/es/index.js
var rc_switch_es_excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
var Switch = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (_ref, ref) {
var _classNames;
var _ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
className = _ref.className,
checked = _ref.checked,
defaultChecked = _ref.defaultChecked,
disabled = _ref.disabled,
loadingIcon = _ref.loadingIcon,
checkedChildren = _ref.checkedChildren,
unCheckedChildren = _ref.unCheckedChildren,
onClick = _ref.onClick,
onChange = _ref.onChange,
onKeyDown = _ref.onKeyDown,
restProps = (0,objectWithoutProperties["default"])(_ref, rc_switch_es_excluded);
var _useMergedState = (0,useMergedState["default"])(false, {
value: checked,
defaultValue: defaultChecked
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
innerChecked = _useMergedState2[0],
setInnerChecked = _useMergedState2[1];
function triggerChange(newChecked, event) {
var mergedChecked = innerChecked;
if (!disabled) {
mergedChecked = newChecked;
setInnerChecked(mergedChecked);
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
}
return mergedChecked;
}
function onInternalKeyDown(e) {
if (e.which === KeyCode["default"].LEFT) {
triggerChange(false, e);
} else if (e.which === KeyCode["default"].RIGHT) {
triggerChange(true, e);
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
}
function onInternalClick(e) {
var ret = triggerChange(!innerChecked, e);
// [Legacy] trigger onClick with value
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
}
var switchClassName = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", (0,esm_extends["default"])({}, restProps, {
type: "button",
role: "switch",
"aria-checked": innerChecked,
disabled: disabled,
className: switchClassName,
ref: ref,
onKeyDown: onInternalKeyDown,
onClick: onInternalClick
}), loadingIcon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-inner")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-inner-checked")
}, checkedChildren), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-inner-unchecked")
}, unCheckedChildren)));
});
Switch.displayName = 'Switch';
/* harmony default export */ var rc_switch_es = (Switch);
// EXTERNAL MODULE: ./components/switch/style/index.ts
var switch_style = __webpack_require__("./components/switch/style/index.ts");
;// ./components/switch/index.tsx
var switch_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;
};
const InternalSwitch = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
size: customizeSize,
disabled: customDisabled,
loading,
className,
rootClassName,
style,
checked: checkedProp,
value,
defaultChecked: defaultCheckedProp,
defaultValue,
onChange
} = props,
restProps = switch_rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style", "checked", "value", "defaultChecked", "defaultValue", "onChange"]);
const [checked, setChecked] = (0,useMergedState["default"])(false, {
value: checkedProp !== null && checkedProp !== void 0 ? checkedProp : value,
defaultValue: defaultCheckedProp !== null && defaultCheckedProp !== void 0 ? defaultCheckedProp : defaultValue
});
const {
getPrefixCls,
direction,
switch: SWITCH
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
const prefixCls = getPrefixCls('switch', customizePrefixCls);
const loadingIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-handle`
}, loading && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
className: `${prefixCls}-loading-icon`
}));
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,switch_style["default"])(prefixCls);
const mergedSize = (0,useSize["default"])(customizeSize);
const classes = classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
[`${prefixCls}-small`]: mergedSize === 'small',
[`${prefixCls}-loading`]: loading,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
const changeHandler = function () {
setChecked(arguments.length <= 0 ? undefined : arguments[0]);
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, arguments);
};
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
component: "Switch"
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_switch_es, Object.assign({}, restProps, {
checked: checked,
onChange: changeHandler,
prefixCls: prefixCls,
className: classes,
style: mergedStyle,
disabled: mergedDisabled,
ref: ref,
loadingIcon: loadingIcon
}))));
});
const switch_Switch = InternalSwitch;
switch_Switch.__ANT_SWITCH = true;
if (true) {
switch_Switch.displayName = 'Switch';
}
/* harmony default export */ var components_switch = (switch_Switch);
;// ./node_modules/rc-table/es/constant.js
var EXPAND_COLUMN = {};
var INTERNAL_HOOKS = 'rc-table-internal-hook';
;// ./node_modules/@rc-component/context/es/context.js
function createContext(defaultValue) {
var Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
var Provider = function Provider(_ref) {
var value = _ref.value,
children = _ref.children;
var valueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(value);
valueRef.current = value;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
return {
getValue: function getValue() {
return valueRef.current;
},
listeners: new Set()
};
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
context = _React$useState2[0];
(0,useLayoutEffect["default"])(function () {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.unstable_batchedUpdates)(function () {
context.listeners.forEach(function (listener) {
listener(value);
});
});
}, [value]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Context.Provider, {
value: context
}, children);
};
return {
Context: Context,
Provider: Provider,
defaultValue: defaultValue
};
}
/** e.g. useSelect(userContext) => user */
/** e.g. useSelect(userContext, user => user.name) => user.name */
/** e.g. useSelect(userContext, ['name', 'age']) => user { name, age } */
/** e.g. useSelect(userContext, 'name') => user.name */
function useContext(holder, selector) {
var eventSelector = (0,useEvent["default"])(typeof selector === 'function' ? selector : function (ctx) {
if (selector === undefined) {
return ctx;
}
if (!Array.isArray(selector)) {
return ctx[selector];
}
var obj = {};
selector.forEach(function (key) {
obj[key] = ctx[key];
});
return obj;
});
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(holder === null || holder === void 0 ? void 0 : holder.Context);
var _ref2 = context || {},
listeners = _ref2.listeners,
getValue = _ref2.getValue;
var valueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
valueRef.current = eventSelector(context ? getValue() : holder === null || holder === void 0 ? void 0 : holder.defaultValue);
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
forceUpdate = _React$useState4[1];
(0,useLayoutEffect["default"])(function () {
if (!context) {
return;
}
function trigger(nextValue) {
var nextSelectorValue = eventSelector(nextValue);
if (!(0,isEqual["default"])(valueRef.current, nextSelectorValue, true)) {
forceUpdate({});
}
}
listeners.add(trigger);
return function () {
listeners.delete(trigger);
};
}, [context]);
return valueRef.current;
}
;// ./node_modules/@rc-component/context/es/Immutable.js
/**
* Create Immutable pair for `makeImmutable` and `responseImmutable`.
*/
function createImmutable() {
var ImmutableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/**
* Get render update mark by `makeImmutable` root.
* Do not deps on the return value as render times
* but only use for `useMemo` or `useCallback` deps.
*/
function useImmutableMark() {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(ImmutableContext);
}
/**
* Wrapped Component will be marked as Immutable.
* When Component parent trigger render,
* it will notice children component (use with `responseImmutable`) node that parent has updated.
* @param Component Passed Component
* @param triggerRender Customize trigger `responseImmutable` children re-render logic. Default will always trigger re-render when this component re-render.
*/
function makeImmutable(Component, shouldTriggerRender) {
var refAble = (0,es_ref.supportRef)(Component);
var ImmutableComponent = function ImmutableComponent(props, ref) {
var refProps = refAble ? {
ref: ref
} : {};
var renderTimesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
var prevProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(props);
// If parent has the context, we do not wrap it
var mark = useImmutableMark();
if (mark !== null) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, props, refProps));
}
if (
// Always trigger re-render if not provide `notTriggerRender`
!shouldTriggerRender || shouldTriggerRender(prevProps.current, props)) {
renderTimesRef.current += 1;
}
prevProps.current = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ImmutableContext.Provider, {
value: renderTimesRef.current
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, props, refProps)));
};
if (true) {
ImmutableComponent.displayName = "ImmutableRoot(".concat(Component.displayName || Component.name, ")");
}
return refAble ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ImmutableComponent) : ImmutableComponent;
}
/**
* Wrapped Component with `React.memo`.
* But will rerender when parent with `makeImmutable` rerender.
*/
function responseImmutable(Component, propsAreEqual) {
var refAble = (0,es_ref.supportRef)(Component);
var ImmutableComponent = function ImmutableComponent(props, ref) {
var refProps = refAble ? {
ref: ref
} : {};
useImmutableMark();
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, props, refProps));
};
if (true) {
ImmutableComponent.displayName = "ImmutableResponse(".concat(Component.displayName || Component.name, ")");
}
return refAble ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ImmutableComponent), propsAreEqual) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(ImmutableComponent, propsAreEqual);
}
return {
makeImmutable: makeImmutable,
responseImmutable: responseImmutable,
useImmutableMark: useImmutableMark
};
}
;// ./node_modules/@rc-component/context/es/index.js
// For legacy usage, we export it directly
var _createImmutable = createImmutable(),
makeImmutable = _createImmutable.makeImmutable,
responseImmutable = _createImmutable.responseImmutable,
useImmutableMark = _createImmutable.useImmutableMark;
;// ./node_modules/rc-table/es/context/TableContext.js
var TableContext_createImmutable = createImmutable(),
TableContext_makeImmutable = TableContext_createImmutable.makeImmutable,
TableContext_responseImmutable = TableContext_createImmutable.responseImmutable,
TableContext_useImmutableMark = TableContext_createImmutable.useImmutableMark;
var TableContext = createContext();
/* harmony default export */ var context_TableContext = (TableContext);
;// ./node_modules/rc-table/es/hooks/useRenderTimes.js
/* istanbul ignore file */
function useRenderTimes(props, debug) {
// Render times
var timesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
timesRef.current += 1;
// Props changed
var propsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(props);
var keys = [];
Object.keys(props || {}).map(function (key) {
var _propsRef$current;
if ((props === null || props === void 0 ? void 0 : props[key]) !== ((_propsRef$current = propsRef.current) === null || _propsRef$current === void 0 ? void 0 : _propsRef$current[key])) {
keys.push(key);
}
});
propsRef.current = props;
// Cache keys since React rerender may cause it lost
var keysRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
if (keys.length) {
keysRef.current = keys;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useDebugValue(timesRef.current);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useDebugValue(keysRef.current.join(', '));
if (debug) {
console.log("".concat(debug, ":"), timesRef.current, keysRef.current);
}
return timesRef.current;
}
/* harmony default export */ var hooks_useRenderTimes = ( true ? useRenderTimes : 0);
var RenderBlock = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function () {
var times = useRenderTimes();
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("h1", null, "Render Times: ", times);
});
if (true) {
RenderBlock.displayName = 'RenderBlock';
}
;// ./node_modules/rc-table/es/context/PerfContext.js
// TODO: Remove when use `responsiveImmutable`
var PerfContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
renderWithProps: false
});
/* harmony default export */ var context_PerfContext = (PerfContext);
;// ./node_modules/rc-table/es/utils/valueUtil.js
var INTERNAL_KEY_PREFIX = 'RC_TABLE_KEY';
function valueUtil_toArray(arr) {
if (arr === undefined || arr === null) {
return [];
}
return Array.isArray(arr) ? arr : [arr];
}
function getColumnsKey(columns) {
var columnKeys = [];
var keys = {};
columns.forEach(function (column) {
var _ref = column || {},
key = _ref.key,
dataIndex = _ref.dataIndex;
var mergedKey = key || valueUtil_toArray(dataIndex).join('-') || INTERNAL_KEY_PREFIX;
while (keys[mergedKey]) {
mergedKey = "".concat(mergedKey, "_next");
}
keys[mergedKey] = true;
columnKeys.push(mergedKey);
});
return columnKeys;
}
function validateValue(val) {
return val !== null && val !== undefined;
}
function validNumberValue(value) {
return typeof value === 'number' && !Number.isNaN(value);
}
;// ./node_modules/rc-table/es/Cell/useCellRender.js
function isRenderCell(data) {
return data && (0,esm_typeof["default"])(data) === 'object' && !Array.isArray(data) && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(data);
}
function useCellRender_useCellRender(record, dataIndex, renderIndex, children, render, shouldCellUpdate) {
// TODO: Remove this after next major version
var perfRecord = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_PerfContext);
var mark = TableContext_useImmutableMark();
// ======================== Render ========================
var retData = (0,useMemo["default"])(function () {
if (validateValue(children)) {
return [children];
}
var path = dataIndex === null || dataIndex === undefined || dataIndex === '' ? [] : Array.isArray(dataIndex) ? dataIndex : [dataIndex];
var value = (0,get["default"])(record, path);
// Customize render node
var returnChildNode = value;
var returnCellProps = undefined;
if (render) {
var renderData = render(value, record, renderIndex);
if (isRenderCell(renderData)) {
if (true) {
(0,warning["default"])(false, '`columns.render` return cell props is deprecated with perf issue, please use `onCell` instead.');
}
returnChildNode = renderData.children;
returnCellProps = renderData.props;
perfRecord.renderWithProps = true;
} else {
returnChildNode = renderData;
}
}
return [returnChildNode, returnCellProps];
}, [
// Force update deps
mark,
// Normal deps
record, children, dataIndex, render, renderIndex], function (prev, next) {
if (shouldCellUpdate) {
var _prev = (0,slicedToArray["default"])(prev, 2),
prevRecord = _prev[1];
var _next = (0,slicedToArray["default"])(next, 2),
nextRecord = _next[1];
return shouldCellUpdate(nextRecord, prevRecord);
}
// Legacy mode should always update
if (perfRecord.renderWithProps) {
return true;
}
return !(0,isEqual["default"])(prev, next, true);
});
return retData;
}
;// ./node_modules/rc-table/es/Cell/useHoverState.js
/** Check if cell is in hover range */
function inHoverRange(cellStartRow, cellRowSpan, startRow, endRow) {
var cellEndRow = cellStartRow + cellRowSpan - 1;
return cellStartRow <= endRow && cellEndRow >= startRow;
}
function useHoverState(rowIndex, rowSpan) {
return useContext(context_TableContext, function (ctx) {
var hovering = inHoverRange(rowIndex, rowSpan || 1, ctx.hoverStartRow, ctx.hoverEndRow);
return [hovering, ctx.onHover];
});
}
;// ./node_modules/rc-table/es/Cell/index.js
var getTitleFromCellRenderChildren = function getTitleFromCellRenderChildren(_ref) {
var ellipsis = _ref.ellipsis,
rowType = _ref.rowType,
children = _ref.children;
var title;
var ellipsisConfig = ellipsis === true ? {
showTitle: true
} : ellipsis;
if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) {
if (typeof children === 'string' || typeof children === 'number') {
title = children.toString();
} else if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children) && typeof children.props.children === 'string') {
title = children.props.children;
}
}
return title;
};
function Cell_Cell(props) {
var _ref2, _ref3, _legacyCellProps$colS, _ref4, _ref5, _legacyCellProps$rowS, _additionalProps$titl, _classNames;
if (true) {
hooks_useRenderTimes(props);
}
var Component = props.component,
children = props.children,
ellipsis = props.ellipsis,
scope = props.scope,
prefixCls = props.prefixCls,
className = props.className,
align = props.align,
record = props.record,
render = props.render,
dataIndex = props.dataIndex,
renderIndex = props.renderIndex,
shouldCellUpdate = props.shouldCellUpdate,
index = props.index,
rowType = props.rowType,
colSpan = props.colSpan,
rowSpan = props.rowSpan,
fixLeft = props.fixLeft,
fixRight = props.fixRight,
firstFixLeft = props.firstFixLeft,
lastFixLeft = props.lastFixLeft,
firstFixRight = props.firstFixRight,
lastFixRight = props.lastFixRight,
appendNode = props.appendNode,
_props$additionalProp = props.additionalProps,
additionalProps = _props$additionalProp === void 0 ? {} : _props$additionalProp,
isSticky = props.isSticky;
var cellPrefixCls = "".concat(prefixCls, "-cell");
var _useContext = useContext(context_TableContext, ['supportSticky', 'allColumnsFixedLeft', 'rowHoverable']),
supportSticky = _useContext.supportSticky,
allColumnsFixedLeft = _useContext.allColumnsFixedLeft,
rowHoverable = _useContext.rowHoverable;
// ====================== Value =======================
var _useCellRender = useCellRender_useCellRender(record, dataIndex, renderIndex, children, render, shouldCellUpdate),
_useCellRender2 = (0,slicedToArray["default"])(_useCellRender, 2),
childNode = _useCellRender2[0],
legacyCellProps = _useCellRender2[1];
// ====================== Fixed =======================
var fixedStyle = {};
var isFixLeft = typeof fixLeft === 'number' && supportSticky;
var isFixRight = typeof fixRight === 'number' && supportSticky;
if (isFixLeft) {
fixedStyle.position = 'sticky';
fixedStyle.left = fixLeft;
}
if (isFixRight) {
fixedStyle.position = 'sticky';
fixedStyle.right = fixRight;
}
// ================ RowSpan & ColSpan =================
var mergedColSpan = (_ref2 = (_ref3 = (_legacyCellProps$colS = legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.colSpan) !== null && _legacyCellProps$colS !== void 0 ? _legacyCellProps$colS : additionalProps.colSpan) !== null && _ref3 !== void 0 ? _ref3 : colSpan) !== null && _ref2 !== void 0 ? _ref2 : 1;
var mergedRowSpan = (_ref4 = (_ref5 = (_legacyCellProps$rowS = legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.rowSpan) !== null && _legacyCellProps$rowS !== void 0 ? _legacyCellProps$rowS : additionalProps.rowSpan) !== null && _ref5 !== void 0 ? _ref5 : rowSpan) !== null && _ref4 !== void 0 ? _ref4 : 1;
// ====================== Hover =======================
var _useHoverState = useHoverState(index, mergedRowSpan),
_useHoverState2 = (0,slicedToArray["default"])(_useHoverState, 2),
hovering = _useHoverState2[0],
onHover = _useHoverState2[1];
var onMouseEnter = (0,rc_util_es.useEvent)(function (event) {
var _additionalProps$onMo;
if (record) {
onHover(index, index + mergedRowSpan - 1);
}
additionalProps === null || additionalProps === void 0 || (_additionalProps$onMo = additionalProps.onMouseEnter) === null || _additionalProps$onMo === void 0 || _additionalProps$onMo.call(additionalProps, event);
});
var onMouseLeave = (0,rc_util_es.useEvent)(function (event) {
var _additionalProps$onMo2;
if (record) {
onHover(-1, -1);
}
additionalProps === null || additionalProps === void 0 || (_additionalProps$onMo2 = additionalProps.onMouseLeave) === null || _additionalProps$onMo2 === void 0 || _additionalProps$onMo2.call(additionalProps, event);
});
// ====================== Render ======================
if (mergedColSpan === 0 || mergedRowSpan === 0) {
return null;
}
// >>>>> Title
var title = (_additionalProps$titl = additionalProps.title) !== null && _additionalProps$titl !== void 0 ? _additionalProps$titl : getTitleFromCellRenderChildren({
rowType: rowType,
ellipsis: ellipsis,
children: childNode
});
// >>>>> ClassName
var mergedClassName = classnames_default()(cellPrefixCls, className, (_classNames = {}, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])(_classNames, "".concat(cellPrefixCls, "-fix-left"), isFixLeft && supportSticky), "".concat(cellPrefixCls, "-fix-left-first"), firstFixLeft && supportSticky), "".concat(cellPrefixCls, "-fix-left-last"), lastFixLeft && supportSticky), "".concat(cellPrefixCls, "-fix-left-all"), lastFixLeft && allColumnsFixedLeft && supportSticky), "".concat(cellPrefixCls, "-fix-right"), isFixRight && supportSticky), "".concat(cellPrefixCls, "-fix-right-first"), firstFixRight && supportSticky), "".concat(cellPrefixCls, "-fix-right-last"), lastFixRight && supportSticky), "".concat(cellPrefixCls, "-ellipsis"), ellipsis), "".concat(cellPrefixCls, "-with-append"), appendNode), "".concat(cellPrefixCls, "-fix-sticky"), (isFixLeft || isFixRight) && isSticky && supportSticky), (0,defineProperty["default"])(_classNames, "".concat(cellPrefixCls, "-row-hover"), !legacyCellProps && hovering)), additionalProps.className, legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.className);
// >>>>> Style
var alignStyle = {};
if (align) {
alignStyle.textAlign = align;
}
// The order is important since user can overwrite style.
// For example ant-design/ant-design#51763
var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.style), fixedStyle), alignStyle), additionalProps.style);
// >>>>> Children Node
var mergedChildNode = childNode;
// Not crash if final `childNode` is not validate ReactNode
if ((0,esm_typeof["default"])(mergedChildNode) === 'object' && !Array.isArray(mergedChildNode) && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedChildNode)) {
mergedChildNode = null;
}
if (ellipsis && (lastFixLeft || firstFixRight)) {
mergedChildNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(cellPrefixCls, "-content")
}, mergedChildNode);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, legacyCellProps, additionalProps, {
className: mergedClassName,
style: mergedStyle
// A11y
,
title: title,
scope: scope
// Hover
,
onMouseEnter: rowHoverable ? onMouseEnter : undefined,
onMouseLeave: rowHoverable ? onMouseLeave : undefined
//Span
,
colSpan: mergedColSpan !== 1 ? mergedColSpan : null,
rowSpan: mergedRowSpan !== 1 ? mergedRowSpan : null
}), appendNode, mergedChildNode);
}
/* harmony default export */ var es_Cell = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(Cell_Cell));
;// ./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[direction === 'rtl' ? colEnd : colStart];
} else if (endColumn.fixed === 'right') {
fixRight = stickyOffsets.right[direction === 'rtl' ? colStart : colEnd];
}
var lastFixLeft = false;
var firstFixRight = false;
var lastFixRight = false;
var firstFixLeft = false;
var nextColumn = columns[colEnd + 1];
var prevColumn = columns[colStart - 1];
// need show shadow only when canLastFix is true
var canLastFix = nextColumn && !nextColumn.fixed || prevColumn && !prevColumn.fixed || columns.every(function (col) {
return col.fixed === 'left';
});
if (direction === 'rtl') {
if (fixLeft !== undefined) {
var prevFixLeft = prevColumn && prevColumn.fixed === 'left';
firstFixLeft = !prevFixLeft && canLastFix;
} else if (fixRight !== undefined) {
var nextFixRight = nextColumn && nextColumn.fixed === 'right';
lastFixRight = !nextFixRight && canLastFix;
}
} else if (fixLeft !== undefined) {
var nextFixLeft = nextColumn && nextColumn.fixed === 'left';
lastFixLeft = !nextFixLeft && canLastFix;
} else if (fixRight !== undefined) {
var prevFixRight = prevColumn && prevColumn.fixed === 'right';
firstFixRight = !prevFixRight && canLastFix;
}
return {
fixLeft: fixLeft,
fixRight: fixRight,
lastFixLeft: lastFixLeft,
firstFixRight: firstFixRight,
lastFixRight: lastFixRight,
firstFixLeft: firstFixLeft,
isSticky: stickyOffsets.isSticky
};
}
;// ./node_modules/rc-table/es/Footer/SummaryContext.js
var SummaryContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
/* harmony default export */ var Footer_SummaryContext = (SummaryContext);
;// ./node_modules/rc-table/es/Footer/Cell.js
function SummaryCell(_ref) {
var className = _ref.className,
index = _ref.index,
children = _ref.children,
_ref$colSpan = _ref.colSpan,
colSpan = _ref$colSpan === void 0 ? 1 : _ref$colSpan,
rowSpan = _ref.rowSpan,
align = _ref.align;
var _useContext = useContext(context_TableContext, ['prefixCls', 'direction']),
prefixCls = _useContext.prefixCls,
direction = _useContext.direction;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(Footer_SummaryContext),
scrollColumnIndex = _React$useContext.scrollColumnIndex,
stickyOffsets = _React$useContext.stickyOffsets,
flattenColumns = _React$useContext.flattenColumns;
var lastIndex = index + colSpan - 1;
var mergedColSpan = lastIndex + 1 === scrollColumnIndex ? colSpan + 1 : colSpan;
var fixedInfo = getCellFixedInfo(index, index + mergedColSpan - 1, flattenColumns, stickyOffsets, direction);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({
className: className,
index: index,
component: "td",
prefixCls: prefixCls,
record: null,
dataIndex: null,
align: align,
colSpan: mergedColSpan,
rowSpan: rowSpan,
render: function render() {
return children;
}
}, fixedInfo));
}
;// ./node_modules/rc-table/es/Footer/Row.js
var Row_excluded = ["children"];
function FooterRow(_ref) {
var children = _ref.children,
props = (0,objectWithoutProperties["default"])(_ref, Row_excluded);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", props, children);
}
;// ./node_modules/rc-table/es/Footer/Summary.js
/**
* Syntactic sugar. Do not support HOC.
*/
function Summary(_ref) {
var children = _ref.children;
return children;
}
Summary.Row = FooterRow;
Summary.Cell = SummaryCell;
/* harmony default export */ var Footer_Summary = (Summary);
;// ./node_modules/rc-table/es/Footer/index.js
function es_Footer_Footer(props) {
if (true) {
hooks_useRenderTimes(props);
}
var children = props.children,
stickyOffsets = props.stickyOffsets,
flattenColumns = props.flattenColumns;
var prefixCls = useContext(context_TableContext, 'prefixCls');
var lastColumnIndex = flattenColumns.length - 1;
var scrollColumn = flattenColumns[lastColumnIndex];
var summaryContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
stickyOffsets: stickyOffsets,
flattenColumns: flattenColumns,
scrollColumnIndex: scrollColumn !== null && scrollColumn !== void 0 && scrollColumn.scrollbar ? lastColumnIndex : null
};
}, [scrollColumn, flattenColumns, lastColumnIndex, stickyOffsets]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer_SummaryContext.Provider, {
value: summaryContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tfoot", {
className: "".concat(prefixCls, "-summary")
}, children));
}
/* harmony default export */ var es_Footer = (TableContext_responseImmutable(es_Footer_Footer));
var FooterComponents = Footer_Summary;
;// ./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_Column(_) {
return null;
}
/* harmony default export */ var sugar_Column = (Column_Column);
;// ./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);
;// ./node_modules/rc-table/es/hooks/useFlattenRecords.js
// recursion (flat tree structure)
function fillRecords(list, record, indent, childrenColumnName, expandedKeys, getRowKey, index) {
list.push({
record: record,
indent: indent,
index: index
});
var key = getRowKey(record);
var expanded = expandedKeys === null || expandedKeys === void 0 ? void 0 : expandedKeys.has(key);
if (record && Array.isArray(record[childrenColumnName]) && expanded) {
// expanded state, flat record
for (var i = 0; i < record[childrenColumnName].length; i += 1) {
fillRecords(list, record[childrenColumnName][i], indent + 1, childrenColumnName, expandedKeys, getRowKey, i);
}
}
}
/**
* flat tree data on expanded state
*
* @export
* @template T
* @param {*} data : table data
* @param {string} childrenColumnName : 指定树形结构的列名
* @param {Set<Key>} expandedKeys : 展开的行对应的keys
* @param {GetRowKey<T>} getRowKey : 获取当前rowKey的方法
* @returns flattened data
*/
function useFlattenRecords(data, childrenColumnName, expandedKeys, getRowKey) {
var arr = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (expandedKeys !== null && expandedKeys !== void 0 && expandedKeys.size) {
var list = [];
// collect flattened record
for (var i = 0; i < (data === null || data === void 0 ? void 0 : data.length); i += 1) {
var record = data[i];
// using array.push or spread operator may cause "Maximum call stack size exceeded" exception if array size is big enough.
fillRecords(list, record, 0, childrenColumnName, expandedKeys, getRowKey, i);
}
return list;
}
return data === null || data === void 0 ? void 0 : data.map(function (item, index) {
return {
record: item,
indent: 0,
index: index
};
});
}, [data, childrenColumnName, expandedKeys, getRowKey]);
return arr;
}
;// ./node_modules/rc-table/es/hooks/useRowInfo.js
function useRowInfo(record, rowKey, recordIndex, indent) {
var context = useContext(context_TableContext, ['prefixCls', 'fixedInfoList', 'flattenColumns', 'expandableType', 'expandRowByClick', 'onTriggerExpand', 'rowClassName', 'expandedRowClassName', 'indentSize', 'expandIcon', 'expandedRowRender', 'expandIconColumnIndex', 'expandedKeys', 'childrenColumnName', 'rowExpandable', 'onRow']);
var flattenColumns = context.flattenColumns,
expandableType = context.expandableType,
expandedKeys = context.expandedKeys,
childrenColumnName = context.childrenColumnName,
onTriggerExpand = context.onTriggerExpand,
rowExpandable = context.rowExpandable,
onRow = context.onRow,
expandRowByClick = context.expandRowByClick,
rowClassName = context.rowClassName;
// ======================= Expandable =======================
// Only when row is not expandable and `children` exist in record
var nestExpandable = expandableType === 'nest';
var rowSupportExpand = expandableType === 'row' && (!rowExpandable || rowExpandable(record));
var mergedExpandable = rowSupportExpand || nestExpandable;
var expanded = expandedKeys && expandedKeys.has(rowKey);
var hasNestChildren = childrenColumnName && record && record[childrenColumnName];
var onInternalTriggerExpand = (0,rc_util_es.useEvent)(onTriggerExpand);
// ========================= onRow ==========================
var rowProps = onRow === null || onRow === void 0 ? void 0 : onRow(record, recordIndex);
var onRowClick = rowProps === null || rowProps === void 0 ? void 0 : rowProps.onClick;
var onClick = function onClick(event) {
if (expandRowByClick && mergedExpandable) {
onTriggerExpand(record, event);
}
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
onRowClick === null || onRowClick === void 0 || onRowClick.apply(void 0, [event].concat(args));
};
// ====================== RowClassName ======================
var computeRowClassName;
if (typeof rowClassName === 'string') {
computeRowClassName = rowClassName;
} else if (typeof rowClassName === 'function') {
computeRowClassName = rowClassName(record, recordIndex, indent);
}
// ========================= Column =========================
var columnsKey = getColumnsKey(flattenColumns);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, context), {}, {
columnsKey: columnsKey,
nestExpandable: nestExpandable,
expanded: expanded,
hasNestChildren: hasNestChildren,
record: record,
onTriggerExpand: onInternalTriggerExpand,
rowSupportExpand: rowSupportExpand,
expandable: mergedExpandable,
rowProps: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rowProps), {}, {
className: classnames_default()(computeRowClassName, rowProps === null || rowProps === void 0 ? void 0 : rowProps.className),
onClick: onClick
})
});
}
;// ./node_modules/rc-table/es/Body/ExpandedRow.js
function ExpandedRow(props) {
if (true) {
hooks_useRenderTimes(props);
}
var prefixCls = props.prefixCls,
children = props.children,
Component = props.component,
cellComponent = props.cellComponent,
className = props.className,
expanded = props.expanded,
colSpan = props.colSpan,
isEmpty = props.isEmpty;
var _useContext = useContext(context_TableContext, ['scrollbarSize', 'fixHeader', 'fixColumn', 'componentWidth', 'horizonScroll']),
scrollbarSize = _useContext.scrollbarSize,
fixHeader = _useContext.fixHeader,
fixColumn = _useContext.fixColumn,
componentWidth = _useContext.componentWidth,
horizonScroll = _useContext.horizonScroll;
// Cache render node
var contentNode = children;
if (isEmpty ? horizonScroll && componentWidth : fixColumn) {
contentNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
width: componentWidth - (fixHeader && !isEmpty ? scrollbarSize : 0),
position: 'sticky',
left: 0,
overflow: 'hidden'
},
className: "".concat(prefixCls, "-expanded-row-fixed")
}, contentNode);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
className: className,
style: {
display: expanded ? null : 'none'
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, {
component: cellComponent,
prefixCls: prefixCls,
colSpan: colSpan
}, contentNode));
}
/* harmony default export */ var Body_ExpandedRow = (ExpandedRow);
;// ./node_modules/rc-table/es/utils/expandUtil.js
function renderExpandIcon(_ref) {
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 /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(expandClassName, "".concat(prefixCls, "-row-spaced"))
});
}
var onClick = function onClick(event) {
onExpand(record, event);
event.stopPropagation();
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(expandClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-row-expanded"), expanded), "".concat(prefixCls, "-row-collapsed"), !expanded)),
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;
}
function computedExpandedClassName(cls, record, index, indent) {
if (typeof cls === 'string') {
return cls;
}
if (typeof cls === 'function') {
return cls(record, index, indent);
}
return '';
}
;// ./node_modules/rc-table/es/Body/BodyRow.js
// ==================================================================================
// == getCellProps ==
// ==================================================================================
function getCellProps(rowInfo, column, colIndex, indent, index) {
var record = rowInfo.record,
prefixCls = rowInfo.prefixCls,
columnsKey = rowInfo.columnsKey,
fixedInfoList = rowInfo.fixedInfoList,
expandIconColumnIndex = rowInfo.expandIconColumnIndex,
nestExpandable = rowInfo.nestExpandable,
indentSize = rowInfo.indentSize,
expandIcon = rowInfo.expandIcon,
expanded = rowInfo.expanded,
hasNestChildren = rowInfo.hasNestChildren,
onTriggerExpand = rowInfo.onTriggerExpand;
var key = columnsKey[colIndex];
var fixedInfo = fixedInfoList[colIndex];
// ============= Used for nest expandable =============
var appendCellNode;
if (colIndex === (expandIconColumnIndex || 0) && nestExpandable) {
appendCellNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_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 {
key: key,
fixedInfo: fixedInfo,
appendCellNode: appendCellNode,
additionalCellProps: additionalCellProps || {}
};
}
// ==================================================================================
// == getCellProps ==
// ==================================================================================
function BodyRow(props) {
if (true) {
hooks_useRenderTimes(props);
}
var className = props.className,
style = props.style,
record = props.record,
index = props.index,
renderIndex = props.renderIndex,
rowKey = props.rowKey,
_props$indent = props.indent,
indent = _props$indent === void 0 ? 0 : _props$indent,
RowComponent = props.rowComponent,
cellComponent = props.cellComponent,
scopeCellComponent = props.scopeCellComponent;
var rowInfo = useRowInfo(record, rowKey, index, indent);
var prefixCls = rowInfo.prefixCls,
flattenColumns = rowInfo.flattenColumns,
expandedRowClassName = rowInfo.expandedRowClassName,
expandedRowRender = rowInfo.expandedRowRender,
rowProps = rowInfo.rowProps,
expanded = rowInfo.expanded,
rowSupportExpand = rowInfo.rowSupportExpand;
// Force render expand row if expanded before
var expandedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
expandedRef.current || (expandedRef.current = expanded);
if (true) {
hooks_useRenderTimes(props);
}
// 若没有 expandedRowRender 参数, 将使用 baseRowNode 渲染 Children
// 此时如果 level > 1 则说明是 expandedRow, 一样需要附加 computedExpandedRowClassName
var expandedClsName = computedExpandedClassName(expandedRowClassName, record, index, indent);
// ======================== Base tr row ========================
var baseRowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, (0,esm_extends["default"])({}, rowProps, {
"data-row-key": rowKey,
className: classnames_default()(className, "".concat(prefixCls, "-row"), "".concat(prefixCls, "-row-level-").concat(indent), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className, (0,defineProperty["default"])({}, expandedClsName, indent >= 1)),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), rowProps === null || rowProps === void 0 ? void 0 : rowProps.style)
}), flattenColumns.map(function (column, colIndex) {
var render = column.render,
dataIndex = column.dataIndex,
columnClassName = column.className;
var _getCellProps = getCellProps(rowInfo, column, colIndex, indent, index),
key = _getCellProps.key,
fixedInfo = _getCellProps.fixedInfo,
appendCellNode = _getCellProps.appendCellNode,
additionalCellProps = _getCellProps.additionalCellProps;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({
className: columnClassName,
ellipsis: column.ellipsis,
align: column.align,
scope: column.rowScope,
component: column.rowScope ? scopeCellComponent : cellComponent,
prefixCls: prefixCls,
key: key,
record: record,
index: index,
renderIndex: renderIndex,
dataIndex: dataIndex,
render: render,
shouldCellUpdate: column.shouldCellUpdate
}, fixedInfo, {
appendNode: appendCellNode,
additionalProps: additionalCellProps
}));
}));
// ======================== Expand Row =========================
var expandRowNode;
if (rowSupportExpand && (expandedRef.current || expanded)) {
var expandContent = expandedRowRender(record, index, indent + 1, expanded);
expandRowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Body_ExpandedRow, {
expanded: expanded,
className: classnames_default()("".concat(prefixCls, "-expanded-row"), "".concat(prefixCls, "-expanded-row-level-").concat(indent + 1), expandedClsName),
prefixCls: prefixCls,
component: RowComponent,
cellComponent: cellComponent,
colSpan: flattenColumns.length,
isEmpty: false
}, expandContent);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, baseRowNode, expandRowNode);
}
if (true) {
BodyRow.displayName = 'BodyRow';
}
/* harmony default export */ var Body_BodyRow = (TableContext_responseImmutable(BodyRow));
;// ./node_modules/rc-table/es/Body/MeasureCell.js
function MeasureCell(_ref) {
var columnKey = _ref.columnKey,
onColumnResize = _ref.onColumnResize;
var cellRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (cellRef.current) {
onColumnResize(columnKey, cellRef.current.offsetWidth);
}
}, []);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
data: columnKey
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("td", {
ref: cellRef,
style: {
padding: 0,
border: 0,
height: 0
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
height: 0,
overflow: 'hidden'
}
}, "\xA0")));
}
;// ./node_modules/rc-table/es/Body/MeasureRow.js
function MeasureRow(_ref) {
var prefixCls = _ref.prefixCls,
columnsKey = _ref.columnsKey,
onColumnResize = _ref.onColumnResize;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
"aria-hidden": "true",
className: "".concat(prefixCls, "-measure-row"),
style: {
height: 0,
fontSize: 0
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es.Collection, {
onBatchResize: function onBatchResize(infoList) {
infoList.forEach(function (_ref2) {
var columnKey = _ref2.data,
size = _ref2.size;
onColumnResize(columnKey, size.offsetWidth);
});
}
}, columnsKey.map(function (columnKey) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureCell, {
key: columnKey,
columnKey: columnKey,
onColumnResize: onColumnResize
});
})));
}
;// ./node_modules/rc-table/es/Body/index.js
function Body(props) {
if (true) {
hooks_useRenderTimes(props);
}
var data = props.data,
measureColumnWidth = props.measureColumnWidth;
var _useContext = useContext(context_TableContext, ['prefixCls', 'getComponent', 'onColumnResize', 'flattenColumns', 'getRowKey', 'expandedKeys', 'childrenColumnName', 'emptyNode']),
prefixCls = _useContext.prefixCls,
getComponent = _useContext.getComponent,
onColumnResize = _useContext.onColumnResize,
flattenColumns = _useContext.flattenColumns,
getRowKey = _useContext.getRowKey,
expandedKeys = _useContext.expandedKeys,
childrenColumnName = _useContext.childrenColumnName,
emptyNode = _useContext.emptyNode;
var flattenData = useFlattenRecords(data, childrenColumnName, expandedKeys, getRowKey);
// =================== Performance ====================
var perfRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
renderWithProps: false
});
// ====================== Render ======================
var WrapperComponent = getComponent(['body', 'wrapper'], 'tbody');
var trComponent = getComponent(['body', 'row'], 'tr');
var tdComponent = getComponent(['body', 'cell'], 'td');
var thComponent = getComponent(['body', 'cell'], 'th');
var rows;
if (data.length) {
rows = flattenData.map(function (item, idx) {
var record = item.record,
indent = item.indent,
renderIndex = item.index;
var key = getRowKey(record, idx);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Body_BodyRow, {
key: key,
rowKey: key,
record: record,
index: idx,
renderIndex: renderIndex,
rowComponent: trComponent,
cellComponent: tdComponent,
scopeCellComponent: thComponent,
indent: indent
});
});
} else {
rows = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Body_ExpandedRow, {
expanded: true,
className: "".concat(prefixCls, "-placeholder"),
prefixCls: prefixCls,
component: trComponent,
cellComponent: tdComponent,
colSpan: flattenColumns.length,
isEmpty: true
}, emptyNode);
}
var columnsKey = getColumnsKey(flattenColumns);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_PerfContext.Provider, {
value: perfRef.current
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WrapperComponent, {
className: "".concat(prefixCls, "-tbody")
}, measureColumnWidth && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureRow, {
prefixCls: prefixCls,
columnsKey: columnsKey,
onColumnResize: onColumnResize
}), rows));
}
if (true) {
Body.displayName = 'Body';
}
/* harmony default export */ var es_Body = (TableContext_responseImmutable(Body));
;// ./node_modules/rc-table/es/utils/legacyUtil.js
var utils_legacyUtil_excluded = ["expandable"];
var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';
function getExpandableProps(props) {
var expandable = props.expandable,
legacyExpandableConfig = (0,objectWithoutProperties["default"])(props, utils_legacyUtil_excluded);
var config;
if ('expandable' in props) {
config = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, legacyExpandableConfig), expandable);
} else {
if ( true && ['indentSize', 'expandedRowKeys', 'defaultExpandedRowKeys', 'defaultExpandAllRows', 'expandedRowRender', 'expandRowByClick', 'expandIcon', 'onExpand', 'onExpandedRowsChange', 'expandedRowClassName', 'expandIconColumnIndex', 'showExpandColumn', 'title'].some(function (prop) {
return prop in props;
})) {
(0,warning["default"])(false, 'expanded related props have been moved into `expandable`.');
}
config = legacyExpandableConfig;
}
if (config.showExpandColumn === false) {
config.expandIconColumnIndex = -1;
}
return config;
}
;// ./node_modules/rc-table/es/ColGroup.js
var ColGroup_excluded = ["columnType"];
function ColGroup(_ref) {
var colWidths = _ref.colWidths,
columns = _ref.columns,
columCount = _ref.columCount;
var _useContext = useContext(context_TableContext, ['tableLayout']),
tableLayout = _useContext.tableLayout;
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 = void 0;
var minWidth = void 0;
if (column) {
additionalProps = column[INTERNAL_COL_DEFINE];
// fixed will cause layout problems
if (tableLayout === 'auto') {
minWidth = column.minWidth;
}
}
if (width || minWidth || additionalProps || mustInsert) {
var _ref2 = additionalProps || {},
columnType = _ref2.columnType,
restAdditionalProps = (0,objectWithoutProperties["default"])(_ref2, ColGroup_excluded);
cols.unshift( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("col", (0,esm_extends["default"])({
key: i,
style: {
width: width,
minWidth: minWidth
}
}, restAdditionalProps)));
mustInsert = true;
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("colgroup", null, cols);
}
/* harmony default export */ var es_ColGroup = (ColGroup);
;// ./node_modules/rc-table/es/FixedHolder/index.js
var FixedHolder_excluded = ["className", "noData", "columns", "flattenColumns", "colWidths", "columCount", "stickyOffsets", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName", "onScroll", "maxContentScroll", "children"];
function useColumnWidth(colWidths, columCount) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_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 FixedHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
if (true) {
hooks_useRenderTimes(props);
}
var className = props.className,
noData = props.noData,
columns = props.columns,
flattenColumns = props.flattenColumns,
colWidths = props.colWidths,
columCount = props.columCount,
stickyOffsets = props.stickyOffsets,
direction = props.direction,
fixHeader = props.fixHeader,
stickyTopOffset = props.stickyTopOffset,
stickyBottomOffset = props.stickyBottomOffset,
stickyClassName = props.stickyClassName,
onScroll = props.onScroll,
maxContentScroll = props.maxContentScroll,
children = props.children,
restProps = (0,objectWithoutProperties["default"])(props, FixedHolder_excluded);
var _useContext = useContext(context_TableContext, ['prefixCls', 'scrollbarSize', 'isSticky', 'getComponent']),
prefixCls = _useContext.prefixCls,
scrollbarSize = _useContext.scrollbarSize,
isSticky = _useContext.isSticky,
getComponent = _useContext.getComponent;
var TableComponent = getComponent(['header', 'table'], 'table');
var combinationScrollBarSize = isSticky && !fixHeader ? 0 : scrollbarSize;
// Pass wheel to scroll event
var scrollRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var setScrollRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (element) {
(0,es_ref.fillRef)(ref, element);
(0,es_ref.fillRef)(scrollRef, element);
}, []);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var _scrollRef$current;
function onWheel(e) {
var _ref = e,
currentTarget = _ref.currentTarget,
deltaX = _ref.deltaX;
if (deltaX) {
onScroll({
currentTarget: currentTarget,
scrollLeft: currentTarget.scrollLeft + deltaX
});
e.preventDefault();
}
}
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.addEventListener('wheel', onWheel, {
passive: false
});
return function () {
var _scrollRef$current2;
(_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || _scrollRef$current2.removeEventListener('wheel', onWheel);
};
}, []);
// Check if all flattenColumns has width
var allFlattenColumnsWithWidth = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return flattenColumns.every(function (column) {
return column.width;
});
}, [flattenColumns]);
// Add scrollbar column
var lastColumn = flattenColumns[flattenColumns.length - 1];
var ScrollBarColumn = {
fixed: lastColumn ? lastColumn.fixed : null,
scrollbar: true,
onHeaderCell: function onHeaderCell() {
return {
className: "".concat(prefixCls, "-cell-scrollbar")
};
}
};
var columnsWithScrollbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return combinationScrollBarSize ? [].concat((0,toConsumableArray["default"])(columns), [ScrollBarColumn]) : columns;
}, [combinationScrollBarSize, columns]);
var flattenColumnsWithScrollbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return combinationScrollBarSize ? [].concat((0,toConsumableArray["default"])(flattenColumns), [ScrollBarColumn]) : flattenColumns;
}, [combinationScrollBarSize, flattenColumns]);
// Calculate the sticky offsets
var headerStickyOffsets = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var right = stickyOffsets.right,
left = stickyOffsets.left;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, stickyOffsets), {}, {
left: direction === 'rtl' ? [].concat((0,toConsumableArray["default"])(left.map(function (width) {
return width + combinationScrollBarSize;
})), [0]) : left,
right: direction === 'rtl' ? right : [].concat((0,toConsumableArray["default"])(right.map(function (width) {
return width + combinationScrollBarSize;
})), [0]),
isSticky: isSticky
});
}, [combinationScrollBarSize, stickyOffsets, isSticky]);
var mergedColumnWidth = useColumnWidth(colWidths, columCount);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: (0,objectSpread2["default"])({
overflow: 'hidden'
}, isSticky ? {
top: stickyTopOffset,
bottom: stickyBottomOffset
} : {}),
ref: setScrollRef,
className: classnames_default()(className, (0,defineProperty["default"])({}, stickyClassName, !!stickyClassName))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, {
style: {
tableLayout: 'fixed',
visibility: noData || mergedColumnWidth ? null : 'hidden'
}
}, (!noData || !maxContentScroll || allFlattenColumnsWithWidth) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ColGroup, {
colWidths: mergedColumnWidth ? [].concat((0,toConsumableArray["default"])(mergedColumnWidth), [combinationScrollBarSize]) : [],
columCount: columCount + 1,
columns: flattenColumnsWithScrollbar
}), children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, restProps), {}, {
stickyOffsets: headerStickyOffsets,
columns: columnsWithScrollbar,
flattenColumns: flattenColumnsWithScrollbar
}))));
});
if (true) {
FixedHolder.displayName = 'FixedHolder';
}
/** Return a table in div as fixed element which contains sticky info */
// export default responseImmutable(FixedHolder);
/* harmony default export */ var es_FixedHolder = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(FixedHolder));
;// ./node_modules/rc-table/es/Header/HeaderRow.js
var HeaderRow = function HeaderRow(props) {
var cells = props.cells,
stickyOffsets = props.stickyOffsets,
flattenColumns = props.flattenColumns,
RowComponent = props.rowComponent,
CellComponent = props.cellComponent,
onHeaderRow = props.onHeaderRow,
index = props.index;
var _useContext = useContext(context_TableContext, ['prefixCls', 'direction']),
prefixCls = _useContext.prefixCls,
direction = _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 /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, 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 /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({}, cell, {
scope: column.title ? cell.colSpan > 1 ? 'colgroup' : 'col' : null,
ellipsis: column.ellipsis,
align: column.align,
component: CellComponent,
prefixCls: prefixCls,
key: columnsKey[cellIndex]
}, fixedInfo, {
additionalProps: additionalProps,
rowType: "header"
}));
}));
};
if (true) {
HeaderRow.displayName = 'HeaderRow';
}
/* harmony default export */ var Header_HeaderRow = (HeaderRow);
;// ./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;
}
var Header_Header = function Header(props) {
if (true) {
hooks_useRenderTimes(props);
}
var stickyOffsets = props.stickyOffsets,
columns = props.columns,
flattenColumns = props.flattenColumns,
onHeaderRow = props.onHeaderRow;
var _useContext = useContext(context_TableContext, ['prefixCls', 'getComponent']),
prefixCls = _useContext.prefixCls,
getComponent = _useContext.getComponent;
var rows = external_root_React_commonjs2_react_commonjs_react_amd_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 /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WrapperComponent, {
className: "".concat(prefixCls, "-thead")
}, rows.map(function (row, rowIndex) {
var rowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_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 es_Header_Header = (TableContext_responseImmutable(Header_Header));
;// ./node_modules/rc-table/es/hooks/useColumns/useWidthColumns.js
function parseColWidth(totalWidth) {
var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
if (typeof width === 'number') {
return width;
}
if (width.endsWith('%')) {
return totalWidth * parseFloat(width) / 100;
}
return null;
}
/**
* Fill all column with width
*/
function useWidthColumns(flattenColumns, scrollWidth, clientWidth) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// Fill width if needed
if (scrollWidth && scrollWidth > 0) {
var totalWidth = 0;
var missWidthCount = 0;
// collect not given width column
flattenColumns.forEach(function (col) {
var colWidth = parseColWidth(scrollWidth, col.width);
if (colWidth) {
totalWidth += colWidth;
} else {
missWidthCount += 1;
}
});
// Fill width
var maxFitWidth = Math.max(scrollWidth, clientWidth);
var restWidth = Math.max(maxFitWidth - totalWidth, missWidthCount);
var restCount = missWidthCount;
var avgWidth = restWidth / missWidthCount;
var realTotal = 0;
var filledColumns = flattenColumns.map(function (col) {
var clone = (0,objectSpread2["default"])({}, col);
var colWidth = parseColWidth(scrollWidth, clone.width);
if (colWidth) {
clone.width = colWidth;
} else {
var colAvgWidth = Math.floor(avgWidth);
clone.width = restCount === 1 ? restWidth : colAvgWidth;
restWidth -= colAvgWidth;
restCount -= 1;
}
realTotal += clone.width;
return clone;
});
// If realTotal is less than clientWidth,
// We need extend column width
if (realTotal < maxFitWidth) {
var scale = maxFitWidth / realTotal;
restWidth = maxFitWidth;
filledColumns.forEach(function (col, index) {
var colWidth = Math.floor(col.width * scale);
col.width = index === filledColumns.length - 1 ? restWidth : colWidth;
restWidth -= colWidth;
});
}
return [filledColumns, Math.max(realTotal, maxFitWidth)];
}
return [flattenColumns, scrollWidth];
}, [flattenColumns, scrollWidth, clientWidth]);
}
;// ./node_modules/rc-table/es/hooks/useColumns/index.js
var useColumns_excluded = ["children"],
useColumns_excluded2 = ["fixed"];
function convertChildrenToColumns(children) {
return (0,toArray["default"])(children).filter(function (node) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node);
}).map(function (_ref) {
var key = _ref.key,
props = _ref.props;
var nodeChildren = props.children,
restProps = (0,objectWithoutProperties["default"])(props, useColumns_excluded);
var column = (0,objectSpread2["default"])({
key: key
}, restProps);
if (nodeChildren) {
column.children = convertChildrenToColumns(nodeChildren);
}
return column;
});
}
function filterHiddenColumns(columns) {
return columns.filter(function (column) {
return column && (0,esm_typeof["default"])(column) === 'object' && !column.hidden;
}).map(function (column) {
var subColumns = column.children;
if (subColumns && subColumns.length > 0) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, column), {}, {
children: filterHiddenColumns(subColumns)
});
}
return column;
});
}
function flatColumns(columns) {
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key';
return columns.filter(function (column) {
return column && (0,esm_typeof["default"])(column) === 'object';
}).reduce(function (list, column, index) {
var fixed = column.fixed;
// Convert `fixed='true'` to `fixed='left'` instead
var parsedFixed = fixed === true ? 'left' : fixed;
var mergedKey = "".concat(parentKey, "-").concat(index);
var subColumns = column.children;
if (subColumns && subColumns.length > 0) {
return [].concat((0,toConsumableArray["default"])(list), (0,toConsumableArray["default"])(flatColumns(subColumns, mergedKey).map(function (subColum) {
return (0,objectSpread2["default"])({
fixed: parsedFixed
}, subColum);
})));
}
return [].concat((0,toConsumableArray["default"])(list), [(0,objectSpread2["default"])((0,objectSpread2["default"])({
key: mergedKey
}, column), {}, {
fixed: parsedFixed
})]);
}, []);
}
function revertForRtl(columns) {
return columns.map(function (column) {
var fixed = column.fixed,
restProps = (0,objectWithoutProperties["default"])(column, useColumns_excluded2);
// Convert `fixed='left'` to `fixed='right'` instead
var parsedFixed = fixed;
if (fixed === 'left') {
parsedFixed = 'right';
} else if (fixed === 'right') {
parsedFixed = 'left';
}
return (0,objectSpread2["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,
columnTitle = _ref2.columnTitle,
getRowKey = _ref2.getRowKey,
onTriggerExpand = _ref2.onTriggerExpand,
expandIcon = _ref2.expandIcon,
rowExpandable = _ref2.rowExpandable,
expandIconColumnIndex = _ref2.expandIconColumnIndex,
direction = _ref2.direction,
expandRowByClick = _ref2.expandRowByClick,
columnWidth = _ref2.columnWidth,
fixed = _ref2.fixed,
scrollWidth = _ref2.scrollWidth,
clientWidth = _ref2.clientWidth;
var baseColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var newColumns = columns || convertChildrenToColumns(children) || [];
return filterHiddenColumns(newColumns.slice());
}, [columns, children]);
// ========================== Expand ==========================
var withExpandColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (expandable) {
var cloneColumns = baseColumns.slice();
// >>> Warning if use `expandIconColumnIndex`
if ( true && expandIconColumnIndex >= 0) {
(0,warning["default"])(false, '`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead.');
}
// >>> Insert expand column if not exist
if (!cloneColumns.includes(EXPAND_COLUMN)) {
var expandColIndex = expandIconColumnIndex || 0;
if (expandColIndex >= 0 && (expandColIndex || fixed === 'left' || !fixed)) {
cloneColumns.splice(expandColIndex, 0, EXPAND_COLUMN);
}
if (fixed === 'right') {
cloneColumns.splice(baseColumns.length, 0, EXPAND_COLUMN);
}
}
// >>> Deduplicate additional expand column
if ( true && cloneColumns.filter(function (c) {
return c === EXPAND_COLUMN;
}).length > 1) {
(0,warning["default"])(false, 'There exist more than one `EXPAND_COLUMN` in `columns`.');
}
var expandColumnIndex = cloneColumns.indexOf(EXPAND_COLUMN);
cloneColumns = cloneColumns.filter(function (column, index) {
return column !== EXPAND_COLUMN || index === expandColumnIndex;
});
// >>> Check if expand column need to fixed
var prevColumn = baseColumns[expandColumnIndex];
var fixedColumn;
if (fixed) {
fixedColumn = fixed;
} else {
fixedColumn = prevColumn ? prevColumn.fixed : null;
}
// >>> Create expandable column
var expandColumn = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, INTERNAL_COL_DEFINE, {
className: "".concat(prefixCls, "-expand-icon-col"),
columnType: 'EXPAND_COLUMN'
}), "title", columnTitle), "fixed", fixedColumn), "className", "".concat(prefixCls, "-row-expand-icon-cell")), "width", columnWidth), "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 /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
onClick: function onClick(e) {
return e.stopPropagation();
}
}, icon);
}
return icon;
});
return cloneColumns.map(function (col) {
return col === EXPAND_COLUMN ? expandColumn : col;
});
}
if ( true && baseColumns.includes(EXPAND_COLUMN)) {
(0,warning["default"])(false, '`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`.');
}
return baseColumns.filter(function (col) {
return col !== EXPAND_COLUMN;
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [expandable, baseColumns, getRowKey, expandedKeys, expandIcon, direction]);
// ========================= Transform ========================
var mergedColumns = external_root_React_commonjs2_react_commonjs_react_amd_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;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [transformColumns, withExpandColumns, direction]);
// ========================== Flatten =========================
var flattenColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (direction === 'rtl') {
return revertForRtl(flatColumns(mergedColumns));
}
return flatColumns(mergedColumns);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [mergedColumns, direction, scrollWidth]);
// ========================= Gap Fixed ========================
var hasGapFixed = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// Fixed: left, since old browser not support `findLastIndex`, we should use reverse loop
var lastLeftIndex = -1;
for (var i = flattenColumns.length - 1; i >= 0; i -= 1) {
var colFixed = flattenColumns[i].fixed;
if (colFixed === 'left' || colFixed === true) {
lastLeftIndex = i;
break;
}
}
if (lastLeftIndex >= 0) {
for (var _i = 0; _i <= lastLeftIndex; _i += 1) {
var _colFixed = flattenColumns[_i].fixed;
if (_colFixed !== 'left' && _colFixed !== true) {
return true;
}
}
}
// Fixed: right
var firstRightIndex = flattenColumns.findIndex(function (_ref3) {
var colFixed = _ref3.fixed;
return colFixed === 'right';
});
if (firstRightIndex >= 0) {
for (var _i2 = firstRightIndex; _i2 < flattenColumns.length; _i2 += 1) {
var _colFixed2 = flattenColumns[_i2].fixed;
if (_colFixed2 !== 'right') {
return true;
}
}
}
return false;
}, [flattenColumns]);
// ========================= FillWidth ========================
var _useWidthColumns = useWidthColumns(flattenColumns, scrollWidth, clientWidth),
_useWidthColumns2 = (0,slicedToArray["default"])(_useWidthColumns, 2),
filledColumns = _useWidthColumns2[0],
realScrollWidth = _useWidthColumns2[1];
return [mergedColumns, filledColumns, realScrollWidth, hasGapFixed];
}
/* harmony default export */ var hooks_useColumns = (useColumns);
;// ./node_modules/rc-table/es/hooks/useExpand.js
function useExpand(props, mergedData, getRowKey) {
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,
childrenColumnName = expandableConfig.childrenColumnName;
var mergedExpandIcon = expandIcon || renderExpandIcon;
var mergedChildrenColumnName = childrenColumnName || 'children';
var expandableType = external_root_React_commonjs2_react_commonjs_react_amd_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 && props.internalHooks === INTERNAL_HOOKS && props.expandable.__PARENT_RENDER_ICON__ || mergedData.some(function (record) {
return record && (0,esm_typeof["default"])(record) === 'object' && record[mergedChildrenColumnName];
})) {
return 'nest';
}
/* eslint-enable */
return false;
}, [!!expandedRowRender, mergedData]);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
if (defaultExpandedRowKeys) {
return defaultExpandedRowKeys;
}
if (defaultExpandAllRows) {
return findAllChildrenKeys(mergedData, getRowKey, mergedChildrenColumnName);
}
return [];
}),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
innerExpandedKeys = _React$useState2[0],
setInnerExpandedKeys = _React$useState2[1];
var mergedExpandedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return new Set(expandedRowKeys || innerExpandedKeys || []);
}, [expandedRowKeys, innerExpandedKeys]);
var onTriggerExpand = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (record) {
var key = getRowKey(record, mergedData.indexOf(record));
var newExpandedKeys;
var hasKey = mergedExpandedKeys.has(key);
if (hasKey) {
mergedExpandedKeys.delete(key);
newExpandedKeys = (0,toConsumableArray["default"])(mergedExpandedKeys);
} else {
newExpandedKeys = [].concat((0,toConsumableArray["default"])(mergedExpandedKeys), [key]);
}
setInnerExpandedKeys(newExpandedKeys);
if (onExpand) {
onExpand(!hasKey, record);
}
if (onExpandedRowsChange) {
onExpandedRowsChange(newExpandedKeys);
}
}, [getRowKey, mergedExpandedKeys, mergedData, onExpand, onExpandedRowsChange]);
// Warning if use `expandedRowRender` and nest children in the same time
if ( true && expandedRowRender && mergedData.some(function (record) {
return Array.isArray(record === null || record === void 0 ? void 0 : record[mergedChildrenColumnName]);
})) {
(0,warning["default"])(false, '`expandedRowRender` should not use with nested Table');
}
return [expandableConfig, expandableType, mergedExpandedKeys, mergedExpandIcon, mergedChildrenColumnName, onTriggerExpand];
}
;// ./node_modules/rc-table/es/hooks/useFixedInfo.js
function useFixedInfo(flattenColumns, stickyOffsets, direction) {
var fixedInfoList = flattenColumns.map(function (_, colIndex) {
return getCellFixedInfo(colIndex, colIndex, flattenColumns, stickyOffsets, direction);
});
return (0,useMemo["default"])(function () {
return fixedInfoList;
}, [fixedInfoList], function (prev, next) {
return !(0,isEqual["default"])(prev, next);
});
}
;// ./node_modules/rc-table/es/hooks/useFrame.js
/**
* Execute code before next frame but async
*/
function useLayoutState(defaultState) {
var stateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(defaultState);
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
forceUpdate = _useState2[1];
var lastPromiseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var updateBatchRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
function setFrameState(updater) {
updateBatchRef.current.push(updater);
var promise = Promise.resolve();
lastPromiseRef.current = promise;
promise.then(function () {
if (lastPromiseRef.current === promise) {
var prevBatch = updateBatchRef.current;
var prevState = stateRef.current;
updateBatchRef.current = [];
prevBatch.forEach(function (batchUpdater) {
stateRef.current = batchUpdater(stateRef.current);
});
lastPromiseRef.current = null;
if (prevState !== stateRef.current) {
forceUpdate({});
}
}
});
}
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return function () {
lastPromiseRef.current = null;
};
}, []);
return [stateRef.current, setFrameState];
}
/** Lock frame, when frame pass reset the lock. */
function useTimeoutLock(defaultState) {
var frameRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(defaultState || null);
var timeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
function cleanUp() {
window.clearTimeout(timeoutRef.current);
}
function setState(newState) {
frameRef.current = newState;
cleanUp();
timeoutRef.current = window.setTimeout(function () {
frameRef.current = null;
timeoutRef.current = undefined;
}, 100);
}
function getState() {
return frameRef.current;
}
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return cleanUp;
}, []);
return [setState, getState];
}
;// ./node_modules/rc-table/es/hooks/useHover.js
function useHover() {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
startRow = _React$useState2[0],
setStartRow = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
endRow = _React$useState4[0],
setEndRow = _React$useState4[1];
var onHover = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (start, end) {
setStartRow(start);
setEndRow(end);
}, []);
return [startRow, endRow, onHover];
}
;// ./node_modules/rc-table/es/hooks/useSticky.js
// fix ssr render
var defaultContainer = (0,canUseDom["default"])() ? window : null;
/** Sticky header hooks */
function useSticky(sticky, prefixCls) {
var _ref = (0,esm_typeof["default"])(sticky) === 'object' ? sticky : {},
_ref$offsetHeader = _ref.offsetHeader,
offsetHeader = _ref$offsetHeader === void 0 ? 0 : _ref$offsetHeader,
_ref$offsetSummary = _ref.offsetSummary,
offsetSummary = _ref$offsetSummary === void 0 ? 0 : _ref$offsetSummary,
_ref$offsetScroll = _ref.offsetScroll,
offsetScroll = _ref$offsetScroll === void 0 ? 0 : _ref$offsetScroll,
_ref$getContainer = _ref.getContainer,
getContainer = _ref$getContainer === void 0 ? function () {
return defaultContainer;
} : _ref$getContainer;
var container = getContainer() || defaultContainer;
var isSticky = !!sticky;
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
isSticky: isSticky,
stickyClassName: isSticky ? "".concat(prefixCls, "-sticky-holder") : '',
offsetHeader: offsetHeader,
offsetSummary: offsetSummary,
offsetScroll: offsetScroll,
container: container
};
}, [isSticky, offsetScroll, offsetHeader, offsetSummary, prefixCls, container]);
}
;// ./node_modules/rc-table/es/hooks/useStickyOffsets.js
/**
* Get sticky column offset width
*/
function useStickyOffsets(colWidths, flattenColumns, direction) {
var stickyOffsets = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
var columnCount = flattenColumns.length;
var getOffsets = function getOffsets(startIndex, endIndex, offset) {
var offsets = [];
var total = 0;
for (var i = startIndex; i !== endIndex; i += offset) {
offsets.push(total);
if (flattenColumns[i].fixed) {
total += colWidths[i] || 0;
}
}
return offsets;
};
var startOffsets = getOffsets(0, columnCount, 1);
var endOffsets = getOffsets(columnCount - 1, -1, -1).reverse();
return direction === 'rtl' ? {
left: endOffsets,
right: startOffsets
} : {
left: startOffsets,
right: endOffsets
};
}, [colWidths, flattenColumns, direction]);
return stickyOffsets;
}
/* harmony default export */ var hooks_useStickyOffsets = (useStickyOffsets);
;// ./node_modules/rc-table/es/Panel/index.js
function es_Panel_Panel(_ref) {
var className = _ref.className,
children = _ref.children;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className
}, children);
}
/* harmony default export */ var es_Panel = (es_Panel_Panel);
;// ./node_modules/rc-table/es/utils/offsetUtil.js
// Copy from `rc-util/Dom/css.js`
function offsetUtil_getOffset(node) {
var element = (0,findDOMNode.getDOM)(node);
var box = element.getBoundingClientRect();
var docElem = document.documentElement;
// < ie8 not support win.pageXOffset, use docElem.scrollLeft instead
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)
};
}
;// ./node_modules/rc-table/es/stickyScrollBar.js
var StickyScrollBar = function StickyScrollBar(_ref, ref) {
var _scrollBodyRef$curren, _scrollBodyRef$curren2;
var scrollBodyRef = _ref.scrollBodyRef,
onScroll = _ref.onScroll,
offsetScroll = _ref.offsetScroll,
container = _ref.container,
direction = _ref.direction;
var prefixCls = useContext(context_TableContext, '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 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var _useLayoutState = useLayoutState({
scrollLeft: 0,
isHiddenScrollBar: true
}),
_useLayoutState2 = (0,slicedToArray["default"])(_useLayoutState, 2),
scrollState = _useLayoutState2[0],
setScrollState = _useLayoutState2[1];
var refState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
delta: 0,
x: 0
});
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
isActive = _React$useState2[0],
setActive = _React$useState2[1];
var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
raf["default"].cancel(rafRef.current);
};
}, []);
var onMouseUp = function onMouseUp() {
setActive(false);
};
var onMouseDown = function onMouseDown(event) {
event.persist();
refState.current.delta = event.pageX - scrollState.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;
var isRTL = direction === 'rtl';
// Limit scroll range
left = Math.max(isRTL ? scrollBarWidth - bodyWidth : 0, Math.min(isRTL ? 0 : bodyWidth - scrollBarWidth, left));
// Calculate the scroll position and update
var shouldScroll = !isRTL || Math.abs(left) + Math.abs(scrollBarWidth) < bodyWidth;
if (shouldScroll) {
onScroll({
scrollLeft: left / bodyWidth * (bodyScrollWidth + 2)
});
refState.current.x = event.pageX;
}
};
var checkScrollBarVisible = function checkScrollBarVisible() {
raf["default"].cancel(rafRef.current);
rafRef.current = (0,raf["default"])(function () {
if (!scrollBodyRef.current) {
return;
}
var tableOffsetTop = offsetUtil_getOffset(scrollBodyRef.current).top;
var tableBottomOffset = tableOffsetTop + scrollBodyRef.current.offsetHeight;
var currentClientOffset = container === window ? document.documentElement.scrollTop + window.innerHeight : offsetUtil_getOffset(container).top + container.clientHeight;
if (tableBottomOffset - getScrollBarSize() <= currentClientOffset || tableOffsetTop >= currentClientOffset - offsetScroll) {
setScrollState(function (state) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
isHiddenScrollBar: true
});
});
} else {
setScrollState(function (state) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
isHiddenScrollBar: false
});
});
}
});
};
var setScrollLeft = function setScrollLeft(left) {
setScrollState(function (state) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
scrollLeft: left / bodyScrollWidth * bodyWidth || 0
});
});
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
setScrollLeft: setScrollLeft,
checkScrollBarVisible: checkScrollBarVisible
};
});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
var onMouseUpListener = addEventListenerWrap(document.body, 'mouseup', onMouseUp, false);
var onMouseMoveListener = addEventListenerWrap(document.body, 'mousemove', onMouseMove, false);
checkScrollBarVisible();
return function () {
onMouseUpListener.remove();
onMouseMoveListener.remove();
};
}, [scrollBarWidth, isActive]);
// Loop for scroll event check
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!scrollBodyRef.current) return;
var scrollParents = [];
var parent = (0,findDOMNode.getDOM)(scrollBodyRef.current);
while (parent) {
scrollParents.push(parent);
parent = parent.parentElement;
}
scrollParents.forEach(function (p) {
return p.addEventListener('scroll', checkScrollBarVisible, false);
});
window.addEventListener('resize', checkScrollBarVisible, false);
window.addEventListener('scroll', checkScrollBarVisible, false);
container.addEventListener('scroll', checkScrollBarVisible, false);
return function () {
scrollParents.forEach(function (p) {
return p.removeEventListener('scroll', checkScrollBarVisible);
});
window.removeEventListener('resize', checkScrollBarVisible);
window.removeEventListener('scroll', checkScrollBarVisible);
container.removeEventListener('scroll', checkScrollBarVisible);
};
}, [container]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!scrollState.isHiddenScrollBar) {
setScrollState(function (state) {
var bodyNode = scrollBodyRef.current;
if (!bodyNode) {
return state;
}
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
scrollLeft: bodyNode.scrollLeft / bodyNode.scrollWidth * bodyNode.clientWidth
});
});
}
}, [scrollState.isHiddenScrollBar]);
if (bodyScrollWidth <= bodyWidth || !scrollBarWidth || scrollState.isHiddenScrollBar) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: {
height: getScrollBarSize(),
width: bodyWidth,
bottom: offsetScroll
},
className: "".concat(prefixCls, "-sticky-scroll")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
onMouseDown: onMouseDown,
ref: scrollBarRef,
className: classnames_default()("".concat(prefixCls, "-sticky-scroll-bar"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-sticky-scroll-bar-active"), isActive)),
style: {
width: "".concat(scrollBarWidth, "px"),
transform: "translate3d(".concat(scrollState.scrollLeft, "px, 0, 0)")
}
}));
};
/* harmony default export */ var stickyScrollBar = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(StickyScrollBar));
;// ./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
*/
var DEFAULT_PREFIX = 'rc-table';
// Used for conditions cache
var Table_EMPTY_DATA = [];
// Used for customize scroll
var EMPTY_SCROLL_TARGET = {};
function defaultEmpty() {
return 'No Data';
}
function Table(tableProps, ref) {
var props = (0,objectSpread2["default"])({
rowKey: 'key',
prefixCls: DEFAULT_PREFIX,
emptyText: defaultEmpty
}, tableProps);
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,
caption = props.caption,
id = props.id,
showHeader = props.showHeader,
components = props.components,
emptyText = props.emptyText,
onRow = props.onRow,
onHeaderRow = props.onHeaderRow,
onScroll = props.onScroll,
internalHooks = props.internalHooks,
transformColumns = props.transformColumns,
internalRefs = props.internalRefs,
tailor = props.tailor,
getContainerWidth = props.getContainerWidth,
sticky = props.sticky,
_props$rowHoverable = props.rowHoverable,
rowHoverable = _props$rowHoverable === void 0 ? true : _props$rowHoverable;
var mergedData = data || Table_EMPTY_DATA;
var hasData = !!mergedData.length;
var useInternalHooks = internalHooks === INTERNAL_HOOKS;
// ===================== Warning ======================
if (true) {
['onRowClick', 'onRowDoubleClick', 'onRowContextMenu', 'onRowMouseEnter', 'onRowMouseLeave'].forEach(function (name) {
(0,warning["default"])(props[name] === undefined, "`".concat(name, "` is removed, please use `onRow` instead."));
});
(0,warning["default"])(!('getBodyWrapper' in props), '`getBodyWrapper` is deprecated, please use custom `components` instead.');
}
// ==================== Customize =====================
var getComponent = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (path, defaultComponent) {
return (0,get["default"])(components, path) || defaultComponent;
}, [components]);
var getRowKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (typeof rowKey === 'function') {
return rowKey;
}
return function (record) {
var key = record && record[rowKey];
if (true) {
(0,warning["default"])(key !== undefined, 'Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key.');
}
return key;
};
}, [rowKey]);
var customizeScrollBody = getComponent(['body']);
// ====================== Hover =======================
var _useHover = useHover(),
_useHover2 = (0,slicedToArray["default"])(_useHover, 3),
startRow = _useHover2[0],
endRow = _useHover2[1],
onHover = _useHover2[2];
// ====================== Expand ======================
var _useExpand = useExpand(props, mergedData, getRowKey),
_useExpand2 = (0,slicedToArray["default"])(_useExpand, 6),
expandableConfig = _useExpand2[0],
expandableType = _useExpand2[1],
mergedExpandedKeys = _useExpand2[2],
mergedExpandIcon = _useExpand2[3],
mergedChildrenColumnName = _useExpand2[4],
onTriggerExpand = _useExpand2[5];
// ====================== Column ======================
var scrollX = scroll === null || scroll === void 0 ? void 0 : scroll.x;
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
componentWidth = _React$useState2[0],
setComponentWidth = _React$useState2[1];
var _useColumns = hooks_useColumns((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), expandableConfig), {}, {
expandable: !!expandableConfig.expandedRowRender,
columnTitle: expandableConfig.columnTitle,
expandedKeys: mergedExpandedKeys,
getRowKey: getRowKey,
// https://github.com/ant-design/ant-design/issues/23894
onTriggerExpand: onTriggerExpand,
expandIcon: mergedExpandIcon,
expandIconColumnIndex: expandableConfig.expandIconColumnIndex,
direction: direction,
scrollWidth: useInternalHooks && tailor && typeof scrollX === 'number' ? scrollX : null,
clientWidth: componentWidth
}), useInternalHooks ? transformColumns : null),
_useColumns2 = (0,slicedToArray["default"])(_useColumns, 4),
columns = _useColumns2[0],
flattenColumns = _useColumns2[1],
flattenScrollX = _useColumns2[2],
hasGapFixed = _useColumns2[3];
var mergedScrollX = flattenScrollX !== null && flattenScrollX !== void 0 ? flattenScrollX : scrollX;
var columnContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
columns: columns,
flattenColumns: flattenColumns
};
}, [columns, flattenColumns]);
// ======================= Refs =======================
var fullTableRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var scrollHeaderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var scrollBodyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var scrollBodyContainerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
nativeElement: fullTableRef.current,
scrollTo: function scrollTo(config) {
var _scrollBodyRef$curren3;
if (scrollBodyRef.current instanceof HTMLElement) {
// Native scroll
var index = config.index,
top = config.top,
key = config.key;
if (validNumberValue(top)) {
var _scrollBodyRef$curren;
(_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 || _scrollBodyRef$curren.scrollTo({
top: top
});
} else {
var _scrollBodyRef$curren2;
var mergedKey = key !== null && key !== void 0 ? key : getRowKey(mergedData[index]);
(_scrollBodyRef$curren2 = scrollBodyRef.current.querySelector("[data-row-key=\"".concat(mergedKey, "\"]"))) === null || _scrollBodyRef$curren2 === void 0 || _scrollBodyRef$curren2.scrollIntoView();
}
} else if ((_scrollBodyRef$curren3 = scrollBodyRef.current) !== null && _scrollBodyRef$curren3 !== void 0 && _scrollBodyRef$curren3.scrollTo) {
// Pass to proxy
scrollBodyRef.current.scrollTo(config);
}
}
};
});
// ====================== Scroll ======================
var scrollSummaryRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
pingedLeft = _React$useState4[0],
setPingedLeft = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
pingedRight = _React$useState6[0],
setPingedRight = _React$useState6[1];
var _useLayoutState = useLayoutState(new Map()),
_useLayoutState2 = (0,slicedToArray["default"])(_useLayoutState, 2),
colsWidths = _useLayoutState2[0],
updateColsWidths = _useLayoutState2[1];
// Convert map to number width
var colsKeys = getColumnsKey(flattenColumns);
var pureColWidths = colsKeys.map(function (columnKey) {
return colsWidths.get(columnKey);
});
var colWidths = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return pureColWidths;
}, [pureColWidths.join('_')]);
var stickyOffsets = hooks_useStickyOffsets(colWidths, flattenColumns, direction);
var fixHeader = scroll && validateValue(scroll.y);
var horizonScroll = scroll && validateValue(mergedScrollX) || Boolean(expandableConfig.fixed);
var fixColumn = horizonScroll && flattenColumns.some(function (_ref) {
var fixed = _ref.fixed;
return fixed;
});
// Sticky
var stickyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var _useSticky = useSticky(sticky, prefixCls),
isSticky = _useSticky.isSticky,
offsetHeader = _useSticky.offsetHeader,
offsetSummary = _useSticky.offsetSummary,
offsetScroll = _useSticky.offsetScroll,
stickyClassName = _useSticky.stickyClassName,
container = _useSticky.container;
// Footer (Fix footer must fixed header)
var summaryNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return summary === null || summary === void 0 ? void 0 : summary(mergedData);
}, [summary, mergedData]);
var fixFooter = (fixHeader || isSticky) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(summaryNode) && summaryNode.type === Footer_Summary && summaryNode.props.fixed;
// Scroll
var scrollXStyle;
var scrollYStyle;
var scrollTableStyle;
if (fixHeader) {
scrollYStyle = {
overflowY: hasData ? 'scroll' : 'auto',
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: mergedScrollX === true ? 'auto' : mergedScrollX,
minWidth: '100%'
};
}
var onColumnResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (columnKey, width) {
if (isVisible(fullTableRef.current)) {
updateColsWidths(function (widths) {
if (widths.get(columnKey) !== width) {
var newWidths = new Map(widths);
newWidths.set(columnKey, width);
return newWidths;
}
return widths;
});
}
}, []);
var _useTimeoutLock = useTimeoutLock(null),
_useTimeoutLock2 = (0,slicedToArray["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) {
target.scrollLeft = scrollLeft;
// Delay to force scroll position if not sync
// ref: https://github.com/ant-design/ant-design/issues/37179
if (target.scrollLeft !== scrollLeft) {
setTimeout(function () {
target.scrollLeft = scrollLeft;
}, 0);
}
}
}
var onInternalScroll = (0,useEvent["default"])(function (_ref2) {
var currentTarget = _ref2.currentTarget,
scrollLeft = _ref2.scrollLeft;
var isRTL = direction === 'rtl';
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, scrollSummaryRef.current);
forceScroll(mergedScrollLeft, (_stickyRef$current = stickyRef.current) === null || _stickyRef$current === void 0 ? void 0 : _stickyRef$current.setScrollLeft);
}
var measureTarget = currentTarget || scrollHeaderRef.current;
if (measureTarget) {
var scrollWidth =
// Should use mergedScrollX in virtual table(useInternalHooks && tailor === true)
useInternalHooks && tailor && typeof mergedScrollX === 'number' ? mergedScrollX : measureTarget.scrollWidth;
var clientWidth = measureTarget.clientWidth;
// There is no space to scroll
if (scrollWidth === clientWidth) {
setPingedLeft(false);
setPingedRight(false);
return;
}
if (isRTL) {
setPingedLeft(-mergedScrollLeft < scrollWidth - clientWidth);
setPingedRight(-mergedScrollLeft > 0);
} else {
setPingedLeft(mergedScrollLeft > 0);
setPingedRight(mergedScrollLeft < scrollWidth - clientWidth);
}
}
});
var onBodyScroll = (0,useEvent["default"])(function (e) {
onInternalScroll(e);
onScroll === null || onScroll === void 0 || onScroll(e);
});
var triggerOnScroll = function triggerOnScroll() {
if (horizonScroll && scrollBodyRef.current) {
var _scrollBodyRef$curren4;
onInternalScroll({
currentTarget: (0,findDOMNode.getDOM)(scrollBodyRef.current),
scrollLeft: (_scrollBodyRef$curren4 = scrollBodyRef.current) === null || _scrollBodyRef$curren4 === void 0 ? void 0 : _scrollBodyRef$curren4.scrollLeft
});
} else {
setPingedLeft(false);
setPingedRight(false);
}
};
var onFullTableResize = function onFullTableResize(_ref3) {
var _stickyRef$current2;
var width = _ref3.width;
(_stickyRef$current2 = stickyRef.current) === null || _stickyRef$current2 === void 0 || _stickyRef$current2.checkScrollBarVisible();
var mergedWidth = fullTableRef.current ? fullTableRef.current.offsetWidth : width;
if (useInternalHooks && getContainerWidth && fullTableRef.current) {
mergedWidth = getContainerWidth(fullTableRef.current, mergedWidth) || mergedWidth;
}
if (mergedWidth !== componentWidth) {
triggerOnScroll();
setComponentWidth(mergedWidth);
}
};
// Sync scroll bar when init or `horizonScroll`, `data` and `columns.length` changed
var mounted = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
// onFullTableResize will be trigger once when ResizeObserver is mounted
// This will reduce one duplicated triggerOnScroll time
if (mounted.current) {
triggerOnScroll();
}
}, [horizonScroll, data, columns.length]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
mounted.current = true;
}, []);
// ===================== Effects ======================
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
scrollbarSize = _React$useState8[0],
setScrollbarSize = _React$useState8[1];
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true),
_React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
supportSticky = _React$useState10[0],
setSupportSticky = _React$useState10[1]; // Only IE not support, we mark as support first
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!tailor || !useInternalHooks) {
if (scrollBodyRef.current instanceof Element) {
setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current).width);
} else {
setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current).width);
}
}
setSupportSticky(isStyleSupport('position', 'sticky'));
}, []);
// ================== INTERNAL HOOKS ==================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (useInternalHooks && internalRefs) {
internalRefs.body.current = scrollBodyRef.current;
}
});
// ========================================================================
// == Render ==
// ========================================================================
// =================== Render: Func ===================
var renderFixedHeaderTable = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (fixedHolderPassProps) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Header_Header, fixedHolderPassProps), fixFooter === 'top' && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, fixedHolderPassProps, summaryNode));
}, [fixFooter, summaryNode]);
var renderFixedFooterTable = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (fixedHolderPassProps) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, fixedHolderPassProps, summaryNode);
}, [summaryNode]);
// =================== Render: Node ===================
var TableComponent = getComponent(['table'], 'table');
// Table layout
var mergedTableLayout = external_root_React_commonjs2_react_commonjs_react_amd_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 mergedScrollX === 'max-content' ? 'auto' : 'fixed';
}
if (fixHeader || isSticky || flattenColumns.some(function (_ref4) {
var ellipsis = _ref4.ellipsis;
return ellipsis;
})) {
return 'fixed';
}
return 'auto';
}, [fixHeader, fixColumn, flattenColumns, tableLayout, isSticky]);
var groupTableNode;
// Header props
var headerProps = {
colWidths: colWidths,
columCount: flattenColumns.length,
stickyOffsets: stickyOffsets,
onHeaderRow: onHeaderRow,
fixHeader: fixHeader,
scroll: scroll
};
// Empty
var emptyNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (hasData) {
return null;
}
if (typeof emptyText === 'function') {
return emptyText();
}
return emptyText;
}, [hasData, emptyText]);
// Body
var bodyTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Body, {
data: mergedData,
measureColumnWidth: fixHeader || horizonScroll || isSticky
});
var bodyColGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ColGroup, {
colWidths: flattenColumns.map(function (_ref5) {
var width = _ref5.width;
return width;
}),
columns: flattenColumns
});
var captionElement = caption !== null && caption !== undefined ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("caption", {
className: "".concat(prefixCls, "-caption")
}, caption) : undefined;
var dataProps = (0,pickAttrs["default"])(props, {
data: true
});
var ariaProps = (0,pickAttrs["default"])(props, {
aria: true
});
if (fixHeader || isSticky) {
// >>>>>> Fixed Header
var bodyContent;
if (typeof customizeScrollBody === 'function') {
bodyContent = customizeScrollBody(mergedData, {
scrollbarSize: scrollbarSize,
ref: scrollBodyRef,
onScroll: onInternalScroll
});
headerProps.colWidths = flattenColumns.map(function (_ref6, index) {
var width = _ref6.width;
var colWidth = index === flattenColumns.length - 1 ? width - scrollbarSize : width;
if (typeof colWidth === 'number' && !Number.isNaN(colWidth)) {
return colWidth;
}
if (true) {
(0,warning["default"])(props.columns.length === 0, 'When use `components.body` with render props. Each column should have a fixed `width` value.');
}
return 0;
});
} else {
bodyContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollXStyle), scrollYStyle),
onScroll: onBodyScroll,
ref: scrollBodyRef,
className: classnames_default()("".concat(prefixCls, "-body"))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, (0,esm_extends["default"])({
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollTableStyle), {}, {
tableLayout: mergedTableLayout
})
}, ariaProps), captionElement, bodyColGroup, bodyTable, !fixFooter && summaryNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, {
stickyOffsets: stickyOffsets,
flattenColumns: flattenColumns
}, summaryNode)));
}
// Fixed holder share the props
var fixedHolderProps = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
noData: !mergedData.length,
maxContentScroll: horizonScroll && mergedScrollX === 'max-content'
}, headerProps), columnContext), {}, {
direction: direction,
stickyClassName: stickyClassName,
onScroll: onInternalScroll
});
groupTableNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, showHeader !== false && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_FixedHolder, (0,esm_extends["default"])({}, fixedHolderProps, {
stickyTopOffset: offsetHeader,
className: "".concat(prefixCls, "-header"),
ref: scrollHeaderRef
}), renderFixedHeaderTable), bodyContent, fixFooter && fixFooter !== 'top' && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_FixedHolder, (0,esm_extends["default"])({}, fixedHolderProps, {
stickyBottomOffset: offsetSummary,
className: "".concat(prefixCls, "-summary"),
ref: scrollSummaryRef
}), renderFixedFooterTable), isSticky && scrollBodyRef.current && scrollBodyRef.current instanceof Element && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(stickyScrollBar, {
ref: stickyRef,
offsetScroll: offsetScroll,
scrollBodyRef: scrollBodyRef,
onScroll: onInternalScroll,
container: container,
direction: direction
}));
} else {
// >>>>>> Unique table
groupTableNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollXStyle), scrollYStyle),
className: classnames_default()("".concat(prefixCls, "-content")),
onScroll: onInternalScroll,
ref: scrollBodyRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, (0,esm_extends["default"])({
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollTableStyle), {}, {
tableLayout: mergedTableLayout
})
}, ariaProps), captionElement, bodyColGroup, showHeader !== false && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Header_Header, (0,esm_extends["default"])({}, headerProps, columnContext)), bodyTable, summaryNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, {
stickyOffsets: stickyOffsets,
flattenColumns: flattenColumns
}, summaryNode)));
}
var fullTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
className: classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-ping-left"), pingedLeft), "".concat(prefixCls, "-ping-right"), pingedRight), "".concat(prefixCls, "-layout-fixed"), tableLayout === 'fixed'), "".concat(prefixCls, "-fixed-header"), fixHeader), "".concat(prefixCls, "-fixed-column"), fixColumn), "".concat(prefixCls, "-fixed-column-gapped"), fixColumn && hasGapFixed), "".concat(prefixCls, "-scroll-horizontal"), horizonScroll), "".concat(prefixCls, "-has-fix-left"), flattenColumns[0] && flattenColumns[0].fixed), "".concat(prefixCls, "-has-fix-right"), flattenColumns[flattenColumns.length - 1] && flattenColumns[flattenColumns.length - 1].fixed === 'right')),
style: style,
id: id,
ref: fullTableRef
}, dataProps), title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Panel, {
className: "".concat(prefixCls, "-title")
}, title(mergedData)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: scrollBodyContainerRef,
className: "".concat(prefixCls, "-container")
}, groupTableNode), footer && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Panel, {
className: "".concat(prefixCls, "-footer")
}, footer(mergedData)));
if (horizonScroll) {
fullTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onFullTableResize
}, fullTable);
}
var fixedInfoList = useFixedInfo(flattenColumns, stickyOffsets, direction);
var TableContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
// Scroll
scrollX: mergedScrollX,
// Table
prefixCls: prefixCls,
getComponent: getComponent,
scrollbarSize: scrollbarSize,
direction: direction,
fixedInfoList: fixedInfoList,
isSticky: isSticky,
supportSticky: supportSticky,
componentWidth: componentWidth,
fixHeader: fixHeader,
fixColumn: fixColumn,
horizonScroll: horizonScroll,
// Body
tableLayout: mergedTableLayout,
rowClassName: rowClassName,
expandedRowClassName: expandableConfig.expandedRowClassName,
expandIcon: mergedExpandIcon,
expandableType: expandableType,
expandRowByClick: expandableConfig.expandRowByClick,
expandedRowRender: expandableConfig.expandedRowRender,
onTriggerExpand: onTriggerExpand,
expandIconColumnIndex: expandableConfig.expandIconColumnIndex,
indentSize: expandableConfig.indentSize,
allColumnsFixedLeft: flattenColumns.every(function (col) {
return col.fixed === 'left';
}),
emptyNode: emptyNode,
// Column
columns: columns,
flattenColumns: flattenColumns,
onColumnResize: onColumnResize,
// Row
hoverStartRow: startRow,
hoverEndRow: endRow,
onHover: onHover,
rowExpandable: expandableConfig.rowExpandable,
onRow: onRow,
getRowKey: getRowKey,
expandedKeys: mergedExpandedKeys,
childrenColumnName: mergedChildrenColumnName,
rowHoverable: rowHoverable
};
}, [
// Scroll
mergedScrollX,
// Table
prefixCls, getComponent, scrollbarSize, direction, fixedInfoList, isSticky, supportSticky, componentWidth, fixHeader, fixColumn, horizonScroll,
// Body
mergedTableLayout, rowClassName, expandableConfig.expandedRowClassName, mergedExpandIcon, expandableType, expandableConfig.expandRowByClick, expandableConfig.expandedRowRender, onTriggerExpand, expandableConfig.expandIconColumnIndex, expandableConfig.indentSize, emptyNode,
// Column
columns, flattenColumns, onColumnResize,
// Row
startRow, endRow, onHover, expandableConfig.rowExpandable, onRow, getRowKey, mergedExpandedKeys, mergedChildrenColumnName, rowHoverable]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_TableContext.Provider, {
value: TableContextValue
}, fullTable);
}
var RefTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Table);
if (true) {
RefTable.displayName = 'Table';
}
function genTable(shouldTriggerRender) {
return TableContext_makeImmutable(RefTable, shouldTriggerRender);
}
var ImmutableTable = genTable();
ImmutableTable.EXPAND_COLUMN = EXPAND_COLUMN;
ImmutableTable.INTERNAL_HOOKS = INTERNAL_HOOKS;
ImmutableTable.Column = sugar_Column;
ImmutableTable.ColumnGroup = sugar_ColumnGroup;
ImmutableTable.Summary = FooterComponents;
/* harmony default export */ var es_Table = (ImmutableTable);
;// ./node_modules/rc-table/es/VirtualTable/context.js
var StaticContext = createContext(null);
var GridContext = createContext(null);
;// ./node_modules/rc-table/es/VirtualTable/VirtualCell.js
/**
* Return the width of the column by `colSpan`.
* When `colSpan` is `0` will be trade as `1`.
*/
function getColumnWidth(colIndex, colSpan, columnsOffset) {
var mergedColSpan = colSpan || 1;
return columnsOffset[colIndex + mergedColSpan] - (columnsOffset[colIndex] || 0);
}
function VirtualCell(props) {
var rowInfo = props.rowInfo,
column = props.column,
colIndex = props.colIndex,
indent = props.indent,
index = props.index,
component = props.component,
renderIndex = props.renderIndex,
record = props.record,
style = props.style,
className = props.className,
inverse = props.inverse,
getHeight = props.getHeight;
var render = column.render,
dataIndex = column.dataIndex,
columnClassName = column.className,
colWidth = column.width;
var _useContext = useContext(GridContext, ['columnsOffset']),
columnsOffset = _useContext.columnsOffset;
var _getCellProps = getCellProps(rowInfo, column, colIndex, indent, index),
key = _getCellProps.key,
fixedInfo = _getCellProps.fixedInfo,
appendCellNode = _getCellProps.appendCellNode,
additionalCellProps = _getCellProps.additionalCellProps;
var cellStyle = additionalCellProps.style,
_additionalCellProps$ = additionalCellProps.colSpan,
colSpan = _additionalCellProps$ === void 0 ? 1 : _additionalCellProps$,
_additionalCellProps$2 = additionalCellProps.rowSpan,
rowSpan = _additionalCellProps$2 === void 0 ? 1 : _additionalCellProps$2;
// ========================= ColWidth =========================
// column width
var startColIndex = colIndex - 1;
var concatColWidth = getColumnWidth(startColIndex, colSpan, columnsOffset);
// margin offset
var marginOffset = colSpan > 1 ? colWidth - concatColWidth : 0;
// ========================== Style ===========================
var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, cellStyle), style), {}, {
flex: "0 0 ".concat(concatColWidth, "px"),
width: "".concat(concatColWidth, "px"),
marginRight: marginOffset,
pointerEvents: 'auto'
});
// When `colSpan` or `rowSpan` is `0`, should skip render.
var needHide = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (inverse) {
return rowSpan <= 1;
} else {
return colSpan === 0 || rowSpan === 0 || rowSpan > 1;
}
}, [rowSpan, colSpan, inverse]);
// 0 rowSpan or colSpan should not render
if (needHide) {
mergedStyle.visibility = 'hidden';
} else if (inverse) {
mergedStyle.height = getHeight === null || getHeight === void 0 ? void 0 : getHeight(rowSpan);
}
var mergedRender = needHide ? function () {
return null;
} : render;
// ========================== Render ==========================
var cellSpan = {};
// Virtual should reset `colSpan` & `rowSpan`
if (rowSpan === 0 || colSpan === 0) {
cellSpan.rowSpan = 1;
cellSpan.colSpan = 1;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({
className: classnames_default()(columnClassName, className),
ellipsis: column.ellipsis,
align: column.align,
scope: column.rowScope,
component: component,
prefixCls: rowInfo.prefixCls,
key: key,
record: record,
index: index,
renderIndex: renderIndex,
dataIndex: dataIndex,
render: mergedRender,
shouldCellUpdate: column.shouldCellUpdate
}, fixedInfo, {
appendNode: appendCellNode,
additionalProps: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, additionalCellProps), {}, {
style: mergedStyle
}, cellSpan)
}));
}
/* harmony default export */ var VirtualTable_VirtualCell = (VirtualCell);
;// ./node_modules/rc-table/es/VirtualTable/BodyLine.js
var BodyLine_excluded = ["data", "index", "className", "rowKey", "style", "extra", "getHeight"];
var BodyLine = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var data = props.data,
index = props.index,
className = props.className,
rowKey = props.rowKey,
style = props.style,
extra = props.extra,
getHeight = props.getHeight,
restProps = (0,objectWithoutProperties["default"])(props, BodyLine_excluded);
var record = data.record,
indent = data.indent,
renderIndex = data.index;
var _useContext = useContext(context_TableContext, ['prefixCls', 'flattenColumns', 'fixColumn', 'componentWidth', 'scrollX']),
scrollX = _useContext.scrollX,
flattenColumns = _useContext.flattenColumns,
prefixCls = _useContext.prefixCls,
fixColumn = _useContext.fixColumn,
componentWidth = _useContext.componentWidth;
var _useContext2 = useContext(StaticContext, ['getComponent']),
getComponent = _useContext2.getComponent;
var rowInfo = useRowInfo(record, rowKey, index, indent);
var RowComponent = getComponent(['body', 'row'], 'div');
var cellComponent = getComponent(['body', 'cell'], 'div');
// ========================== Expand ==========================
var rowSupportExpand = rowInfo.rowSupportExpand,
expanded = rowInfo.expanded,
rowProps = rowInfo.rowProps,
expandedRowRender = rowInfo.expandedRowRender,
expandedRowClassName = rowInfo.expandedRowClassName;
var expandRowNode;
if (rowSupportExpand && expanded) {
var expandContent = expandedRowRender(record, index, indent + 1, expanded);
var expandedClsName = computedExpandedClassName(expandedRowClassName, record, index, indent);
var additionalProps = {};
if (fixColumn) {
additionalProps = {
style: (0,defineProperty["default"])({}, '--virtual-width', "".concat(componentWidth, "px"))
};
}
var rowCellCls = "".concat(prefixCls, "-expanded-row-cell");
expandRowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, {
className: classnames_default()("".concat(prefixCls, "-expanded-row"), "".concat(prefixCls, "-expanded-row-level-").concat(indent + 1), expandedClsName)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, {
component: cellComponent,
prefixCls: prefixCls,
className: classnames_default()(rowCellCls, (0,defineProperty["default"])({}, "".concat(rowCellCls, "-fixed"), fixColumn)),
additionalProps: additionalProps
}, expandContent));
}
// ========================== Render ==========================
var rowStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
width: scrollX
});
if (extra) {
rowStyle.position = 'absolute';
rowStyle.pointerEvents = 'none';
}
var rowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, (0,esm_extends["default"])({}, rowProps, restProps, {
"data-row-key": rowKey,
ref: rowSupportExpand ? null : ref,
className: classnames_default()(className, "".concat(prefixCls, "-row"), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-row-extra"), extra)),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rowStyle), rowProps === null || rowProps === void 0 ? void 0 : rowProps.style)
}), flattenColumns.map(function (column, colIndex) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VirtualTable_VirtualCell, {
key: colIndex,
component: cellComponent,
rowInfo: rowInfo,
column: column,
colIndex: colIndex,
indent: indent,
index: index,
renderIndex: renderIndex,
record: record,
inverse: extra,
getHeight: getHeight
});
}));
if (rowSupportExpand) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: ref
}, rowNode, expandRowNode);
}
return rowNode;
});
var ResponseBodyLine = TableContext_responseImmutable(BodyLine);
if (true) {
ResponseBodyLine.displayName = 'BodyLine';
}
/* harmony default export */ var VirtualTable_BodyLine = (ResponseBodyLine);
;// ./node_modules/rc-table/es/VirtualTable/BodyGrid.js
var BodyGrid_Grid = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var data = props.data,
onScroll = props.onScroll;
var _useContext = useContext(context_TableContext, ['flattenColumns', 'onColumnResize', 'getRowKey', 'prefixCls', 'expandedKeys', 'childrenColumnName', 'scrollX', 'direction']),
flattenColumns = _useContext.flattenColumns,
onColumnResize = _useContext.onColumnResize,
getRowKey = _useContext.getRowKey,
expandedKeys = _useContext.expandedKeys,
prefixCls = _useContext.prefixCls,
childrenColumnName = _useContext.childrenColumnName,
scrollX = _useContext.scrollX,
direction = _useContext.direction;
var _useContext2 = useContext(StaticContext),
sticky = _useContext2.sticky,
scrollY = _useContext2.scrollY,
listItemHeight = _useContext2.listItemHeight,
getComponent = _useContext2.getComponent,
onTablePropScroll = _useContext2.onScroll;
// =========================== Ref ============================
var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
// =========================== Data ===========================
var flattenData = useFlattenRecords(data, childrenColumnName, expandedKeys, getRowKey);
// ========================== Column ==========================
var columnsWidth = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var total = 0;
return flattenColumns.map(function (_ref) {
var width = _ref.width,
key = _ref.key;
total += width;
return [key, width, total];
});
}, [flattenColumns]);
var columnsOffset = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return columnsWidth.map(function (colWidth) {
return colWidth[2];
});
}, [columnsWidth]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
columnsWidth.forEach(function (_ref2) {
var _ref3 = (0,slicedToArray["default"])(_ref2, 2),
key = _ref3[0],
width = _ref3[1];
onColumnResize(key, width);
});
}, [columnsWidth]);
// =========================== Ref ============================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
var _listRef$current2;
var obj = {
scrollTo: function scrollTo(config) {
var _listRef$current;
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollTo(config);
},
nativeElement: (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.nativeElement
};
Object.defineProperty(obj, 'scrollLeft', {
get: function get() {
var _listRef$current3;
return ((_listRef$current3 = listRef.current) === null || _listRef$current3 === void 0 ? void 0 : _listRef$current3.getScrollInfo().x) || 0;
},
set: function set(value) {
var _listRef$current4;
(_listRef$current4 = listRef.current) === null || _listRef$current4 === void 0 || _listRef$current4.scrollTo({
left: value
});
}
});
return obj;
});
// ======================= Col/Row Span =======================
var getRowSpan = function getRowSpan(column, index) {
var _flattenData$index;
var record = (_flattenData$index = flattenData[index]) === null || _flattenData$index === void 0 ? void 0 : _flattenData$index.record;
var onCell = column.onCell;
if (onCell) {
var _cellProps$rowSpan;
var cellProps = onCell(record, index);
return (_cellProps$rowSpan = cellProps === null || cellProps === void 0 ? void 0 : cellProps.rowSpan) !== null && _cellProps$rowSpan !== void 0 ? _cellProps$rowSpan : 1;
}
return 1;
};
var extraRender = function extraRender(info) {
var start = info.start,
end = info.end,
getSize = info.getSize,
offsetY = info.offsetY;
// Do nothing if no data
if (end < 0) {
return null;
}
// Find first rowSpan column
var firstRowSpanColumns = flattenColumns.filter(
// rowSpan is 0
function (column) {
return getRowSpan(column, start) === 0;
});
var startIndex = start;
var _loop = function _loop(i) {
firstRowSpanColumns = firstRowSpanColumns.filter(function (column) {
return getRowSpan(column, i) === 0;
});
if (!firstRowSpanColumns.length) {
startIndex = i;
return 1; // break
}
};
for (var i = start; i >= 0; i -= 1) {
if (_loop(i)) break;
}
// Find last rowSpan column
var lastRowSpanColumns = flattenColumns.filter(
// rowSpan is not 1
function (column) {
return getRowSpan(column, end) !== 1;
});
var endIndex = end;
var _loop2 = function _loop2(_i) {
lastRowSpanColumns = lastRowSpanColumns.filter(function (column) {
return getRowSpan(column, _i) !== 1;
});
if (!lastRowSpanColumns.length) {
endIndex = Math.max(_i - 1, end);
return 1; // break
}
};
for (var _i = end; _i < flattenData.length; _i += 1) {
if (_loop2(_i)) break;
}
// Collect the line who has rowSpan
var spanLines = [];
var _loop3 = function _loop3(_i2) {
var item = flattenData[_i2];
// This code will never reach, just incase
if (!item) {
return 1; // continue
}
if (flattenColumns.some(function (column) {
return getRowSpan(column, _i2) > 1;
})) {
spanLines.push(_i2);
}
};
for (var _i2 = startIndex; _i2 <= endIndex; _i2 += 1) {
if (_loop3(_i2)) continue;
}
// Patch extra line on the page
var nodes = spanLines.map(function (index) {
var item = flattenData[index];
var rowKey = getRowKey(item.record, index);
var getHeight = function getHeight(rowSpan) {
var endItemIndex = index + rowSpan - 1;
var endItemKey = getRowKey(flattenData[endItemIndex].record, endItemIndex);
var sizeInfo = getSize(rowKey, endItemKey);
return sizeInfo.bottom - sizeInfo.top;
};
var sizeInfo = getSize(rowKey);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VirtualTable_BodyLine, {
key: index,
data: item,
rowKey: rowKey,
index: index,
style: {
top: -offsetY + sizeInfo.top
},
extra: true,
getHeight: getHeight
});
});
return nodes;
};
// ========================= Context ==========================
var gridContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
columnsOffset: columnsOffset
};
}, [columnsOffset]);
// ========================== Render ==========================
var tblPrefixCls = "".concat(prefixCls, "-tbody");
// default 'div' in rc-virtual-list
var wrapperComponent = getComponent(['body', 'wrapper']);
// ========================== Sticky Scroll Bar ==========================
var horizontalScrollBarStyle = {};
if (sticky) {
horizontalScrollBarStyle.position = 'sticky';
horizontalScrollBarStyle.bottom = 0;
if ((0,esm_typeof["default"])(sticky) === 'object' && sticky.offsetScroll) {
horizontalScrollBarStyle.bottom = sticky.offsetScroll;
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GridContext.Provider, {
value: gridContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_virtual_list_es, {
fullHeight: false,
ref: listRef,
prefixCls: "".concat(tblPrefixCls, "-virtual"),
styles: {
horizontalScrollBar: horizontalScrollBarStyle
},
className: tblPrefixCls,
height: scrollY,
itemHeight: listItemHeight || 24,
data: flattenData,
itemKey: function itemKey(item) {
return getRowKey(item.record);
},
component: wrapperComponent,
scrollWidth: scrollX,
direction: direction,
onVirtualScroll: function onVirtualScroll(_ref4) {
var _listRef$current5;
var x = _ref4.x;
onScroll({
currentTarget: (_listRef$current5 = listRef.current) === null || _listRef$current5 === void 0 ? void 0 : _listRef$current5.nativeElement,
scrollLeft: x
});
},
onScroll: onTablePropScroll,
extraRender: extraRender
}, function (item, index, itemProps) {
var rowKey = getRowKey(item.record, index);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VirtualTable_BodyLine, {
data: item,
rowKey: rowKey,
index: index,
style: itemProps.style
});
}));
});
var ResponseGrid = TableContext_responseImmutable(BodyGrid_Grid);
if (true) {
ResponseGrid.displayName = 'ResponseGrid';
}
/* harmony default export */ var BodyGrid = (ResponseGrid);
;// ./node_modules/rc-table/es/VirtualTable/index.js
var renderBody = function renderBody(rawData, props) {
var ref = props.ref,
onScroll = props.onScroll;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(BodyGrid, {
ref: ref,
data: rawData,
onScroll: onScroll
});
};
function VirtualTable(props, ref) {
var data = props.data,
columns = props.columns,
scroll = props.scroll,
sticky = props.sticky,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? DEFAULT_PREFIX : _props$prefixCls,
className = props.className,
listItemHeight = props.listItemHeight,
components = props.components,
onScroll = props.onScroll;
var _ref = scroll || {},
scrollX = _ref.x,
scrollY = _ref.y;
// Fill scrollX
if (typeof scrollX !== 'number') {
if (true) {
(0,rc_util_es.warning)(!scrollX, '`scroll.x` in virtual table must be number.');
}
scrollX = 1;
}
// Fill scrollY
if (typeof scrollY !== 'number') {
scrollY = 500;
if (true) {
(0,rc_util_es.warning)(false, '`scroll.y` in virtual table must be number.');
}
}
var getComponent = (0,rc_util_es.useEvent)(function (path, defaultComponent) {
return (0,get["default"])(components, path) || defaultComponent;
});
// Memo this
var onInternalScroll = (0,rc_util_es.useEvent)(onScroll);
// ========================= Context ==========================
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
sticky: sticky,
scrollY: scrollY,
listItemHeight: listItemHeight,
getComponent: getComponent,
onScroll: onInternalScroll
};
}, [sticky, scrollY, listItemHeight, getComponent, onInternalScroll]);
// ========================== Render ==========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StaticContext.Provider, {
value: context
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Table, (0,esm_extends["default"])({}, props, {
className: classnames_default()(className, "".concat(prefixCls, "-virtual")),
scroll: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scroll), {}, {
x: scrollX
}),
components: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, components), {}, {
// fix https://github.com/ant-design/ant-design/issues/48991
body: data !== null && data !== void 0 && data.length ? renderBody : undefined
}),
columns: columns,
internalHooks: INTERNAL_HOOKS,
tailor: true,
ref: ref
})));
}
var RefVirtualTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(VirtualTable);
if (true) {
RefVirtualTable.displayName = 'VirtualTable';
}
function genVirtualTable(shouldTriggerRender) {
return TableContext_makeImmutable(RefVirtualTable, shouldTriggerRender);
}
/* harmony default export */ var es_VirtualTable = (genVirtualTable());
;// ./node_modules/rc-table/es/index.js
/* harmony default export */ var rc_table_es = (es_Table);
;// ./components/table/Column.ts
/* istanbul ignore next */
/** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */
const table_Column_Column = _ => null;
/* harmony default export */ var table_Column = (table_Column_Column);
;// ./components/table/ColumnGroup.ts
/* istanbul ignore next */
/** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */
const ColumnGroup_ColumnGroup = _ => null;
/* harmony default export */ var table_ColumnGroup = (ColumnGroup_ColumnGroup);
;// ./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 = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/** Internal usage, safe to remove. Do not use in prod */
var contextTypes_UnstableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
;// ./node_modules/rc-tree/es/Indent.js
var Indent = function Indent(_ref) {
var prefixCls = _ref.prefixCls,
level = _ref.level,
isStart = _ref.isStart,
isEnd = _ref.isEnd;
var baseClassName = "".concat(prefixCls, "-indent-unit");
var list = [];
for (var i = 0; i < level; i += 1) {
list.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: i,
className: classnames_default()(baseClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(baseClassName, "-start"), isStart[i]), "".concat(baseClassName, "-end"), isEnd[i]))
}));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
"aria-hidden": "true",
className: "".concat(prefixCls, "-indent")
}, list);
};
/* harmony default export */ var es_Indent = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(Indent));
;// ./node_modules/rc-tree/es/TreeNode.js
var TreeNode_excluded = ["eventKey", "className", "style", "dragOver", "dragOverGapTop", "dragOverGapBottom", "isLeaf", "isStart", "isEnd", "expanded", "selected", "checked", "halfChecked", "loading", "domRef", "active", "data", "onMouseMove", "selectable"];
var ICON_OPEN = 'open';
var ICON_CLOSE = 'close';
var defaultTitle = '---';
var TreeNode = function TreeNode(props) {
var _unstableContext$node, _context$filterTreeNo, _classNames4;
var eventKey = props.eventKey,
className = props.className,
style = props.style,
dragOver = props.dragOver,
dragOverGapTop = props.dragOverGapTop,
dragOverGapBottom = props.dragOverGapBottom,
isLeaf = props.isLeaf,
isStart = props.isStart,
isEnd = props.isEnd,
expanded = props.expanded,
selected = props.selected,
checked = props.checked,
halfChecked = props.halfChecked,
loading = props.loading,
domRef = props.domRef,
active = props.active,
data = props.data,
onMouseMove = props.onMouseMove,
selectable = props.selectable,
otherProps = (0,objectWithoutProperties["default"])(props, TreeNode_excluded);
var context = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(TreeContext);
var unstableContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(contextTypes_UnstableContext);
var selectHandleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
dragNodeHighlight = _React$useState2[0],
setDragNodeHighlight = _React$useState2[1];
// ======= State: Disabled State =======
var isDisabled = !!(context.disabled || props.disabled || (_unstableContext$node = unstableContext.nodeDisabled) !== null && _unstableContext$node !== void 0 && _unstableContext$node.call(unstableContext, data));
var isCheckable = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
// Return false if tree or treeNode is not checkable
if (!context.checkable || props.checkable === false) {
return false;
}
return context.checkable;
}, [context.checkable, props.checkable]);
// ======= Event Handlers: Selection and Check =======
var onSelect = function onSelect(e) {
if (isDisabled) {
return;
}
context.onNodeSelect(e, convertNodePropsToEventData(props));
};
var onCheck = function onCheck(e) {
if (isDisabled) {
return;
}
if (!isCheckable || props.disableCheckbox) {
return;
}
context.onNodeCheck(e, convertNodePropsToEventData(props), !checked);
};
// ======= State: Selectable Check =======
var isSelectable = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
// Ignore when selectable is undefined or null
if (typeof selectable === 'boolean') {
return selectable;
}
return context.selectable;
}, [selectable, context.selectable]);
var onSelectorClick = function onSelectorClick(e) {
// Click trigger before select/check operation
context.onNodeClick(e, convertNodePropsToEventData(props));
if (isSelectable) {
onSelect(e);
} else {
onCheck(e);
}
};
var onSelectorDoubleClick = function onSelectorDoubleClick(e) {
context.onNodeDoubleClick(e, convertNodePropsToEventData(props));
};
var onMouseEnter = function onMouseEnter(e) {
context.onNodeMouseEnter(e, convertNodePropsToEventData(props));
};
var onMouseLeave = function onMouseLeave(e) {
context.onNodeMouseLeave(e, convertNodePropsToEventData(props));
};
var onContextMenu = function onContextMenu(e) {
context.onNodeContextMenu(e, convertNodePropsToEventData(props));
};
// ======= Drag: Drag Enabled =======
var isDraggable = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
return !!(context.draggable && (!context.draggable.nodeDraggable || context.draggable.nodeDraggable(data)));
}, [context.draggable, data]);
// ======= Drag: Drag Event Handlers =======
var onDragStart = function onDragStart(e) {
e.stopPropagation();
setDragNodeHighlight(true);
context.onNodeDragStart(e, props);
try {
// ie throw error
// firefox-need-it
e.dataTransfer.setData('text/plain', '');
} catch (_unused) {
// empty
}
};
var onDragEnter = function onDragEnter(e) {
e.preventDefault();
e.stopPropagation();
context.onNodeDragEnter(e, props);
};
var onDragOver = function onDragOver(e) {
e.preventDefault();
e.stopPropagation();
context.onNodeDragOver(e, props);
};
var onDragLeave = function onDragLeave(e) {
e.stopPropagation();
context.onNodeDragLeave(e, props);
};
var onDragEnd = function onDragEnd(e) {
e.stopPropagation();
setDragNodeHighlight(false);
context.onNodeDragEnd(e, props);
};
var onDrop = function onDrop(e) {
e.preventDefault();
e.stopPropagation();
setDragNodeHighlight(false);
context.onNodeDrop(e, props);
};
// ======= Expand: Node Expansion =======
var onExpand = function onExpand(e) {
if (loading) {
return;
}
context.onNodeExpand(e, convertNodePropsToEventData(props));
};
// ======= State: Has Children =======
var hasChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
var _ref = getEntity(context.keyEntities, eventKey) || {},
children = _ref.children;
return Boolean((children || []).length);
}, [context.keyEntities, eventKey]);
// ======= State: Leaf Check =======
var memoizedIsLeaf = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if (isLeaf === false) {
return false;
}
return isLeaf || !context.loadData && !hasChildren || context.loadData && props.loaded && !hasChildren;
}, [isLeaf, context.loadData, hasChildren, props.loaded]);
// ============== Effect ==============
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
// Load data to avoid default expanded tree without data
if (loading) {
return;
}
// read from state to avoid loadData at same time
if (typeof context.loadData === 'function' && expanded && !memoizedIsLeaf && !props.loaded) {
// We needn't reload data when has children in sync logic
// It's only needed in node expanded
context.onNodeLoad(convertNodePropsToEventData(props));
}
}, [loading, context.loadData, context.onNodeLoad, expanded, memoizedIsLeaf, props]);
// ==================== Render: Drag Handler ====================
var dragHandlerNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
var _context$draggable;
if (!((_context$draggable = context.draggable) !== null && _context$draggable !== void 0 && _context$draggable.icon)) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: "".concat(context.prefixCls, "-draggable-icon")
}, context.draggable.icon);
}, [context.draggable]);
// ====================== Render: Switcher ======================
var renderSwitcherIconDom = function renderSwitcherIconDom(isInternalLeaf) {
var switcherIcon = props.switcherIcon || context.switcherIcon;
// if switcherIconDom is null, no render switcher span
if (typeof switcherIcon === 'function') {
return switcherIcon((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
isLeaf: isInternalLeaf
}));
}
return switcherIcon;
};
// Switcher
var renderSwitcher = function renderSwitcher() {
if (memoizedIsLeaf) {
// if switcherIconDom is null, no render switcher span
var _switcherIconDom = renderSwitcherIconDom(true);
return _switcherIconDom !== false ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(context.prefixCls, "-switcher"), "".concat(context.prefixCls, "-switcher-noop"))
}, _switcherIconDom) : null;
}
var switcherIconDom = renderSwitcherIconDom(false);
return switcherIconDom !== false ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
onClick: onExpand,
className: classnames_default()("".concat(context.prefixCls, "-switcher"), "".concat(context.prefixCls, "-switcher_").concat(expanded ? ICON_OPEN : ICON_CLOSE))
}, switcherIconDom) : null;
};
// ====================== Checkbox ======================
var checkboxNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if (!isCheckable) {
return null;
}
// [Legacy] Custom element should be separate with `checkable` in future
var $custom = typeof isCheckable !== 'boolean' ? isCheckable : null;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(context.prefixCls, "-checkbox"), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(context.prefixCls, "-checkbox-checked"), checked), "".concat(context.prefixCls, "-checkbox-indeterminate"), !checked && halfChecked), "".concat(context.prefixCls, "-checkbox-disabled"), isDisabled || props.disableCheckbox)),
onClick: onCheck,
role: "checkbox",
"aria-checked": halfChecked ? 'mixed' : checked,
"aria-disabled": isDisabled || props.disableCheckbox,
"aria-label": "Select ".concat(typeof props.title === 'string' ? props.title : 'tree node')
}, $custom);
}, [isCheckable, checked, halfChecked, isDisabled, props.disableCheckbox, props.title]);
// ============== State: Node State (Open/Close) ==============
var nodeState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if (memoizedIsLeaf) {
return null;
}
return expanded ? ICON_OPEN : ICON_CLOSE;
}, [memoizedIsLeaf, expanded]);
// ==================== Render: Title + Icon ====================
var iconNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(context.prefixCls, "-iconEle"), "".concat(context.prefixCls, "-icon__").concat(nodeState || 'docu'), (0,defineProperty["default"])({}, "".concat(context.prefixCls, "-icon_loading"), loading))
});
}, [context.prefixCls, nodeState, loading]);
// =================== Drop Indicator ===================
var dropIndicatorNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
var rootDraggable = Boolean(context.draggable);
// allowDrop is calculated in Tree.tsx, there is no need for calc it here
var showIndicator = !props.disabled && rootDraggable && context.dragOverNodeKey === eventKey;
if (!showIndicator) {
return null;
}
return context.dropIndicatorRender({
dropPosition: context.dropPosition,
dropLevelOffset: context.dropLevelOffset,
indent: context.indent,
prefixCls: context.prefixCls,
direction: context.direction
});
}, [context.dropPosition, context.dropLevelOffset, context.indent, context.prefixCls, context.direction, context.draggable, context.dragOverNodeKey, context.dropIndicatorRender]);
// Icon + Title
var selectorNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
var _props$title = props.title,
title = _props$title === void 0 ? defaultTitle : _props$title;
var wrapClass = "".concat(context.prefixCls, "-node-content-wrapper");
// Icon - Still show loading icon when loading without showIcon
var $icon;
if (context.showIcon) {
var currentIcon = props.icon || context.icon;
$icon = currentIcon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: classnames_default()("".concat(context.prefixCls, "-iconEle"), "".concat(context.prefixCls, "-icon__customize"))
}, typeof currentIcon === 'function' ? currentIcon(props) : currentIcon) : iconNode;
} else if (context.loadData && loading) {
$icon = iconNode;
}
// Title
var titleNode;
if (typeof title === 'function') {
titleNode = title(data);
} else if (context.titleRender) {
titleNode = context.titleRender(data);
} else {
titleNode = title;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
ref: selectHandleRef,
title: typeof title === 'string' ? title : '',
className: classnames_default()(wrapClass, "".concat(wrapClass, "-").concat(nodeState || 'normal'), (0,defineProperty["default"])({}, "".concat(context.prefixCls, "-node-selected"), !isDisabled && (selected || dragNodeHighlight))),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onContextMenu: onContextMenu,
onClick: onSelectorClick,
onDoubleClick: onSelectorDoubleClick
}, $icon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: "".concat(context.prefixCls, "-title")
}, titleNode), dropIndicatorNode);
}, [context.prefixCls, context.showIcon, props, context.icon, iconNode, context.titleRender, data, nodeState, onMouseEnter, onMouseLeave, onContextMenu, onSelectorClick, onSelectorDoubleClick]);
var dataOrAriaAttributeProps = (0,pickAttrs["default"])(otherProps, {
aria: true,
data: true
});
var _ref2 = getEntity(context.keyEntities, eventKey) || {},
level = _ref2.level;
var isEndNode = isEnd[isEnd.length - 1];
var draggableWithoutDisabled = !isDisabled && isDraggable;
var dragging = context.draggingNodeKey === eventKey;
var ariaSelected = selectable !== undefined ? {
'aria-selected': !!selectable
} : undefined;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
ref: domRef,
role: "treeitem",
"aria-expanded": isLeaf ? undefined : expanded,
className: classnames_default()(className, "".concat(context.prefixCls, "-treenode"), (_classNames4 = {}, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])(_classNames4, "".concat(context.prefixCls, "-treenode-disabled"), isDisabled), "".concat(context.prefixCls, "-treenode-switcher-").concat(expanded ? 'open' : 'close'), !isLeaf), "".concat(context.prefixCls, "-treenode-checkbox-checked"), checked), "".concat(context.prefixCls, "-treenode-checkbox-indeterminate"), halfChecked), "".concat(context.prefixCls, "-treenode-selected"), selected), "".concat(context.prefixCls, "-treenode-loading"), loading), "".concat(context.prefixCls, "-treenode-active"), active), "".concat(context.prefixCls, "-treenode-leaf-last"), isEndNode), "".concat(context.prefixCls, "-treenode-draggable"), isDraggable), "dragging", dragging), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])(_classNames4, 'drop-target', context.dropTargetKey === eventKey), 'drop-container', context.dropContainerKey === eventKey), 'drag-over', !isDisabled && dragOver), 'drag-over-gap-top', !isDisabled && dragOverGapTop), 'drag-over-gap-bottom', !isDisabled && dragOverGapBottom), 'filter-node', (_context$filterTreeNo = context.filterTreeNode) === null || _context$filterTreeNo === void 0 ? void 0 : _context$filterTreeNo.call(context, convertNodePropsToEventData(props))), "".concat(context.prefixCls, "-treenode-leaf"), memoizedIsLeaf))),
style: style
// Draggable config
,
draggable: draggableWithoutDisabled,
onDragStart: draggableWithoutDisabled ? onDragStart : undefined
// Drop config
,
onDragEnter: isDraggable ? onDragEnter : undefined,
onDragOver: isDraggable ? onDragOver : undefined,
onDragLeave: isDraggable ? onDragLeave : undefined,
onDrop: isDraggable ? onDrop : undefined,
onDragEnd: isDraggable ? onDragEnd : undefined,
onMouseMove: onMouseMove
}, ariaSelected, dataOrAriaAttributeProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Indent, {
prefixCls: context.prefixCls,
level: level,
isStart: isStart,
isEnd: isEnd
}), dragHandlerNode, renderSwitcher(), checkboxNode, selectorNode);
};
TreeNode.isTreeNode = 1;
if (true) {
TreeNode.displayName = 'TreeNode';
}
/* harmony default export */ var es_TreeNode = (TreeNode);
;// ./node_modules/rc-tree/es/util.js
var util_excluded = ["children"];
/* eslint-disable no-lonely-if */
/**
* Legacy code. Should avoid to use if you are new to import these code.
*/
function arrDel(list, value) {
if (!list) return [];
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 getDragChildrenKeys(dragNodeKey, keyEntities) {
// not contains self
// self for left or right drag
var dragChildrenKeys = [];
var entity = getEntity(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;
dragChildrenKeys.push(key);
dig(children);
});
}
dig(entity.children);
return dragChildrenKeys;
}
function isLastChild(treeNodeEntity) {
if (treeNodeEntity.parent) {
var posArr = posToArr(treeNodeEntity.pos);
return Number(posArr[posArr.length - 1]) === treeNodeEntity.parent.children.length - 1;
}
return false;
}
function isFirstChild(treeNodeEntity) {
var posArr = posToArr(treeNodeEntity.pos);
return Number(posArr[posArr.length - 1]) === 0;
}
// Only used when drag, not affect SSR.
function calcDropPosition(event, dragNodeProps, targetNodeProps, indent, startMousePosition, allowDrop, flattenedNodes, keyEntities, expandKeys, direction) {
var _abstractDropNodeEnti;
var clientX = event.clientX,
clientY = event.clientY;
var _getBoundingClientRec = event.target.getBoundingClientRect(),
top = _getBoundingClientRec.top,
height = _getBoundingClientRec.height;
// optional chain for testing
var horizontalMouseOffset = (direction === 'rtl' ? -1 : 1) * (((startMousePosition === null || startMousePosition === void 0 ? void 0 : startMousePosition.x) || 0) - clientX);
var rawDropLevelOffset = (horizontalMouseOffset - 12) / indent;
// Filter the expanded keys to exclude the node that not has children currently (like async nodes).
var filteredExpandKeys = expandKeys.filter(function (key) {
var _keyEntities$key;
return (_keyEntities$key = keyEntities[key]) === null || _keyEntities$key === void 0 || (_keyEntities$key = _keyEntities$key.children) === null || _keyEntities$key === void 0 ? void 0 : _keyEntities$key.length;
});
// find abstract drop node by horizontal offset
var abstractDropNodeEntity = getEntity(keyEntities, targetNodeProps.eventKey);
if (clientY < top + height / 2) {
// first half, set abstract drop node to previous node
var nodeIndex = flattenedNodes.findIndex(function (flattenedNode) {
return flattenedNode.key === abstractDropNodeEntity.key;
});
var prevNodeIndex = nodeIndex <= 0 ? 0 : nodeIndex - 1;
var prevNodeKey = flattenedNodes[prevNodeIndex].key;
abstractDropNodeEntity = getEntity(keyEntities, prevNodeKey);
}
var initialAbstractDropNodeKey = abstractDropNodeEntity.key;
var abstractDragOverEntity = abstractDropNodeEntity;
var dragOverNodeKey = abstractDropNodeEntity.key;
var dropPosition = 0;
var dropLevelOffset = 0;
// Only allow cross level drop when dragging on a non-expanded node
if (!filteredExpandKeys.includes(initialAbstractDropNodeKey)) {
for (var i = 0; i < rawDropLevelOffset; i += 1) {
if (isLastChild(abstractDropNodeEntity)) {
abstractDropNodeEntity = abstractDropNodeEntity.parent;
dropLevelOffset += 1;
} else {
break;
}
}
}
var abstractDragDataNode = dragNodeProps.data;
var abstractDropDataNode = abstractDropNodeEntity.node;
var dropAllowed = true;
if (isFirstChild(abstractDropNodeEntity) && abstractDropNodeEntity.level === 0 && clientY < top + height / 2 && allowDrop({
dragNode: abstractDragDataNode,
dropNode: abstractDropDataNode,
dropPosition: -1
}) && abstractDropNodeEntity.key === targetNodeProps.eventKey) {
// first half of first node in first level
dropPosition = -1;
} else if ((abstractDragOverEntity.children || []).length && filteredExpandKeys.includes(dragOverNodeKey)) {
// drop on expanded node
// only allow drop inside
if (allowDrop({
dragNode: abstractDragDataNode,
dropNode: abstractDropDataNode,
dropPosition: 0
})) {
dropPosition = 0;
} else {
dropAllowed = false;
}
} else if (dropLevelOffset === 0) {
if (rawDropLevelOffset > -1.5) {
// | Node | <- abstractDropNode
// | -^-===== | <- mousePosition
// 1. try drop after
// 2. do not allow drop
if (allowDrop({
dragNode: abstractDragDataNode,
dropNode: abstractDropDataNode,
dropPosition: 1
})) {
dropPosition = 1;
} else {
dropAllowed = false;
}
} else {
// | Node | <- abstractDropNode
// | ---==^== | <- mousePosition
// whether it has children or doesn't has children
// always
// 1. try drop inside
// 2. try drop after
// 3. do not allow drop
if (allowDrop({
dragNode: abstractDragDataNode,
dropNode: abstractDropDataNode,
dropPosition: 0
})) {
dropPosition = 0;
} else if (allowDrop({
dragNode: abstractDragDataNode,
dropNode: abstractDropDataNode,
dropPosition: 1
})) {
dropPosition = 1;
} else {
dropAllowed = false;
}
}
} else {
// | Node1 | <- abstractDropNode
// | Node2 |
// --^--|----=====| <- mousePosition
// 1. try insert after Node1
// 2. do not allow drop
if (allowDrop({
dragNode: abstractDragDataNode,
dropNode: abstractDropDataNode,
dropPosition: 1
})) {
dropPosition = 1;
} else {
dropAllowed = false;
}
}
return {
dropPosition: dropPosition,
dropLevelOffset: dropLevelOffset,
dropTargetKey: abstractDropNodeEntity.key,
dropTargetPos: abstractDropNodeEntity.pos,
dragOverNodeKey: dragOverNodeKey,
dropContainerKey: dropPosition === 0 ? null : ((_abstractDropNodeEnti = abstractDropNodeEntity.parent) === null || _abstractDropNodeEnti === void 0 ? void 0 : _abstractDropNodeEnti.key) || null,
dropAllowed: dropAllowed
};
}
/**
* 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 = (0,objectWithoutProperties["default"])(_ref3, util_excluded);
var childrenNodes = convertDataToTree(children, processor);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_TreeNode, (0,esm_extends["default"])({
key: props.key
}, 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 ((0,esm_typeof["default"])(keys) === 'object') {
keyProps = {
checkedKeys: keys.checked || undefined,
halfCheckedKeys: keys.halfChecked || undefined
};
} else {
(0,warning["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 = getEntity(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 (0,toConsumableArray["default"])(expandedKeys);
}
;// ./components/_util/hooks/useMultipleSelect.ts
/**
* @title multipleSelect hooks
* @description multipleSelect by hold down shift key
*/
function useMultipleSelect(getKey) {
const [prevSelectedIndex, setPrevSelectedIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
const multipleSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((currentSelectedIndex, data, selectedKeys) => {
const configPrevSelectedIndex = prevSelectedIndex !== null && prevSelectedIndex !== void 0 ? prevSelectedIndex : currentSelectedIndex;
// add/delete the selected range
const startIndex = Math.min(configPrevSelectedIndex || 0, currentSelectedIndex);
const endIndex = Math.max(configPrevSelectedIndex || 0, currentSelectedIndex);
const rangeKeys = data.slice(startIndex, endIndex + 1).map(item => getKey(item));
const shouldSelected = rangeKeys.some(rangeKey => !selectedKeys.has(rangeKey));
const changedKeys = [];
rangeKeys.forEach(item => {
if (shouldSelected) {
if (!selectedKeys.has(item)) {
changedKeys.push(item);
}
selectedKeys.add(item);
} else {
selectedKeys.delete(item);
changedKeys.push(item);
}
});
setPrevSelectedIndex(shouldSelected ? endIndex : null);
return changedKeys;
}, [prevSelectedIndex]);
const updatePrevSelectedIndex = val => {
setPrevSelectedIndex(val);
};
return [multipleSelect, updatePrevSelectedIndex];
}
;// ./components/table/hooks/useSelection.tsx
// TODO: warning if use ajax!!!
const SELECTION_COLUMN = {};
const SELECTION_ALL = 'SELECT_ALL';
const SELECTION_INVERT = 'SELECT_INVERT';
const SELECTION_NONE = 'SELECT_NONE';
const useSelection_EMPTY_LIST = [];
const flattenData = (childrenColumnName, data) => {
let list = [];
(data || []).forEach(record => {
list.push(record);
if (record && typeof record === 'object' && childrenColumnName in record) {
list = [].concat((0,toConsumableArray["default"])(list), (0,toConsumableArray["default"])(flattenData(childrenColumnName, record[childrenColumnName])));
}
});
return list;
};
const useSelection = (config, rowSelection) => {
const {
preserveSelectedRowKeys,
selectedRowKeys,
defaultSelectedRowKeys,
getCheckboxProps,
onChange: onSelectionChange,
onSelect,
onSelectAll,
onSelectInvert,
onSelectNone,
onSelectMultiple,
columnWidth: selectionColWidth,
type: selectionType,
selections,
fixed,
renderCell: customizeRenderCell,
hideSelectAll,
checkStrictly = true
} = rowSelection || {};
const {
prefixCls,
data,
pageData,
getRecordByKey,
getRowKey,
expandType,
childrenColumnName,
locale: tableLocale,
getPopupContainer
} = config;
const warning = (0,_util_warning.devUseWarning)('Table');
// ========================= MultipleSelect =========================
const [multipleSelect, updatePrevSelectedIndex] = useMultipleSelect(item => item);
// ========================= Keys =========================
const [mergedSelectedKeys, setMergedSelectedKeys] = (0,useMergedState["default"])(selectedRowKeys || defaultSelectedRowKeys || useSelection_EMPTY_LIST, {
value: selectedRowKeys
});
// ======================== Caches ========================
const preserveRecordsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(new Map());
const updatePreserveRecordsCache = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(keys => {
if (preserveSelectedRowKeys) {
const newCache = new Map();
// Keep key if mark as preserveSelectedRowKeys
keys.forEach(key => {
let record = getRecordByKey(key);
if (!record && preserveRecordsRef.current.has(key)) {
record = preserveRecordsRef.current.get(key);
}
newCache.set(key, record);
});
// Refresh to new cache
preserveRecordsRef.current = newCache;
}
}, [getRecordByKey, preserveSelectedRowKeys]);
// Update cache with selectedKeys
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
updatePreserveRecordsCache(mergedSelectedKeys);
}, [mergedSelectedKeys]);
// Get flatten data
const flattedData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => flattenData(childrenColumnName, pageData), [childrenColumnName, pageData]);
const {
keyEntities
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (checkStrictly) {
return {
keyEntities: null
};
}
let convertData = data;
if (preserveSelectedRowKeys) {
// use flattedData keys
const keysSet = new Set(flattedData.map((record, index) => getRowKey(record, index)));
// remove preserveRecords that duplicate data
const preserveRecords = Array.from(preserveRecordsRef.current).reduce((total, _ref) => {
let [key, value] = _ref;
return keysSet.has(key) ? total : total.concat(value);
}, []);
convertData = [].concat((0,toConsumableArray["default"])(convertData), (0,toConsumableArray["default"])(preserveRecords));
}
return convertDataToEntities(convertData, {
externalGetKey: getRowKey,
childrenPropName: childrenColumnName
});
}, [data, getRowKey, checkStrictly, childrenColumnName, preserveSelectedRowKeys, flattedData]);
// Get all checkbox props
const checkboxPropsMap = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
const map = new Map();
flattedData.forEach((record, index) => {
const key = getRowKey(record, index);
const checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {};
map.set(key, checkboxProps);
true ? warning(!('checked' in checkboxProps || 'defaultChecked' in checkboxProps), 'usage', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.') : 0;
});
return map;
}, [flattedData, getRowKey, getCheckboxProps]);
const isCheckboxDisabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(r => {
const rowKey = getRowKey(r);
let checkboxProps;
if (checkboxPropsMap.has(rowKey)) {
checkboxProps = checkboxPropsMap.get(getRowKey(r));
} else {
checkboxProps = getCheckboxProps ? getCheckboxProps(r) : undefined;
}
return !!(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.disabled);
}, [checkboxPropsMap, getRowKey]);
const [derivedSelectedKeys, derivedHalfSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (checkStrictly) {
return [mergedSelectedKeys || [], []];
}
const {
checkedKeys,
halfCheckedKeys
} = conductCheck(mergedSelectedKeys, true, keyEntities, isCheckboxDisabled);
return [checkedKeys || [], halfCheckedKeys];
}, [mergedSelectedKeys, checkStrictly, keyEntities, isCheckboxDisabled]);
const derivedSelectedKeySet = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
const keys = selectionType === 'radio' ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys;
return new Set(keys);
}, [derivedSelectedKeys, selectionType]);
const derivedHalfSelectedKeySet = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => selectionType === 'radio' ? new Set() : new Set(derivedHalfSelectedKeys), [derivedHalfSelectedKeys, selectionType]);
// Reset if rowSelection reset
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (!rowSelection) {
setMergedSelectedKeys(useSelection_EMPTY_LIST);
}
}, [!!rowSelection]);
const setSelectedKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((keys, method) => {
let availableKeys;
let records;
updatePreserveRecordsCache(keys);
if (preserveSelectedRowKeys) {
availableKeys = keys;
records = keys.map(key => preserveRecordsRef.current.get(key));
} else {
// Filter key which not exist in the `dataSource`
availableKeys = [];
records = [];
keys.forEach(key => {
const record = getRecordByKey(key);
if (record !== undefined) {
availableKeys.push(key);
records.push(record);
}
});
}
setMergedSelectedKeys(availableKeys);
onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(availableKeys, records, {
type: method
});
}, [setMergedSelectedKeys, getRecordByKey, onSelectionChange, preserveSelectedRowKeys]);
// ====================== Selections ======================
// Trigger single `onSelect` event
const triggerSingleSelection = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((key, selected, keys, event) => {
if (onSelect) {
const rows = keys.map(k => getRecordByKey(k));
onSelect(getRecordByKey(key), selected, rows, event);
}
setSelectedKeys(keys, 'single');
}, [onSelect, getRecordByKey, setSelectedKeys]);
const mergedSelections = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (!selections || hideSelectAll) {
return null;
}
const selectionList = selections === true ? [SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE] : selections;
return selectionList.map(selection => {
if (selection === SELECTION_ALL) {
return {
key: 'all',
text: tableLocale.selectionAll,
onSelect() {
setSelectedKeys(data.map((record, index) => getRowKey(record, index)).filter(key => {
const checkProps = checkboxPropsMap.get(key);
return !(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled) || derivedSelectedKeySet.has(key);
}), 'all');
}
};
}
if (selection === SELECTION_INVERT) {
return {
key: 'invert',
text: tableLocale.selectInvert,
onSelect() {
const keySet = new Set(derivedSelectedKeySet);
pageData.forEach((record, index) => {
const key = getRowKey(record, index);
const checkProps = checkboxPropsMap.get(key);
if (!(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled)) {
if (keySet.has(key)) {
keySet.delete(key);
} else {
keySet.add(key);
}
}
});
const keys = Array.from(keySet);
if (onSelectInvert) {
warning.deprecated(false, 'onSelectInvert', 'onChange');
onSelectInvert(keys);
}
setSelectedKeys(keys, 'invert');
}
};
}
if (selection === SELECTION_NONE) {
return {
key: 'none',
text: tableLocale.selectNone,
onSelect() {
onSelectNone === null || onSelectNone === void 0 ? void 0 : onSelectNone();
setSelectedKeys(Array.from(derivedSelectedKeySet).filter(key => {
const checkProps = checkboxPropsMap.get(key);
return checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled;
}), 'none');
}
};
}
return selection;
}).map(selection => Object.assign(Object.assign({}, selection), {
onSelect: function () {
var _a2;
var _a;
for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) {
rest[_key] = arguments[_key];
}
(_a = selection.onSelect) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [selection].concat(rest));
updatePrevSelectedIndex(null);
}
}));
}, [selections, derivedSelectedKeySet, pageData, getRowKey, onSelectInvert, setSelectedKeys]);
// ======================= Columns ========================
const transformColumns = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(columns => {
var _a;
// >>>>>>>>>>> Skip if not exists `rowSelection`
if (!rowSelection) {
true ? warning(!columns.includes(SELECTION_COLUMN), 'usage', '`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`.') : 0;
return columns.filter(col => col !== SELECTION_COLUMN);
}
// >>>>>>>>>>> Support selection
let cloneColumns = (0,toConsumableArray["default"])(columns);
const keySet = new Set(derivedSelectedKeySet);
// Record key only need check with enabled
const recordKeys = flattedData.map(getRowKey).filter(key => !checkboxPropsMap.get(key).disabled);
const checkedCurrentAll = recordKeys.every(key => keySet.has(key));
const checkedCurrentSome = recordKeys.some(key => keySet.has(key));
const onSelectAllChange = () => {
const changeKeys = [];
if (checkedCurrentAll) {
recordKeys.forEach(key => {
keySet.delete(key);
changeKeys.push(key);
});
} else {
recordKeys.forEach(key => {
if (!keySet.has(key)) {
keySet.add(key);
changeKeys.push(key);
}
});
}
const keys = Array.from(keySet);
onSelectAll === null || onSelectAll === void 0 ? void 0 : onSelectAll(!checkedCurrentAll, keys.map(k => getRecordByKey(k)), changeKeys.map(k => getRecordByKey(k)));
setSelectedKeys(keys, 'all');
updatePrevSelectedIndex(null);
};
// ===================== Render =====================
// Title Cell
let title;
let columnTitleCheckbox;
if (selectionType !== 'radio') {
let customizeSelections;
if (mergedSelections) {
const menu = {
getPopupContainer,
items: mergedSelections.map((selection, index) => {
const {
key,
text,
onSelect: onSelectionClick
} = selection;
return {
key: key !== null && key !== void 0 ? key : index,
onClick: () => {
onSelectionClick === null || onSelectionClick === void 0 ? void 0 : onSelectionClick(recordKeys);
},
label: text
};
})
};
customizeSelections = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-selection-extra`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_dropdown, {
menu: menu,
getPopupContainer: getPopupContainer
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, null))));
}
const allDisabledData = flattedData.map((record, index) => {
const key = getRowKey(record, index);
const checkboxProps = checkboxPropsMap.get(key) || {};
return Object.assign({
checked: keySet.has(key)
}, checkboxProps);
}).filter(_ref2 => {
let {
disabled
} = _ref2;
return disabled;
});
const allDisabled = !!allDisabledData.length && allDisabledData.length === flattedData.length;
const allDisabledAndChecked = allDisabled && allDisabledData.every(_ref3 => {
let {
checked
} = _ref3;
return checked;
});
const allDisabledSomeChecked = allDisabled && allDisabledData.some(_ref4 => {
let {
checked
} = _ref4;
return checked;
});
columnTitleCheckbox = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, {
checked: !allDisabled ? !!flattedData.length && checkedCurrentAll : allDisabledAndChecked,
indeterminate: !allDisabled ? !checkedCurrentAll && checkedCurrentSome : !allDisabledAndChecked && allDisabledSomeChecked,
onChange: onSelectAllChange,
disabled: flattedData.length === 0 || allDisabled,
"aria-label": customizeSelections ? 'Custom selection' : 'Select all',
skipGroup: true
});
title = !hideSelectAll && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-selection`
}, columnTitleCheckbox, customizeSelections));
}
// Body Cell
let renderCell;
if (selectionType === 'radio') {
renderCell = (_, record, index) => {
const key = getRowKey(record, index);
const checked = keySet.has(key);
const checkboxProps = checkboxPropsMap.get(key);
return {
node: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_radio, Object.assign({}, checkboxProps, {
checked: checked,
onClick: e => {
var _a;
e.stopPropagation();
(_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
},
onChange: event => {
var _a;
if (!keySet.has(key)) {
triggerSingleSelection(key, true, [key], event.nativeEvent);
}
(_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, event);
}
}))),
checked
};
};
} else {
renderCell = (_, record, index) => {
var _a;
const key = getRowKey(record, index);
const checked = keySet.has(key);
const indeterminate = derivedHalfSelectedKeySet.has(key);
const checkboxProps = checkboxPropsMap.get(key);
let mergedIndeterminate;
if (expandType === 'nest') {
mergedIndeterminate = indeterminate;
true ? warning(typeof (checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== 'boolean', 'usage', 'set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.') : 0;
} else {
mergedIndeterminate = (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== null && _a !== void 0 ? _a : indeterminate;
}
// Record checked
return {
node: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, Object.assign({}, checkboxProps, {
indeterminate: mergedIndeterminate,
checked: checked,
skipGroup: true,
onClick: e => {
var _a;
e.stopPropagation();
(_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
},
onChange: event => {
var _a;
const {
nativeEvent
} = event;
const {
shiftKey
} = nativeEvent;
const currentSelectedIndex = recordKeys.findIndex(item => item === key);
const isMultiple = derivedSelectedKeys.some(item => recordKeys.includes(item));
if (shiftKey && checkStrictly && isMultiple) {
const changedKeys = multipleSelect(currentSelectedIndex, recordKeys, keySet);
const keys = Array.from(keySet);
onSelectMultiple === null || onSelectMultiple === void 0 ? void 0 : onSelectMultiple(!checked, keys.map(recordKey => getRecordByKey(recordKey)), changedKeys.map(recordKey => getRecordByKey(recordKey)));
setSelectedKeys(keys, 'multiple');
} else {
// Single record selected
const originCheckedKeys = derivedSelectedKeys;
if (checkStrictly) {
const checkedKeys = checked ? arrDel(originCheckedKeys, key) : arrAdd(originCheckedKeys, key);
triggerSingleSelection(key, !checked, checkedKeys, nativeEvent);
} else {
// Always fill first
const result = conductCheck([].concat((0,toConsumableArray["default"])(originCheckedKeys), [key]), true, keyEntities, isCheckboxDisabled);
const {
checkedKeys,
halfCheckedKeys
} = result;
let nextCheckedKeys = checkedKeys;
// If remove, we do it again to correction
if (checked) {
const tempKeySet = new Set(checkedKeys);
tempKeySet.delete(key);
nextCheckedKeys = conductCheck(Array.from(tempKeySet), {
checked: false,
halfCheckedKeys
}, keyEntities, isCheckboxDisabled).checkedKeys;
}
triggerSingleSelection(key, !checked, nextCheckedKeys, nativeEvent);
}
}
if (checked) {
updatePrevSelectedIndex(null);
} else {
updatePrevSelectedIndex(currentSelectedIndex);
}
(_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, event);
}
}))),
checked
};
};
}
const renderSelectionCell = (_, record, index) => {
const {
node,
checked
} = renderCell(_, record, index);
if (customizeRenderCell) {
return customizeRenderCell(checked, record, index, node);
}
return node;
};
// Insert selection column if not exist
if (!cloneColumns.includes(SELECTION_COLUMN)) {
// Always after expand icon
if (cloneColumns.findIndex(col => {
var _a;
return ((_a = col[INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN';
}) === 0) {
const [expandColumn, ...restColumns] = cloneColumns;
cloneColumns = [expandColumn, SELECTION_COLUMN].concat((0,toConsumableArray["default"])(restColumns));
} else {
// Normal insert at first column
cloneColumns = [SELECTION_COLUMN].concat((0,toConsumableArray["default"])(cloneColumns));
}
}
// Deduplicate selection column
const selectionColumnIndex = cloneColumns.indexOf(SELECTION_COLUMN);
true ? warning(cloneColumns.filter(col => col === SELECTION_COLUMN).length <= 1, 'usage', 'Multiple `SELECTION_COLUMN` exist in `columns`.') : 0;
cloneColumns = cloneColumns.filter((column, index) => column !== SELECTION_COLUMN || index === selectionColumnIndex);
// Fixed column logic
const prevCol = cloneColumns[selectionColumnIndex - 1];
const nextCol = cloneColumns[selectionColumnIndex + 1];
let mergedFixed = fixed;
if (mergedFixed === undefined) {
if ((nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed) !== undefined) {
mergedFixed = nextCol.fixed;
} else if ((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) !== undefined) {
mergedFixed = prevCol.fixed;
}
}
if (mergedFixed && prevCol && ((_a = prevCol[INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN' && prevCol.fixed === undefined) {
prevCol.fixed = mergedFixed;
}
const columnCls = classnames_default()(`${prefixCls}-selection-col`, {
[`${prefixCls}-selection-col-with-dropdown`]: selections && selectionType === 'checkbox'
});
const renderColumnTitle = () => {
if (!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.columnTitle)) {
return title;
}
if (typeof rowSelection.columnTitle === 'function') {
return rowSelection.columnTitle(columnTitleCheckbox);
}
return rowSelection.columnTitle;
};
// Replace with real selection column
const selectionColumn = {
fixed: mergedFixed,
width: selectionColWidth,
className: `${prefixCls}-selection-column`,
title: renderColumnTitle(),
render: renderSelectionCell,
onCell: rowSelection.onCell,
[INTERNAL_COL_DEFINE]: {
className: columnCls
}
};
return cloneColumns.map(col => col === SELECTION_COLUMN ? selectionColumn : col);
}, [getRowKey, flattedData, rowSelection, derivedSelectedKeys, derivedSelectedKeySet, derivedHalfSelectedKeySet, selectionColWidth, mergedSelections, expandType, checkboxPropsMap, onSelectMultiple, triggerSingleSelection, isCheckboxDisabled]);
return [transformColumns, derivedSelectedKeySet];
};
/* harmony default export */ var hooks_useSelection = (useSelection);
;// ./components/_util/hooks/useProxyImperativeHandle.ts
// Proxy the dom ref with `{ nativeElement, otherFn }` type
// ref: https://github.com/ant-design/ant-design/discussions/45242
function fillProxy(element, handler) {
element._antProxy = element._antProxy || {};
Object.keys(handler).forEach(key => {
if (!(key in element._antProxy)) {
const ori = element[key];
element._antProxy[key] = ori;
element[key] = handler[key];
}
});
return element;
}
function useProxyImperativeHandle(ref, init) {
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => {
const refObj = init();
const {
nativeElement
} = refObj;
if (typeof Proxy !== 'undefined') {
return new Proxy(nativeElement, {
get(obj, prop) {
if (refObj[prop]) {
return refObj[prop];
}
return Reflect.get(obj, prop);
}
});
}
// Fallback of IE
return fillProxy(nativeElement, refObj);
});
}
;// ./components/table/ExpandIcon.tsx
function ExpandIcon_renderExpandIcon(locale) {
return props => {
const {
prefixCls,
onExpand,
record,
expanded,
expandable
} = props;
const iconPrefix = `${prefixCls}-row-expand-icon`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
onClick: e => {
onExpand(record, e);
e.stopPropagation();
},
className: classnames_default()(iconPrefix, {
[`${iconPrefix}-spaced`]: !expandable,
[`${iconPrefix}-expanded`]: expandable && expanded,
[`${iconPrefix}-collapsed`]: expandable && !expanded
}),
"aria-label": expanded ? locale.collapse : locale.expand,
"aria-expanded": expanded
});
};
}
/* harmony default export */ var ExpandIcon = (ExpandIcon_renderExpandIcon);
;// ./components/table/hooks/useContainerWidth.ts
function useContainerWidth(prefixCls) {
const getContainerWidth = (ele, width) => {
const container = ele.querySelector(`.${prefixCls}-container`);
let returnWidth = width;
if (container) {
const style = getComputedStyle(container);
const borderLeft = parseInt(style.borderLeftWidth, 10);
const borderRight = parseInt(style.borderRightWidth, 10);
returnWidth = width - borderLeft - borderRight;
}
return returnWidth;
};
return getContainerWidth;
}
;// ./components/table/util.ts
const 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 ? `${pos}-${index}` : `${index}`;
}
const renderColumnTitle = (title, props) => {
if (typeof title === 'function') {
return title(props);
}
return title;
};
/**
* Safe get column title
*
* Should filter [object Object]
*
* @param title
*/
const safeColumnTitle = (title, props) => {
const res = renderColumnTitle(title, props);
if (Object.prototype.toString.call(res) === '[object Object]') {
return '';
}
return res;
};
;// ./node_modules/@ant-design/icons-svg/es/asn/FilterFilled.js
// This icon file is generated automatically.
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" };
/* harmony default export */ var asn_FilterFilled = (FilterFilled);
;// ./node_modules/@ant-design/icons/es/icons/FilterFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FilterFilled_FilterFilled = function FilterFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_FilterFilled
}));
};
/** */
var FilterFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FilterFilled_FilterFilled);
if (true) {
FilterFilled_RefIcon.displayName = 'FilterFilled';
}
/* harmony default export */ var icons_FilterFilled = (FilterFilled_RefIcon);
;// ./components/_util/hooks/useSyncState.ts
function hooks_useSyncState_useSyncState(initialValue) {
const ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(initialValue);
const forceUpdate = useForceUpdate();
return [() => ref.current, newValue => {
ref.current = newValue;
// re-render
forceUpdate();
}];
}
;// ./node_modules/rc-tree/es/DropIndicator.js
var DropIndicator = function DropIndicator(props) {
var dropPosition = props.dropPosition,
dropLevelOffset = props.dropLevelOffset,
indent = props.indent;
var style = {
pointerEvents: 'none',
position: 'absolute',
right: 0,
backgroundColor: 'red',
height: 2
};
switch (dropPosition) {
case -1:
style.top = 0;
style.left = -dropLevelOffset * indent;
break;
case 1:
style.bottom = 0;
style.left = -dropLevelOffset * indent;
break;
case 0:
style.bottom = 0;
style.left = indent;
break;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
style: style
});
};
if (true) {
DropIndicator.displayName = 'DropIndicator';
}
/* harmony default export */ var es_DropIndicator = (DropIndicator);
;// ./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
function _objectDestructuringEmpty(t) {
if (null == t) throw new TypeError("Cannot destructure " + t);
}
;// ./node_modules/rc-tree/es/useUnmount.js
/**
* Trigger only when component unmount
*/
function useUnmount(triggerStart, triggerEnd) {
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
firstMount = _React$useState2[0],
setFirstMount = _React$useState2[1];
(0,useLayoutEffect["default"])(function () {
if (firstMount) {
triggerStart();
return function () {
triggerEnd();
};
}
}, [firstMount]);
(0,useLayoutEffect["default"])(function () {
setFirstMount(true);
return function () {
setFirstMount(false);
};
}, []);
}
/* harmony default export */ var es_useUnmount = (useUnmount);
;// ./node_modules/rc-tree/es/MotionTreeNode.js
var MotionTreeNode_excluded = ["className", "style", "motion", "motionNodes", "motionType", "onMotionStart", "onMotionEnd", "active", "treeNodeRequiredProps"];
var MotionTreeNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (oriProps, ref) {
var className = oriProps.className,
style = oriProps.style,
motion = oriProps.motion,
motionNodes = oriProps.motionNodes,
motionType = oriProps.motionType,
onOriginMotionStart = oriProps.onMotionStart,
onOriginMotionEnd = oriProps.onMotionEnd,
active = oriProps.active,
treeNodeRequiredProps = oriProps.treeNodeRequiredProps,
props = (0,objectWithoutProperties["default"])(oriProps, MotionTreeNode_excluded);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
visible = _React$useState2[0],
setVisible = _React$useState2[1];
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TreeContext),
prefixCls = _React$useContext.prefixCls;
// Calculate target visible here.
// And apply in effect to make `leave` motion work.
var targetVisible = motionNodes && motionType !== 'hide';
(0,useLayoutEffect["default"])(function () {
if (motionNodes) {
if (targetVisible !== visible) {
setVisible(targetVisible);
}
}
}, [motionNodes]);
var triggerMotionStart = function triggerMotionStart() {
if (motionNodes) {
onOriginMotionStart();
}
};
// Should only trigger once
var triggerMotionEndRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
var triggerMotionEnd = function triggerMotionEnd() {
if (motionNodes && !triggerMotionEndRef.current) {
triggerMotionEndRef.current = true;
onOriginMotionEnd();
}
};
// Effect if unmount
es_useUnmount(triggerMotionStart, triggerMotionEnd);
// Motion end event
var onVisibleChanged = function onVisibleChanged(nextVisible) {
if (targetVisible === nextVisible) {
triggerMotionEnd();
}
};
if (motionNodes) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
ref: ref,
visible: visible
}, motion, {
motionAppear: motionType === 'show',
onVisibleChanged: onVisibleChanged
}), function (_ref, motionRef) {
var motionClassName = _ref.className,
motionStyle = _ref.style;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: motionRef,
className: classnames_default()("".concat(prefixCls, "-treenode-motion"), motionClassName),
style: motionStyle
}, motionNodes.map(function (treeNode) {
var restProps = Object.assign({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),
title = treeNode.title,
key = treeNode.key,
isStart = treeNode.isStart,
isEnd = treeNode.isEnd;
delete restProps.children;
var treeNodeProps = getTreeNodeProps(key, treeNodeRequiredProps);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TreeNode, (0,esm_extends["default"])({}, restProps, treeNodeProps, {
title: title,
active: active,
data: treeNode.data,
key: key,
isStart: isStart,
isEnd: isEnd
}));
}));
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TreeNode, (0,esm_extends["default"])({
domRef: ref,
className: className,
style: style
}, props, {
active: active
}));
});
if (true) {
MotionTreeNode.displayName = 'MotionTreeNode';
}
/* harmony default export */ var es_MotionTreeNode = (MotionTreeNode);
;// ./node_modules/rc-tree/es/utils/diffUtil.js
function findExpandedKeys() {
var prev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var next = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var prevLen = prev.length;
var nextLen = next.length;
if (Math.abs(prevLen - nextLen) !== 1) {
return {
add: false,
key: null
};
}
function find(shorter, longer) {
var cache = new Map();
shorter.forEach(function (key) {
cache.set(key, true);
});
var keys = longer.filter(function (key) {
return !cache.has(key);
});
return keys.length === 1 ? keys[0] : null;
}
if (prevLen < nextLen) {
return {
add: true,
key: find(prev, next)
};
}
return {
add: false,
key: find(next, prev)
};
}
function getExpandRange(shorter, longer, key) {
var shorterStartIndex = shorter.findIndex(function (data) {
return data.key === key;
});
var shorterEndNode = shorter[shorterStartIndex + 1];
var longerStartIndex = longer.findIndex(function (data) {
return data.key === key;
});
if (shorterEndNode) {
var longerEndIndex = longer.findIndex(function (data) {
return data.key === shorterEndNode.key;
});
return longer.slice(longerStartIndex + 1, longerEndIndex);
}
return longer.slice(longerStartIndex + 1);
}
;// ./node_modules/rc-tree/es/NodeList.js
var NodeList_excluded = ["prefixCls", "data", "selectable", "checkable", "expandedKeys", "selectedKeys", "checkedKeys", "loadedKeys", "loadingKeys", "halfCheckedKeys", "keyEntities", "disabled", "dragging", "dragOverNodeKey", "dropPosition", "motion", "height", "itemHeight", "virtual", "scrollWidth", "focusable", "activeItem", "focused", "tabIndex", "onKeyDown", "onFocus", "onBlur", "onActiveChange", "onListChangeStart", "onListChangeEnd"];
/**
* Handle virtual list of the TreeNodes.
*/
var NodeList_HIDDEN_STYLE = {
width: 0,
height: 0,
display: 'flex',
overflow: 'hidden',
opacity: 0,
border: 0,
padding: 0,
margin: 0
};
var NodeList_noop = function noop() {};
var MOTION_KEY = "RC_TREE_MOTION_".concat(Math.random());
var MotionNode = {
key: MOTION_KEY
};
var MotionEntity = {
key: MOTION_KEY,
level: 0,
index: 0,
pos: '0',
node: MotionNode,
nodes: [MotionNode]
};
var MotionFlattenData = {
parent: null,
children: [],
pos: MotionEntity.pos,
data: MotionNode,
title: null,
key: MOTION_KEY,
/** Hold empty list here since we do not use it */
isStart: [],
isEnd: []
};
/**
* We only need get visible content items to play the animation.
*/
function getMinimumRangeTransitionRange(list, virtual, height, itemHeight) {
if (virtual === false || !height) {
return list;
}
return list.slice(0, Math.ceil(height / itemHeight) + 1);
}
function NodeList_itemKey(item) {
var key = item.key,
pos = item.pos;
return treeUtil_getKey(key, pos);
}
function getAccessibilityPath(item) {
var path = String(item.data.key);
var current = item;
while (current.parent) {
current = current.parent;
path = "".concat(current.data.key, " > ").concat(path);
}
return path;
}
var NodeList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
data = props.data,
selectable = props.selectable,
checkable = props.checkable,
expandedKeys = props.expandedKeys,
selectedKeys = props.selectedKeys,
checkedKeys = props.checkedKeys,
loadedKeys = props.loadedKeys,
loadingKeys = props.loadingKeys,
halfCheckedKeys = props.halfCheckedKeys,
keyEntities = props.keyEntities,
disabled = props.disabled,
dragging = props.dragging,
dragOverNodeKey = props.dragOverNodeKey,
dropPosition = props.dropPosition,
motion = props.motion,
height = props.height,
itemHeight = props.itemHeight,
virtual = props.virtual,
scrollWidth = props.scrollWidth,
focusable = props.focusable,
activeItem = props.activeItem,
focused = props.focused,
tabIndex = props.tabIndex,
onKeyDown = props.onKeyDown,
onFocus = props.onFocus,
onBlur = props.onBlur,
onActiveChange = props.onActiveChange,
onListChangeStart = props.onListChangeStart,
onListChangeEnd = props.onListChangeEnd,
domProps = (0,objectWithoutProperties["default"])(props, NodeList_excluded);
// =============================== Ref ================================
var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
var indentMeasurerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
return {
scrollTo: function scrollTo(scroll) {
listRef.current.scrollTo(scroll);
},
getIndentWidth: function getIndentWidth() {
return indentMeasurerRef.current.offsetWidth;
}
};
});
// ============================== Motion ==============================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(expandedKeys),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
prevExpandedKeys = _React$useState2[0],
setPrevExpandedKeys = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(data),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
prevData = _React$useState4[0],
setPrevData = _React$useState4[1];
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(data),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
transitionData = _React$useState6[0],
setTransitionData = _React$useState6[1];
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
transitionRange = _React$useState8[0],
setTransitionRange = _React$useState8[1];
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
motionType = _React$useState10[0],
setMotionType = _React$useState10[1];
// When motion end but data change, this will makes data back to previous one
var dataRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(data);
dataRef.current = data;
function onMotionEnd() {
var latestData = dataRef.current;
setPrevData(latestData);
setTransitionData(latestData);
setTransitionRange([]);
setMotionType(null);
onListChangeEnd();
}
// Do animation if expanded keys changed
// layoutEffect here to avoid blink of node removing
(0,useLayoutEffect["default"])(function () {
setPrevExpandedKeys(expandedKeys);
var diffExpanded = findExpandedKeys(prevExpandedKeys, expandedKeys);
if (diffExpanded.key !== null) {
if (diffExpanded.add) {
var keyIndex = prevData.findIndex(function (_ref) {
var key = _ref.key;
return key === diffExpanded.key;
});
var rangeNodes = getMinimumRangeTransitionRange(getExpandRange(prevData, data, diffExpanded.key), virtual, height, itemHeight);
var newTransitionData = prevData.slice();
newTransitionData.splice(keyIndex + 1, 0, MotionFlattenData);
setTransitionData(newTransitionData);
setTransitionRange(rangeNodes);
setMotionType('show');
} else {
var _keyIndex = data.findIndex(function (_ref2) {
var key = _ref2.key;
return key === diffExpanded.key;
});
var _rangeNodes = getMinimumRangeTransitionRange(getExpandRange(data, prevData, diffExpanded.key), virtual, height, itemHeight);
var _newTransitionData = data.slice();
_newTransitionData.splice(_keyIndex + 1, 0, MotionFlattenData);
setTransitionData(_newTransitionData);
setTransitionRange(_rangeNodes);
setMotionType('hide');
}
} else if (prevData !== data) {
// If whole data changed, we just refresh the list
setPrevData(data);
setTransitionData(data);
}
}, [expandedKeys, data]);
// We should clean up motion if is changed by dragging
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!dragging) {
onMotionEnd();
}
}, [dragging]);
var mergedData = motion ? transitionData : data;
var treeNodeRequiredProps = {
expandedKeys: expandedKeys,
selectedKeys: selectedKeys,
loadedKeys: loadedKeys,
loadingKeys: loadingKeys,
checkedKeys: checkedKeys,
halfCheckedKeys: halfCheckedKeys,
dragOverNodeKey: dragOverNodeKey,
dropPosition: dropPosition,
keyEntities: keyEntities
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, focused && activeItem && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: NodeList_HIDDEN_STYLE,
"aria-live": "assertive"
}, getAccessibilityPath(activeItem)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", {
style: NodeList_HIDDEN_STYLE,
disabled: focusable === false || disabled,
tabIndex: focusable !== false ? tabIndex : null,
onKeyDown: onKeyDown,
onFocus: onFocus,
onBlur: onBlur,
value: "",
onChange: NodeList_noop,
"aria-label": "for screen reader"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-treenode"),
"aria-hidden": true,
style: {
position: 'absolute',
pointerEvents: 'none',
visibility: 'hidden',
height: 0,
overflow: 'hidden',
border: 0,
padding: 0
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-indent")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: indentMeasurerRef,
className: "".concat(prefixCls, "-indent-unit")
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_virtual_list_es, (0,esm_extends["default"])({}, domProps, {
data: mergedData,
itemKey: NodeList_itemKey,
height: height,
fullHeight: false,
virtual: virtual,
itemHeight: itemHeight,
scrollWidth: scrollWidth,
prefixCls: "".concat(prefixCls, "-list"),
ref: listRef,
role: "tree",
onVisibleChange: function onVisibleChange(originList) {
// The best match is using `fullList` - `originList` = `restList`
// and check the `restList` to see if has the MOTION_KEY node
// but this will cause performance issue for long list compare
// we just check `originList` and repeat trigger `onMotionEnd`
if (originList.every(function (item) {
return NodeList_itemKey(item) !== MOTION_KEY;
})) {
onMotionEnd();
}
}
}), function (treeNode) {
var pos = treeNode.pos,
restProps = Object.assign({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),
title = treeNode.title,
key = treeNode.key,
isStart = treeNode.isStart,
isEnd = treeNode.isEnd;
var mergedKey = treeUtil_getKey(key, pos);
delete restProps.key;
delete restProps.children;
var treeNodeProps = getTreeNodeProps(mergedKey, treeNodeRequiredProps);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MotionTreeNode, (0,esm_extends["default"])({}, restProps, treeNodeProps, {
title: title,
active: !!activeItem && key === activeItem.key,
pos: pos,
data: treeNode.data,
isStart: isStart,
isEnd: isEnd,
motion: motion,
motionNodes: key === MOTION_KEY ? transitionRange : null,
motionType: motionType,
onMotionStart: onListChangeStart,
onMotionEnd: onMotionEnd,
treeNodeRequiredProps: treeNodeRequiredProps,
onMouseMove: function onMouseMove() {
onActiveChange(null);
}
}));
}));
});
if (true) {
NodeList.displayName = 'NodeList';
}
/* harmony default export */ var es_NodeList = (NodeList);
;// ./node_modules/rc-tree/es/Tree.js
// TODO: https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/treeview/treeview-2/treeview-2a.html
// Fully accessibility support
var MAX_RETRY_TIMES = 10;
var Tree = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(Tree, _React$Component);
var _super = (0,createSuper["default"])(Tree);
function Tree() {
var _this;
(0,classCallCheck["default"])(this, Tree);
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
_args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(_args));
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "destroyed", false);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "delayedDragEnterLogic", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "loadingRetryTimes", {});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
keyEntities: {},
indent: null,
selectedKeys: [],
checkedKeys: [],
halfCheckedKeys: [],
loadedKeys: [],
loadingKeys: [],
expandedKeys: [],
draggingNodeKey: null,
dragChildrenKeys: [],
// dropTargetKey is the key of abstract-drop-node
// the abstract-drop-node is the real drop node when drag and drop
// not the DOM drag over node
dropTargetKey: null,
dropPosition: null,
// the drop position of abstract-drop-node, inside 0, top -1, bottom 1
dropContainerKey: null,
// the container key of abstract-drop-node if dropPosition is -1 or 1
dropLevelOffset: null,
// the drop level offset of abstract-drag-over-node
dropTargetPos: null,
// the pos of abstract-drop-node
dropAllowed: true,
// if drop to abstract-drop-node is allowed
// the abstract-drag-over-node
// if mouse is on the bottom of top dom node or no the top of the bottom dom node
// abstract-drag-over-node is the top node
dragOverNodeKey: null,
treeData: [],
flattenNodes: [],
focused: false,
activeKey: null,
listChanging: false,
prevProps: null,
fieldNames: treeUtil_fillFieldNames()
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "dragStartMousePosition", null);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "dragNodeProps", null);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "currentMouseOverDroppableNodeKey", null);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "listRef", /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createRef());
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragStart", function (event, nodeProps) {
var _this$state = _this.state,
expandedKeys = _this$state.expandedKeys,
keyEntities = _this$state.keyEntities;
var onDragStart = _this.props.onDragStart;
var eventKey = nodeProps.eventKey;
_this.dragNodeProps = nodeProps;
_this.dragStartMousePosition = {
x: event.clientX,
y: event.clientY
};
var newExpandedKeys = arrDel(expandedKeys, eventKey);
_this.setState({
draggingNodeKey: eventKey,
dragChildrenKeys: getDragChildrenKeys(eventKey, keyEntities),
indent: _this.listRef.current.getIndentWidth()
});
_this.setExpandedKeys(newExpandedKeys);
window.addEventListener('dragend', _this.onWindowDragEnd);
onDragStart === null || onDragStart === void 0 || onDragStart({
event: event,
node: convertNodePropsToEventData(nodeProps)
});
});
/**
* [Legacy] Select handler is smaller than node,
* so that this will trigger when drag enter node or select handler.
* This is a little tricky if customize css without padding.
* Better for use mouse move event to refresh drag state.
* But let's just keep it to avoid event trigger logic change.
*/
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragEnter", function (event, nodeProps) {
var _this$state2 = _this.state,
expandedKeys = _this$state2.expandedKeys,
keyEntities = _this$state2.keyEntities,
dragChildrenKeys = _this$state2.dragChildrenKeys,
flattenNodes = _this$state2.flattenNodes,
indent = _this$state2.indent;
var _this$props = _this.props,
onDragEnter = _this$props.onDragEnter,
onExpand = _this$props.onExpand,
allowDrop = _this$props.allowDrop,
direction = _this$props.direction;
var pos = nodeProps.pos,
eventKey = nodeProps.eventKey;
// record the key of node which is latest entered, used in dragleave event.
if (_this.currentMouseOverDroppableNodeKey !== eventKey) {
_this.currentMouseOverDroppableNodeKey = eventKey;
}
if (!_this.dragNodeProps) {
_this.resetDragState();
return;
}
var _calcDropPosition = calcDropPosition(event, _this.dragNodeProps, nodeProps, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),
dropPosition = _calcDropPosition.dropPosition,
dropLevelOffset = _calcDropPosition.dropLevelOffset,
dropTargetKey = _calcDropPosition.dropTargetKey,
dropContainerKey = _calcDropPosition.dropContainerKey,
dropTargetPos = _calcDropPosition.dropTargetPos,
dropAllowed = _calcDropPosition.dropAllowed,
dragOverNodeKey = _calcDropPosition.dragOverNodeKey;
if (
// don't allow drop inside its children
dragChildrenKeys.includes(dropTargetKey) ||
// don't allow drop when drop is not allowed caculated by calcDropPosition
!dropAllowed) {
_this.resetDragState();
return;
}
// Side effect for delay drag
if (!_this.delayedDragEnterLogic) {
_this.delayedDragEnterLogic = {};
}
Object.keys(_this.delayedDragEnterLogic).forEach(function (key) {
clearTimeout(_this.delayedDragEnterLogic[key]);
});
if (_this.dragNodeProps.eventKey !== nodeProps.eventKey) {
// hoist expand logic here
// since if logic is on the bottom
// it will be blocked by abstract dragover node check
// => if you dragenter from top, you mouse will still be consider as in the top node
event.persist();
_this.delayedDragEnterLogic[pos] = window.setTimeout(function () {
if (_this.state.draggingNodeKey === null) {
return;
}
var newExpandedKeys = (0,toConsumableArray["default"])(expandedKeys);
var entity = getEntity(keyEntities, nodeProps.eventKey);
if (entity && (entity.children || []).length) {
newExpandedKeys = arrAdd(expandedKeys, nodeProps.eventKey);
}
if (!_this.props.hasOwnProperty('expandedKeys')) {
_this.setExpandedKeys(newExpandedKeys);
}
onExpand === null || onExpand === void 0 || onExpand(newExpandedKeys, {
node: convertNodePropsToEventData(nodeProps),
expanded: true,
nativeEvent: event.nativeEvent
});
}, 800);
}
// Skip if drag node is self
if (_this.dragNodeProps.eventKey === dropTargetKey && dropLevelOffset === 0) {
_this.resetDragState();
return;
}
// Update drag over node and drag state
_this.setState({
dragOverNodeKey: dragOverNodeKey,
dropPosition: dropPosition,
dropLevelOffset: dropLevelOffset,
dropTargetKey: dropTargetKey,
dropContainerKey: dropContainerKey,
dropTargetPos: dropTargetPos,
dropAllowed: dropAllowed
});
onDragEnter === null || onDragEnter === void 0 || onDragEnter({
event: event,
node: convertNodePropsToEventData(nodeProps),
expandedKeys: expandedKeys
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragOver", function (event, nodeProps) {
var _this$state3 = _this.state,
dragChildrenKeys = _this$state3.dragChildrenKeys,
flattenNodes = _this$state3.flattenNodes,
keyEntities = _this$state3.keyEntities,
expandedKeys = _this$state3.expandedKeys,
indent = _this$state3.indent;
var _this$props2 = _this.props,
onDragOver = _this$props2.onDragOver,
allowDrop = _this$props2.allowDrop,
direction = _this$props2.direction;
if (!_this.dragNodeProps) {
return;
}
var _calcDropPosition2 = calcDropPosition(event, _this.dragNodeProps, nodeProps, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),
dropPosition = _calcDropPosition2.dropPosition,
dropLevelOffset = _calcDropPosition2.dropLevelOffset,
dropTargetKey = _calcDropPosition2.dropTargetKey,
dropContainerKey = _calcDropPosition2.dropContainerKey,
dropTargetPos = _calcDropPosition2.dropTargetPos,
dropAllowed = _calcDropPosition2.dropAllowed,
dragOverNodeKey = _calcDropPosition2.dragOverNodeKey;
if (dragChildrenKeys.includes(dropTargetKey) || !dropAllowed) {
// don't allow drop inside its children
// don't allow drop when drop is not allowed calculated by calcDropPosition
return;
}
// Update drag position
if (_this.dragNodeProps.eventKey === dropTargetKey && dropLevelOffset === 0) {
if (!(_this.state.dropPosition === null && _this.state.dropLevelOffset === null && _this.state.dropTargetKey === null && _this.state.dropContainerKey === null && _this.state.dropTargetPos === null && _this.state.dropAllowed === false && _this.state.dragOverNodeKey === null)) {
_this.resetDragState();
}
} else if (!(dropPosition === _this.state.dropPosition && dropLevelOffset === _this.state.dropLevelOffset && dropTargetKey === _this.state.dropTargetKey && dropContainerKey === _this.state.dropContainerKey && dropTargetPos === _this.state.dropTargetPos && dropAllowed === _this.state.dropAllowed && dragOverNodeKey === _this.state.dragOverNodeKey)) {
_this.setState({
dropPosition: dropPosition,
dropLevelOffset: dropLevelOffset,
dropTargetKey: dropTargetKey,
dropContainerKey: dropContainerKey,
dropTargetPos: dropTargetPos,
dropAllowed: dropAllowed,
dragOverNodeKey: dragOverNodeKey
});
}
onDragOver === null || onDragOver === void 0 || onDragOver({
event: event,
node: convertNodePropsToEventData(nodeProps)
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragLeave", function (event, nodeProps) {
// if it is outside the droppable area
// currentMouseOverDroppableNodeKey will be updated in dragenter event when into another droppable receiver.
if (_this.currentMouseOverDroppableNodeKey === nodeProps.eventKey && !event.currentTarget.contains(event.relatedTarget)) {
_this.resetDragState();
_this.currentMouseOverDroppableNodeKey = null;
}
var onDragLeave = _this.props.onDragLeave;
onDragLeave === null || onDragLeave === void 0 || onDragLeave({
event: event,
node: convertNodePropsToEventData(nodeProps)
});
});
// since stopPropagation() is called in treeNode
// if onWindowDrag is called, whice means state is keeped, drag state should be cleared
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onWindowDragEnd", function (event) {
_this.onNodeDragEnd(event, null, true);
window.removeEventListener('dragend', _this.onWindowDragEnd);
});
// if onNodeDragEnd is called, onWindowDragEnd won't be called since stopPropagation() is called
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragEnd", function (event, nodeProps) {
var onDragEnd = _this.props.onDragEnd;
_this.setState({
dragOverNodeKey: null
});
_this.cleanDragState();
onDragEnd === null || onDragEnd === void 0 || onDragEnd({
event: event,
node: convertNodePropsToEventData(nodeProps)
});
_this.dragNodeProps = null;
window.removeEventListener('dragend', _this.onWindowDragEnd);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDrop", function (event, _) {
var _this$getActiveItem;
var outsideTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var _this$state4 = _this.state,
dragChildrenKeys = _this$state4.dragChildrenKeys,
dropPosition = _this$state4.dropPosition,
dropTargetKey = _this$state4.dropTargetKey,
dropTargetPos = _this$state4.dropTargetPos,
dropAllowed = _this$state4.dropAllowed;
if (!dropAllowed) {
return;
}
var onDrop = _this.props.onDrop;
_this.setState({
dragOverNodeKey: null
});
_this.cleanDragState();
if (dropTargetKey === null) return;
var abstractDropNodeProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getTreeNodeProps(dropTargetKey, _this.getTreeNodeRequiredProps())), {}, {
active: ((_this$getActiveItem = _this.getActiveItem()) === null || _this$getActiveItem === void 0 ? void 0 : _this$getActiveItem.key) === dropTargetKey,
data: getEntity(_this.state.keyEntities, dropTargetKey).node
});
var dropToChild = dragChildrenKeys.includes(dropTargetKey);
(0,warning["default"])(!dropToChild, "Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");
var posArr = posToArr(dropTargetPos);
var dropResult = {
event: event,
node: convertNodePropsToEventData(abstractDropNodeProps),
dragNode: _this.dragNodeProps ? convertNodePropsToEventData(_this.dragNodeProps) : null,
dragNodesKeys: [_this.dragNodeProps.eventKey].concat(dragChildrenKeys),
dropToGap: dropPosition !== 0,
dropPosition: dropPosition + Number(posArr[posArr.length - 1])
};
if (!outsideTree) {
onDrop === null || onDrop === void 0 || onDrop(dropResult);
}
_this.dragNodeProps = null;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "cleanDragState", function () {
var draggingNodeKey = _this.state.draggingNodeKey;
if (draggingNodeKey !== null) {
_this.setState({
draggingNodeKey: null,
dropPosition: null,
dropContainerKey: null,
dropTargetKey: null,
dropLevelOffset: null,
dropAllowed: true,
dragOverNodeKey: null
});
}
_this.dragStartMousePosition = null;
_this.currentMouseOverDroppableNodeKey = null;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "triggerExpandActionExpand", function (e, treeNode) {
var _this$state5 = _this.state,
expandedKeys = _this$state5.expandedKeys,
flattenNodes = _this$state5.flattenNodes;
var expanded = treeNode.expanded,
key = treeNode.key,
isLeaf = treeNode.isLeaf;
if (isLeaf || e.shiftKey || e.metaKey || e.ctrlKey) {
return;
}
var node = flattenNodes.filter(function (nodeItem) {
return nodeItem.key === key;
})[0];
var eventNode = convertNodePropsToEventData((0,objectSpread2["default"])((0,objectSpread2["default"])({}, getTreeNodeProps(key, _this.getTreeNodeRequiredProps())), {}, {
data: node.data
}));
_this.setExpandedKeys(expanded ? arrDel(expandedKeys, key) : arrAdd(expandedKeys, key));
_this.onNodeExpand(e, eventNode);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeClick", function (e, treeNode) {
var _this$props3 = _this.props,
onClick = _this$props3.onClick,
expandAction = _this$props3.expandAction;
if (expandAction === 'click') {
_this.triggerExpandActionExpand(e, treeNode);
}
onClick === null || onClick === void 0 || onClick(e, treeNode);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDoubleClick", function (e, treeNode) {
var _this$props4 = _this.props,
onDoubleClick = _this$props4.onDoubleClick,
expandAction = _this$props4.expandAction;
if (expandAction === 'doubleClick') {
_this.triggerExpandActionExpand(e, treeNode);
}
onDoubleClick === null || onDoubleClick === void 0 || onDoubleClick(e, treeNode);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeSelect", function (e, treeNode) {
var selectedKeys = _this.state.selectedKeys;
var _this$state6 = _this.state,
keyEntities = _this$state6.keyEntities,
fieldNames = _this$state6.fieldNames;
var _this$props5 = _this.props,
onSelect = _this$props5.onSelect,
multiple = _this$props5.multiple;
var selected = treeNode.selected;
var key = treeNode[fieldNames.key];
var targetSelected = !selected;
// Update selected keys
if (!targetSelected) {
selectedKeys = arrDel(selectedKeys, key);
} else if (!multiple) {
selectedKeys = [key];
} else {
selectedKeys = arrAdd(selectedKeys, key);
}
// [Legacy] Not found related usage in doc or upper libs
var selectedNodes = selectedKeys.map(function (selectedKey) {
var entity = getEntity(keyEntities, selectedKey);
return entity ? entity.node : null;
}).filter(Boolean);
_this.setUncontrolledState({
selectedKeys: selectedKeys
});
onSelect === null || onSelect === void 0 || onSelect(selectedKeys, {
event: 'select',
selected: targetSelected,
node: treeNode,
selectedNodes: selectedNodes,
nativeEvent: e.nativeEvent
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeCheck", function (e, treeNode, checked) {
var _this$state7 = _this.state,
keyEntities = _this$state7.keyEntities,
oriCheckedKeys = _this$state7.checkedKeys,
oriHalfCheckedKeys = _this$state7.halfCheckedKeys;
var _this$props6 = _this.props,
checkStrictly = _this$props6.checkStrictly,
onCheck = _this$props6.onCheck;
var key = treeNode.key;
// Prepare trigger arguments
var checkedObj;
var eventObj = {
event: 'check',
node: treeNode,
checked: checked,
nativeEvent: e.nativeEvent
};
if (checkStrictly) {
var checkedKeys = checked ? arrAdd(oriCheckedKeys, key) : arrDel(oriCheckedKeys, key);
var halfCheckedKeys = arrDel(oriHalfCheckedKeys, key);
checkedObj = {
checked: checkedKeys,
halfChecked: halfCheckedKeys
};
eventObj.checkedNodes = checkedKeys.map(function (checkedKey) {
return getEntity(keyEntities, checkedKey);
}).filter(Boolean).map(function (entity) {
return entity.node;
});
_this.setUncontrolledState({
checkedKeys: checkedKeys
});
} else {
// Always fill first
var _conductCheck = conductCheck([].concat((0,toConsumableArray["default"])(oriCheckedKeys), [key]), true, keyEntities),
_checkedKeys = _conductCheck.checkedKeys,
_halfCheckedKeys = _conductCheck.halfCheckedKeys;
// If remove, we do it again to correction
if (!checked) {
var keySet = new Set(_checkedKeys);
keySet.delete(key);
var _conductCheck2 = conductCheck(Array.from(keySet), {
checked: false,
halfCheckedKeys: _halfCheckedKeys
}, keyEntities);
_checkedKeys = _conductCheck2.checkedKeys;
_halfCheckedKeys = _conductCheck2.halfCheckedKeys;
}
checkedObj = _checkedKeys;
// [Legacy] This is used for `rc-tree-select`
eventObj.checkedNodes = [];
eventObj.checkedNodesPositions = [];
eventObj.halfCheckedKeys = _halfCheckedKeys;
_checkedKeys.forEach(function (checkedKey) {
var entity = getEntity(keyEntities, checkedKey);
if (!entity) return;
var node = entity.node,
pos = entity.pos;
eventObj.checkedNodes.push(node);
eventObj.checkedNodesPositions.push({
node: node,
pos: pos
});
});
_this.setUncontrolledState({
checkedKeys: _checkedKeys
}, false, {
halfCheckedKeys: _halfCheckedKeys
});
}
onCheck === null || onCheck === void 0 || onCheck(checkedObj, eventObj);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeLoad", function (treeNode) {
var _entity$children;
var key = treeNode.key;
var keyEntities = _this.state.keyEntities;
// Skip if has children already
var entity = getEntity(keyEntities, key);
if (entity !== null && entity !== void 0 && (_entity$children = entity.children) !== null && _entity$children !== void 0 && _entity$children.length) {
return;
}
var loadPromise = new Promise(function (resolve, reject) {
// We need to get the latest state of loading/loaded keys
_this.setState(function (_ref) {
var _ref$loadedKeys = _ref.loadedKeys,
loadedKeys = _ref$loadedKeys === void 0 ? [] : _ref$loadedKeys,
_ref$loadingKeys = _ref.loadingKeys,
loadingKeys = _ref$loadingKeys === void 0 ? [] : _ref$loadingKeys;
var _this$props7 = _this.props,
loadData = _this$props7.loadData,
onLoad = _this$props7.onLoad;
if (!loadData || loadedKeys.includes(key) || loadingKeys.includes(key)) {
return null;
}
// Process load data
var promise = loadData(treeNode);
promise.then(function () {
var currentLoadedKeys = _this.state.loadedKeys;
var newLoadedKeys = arrAdd(currentLoadedKeys, key);
// onLoad should trigger before internal setState to avoid `loadData` trigger twice.
// https://github.com/ant-design/ant-design/issues/12464
onLoad === null || onLoad === void 0 || onLoad(newLoadedKeys, {
event: 'load',
node: treeNode
});
_this.setUncontrolledState({
loadedKeys: newLoadedKeys
});
_this.setState(function (prevState) {
return {
loadingKeys: arrDel(prevState.loadingKeys, key)
};
});
resolve();
}).catch(function (e) {
_this.setState(function (prevState) {
return {
loadingKeys: arrDel(prevState.loadingKeys, key)
};
});
// If exceed max retry times, we give up retry
_this.loadingRetryTimes[key] = (_this.loadingRetryTimes[key] || 0) + 1;
if (_this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {
var currentLoadedKeys = _this.state.loadedKeys;
(0,warning["default"])(false, 'Retry for `loadData` many times but still failed. No more retry.');
_this.setUncontrolledState({
loadedKeys: arrAdd(currentLoadedKeys, key)
});
resolve();
}
reject(e);
});
return {
loadingKeys: arrAdd(loadingKeys, key)
};
});
});
// Not care warning if we ignore this
loadPromise.catch(function () {});
return loadPromise;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeMouseEnter", function (event, node) {
var onMouseEnter = _this.props.onMouseEnter;
onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter({
event: event,
node: node
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeMouseLeave", function (event, node) {
var onMouseLeave = _this.props.onMouseLeave;
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave({
event: event,
node: node
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeContextMenu", function (event, node) {
var onRightClick = _this.props.onRightClick;
if (onRightClick) {
event.preventDefault();
onRightClick({
event: event,
node: node
});
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onFocus", function () {
var onFocus = _this.props.onFocus;
_this.setState({
focused: true
});
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
onFocus === null || onFocus === void 0 || onFocus.apply(void 0, args);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onBlur", function () {
var onBlur = _this.props.onBlur;
_this.setState({
focused: false
});
_this.onActiveChange(null);
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
onBlur === null || onBlur === void 0 || onBlur.apply(void 0, args);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getTreeNodeRequiredProps", function () {
var _this$state8 = _this.state,
expandedKeys = _this$state8.expandedKeys,
selectedKeys = _this$state8.selectedKeys,
loadedKeys = _this$state8.loadedKeys,
loadingKeys = _this$state8.loadingKeys,
checkedKeys = _this$state8.checkedKeys,
halfCheckedKeys = _this$state8.halfCheckedKeys,
dragOverNodeKey = _this$state8.dragOverNodeKey,
dropPosition = _this$state8.dropPosition,
keyEntities = _this$state8.keyEntities;
return {
expandedKeys: expandedKeys || [],
selectedKeys: selectedKeys || [],
loadedKeys: loadedKeys || [],
loadingKeys: loadingKeys || [],
checkedKeys: checkedKeys || [],
halfCheckedKeys: halfCheckedKeys || [],
dragOverNodeKey: dragOverNodeKey,
dropPosition: dropPosition,
keyEntities: keyEntities
};
});
// =========================== Expanded ===========================
/** Set uncontrolled `expandedKeys`. This will also auto update `flattenNodes`. */
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "setExpandedKeys", function (expandedKeys) {
var _this$state9 = _this.state,
treeData = _this$state9.treeData,
fieldNames = _this$state9.fieldNames;
var flattenNodes = flattenTreeData(treeData, expandedKeys, fieldNames);
_this.setUncontrolledState({
expandedKeys: expandedKeys,
flattenNodes: flattenNodes
}, true);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeExpand", function (e, treeNode) {
var expandedKeys = _this.state.expandedKeys;
var _this$state10 = _this.state,
listChanging = _this$state10.listChanging,
fieldNames = _this$state10.fieldNames;
var _this$props8 = _this.props,
onExpand = _this$props8.onExpand,
loadData = _this$props8.loadData;
var expanded = treeNode.expanded;
var key = treeNode[fieldNames.key];
// Do nothing when motion is in progress
if (listChanging) {
return;
}
// Update selected keys
var certain = expandedKeys.includes(key);
var targetExpanded = !expanded;
(0,warning["default"])(expanded && certain || !expanded && !certain, 'Expand state not sync with index check');
expandedKeys = targetExpanded ? arrAdd(expandedKeys, key) : arrDel(expandedKeys, key);
_this.setExpandedKeys(expandedKeys);
onExpand === null || onExpand === void 0 || onExpand(expandedKeys, {
node: treeNode,
expanded: targetExpanded,
nativeEvent: e.nativeEvent
});
// Async Load data
if (targetExpanded && loadData) {
var loadPromise = _this.onNodeLoad(treeNode);
if (loadPromise) {
loadPromise.then(function () {
// [Legacy] Refresh logic
var newFlattenTreeData = flattenTreeData(_this.state.treeData, expandedKeys, fieldNames);
_this.setUncontrolledState({
flattenNodes: newFlattenTreeData
});
}).catch(function () {
var currentExpandedKeys = _this.state.expandedKeys;
var expandedKeysToRestore = arrDel(currentExpandedKeys, key);
_this.setExpandedKeys(expandedKeysToRestore);
});
}
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onListChangeStart", function () {
_this.setUncontrolledState({
listChanging: true
});
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onListChangeEnd", function () {
setTimeout(function () {
_this.setUncontrolledState({
listChanging: false
});
});
});
// =========================== Keyboard ===========================
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onActiveChange", function (newActiveKey) {
var activeKey = _this.state.activeKey;
var _this$props9 = _this.props,
onActiveChange = _this$props9.onActiveChange,
_this$props9$itemScro = _this$props9.itemScrollOffset,
itemScrollOffset = _this$props9$itemScro === void 0 ? 0 : _this$props9$itemScro;
if (activeKey === newActiveKey) {
return;
}
_this.setState({
activeKey: newActiveKey
});
if (newActiveKey !== null) {
_this.scrollTo({
key: newActiveKey,
offset: itemScrollOffset
});
}
onActiveChange === null || onActiveChange === void 0 || onActiveChange(newActiveKey);
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getActiveItem", function () {
var _this$state11 = _this.state,
activeKey = _this$state11.activeKey,
flattenNodes = _this$state11.flattenNodes;
if (activeKey === null) {
return null;
}
return flattenNodes.find(function (_ref2) {
var key = _ref2.key;
return key === activeKey;
}) || null;
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "offsetActiveKey", function (offset) {
var _this$state12 = _this.state,
flattenNodes = _this$state12.flattenNodes,
activeKey = _this$state12.activeKey;
var index = flattenNodes.findIndex(function (_ref3) {
var key = _ref3.key;
return key === activeKey;
});
// Align with index
if (index === -1 && offset < 0) {
index = flattenNodes.length;
}
index = (index + offset + flattenNodes.length) % flattenNodes.length;
var item = flattenNodes[index];
if (item) {
var _key4 = item.key;
_this.onActiveChange(_key4);
} else {
_this.onActiveChange(null);
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onKeyDown", function (event) {
var _this$state13 = _this.state,
activeKey = _this$state13.activeKey,
expandedKeys = _this$state13.expandedKeys,
checkedKeys = _this$state13.checkedKeys,
fieldNames = _this$state13.fieldNames;
var _this$props10 = _this.props,
onKeyDown = _this$props10.onKeyDown,
checkable = _this$props10.checkable,
selectable = _this$props10.selectable;
// >>>>>>>>>> Direction
switch (event.which) {
case KeyCode["default"].UP:
{
_this.offsetActiveKey(-1);
event.preventDefault();
break;
}
case KeyCode["default"].DOWN:
{
_this.offsetActiveKey(1);
event.preventDefault();
break;
}
}
// >>>>>>>>>> Expand & Selection
var activeItem = _this.getActiveItem();
if (activeItem && activeItem.data) {
var treeNodeRequiredProps = _this.getTreeNodeRequiredProps();
var expandable = activeItem.data.isLeaf === false || !!(activeItem.data[fieldNames.children] || []).length;
var eventNode = convertNodePropsToEventData((0,objectSpread2["default"])((0,objectSpread2["default"])({}, getTreeNodeProps(activeKey, treeNodeRequiredProps)), {}, {
data: activeItem.data,
active: true
}));
switch (event.which) {
// >>> Expand
case KeyCode["default"].LEFT:
{
// Collapse if possible
if (expandable && expandedKeys.includes(activeKey)) {
_this.onNodeExpand({}, eventNode);
} else if (activeItem.parent) {
_this.onActiveChange(activeItem.parent.key);
}
event.preventDefault();
break;
}
case KeyCode["default"].RIGHT:
{
// Expand if possible
if (expandable && !expandedKeys.includes(activeKey)) {
_this.onNodeExpand({}, eventNode);
} else if (activeItem.children && activeItem.children.length) {
_this.onActiveChange(activeItem.children[0].key);
}
event.preventDefault();
break;
}
// Selection
case KeyCode["default"].ENTER:
case KeyCode["default"].SPACE:
{
if (checkable && !eventNode.disabled && eventNode.checkable !== false && !eventNode.disableCheckbox) {
_this.onNodeCheck({}, eventNode, !checkedKeys.includes(activeKey));
} else if (!checkable && selectable && !eventNode.disabled && eventNode.selectable !== false) {
_this.onNodeSelect({}, eventNode);
}
break;
}
}
}
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
});
/**
* Only update the value which is not in props
*/
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "setUncontrolledState", function (state) {
var atomic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var forceState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (!_this.destroyed) {
var needSync = false;
var allPassed = true;
var newState = {};
Object.keys(state).forEach(function (name) {
if (_this.props.hasOwnProperty(name)) {
allPassed = false;
return;
}
needSync = true;
newState[name] = state[name];
});
if (needSync && (!atomic || allPassed)) {
_this.setState((0,objectSpread2["default"])((0,objectSpread2["default"])({}, newState), forceState));
}
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "scrollTo", function (scroll) {
_this.listRef.current.scrollTo(scroll);
});
return _this;
}
(0,createClass["default"])(Tree, [{
key: "componentDidMount",
value: function componentDidMount() {
this.destroyed = false;
this.onUpdated();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.onUpdated();
}
}, {
key: "onUpdated",
value: function onUpdated() {
var _this$props11 = this.props,
activeKey = _this$props11.activeKey,
_this$props11$itemScr = _this$props11.itemScrollOffset,
itemScrollOffset = _this$props11$itemScr === void 0 ? 0 : _this$props11$itemScr;
if (activeKey !== undefined && activeKey !== this.state.activeKey) {
this.setState({
activeKey: activeKey
});
if (activeKey !== null) {
this.scrollTo({
key: activeKey,
offset: itemScrollOffset
});
}
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
window.removeEventListener('dragend', this.onWindowDragEnd);
this.destroyed = true;
}
}, {
key: "resetDragState",
value: function resetDragState() {
this.setState({
dragOverNodeKey: null,
dropPosition: null,
dropLevelOffset: null,
dropTargetKey: null,
dropContainerKey: null,
dropTargetPos: null,
dropAllowed: false
});
}
}, {
key: "render",
value: function render() {
var _this$state14 = this.state,
focused = _this$state14.focused,
flattenNodes = _this$state14.flattenNodes,
keyEntities = _this$state14.keyEntities,
draggingNodeKey = _this$state14.draggingNodeKey,
activeKey = _this$state14.activeKey,
dropLevelOffset = _this$state14.dropLevelOffset,
dropContainerKey = _this$state14.dropContainerKey,
dropTargetKey = _this$state14.dropTargetKey,
dropPosition = _this$state14.dropPosition,
dragOverNodeKey = _this$state14.dragOverNodeKey,
indent = _this$state14.indent;
var _this$props12 = this.props,
prefixCls = _this$props12.prefixCls,
className = _this$props12.className,
style = _this$props12.style,
showLine = _this$props12.showLine,
focusable = _this$props12.focusable,
_this$props12$tabInde = _this$props12.tabIndex,
tabIndex = _this$props12$tabInde === void 0 ? 0 : _this$props12$tabInde,
selectable = _this$props12.selectable,
showIcon = _this$props12.showIcon,
icon = _this$props12.icon,
switcherIcon = _this$props12.switcherIcon,
draggable = _this$props12.draggable,
checkable = _this$props12.checkable,
checkStrictly = _this$props12.checkStrictly,
disabled = _this$props12.disabled,
motion = _this$props12.motion,
loadData = _this$props12.loadData,
filterTreeNode = _this$props12.filterTreeNode,
height = _this$props12.height,
itemHeight = _this$props12.itemHeight,
scrollWidth = _this$props12.scrollWidth,
virtual = _this$props12.virtual,
titleRender = _this$props12.titleRender,
dropIndicatorRender = _this$props12.dropIndicatorRender,
onContextMenu = _this$props12.onContextMenu,
onScroll = _this$props12.onScroll,
direction = _this$props12.direction,
rootClassName = _this$props12.rootClassName,
rootStyle = _this$props12.rootStyle;
var domProps = (0,pickAttrs["default"])(this.props, {
aria: true,
data: true
});
// It's better move to hooks but we just simply keep here
var draggableConfig;
if (draggable) {
if ((0,esm_typeof["default"])(draggable) === 'object') {
draggableConfig = draggable;
} else if (typeof draggable === 'function') {
draggableConfig = {
nodeDraggable: draggable
};
} else {
draggableConfig = {};
}
}
var contextValue = {
prefixCls: prefixCls,
selectable: selectable,
showIcon: showIcon,
icon: icon,
switcherIcon: switcherIcon,
draggable: draggableConfig,
draggingNodeKey: draggingNodeKey,
checkable: checkable,
checkStrictly: checkStrictly,
disabled: disabled,
keyEntities: keyEntities,
dropLevelOffset: dropLevelOffset,
dropContainerKey: dropContainerKey,
dropTargetKey: dropTargetKey,
dropPosition: dropPosition,
dragOverNodeKey: dragOverNodeKey,
indent: indent,
direction: direction,
dropIndicatorRender: dropIndicatorRender,
loadData: loadData,
filterTreeNode: filterTreeNode,
titleRender: titleRender,
onNodeClick: this.onNodeClick,
onNodeDoubleClick: this.onNodeDoubleClick,
onNodeExpand: this.onNodeExpand,
onNodeSelect: this.onNodeSelect,
onNodeCheck: this.onNodeCheck,
onNodeLoad: this.onNodeLoad,
onNodeMouseEnter: this.onNodeMouseEnter,
onNodeMouseLeave: this.onNodeMouseLeave,
onNodeContextMenu: this.onNodeContextMenu,
onNodeDragStart: this.onNodeDragStart,
onNodeDragEnter: this.onNodeDragEnter,
onNodeDragOver: this.onNodeDragOver,
onNodeDragLeave: this.onNodeDragLeave,
onNodeDragEnd: this.onNodeDragEnd,
onNodeDrop: this.onNodeDrop
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TreeContext.Provider, {
value: contextValue
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(prefixCls, className, rootClassName, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-show-line"), showLine), "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-active-focused"), activeKey !== null)),
style: rootStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_NodeList, (0,esm_extends["default"])({
ref: this.listRef,
prefixCls: prefixCls,
style: style,
data: flattenNodes,
disabled: disabled,
selectable: selectable,
checkable: !!checkable,
motion: motion,
dragging: draggingNodeKey !== null,
height: height,
itemHeight: itemHeight,
virtual: virtual,
focusable: focusable,
focused: focused,
tabIndex: tabIndex,
activeItem: this.getActiveItem(),
onFocus: this.onFocus,
onBlur: this.onBlur,
onKeyDown: this.onKeyDown,
onActiveChange: this.onActiveChange,
onListChangeStart: this.onListChangeStart,
onListChangeEnd: this.onListChangeEnd,
onContextMenu: onContextMenu,
onScroll: onScroll,
scrollWidth: scrollWidth
}, this.getTreeNodeRequiredProps(), domProps))));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, prevState) {
var prevProps = prevState.prevProps;
var newState = {
prevProps: props
};
function needSync(name) {
return !prevProps && props.hasOwnProperty(name) || prevProps && prevProps[name] !== props[name];
}
// ================== Tree Node ==================
var treeData;
// fieldNames
var fieldNames = prevState.fieldNames;
if (needSync('fieldNames')) {
fieldNames = treeUtil_fillFieldNames(props.fieldNames);
newState.fieldNames = fieldNames;
}
// Check if `treeData` or `children` changed and save into the state.
if (needSync('treeData')) {
treeData = props.treeData;
} else if (needSync('children')) {
(0,warning["default"])(false, '`children` of Tree is deprecated. Please use `treeData` instead.');
treeData = convertTreeToData(props.children);
}
// Save flatten nodes info and convert `treeData` into keyEntities
if (treeData) {
newState.treeData = treeData;
var entitiesMap = convertDataToEntities(treeData, {
fieldNames: fieldNames
});
newState.keyEntities = (0,objectSpread2["default"])((0,defineProperty["default"])({}, MOTION_KEY, MotionEntity), entitiesMap.keyEntities);
// Warning if treeNode not provide key
if (true) {
warningWithoutKey(treeData, fieldNames);
}
}
var keyEntities = newState.keyEntities || prevState.keyEntities;
// ================ expandedKeys =================
if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent')) {
newState.expandedKeys = props.autoExpandParent || !prevProps && props.defaultExpandParent ? conductExpandParent(props.expandedKeys, keyEntities) : props.expandedKeys;
} else if (!prevProps && props.defaultExpandAll) {
var cloneKeyEntities = (0,objectSpread2["default"])({}, keyEntities);
delete cloneKeyEntities[MOTION_KEY];
// Only take the key who has the children to enhance the performance
var nextExpandedKeys = [];
Object.keys(cloneKeyEntities).forEach(function (key) {
var entity = cloneKeyEntities[key];
if (entity.children && entity.children.length) {
nextExpandedKeys.push(entity.key);
}
});
newState.expandedKeys = nextExpandedKeys;
} else if (!prevProps && props.defaultExpandedKeys) {
newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? conductExpandParent(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys;
}
if (!newState.expandedKeys) {
delete newState.expandedKeys;
}
// ================ flattenNodes =================
if (treeData || newState.expandedKeys) {
var flattenNodes = flattenTreeData(treeData || prevState.treeData, newState.expandedKeys || prevState.expandedKeys, fieldNames);
newState.flattenNodes = flattenNodes;
}
// ================ selectedKeys =================
if (props.selectable) {
if (needSync('selectedKeys')) {
newState.selectedKeys = calcSelectedKeys(props.selectedKeys, props);
} else if (!prevProps && props.defaultSelectedKeys) {
newState.selectedKeys = calcSelectedKeys(props.defaultSelectedKeys, props);
}
}
// ================= checkedKeys =================
if (props.checkable) {
var checkedKeyEntity;
if (needSync('checkedKeys')) {
checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {};
} else if (!prevProps && props.defaultCheckedKeys) {
checkedKeyEntity = parseCheckedKeys(props.defaultCheckedKeys) || {};
} else if (treeData) {
// If `treeData` changed, we also need check it
checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {
checkedKeys: prevState.checkedKeys,
halfCheckedKeys: prevState.halfCheckedKeys
};
}
if (checkedKeyEntity) {
var _checkedKeyEntity = checkedKeyEntity,
_checkedKeyEntity$che = _checkedKeyEntity.checkedKeys,
checkedKeys = _checkedKeyEntity$che === void 0 ? [] : _checkedKeyEntity$che,
_checkedKeyEntity$hal = _checkedKeyEntity.halfCheckedKeys,
halfCheckedKeys = _checkedKeyEntity$hal === void 0 ? [] : _checkedKeyEntity$hal;
if (!props.checkStrictly) {
var conductKeys = conductCheck(checkedKeys, true, keyEntities);
checkedKeys = conductKeys.checkedKeys;
halfCheckedKeys = conductKeys.halfCheckedKeys;
}
newState.checkedKeys = checkedKeys;
newState.halfCheckedKeys = halfCheckedKeys;
}
}
// ================= loadedKeys ==================
if (needSync('loadedKeys')) {
newState.loadedKeys = props.loadedKeys;
}
return newState;
}
}]);
return Tree;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
(0,defineProperty["default"])(Tree, "defaultProps", {
prefixCls: 'rc-tree',
showLine: false,
showIcon: true,
selectable: true,
multiple: false,
checkable: false,
disabled: false,
checkStrictly: false,
draggable: false,
defaultExpandParent: true,
autoExpandParent: false,
defaultExpandAll: false,
defaultExpandedKeys: [],
defaultCheckedKeys: [],
defaultSelectedKeys: [],
dropIndicatorRender: es_DropIndicator,
allowDrop: function allowDrop() {
return true;
},
expandAction: false
});
(0,defineProperty["default"])(Tree, "TreeNode", es_TreeNode);
/* harmony default export */ var es_Tree = (Tree);
;// ./node_modules/rc-tree/es/index.js
/* harmony default export */ var rc_tree_es = (es_Tree);
;// ./node_modules/@ant-design/icons-svg/es/asn/FileOutlined.js
// This icon file is generated automatically.
var FileOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, "name": "file", "theme": "outlined" };
/* harmony default export */ var asn_FileOutlined = (FileOutlined);
;// ./node_modules/@ant-design/icons/es/icons/FileOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FileOutlined_FileOutlined = function FileOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_FileOutlined
}));
};
/** */
var FileOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FileOutlined_FileOutlined);
if (true) {
FileOutlined_RefIcon.displayName = 'FileOutlined';
}
/* harmony default export */ var icons_FileOutlined = (FileOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/FolderOpenOutlined.js
// This icon file is generated automatically.
var FolderOpenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, "name": "folder-open", "theme": "outlined" };
/* harmony default export */ var asn_FolderOpenOutlined = (FolderOpenOutlined);
;// ./node_modules/@ant-design/icons/es/icons/FolderOpenOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FolderOpenOutlined_FolderOpenOutlined = function FolderOpenOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_FolderOpenOutlined
}));
};
/** */
var FolderOpenOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FolderOpenOutlined_FolderOpenOutlined);
if (true) {
FolderOpenOutlined_RefIcon.displayName = 'FolderOpenOutlined';
}
/* harmony default export */ var icons_FolderOpenOutlined = (FolderOpenOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/FolderOutlined.js
// This icon file is generated automatically.
var FolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, "name": "folder", "theme": "outlined" };
/* harmony default export */ var asn_FolderOutlined = (FolderOutlined);
;// ./node_modules/@ant-design/icons/es/icons/FolderOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FolderOutlined_FolderOutlined = function FolderOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_FolderOutlined
}));
};
/** */
var FolderOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FolderOutlined_FolderOutlined);
if (true) {
FolderOutlined_RefIcon.displayName = 'FolderOutlined';
}
/* harmony default export */ var icons_FolderOutlined = (FolderOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/HolderOutlined.js
// This icon file is generated automatically.
var HolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z" } }] }, "name": "holder", "theme": "outlined" };
/* harmony default export */ var asn_HolderOutlined = (HolderOutlined);
;// ./node_modules/@ant-design/icons/es/icons/HolderOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var HolderOutlined_HolderOutlined = function HolderOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_HolderOutlined
}));
};
/** */
var HolderOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(HolderOutlined_HolderOutlined);
if (true) {
HolderOutlined_RefIcon.displayName = 'HolderOutlined';
}
/* harmony default export */ var icons_HolderOutlined = (HolderOutlined_RefIcon);
// EXTERNAL MODULE: ./components/tree/style/index.ts + 1 modules
var tree_style = __webpack_require__("./components/tree/style/index.ts");
;// ./components/tree/utils/dropIndicator.tsx
const dropIndicator_offset = 4;
function dropIndicatorRender(props) {
const {
dropPosition,
dropLevelOffset,
prefixCls,
indent,
direction = 'ltr'
} = props;
const startPosition = direction === 'ltr' ? 'left' : 'right';
const endPosition = direction === 'ltr' ? 'right' : 'left';
const style = {
[startPosition]: -dropLevelOffset * indent + dropIndicator_offset,
[endPosition]: 0
};
switch (dropPosition) {
case -1:
style.top = -3;
break;
case 1:
style.bottom = -3;
break;
default:
// dropPosition === 0
style.bottom = -3;
style[startPosition] = indent + dropIndicator_offset;
break;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
style: style,
className: `${prefixCls}-drop-indicator`
});
}
/* harmony default export */ var dropIndicator = (dropIndicatorRender);
;// ./node_modules/@ant-design/icons-svg/es/asn/CaretDownFilled.js
// This icon file is generated automatically.
var CaretDownFilled = { "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": "filled" };
/* harmony default export */ var asn_CaretDownFilled = (CaretDownFilled);
;// ./node_modules/@ant-design/icons/es/icons/CaretDownFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CaretDownFilled_CaretDownFilled = function CaretDownFilled(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CaretDownFilled
}));
};
/** */
var CaretDownFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CaretDownFilled_CaretDownFilled);
if (true) {
CaretDownFilled_RefIcon.displayName = 'CaretDownFilled';
}
/* harmony default export */ var icons_CaretDownFilled = (CaretDownFilled_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/MinusSquareOutlined.js
// This icon file is generated automatically.
var MinusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "minus-square", "theme": "outlined" };
/* harmony default export */ var asn_MinusSquareOutlined = (MinusSquareOutlined);
;// ./node_modules/@ant-design/icons/es/icons/MinusSquareOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var MinusSquareOutlined_MinusSquareOutlined = function MinusSquareOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_MinusSquareOutlined
}));
};
/** */
var MinusSquareOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(MinusSquareOutlined_MinusSquareOutlined);
if (true) {
MinusSquareOutlined_RefIcon.displayName = 'MinusSquareOutlined';
}
/* harmony default export */ var icons_MinusSquareOutlined = (MinusSquareOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/PlusSquareOutlined.js
// This icon file is generated automatically.
var PlusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "plus-square", "theme": "outlined" };
/* harmony default export */ var asn_PlusSquareOutlined = (PlusSquareOutlined);
;// ./node_modules/@ant-design/icons/es/icons/PlusSquareOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusSquareOutlined_PlusSquareOutlined = function PlusSquareOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_PlusSquareOutlined
}));
};
/** */
var PlusSquareOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PlusSquareOutlined_PlusSquareOutlined);
if (true) {
PlusSquareOutlined_RefIcon.displayName = 'PlusSquareOutlined';
}
/* harmony default export */ var icons_PlusSquareOutlined = (PlusSquareOutlined_RefIcon);
;// ./components/tree/utils/iconUtil.tsx
const SwitcherIconCom = props => {
const {
prefixCls,
switcherIcon,
treeNodeProps,
showLine,
switcherLoadingIcon
} = props;
const {
isLeaf,
expanded,
loading
} = treeNodeProps;
if (loading) {
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(switcherLoadingIcon)) {
return switcherLoadingIcon;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
className: `${prefixCls}-switcher-loading-icon`
});
}
let showLeafIcon;
if (showLine && typeof showLine === 'object') {
showLeafIcon = showLine.showLeafIcon;
}
if (isLeaf) {
if (!showLine) {
return null;
}
if (typeof showLeafIcon !== 'boolean' && !!showLeafIcon) {
const leafIcon = typeof showLeafIcon === 'function' ? showLeafIcon(treeNodeProps) : showLeafIcon;
const leafCls = `${prefixCls}-switcher-line-custom-icon`;
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(leafIcon)) {
return (0,reactNode.cloneElement)(leafIcon, {
className: classnames_default()(leafIcon.props.className || '', leafCls)
});
}
return leafIcon;
}
return showLeafIcon ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FileOutlined, {
className: `${prefixCls}-switcher-line-icon`
})) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-switcher-leaf-line`
}));
}
const switcherCls = `${prefixCls}-switcher-icon`;
const switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(switcher)) {
return (0,reactNode.cloneElement)(switcher, {
className: classnames_default()(switcher.props.className || '', switcherCls)
});
}
if (switcher !== undefined) {
return switcher;
}
if (showLine) {
return expanded ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_MinusSquareOutlined, {
className: `${prefixCls}-switcher-line-icon`
})) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PlusSquareOutlined, {
className: `${prefixCls}-switcher-line-icon`
}));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CaretDownFilled, {
className: switcherCls
});
};
/* harmony default export */ var iconUtil = (SwitcherIconCom);
;// ./components/tree/Tree.tsx
const Tree_Tree = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
var _a;
const {
getPrefixCls,
direction,
virtual,
tree
} = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
className,
showIcon = false,
showLine,
switcherIcon,
switcherLoadingIcon,
blockNode = false,
children,
checkable = false,
selectable = true,
draggable,
motion: customMotion,
style
} = props;
const prefixCls = getPrefixCls('tree', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, (0,_util_motion["default"])(rootPrefixCls)), {
motionAppear: false
});
const newProps = Object.assign(Object.assign({}, props), {
checkable,
selectable,
showIcon,
motion,
blockNode,
showLine: Boolean(showLine),
dropIndicatorRender: dropIndicator
});
const [wrapCSSVar, hashId, cssVarCls] = (0,tree_style["default"])(prefixCls);
const [, token] = (0,useToken["default"])();
const itemHeight = token.paddingXS / 2 + (((_a = token.Tree) === null || _a === void 0 ? void 0 : _a.titleHeight) || token.controlHeightSM);
const draggableConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
if (!draggable) {
return false;
}
let mergedDraggable = {};
switch (typeof draggable) {
case 'function':
mergedDraggable.nodeDraggable = draggable;
break;
case 'object':
mergedDraggable = Object.assign({}, draggable);
break;
default:
break;
// Do nothing
}
if (mergedDraggable.icon !== false) {
mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_HolderOutlined, null);
}
return mergedDraggable;
}, [draggable]);
const renderSwitcherIcon = nodeProps => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(iconUtil, {
prefixCls: prefixCls,
switcherIcon: switcherIcon,
switcherLoadingIcon: switcherLoadingIcon,
treeNodeProps: nodeProps,
showLine: showLine
}));
return wrapCSSVar(
/*#__PURE__*/
// @ts-ignore
external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_tree_es, Object.assign({
itemHeight: itemHeight,
ref: ref,
virtual: virtual
}, newProps, {
// newProps may contain style so declare style below it
style: Object.assign(Object.assign({}, tree === null || tree === void 0 ? void 0 : tree.style), style),
prefixCls: prefixCls,
className: classnames_default()({
[`${prefixCls}-icon-hide`]: !showIcon,
[`${prefixCls}-block-node`]: blockNode,
[`${prefixCls}-unselectable`]: !selectable,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, tree === null || tree === void 0 ? void 0 : tree.className, className, hashId, cssVarCls),
direction: direction,
checkable: checkable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: `${prefixCls}-checkbox-inner`
}) : checkable,
selectable: selectable,
switcherIcon: renderSwitcherIcon,
draggable: draggableConfig
}), children));
});
if (true) {
Tree_Tree.displayName = 'Tree';
}
/* harmony default export */ var tree_Tree = (Tree_Tree);
;// ./components/tree/utils/dictUtil.ts
const RECORD_NONE = 0;
const RECORD_START = 1;
const RECORD_END = 2;
function traverseNodesKey(treeData, callback, fieldNames) {
const {
key: fieldKey,
children: fieldChildren
} = fieldNames;
function processNode(dataNode) {
const key = dataNode[fieldKey];
const children = dataNode[fieldChildren];
if (callback(key, dataNode) !== false) {
traverseNodesKey(children || [], callback, fieldNames);
}
}
treeData.forEach(processNode);
}
/** 计算选中范围,只考虑expanded情况以优化性能 */
function calcRangeKeys(_ref) {
let {
treeData,
expandedKeys,
startKey,
endKey,
fieldNames
} = _ref;
const keys = [];
let record = RECORD_NONE;
if (startKey && startKey === endKey) {
return [startKey];
}
if (!startKey || !endKey) {
return [];
}
function matchKey(key) {
return key === startKey || key === endKey;
}
traverseNodesKey(treeData, key => {
if (record === RECORD_END) {
return false;
}
if (matchKey(key)) {
// Match test
keys.push(key);
if (record === RECORD_NONE) {
record = RECORD_START;
} else if (record === RECORD_START) {
record = RECORD_END;
return false;
}
} else if (record === RECORD_START) {
// Append selection
keys.push(key);
}
return expandedKeys.includes(key);
}, treeUtil_fillFieldNames(fieldNames));
return keys;
}
function convertDirectoryKeysToNodes(treeData, keys, fieldNames) {
const restKeys = (0,toConsumableArray["default"])(keys);
const nodes = [];
traverseNodesKey(treeData, (key, node) => {
const index = restKeys.indexOf(key);
if (index !== -1) {
nodes.push(node);
restKeys.splice(index, 1);
}
return !!restKeys.length;
}, treeUtil_fillFieldNames(fieldNames));
return nodes;
}
;// ./components/tree/DirectoryTree.tsx
var DirectoryTree_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 getIcon(props) {
const {
isLeaf,
expanded
} = props;
if (isLeaf) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FileOutlined, null);
}
return expanded ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FolderOpenOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FolderOutlined, null);
}
function getTreeData(_ref) {
let {
treeData,
children
} = _ref;
return treeData || convertTreeToData(children);
}
const DirectoryTree = (_a, ref) => {
var {
defaultExpandAll,
defaultExpandParent,
defaultExpandedKeys
} = _a,
props = DirectoryTree_rest(_a, ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"]);
// Shift click usage
const lastSelectedKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const cachedSelectedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const getInitExpandedKeys = () => {
const {
keyEntities
} = convertDataToEntities(getTreeData(props));
let initExpandedKeys;
// Expanded keys
if (defaultExpandAll) {
initExpandedKeys = Object.keys(keyEntities);
} else if (defaultExpandParent) {
initExpandedKeys = conductExpandParent(props.expandedKeys || defaultExpandedKeys || [], keyEntities);
} else {
initExpandedKeys = props.expandedKeys || defaultExpandedKeys || [];
}
return initExpandedKeys;
};
const [selectedKeys, setSelectedKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(props.selectedKeys || props.defaultSelectedKeys || []);
const [expandedKeys, setExpandedKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => getInitExpandedKeys());
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if ('selectedKeys' in props) {
setSelectedKeys(props.selectedKeys);
}
}, [props.selectedKeys]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if ('expandedKeys' in props) {
setExpandedKeys(props.expandedKeys);
}
}, [props.expandedKeys]);
const onExpand = (keys, info) => {
var _a;
if (!('expandedKeys' in props)) {
setExpandedKeys(keys);
}
// Call origin function
return (_a = props.onExpand) === null || _a === void 0 ? void 0 : _a.call(props, keys, info);
};
const onSelect = (keys, event) => {
var _a;
const {
multiple,
fieldNames
} = props;
const {
node,
nativeEvent
} = event;
const {
key = ''
} = node;
const treeData = getTreeData(props);
// const newState: DirectoryTreeState = {};
// We need wrap this event since some value is not same
const newEvent = Object.assign(Object.assign({}, event), {
selected: true
});
// Windows / Mac single pick
const ctrlPick = (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.ctrlKey) || (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.metaKey);
const shiftPick = nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.shiftKey;
// Generate new selected keys
let newSelectedKeys;
if (multiple && ctrlPick) {
// Control click
newSelectedKeys = keys;
lastSelectedKey.current = key;
cachedSelectedKeys.current = newSelectedKeys;
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
} else if (multiple && shiftPick) {
// Shift click
newSelectedKeys = Array.from(new Set([].concat((0,toConsumableArray["default"])(cachedSelectedKeys.current || []), (0,toConsumableArray["default"])(calcRangeKeys({
treeData,
expandedKeys,
startKey: key,
endKey: lastSelectedKey.current,
fieldNames
})))));
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
} else {
// Single click
newSelectedKeys = [key];
lastSelectedKey.current = key;
cachedSelectedKeys.current = newSelectedKeys;
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
}
(_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, newSelectedKeys, newEvent);
if (!('selectedKeys' in props)) {
setSelectedKeys(newSelectedKeys);
}
};
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
className,
showIcon = true,
expandAction = 'click'
} = props,
otherProps = DirectoryTree_rest(props, ["prefixCls", "className", "showIcon", "expandAction"]);
const prefixCls = getPrefixCls('tree', customizePrefixCls);
const connectClassName = classnames_default()(`${prefixCls}-directory`, {
[`${prefixCls}-directory-rtl`]: direction === 'rtl'
}, className);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(tree_Tree, Object.assign({
icon: getIcon,
ref: ref,
blockNode: true
}, otherProps, {
showIcon: showIcon,
expandAction: expandAction,
prefixCls: prefixCls,
className: connectClassName,
expandedKeys: expandedKeys,
selectedKeys: selectedKeys,
onSelect: onSelect,
onExpand: onExpand
}));
};
const ForwardDirectoryTree = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DirectoryTree);
if (true) {
ForwardDirectoryTree.displayName = 'DirectoryTree';
}
/* harmony default export */ var tree_DirectoryTree = (ForwardDirectoryTree);
;// ./components/tree/index.tsx
const components_tree_Tree = tree_Tree;
components_tree_Tree.DirectoryTree = tree_DirectoryTree;
components_tree_Tree.TreeNode = es_TreeNode;
/* harmony default export */ var tree = (components_tree_Tree);
;// ./components/table/hooks/useFilter/FilterSearch.tsx
const FilterSearch = props => {
const {
value,
filterSearch,
tablePrefixCls,
locale,
onChange
} = props;
if (!filterSearch) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${tablePrefixCls}-filter-dropdown-search`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, {
prefix: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, null),
placeholder: locale.filterSearchPlaceholder,
onChange: onChange,
value: value,
// for skip min-width of input
htmlSize: 1,
className: `${tablePrefixCls}-filter-dropdown-search-input`
}));
};
/* harmony default export */ var useFilter_FilterSearch = (FilterSearch);
;// ./components/table/hooks/useFilter/FilterWrapper.tsx
const onKeyDown = event => {
const {
keyCode
} = event;
if (keyCode === KeyCode["default"].ENTER) {
event.stopPropagation();
}
};
const FilterDropdownMenuWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: props.className,
onClick: e => e.stopPropagation(),
onKeyDown: onKeyDown,
ref: ref
}, props.children)));
if (true) {
FilterDropdownMenuWrapper.displayName = 'FilterDropdownMenuWrapper';
}
/* harmony default export */ var FilterWrapper = (FilterDropdownMenuWrapper);
;// ./components/table/hooks/useFilter/FilterDropdown.tsx
function flattenKeys(filters) {
let keys = [];
(filters || []).forEach(_ref => {
let {
value,
children
} = _ref;
keys.push(value);
if (children) {
keys = [].concat((0,toConsumableArray["default"])(keys), (0,toConsumableArray["default"])(flattenKeys(children)));
}
});
return keys;
}
function hasSubMenu(filters) {
return filters.some(_ref2 => {
let {
children
} = _ref2;
return children;
});
}
function searchValueMatched(searchValue, text) {
if (typeof text === 'string' || typeof text === 'number') {
return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());
}
return false;
}
function renderFilterItems(_ref3) {
let {
filters,
prefixCls,
filteredKeys,
filterMultiple,
searchValue,
filterSearch
} = _ref3;
return filters.map((filter, index) => {
const key = String(filter.value);
if (filter.children) {
return {
key: key || index,
label: filter.text,
popupClassName: `${prefixCls}-dropdown-submenu`,
children: renderFilterItems({
filters: filter.children,
prefixCls,
filteredKeys,
filterMultiple,
searchValue,
filterSearch
})
};
}
const Component = filterMultiple ? components_checkbox : components_radio;
const item = {
key: filter.value !== undefined ? key : index,
label: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
checked: filteredKeys.includes(key)
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, filter.text)))
};
if (searchValue.trim()) {
if (typeof filterSearch === 'function') {
return filterSearch(searchValue, filter) ? item : null;
}
return searchValueMatched(searchValue, filter.text) ? item : null;
}
return item;
});
}
function wrapStringListType(keys) {
return keys || [];
}
const FilterDropdown = props => {
var _a, _b, _c, _d;
const {
tablePrefixCls,
prefixCls,
column,
dropdownPrefixCls,
columnKey,
filterOnClose,
filterMultiple,
filterMode = 'menu',
filterSearch = false,
filterState,
triggerFilter,
locale,
children,
getPopupContainer,
rootClassName
} = props;
const {
filterResetToDefaultFilteredValue,
defaultFilteredValue,
filterDropdownProps = {},
// Deprecated
filterDropdownOpen,
filterDropdownVisible,
onFilterDropdownVisibleChange,
onFilterDropdownOpenChange
} = column;
const [visible, setVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));
const triggerVisible = newVisible => {
var _a;
setVisible(newVisible);
(_a = filterDropdownProps.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(filterDropdownProps, newVisible);
// deprecated
onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);
onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);
};
// =================Warning===================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Table');
const deprecatedList = [['filterDropdownOpen', 'filterDropdownProps.open'], ['filterDropdownVisible', 'filterDropdownProps.open'], ['onFilterDropdownOpenChange', 'filterDropdownProps.onOpenChange'], ['onFilterDropdownVisibleChange', 'filterDropdownProps.onOpenChange']];
deprecatedList.forEach(_ref4 => {
let [deprecatedName, newName] = _ref4;
warning.deprecated(!(deprecatedName in column), deprecatedName, newName);
});
warning.deprecated(!('filterCheckall' in locale), 'filterCheckall', 'locale.filterCheckAll');
}
const mergedVisible = (_d = (_c = (_b = filterDropdownProps.open) !== null && _b !== void 0 ? _b : filterDropdownOpen) !== null && _c !== void 0 ? _c : filterDropdownVisible) !== null && _d !== void 0 ? _d : visible; // inner state
// ===================== Select Keys =====================
const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;
const [getFilteredKeysSync, setFilteredKeysSync] = hooks_useSyncState_useSyncState(wrapStringListType(propFilteredKeys));
const onSelectKeys = _ref5 => {
let {
selectedKeys
} = _ref5;
setFilteredKeysSync(selectedKeys);
};
const onCheck = (keys, _ref6) => {
let {
node,
checked
} = _ref6;
if (!filterMultiple) {
onSelectKeys({
selectedKeys: checked && node.key ? [node.key] : []
});
} else {
onSelectKeys({
selectedKeys: keys
});
}
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (!visible) {
return;
}
onSelectKeys({
selectedKeys: wrapStringListType(propFilteredKeys)
});
}, [propFilteredKeys]);
// ====================== Open Keys ======================
const [openKeys, setOpenKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
const onOpenChange = keys => {
setOpenKeys(keys);
};
// search in tree mode column filter
const [searchValue, setSearchValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('');
const onSearch = e => {
const {
value
} = e.target;
setSearchValue(value);
};
// clear search value after close filter dropdown
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (!visible) {
setSearchValue('');
}
}, [visible]);
// ======================= Submit ========================
const internalTriggerFilter = keys => {
const mergedKeys = (keys === null || keys === void 0 ? void 0 : keys.length) ? keys : null;
if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {
return null;
}
if ((0,isEqual["default"])(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {
return null;
}
triggerFilter({
column,
key: columnKey,
filteredKeys: mergedKeys
});
};
const onConfirm = () => {
triggerVisible(false);
internalTriggerFilter(getFilteredKeysSync());
};
const onReset = function () {
let {
confirm,
closeDropdown
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
confirm: false,
closeDropdown: false
};
if (confirm) {
internalTriggerFilter([]);
}
if (closeDropdown) {
triggerVisible(false);
}
setSearchValue('');
if (filterResetToDefaultFilteredValue) {
setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));
} else {
setFilteredKeysSync([]);
}
};
const doFilter = function () {
let {
closeDropdown
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
closeDropdown: true
};
if (closeDropdown) {
triggerVisible(false);
}
internalTriggerFilter(getFilteredKeysSync());
};
const onVisibleChange = (newVisible, info) => {
if (info.source === 'trigger') {
if (newVisible && propFilteredKeys !== undefined) {
// Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefined)
setFilteredKeysSync(wrapStringListType(propFilteredKeys));
}
triggerVisible(newVisible);
if (!newVisible && !column.filterDropdown && filterOnClose) {
onConfirm();
}
}
};
// ======================== Style ========================
const dropdownMenuClass = classnames_default()({
[`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])
});
const onCheckAll = e => {
if (e.target.checked) {
const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));
setFilteredKeysSync(allFilterKeys);
} else {
setFilteredKeysSync([]);
}
};
const getTreeData = _ref7 => {
let {
filters
} = _ref7;
return (filters || []).map((filter, index) => {
const key = String(filter.value);
const item = {
title: filter.text,
key: filter.value !== undefined ? key : String(index)
};
if (filter.children) {
item.children = getTreeData({
filters: filter.children
});
}
return item;
});
};
const getFilterData = node => {
var _a;
return Object.assign(Object.assign({}, node), {
text: node.title,
value: node.key,
children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []
});
};
let dropdownContent;
const {
direction,
renderEmpty
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
if (typeof column.filterDropdown === 'function') {
dropdownContent = column.filterDropdown({
prefixCls: `${dropdownPrefixCls}-custom`,
setSelectedKeys: selectedKeys => onSelectKeys({
selectedKeys: selectedKeys
}),
selectedKeys: getFilteredKeysSync(),
confirm: doFilter,
clearFilters: onReset,
filters: column.filters,
visible: mergedVisible,
close: () => {
triggerVisible(false);
}
});
} else if (column.filterDropdown) {
dropdownContent = column.filterDropdown;
} else {
const selectedKeys = getFilteredKeysSync() || [];
const getFilterComponent = () => {
var _a, _b;
const empty = (_a = renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table.filter')) !== null && _a !== void 0 ? _a : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_empty, {
image: components_empty.PRESENTED_IMAGE_SIMPLE,
description: locale.filterEmptyText,
styles: {
image: {
height: 24
}
},
style: {
margin: 0,
padding: '16px 0'
}
}));
if ((column.filters || []).length === 0) {
return empty;
}
if (filterMode === 'tree') {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useFilter_FilterSearch, {
filterSearch: filterSearch,
value: searchValue,
onChange: onSearch,
tablePrefixCls: tablePrefixCls,
locale: locale
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${tablePrefixCls}-filter-dropdown-tree`
}, filterMultiple ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, {
checked: selectedKeys.length === flattenKeys(column.filters).length,
indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,
className: `${tablePrefixCls}-filter-dropdown-checkall`,
onChange: onCheckAll
}, (_b = locale === null || locale === void 0 ? void 0 : locale.filterCheckall) !== null && _b !== void 0 ? _b : locale === null || locale === void 0 ? void 0 : locale.filterCheckAll)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(tree, {
checkable: true,
selectable: false,
blockNode: true,
multiple: filterMultiple,
checkStrictly: !filterMultiple,
className: `${dropdownPrefixCls}-menu`,
onCheck: onCheck,
checkedKeys: selectedKeys,
selectedKeys: selectedKeys,
showIcon: false,
treeData: getTreeData({
filters: column.filters
}),
autoExpandParent: true,
defaultExpandAll: true,
filterTreeNode: searchValue.trim() ? node => {
if (typeof filterSearch === 'function') {
return filterSearch(searchValue, getFilterData(node));
}
return searchValueMatched(searchValue, node.title);
} : undefined
})));
}
const items = renderFilterItems({
filters: column.filters || [],
filterSearch,
prefixCls,
filteredKeys: getFilteredKeysSync(),
filterMultiple,
searchValue
});
const isEmpty = items.every(item => item === null);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useFilter_FilterSearch, {
filterSearch: filterSearch,
value: searchValue,
onChange: onSearch,
tablePrefixCls: tablePrefixCls,
locale: locale
}), isEmpty ? empty : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_menu, {
selectable: true,
multiple: filterMultiple,
prefixCls: `${dropdownPrefixCls}-menu`,
className: dropdownMenuClass,
onSelect: onSelectKeys,
onDeselect: onSelectKeys,
selectedKeys: selectedKeys,
getPopupContainer: getPopupContainer,
openKeys: openKeys,
onOpenChange: onOpenChange,
items: items
})));
};
const getResetDisabled = () => {
if (filterResetToDefaultFilteredValue) {
return (0,isEqual["default"])((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);
}
return selectedKeys.length === 0;
};
dropdownContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, getFilterComponent(), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-dropdown-btns`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
type: "link",
size: "small",
disabled: getResetDisabled(),
onClick: () => onReset()
}, locale.filterReset), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
type: "primary",
size: "small",
onClick: onConfirm
}, locale.filterConfirm)));
}
// We should not block customize Menu with additional props
if (column.filterDropdown) {
dropdownContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverrideProvider, {
selectable: undefined
}, dropdownContent);
}
dropdownContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FilterWrapper, {
className: `${prefixCls}-dropdown`
}, dropdownContent);
const getDropdownTrigger = () => {
let filterIcon;
if (typeof column.filterIcon === 'function') {
filterIcon = column.filterIcon(filtered);
} else if (column.filterIcon) {
filterIcon = column.filterIcon;
} else {
filterIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FilterFilled, null);
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
role: "button",
tabIndex: -1,
className: classnames_default()(`${prefixCls}-trigger`, {
active: filtered
}),
onClick: e => {
e.stopPropagation();
}
}, filterIcon);
};
const mergedDropdownProps = _util_extendsObject({
trigger: ['click'],
placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight',
children: getDropdownTrigger(),
getPopupContainer
}, Object.assign(Object.assign({}, filterDropdownProps), {
rootClassName: classnames_default()(rootClassName, filterDropdownProps.rootClassName),
open: mergedVisible,
onOpenChange: onVisibleChange,
dropdownRender: () => {
if (typeof (filterDropdownProps === null || filterDropdownProps === void 0 ? void 0 : filterDropdownProps.dropdownRender) === 'function') {
return filterDropdownProps.dropdownRender(dropdownContent);
}
return dropdownContent;
}
}));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-column`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${tablePrefixCls}-column-title`
}, children), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_dropdown, Object.assign({}, mergedDropdownProps)));
};
/* harmony default export */ var useFilter_FilterDropdown = (FilterDropdown);
;// ./components/table/hooks/useFilter/index.tsx
const collectFilterStates = (columns, init, pos) => {
let filterStates = [];
(columns || []).forEach((column, index) => {
var _a;
const columnPos = getColumnPos(index, pos);
if (column.filters || 'filterDropdown' in column || 'onFilter' in column) {
if ('filteredValue' in column) {
// Controlled
let filteredValues = column.filteredValue;
if (!('filterDropdown' in column)) {
filteredValues = (_a = filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.map(String)) !== null && _a !== void 0 ? _a : filteredValues;
}
filterStates.push({
column,
key: getColumnKey(column, columnPos),
filteredKeys: filteredValues,
forceFiltered: column.filtered
});
} else {
// Uncontrolled
filterStates.push({
column,
key: getColumnKey(column, columnPos),
filteredKeys: init && column.defaultFilteredValue ? column.defaultFilteredValue : undefined,
forceFiltered: column.filtered
});
}
}
if ('children' in column) {
filterStates = [].concat((0,toConsumableArray["default"])(filterStates), (0,toConsumableArray["default"])(collectFilterStates(column.children, init, columnPos)));
}
});
return filterStates;
};
function injectFilter(prefixCls, dropdownPrefixCls, columns, filterStates, locale, triggerFilter, getPopupContainer, pos, rootClassName) {
return columns.map((column, index) => {
const columnPos = getColumnPos(index, pos);
const {
filterOnClose = true,
filterMultiple = true,
filterMode,
filterSearch
} = column;
let newColumn = column;
if (newColumn.filters || newColumn.filterDropdown) {
const columnKey = getColumnKey(newColumn, columnPos);
const filterState = filterStates.find(_ref => {
let {
key
} = _ref;
return columnKey === key;
});
newColumn = Object.assign(Object.assign({}, newColumn), {
title: renderProps => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useFilter_FilterDropdown, {
tablePrefixCls: prefixCls,
prefixCls: `${prefixCls}-filter`,
dropdownPrefixCls: dropdownPrefixCls,
column: newColumn,
columnKey: columnKey,
filterState: filterState,
filterOnClose: filterOnClose,
filterMultiple: filterMultiple,
filterMode: filterMode,
filterSearch: filterSearch,
triggerFilter: triggerFilter,
locale: locale,
getPopupContainer: getPopupContainer,
rootClassName: rootClassName
}, renderColumnTitle(column.title, renderProps)))
});
}
if ('children' in newColumn) {
newColumn = Object.assign(Object.assign({}, newColumn), {
children: injectFilter(prefixCls, dropdownPrefixCls, newColumn.children, filterStates, locale, triggerFilter, getPopupContainer, columnPos, rootClassName)
});
}
return newColumn;
});
}
const generateFilterInfo = filterStates => {
const currentFilters = {};
filterStates.forEach(_ref2 => {
let {
key,
filteredKeys,
column
} = _ref2;
const keyAsString = key;
const {
filters,
filterDropdown
} = column;
if (filterDropdown) {
currentFilters[keyAsString] = filteredKeys || null;
} else if (Array.isArray(filteredKeys)) {
const keys = flattenKeys(filters);
currentFilters[keyAsString] = keys.filter(originKey => filteredKeys.includes(String(originKey)));
} else {
currentFilters[keyAsString] = null;
}
});
return currentFilters;
};
const getFilterData = (data, filterStates, childrenColumnName) => {
const filterDatas = filterStates.reduce((currentData, filterState) => {
const {
column: {
onFilter,
filters
},
filteredKeys
} = filterState;
if (onFilter && filteredKeys && filteredKeys.length) {
return currentData
// shallow copy
.map(record => Object.assign({}, record)).filter(record => filteredKeys.some(key => {
const keys = flattenKeys(filters);
const keyIndex = keys.findIndex(k => String(k) === String(key));
const realKey = keyIndex !== -1 ? keys[keyIndex] : key;
// filter children
if (record[childrenColumnName]) {
record[childrenColumnName] = getFilterData(record[childrenColumnName], filterStates, childrenColumnName);
}
return onFilter(realKey, record);
}));
}
return currentData;
}, data);
return filterDatas;
};
const getMergedColumns = rawMergedColumns => rawMergedColumns.flatMap(column => {
if ('children' in column) {
return [column].concat((0,toConsumableArray["default"])(getMergedColumns(column.children || [])));
}
return [column];
});
const useFilter = props => {
const {
prefixCls,
dropdownPrefixCls,
mergedColumns: rawMergedColumns,
onFilterChange,
getPopupContainer,
locale: tableLocale,
rootClassName
} = props;
const warning = (0,_util_warning.devUseWarning)('Table');
const mergedColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => getMergedColumns(rawMergedColumns || []), [rawMergedColumns]);
const [filterStates, setFilterStates] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => collectFilterStates(mergedColumns, true));
const mergedFilterStates = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const collectedStates = collectFilterStates(mergedColumns, false);
if (collectedStates.length === 0) {
return collectedStates;
}
let filteredKeysIsAllNotControlled = true;
let filteredKeysIsAllControlled = true;
collectedStates.forEach(_ref3 => {
let {
filteredKeys
} = _ref3;
if (filteredKeys !== undefined) {
filteredKeysIsAllNotControlled = false;
} else {
filteredKeysIsAllControlled = false;
}
});
// Return if not controlled
if (filteredKeysIsAllNotControlled) {
// Filter column may have been removed
const keyList = (mergedColumns || []).map((column, index) => getColumnKey(column, getColumnPos(index)));
return filterStates.filter(_ref4 => {
let {
key
} = _ref4;
return keyList.includes(key);
}).map(item => {
const col = mergedColumns[keyList.findIndex(key => key === item.key)];
return Object.assign(Object.assign({}, item), {
column: Object.assign(Object.assign({}, item.column), col),
forceFiltered: col.filtered
});
});
}
true ? warning(filteredKeysIsAllControlled, 'usage', 'Columns should all contain `filteredValue` or not contain `filteredValue`.') : 0;
return collectedStates;
}, [mergedColumns, filterStates]);
const filters = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => generateFilterInfo(mergedFilterStates), [mergedFilterStates]);
const triggerFilter = filterState => {
const newFilterStates = mergedFilterStates.filter(_ref5 => {
let {
key
} = _ref5;
return key !== filterState.key;
});
newFilterStates.push(filterState);
setFilterStates(newFilterStates);
onFilterChange(generateFilterInfo(newFilterStates), newFilterStates);
};
const transformColumns = innerColumns => injectFilter(prefixCls, dropdownPrefixCls, innerColumns, mergedFilterStates, tableLocale, triggerFilter, getPopupContainer, undefined, rootClassName);
return [transformColumns, mergedFilterStates, filters];
};
/* harmony default export */ var hooks_useFilter = (useFilter);
;// ./components/table/hooks/useLazyKVMap.ts
const useLazyKVMap = (data, childrenColumnName, getRowKey) => {
const mapCacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
function getRecordByKey(key) {
var _a;
if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) {
const kvMap = new Map();
function dig(records) {
records.forEach((record, index) => {
const rowKey = getRowKey(record, index);
kvMap.set(rowKey, record);
if (record && typeof record === 'object' && childrenColumnName in record) {
dig(record[childrenColumnName] || []);
}
});
}
dig(data);
mapCacheRef.current = {
data,
childrenColumnName,
kvMap,
getRowKey
};
}
return (_a = mapCacheRef.current.kvMap) === null || _a === void 0 ? void 0 : _a.get(key);
}
return [getRecordByKey];
};
/* harmony default export */ var hooks_useLazyKVMap = (useLazyKVMap);
;// ./components/table/hooks/usePagination.ts
var usePagination_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;
};
const DEFAULT_PAGE_SIZE = 10;
function getPaginationParam(mergedPagination, pagination) {
const param = {
current: mergedPagination.current,
pageSize: mergedPagination.pageSize
};
const paginationObj = pagination && typeof pagination === 'object' ? pagination : {};
Object.keys(paginationObj).forEach(pageProp => {
const value = mergedPagination[pageProp];
if (typeof value !== 'function') {
param[pageProp] = value;
}
});
return param;
}
function usePagination(total, onChange, pagination) {
const _a = pagination && typeof pagination === 'object' ? pagination : {},
{
total: paginationTotal = 0
} = _a,
paginationObj = usePagination_rest(_a, ["total"]);
const [innerPagination, setInnerPagination] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => ({
current: 'defaultCurrent' in paginationObj ? paginationObj.defaultCurrent : 1,
pageSize: 'defaultPageSize' in paginationObj ? paginationObj.defaultPageSize : DEFAULT_PAGE_SIZE
}));
// ============ Basic Pagination Config ============
const mergedPagination = _util_extendsObject(innerPagination, paginationObj, {
total: paginationTotal > 0 ? paginationTotal : total
});
// Reset `current` if data length or pageSize changed
const maxPage = Math.ceil((paginationTotal || total) / mergedPagination.pageSize);
if (mergedPagination.current > maxPage) {
// Prevent a maximum page count of 0
mergedPagination.current = maxPage || 1;
}
const refreshPagination = (current, pageSize) => {
setInnerPagination({
current: current !== null && current !== void 0 ? current : 1,
pageSize: pageSize || mergedPagination.pageSize
});
};
const onInternalChange = (current, pageSize) => {
var _a;
if (pagination) {
(_a = pagination.onChange) === null || _a === void 0 ? void 0 : _a.call(pagination, current, pageSize);
}
refreshPagination(current, pageSize);
onChange(current, pageSize || (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize));
};
if (pagination === false) {
return [{}, () => {}];
}
return [Object.assign(Object.assign({}, mergedPagination), {
onChange: onInternalChange
}), refreshPagination];
}
/* harmony default export */ var hooks_usePagination = (usePagination);
;// ./node_modules/@ant-design/icons-svg/es/asn/CaretDownOutlined.js
// This icon file is generated automatically.
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" };
/* harmony default export */ var asn_CaretDownOutlined = (CaretDownOutlined);
;// ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CaretDownOutlined_CaretDownOutlined = function CaretDownOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CaretDownOutlined
}));
};
/** */
var CaretDownOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CaretDownOutlined_CaretDownOutlined);
if (true) {
CaretDownOutlined_RefIcon.displayName = 'CaretDownOutlined';
}
/* harmony default export */ var icons_CaretDownOutlined = (CaretDownOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/CaretUpOutlined.js
// This icon file is generated automatically.
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" };
/* harmony default export */ var asn_CaretUpOutlined = (CaretUpOutlined);
;// ./node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CaretUpOutlined_CaretUpOutlined = function CaretUpOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CaretUpOutlined
}));
};
/** */
var CaretUpOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CaretUpOutlined_CaretUpOutlined);
if (true) {
CaretUpOutlined_RefIcon.displayName = 'CaretUpOutlined';
}
/* harmony default export */ var icons_CaretUpOutlined = (CaretUpOutlined_RefIcon);
;// ./components/table/hooks/useSorter.tsx
const ASCEND = 'ascend';
const DESCEND = 'descend';
const getMultiplePriority = column => {
if (typeof column.sorter === 'object' && typeof column.sorter.multiple === 'number') {
return column.sorter.multiple;
}
return false;
};
const getSortFunction = sorter => {
if (typeof sorter === 'function') {
return sorter;
}
if (sorter && typeof sorter === 'object' && sorter.compare) {
return sorter.compare;
}
return false;
};
const nextSortDirection = (sortDirections, current) => {
if (!current) {
return sortDirections[0];
}
return sortDirections[sortDirections.indexOf(current) + 1];
};
const collectSortStates = (columns, init, pos) => {
let sortStates = [];
const pushState = (column, columnPos) => {
sortStates.push({
column,
key: getColumnKey(column, columnPos),
multiplePriority: getMultiplePriority(column),
sortOrder: column.sortOrder
});
};
(columns || []).forEach((column, index) => {
const columnPos = getColumnPos(index, pos);
if (column.children) {
if ('sortOrder' in column) {
// Controlled
pushState(column, columnPos);
}
sortStates = [].concat((0,toConsumableArray["default"])(sortStates), (0,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,
key: getColumnKey(column, columnPos),
multiplePriority: getMultiplePriority(column),
sortOrder: column.defaultSortOrder
});
}
}
});
return sortStates;
};
const injectSorter = (prefixCls, columns, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) => {
const finalColumns = (columns || []).map((column, index) => {
const columnPos = getColumnPos(index, pos);
let newColumn = column;
if (newColumn.sorter) {
const sortDirections = newColumn.sortDirections || defaultSortDirections;
const showSorterTooltip = newColumn.showSorterTooltip === undefined ? tableShowSorterTooltip : newColumn.showSorterTooltip;
const columnKey = getColumnKey(newColumn, columnPos);
const sorterState = sorterStates.find(_ref => {
let {
key
} = _ref;
return key === columnKey;
});
const sortOrder = sorterState ? sorterState.sortOrder : null;
const nextSortOrder = nextSortDirection(sortDirections, sortOrder);
let sorter;
if (column.sortIcon) {
sorter = column.sortIcon({
sortOrder
});
} else {
const upNode = sortDirections.includes(ASCEND) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CaretUpOutlined, {
className: classnames_default()(`${prefixCls}-column-sorter-up`, {
active: sortOrder === ASCEND
})
}));
const downNode = sortDirections.includes(DESCEND) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CaretDownOutlined, {
className: classnames_default()(`${prefixCls}-column-sorter-down`, {
active: sortOrder === DESCEND
})
}));
sorter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: classnames_default()(`${prefixCls}-column-sorter`, {
[`${prefixCls}-column-sorter-full`]: !!(upNode && downNode)
})
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-column-sorter-inner`,
"aria-hidden": "true"
}, upNode, downNode));
}
const {
cancelSort,
triggerAsc,
triggerDesc
} = tableLocale || {};
let sortTip = cancelSort;
if (nextSortOrder === DESCEND) {
sortTip = triggerDesc;
} else if (nextSortOrder === ASCEND) {
sortTip = triggerAsc;
}
const tooltipProps = typeof showSorterTooltip === 'object' ? Object.assign({
title: sortTip
}, showSorterTooltip) : {
title: sortTip
};
newColumn = Object.assign(Object.assign({}, newColumn), {
className: classnames_default()(newColumn.className, {
[`${prefixCls}-column-sort`]: sortOrder
}),
title: renderProps => {
const columnSortersClass = `${prefixCls}-column-sorters`;
const renderColumnTitleWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-column-title`
}, renderColumnTitle(column.title, renderProps));
const renderSortTitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: columnSortersClass
}, renderColumnTitleWrapper, sorter);
if (showSorterTooltip) {
if (typeof showSorterTooltip !== 'boolean' && (showSorterTooltip === null || showSorterTooltip === void 0 ? void 0 : showSorterTooltip.target) === 'sorter-icon') {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${columnSortersClass} ${prefixCls}-column-sorters-tooltip-target-sorter`
}, renderColumnTitleWrapper, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, tooltipProps), sorter));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, tooltipProps), renderSortTitle);
}
return renderSortTitle;
},
onHeaderCell: col => {
var _a;
const cell = ((_a = column.onHeaderCell) === null || _a === void 0 ? void 0 : _a.call(column, col)) || {};
const originOnClick = cell.onClick;
const originOKeyDown = cell.onKeyDown;
cell.onClick = event => {
triggerSorter({
column,
key: columnKey,
sortOrder: nextSortOrder,
multiplePriority: getMultiplePriority(column)
});
originOnClick === null || originOnClick === void 0 ? void 0 : originOnClick(event);
};
cell.onKeyDown = event => {
if (event.keyCode === KeyCode["default"].ENTER) {
triggerSorter({
column,
key: columnKey,
sortOrder: nextSortOrder,
multiplePriority: getMultiplePriority(column)
});
originOKeyDown === null || originOKeyDown === void 0 ? void 0 : originOKeyDown(event);
}
};
const renderTitle = safeColumnTitle(column.title, {});
const displayTitle = renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle.toString();
// Inform the screen-reader so it can tell the visually impaired user which column is sorted
if (sortOrder) {
cell['aria-sort'] = sortOrder === 'ascend' ? 'ascending' : 'descending';
}
cell['aria-label'] = displayTitle || '';
cell.className = classnames_default()(cell.className, `${prefixCls}-column-has-sorters`);
cell.tabIndex = 0;
if (column.ellipsis) {
cell.title = (renderTitle !== null && renderTitle !== void 0 ? renderTitle : '').toString();
}
return cell;
}
});
}
if ('children' in newColumn) {
newColumn = Object.assign(Object.assign({}, newColumn), {
children: injectSorter(prefixCls, newColumn.children, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos)
});
}
return newColumn;
});
return finalColumns;
};
const stateToInfo = sorterState => {
const {
column,
sortOrder
} = sorterState;
return {
column,
order: sortOrder,
field: column.dataIndex,
columnKey: column.key
};
};
const generateSorterInfo = sorterStates => {
const activeSorters = sorterStates.filter(_ref2 => {
let {
sortOrder
} = _ref2;
return sortOrder;
}).map(stateToInfo);
// =========== Legacy compatible support ===========
// https://github.com/ant-design/ant-design/pull/19226
if (activeSorters.length === 0 && sorterStates.length) {
const lastIndex = sorterStates.length - 1;
return Object.assign(Object.assign({}, stateToInfo(sorterStates[lastIndex])), {
column: undefined,
order: undefined,
field: undefined,
columnKey: undefined
});
}
if (activeSorters.length <= 1) {
return activeSorters[0] || {};
}
return activeSorters;
};
const getSortData = (data, sortStates, childrenColumnName) => {
const innerSorterStates = sortStates.slice().sort((a, b) => b.multiplePriority - a.multiplePriority);
const cloneData = data.slice();
const runningSorters = innerSorterStates.filter(_ref3 => {
let {
column: {
sorter
},
sortOrder
} = _ref3;
return getSortFunction(sorter) && sortOrder;
});
// Skip if no sorter needed
if (!runningSorters.length) {
return cloneData;
}
return cloneData.sort((record1, record2) => {
for (let i = 0; i < runningSorters.length; i += 1) {
const sorterState = runningSorters[i];
const {
column: {
sorter
},
sortOrder
} = sorterState;
const compareFn = getSortFunction(sorter);
if (compareFn && sortOrder) {
const compareResult = compareFn(record1, record2, sortOrder);
if (compareResult !== 0) {
return sortOrder === ASCEND ? compareResult : -compareResult;
}
}
}
return 0;
}).map(record => {
const subRecords = record[childrenColumnName];
if (subRecords) {
return Object.assign(Object.assign({}, record), {
[childrenColumnName]: getSortData(subRecords, sortStates, childrenColumnName)
});
}
return record;
});
};
const useFilterSorter = props => {
const {
prefixCls,
mergedColumns,
sortDirections,
tableLocale,
showSorterTooltip,
onSorterChange
} = props;
const [sortStates, setSortStates] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(collectSortStates(mergedColumns, true));
const getColumnKeys = (columns, pos) => {
const newKeys = [];
columns.forEach((item, index) => {
const columnPos = getColumnPos(index, pos);
newKeys.push(getColumnKey(item, columnPos));
if (Array.isArray(item.children)) {
const childKeys = getColumnKeys(item.children, columnPos);
newKeys.push.apply(newKeys, (0,toConsumableArray["default"])(childKeys));
}
});
return newKeys;
};
const mergedSorterStates = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
let validate = true;
const collectedStates = collectSortStates(mergedColumns, false);
// Return if not controlled
if (!collectedStates.length) {
const mergedColumnsKeys = getColumnKeys(mergedColumns);
return sortStates.filter(_ref4 => {
let {
key
} = _ref4;
return mergedColumnsKeys.includes(key);
});
}
const validateStates = [];
function patchStates(state) {
if (validate) {
validateStates.push(state);
} else {
validateStates.push(Object.assign(Object.assign({}, state), {
sortOrder: null
}));
}
}
let multipleMode = null;
collectedStates.forEach(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
const columnTitleSorterProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a, _b;
const sortColumns = mergedSorterStates.map(_ref5 => {
let {
column,
sortOrder
} = _ref5;
return {
column,
order: sortOrder
};
});
return {
sortColumns,
// Legacy
sortColumn: (_a = sortColumns[0]) === null || _a === void 0 ? void 0 : _a.column,
sortOrder: (_b = sortColumns[0]) === null || _b === void 0 ? void 0 : _b.order
};
}, [mergedSorterStates]);
const triggerSorter = sortState => {
let newSorterStates;
if (sortState.multiplePriority === false || !mergedSorterStates.length || mergedSorterStates[0].multiplePriority === false) {
newSorterStates = [sortState];
} else {
newSorterStates = [].concat((0,toConsumableArray["default"])(mergedSorterStates.filter(_ref6 => {
let {
key
} = _ref6;
return key !== sortState.key;
})), [sortState]);
}
setSortStates(newSorterStates);
onSorterChange(generateSorterInfo(newSorterStates), newSorterStates);
};
const transformColumns = innerColumns => injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip);
const getSorters = () => generateSorterInfo(mergedSorterStates);
return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters];
};
/* harmony default export */ var useSorter = (useFilterSorter);
;// ./components/table/hooks/useTitleColumns.ts
const fillTitle = (columns, columnTitleProps) => {
const finalColumns = columns.map(column => {
const cloneColumn = Object.assign({}, column);
cloneColumn.title = renderColumnTitle(column.title, columnTitleProps);
if ('children' in cloneColumn) {
cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps);
}
return cloneColumn;
});
return finalColumns;
};
const useTitleColumns = columnTitleProps => {
const filledColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(columns => fillTitle(columns, columnTitleProps), [columnTitleProps]);
return [filledColumns];
};
/* harmony default export */ var hooks_useTitleColumns = (useTitleColumns);
;// ./components/table/RcTable/index.tsx
/**
* Same as `rc-table` but we modify trigger children update logic instead.
*/
const RcTable = genTable((prev, next) => {
const {
_renderTimes: prevRenderTimes
} = prev;
const {
_renderTimes: nextRenderTimes
} = next;
return prevRenderTimes !== nextRenderTimes;
});
/* harmony default export */ var table_RcTable = (RcTable);
;// ./components/table/RcTable/VirtualTable.tsx
/**
* Same as `rc-table` but we modify trigger children update logic instead.
*/
const RcVirtualTable = genVirtualTable((prev, next) => {
const {
_renderTimes: prevRenderTimes
} = prev;
const {
_renderTimes: nextRenderTimes
} = next;
return prevRenderTimes !== nextRenderTimes;
});
/* harmony default export */ var RcTable_VirtualTable = (RcVirtualTable);
// EXTERNAL MODULE: ./components/table/style/index.ts + 15 modules
var table_style = __webpack_require__("./components/table/style/index.ts");
;// ./components/table/InternalTable.tsx
const InternalTable_EMPTY_LIST = [];
const InternalTable = (props, ref) => {
var _a, _b;
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
size: customizeSize,
bordered,
dropdownPrefixCls: customizeDropdownPrefixCls,
dataSource,
pagination,
rowSelection,
rowKey = 'key',
rowClassName,
columns,
children,
childrenColumnName: legacyChildrenColumnName,
onChange,
getPopupContainer,
loading,
expandIcon,
expandable,
expandedRowRender,
expandIconColumnIndex,
indentSize,
scroll,
sortDirections,
locale,
showSorterTooltip = {
target: 'full-header'
},
virtual
} = props;
const warning = (0,_util_warning.devUseWarning)('Table');
if (true) {
true ? warning(!(typeof rowKey === 'function' && rowKey.length > 1), 'usage', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.') : 0;
}
const baseColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => columns || convertChildrenToColumns(children), [columns, children]);
const needResponsive = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => baseColumns.some(col => col.responsive), [baseColumns]);
const screens = hooks_useBreakpoint(needResponsive);
const mergedColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const matched = new Set(Object.keys(screens).filter(m => screens[m]));
return baseColumns.filter(c => !c.responsive || c.responsive.some(r => matched.has(r)));
}, [baseColumns, screens]);
const tableProps = (0,omit["default"])(props, ['className', 'style', 'columns']);
const {
locale: contextLocale = en_US["default"],
direction,
table,
renderEmpty,
getPrefixCls,
getPopupContainer: getContextPopupContainer
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const mergedSize = (0,useSize["default"])(customizeSize);
const tableLocale = Object.assign(Object.assign({}, contextLocale.Table), locale);
const rawData = dataSource || InternalTable_EMPTY_LIST;
const prefixCls = getPrefixCls('table', customizePrefixCls);
const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
const [, token] = (0,useToken["default"])();
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,table_style["default"])(prefixCls, rootCls);
const mergedExpandable = Object.assign(Object.assign({
childrenColumnName: legacyChildrenColumnName,
expandIconColumnIndex
}, expandable), {
expandIcon: (_a = expandable === null || expandable === void 0 ? void 0 : expandable.expandIcon) !== null && _a !== void 0 ? _a : (_b = table === null || table === void 0 ? void 0 : table.expandable) === null || _b === void 0 ? void 0 : _b.expandIcon
});
const {
childrenColumnName = 'children'
} = mergedExpandable;
const expandType = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (rawData.some(item => item === null || item === void 0 ? void 0 : item[childrenColumnName])) {
return 'nest';
}
if (expandedRowRender || (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender)) {
return 'row';
}
return null;
}, [rawData]);
const internalRefs = {
body: external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null)
};
// ============================ Width =============================
const getContainerWidth = useContainerWidth(prefixCls);
// ============================= Refs =============================
const rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const tblRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
useProxyImperativeHandle(ref, () => Object.assign(Object.assign({}, tblRef.current), {
nativeElement: rootRef.current
}));
// ============================ RowKey ============================
const getRowKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (typeof rowKey === 'function') {
return rowKey;
}
return record => record === null || record === void 0 ? void 0 : record[rowKey];
}, [rowKey]);
const [getRecordByKey] = hooks_useLazyKVMap(rawData, childrenColumnName, getRowKey);
// ============================ Events =============================
const changeEventInfo = {};
const triggerOnChange = function (info, action) {
let reset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var _a, _b, _c, _d;
const changeInfo = Object.assign(Object.assign({}, changeEventInfo), info);
if (reset) {
(_a = changeEventInfo.resetPagination) === null || _a === void 0 ? void 0 : _a.call(changeEventInfo);
// Reset event param
if ((_b = changeInfo.pagination) === null || _b === void 0 ? void 0 : _b.current) {
changeInfo.pagination.current = 1;
}
// Trigger pagination events
if (pagination) {
(_c = pagination.onChange) === null || _c === void 0 ? void 0 : _c.call(pagination, 1, (_d = changeInfo.pagination) === null || _d === void 0 ? void 0 : _d.pageSize);
}
}
if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) {
scrollTo(0, {
getContainer: () => internalRefs.body.current
});
}
onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {
currentDataSource: getFilterData(getSortData(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates, childrenColumnName),
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 =============================
const onSorterChange = (sorter, sorterStates) => {
triggerOnChange({
sorter,
sorterStates
}, 'sort', false);
};
const [transformSorterColumns, sortStates, sorterTitleProps, getSorters] = useSorter({
prefixCls,
mergedColumns,
onSorterChange,
sortDirections: sortDirections || ['ascend', 'descend'],
tableLocale,
showSorterTooltip
});
const sortedData = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => getSortData(rawData, sortStates, childrenColumnName), [rawData, sortStates]);
changeEventInfo.sorter = getSorters();
changeEventInfo.sorterStates = sortStates;
// ============================ Filter ============================
const onFilterChange = (filters, filterStates) => {
triggerOnChange({
filters,
filterStates
}, 'filter', true);
};
const [transformFilterColumns, filterStates, filters] = hooks_useFilter({
prefixCls,
locale: tableLocale,
dropdownPrefixCls,
mergedColumns,
onFilterChange,
getPopupContainer: getPopupContainer || getContextPopupContainer,
rootClassName: classnames_default()(rootClassName, rootCls)
});
const mergedData = getFilterData(sortedData, filterStates, childrenColumnName);
changeEventInfo.filters = filters;
changeEventInfo.filterStates = filterStates;
// ============================ Column ============================
const columnTitleProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const mergedFilters = {};
Object.keys(filters).forEach(filterKey => {
if (filters[filterKey] !== null) {
mergedFilters[filterKey] = filters[filterKey];
}
});
return Object.assign(Object.assign({}, sorterTitleProps), {
filters: mergedFilters
});
}, [sorterTitleProps, filters]);
const [transformTitleColumns] = hooks_useTitleColumns(columnTitleProps);
// ========================== Pagination ==========================
const onPaginationChange = (current, pageSize) => {
triggerOnChange({
pagination: Object.assign(Object.assign({}, changeEventInfo.pagination), {
current,
pageSize
})
}, 'paginate');
};
const [mergedPagination, resetPagination] = hooks_usePagination(mergedData.length, onPaginationChange, pagination);
changeEventInfo.pagination = pagination === false ? {} : getPaginationParam(mergedPagination, pagination);
changeEventInfo.resetPagination = resetPagination;
// ============================= Data =============================
const pageData = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (pagination === false || !mergedPagination.pageSize) {
return mergedData;
}
const {
current = 1,
total,
pageSize = DEFAULT_PAGE_SIZE
} = mergedPagination;
true ? warning(current > 0, 'usage', '`current` should be positive number.') : 0;
// Dynamic table data
if (mergedData.length < total) {
if (mergedData.length > pageSize) {
true ? warning(false, 'usage', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.') : 0;
return mergedData.slice((current - 1) * pageSize, current * pageSize);
}
return mergedData;
}
return mergedData.slice((current - 1) * pageSize, current * pageSize);
}, [!!pagination, mergedData, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.current, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total]);
// ========================== Selections ==========================
const [transformSelectionColumns, selectedKeySet] = hooks_useSelection({
prefixCls,
data: mergedData,
pageData,
getRowKey,
getRecordByKey,
expandType,
childrenColumnName,
locale: tableLocale,
getPopupContainer: getPopupContainer || getContextPopupContainer
}, rowSelection);
const internalRowClassName = (record, index, indent) => {
let mergedRowClassName;
if (typeof rowClassName === 'function') {
mergedRowClassName = classnames_default()(rowClassName(record, index, indent));
} else {
mergedRowClassName = classnames_default()(rowClassName);
}
return classnames_default()({
[`${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 ============================
const transformColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(innerColumns => transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [transformSorterColumns, transformFilterColumns, transformSelectionColumns]);
let topPaginationNode;
let bottomPaginationNode;
if (pagination !== false && (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) {
let paginationSize;
if (mergedPagination.size) {
paginationSize = mergedPagination.size;
} else {
paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined;
}
const renderPagination = position => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_pagination, Object.assign({}, mergedPagination, {
className: classnames_default()(`${prefixCls}-pagination ${prefixCls}-pagination-${position}`, mergedPagination.className),
size: paginationSize
})));
const defaultPosition = direction === 'rtl' ? 'left' : 'right';
const {
position
} = mergedPagination;
if (position !== null && Array.isArray(position)) {
const topPos = position.find(p => p.includes('top'));
const bottomPos = position.find(p => p.includes('bottom'));
const isDisable = position.every(p => `${p}` === 'none');
if (!topPos && !bottomPos && !isDisable) {
bottomPaginationNode = renderPagination(defaultPosition);
}
if (topPos) {
topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', ''));
}
if (bottomPos) {
bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', ''));
}
} else {
bottomPaginationNode = renderPagination(defaultPosition);
}
}
// >>>>>>>>> Spinning
let spinProps;
if (typeof loading === 'boolean') {
spinProps = {
spinning: loading
};
} else if (typeof loading === 'object') {
spinProps = Object.assign({
spinning: true
}, loading);
}
const wrapperClassNames = classnames_default()(cssVarCls, rootCls, `${prefixCls}-wrapper`, table === null || table === void 0 ? void 0 : table.className, {
[`${prefixCls}-wrapper-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId);
const mergedStyle = Object.assign(Object.assign({}, table === null || table === void 0 ? void 0 : table.style), style);
const emptyText = typeof (locale === null || locale === void 0 ? void 0 : locale.emptyText) !== 'undefined' ? locale.emptyText : (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "Table"
});
// ========================== Render ==========================
const TableComponent = virtual ? RcTable_VirtualTable : table_RcTable;
// >>> Virtual Table props. We set height here since it will affect height collection
const virtualProps = {};
const listItemHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const {
fontSize,
lineHeight,
lineWidth,
padding,
paddingXS,
paddingSM
} = token;
const fontHeight = Math.floor(fontSize * lineHeight);
switch (mergedSize) {
case 'middle':
return paddingSM * 2 + fontHeight + lineWidth;
case 'small':
return paddingXS * 2 + fontHeight + lineWidth;
default:
return padding * 2 + fontHeight + lineWidth;
}
}, [token, mergedSize]);
if (virtual) {
virtualProps.listItemHeight = listItemHeight;
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
ref: rootRef,
className: wrapperClassNames,
style: mergedStyle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, Object.assign({
spinning: false
}, spinProps), topPaginationNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, Object.assign({}, virtualProps, tableProps, {
ref: tblRef,
columns: mergedColumns,
direction: direction,
expandable: mergedExpandable,
prefixCls: prefixCls,
className: classnames_default()({
[`${prefixCls}-middle`]: mergedSize === 'middle',
[`${prefixCls}-small`]: mergedSize === 'small',
[`${prefixCls}-bordered`]: bordered,
[`${prefixCls}-empty`]: rawData.length === 0
}, cssVarCls, rootCls, hashId),
data: pageData,
rowKey: getRowKey,
rowClassName: internalRowClassName,
emptyText: emptyText,
// Internal
internalHooks: INTERNAL_HOOKS,
internalRefs: internalRefs,
transformColumns: transformColumns,
getContainerWidth: getContainerWidth
})), bottomPaginationNode)));
};
/* harmony default export */ var table_InternalTable = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalTable));
;// ./components/table/Table.tsx
const Table_Table = (props, ref) => {
const renderTimesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
renderTimesRef.current += 1;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(table_InternalTable, Object.assign({}, props, {
ref: ref,
_renderTimes: renderTimesRef.current
}));
};
const ForwardTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Table_Table);
ForwardTable.SELECTION_COLUMN = SELECTION_COLUMN;
ForwardTable.EXPAND_COLUMN = EXPAND_COLUMN;
ForwardTable.SELECTION_ALL = SELECTION_ALL;
ForwardTable.SELECTION_INVERT = SELECTION_INVERT;
ForwardTable.SELECTION_NONE = SELECTION_NONE;
ForwardTable.Column = table_Column;
ForwardTable.ColumnGroup = table_ColumnGroup;
ForwardTable.Summary = FooterComponents;
if (true) {
ForwardTable.displayName = 'Table';
}
/* harmony default export */ var table_Table = (ForwardTable);
;// ./components/table/index.tsx
/* harmony default export */ var table = (table_Table);
// EXTERNAL MODULE: ./components/tag/style/index.ts
var tag_style = __webpack_require__("./components/tag/style/index.ts");
;// ./components/tag/CheckableTag.tsx
var CheckableTag_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;
};
const CheckableTag = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
style,
className,
checked,
onChange,
onClick
} = props,
restProps = CheckableTag_rest(props, ["prefixCls", "style", "className", "checked", "onChange", "onClick"]);
const {
getPrefixCls,
tag
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const handleClick = e => {
onChange === null || onChange === void 0 ? void 0 : onChange(!checked);
onClick === null || onClick === void 0 ? void 0 : onClick(e);
};
const prefixCls = getPrefixCls('tag', customizePrefixCls);
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,tag_style["default"])(prefixCls);
const cls = classnames_default()(prefixCls, `${prefixCls}-checkable`, {
[`${prefixCls}-checkable-checked`]: checked
}, tag === null || tag === void 0 ? void 0 : tag.className, className, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, restProps, {
ref: ref,
style: Object.assign(Object.assign({}, style), tag === null || tag === void 0 ? void 0 : tag.style),
className: cls,
onClick: handleClick
})));
});
/* harmony default export */ var tag_CheckableTag = (CheckableTag);
;// ./components/tag/style/presetCmp.ts
// Style as status component
// ============================== Preset ==============================
const genPresetStyle = token => (0,genPresetColor["default"])(token, (colorKey, _ref) => {
let {
textColor,
lightBorderColor,
lightColor,
darkColor
} = _ref;
return {
[`${token.componentCls}${token.componentCls}-${colorKey}`]: {
color: textColor,
background: lightColor,
borderColor: lightBorderColor,
// Inverse color
'&-inverse': {
color: token.colorTextLightSolid,
background: darkColor,
borderColor: darkColor
},
[`&${token.componentCls}-borderless`]: {
borderColor: 'transparent'
}
}
};
});
// ============================== Export ==============================
/* harmony default export */ var presetCmp = ((0,genStyleUtils.genSubStyleComponent)(['Tag', 'preset'], token => {
const tagToken = (0,tag_style.prepareToken)(token);
return genPresetStyle(tagToken);
}, tag_style.prepareComponentToken));
;// ./components/_util/capitalize.ts
function capitalize(str) {
if (typeof str !== 'string') {
return str;
}
const ret = str.charAt(0).toUpperCase() + str.slice(1);
return ret;
}
;// ./components/tag/style/statusCmp.ts
const genTagStatusStyle = (token, status, cssVariableType) => {
const capitalizedCssVariableType = capitalize(cssVariableType);
return {
[`${token.componentCls}${token.componentCls}-${status}`]: {
color: token[`color${cssVariableType}`],
background: token[`color${capitalizedCssVariableType}Bg`],
borderColor: token[`color${capitalizedCssVariableType}Border`],
[`&${token.componentCls}-borderless`]: {
borderColor: 'transparent'
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var statusCmp = ((0,genStyleUtils.genSubStyleComponent)(['Tag', 'status'], token => {
const tagToken = (0,tag_style.prepareToken)(token);
return [genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];
}, tag_style.prepareComponentToken));
;// ./components/tag/index.tsx
var tag_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;
};
const InternalTag = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((tagProps, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
children,
icon,
color,
onClose,
bordered = true,
visible: deprecatedVisible
} = tagProps,
props = tag_rest(tagProps, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "bordered", "visible"]);
const {
getPrefixCls,
direction,
tag: tagContext
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [visible, setVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
const domProps = (0,omit["default"])(props, ['closeIcon', 'closable']);
// Warning for deprecated usage
if (true) {
const warning = (0,_util_warning.devUseWarning)('Tag');
warning.deprecated(!('visible' in tagProps), 'visible', 'visible && <Tag />');
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (deprecatedVisible !== undefined) {
setVisible(deprecatedVisible);
}
}, [deprecatedVisible]);
const isPreset = isPresetColor(color);
const isStatus = isPresetStatusColor(color);
const isInternalColor = isPreset || isStatus;
const tagStyle = Object.assign(Object.assign({
backgroundColor: color && !isInternalColor ? color : undefined
}, tagContext === null || tagContext === void 0 ? void 0 : tagContext.style), style);
const prefixCls = getPrefixCls('tag', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,tag_style["default"])(prefixCls);
// Style
const tagClassName = classnames_default()(prefixCls, tagContext === null || tagContext === void 0 ? void 0 : tagContext.className, {
[`${prefixCls}-${color}`]: isInternalColor,
[`${prefixCls}-has-color`]: color && !isInternalColor,
[`${prefixCls}-hidden`]: !visible,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-borderless`]: !bordered
}, className, rootClassName, hashId, cssVarCls);
const handleCloseClick = e => {
e.stopPropagation();
onClose === null || onClose === void 0 ? void 0 : onClose(e);
if (e.defaultPrevented) {
return;
}
setVisible(false);
};
const [, mergedCloseIcon] = useClosable(pickClosable(tagProps), pickClosable(tagContext), {
closable: false,
closeIconRender: iconNode => {
const replacement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-close-icon`,
onClick: handleCloseClick
}, iconNode);
return (0,reactNode.replaceElement)(iconNode, replacement, originProps => ({
onClick: e => {
var _a;
(_a = originProps === null || originProps === void 0 ? void 0 : originProps.onClick) === null || _a === void 0 ? void 0 : _a.call(originProps, e);
handleCloseClick(e);
},
className: classnames_default()(originProps === null || originProps === void 0 ? void 0 : originProps.className, `${prefixCls}-close-icon`)
}));
}
});
const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';
const iconNode = icon || null;
const kids = iconNode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, iconNode, children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children))) : children;
const tagNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, domProps, {
ref: ref,
className: tagClassName,
style: tagStyle
}), kids, mergedCloseIcon, isPreset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(presetCmp, {
key: "preset",
prefixCls: prefixCls
}), isStatus && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(statusCmp, {
key: "status",
prefixCls: prefixCls
}));
return wrapCSSVar(isNeedWave ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
component: "Tag"
}, tagNode) : tagNode);
});
const Tag = InternalTag;
if (true) {
Tag.displayName = 'Tag';
}
Tag.CheckableTag = tag_CheckableTag;
/* harmony default export */ var tag = (Tag);
// EXTERNAL MODULE: ./components/theme/util/alias.ts
var alias = __webpack_require__("./components/theme/util/alias.ts");
;// ./components/theme/getDesignToken.ts
const getDesignToken = config => {
const theme = (config === null || config === void 0 ? void 0 : config.algorithm) ? (0,cssinjs.createTheme)(config.algorithm) : default_theme["default"];
const mergedToken = Object.assign(Object.assign({}, seed["default"]), config === null || config === void 0 ? void 0 : config.token);
return (0,cssinjs.getComputedToken)(mergedToken, {
override: config === null || config === void 0 ? void 0 : config.token
}, theme, alias["default"]);
};
/* harmony default export */ var theme_getDesignToken = (getDesignToken);
// EXTERNAL MODULE: ./components/theme/themes/default/index.ts + 5 modules
var themes_default = __webpack_require__("./components/theme/themes/default/index.ts");
// EXTERNAL MODULE: ./components/theme/themes/shared/genControlHeight.ts
var genControlHeight = __webpack_require__("./components/theme/themes/shared/genControlHeight.ts");
// EXTERNAL MODULE: ./components/theme/themes/shared/genFontMapToken.ts
var genFontMapToken = __webpack_require__("./components/theme/themes/shared/genFontMapToken.ts");
;// ./components/theme/themes/compact/genCompactSizeMapToken.ts
function genSizeMapToken(token) {
const {
sizeUnit,
sizeStep
} = token;
const compactSizeStep = sizeStep - 2;
return {
sizeXXL: sizeUnit * (compactSizeStep + 10),
sizeXL: sizeUnit * (compactSizeStep + 6),
sizeLG: sizeUnit * (compactSizeStep + 2),
sizeMD: sizeUnit * (compactSizeStep + 2),
sizeMS: sizeUnit * (compactSizeStep + 1),
size: sizeUnit * compactSizeStep,
sizeSM: sizeUnit * compactSizeStep,
sizeXS: sizeUnit * (compactSizeStep - 1),
sizeXXS: sizeUnit * (compactSizeStep - 1)
};
}
;// ./components/theme/themes/compact/index.ts
const derivative = (token, mapToken) => {
const mergedMapToken = mapToken !== null && mapToken !== void 0 ? mapToken : (0,themes_default["default"])(token);
const fontSize = mergedMapToken.fontSizeSM; // Smaller size font-size as base
const controlHeight = mergedMapToken.controlHeight - 4;
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, mergedMapToken), genSizeMapToken(mapToken !== null && mapToken !== void 0 ? mapToken : token)), (0,genFontMapToken["default"])(fontSize)), {
// controlHeight
controlHeight
}), (0,genControlHeight["default"])(Object.assign(Object.assign({}, mergedMapToken), {
controlHeight
})));
};
/* harmony default export */ var themes_compact = (derivative);
// EXTERNAL MODULE: ./components/theme/themes/shared/genColorMapToken.ts
var genColorMapToken = __webpack_require__("./components/theme/themes/shared/genColorMapToken.ts");
;// ./components/theme/themes/dark/colorAlgorithm.ts
const getAlphaColor = (baseColor, alpha) => new fast_color_es.FastColor(baseColor).setA(alpha).toRgbString();
const getSolidColor = (baseColor, brightness) => {
const instance = new fast_color_es.FastColor(baseColor);
return instance.lighten(brightness).toHexString();
};
;// ./components/theme/themes/dark/colors.ts
const generateColorPalettes = baseColor => {
const colors = (0,colors_es.generate)(baseColor, {
theme: 'dark'
});
return {
1: colors[0],
2: colors[1],
3: colors[2],
4: colors[3],
5: colors[6],
6: colors[5],
7: colors[4],
8: colors[6],
9: colors[5],
10: colors[4]
// 8: colors[9],
// 9: colors[8],
// 10: colors[7],
};
};
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
const colorBgBase = bgBaseColor || '#000';
const colorTextBase = textBaseColor || '#fff';
return {
colorBgBase,
colorTextBase,
colorText: getAlphaColor(colorTextBase, 0.85),
colorTextSecondary: getAlphaColor(colorTextBase, 0.65),
colorTextTertiary: getAlphaColor(colorTextBase, 0.45),
colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),
colorFill: getAlphaColor(colorTextBase, 0.18),
colorFillSecondary: getAlphaColor(colorTextBase, 0.12),
colorFillTertiary: getAlphaColor(colorTextBase, 0.08),
colorFillQuaternary: getAlphaColor(colorTextBase, 0.04),
colorBgSolid: getAlphaColor(colorTextBase, 0.95),
colorBgSolidHover: getAlphaColor(colorTextBase, 1),
colorBgSolidActive: getAlphaColor(colorTextBase, 0.9),
colorBgElevated: getSolidColor(colorBgBase, 12),
colorBgContainer: getSolidColor(colorBgBase, 8),
colorBgLayout: getSolidColor(colorBgBase, 0),
colorBgSpotlight: getSolidColor(colorBgBase, 26),
colorBgBlur: getAlphaColor(colorTextBase, 0.04),
colorBorder: getSolidColor(colorBgBase, 26),
colorBorderSecondary: getSolidColor(colorBgBase, 19)
};
};
;// ./components/theme/themes/dark/index.ts
const dark_derivative = (token, mapToken) => {
const colorPalettes = Object.keys(seed.defaultPresetColors).map(colorKey => {
const colors = (0,colors_es.generate)(token[colorKey], {
theme: 'dark'
});
return Array.from({
length: 10
}, () => 1).reduce((prev, _, i) => {
prev[`${colorKey}-${i + 1}`] = colors[i];
prev[`${colorKey}${i + 1}`] = colors[i];
return prev;
}, {});
}).reduce((prev, cur) => {
// biome-ignore lint/style/noParameterAssign: it is a reduce
prev = Object.assign(Object.assign({}, prev), cur);
return prev;
}, {});
const mergedMapToken = mapToken !== null && mapToken !== void 0 ? mapToken : (0,themes_default["default"])(token);
return Object.assign(Object.assign(Object.assign({}, mergedMapToken), colorPalettes), (0,genColorMapToken["default"])(token, {
generateColorPalettes: generateColorPalettes,
generateNeutralColorPalettes: generateNeutralColorPalettes
}));
};
/* harmony default export */ var dark = (dark_derivative);
;// ./components/theme/index.tsx
// ZombieJ: We export as object to user but array in internal.
// This is used to minimize the bundle size for antd package but safe to refactor as object also.
// Please do not export internal `useToken` directly to avoid something export unexpected.
/** Get current context Design Token. Will be different if you are using nest theme config. */
function theme_useToken() {
const [theme, token, hashId] = (0,useToken["default"])();
return {
theme,
token,
hashId
};
}
/* harmony default export */ var theme = ({
/** Default seedToken */
defaultSeed: context.defaultConfig.token,
useToken: theme_useToken,
defaultAlgorithm: themes_default["default"],
darkAlgorithm: dark,
compactAlgorithm: themes_compact,
getDesignToken: theme_getDesignToken,
/**
* @private Private variable
* @warring 🔥 Do not use in production. 🔥
*/
defaultConfig: context.defaultConfig,
/**
* @private Private variable
* @warring 🔥 Do not use in production. 🔥
*/
_internalContext: context.DesignTokenContext
});
;// ./components/time-picker/index.tsx
var time_picker_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;
};
const {
TimePicker: InternalTimePicker,
RangePicker: InternalRangePicker
} = date_picker;
const time_picker_RangePicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalRangePicker, Object.assign({}, props, {
picker: "time",
mode: undefined,
ref: ref
}))));
const TimePicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_a, ref) => {
var {
addon,
renderExtraFooter,
variant,
bordered
} = _a,
restProps = time_picker_rest(_a, ["addon", "renderExtraFooter", "variant", "bordered"]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('TimePicker');
warning.deprecated(!addon, 'addon', 'renderExtraFooter');
}
const [mergedVariant] = useVariants('timePicker', variant, bordered);
const internalRenderExtraFooter = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (renderExtraFooter) {
return renderExtraFooter;
}
if (addon) {
return addon;
}
return undefined;
}, [addon, renderExtraFooter]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalTimePicker, Object.assign({}, restProps, {
mode: undefined,
ref: ref,
renderExtraFooter: internalRenderExtraFooter,
variant: mergedVariant
}));
});
if (true) {
TimePicker.displayName = 'TimePicker';
}
// We don't care debug panel
/* istanbul ignore next */
const time_picker_PurePanel = _util_PurePanel(TimePicker, 'popupAlign', undefined, 'picker');
TimePicker._InternalPanelDoNotUseOrYouWillBeFired = time_picker_PurePanel;
TimePicker.RangePicker = time_picker_RangePicker;
TimePicker._InternalPanelDoNotUseOrYouWillBeFired = time_picker_PurePanel;
/* harmony default export */ var time_picker = (TimePicker);
// EXTERNAL MODULE: ./components/timeline/style/index.ts
var timeline_style = __webpack_require__("./components/timeline/style/index.ts");
;// ./components/timeline/TimelineItem.tsx
var TimelineItem_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;
};
const TimelineItem = _a => {
var {
prefixCls: customizePrefixCls,
className,
color = 'blue',
dot,
pending = false,
position /** Dead, but do not pass in <li {...omit()} */,
label,
children
} = _a,
restProps = TimelineItem_rest(_a, ["prefixCls", "className", "color", "dot", "pending", "position", "label", "children"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('timeline', customizePrefixCls);
const itemClassName = classnames_default()(`${prefixCls}-item`, {
[`${prefixCls}-item-pending`]: pending
}, className);
const customColor = /blue|red|green|gray/.test(color || '') ? undefined : color;
const dotClassName = classnames_default()(`${prefixCls}-item-head`, {
[`${prefixCls}-item-head-custom`]: !!dot,
[`${prefixCls}-item-head-${color}`]: !customColor
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", Object.assign({}, restProps, {
className: itemClassName
}), label && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-item-label`
}, label), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-item-tail`
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: dotClassName,
style: {
borderColor: customColor,
color: customColor
}
}, dot), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-item-content`
}, children));
};
/* harmony default export */ var timeline_TimelineItem = (TimelineItem);
;// ./components/timeline/TimelineItemList.tsx
var TimelineItemList_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;
};
const TimelineItemList = _a => {
var {
prefixCls,
className,
pending = false,
children,
items,
rootClassName,
reverse = false,
direction,
hashId,
pendingDot,
mode = ''
} = _a,
restProps = TimelineItemList_rest(_a, ["prefixCls", "className", "pending", "children", "items", "rootClassName", "reverse", "direction", "hashId", "pendingDot", "mode"]);
const getPositionCls = (position, idx) => {
if (mode === 'alternate') {
if (position === 'right') return `${prefixCls}-item-right`;
if (position === 'left') return `${prefixCls}-item-left`;
return idx % 2 === 0 ? `${prefixCls}-item-left` : `${prefixCls}-item-right`;
}
if (mode === 'left') return `${prefixCls}-item-left`;
if (mode === 'right') return `${prefixCls}-item-right`;
if (position === 'right') return `${prefixCls}-item-right`;
return '';
};
const mergedItems = (0,toConsumableArray["default"])(items || []);
const pendingNode = typeof pending === 'boolean' ? null : pending;
if (pending) {
mergedItems.push({
pending: !!pending,
dot: pendingDot || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null),
children: pendingNode
});
}
if (reverse) {
mergedItems.reverse();
}
const itemsCount = mergedItems.length;
const lastCls = `${prefixCls}-item-last`;
const itemsList = mergedItems.filter(item => !!item).map((item, idx) => {
var _a;
const pendingClass = idx === itemsCount - 2 ? lastCls : '';
const readyClass = idx === itemsCount - 1 ? lastCls : '';
const {
className: itemClassName
} = item,
itemProps = TimelineItemList_rest(item, ["className"]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(timeline_TimelineItem, Object.assign({}, itemProps, {
className: classnames_default()([itemClassName, !reverse && !!pending ? pendingClass : readyClass, getPositionCls((_a = item === null || item === void 0 ? void 0 : item.position) !== null && _a !== void 0 ? _a : '', idx)]),
key: (item === null || item === void 0 ? void 0 : item.key) || idx
}));
});
const hasLabelItem = mergedItems.some(item => !!(item === null || item === void 0 ? void 0 : item.label));
const classString = classnames_default()(prefixCls, {
[`${prefixCls}-pending`]: !!pending,
[`${prefixCls}-reverse`]: !!reverse,
[`${prefixCls}-${mode}`]: !!mode && !hasLabelItem,
[`${prefixCls}-label`]: hasLabelItem,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", Object.assign({}, restProps, {
className: classString
}), itemsList);
};
/* harmony default export */ var timeline_TimelineItemList = (TimelineItemList);
;// ./components/timeline/useItems.ts
function timeline_useItems_useItems(items, children) {
if (items && Array.isArray(items)) {
return items;
}
return (0,toArray["default"])(children).map(ele => {
var _a, _b;
return Object.assign({
children: (_b = (_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : ''
}, ele.props);
});
}
/* harmony default export */ var timeline_useItems = (timeline_useItems_useItems);
;// ./components/timeline/Timeline.tsx
var Timeline_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;
};
// CSSINJS
const Timeline = props => {
const {
getPrefixCls,
direction,
timeline
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const {
prefixCls: customizePrefixCls,
children,
items,
className,
style
} = props,
restProps = Timeline_rest(props, ["prefixCls", "children", "items", "className", "style"]);
const prefixCls = getPrefixCls('timeline', customizePrefixCls);
// =================== Warning =====================
if (true) {
const warning = (0,_util_warning.devUseWarning)('Timeline');
warning.deprecated(!children, 'Timeline.Item', 'items');
}
// Style
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,timeline_style["default"])(prefixCls, rootCls);
const mergedItems = timeline_useItems(items, children);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(timeline_TimelineItemList, Object.assign({}, restProps, {
className: classnames_default()(timeline === null || timeline === void 0 ? void 0 : timeline.className, className, cssVarCls, rootCls),
style: Object.assign(Object.assign({}, timeline === null || timeline === void 0 ? void 0 : timeline.style), style),
prefixCls: prefixCls,
direction: direction,
items: mergedItems,
hashId: hashId
})));
};
Timeline.Item = timeline_TimelineItem;
if (true) {
Timeline.displayName = 'Timeline';
}
/* harmony default export */ var timeline_Timeline = (Timeline);
;// ./components/timeline/index.tsx
/* harmony default export */ var timeline = (timeline_Timeline);
;// ./node_modules/@rc-component/tour/es/hooks/useClosable.js
function isConfigObj(closable) {
return closable !== null && (0,esm_typeof["default"])(closable) === 'object';
}
/**
* Convert `closable` to ClosableConfig.
* When `preset` is true, will auto fill ClosableConfig with default value.
*/
function getClosableConfig(closable, closeIcon, preset) {
if (closable === false || closeIcon === false && (!isConfigObj(closable) || !closable.closeIcon)) {
return null;
}
var mergedCloseIcon = typeof closeIcon !== 'boolean' ? closeIcon : undefined;
if (isConfigObj(closable)) {
var _closable$closeIcon;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, closable), {}, {
closeIcon: (_closable$closeIcon = closable.closeIcon) !== null && _closable$closeIcon !== void 0 ? _closable$closeIcon : mergedCloseIcon
});
}
// When StepClosable no need auto fill, but RootClosable need this.
return preset || closable || closeIcon ? {
closeIcon: mergedCloseIcon
} : 'empty';
}
function useClosable_useClosable(stepClosable, stepCloseIcon, closable, closeIcon) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var stepClosableConfig = getClosableConfig(stepClosable, stepCloseIcon, false);
var rootClosableConfig = getClosableConfig(closable, closeIcon, true);
if (stepClosableConfig !== 'empty') {
return stepClosableConfig;
}
return rootClosableConfig;
}, [closable, closeIcon, stepClosable, stepCloseIcon]);
}
;// ./node_modules/@rc-component/tour/es/util.js
function isInViewPort(element) {
var viewWidth = window.innerWidth || document.documentElement.clientWidth;
var viewHeight = window.innerHeight || document.documentElement.clientHeight;
var _element$getBoundingC = element.getBoundingClientRect(),
top = _element$getBoundingC.top,
right = _element$getBoundingC.right,
bottom = _element$getBoundingC.bottom,
left = _element$getBoundingC.left;
return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
}
function getPlacement(targetElement, placement, stepPlacement) {
var _ref;
return (_ref = stepPlacement !== null && stepPlacement !== void 0 ? stepPlacement : placement) !== null && _ref !== void 0 ? _ref : targetElement === null ? 'center' : 'bottom';
}
;// ./node_modules/@rc-component/tour/es/hooks/useTarget.js
function isValidNumber(val) {
return typeof val === 'number' && !Number.isNaN(val);
}
function useTarget(target, open, gap, scrollIntoViewOptions) {
// ========================= Target =========================
// We trade `undefined` as not get target by function yet.
// `null` as empty target.
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(undefined),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
targetElement = _useState2[0],
setTargetElement = _useState2[1];
(0,useLayoutEffect["default"])(function () {
var nextElement = typeof target === 'function' ? target() : target;
setTargetElement(nextElement || null);
});
// ========================= Align ==========================
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
posInfo = _useState4[0],
setPosInfo = _useState4[1];
var updatePos = (0,useEvent["default"])(function () {
if (targetElement) {
// Exist target element. We should scroll and get target position
if (!isInViewPort(targetElement) && open) {
targetElement.scrollIntoView(scrollIntoViewOptions);
}
var _targetElement$getBou = targetElement.getBoundingClientRect(),
left = _targetElement$getBou.left,
top = _targetElement$getBou.top,
width = _targetElement$getBou.width,
height = _targetElement$getBou.height;
var nextPosInfo = {
left: left,
top: top,
width: width,
height: height,
radius: 0
};
setPosInfo(function (origin) {
if (JSON.stringify(origin) !== JSON.stringify(nextPosInfo)) {
return nextPosInfo;
}
return origin;
});
} else {
// Not exist target which means we just show in center
setPosInfo(null);
}
});
var getGapOffset = function getGapOffset(index) {
var _ref;
return (_ref = Array.isArray(gap === null || gap === void 0 ? void 0 : gap.offset) ? gap === null || gap === void 0 ? void 0 : gap.offset[index] : gap === null || gap === void 0 ? void 0 : gap.offset) !== null && _ref !== void 0 ? _ref : 6;
};
(0,useLayoutEffect["default"])(function () {
updatePos();
// update when window resize
window.addEventListener('resize', updatePos);
return function () {
window.removeEventListener('resize', updatePos);
};
}, [targetElement, open, updatePos]);
// ======================== PosInfo =========================
var mergedPosInfo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
if (!posInfo) {
return posInfo;
}
var gapOffsetX = getGapOffset(0);
var gapOffsetY = getGapOffset(1);
var gapRadius = isValidNumber(gap === null || gap === void 0 ? void 0 : gap.radius) ? gap === null || gap === void 0 ? void 0 : gap.radius : 2;
return {
left: posInfo.left - gapOffsetX,
top: posInfo.top - gapOffsetY,
width: posInfo.width + gapOffsetX * 2,
height: posInfo.height + gapOffsetY * 2,
radius: gapRadius
};
}, [posInfo, gap]);
return [mergedPosInfo, targetElement];
}
;// ./node_modules/@rc-component/tour/es/Mask.js
var COVER_PROPS = {
fill: 'transparent',
pointerEvents: 'auto'
};
var es_Mask_Mask = function Mask(props) {
var prefixCls = props.prefixCls,
rootClassName = props.rootClassName,
pos = props.pos,
showMask = props.showMask,
_props$style = props.style,
style = _props$style === void 0 ? {} : _props$style,
_props$fill = props.fill,
fill = _props$fill === void 0 ? "rgba(0,0,0,0.5)" : _props$fill,
open = props.open,
animated = props.animated,
zIndex = props.zIndex,
disabledInteraction = props.disabledInteraction;
var id = hooks_useId();
var maskId = "".concat(prefixCls, "-mask-").concat(id);
var mergedAnimated = (0,esm_typeof["default"])(animated) === 'object' ? animated === null || animated === void 0 ? void 0 : animated.placeholder : animated;
var isSafari = typeof navigator !== 'undefined' && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
var maskRectSize = isSafari ? {
width: '100%',
height: '100%'
} : {
width: '100vw',
height: '100vh'
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(portal_es, {
open: open,
autoLock: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-mask"), rootClassName),
style: (0,objectSpread2["default"])({
position: 'fixed',
left: 0,
right: 0,
top: 0,
bottom: 0,
zIndex: zIndex,
pointerEvents: pos && !disabledInteraction ? 'none' : 'auto'
}, style)
}, showMask ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
style: {
width: '100%',
height: '100%'
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("defs", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("mask", {
id: maskId
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({
x: "0",
y: "0"
}, maskRectSize, {
fill: "white"
})), pos && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", {
x: pos.left,
y: pos.top,
rx: pos.radius,
width: pos.width,
height: pos.height,
fill: "black",
className: mergedAnimated ? "".concat(prefixCls, "-placeholder-animated") : ''
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", {
x: "0",
y: "0",
width: "100%",
height: "100%",
fill: fill,
mask: "url(#".concat(maskId, ")")
}), pos && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
x: "0",
y: "0",
width: "100%",
height: pos.top
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
x: "0",
y: "0",
width: pos.left,
height: "100%"
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
x: "0",
y: pos.top + pos.height,
width: "100%",
height: "calc(100vh - ".concat(pos.top + pos.height, "px)")
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
x: pos.left + pos.width,
y: "0",
width: "calc(100vw - ".concat(pos.left + pos.width, "px)"),
height: "100%"
})))) : null));
};
/* harmony default export */ var es_Mask = (es_Mask_Mask);
;// ./node_modules/@rc-component/tour/es/placements.js
var es_placements_autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
};
var es_placements_targetOffset = [0, 0];
var basePlacements = {
left: {
points: ['cr', 'cl'],
offset: [-8, 0]
},
right: {
points: ['cl', 'cr'],
offset: [8, 0]
},
top: {
points: ['bc', 'tc'],
offset: [0, -8]
},
bottom: {
points: ['tc', 'bc'],
offset: [0, 8]
},
topLeft: {
points: ['bl', 'tl'],
offset: [0, -8]
},
leftTop: {
points: ['tr', 'tl'],
offset: [-8, 0]
},
topRight: {
points: ['br', 'tr'],
offset: [0, -8]
},
rightTop: {
points: ['tl', 'tr'],
offset: [8, 0]
},
bottomRight: {
points: ['tr', 'br'],
offset: [0, 8]
},
rightBottom: {
points: ['bl', 'br'],
offset: [8, 0]
},
bottomLeft: {
points: ['tl', 'bl'],
offset: [0, 8]
},
leftBottom: {
points: ['br', 'bl'],
offset: [-8, 0]
}
};
function placements_getPlacements() {
var arrowPointAtCenter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var placements = {};
Object.keys(basePlacements).forEach(function (key) {
placements[key] = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, basePlacements[key]), {}, {
autoArrow: arrowPointAtCenter,
targetOffset: es_placements_targetOffset
});
});
return placements;
}
var tour_es_placements_placements = placements_getPlacements();
;// ./node_modules/@rc-component/tour/es/TourStep/DefaultPanel.js
function DefaultPanel(props) {
var _closable$closeIcon;
var prefixCls = props.prefixCls,
current = props.current,
total = props.total,
title = props.title,
description = props.description,
onClose = props.onClose,
onPrev = props.onPrev,
onNext = props.onNext,
onFinish = props.onFinish,
className = props.className,
closable = props.closable;
var ariaProps = (0,pickAttrs["default"])(closable || {}, true);
var closeIcon = (_closable$closeIcon = closable === null || closable === void 0 ? void 0 : closable.closeIcon) !== null && _closable$closeIcon !== void 0 ? _closable$closeIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: "".concat(prefixCls, "-close-x")
}, "\xD7");
var mergedClosable = !!closable;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()("".concat(prefixCls, "-content"), className)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-inner")
}, mergedClosable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", (0,esm_extends["default"])({
type: "button",
onClick: onClose,
"aria-label": "Close"
}, ariaProps, {
className: "".concat(prefixCls, "-close")
}), closeIcon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-header")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-title")
}, title)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-description")
}, description), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-footer")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-sliders")
}, total > 1 ? (0,toConsumableArray["default"])(Array.from({
length: total
}).keys()).map(function (item, index) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: item,
className: index === current ? 'active' : ''
});
}) : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: "".concat(prefixCls, "-buttons")
}, current !== 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
className: "".concat(prefixCls, "-prev-btn"),
onClick: onPrev
}, "Prev") : null, current === total - 1 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
className: "".concat(prefixCls, "-finish-btn"),
onClick: onFinish
}, "Finish") : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
className: "".concat(prefixCls, "-next-btn"),
onClick: onNext
}, "Next")))));
}
;// ./node_modules/@rc-component/tour/es/TourStep/index.js
var TourStep = function TourStep(props) {
var current = props.current,
renderPanel = props.renderPanel;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, typeof renderPanel === 'function' ? renderPanel(props, current) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DefaultPanel, props));
};
/* harmony default export */ var es_TourStep = (TourStep);
;// ./node_modules/@rc-component/tour/es/Tour.js
var Tour_excluded = ["prefixCls", "steps", "defaultCurrent", "current", "onChange", "onClose", "onFinish", "open", "mask", "arrow", "rootClassName", "placement", "renderPanel", "gap", "animated", "scrollIntoViewOptions", "zIndex", "closeIcon", "closable", "builtinPlacements", "disabledInteraction"];
var CENTER_PLACEHOLDER = {
left: '50%',
top: '50%',
width: 1,
height: 1
};
var defaultScrollIntoViewOptions = {
block: 'center',
inline: 'center'
};
var Tour = function Tour(props) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-tour' : _props$prefixCls,
_props$steps = props.steps,
steps = _props$steps === void 0 ? [] : _props$steps,
defaultCurrent = props.defaultCurrent,
current = props.current,
onChange = props.onChange,
onClose = props.onClose,
_onFinish = props.onFinish,
open = props.open,
_props$mask = props.mask,
mask = _props$mask === void 0 ? true : _props$mask,
_props$arrow = props.arrow,
arrow = _props$arrow === void 0 ? true : _props$arrow,
rootClassName = props.rootClassName,
placement = props.placement,
renderPanel = props.renderPanel,
gap = props.gap,
animated = props.animated,
_props$scrollIntoView = props.scrollIntoViewOptions,
scrollIntoViewOptions = _props$scrollIntoView === void 0 ? defaultScrollIntoViewOptions : _props$scrollIntoView,
_props$zIndex = props.zIndex,
zIndex = _props$zIndex === void 0 ? 1001 : _props$zIndex,
closeIcon = props.closeIcon,
closable = props.closable,
builtinPlacements = props.builtinPlacements,
disabledInteraction = props.disabledInteraction,
restProps = (0,objectWithoutProperties["default"])(props, Tour_excluded);
var triggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var _useMergedState = (0,useMergedState["default"])(0, {
value: current,
defaultValue: defaultCurrent
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedCurrent = _useMergedState2[0],
setMergedCurrent = _useMergedState2[1];
var _useMergedState3 = (0,useMergedState["default"])(undefined, {
value: open,
postState: function postState(origin) {
return mergedCurrent < 0 || mergedCurrent >= steps.length ? false : origin !== null && origin !== void 0 ? origin : true;
}
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedOpen = _useMergedState4[0],
setMergedOpen = _useMergedState4[1];
// Record if already rended in the DOM to avoid `findDOMNode` issue
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedOpen),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
hasOpened = _React$useState2[0],
setHasOpened = _React$useState2[1];
var openRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mergedOpen);
(0,useLayoutEffect["default"])(function () {
if (mergedOpen) {
if (!openRef.current) {
setMergedCurrent(0);
}
setHasOpened(true);
}
openRef.current = mergedOpen;
}, [mergedOpen]);
var _ref = steps[mergedCurrent] || {},
target = _ref.target,
stepPlacement = _ref.placement,
stepStyle = _ref.style,
stepArrow = _ref.arrow,
stepClassName = _ref.className,
stepMask = _ref.mask,
_ref$scrollIntoViewOp = _ref.scrollIntoViewOptions,
stepScrollIntoViewOptions = _ref$scrollIntoViewOp === void 0 ? defaultScrollIntoViewOptions : _ref$scrollIntoViewOp,
stepCloseIcon = _ref.closeIcon,
stepClosable = _ref.closable;
var mergedClosable = useClosable_useClosable(stepClosable, stepCloseIcon, closable, closeIcon);
var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask);
var mergedScrollIntoViewOptions = stepScrollIntoViewOptions !== null && stepScrollIntoViewOptions !== void 0 ? stepScrollIntoViewOptions : scrollIntoViewOptions;
var _useTarget = useTarget(target, open, gap, mergedScrollIntoViewOptions),
_useTarget2 = (0,slicedToArray["default"])(_useTarget, 2),
posInfo = _useTarget2[0],
targetElement = _useTarget2[1];
var mergedPlacement = getPlacement(targetElement, placement, stepPlacement);
// ========================= arrow =========================
var mergedArrow = targetElement ? typeof stepArrow === 'undefined' ? arrow : stepArrow : false;
var arrowPointAtCenter = (0,esm_typeof["default"])(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false;
(0,useLayoutEffect["default"])(function () {
var _triggerRef$current;
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.forceAlign();
}, [arrowPointAtCenter, mergedCurrent]);
// ========================= Change =========================
var onInternalChange = function onInternalChange(nextCurrent) {
setMergedCurrent(nextCurrent);
onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent);
};
var mergedBuiltinPlacements = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
if (builtinPlacements) {
return typeof builtinPlacements === 'function' ? builtinPlacements({
arrowPointAtCenter: arrowPointAtCenter
}) : builtinPlacements;
}
return placements_getPlacements(arrowPointAtCenter);
}, [builtinPlacements, arrowPointAtCenter]);
// ========================= Render =========================
// Skip if not init yet
if (targetElement === undefined || !hasOpened) {
return null;
}
var handleClose = function handleClose() {
setMergedOpen(false);
onClose === null || onClose === void 0 ? void 0 : onClose(mergedCurrent);
};
var getPopupElement = function getPopupElement() {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TourStep, (0,esm_extends["default"])({
arrow: mergedArrow,
key: "content",
prefixCls: prefixCls,
total: steps.length,
renderPanel: renderPanel,
onPrev: function onPrev() {
onInternalChange(mergedCurrent - 1);
},
onNext: function onNext() {
onInternalChange(mergedCurrent + 1);
},
onClose: handleClose,
current: mergedCurrent,
onFinish: function onFinish() {
handleClose();
_onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();
}
}, steps[mergedCurrent], {
closable: mergedClosable
}));
};
var mergedShowMask = typeof mergedMask === 'boolean' ? mergedMask : !!mergedMask;
var mergedMaskStyle = typeof mergedMask === 'boolean' ? undefined : mergedMask;
// when targetElement is not exist, use body as triggerDOMNode
var getTriggerDOMNode = function getTriggerDOMNode(node) {
return node || targetElement || document.body;
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Mask, {
zIndex: zIndex,
prefixCls: prefixCls,
pos: posInfo,
showMask: mergedShowMask,
style: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.style,
fill: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.color,
open: mergedOpen,
animated: animated,
rootClassName: rootClassName,
disabledInteraction: disabledInteraction
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, (0,esm_extends["default"])({}, restProps, {
builtinPlacements: mergedBuiltinPlacements,
ref: triggerRef,
popupStyle: stepStyle,
popupPlacement: mergedPlacement,
popupVisible: mergedOpen,
popupClassName: classnames_default()(rootClassName, stepClassName),
prefixCls: prefixCls,
popup: getPopupElement,
forceRender: false,
destroyPopupOnHide: true,
zIndex: zIndex,
getTriggerDOMNode: getTriggerDOMNode,
arrow: !!mergedArrow
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
open: mergedOpen,
autoLock: true
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(rootClassName, "".concat(prefixCls, "-target-placeholder")),
style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, posInfo || CENTER_PLACEHOLDER), {}, {
position: 'fixed',
pointerEvents: 'none'
})
}))));
};
/* harmony default export */ var es_Tour = (Tour);
;// ./node_modules/@rc-component/tour/es/index.js
/* harmony default export */ var tour_es = (es_Tour);
;// ./components/tour/panelRender.tsx
function isValidNode(node) {
return node !== undefined && node !== null;
}
// Due to the independent design of Panel, it will be too coupled to put in rc-tour,
// so a set of Panel logic is implemented separately in antd.
const TourPanel = props => {
var _a, _b;
const {
stepProps,
current,
type,
indicatorsRender
} = props;
const {
prefixCls,
total = 1,
title,
onClose,
onPrev,
onNext,
onFinish,
cover,
description,
nextButtonProps,
prevButtonProps,
type: stepType,
closable
} = stepProps;
const mergedType = stepType !== null && stepType !== void 0 ? stepType : type;
const mergedCloseIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
type: "button",
onClick: onClose,
className: `${prefixCls}-close`
}, (closable === null || closable === void 0 ? void 0 : closable.closeIcon) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, {
className: `${prefixCls}-close-icon`
}));
const isLastStep = current === total - 1;
const prevBtnClick = () => {
var _a;
onPrev === null || onPrev === void 0 ? void 0 : onPrev();
(_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(prevButtonProps);
};
const nextBtnClick = () => {
var _a;
if (isLastStep) {
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
} else {
onNext === null || onNext === void 0 ? void 0 : onNext();
}
(_a = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(nextButtonProps);
};
const headerNode = isValidNode(title) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-header`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-title`
}, title))) : null;
const descriptionNode = isValidNode(description) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-description`
}, description)) : null;
const coverNode = isValidNode(cover) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-cover`
}, cover) : null;
let mergedIndicatorNode;
if (indicatorsRender) {
mergedIndicatorNode = indicatorsRender(current, total);
} else {
mergedIndicatorNode = (0,toConsumableArray["default"])(Array.from({
length: total
}).keys()).map((stepItem, index) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
key: stepItem,
className: classnames_default()(index === current && `${prefixCls}-indicator-active`, `${prefixCls}-indicator`)
})));
}
const mainBtnType = mergedType === 'primary' ? 'default' : 'primary';
const secondaryBtnProps = {
type: 'default',
ghost: mergedType === 'primary'
};
const [contextLocale] = (0,useLocale["default"])('Tour', en_US["default"].Tour);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-content`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-inner`
}, closable && mergedCloseIcon, coverNode, headerNode, descriptionNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-footer`
}, total > 1 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-indicators`
}, mergedIndicatorNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-buttons`
}, current !== 0 ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({}, secondaryBtnProps, prevButtonProps, {
onClick: prevBtnClick,
size: "small",
className: classnames_default()(`${prefixCls}-prev-btn`, prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.className)
}), (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.children) !== null && _a !== void 0 ? _a : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Previous)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({
type: mainBtnType
}, nextButtonProps, {
onClick: nextBtnClick,
size: "small",
className: classnames_default()(`${prefixCls}-next-btn`, nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.className)
}), (_b = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.children) !== null && _b !== void 0 ? _b : isLastStep ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Finish : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Next)))));
};
/* harmony default export */ var panelRender = (TourPanel);
// EXTERNAL MODULE: ./components/tour/style/index.ts
var tour_style = __webpack_require__("./components/tour/style/index.ts");
;// ./components/tour/PurePanel.tsx
var tour_PurePanel_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;
};
const tour_PurePanel_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
current = 0,
total = 6,
className,
style,
type,
closable,
closeIcon
} = props,
restProps = tour_PurePanel_rest(props, ["prefixCls", "current", "total", "className", "style", "type", "closable", "closeIcon"]);
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('tour', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,tour_style["default"])(prefixCls);
const [mergedClosable, mergedCloseIcon] = useClosable({
closable,
closeIcon
}, null, {
closable: true,
closeIconRender: icon => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? (0,reactNode.cloneElement)(icon, {
className: classnames_default()(icon.props.className, `${prefixCls}-close-icon`)
}) : icon
});
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RawPurePanel, {
prefixCls: prefixCls,
hashId: hashId,
className: classnames_default()(className, `${prefixCls}-pure`, type && `${prefixCls}-${type}`, cssVarCls),
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(panelRender, {
stepProps: Object.assign(Object.assign({}, restProps), {
prefixCls,
total,
closable: mergedClosable ? {
closeIcon: mergedCloseIcon
} : undefined
}),
current: current,
type: type
})));
};
/* harmony default export */ var tour_PurePanel = (withPureRenderTheme(tour_PurePanel_PurePanel));
;// ./components/tour/index.tsx
var tour_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;
};
const tour_Tour = props => {
const {
prefixCls: customizePrefixCls,
type,
rootClassName,
indicatorsRender,
steps,
closeIcon
} = props,
restProps = tour_rest(props, ["prefixCls", "type", "rootClassName", "indicatorsRender", "steps", "closeIcon"]);
const {
getPrefixCls,
direction,
tour
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('tour', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,tour_style["default"])(prefixCls);
const [, token] = (0,useToken["default"])();
const mergedSteps = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => steps === null || steps === void 0 ? void 0 : steps.map(step => {
var _a;
return Object.assign(Object.assign({}, step), {
className: classnames_default()(step.className, {
[`${prefixCls}-primary`]: ((_a = step.type) !== null && _a !== void 0 ? _a : type) === 'primary'
})
});
}), [steps, type]);
const builtinPlacements = config => {
var _a;
return getPlacements({
arrowPointAtCenter: (_a = config === null || config === void 0 ? void 0 : config.arrowPointAtCenter) !== null && _a !== void 0 ? _a : true,
autoAdjustOverflow: true,
offset: token.marginXXS,
arrowWidth: token.sizePopupArrow,
borderRadius: token.borderRadius
});
};
const customClassName = classnames_default()({
[`${prefixCls}-rtl`]: direction === 'rtl'
}, hashId, cssVarCls, rootClassName);
const mergedRenderPanel = (stepProps, stepCurrent) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(panelRender, {
type: type,
stepProps: stepProps,
current: stepCurrent,
indicatorsRender: indicatorsRender
}));
// ============================ zIndex ============================
const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Tour', restProps.zIndex);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(zindexContext["default"].Provider, {
value: contextZIndex
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(tour_es, Object.assign({}, restProps, {
closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : tour === null || tour === void 0 ? void 0 : tour.closeIcon,
zIndex: zIndex,
rootClassName: customClassName,
prefixCls: prefixCls,
animated: true,
renderPanel: mergedRenderPanel,
builtinPlacements: builtinPlacements,
steps: mergedSteps
}))));
};
if (true) {
tour_Tour.displayName = 'Tour';
}
tour_Tour._InternalPanelDoNotUseOrYouWillBeFired = tour_PurePanel;
/* harmony default export */ var tour = (tour_Tour);
;// ./components/_util/transKeys.ts
const groupKeysMap = keys => {
const map = new Map();
keys.forEach((key, index) => {
map.set(key, index);
});
return map;
};
const groupDisabledKeysMap = dataSource => {
const map = new Map();
dataSource.forEach((_ref, index) => {
let {
disabled,
key
} = _ref;
if (disabled) {
map.set(key, index);
}
});
return map;
};
;// ./components/transfer/hooks/useData.ts
const useData = (dataSource, rowKey, targetKeys) => {
const mergedDataSource = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (dataSource || []).map(record => {
if (rowKey) {
return Object.assign(Object.assign({}, record), {
key: rowKey(record)
});
}
return record;
}), [dataSource, rowKey]);
const [leftDataSource, rightDataSource] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
var _a;
const leftData = [];
const rightData = Array.from({
length: (_a = targetKeys === null || targetKeys === void 0 ? void 0 : targetKeys.length) !== null && _a !== void 0 ? _a : 0
});
const targetKeysMap = groupKeysMap(targetKeys || []);
mergedDataSource.forEach(record => {
// rightData should be ordered by targetKeys
// leftData should be ordered by dataSource
if (targetKeysMap.has(record.key)) {
const idx = targetKeysMap.get(record.key);
rightData[idx] = record;
} else {
leftData.push(record);
}
});
return [leftData, rightData];
}, [mergedDataSource, targetKeys]);
return [mergedDataSource, leftDataSource.filter(Boolean), rightDataSource.filter(Boolean)];
};
/* harmony default export */ var hooks_useData = (useData);
;// ./components/transfer/hooks/useSelection.ts
const EMPTY_KEYS = [];
function filterKeys(keys, dataKeys) {
const filteredKeys = keys.filter(key => dataKeys.has(key));
return keys.length === filteredKeys.length ? keys : filteredKeys;
}
function useSelection_flattenKeys(keys) {
return Array.from(keys).join(';');
}
function useSelection_useSelection(leftDataSource, rightDataSource, selectedKeys) {
// Prepare `dataSource` keys
const [leftKeys, rightKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => [new Set(leftDataSource.map(src => src === null || src === void 0 ? void 0 : src.key)), new Set(rightDataSource.map(src => src === null || src === void 0 ? void 0 : src.key))], [leftDataSource, rightDataSource]);
// Selected Keys
const [mergedSelectedKeys, setMergedSelectedKeys] = (0,rc_util_es.useMergedState)(EMPTY_KEYS, {
value: selectedKeys
});
const sourceSelectedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => filterKeys(mergedSelectedKeys, leftKeys), [mergedSelectedKeys, leftKeys]);
const targetSelectedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => filterKeys(mergedSelectedKeys, rightKeys), [mergedSelectedKeys, rightKeys]);
// // Reset when data changed
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
setMergedSelectedKeys([].concat((0,toConsumableArray["default"])(filterKeys(mergedSelectedKeys, leftKeys)), (0,toConsumableArray["default"])(filterKeys(mergedSelectedKeys, rightKeys))));
}, [useSelection_flattenKeys(leftKeys), useSelection_flattenKeys(rightKeys)]);
// Update keys
const setSourceSelectedKeys = (0,rc_util_es.useEvent)(nextSrcKeys => {
setMergedSelectedKeys([].concat((0,toConsumableArray["default"])(nextSrcKeys), (0,toConsumableArray["default"])(targetSelectedKeys)));
});
const setTargetSelectedKeys = (0,rc_util_es.useEvent)(nextTargetKeys => {
setMergedSelectedKeys([].concat((0,toConsumableArray["default"])(sourceSelectedKeys), (0,toConsumableArray["default"])(nextTargetKeys)));
});
return [
// Keys
sourceSelectedKeys, targetSelectedKeys,
// Updater
setSourceSelectedKeys, setTargetSelectedKeys];
}
/* harmony default export */ var transfer_hooks_useSelection = (useSelection_useSelection);
;// ./node_modules/@ant-design/icons-svg/es/asn/DeleteOutlined.js
// This icon file is generated automatically.
var DeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
/* harmony default export */ var asn_DeleteOutlined = (DeleteOutlined);
;// ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeleteOutlined_DeleteOutlined = function DeleteOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_DeleteOutlined
}));
};
/** */
var DeleteOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DeleteOutlined_DeleteOutlined);
if (true) {
DeleteOutlined_RefIcon.displayName = 'DeleteOutlined';
}
/* harmony default export */ var icons_DeleteOutlined = (DeleteOutlined_RefIcon);
;// ./components/transfer/ListItem.tsx
const ListItem = props => {
const {
renderedText,
renderedEl,
item,
checked,
disabled,
prefixCls,
onClick,
onRemove,
showRemove
} = props;
const className = classnames_default()(`${prefixCls}-content-item`, {
[`${prefixCls}-content-item-disabled`]: disabled || item.disabled,
[`${prefixCls}-content-item-checked`]: checked && !item.disabled
});
let title;
if (typeof renderedText === 'string' || typeof renderedText === 'number') {
title = String(renderedText);
}
const [contextLocale] = (0,useLocale["default"])('Transfer', en_US["default"].Transfer);
const liProps = {
className,
title
};
const labelNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-content-item-text`
}, renderedEl);
if (showRemove) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", Object.assign({}, liProps), labelNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
disabled: disabled || item.disabled,
className: `${prefixCls}-content-item-remove`,
"aria-label": contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.remove,
onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DeleteOutlined, null)));
}
// Default click to select
liProps.onClick = disabled || item.disabled ? undefined : event => onClick(item, event);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", Object.assign({}, liProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, {
className: `${prefixCls}-checkbox`,
checked: checked,
disabled: disabled || item.disabled
}), labelNode);
};
/* harmony default export */ var transfer_ListItem = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(ListItem));
;// ./components/transfer/ListBody.tsx
const OmitProps = ['handleFilter', 'handleClear', 'checkedKeys'];
const parsePagination = pagination => {
const defaultPagination = {
simple: true,
showSizeChanger: false,
showLessItems: false
};
return Object.assign(Object.assign({}, defaultPagination), pagination);
};
const TransferListBody = (props, ref) => {
const {
prefixCls,
filteredRenderItems,
selectedKeys,
disabled: globalDisabled,
showRemove,
pagination,
onScroll,
onItemSelect,
onItemRemove
} = props;
const [current, setCurrent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(1);
const mergedPagination = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!pagination) {
return null;
}
const convertPagination = typeof pagination === 'object' ? pagination : {};
return parsePagination(convertPagination);
}, [pagination]);
const [pageSize, setPageSize] = (0,useMergedState["default"])(10, {
value: mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize
});
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (mergedPagination) {
const maxPageCount = Math.ceil(filteredRenderItems.length / pageSize);
setCurrent(Math.min(current, maxPageCount));
}
}, [filteredRenderItems, mergedPagination, pageSize]);
const onInternalClick = (item, e) => {
onItemSelect(item.key, !selectedKeys.includes(item.key), e);
};
const onRemove = item => {
onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove([item.key]);
};
const onPageChange = cur => {
setCurrent(cur);
};
const onSizeChange = (cur, size) => {
setCurrent(cur);
setPageSize(size);
};
const memoizedItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const displayItems = mergedPagination ? filteredRenderItems.slice((current - 1) * pageSize, current * pageSize) : filteredRenderItems;
return displayItems;
}, [current, filteredRenderItems, mergedPagination, pageSize]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
items: memoizedItems
}));
const paginationNode = mergedPagination ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_pagination, {
size: "small",
disabled: globalDisabled,
simple: mergedPagination.simple,
pageSize: pageSize,
showLessItems: mergedPagination.showLessItems,
showSizeChanger: mergedPagination.showSizeChanger,
className: `${prefixCls}-pagination`,
total: filteredRenderItems.length,
current: current,
onChange: onPageChange,
onShowSizeChange: onSizeChange
})) : null;
const cls = classnames_default()(`${prefixCls}-content`, {
[`${prefixCls}-content-show-remove`]: showRemove
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
className: cls,
onScroll: onScroll
}, (memoizedItems || []).map(_ref => {
let {
renderedEl,
renderedText,
item
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(transfer_ListItem, {
key: item.key,
item: item,
renderedText: renderedText,
renderedEl: renderedEl,
prefixCls: prefixCls,
showRemove: showRemove,
onClick: onInternalClick,
onRemove: onRemove,
checked: selectedKeys.includes(item.key),
disabled: globalDisabled || item.disabled
});
})), paginationNode);
};
if (true) {
TransferListBody.displayName = 'TransferListBody';
}
/* harmony default export */ var ListBody = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(TransferListBody));
;// ./components/transfer/search.tsx
const search_Search = props => {
const {
placeholder = '',
value,
prefixCls,
disabled,
onChange,
handleClear
} = props;
const handleChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(e => {
onChange === null || onChange === void 0 ? void 0 : onChange(e);
if (e.target.value === '') {
handleClear === null || handleClear === void 0 ? void 0 : handleClear();
}
}, [onChange]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, {
placeholder: placeholder,
className: prefixCls,
value: value,
onChange: handleChange,
disabled: disabled,
allowClear: true,
prefix: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, null)
});
};
if (true) {
search_Search.displayName = 'Search';
}
/* harmony default export */ var transfer_search = (search_Search);
;// ./components/transfer/list.tsx
const list_defaultRender = () => null;
function isRenderResultPlainObject(result) {
return !!(result && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]');
}
function getEnabledItemKeys(items) {
return items.filter(data => !data.disabled).map(data => data.key);
}
const isValidIcon = icon => icon !== undefined;
const useShowSearchOption = showSearch => {
if (showSearch && typeof showSearch === 'object') {
return Object.assign(Object.assign({}, showSearch), {
defaultValue: showSearch.defaultValue || ''
});
}
return {
defaultValue: '',
placeholder: ''
};
};
const TransferList = props => {
const {
prefixCls,
dataSource = [],
titleText = '',
checkedKeys,
disabled,
showSearch = false,
style,
searchPlaceholder,
notFoundContent,
selectAll,
deselectAll,
selectCurrent,
selectInvert,
removeAll,
removeCurrent,
showSelectAll = true,
showRemove,
pagination,
direction,
itemsUnit,
itemUnit,
selectAllLabel,
selectionsIcon,
footer,
renderList,
onItemSelectAll,
onItemRemove,
handleFilter,
handleClear,
filterOption,
render = list_defaultRender
} = props;
const searchOptions = useShowSearchOption(showSearch);
const [filterValue, setFilterValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(searchOptions.defaultValue);
const listBodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
const internalHandleFilter = e => {
setFilterValue(e.target.value);
handleFilter(e);
};
const internalHandleClear = () => {
setFilterValue('');
handleClear();
};
const matchFilter = (text, item) => {
if (filterOption) {
return filterOption(filterValue, item, direction);
}
return text.includes(filterValue);
};
const renderListBody = listProps => {
let bodyContent = renderList ? renderList(Object.assign(Object.assign({}, listProps), {
onItemSelect: (key, check) => listProps.onItemSelect(key, check)
})) : null;
const customize = !!bodyContent;
if (!customize) {
// @ts-ignore
bodyContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ListBody, Object.assign({
ref: listBodyRef
}, listProps));
}
return {
customize,
bodyContent
};
};
const renderItem = item => {
const renderResult = render(item);
const isRenderResultPlain = isRenderResultPlainObject(renderResult);
return {
item,
renderedEl: isRenderResultPlain ? renderResult.label : renderResult,
renderedText: isRenderResultPlain ? renderResult.value : renderResult
};
};
const notFoundContentEle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Array.isArray(notFoundContent) ? notFoundContent[direction === 'left' ? 0 : 1] : notFoundContent, [notFoundContent, direction]);
const [filteredItems, filteredRenderItems] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
const filterItems = [];
const filterRenderItems = [];
dataSource.forEach(item => {
const renderedItem = renderItem(item);
if (filterValue && !matchFilter(renderedItem.renderedText, item)) {
return;
}
filterItems.push(item);
filterRenderItems.push(renderedItem);
});
return [filterItems, filterRenderItems];
}, [dataSource, filterValue]);
const checkedActiveItems = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
return filteredItems.filter(item => checkedKeys.includes(item.key) && !item.disabled);
}, [checkedKeys, filteredItems]);
const checkStatus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (checkedActiveItems.length === 0) {
return 'none';
}
const checkedKeysMap = groupKeysMap(checkedKeys);
if (filteredItems.every(item => checkedKeysMap.has(item.key) || !!item.disabled)) {
return 'all';
}
return 'part';
}, [checkedKeys, checkedActiveItems]);
const listBody = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
const search = showSearch ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-body-search-wrapper`
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(transfer_search, {
prefixCls: `${prefixCls}-search`,
onChange: internalHandleFilter,
handleClear: internalHandleClear,
placeholder: searchOptions.placeholder || searchPlaceholder,
value: filterValue,
disabled: disabled
}))) : null;
const {
customize,
bodyContent
} = renderListBody(Object.assign(Object.assign({}, (0,omit["default"])(props, OmitProps)), {
filteredItems,
filteredRenderItems,
selectedKeys: checkedKeys
}));
let bodyNode;
// We should wrap customize list body in a classNamed div to use flex layout.
if (customize) {
bodyNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-body-customize-wrapper`
}, bodyContent);
} else {
bodyNode = filteredItems.length ? bodyContent : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-body-not-found`
}, notFoundContentEle));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(`${prefixCls}-body`, {
[`${prefixCls}-body-with-search`]: showSearch
})
}, search, bodyNode);
}, [showSearch, prefixCls, searchPlaceholder, filterValue, disabled, checkedKeys, filteredItems, filteredRenderItems, notFoundContentEle]);
const checkBox = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_checkbox, {
disabled: dataSource.filter(d => !d.disabled).length === 0 || disabled,
checked: checkStatus === 'all',
indeterminate: checkStatus === 'part',
className: `${prefixCls}-checkbox`,
onChange: () => {
// Only select enabled items
onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(filteredItems.filter(item => !item.disabled).map(_ref => {
let {
key
} = _ref;
return key;
}), checkStatus !== 'all');
}
});
const getSelectAllLabel = (selectedCount, totalCount) => {
if (selectAllLabel) {
return typeof selectAllLabel === 'function' ? selectAllLabel({
selectedCount,
totalCount
}) : selectAllLabel;
}
const unit = totalCount > 1 ? itemsUnit : itemUnit;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, (selectedCount > 0 ? `${selectedCount}/` : '') + totalCount, " ", unit);
};
// Custom Layout
const footerDom = footer && (footer.length < 2 ? footer(props) : footer(props, {
direction
}));
const listCls = classnames_default()(prefixCls, {
[`${prefixCls}-with-pagination`]: !!pagination,
[`${prefixCls}-with-footer`]: !!footerDom
});
// ====================== Get filtered, checked item list ======================
const listFooter = footerDom ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-footer`
}, footerDom) : null;
const checkAllCheckbox = !showRemove && !pagination && checkBox;
let items;
if (showRemove) {
items = [/* Remove Current Page */
pagination ? {
key: 'removeCurrent',
label: removeCurrent,
onClick() {
var _a;
const pageKeys = getEnabledItemKeys((((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || []).map(entity => entity.item));
onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(pageKeys);
}
} : null, /* Remove All */
{
key: 'removeAll',
label: removeAll,
onClick() {
onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(getEnabledItemKeys(filteredItems));
}
}].filter(Boolean);
} else {
items = [{
key: 'selectAll',
label: checkStatus === 'all' ? deselectAll : selectAll,
onClick() {
const keys = getEnabledItemKeys(filteredItems);
onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(keys, keys.length !== checkedKeys.length);
}
}, pagination ? {
key: 'selectCurrent',
label: selectCurrent,
onClick() {
var _a;
const pageItems = ((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || [];
onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(getEnabledItemKeys(pageItems.map(entity => entity.item)), true);
}
} : null, {
key: 'selectInvert',
label: selectInvert,
onClick() {
var _a;
const availablePageItemKeys = getEnabledItemKeys((((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || []).map(entity => entity.item));
const checkedKeySet = new Set(checkedKeys);
const newCheckedKeysSet = new Set(checkedKeySet);
availablePageItemKeys.forEach(key => {
if (checkedKeySet.has(key)) {
newCheckedKeysSet.delete(key);
} else {
newCheckedKeysSet.add(key);
}
});
onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(Array.from(newCheckedKeysSet), 'replace');
}
}];
}
const dropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_dropdown, {
className: `${prefixCls}-header-dropdown`,
menu: {
items
},
disabled: disabled
}, isValidIcon(selectionsIcon) ? selectionsIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_DownOutlined, null));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: listCls,
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: `${prefixCls}-header`
}, showSelectAll ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, checkAllCheckbox, dropdown)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: `${prefixCls}-header-selected`
}, getSelectAllLabel(checkedActiveItems.length, filteredItems.length)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
className: `${prefixCls}-header-title`
}, titleText)), listBody, listFooter);
};
if (true) {
TransferList.displayName = 'TransferList';
}
/* harmony default export */ var transfer_list = (TransferList);
;// ./components/transfer/operation.tsx
const Operation = props => {
const {
disabled,
moveToLeft,
moveToRight,
leftArrowText = '',
rightArrowText = '',
leftActive,
rightActive,
className,
style,
direction,
oneWay
} = props;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: className,
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
type: "primary",
size: "small",
disabled: disabled || !rightActive,
onClick: moveToRight,
icon: direction !== 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null)
}, rightArrowText), !oneWay && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
type: "primary",
size: "small",
disabled: disabled || !leftActive,
onClick: moveToLeft,
icon: direction !== 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null)
}, leftArrowText)));
};
if (true) {
Operation.displayName = 'Operation';
}
/* harmony default export */ var operation = (Operation);
// EXTERNAL MODULE: ./components/transfer/style/index.ts
var transfer_style = __webpack_require__("./components/transfer/style/index.ts");
;// ./components/transfer/index.tsx
const Transfer = props => {
const {
dataSource,
targetKeys = [],
selectedKeys,
selectAllLabels = [],
operations = [],
style = {},
listStyle = {},
locale = {},
titles,
disabled,
showSearch = false,
operationStyle,
showSelectAll,
oneWay,
pagination,
status: customStatus,
prefixCls: customizePrefixCls,
className,
rootClassName,
selectionsIcon,
filterOption,
render,
footer,
children,
rowKey,
onScroll,
onChange,
onSearch,
onSelectChange
} = props;
const {
getPrefixCls,
renderEmpty,
direction: dir,
transfer
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('transfer', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,transfer_style["default"])(prefixCls);
// Fill record with `key`
const [mergedDataSource, leftDataSource, rightDataSource] = hooks_useData(dataSource, rowKey, targetKeys);
// Get direction selected keys
const [
// Keys
sourceSelectedKeys, targetSelectedKeys,
// Setters
setSourceSelectedKeys, setTargetSelectedKeys] = transfer_hooks_useSelection(leftDataSource, rightDataSource, selectedKeys);
const [leftMultipleSelect, updateLeftPrevSelectedIndex] = useMultipleSelect(item => item.key);
const [rightMultipleSelect, updateRightPrevSelectedIndex] = useMultipleSelect(item => item.key);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Transfer');
true ? warning(!pagination || !children, 'usage', '`pagination` not support customize render list.') : 0;
}
const setStateKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((direction, keys) => {
if (direction === 'left') {
const nextKeys = typeof keys === 'function' ? keys(sourceSelectedKeys || []) : keys;
setSourceSelectedKeys(nextKeys);
} else {
const nextKeys = typeof keys === 'function' ? keys(targetSelectedKeys || []) : keys;
setTargetSelectedKeys(nextKeys);
}
}, [sourceSelectedKeys, targetSelectedKeys]);
const setPrevSelectedIndex = (direction, value) => {
const isLeftDirection = direction === 'left';
const updatePrevSelectedIndex = isLeftDirection ? updateLeftPrevSelectedIndex : updateRightPrevSelectedIndex;
updatePrevSelectedIndex(value);
};
const handleSelectChange = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((direction, holder) => {
if (direction === 'left') {
onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(holder, targetSelectedKeys);
} else {
onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(sourceSelectedKeys, holder);
}
}, [sourceSelectedKeys, targetSelectedKeys]);
const getTitles = transferLocale => {
var _a;
return (_a = titles !== null && titles !== void 0 ? titles : transferLocale.titles) !== null && _a !== void 0 ? _a : [];
};
const handleLeftScroll = e => {
onScroll === null || onScroll === void 0 ? void 0 : onScroll('left', e);
};
const handleRightScroll = e => {
onScroll === null || onScroll === void 0 ? void 0 : onScroll('right', e);
};
const moveTo = direction => {
const moveKeys = direction === 'right' ? sourceSelectedKeys : targetSelectedKeys;
const dataSourceDisabledKeysMap = groupDisabledKeysMap(mergedDataSource);
// filter the disabled options
const newMoveKeys = moveKeys.filter(key => !dataSourceDisabledKeysMap.has(key));
const newMoveKeysMap = groupKeysMap(newMoveKeys);
// move items to target box
const newTargetKeys = direction === 'right' ? newMoveKeys.concat(targetKeys) : targetKeys.filter(targetKey => !newMoveKeysMap.has(targetKey));
// empty checked keys
const oppositeDirection = direction === 'right' ? 'left' : 'right';
setStateKeys(oppositeDirection, []);
handleSelectChange(oppositeDirection, []);
onChange === null || onChange === void 0 ? void 0 : onChange(newTargetKeys, direction, newMoveKeys);
};
const moveToLeft = () => {
moveTo('left');
setPrevSelectedIndex('left', null);
};
const moveToRight = () => {
moveTo('right');
setPrevSelectedIndex('right', null);
};
const onItemSelectAll = (direction, keys, checkAll) => {
setStateKeys(direction, prevKeys => {
let mergedCheckedKeys = [];
if (checkAll === 'replace') {
mergedCheckedKeys = keys;
} else if (checkAll) {
// Merge current keys with origin key
mergedCheckedKeys = Array.from(new Set([].concat((0,toConsumableArray["default"])(prevKeys), (0,toConsumableArray["default"])(keys))));
} else {
const selectedKeysMap = groupKeysMap(keys);
// Remove current keys from origin keys
mergedCheckedKeys = prevKeys.filter(key => !selectedKeysMap.has(key));
}
handleSelectChange(direction, mergedCheckedKeys);
return mergedCheckedKeys;
});
setPrevSelectedIndex(direction, null);
};
const onLeftItemSelectAll = (keys, checkAll) => {
onItemSelectAll('left', keys, checkAll);
};
const onRightItemSelectAll = (keys, checkAll) => {
onItemSelectAll('right', keys, checkAll);
};
const leftFilter = e => onSearch === null || onSearch === void 0 ? void 0 : onSearch('left', e.target.value);
const rightFilter = e => onSearch === null || onSearch === void 0 ? void 0 : onSearch('right', e.target.value);
const handleLeftClear = () => onSearch === null || onSearch === void 0 ? void 0 : onSearch('left', '');
const handleRightClear = () => onSearch === null || onSearch === void 0 ? void 0 : onSearch('right', '');
const handleSingleSelect = (direction, holder, selectedKey, checked, currentSelectedIndex) => {
const isSelected = holder.has(selectedKey);
if (isSelected) {
holder.delete(selectedKey);
setPrevSelectedIndex(direction, null);
}
if (checked) {
holder.add(selectedKey);
setPrevSelectedIndex(direction, currentSelectedIndex);
}
};
const handleMultipleSelect = (direction, data, holder, currentSelectedIndex) => {
const isLeftDirection = direction === 'left';
const multipleSelect = isLeftDirection ? leftMultipleSelect : rightMultipleSelect;
multipleSelect(currentSelectedIndex, data, holder);
};
const onItemSelect = (direction, selectedKey, checked, multiple) => {
const isLeftDirection = direction === 'left';
const holder = (0,toConsumableArray["default"])(isLeftDirection ? sourceSelectedKeys : targetSelectedKeys);
const holderSet = new Set(holder);
const data = (0,toConsumableArray["default"])(isLeftDirection ? leftDataSource : rightDataSource).filter(item => !(item === null || item === void 0 ? void 0 : item.disabled));
const currentSelectedIndex = data.findIndex(item => item.key === selectedKey);
// multiple select by hold down the shift key
if (multiple && holder.length > 0) {
handleMultipleSelect(direction, data, holderSet, currentSelectedIndex);
} else {
handleSingleSelect(direction, holderSet, selectedKey, checked, currentSelectedIndex);
}
const holderArr = Array.from(holderSet);
handleSelectChange(direction, holderArr);
if (!props.selectedKeys) {
setStateKeys(direction, holderArr);
}
};
const onLeftItemSelect = (selectedKey, checked, e) => {
onItemSelect('left', selectedKey, checked, e === null || e === void 0 ? void 0 : e.shiftKey);
};
const onRightItemSelect = (selectedKey, checked, e) => {
onItemSelect('right', selectedKey, checked, e === null || e === void 0 ? void 0 : e.shiftKey);
};
const onRightItemRemove = keys => {
setStateKeys('right', []);
onChange === null || onChange === void 0 ? void 0 : onChange(targetKeys.filter(key => !keys.includes(key)), 'left', (0,toConsumableArray["default"])(keys));
};
const handleListStyle = direction => {
if (typeof listStyle === 'function') {
return listStyle({
direction
});
}
return listStyle || {};
};
const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
const {
hasFeedback,
status
} = formItemContext;
const getLocale = transferLocale => Object.assign(Object.assign(Object.assign({}, transferLocale), {
notFoundContent: (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Transfer')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(defaultRenderEmpty, {
componentName: "Transfer"
})
}), locale);
const mergedStatus = getMergedStatus(status, customStatus);
const mergedPagination = !children && pagination;
const leftActive = rightDataSource.filter(d => targetSelectedKeys.includes(d.key) && !d.disabled).length > 0;
const rightActive = leftDataSource.filter(d => sourceSelectedKeys.includes(d.key) && !d.disabled).length > 0;
const cls = classnames_default()(prefixCls, {
[`${prefixCls}-disabled`]: disabled,
[`${prefixCls}-customize-list`]: !!children,
[`${prefixCls}-rtl`]: dir === 'rtl'
}, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), transfer === null || transfer === void 0 ? void 0 : transfer.className, className, rootClassName, hashId, cssVarCls);
const [contextLocale] = (0,useLocale["default"])('Transfer', en_US["default"].Transfer);
const listLocale = getLocale(contextLocale);
const [leftTitle, rightTitle] = getTitles(listLocale);
const mergedSelectionsIcon = selectionsIcon !== null && selectionsIcon !== void 0 ? selectionsIcon : transfer === null || transfer === void 0 ? void 0 : transfer.selectionsIcon;
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: cls,
style: Object.assign(Object.assign({}, transfer === null || transfer === void 0 ? void 0 : transfer.style), style)
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(transfer_list, Object.assign({
prefixCls: `${prefixCls}-list`,
titleText: leftTitle,
dataSource: leftDataSource,
filterOption: filterOption,
style: handleListStyle('left'),
checkedKeys: sourceSelectedKeys,
handleFilter: leftFilter,
handleClear: handleLeftClear,
onItemSelect: onLeftItemSelect,
onItemSelectAll: onLeftItemSelectAll,
render: render,
showSearch: showSearch,
renderList: children,
footer: footer,
onScroll: handleLeftScroll,
disabled: disabled,
direction: dir === 'rtl' ? 'right' : 'left',
showSelectAll: showSelectAll,
selectAllLabel: selectAllLabels[0],
pagination: mergedPagination,
selectionsIcon: mergedSelectionsIcon
}, listLocale)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(operation, {
className: `${prefixCls}-operation`,
rightActive: rightActive,
rightArrowText: operations[0],
moveToRight: moveToRight,
leftActive: leftActive,
leftArrowText: operations[1],
moveToLeft: moveToLeft,
style: operationStyle,
disabled: disabled,
direction: dir,
oneWay: oneWay
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(transfer_list, Object.assign({
prefixCls: `${prefixCls}-list`,
titleText: rightTitle,
dataSource: rightDataSource,
filterOption: filterOption,
style: handleListStyle('right'),
checkedKeys: targetSelectedKeys,
handleFilter: rightFilter,
handleClear: handleRightClear,
onItemSelect: onRightItemSelect,
onItemSelectAll: onRightItemSelectAll,
onItemRemove: onRightItemRemove,
render: render,
showSearch: showSearch,
renderList: children,
footer: footer,
onScroll: handleRightScroll,
disabled: disabled,
direction: dir === 'rtl' ? 'left' : 'right',
showSelectAll: showSelectAll,
selectAllLabel: selectAllLabels[1],
showRemove: oneWay,
pagination: mergedPagination,
selectionsIcon: mergedSelectionsIcon
}, listLocale))));
};
if (true) {
Transfer.displayName = 'Transfer';
}
Transfer.List = transfer_list;
Transfer.Search = transfer_search;
Transfer.Operation = operation;
/* harmony default export */ var transfer = (Transfer);
;// ./node_modules/rc-tree-select/es/hooks/useCache.js
/**
* This function will try to call requestIdleCallback if available to save performance.
* No need `getLabel` here since already fetch on `rawLabeledValue`.
*/
/* harmony default export */ var hooks_useCache = (function (values) {
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
valueLabels: new Map()
});
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var valueLabels = cacheRef.current.valueLabels;
var valueLabelsCache = new Map();
var filledValues = values.map(function (item) {
var value = item.value,
label = item.label;
var mergedLabel = label !== null && label !== void 0 ? label : valueLabels.get(value);
// Save in cache
valueLabelsCache.set(value, mergedLabel);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
label: mergedLabel
});
});
cacheRef.current.valueLabels = valueLabelsCache;
return [filledValues];
}, [values]);
});
;// ./node_modules/rc-tree-select/es/hooks/useCheckedKeys.js
var useCheckedKeys = function useCheckedKeys(rawLabeledValues, rawHalfCheckedValues, treeConduction, keyEntities) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var extractValues = function extractValues(values) {
return values.map(function (_ref) {
var value = _ref.value;
return value;
});
};
var checkedKeys = extractValues(rawLabeledValues);
var halfCheckedKeys = extractValues(rawHalfCheckedValues);
var missingValues = checkedKeys.filter(function (key) {
return !keyEntities[key];
});
var finalCheckedKeys = checkedKeys;
var finalHalfCheckedKeys = halfCheckedKeys;
if (treeConduction) {
var conductResult = conductCheck(checkedKeys, true, keyEntities);
finalCheckedKeys = conductResult.checkedKeys;
finalHalfCheckedKeys = conductResult.halfCheckedKeys;
}
return [Array.from(new Set([].concat((0,toConsumableArray["default"])(missingValues), (0,toConsumableArray["default"])(finalCheckedKeys)))), finalHalfCheckedKeys];
}, [rawLabeledValues, rawHalfCheckedValues, treeConduction, keyEntities]);
};
/* harmony default export */ var hooks_useCheckedKeys = (useCheckedKeys);
;// ./node_modules/rc-tree-select/es/utils/valueUtil.js
var utils_valueUtil_toArray = function toArray(value) {
return Array.isArray(value) ? value : value !== undefined ? [value] : [];
};
var valueUtil_fillFieldNames = function fillFieldNames(fieldNames) {
var _ref = fieldNames || {},
label = _ref.label,
value = _ref.value,
children = _ref.children;
return {
_title: label ? [label] : ['title', 'label'],
value: value || 'value',
key: value || 'value',
children: children || 'children'
};
};
var valueUtil_isCheckDisabled = function isCheckDisabled(node) {
return !node || node.disabled || node.disableCheckbox || node.checkable === false;
};
var getAllKeys = function getAllKeys(treeData, fieldNames) {
var keys = [];
var dig = function dig(list) {
list.forEach(function (item) {
var children = item[fieldNames.children];
if (children) {
keys.push(item[fieldNames.value]);
dig(children);
}
});
};
dig(treeData);
return keys;
};
var isNil = function isNil(val) {
return val === null || val === undefined;
};
;// ./node_modules/rc-tree-select/es/hooks/useDataEntities.js
/* harmony default export */ var useDataEntities = (function (treeData, fieldNames) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var collection = convertDataToEntities(treeData, {
fieldNames: fieldNames,
initWrapper: function initWrapper(wrapper) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, wrapper), {}, {
valueEntities: new Map()
});
},
processEntity: function processEntity(entity, wrapper) {
var val = entity.node[fieldNames.value];
// Check if exist same value
if (true) {
var key = entity.node.key;
(0,warning["default"])(!isNil(val), 'TreeNode `value` is invalidate: undefined');
(0,warning["default"])(!wrapper.valueEntities.has(val), "Same `value` exist in the tree: ".concat(val));
(0,warning["default"])(!key || String(key) === String(val), "`key` or `value` with TreeNode must be the same or you can remove one of them. key: ".concat(key, ", value: ").concat(val, "."));
}
wrapper.valueEntities.set(val, entity);
}
});
return collection;
}, [treeData, fieldNames]);
});
;// ./node_modules/rc-tree-select/es/TreeNode.js
/* istanbul ignore file */
/** This is a placeholder, not real render in dom */
var TreeNode_TreeNode = function TreeNode() {
return null;
};
/* harmony default export */ var rc_tree_select_es_TreeNode = (TreeNode_TreeNode);
;// ./node_modules/rc-tree-select/es/utils/legacyUtil.js
var es_utils_legacyUtil_excluded = ["children", "value"];
function legacyUtil_convertChildrenToData(nodes) {
return (0,toArray["default"])(nodes).map(function (node) {
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node) || !node.type) {
return null;
}
var _ref = node,
key = _ref.key,
_ref$props = _ref.props,
children = _ref$props.children,
value = _ref$props.value,
restProps = (0,objectWithoutProperties["default"])(_ref$props, es_utils_legacyUtil_excluded);
var data = (0,objectSpread2["default"])({
key: key,
value: value
}, restProps);
var childData = legacyUtil_convertChildrenToData(children);
if (childData.length) {
data.children = childData;
}
return data;
}).filter(function (data) {
return data;
});
}
function fillLegacyProps(dataNode) {
if (!dataNode) {
return dataNode;
}
var cloneNode = (0,objectSpread2["default"])({}, dataNode);
if (!('props' in cloneNode)) {
Object.defineProperty(cloneNode, 'props', {
get: function get() {
(0,warning["default"])(false, 'New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access.');
return cloneNode;
}
});
}
return cloneNode;
}
function fillAdditionalInfo(extra, triggerValue, checkedValues, treeData, showPosition, fieldNames) {
var triggerNode = null;
var nodeList = null;
function generateMap() {
function dig(list) {
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0';
var parentIncluded = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return list.map(function (option, index) {
var pos = "".concat(level, "-").concat(index);
var value = option[fieldNames.value];
var included = checkedValues.includes(value);
var children = dig(option[fieldNames.children] || [], pos, included);
var node = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tree_select_es_TreeNode, option, children.map(function (child) {
return child.node;
}));
// Link with trigger node
if (triggerValue === value) {
triggerNode = node;
}
if (included) {
var checkedNode = {
pos: pos,
node: node,
children: children
};
if (!parentIncluded) {
nodeList.push(checkedNode);
}
return checkedNode;
}
return null;
}).filter(function (node) {
return node;
});
}
if (!nodeList) {
nodeList = [];
dig(treeData);
// Sort to keep the checked node length
nodeList.sort(function (_ref2, _ref3) {
var val1 = _ref2.node.props.value;
var val2 = _ref3.node.props.value;
var index1 = checkedValues.indexOf(val1);
var index2 = checkedValues.indexOf(val2);
return index1 - index2;
});
}
}
Object.defineProperty(extra, 'triggerNode', {
get: function get() {
(0,warning["default"])(false, '`triggerNode` is deprecated. Please consider decoupling data with node.');
generateMap();
return triggerNode;
}
});
Object.defineProperty(extra, 'allCheckedNodes', {
get: function get() {
(0,warning["default"])(false, '`allCheckedNodes` is deprecated. Please consider decoupling data with node.');
generateMap();
if (showPosition) {
return nodeList;
}
return nodeList.map(function (_ref4) {
var node = _ref4.node;
return node;
});
}
});
}
;// ./node_modules/rc-tree-select/es/hooks/useFilterTreeData.js
var useFilterTreeData = function useFilterTreeData(treeData, searchValue, options) {
var fieldNames = options.fieldNames,
treeNodeFilterProp = options.treeNodeFilterProp,
filterTreeNode = options.filterTreeNode;
var fieldChildren = fieldNames.children;
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!searchValue || filterTreeNode === false) {
return treeData;
}
var filterOptionFunc = typeof filterTreeNode === 'function' ? filterTreeNode : function (_, dataNode) {
return String(dataNode[treeNodeFilterProp]).toUpperCase().includes(searchValue.toUpperCase());
};
var filterTreeNodes = function filterTreeNodes(nodes) {
var keepAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return nodes.reduce(function (filtered, node) {
var children = node[fieldChildren];
var isMatch = keepAll || filterOptionFunc(searchValue, fillLegacyProps(node));
var filteredChildren = filterTreeNodes(children || [], isMatch);
if (isMatch || filteredChildren.length) {
filtered.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, node), {}, (0,defineProperty["default"])({
isLeaf: undefined
}, fieldChildren, filteredChildren)));
}
return filtered;
}, []);
};
return filterTreeNodes(treeData);
}, [treeData, searchValue, fieldChildren, treeNodeFilterProp, filterTreeNode]);
};
/* harmony default export */ var hooks_useFilterTreeData = (useFilterTreeData);
;// ./node_modules/rc-tree-select/es/hooks/useRefFunc.js
/**
* Same as `React.useCallback` but always return a memoized function
* but redirect to real function.
*/
function useRefFunc_useRefFunc(callback) {
var funcRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
funcRef.current = callback;
var cacheFn = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
return funcRef.current.apply(funcRef, arguments);
}, []);
return cacheFn;
}
;// ./node_modules/rc-tree-select/es/hooks/useTreeData.js
function buildTreeStructure(nodes, config) {
var id = config.id,
pId = config.pId,
rootPId = config.rootPId;
var nodeMap = new Map();
var rootNodes = [];
nodes.forEach(function (node) {
var nodeKey = node[id];
var clonedNode = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, node), {}, {
key: node.key || nodeKey
});
nodeMap.set(nodeKey, clonedNode);
});
nodeMap.forEach(function (node) {
var parentKey = node[pId];
var parent = nodeMap.get(parentKey);
if (parent) {
parent.children = parent.children || [];
parent.children.push(node);
} else if (parentKey === rootPId || rootPId === null) {
rootNodes.push(node);
}
});
return rootNodes;
}
/**
* 将 `treeData` 或 `children` 转换为格式化的 `treeData`。
* 如果 `treeData` 或 `children` 没有变化,则不会重新计算。
*/
function useTreeData(treeData, children, simpleMode) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (treeData) {
if (simpleMode) {
var config = (0,objectSpread2["default"])({
id: 'id',
pId: 'pId',
rootPId: null
}, (0,esm_typeof["default"])(simpleMode) === 'object' ? simpleMode : {});
return buildTreeStructure(treeData, config);
}
return treeData;
}
return legacyUtil_convertChildrenToData(children);
}, [children, simpleMode, treeData]);
}
;// ./node_modules/rc-tree-select/es/LegacyContext.js
var LegacySelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var LegacyContext = (LegacySelectContext);
;// ./node_modules/rc-tree-select/es/TreeSelectContext.js
var TreeSelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
/* harmony default export */ var es_TreeSelectContext = (TreeSelectContext);
;// ./node_modules/rc-tree-select/es/OptionList.js
var OptionList_HIDDEN_STYLE = {
width: 0,
height: 0,
display: 'flex',
overflow: 'hidden',
opacity: 0,
border: 0,
padding: 0,
margin: 0
};
var OptionList_OptionList = function OptionList(_, ref) {
var _useBaseProps = useBaseProps(),
prefixCls = _useBaseProps.prefixCls,
multiple = _useBaseProps.multiple,
searchValue = _useBaseProps.searchValue,
toggleOpen = _useBaseProps.toggleOpen,
open = _useBaseProps.open,
notFoundContent = _useBaseProps.notFoundContent;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_TreeSelectContext),
virtual = _React$useContext.virtual,
listHeight = _React$useContext.listHeight,
listItemHeight = _React$useContext.listItemHeight,
listItemScrollOffset = _React$useContext.listItemScrollOffset,
treeData = _React$useContext.treeData,
fieldNames = _React$useContext.fieldNames,
onSelect = _React$useContext.onSelect,
dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth,
treeExpandAction = _React$useContext.treeExpandAction,
treeTitleRender = _React$useContext.treeTitleRender,
onPopupScroll = _React$useContext.onPopupScroll,
leftMaxCount = _React$useContext.leftMaxCount,
leafCountOnly = _React$useContext.leafCountOnly,
valueEntities = _React$useContext.valueEntities;
var _React$useContext2 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(LegacyContext),
checkable = _React$useContext2.checkable,
checkedKeys = _React$useContext2.checkedKeys,
halfCheckedKeys = _React$useContext2.halfCheckedKeys,
treeExpandedKeys = _React$useContext2.treeExpandedKeys,
treeDefaultExpandAll = _React$useContext2.treeDefaultExpandAll,
treeDefaultExpandedKeys = _React$useContext2.treeDefaultExpandedKeys,
onTreeExpand = _React$useContext2.onTreeExpand,
treeIcon = _React$useContext2.treeIcon,
showTreeIcon = _React$useContext2.showTreeIcon,
switcherIcon = _React$useContext2.switcherIcon,
treeLine = _React$useContext2.treeLine,
treeNodeFilterProp = _React$useContext2.treeNodeFilterProp,
loadData = _React$useContext2.loadData,
treeLoadedKeys = _React$useContext2.treeLoadedKeys,
treeMotion = _React$useContext2.treeMotion,
onTreeLoad = _React$useContext2.onTreeLoad,
keyEntities = _React$useContext2.keyEntities;
var treeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var memoTreeData = (0,useMemo["default"])(function () {
return treeData;
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[open, treeData], function (prev, next) {
return next[0] && prev[1] !== next[1];
});
// ========================== Values ==========================
var mergedCheckedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!checkable) {
return null;
}
return {
checked: checkedKeys,
halfChecked: halfCheckedKeys
};
}, [checkable, checkedKeys, halfCheckedKeys]);
// ========================== Scroll ==========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
// Single mode should scroll to current key
if (open && !multiple && checkedKeys.length) {
var _treeRef$current;
(_treeRef$current = treeRef.current) === null || _treeRef$current === void 0 || _treeRef$current.scrollTo({
key: checkedKeys[0]
});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [open]);
// ========================== Events ==========================
var onListMouseDown = function onListMouseDown(event) {
event.preventDefault();
};
var onInternalSelect = function onInternalSelect(__, info) {
var node = info.node;
if (checkable && valueUtil_isCheckDisabled(node)) {
return;
}
onSelect(node.key, {
selected: !checkedKeys.includes(node.key)
});
if (!multiple) {
toggleOpen(false);
}
};
// =========================== Keys ===========================
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(treeDefaultExpandedKeys),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
expandedKeys = _React$useState2[0],
setExpandedKeys = _React$useState2[1];
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
searchExpandedKeys = _React$useState4[0],
setSearchExpandedKeys = _React$useState4[1];
var mergedExpandedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (treeExpandedKeys) {
return (0,toConsumableArray["default"])(treeExpandedKeys);
}
return searchValue ? searchExpandedKeys : expandedKeys;
}, [expandedKeys, searchExpandedKeys, treeExpandedKeys, searchValue]);
var onInternalExpand = function onInternalExpand(keys) {
setExpandedKeys(keys);
setSearchExpandedKeys(keys);
if (onTreeExpand) {
onTreeExpand(keys);
}
};
// ========================== Search ==========================
var lowerSearchValue = String(searchValue).toLowerCase();
var filterTreeNode = function filterTreeNode(treeNode) {
if (!lowerSearchValue) {
return false;
}
return String(treeNode[treeNodeFilterProp]).toLowerCase().includes(lowerSearchValue);
};
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (searchValue) {
setSearchExpandedKeys(getAllKeys(treeData, fieldNames));
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchValue]);
// ========================= Disabled =========================
// Cache disabled states in React state to ensure re-render when cache updates
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
return new Map();
}),
_React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
disabledCache = _React$useState6[0],
setDisabledCache = _React$useState6[1];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (leftMaxCount) {
setDisabledCache(new Map());
}
}, [leftMaxCount]);
function getDisabledWithCache(node) {
var value = node[fieldNames.value];
if (!disabledCache.has(value)) {
var entity = valueEntities.get(value);
var isLeaf = (entity.children || []).length === 0;
if (!isLeaf) {
var checkableChildren = entity.children.filter(function (childTreeNode) {
return !childTreeNode.node.disabled && !childTreeNode.node.disableCheckbox && !checkedKeys.includes(childTreeNode.node[fieldNames.value]);
});
var checkableChildrenCount = checkableChildren.length;
disabledCache.set(value, checkableChildrenCount > leftMaxCount);
} else {
disabledCache.set(value, false);
}
}
return disabledCache.get(value);
}
var nodeDisabled = (0,rc_util_es.useEvent)(function (node) {
var nodeValue = node[fieldNames.value];
if (checkedKeys.includes(nodeValue)) {
return false;
}
if (leftMaxCount === null) {
return false;
}
if (leftMaxCount <= 0) {
return true;
}
// This is a low performance calculation
if (leafCountOnly && leftMaxCount) {
return getDisabledWithCache(node);
}
return false;
});
// ========================== Get First Selectable Node ==========================
var getFirstMatchingNode = function getFirstMatchingNode(nodes) {
var _iterator = _createForOfIteratorHelper(nodes),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var node = _step.value;
if (node.disabled || node.selectable === false) {
continue;
}
if (searchValue) {
if (filterTreeNode(node)) {
return node;
}
} else {
return node;
}
if (node[fieldNames.children]) {
var matchInChildren = getFirstMatchingNode(node[fieldNames.children]);
if (matchInChildren) {
return matchInChildren;
}
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return null;
};
// ========================== Active ==========================
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
_React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
activeKey = _React$useState8[0],
setActiveKey = _React$useState8[1];
var activeEntity = keyEntities[activeKey];
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!open) {
return;
}
var nextActiveKey = null;
var getFirstNode = function getFirstNode() {
var firstNode = getFirstMatchingNode(memoTreeData);
return firstNode ? firstNode[fieldNames.value] : null;
};
// single mode active first checked node
if (!multiple && checkedKeys.length && !searchValue) {
nextActiveKey = checkedKeys[0];
} else {
nextActiveKey = getFirstNode();
}
setActiveKey(nextActiveKey);
}, [open, searchValue]);
// ========================= Keyboard =========================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
var _treeRef$current2;
return {
scrollTo: (_treeRef$current2 = treeRef.current) === null || _treeRef$current2 === void 0 ? void 0 : _treeRef$current2.scrollTo,
onKeyDown: function onKeyDown(event) {
var _treeRef$current3;
var which = event.which;
switch (which) {
// >>> Arrow keys
case KeyCode["default"].UP:
case KeyCode["default"].DOWN:
case KeyCode["default"].LEFT:
case KeyCode["default"].RIGHT:
(_treeRef$current3 = treeRef.current) === null || _treeRef$current3 === void 0 || _treeRef$current3.onKeyDown(event);
break;
// >>> Select item
case KeyCode["default"].ENTER:
{
if (activeEntity) {
var isNodeDisabled = nodeDisabled(activeEntity.node);
var _ref = (activeEntity === null || activeEntity === void 0 ? void 0 : activeEntity.node) || {},
selectable = _ref.selectable,
value = _ref.value,
disabled = _ref.disabled;
if (selectable !== false && !disabled && !isNodeDisabled) {
onInternalSelect(null, {
node: {
key: activeKey
},
selected: !checkedKeys.includes(value)
});
}
}
break;
}
// >>> Close
case KeyCode["default"].ESC:
{
toggleOpen(false);
}
}
},
onKeyUp: function onKeyUp() {}
};
});
var hasLoadDataFn = (0,useMemo["default"])(function () {
return searchValue ? false : true;
}, [searchValue, treeExpandedKeys || expandedKeys], function (_ref2, _ref3) {
var _ref4 = (0,slicedToArray["default"])(_ref2, 1),
preSearchValue = _ref4[0];
var _ref5 = (0,slicedToArray["default"])(_ref3, 2),
nextSearchValue = _ref5[0],
nextExcludeSearchExpandedKeys = _ref5[1];
return preSearchValue !== nextSearchValue && !!(nextSearchValue || nextExcludeSearchExpandedKeys);
});
var syncLoadData = hasLoadDataFn ? loadData : null;
// ========================== Render ==========================
if (memoTreeData.length === 0) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
role: "listbox",
className: "".concat(prefixCls, "-empty"),
onMouseDown: onListMouseDown
}, notFoundContent);
}
var treeProps = {
fieldNames: fieldNames
};
if (treeLoadedKeys) {
treeProps.loadedKeys = treeLoadedKeys;
}
if (mergedExpandedKeys) {
treeProps.expandedKeys = mergedExpandedKeys;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
onMouseDown: onListMouseDown
}, activeEntity && open && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: OptionList_HIDDEN_STYLE,
"aria-live": "assertive"
}, activeEntity.node.value), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(contextTypes_UnstableContext.Provider, {
value: {
nodeDisabled: nodeDisabled
}
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tree_es, (0,esm_extends["default"])({
ref: treeRef,
focusable: false,
prefixCls: "".concat(prefixCls, "-tree"),
treeData: memoTreeData,
height: listHeight,
itemHeight: listItemHeight,
itemScrollOffset: listItemScrollOffset,
virtual: virtual !== false && dropdownMatchSelectWidth !== false,
multiple: multiple,
icon: treeIcon,
showIcon: showTreeIcon,
switcherIcon: switcherIcon,
showLine: treeLine,
loadData: syncLoadData,
motion: treeMotion,
activeKey: activeKey
// We handle keys by out instead tree self
,
checkable: checkable,
checkStrictly: true,
checkedKeys: mergedCheckedKeys,
selectedKeys: !checkable ? checkedKeys : [],
defaultExpandAll: treeDefaultExpandAll,
titleRender: treeTitleRender
}, treeProps, {
// Proxy event out
onActiveChange: setActiveKey,
onSelect: onInternalSelect,
onCheck: onInternalSelect,
onExpand: onInternalExpand,
onLoad: onTreeLoad,
filterTreeNode: filterTreeNode,
expandAction: treeExpandAction,
onScroll: onPopupScroll
}))));
};
var es_OptionList_RefOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(OptionList_OptionList);
if (true) {
es_OptionList_RefOptionList.displayName = 'OptionList';
}
/* harmony default export */ var rc_tree_select_es_OptionList = (es_OptionList_RefOptionList);
;// ./node_modules/rc-tree-select/es/utils/strategyUtil.js
var SHOW_ALL = 'SHOW_ALL';
var strategyUtil_SHOW_PARENT = 'SHOW_PARENT';
var strategyUtil_SHOW_CHILD = 'SHOW_CHILD';
function strategyUtil_formatStrategyValues(values, strategy, keyEntities, fieldNames) {
var valueSet = new Set(values);
if (strategy === strategyUtil_SHOW_CHILD) {
return values.filter(function (key) {
var entity = keyEntities[key];
return !entity || !entity.children || !entity.children.some(function (_ref) {
var node = _ref.node;
return valueSet.has(node[fieldNames.value]);
}) || !entity.children.every(function (_ref2) {
var node = _ref2.node;
return valueUtil_isCheckDisabled(node) || valueSet.has(node[fieldNames.value]);
});
});
}
if (strategy === strategyUtil_SHOW_PARENT) {
return values.filter(function (key) {
var entity = keyEntities[key];
var parent = entity ? entity.parent : null;
return !parent || valueUtil_isCheckDisabled(parent.node) || !valueSet.has(parent.key);
});
}
return values;
}
;// ./node_modules/rc-tree-select/es/utils/warningPropsUtil.js
function utils_warningPropsUtil_warningProps(props) {
var searchPlaceholder = props.searchPlaceholder,
treeCheckStrictly = props.treeCheckStrictly,
treeCheckable = props.treeCheckable,
labelInValue = props.labelInValue,
value = props.value,
multiple = props.multiple,
showCheckedStrategy = props.showCheckedStrategy,
maxCount = props.maxCount;
(0,warning["default"])(!searchPlaceholder, '`searchPlaceholder` has been removed.');
if (treeCheckStrictly && labelInValue === false) {
(0,warning["default"])(false, '`treeCheckStrictly` will force set `labelInValue` to `true`.');
}
if (labelInValue || treeCheckStrictly) {
(0,warning["default"])(utils_valueUtil_toArray(value).every(function (val) {
return val && (0,esm_typeof["default"])(val) === 'object' && 'value' in val;
}), 'Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead.');
}
if (treeCheckStrictly || multiple || treeCheckable) {
(0,warning["default"])(!value || Array.isArray(value), '`value` should be an array when `TreeSelect` is checkable or multiple.');
} else {
(0,warning["default"])(!Array.isArray(value), '`value` should not be array when `TreeSelect` is single mode.');
}
if (maxCount && (showCheckedStrategy === 'SHOW_ALL' && !treeCheckStrictly || showCheckedStrategy === 'SHOW_PARENT')) {
(0,warning["default"])(false, '`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.');
}
}
/* harmony default export */ var es_utils_warningPropsUtil = (utils_warningPropsUtil_warningProps);
;// ./node_modules/rc-tree-select/es/TreeSelect.js
var TreeSelect_excluded = ["id", "prefixCls", "value", "defaultValue", "onChange", "onSelect", "onDeselect", "searchValue", "inputValue", "onSearch", "autoClearSearchValue", "filterTreeNode", "treeNodeFilterProp", "showCheckedStrategy", "treeNodeLabelProp", "multiple", "treeCheckable", "treeCheckStrictly", "labelInValue", "maxCount", "fieldNames", "treeDataSimpleMode", "treeData", "children", "loadData", "treeLoadedKeys", "onTreeLoad", "treeDefaultExpandAll", "treeExpandedKeys", "treeDefaultExpandedKeys", "onTreeExpand", "treeExpandAction", "virtual", "listHeight", "listItemHeight", "listItemScrollOffset", "onDropdownVisibleChange", "dropdownMatchSelectWidth", "treeLine", "treeIcon", "showTreeIcon", "switcherIcon", "treeMotion", "treeTitleRender", "onPopupScroll"];
function TreeSelect_isRawValue(value) {
return !value || (0,esm_typeof["default"])(value) !== 'object';
}
var TreeSelect = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var id = props.id,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-tree-select' : _props$prefixCls,
value = props.value,
defaultValue = props.defaultValue,
onChange = props.onChange,
onSelect = props.onSelect,
onDeselect = props.onDeselect,
searchValue = props.searchValue,
inputValue = props.inputValue,
onSearch = props.onSearch,
_props$autoClearSearc = props.autoClearSearchValue,
autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
filterTreeNode = props.filterTreeNode,
_props$treeNodeFilter = props.treeNodeFilterProp,
treeNodeFilterProp = _props$treeNodeFilter === void 0 ? 'value' : _props$treeNodeFilter,
showCheckedStrategy = props.showCheckedStrategy,
treeNodeLabelProp = props.treeNodeLabelProp,
multiple = props.multiple,
treeCheckable = props.treeCheckable,
treeCheckStrictly = props.treeCheckStrictly,
labelInValue = props.labelInValue,
maxCount = props.maxCount,
fieldNames = props.fieldNames,
treeDataSimpleMode = props.treeDataSimpleMode,
treeData = props.treeData,
children = props.children,
loadData = props.loadData,
treeLoadedKeys = props.treeLoadedKeys,
onTreeLoad = props.onTreeLoad,
treeDefaultExpandAll = props.treeDefaultExpandAll,
treeExpandedKeys = props.treeExpandedKeys,
treeDefaultExpandedKeys = props.treeDefaultExpandedKeys,
onTreeExpand = props.onTreeExpand,
treeExpandAction = props.treeExpandAction,
virtual = props.virtual,
_props$listHeight = props.listHeight,
listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,
_props$listItemHeight = props.listItemHeight,
listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,
_props$listItemScroll = props.listItemScrollOffset,
listItemScrollOffset = _props$listItemScroll === void 0 ? 0 : _props$listItemScroll,
onDropdownVisibleChange = props.onDropdownVisibleChange,
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
treeLine = props.treeLine,
treeIcon = props.treeIcon,
showTreeIcon = props.showTreeIcon,
switcherIcon = props.switcherIcon,
treeMotion = props.treeMotion,
treeTitleRender = props.treeTitleRender,
onPopupScroll = props.onPopupScroll,
restProps = (0,objectWithoutProperties["default"])(props, TreeSelect_excluded);
var mergedId = useId_useId(id);
var treeConduction = treeCheckable && !treeCheckStrictly;
var mergedCheckable = treeCheckable || treeCheckStrictly;
var mergedLabelInValue = treeCheckStrictly || labelInValue;
var mergedMultiple = mergedCheckable || multiple;
var _useMergedState = (0,useMergedState["default"])(defaultValue, {
value: value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
internalValue = _useMergedState2[0],
setInternalValue = _useMergedState2[1];
// `multiple` && `!treeCheckable` should be show all
var mergedShowCheckedStrategy = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (!treeCheckable) {
return SHOW_ALL;
}
return showCheckedStrategy || strategyUtil_SHOW_CHILD;
}, [showCheckedStrategy, treeCheckable]);
// ========================== Warning ===========================
if (true) {
es_utils_warningPropsUtil(props);
}
// ========================= FieldNames =========================
var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return valueUtil_fillFieldNames(fieldNames);
}, /* eslint-disable react-hooks/exhaustive-deps */
[JSON.stringify(fieldNames)]
/* eslint-enable react-hooks/exhaustive-deps */);
// =========================== Search ===========================
var _useMergedState3 = (0,useMergedState["default"])('', {
value: searchValue !== undefined ? searchValue : inputValue,
postState: function postState(search) {
return search || '';
}
}),
_useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
mergedSearchValue = _useMergedState4[0],
setSearchValue = _useMergedState4[1];
var onInternalSearch = function onInternalSearch(searchText) {
setSearchValue(searchText);
onSearch === null || onSearch === void 0 || onSearch(searchText);
};
// ============================ Data ============================
// `useTreeData` only do convert of `children` or `simpleMode`.
// Else will return origin `treeData` for perf consideration.
// Do not do anything to loop the data.
var mergedTreeData = useTreeData(treeData, children, treeDataSimpleMode);
var _useDataEntities = useDataEntities(mergedTreeData, mergedFieldNames),
keyEntities = _useDataEntities.keyEntities,
valueEntities = _useDataEntities.valueEntities;
/** Get `missingRawValues` which not exist in the tree yet */
var splitRawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (newRawValues) {
var missingRawValues = [];
var existRawValues = [];
// Keep missing value in the cache
newRawValues.forEach(function (val) {
if (valueEntities.has(val)) {
existRawValues.push(val);
} else {
missingRawValues.push(val);
}
});
return {
missingRawValues: missingRawValues,
existRawValues: existRawValues
};
}, [valueEntities]);
// Filtered Tree
var filteredTreeData = hooks_useFilterTreeData(mergedTreeData, mergedSearchValue, {
fieldNames: mergedFieldNames,
treeNodeFilterProp: treeNodeFilterProp,
filterTreeNode: filterTreeNode
});
// =========================== Label ============================
var getLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (item) {
if (item) {
if (treeNodeLabelProp) {
return item[treeNodeLabelProp];
}
// Loop from fieldNames
var titleList = mergedFieldNames._title;
for (var i = 0; i < titleList.length; i += 1) {
var title = item[titleList[i]];
if (title !== undefined) {
return title;
}
}
}
}, [mergedFieldNames, treeNodeLabelProp]);
// ========================= Wrap Value =========================
var toLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (draftValues) {
var values = utils_valueUtil_toArray(draftValues);
return values.map(function (val) {
if (TreeSelect_isRawValue(val)) {
return {
value: val
};
}
return val;
});
}, []);
var convert2LabelValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (draftValues) {
var values = toLabeledValues(draftValues);
return values.map(function (item) {
var rawLabel = item.label;
var rawValue = item.value,
rawHalfChecked = item.halfChecked;
var rawDisabled;
var entity = valueEntities.get(rawValue);
// Fill missing label & status
if (entity) {
var _rawLabel;
rawLabel = treeTitleRender ? treeTitleRender(entity.node) : (_rawLabel = rawLabel) !== null && _rawLabel !== void 0 ? _rawLabel : getLabel(entity.node);
rawDisabled = entity.node.disabled;
} else if (rawLabel === undefined) {
// We try to find in current `labelInValue` value
var labelInValueItem = toLabeledValues(internalValue).find(function (labeledItem) {
return labeledItem.value === rawValue;
});
rawLabel = labelInValueItem.label;
}
return {
label: rawLabel,
value: rawValue,
halfChecked: rawHalfChecked,
disabled: rawDisabled
};
});
}, [valueEntities, getLabel, toLabeledValues, internalValue]);
// =========================== Values ===========================
var rawMixedLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return toLabeledValues(internalValue === null ? [] : internalValue);
}, [toLabeledValues, internalValue]);
// Split value into full check and half check
var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var fullCheckValues = [];
var halfCheckValues = [];
rawMixedLabeledValues.forEach(function (item) {
if (item.halfChecked) {
halfCheckValues.push(item);
} else {
fullCheckValues.push(item);
}
});
return [fullCheckValues, halfCheckValues];
}, [rawMixedLabeledValues]),
_React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
rawLabeledValues = _React$useMemo2[0],
rawHalfLabeledValues = _React$useMemo2[1];
// const [mergedValues] = useCache(rawLabeledValues);
var rawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return rawLabeledValues.map(function (item) {
return item.value;
});
}, [rawLabeledValues]);
// Convert value to key. Will fill missed keys for conduct check.
var _useCheckedKeys = hooks_useCheckedKeys(rawLabeledValues, rawHalfLabeledValues, treeConduction, keyEntities),
_useCheckedKeys2 = (0,slicedToArray["default"])(_useCheckedKeys, 2),
rawCheckedValues = _useCheckedKeys2[0],
rawHalfCheckedValues = _useCheckedKeys2[1];
// Convert rawCheckedKeys to check strategy related values
var displayValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
// Collect keys which need to show
var displayKeys = strategyUtil_formatStrategyValues(rawCheckedValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);
// Convert to value and filled with label
var values = displayKeys.map(function (key) {
var _keyEntities$key$node, _keyEntities$key;
return (_keyEntities$key$node = (_keyEntities$key = keyEntities[key]) === null || _keyEntities$key === void 0 || (_keyEntities$key = _keyEntities$key.node) === null || _keyEntities$key === void 0 ? void 0 : _keyEntities$key[mergedFieldNames.value]) !== null && _keyEntities$key$node !== void 0 ? _keyEntities$key$node : key;
});
// Back fill with origin label
var labeledValues = values.map(function (val) {
var targetItem = rawLabeledValues.find(function (item) {
return item.value === val;
});
var label = labelInValue ? targetItem === null || targetItem === void 0 ? void 0 : targetItem.label : treeTitleRender === null || treeTitleRender === void 0 ? void 0 : treeTitleRender(targetItem);
return {
value: val,
label: label
};
});
var rawDisplayValues = convert2LabelValues(labeledValues);
var firstVal = rawDisplayValues[0];
if (!mergedMultiple && firstVal && isNil(firstVal.value) && isNil(firstVal.label)) {
return [];
}
return rawDisplayValues.map(function (item) {
var _item$label;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
label: (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : item.value
});
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [mergedFieldNames, mergedMultiple, rawCheckedValues, rawLabeledValues, convert2LabelValues, mergedShowCheckedStrategy, keyEntities]);
var _useCache = hooks_useCache(displayValues),
_useCache2 = (0,slicedToArray["default"])(_useCache, 1),
cachedDisplayValues = _useCache2[0];
// ========================== MaxCount ==========================
var mergedMaxCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
if (mergedMultiple && (mergedShowCheckedStrategy === 'SHOW_CHILD' || treeCheckStrictly || !treeCheckable)) {
return maxCount;
}
return null;
}, [maxCount, mergedMultiple, treeCheckStrictly, mergedShowCheckedStrategy, treeCheckable]);
// =========================== Change ===========================
var triggerChange = useRefFunc_useRefFunc(function (newRawValues, extra, source) {
var formattedKeyList = strategyUtil_formatStrategyValues(newRawValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);
// Not allow pass with `maxCount`
if (mergedMaxCount && formattedKeyList.length > mergedMaxCount) {
return;
}
var labeledValues = convert2LabelValues(newRawValues);
setInternalValue(labeledValues);
// Clean up if needed
if (autoClearSearchValue) {
setSearchValue('');
}
// Generate rest parameters is costly, so only do it when necessary
if (onChange) {
var eventValues = newRawValues;
if (treeConduction) {
eventValues = formattedKeyList.map(function (key) {
var entity = valueEntities.get(key);
return entity ? entity.node[mergedFieldNames.value] : key;
});
}
var _ref = extra || {
triggerValue: undefined,
selected: undefined
},
triggerValue = _ref.triggerValue,
selected = _ref.selected;
var returnRawValues = eventValues;
// We need fill half check back
if (treeCheckStrictly) {
var halfValues = rawHalfLabeledValues.filter(function (item) {
return !eventValues.includes(item.value);
});
returnRawValues = [].concat((0,toConsumableArray["default"])(returnRawValues), (0,toConsumableArray["default"])(halfValues));
}
var returnLabeledValues = convert2LabelValues(returnRawValues);
var additionalInfo = {
// [Legacy] Always return as array contains label & value
preValue: rawLabeledValues,
triggerValue: triggerValue
};
// [Legacy] Fill legacy data if user query.
// This is expansive that we only fill when user query
// https://github.com/react-component/tree-select/blob/fe33eb7c27830c9ac70cd1fdb1ebbe7bc679c16a/src/Select.jsx
var showPosition = true;
if (treeCheckStrictly || source === 'selection' && !selected) {
showPosition = false;
}
fillAdditionalInfo(additionalInfo, triggerValue, newRawValues, mergedTreeData, showPosition, mergedFieldNames);
if (mergedCheckable) {
additionalInfo.checked = selected;
} else {
additionalInfo.selected = selected;
}
var returnValues = mergedLabelInValue ? returnLabeledValues : returnLabeledValues.map(function (item) {
return item.value;
});
onChange(mergedMultiple ? returnValues : returnValues[0], mergedLabelInValue ? null : returnLabeledValues.map(function (item) {
return item.label;
}), additionalInfo);
}
});
// ========================== Options ===========================
/** Trigger by option list */
var onOptionSelect = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (selectedKey, _ref2) {
var _node$mergedFieldName;
var selected = _ref2.selected,
source = _ref2.source;
var entity = keyEntities[selectedKey];
var node = entity === null || entity === void 0 ? void 0 : entity.node;
var selectedValue = (_node$mergedFieldName = node === null || node === void 0 ? void 0 : node[mergedFieldNames.value]) !== null && _node$mergedFieldName !== void 0 ? _node$mergedFieldName : selectedKey;
// Never be falsy but keep it safe
if (!mergedMultiple) {
// Single mode always set value
triggerChange([selectedValue], {
selected: true,
triggerValue: selectedValue
}, 'option');
} else {
var newRawValues = selected ? [].concat((0,toConsumableArray["default"])(rawValues), [selectedValue]) : rawCheckedValues.filter(function (v) {
return v !== selectedValue;
});
// Add keys if tree conduction
if (treeConduction) {
// Should keep missing values
var _splitRawValues = splitRawValues(newRawValues),
missingRawValues = _splitRawValues.missingRawValues,
existRawValues = _splitRawValues.existRawValues;
var keyList = existRawValues.map(function (val) {
return valueEntities.get(val).key;
});
// Conduction by selected or not
var checkedKeys;
if (selected) {
var _conductCheck = conductCheck(keyList, true, keyEntities);
checkedKeys = _conductCheck.checkedKeys;
} else {
var _conductCheck2 = conductCheck(keyList, {
checked: false,
halfCheckedKeys: rawHalfCheckedValues
}, keyEntities);
checkedKeys = _conductCheck2.checkedKeys;
}
// Fill back of keys
newRawValues = [].concat((0,toConsumableArray["default"])(missingRawValues), (0,toConsumableArray["default"])(checkedKeys.map(function (key) {
return keyEntities[key].node[mergedFieldNames.value];
})));
}
triggerChange(newRawValues, {
selected: selected,
triggerValue: selectedValue
}, source || 'option');
}
// Trigger select event
if (selected || !mergedMultiple) {
onSelect === null || onSelect === void 0 || onSelect(selectedValue, fillLegacyProps(node));
} else {
onDeselect === null || onDeselect === void 0 || onDeselect(selectedValue, fillLegacyProps(node));
}
}, [splitRawValues, valueEntities, keyEntities, mergedFieldNames, mergedMultiple, rawValues, triggerChange, treeConduction, onSelect, onDeselect, rawCheckedValues, rawHalfCheckedValues, maxCount]);
// ========================== Dropdown ==========================
var onInternalDropdownVisibleChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (open) {
if (onDropdownVisibleChange) {
var legacyParam = {};
Object.defineProperty(legacyParam, 'documentClickClose', {
get: function get() {
(0,warning["default"])(false, 'Second param of `onDropdownVisibleChange` has been removed.');
return false;
}
});
onDropdownVisibleChange(open, legacyParam);
}
}, [onDropdownVisibleChange]);
// ====================== Display Change ========================
var onDisplayValuesChange = useRefFunc_useRefFunc(function (newValues, info) {
var newRawValues = newValues.map(function (item) {
return item.value;
});
if (info.type === 'clear') {
triggerChange(newRawValues, {}, 'selection');
return;
}
// TreeSelect only have multiple mode which means display change only has remove
if (info.values.length) {
onOptionSelect(info.values[0].value, {
selected: false,
source: 'selection'
});
}
});
// ========================== Context ===========================
var treeSelectContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
virtual: virtual,
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
listHeight: listHeight,
listItemHeight: listItemHeight,
listItemScrollOffset: listItemScrollOffset,
treeData: filteredTreeData,
fieldNames: mergedFieldNames,
onSelect: onOptionSelect,
treeExpandAction: treeExpandAction,
treeTitleRender: treeTitleRender,
onPopupScroll: onPopupScroll,
leftMaxCount: maxCount === undefined ? null : maxCount - cachedDisplayValues.length,
leafCountOnly: mergedShowCheckedStrategy === 'SHOW_CHILD' && !treeCheckStrictly && !!treeCheckable,
valueEntities: valueEntities
};
}, [virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, listItemScrollOffset, filteredTreeData, mergedFieldNames, onOptionSelect, treeExpandAction, treeTitleRender, onPopupScroll, maxCount, cachedDisplayValues.length, mergedShowCheckedStrategy, treeCheckStrictly, treeCheckable, valueEntities]);
// ======================= Legacy Context =======================
var legacyContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return {
checkable: mergedCheckable,
loadData: loadData,
treeLoadedKeys: treeLoadedKeys,
onTreeLoad: onTreeLoad,
checkedKeys: rawCheckedValues,
halfCheckedKeys: rawHalfCheckedValues,
treeDefaultExpandAll: treeDefaultExpandAll,
treeExpandedKeys: treeExpandedKeys,
treeDefaultExpandedKeys: treeDefaultExpandedKeys,
onTreeExpand: onTreeExpand,
treeIcon: treeIcon,
treeMotion: treeMotion,
showTreeIcon: showTreeIcon,
switcherIcon: switcherIcon,
treeLine: treeLine,
treeNodeFilterProp: treeNodeFilterProp,
keyEntities: keyEntities
};
}, [mergedCheckable, loadData, treeLoadedKeys, onTreeLoad, rawCheckedValues, rawHalfCheckedValues, treeDefaultExpandAll, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, treeIcon, treeMotion, showTreeIcon, switcherIcon, treeLine, treeNodeFilterProp, keyEntities]);
// =========================== Render ===========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TreeSelectContext.Provider, {
value: treeSelectContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(LegacyContext.Provider, {
value: legacyContext
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseSelect, (0,esm_extends["default"])({
ref: ref
}, restProps, {
// >>> MISC
id: mergedId,
prefixCls: prefixCls,
mode: mergedMultiple ? 'multiple' : undefined
// >>> Display Value
,
displayValues: cachedDisplayValues,
onDisplayValuesChange: onDisplayValuesChange
// >>> Search
,
searchValue: mergedSearchValue,
onSearch: onInternalSearch
// >>> Options
,
OptionList: rc_tree_select_es_OptionList,
emptyOptions: !mergedTreeData.length,
onDropdownVisibleChange: onInternalDropdownVisibleChange,
dropdownMatchSelectWidth: dropdownMatchSelectWidth
}))));
});
// Assign name for Debug
if (true) {
TreeSelect.displayName = 'TreeSelect';
}
var GenericTreeSelect = TreeSelect;
GenericTreeSelect.TreeNode = rc_tree_select_es_TreeNode;
GenericTreeSelect.SHOW_ALL = SHOW_ALL;
GenericTreeSelect.SHOW_PARENT = strategyUtil_SHOW_PARENT;
GenericTreeSelect.SHOW_CHILD = strategyUtil_SHOW_CHILD;
/* harmony default export */ var es_TreeSelect = (GenericTreeSelect);
;// ./node_modules/rc-tree-select/es/index.js
/* harmony default export */ var rc_tree_select_es = (es_TreeSelect);
// EXTERNAL MODULE: ./components/tree-select/style/index.ts
var tree_select_style = __webpack_require__("./components/tree-select/style/index.ts");
;// ./components/tree-select/index.tsx
var tree_select_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;
};
const InternalTreeSelect = (props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
size: customizeSize,
disabled: customDisabled,
bordered = true,
className,
rootClassName,
treeCheckable,
multiple,
listHeight = 256,
listItemHeight: customListItemHeight,
placement,
notFoundContent,
switcherIcon,
treeLine,
getPopupContainer,
popupClassName,
dropdownClassName,
treeIcon = false,
transitionName,
choiceTransitionName = '',
status: customStatus,
treeExpandAction,
builtinPlacements,
dropdownMatchSelectWidth,
popupMatchSelectWidth,
allowClear,
variant: customVariant,
dropdownStyle,
tagRender,
maxCount,
showCheckedStrategy,
treeCheckStrictly
} = props,
restProps = tree_select_rest(props, ["prefixCls", "size", "disabled", "bordered", "className", "rootClassName", "treeCheckable", "multiple", "listHeight", "listItemHeight", "placement", "notFoundContent", "switcherIcon", "treeLine", "getPopupContainer", "popupClassName", "dropdownClassName", "treeIcon", "transitionName", "choiceTransitionName", "status", "treeExpandAction", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "allowClear", "variant", "dropdownStyle", "tagRender", "maxCount", "showCheckedStrategy", "treeCheckStrictly"]);
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
renderEmpty,
direction,
virtual,
popupMatchSelectWidth: contextPopupMatchSelectWidth,
popupOverflow
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [, token] = (0,useToken["default"])();
const listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : (token === null || token === void 0 ? void 0 : token.controlHeightSM) + (token === null || token === void 0 ? void 0 : token.paddingXXS);
if (true) {
const warning = (0,_util_warning.devUseWarning)('TreeSelect');
true ? warning(multiple !== false || !treeCheckable, 'usage', '`multiple` will always be `true` when `treeCheckable` is true') : 0;
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
true ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : 0;
warning.deprecated(!('bordered' in props), 'bordered', 'variant');
}
const rootPrefixCls = getPrefixCls();
const prefixCls = getPrefixCls('select', customizePrefixCls);
const treePrefixCls = getPrefixCls('select-tree', customizePrefixCls);
const treeSelectPrefixCls = getPrefixCls('tree-select', customizePrefixCls);
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const rootCls = hooks_useCSSVarCls(prefixCls);
const treeSelectRootCls = hooks_useCSSVarCls(treeSelectPrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,select_style["default"])(prefixCls, rootCls);
const [treeSelectWrapCSSVar] = (0,tree_select_style["default"])(treeSelectPrefixCls, treePrefixCls, treeSelectRootCls);
const [variant, enableVariantCls] = useVariants('treeSelect', customVariant, bordered);
const mergedDropdownClassName = classnames_default()(popupClassName || dropdownClassName, `${treeSelectPrefixCls}-dropdown`, {
[`${treeSelectPrefixCls}-dropdown-rtl`]: direction === 'rtl'
}, rootClassName, cssVarCls, rootCls, treeSelectRootCls, hashId);
const isMultiple = !!(treeCheckable || multiple);
const mergedMaxCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (maxCount && (showCheckedStrategy === 'SHOW_ALL' && !treeCheckStrictly || showCheckedStrategy === 'SHOW_PARENT')) {
return undefined;
}
return maxCount;
}, [maxCount, showCheckedStrategy, treeCheckStrictly]);
const showSuffixIcon = useShowArrow(props.suffixIcon, props.showArrow);
const mergedPopupMatchSelectWidth = (_a = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : contextPopupMatchSelectWidth;
// ===================== Form =====================
const {
status: contextStatus,
hasFeedback,
isFormItemInput,
feedbackIcon
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
// ===================== Icons =====================
const {
suffixIcon,
removeIcon,
clearIcon
} = useIcons(Object.assign(Object.assign({}, restProps), {
multiple: isMultiple,
showSuffixIcon,
hasFeedback,
feedbackIcon,
prefixCls,
componentName: 'TreeSelect'
}));
const mergedAllowClear = allowClear === true ? {
clearIcon
} : allowClear;
// ===================== Empty =====================
let mergedNotFound;
if (notFoundContent !== undefined) {
mergedNotFound = notFoundContent;
} else {
mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
componentName: "Select"
});
}
// ==================== Render =====================
const selectProps = (0,omit["default"])(restProps, ['suffixIcon', 'removeIcon', 'clearIcon', 'itemIcon', 'switcherIcon']);
// ===================== Placement =====================
const memoizedPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (placement !== undefined) {
return placement;
}
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
}, [placement, direction]);
const mergedSize = (0,useSize["default"])(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const mergedClassName = classnames_default()(!customizePrefixCls && treeSelectPrefixCls, {
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${variant}`]: enableVariantCls,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, className, rootClassName, cssVarCls, rootCls, treeSelectRootCls, hashId);
const renderSwitcherIcon = nodeProps => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(iconUtil, {
prefixCls: treePrefixCls,
switcherIcon: switcherIcon,
treeNodeProps: nodeProps,
showLine: treeLine
}));
// ============================ zIndex ============================
const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.zIndex);
const returnNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tree_select_es, Object.assign({
virtual: virtual,
disabled: mergedDisabled
}, selectProps, {
dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,
builtinPlacements: select_mergedBuiltinPlacements(builtinPlacements, popupOverflow),
ref: ref,
prefixCls: prefixCls,
className: mergedClassName,
listHeight: listHeight,
listItemHeight: listItemHeight,
treeCheckable: treeCheckable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-tree-checkbox-inner`
}) : treeCheckable,
treeLine: !!treeLine,
suffixIcon: suffixIcon,
multiple: isMultiple,
placement: memoizedPlacement,
removeIcon: removeIcon,
allowClear: mergedAllowClear,
switcherIcon: renderSwitcherIcon,
showTreeIcon: treeIcon,
notFoundContent: mergedNotFound,
getPopupContainer: getPopupContainer || getContextPopupContainer,
treeMotion: null,
dropdownClassName: mergedDropdownClassName,
dropdownStyle: Object.assign(Object.assign({}, dropdownStyle), {
zIndex
}),
choiceTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, '', choiceTransitionName),
transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),
treeExpandAction: treeExpandAction,
tagRender: isMultiple ? tagRender : undefined,
maxCount: mergedMaxCount,
showCheckedStrategy: showCheckedStrategy,
treeCheckStrictly: treeCheckStrictly
}));
return wrapCSSVar(treeSelectWrapCSSVar(returnNode));
};
const TreeSelectRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalTreeSelect);
const tree_select_TreeSelect = TreeSelectRef;
// We don't care debug panel
/* istanbul ignore next */
const tree_select_PurePanel = _util_PurePanel(tree_select_TreeSelect, 'dropdownAlign', props => (0,omit["default"])(props, ['visible']));
tree_select_TreeSelect.TreeNode = rc_tree_select_es_TreeNode;
tree_select_TreeSelect.SHOW_ALL = SHOW_ALL;
tree_select_TreeSelect.SHOW_PARENT = strategyUtil_SHOW_PARENT;
tree_select_TreeSelect.SHOW_CHILD = strategyUtil_SHOW_CHILD;
tree_select_TreeSelect._InternalPanelDoNotUseOrYouWillBeFired = tree_select_PurePanel;
if (true) {
tree_select_TreeSelect.displayName = 'TreeSelect';
}
/* harmony default export */ var tree_select = (tree_select_TreeSelect);
;// ./node_modules/@ant-design/icons-svg/es/asn/EditOutlined.js
// This icon file is generated automatically.
var EditOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, "name": "edit", "theme": "outlined" };
/* harmony default export */ var asn_EditOutlined = (EditOutlined);
;// ./node_modules/@ant-design/icons/es/icons/EditOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EditOutlined_EditOutlined = function EditOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_EditOutlined
}));
};
/** */
var EditOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EditOutlined_EditOutlined);
if (true) {
EditOutlined_RefIcon.displayName = 'EditOutlined';
}
/* harmony default export */ var icons_EditOutlined = (EditOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/EnterOutlined.js
// This icon file is generated automatically.
var EnterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, "name": "enter", "theme": "outlined" };
/* harmony default export */ var asn_EnterOutlined = (EnterOutlined);
;// ./node_modules/@ant-design/icons/es/icons/EnterOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EnterOutlined_EnterOutlined = function EnterOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_EnterOutlined
}));
};
/** */
var EnterOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EnterOutlined_EnterOutlined);
if (true) {
EnterOutlined_RefIcon.displayName = 'EnterOutlined';
}
/* harmony default export */ var icons_EnterOutlined = (EnterOutlined_RefIcon);
// EXTERNAL MODULE: ./components/typography/style/index.ts + 1 modules
var typography_style = __webpack_require__("./components/typography/style/index.ts");
;// ./components/typography/Editable.tsx
const Editable = props => {
const {
prefixCls,
'aria-label': ariaLabel,
className,
style,
direction,
maxLength,
autoSize = true,
value,
onSave,
onCancel,
onEnd,
component,
enterIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EnterOutlined, null)
} = props;
const ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const inComposition = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
const lastKeyCode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const [current, setCurrent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
setCurrent(value);
}, [value]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
var _a;
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) {
const {
textArea
} = ref.current.resizableTextArea;
textArea.focus();
const {
length
} = textArea.value;
textArea.setSelectionRange(length, length);
}
}, []);
const onChange = _ref => {
let {
target
} = _ref;
setCurrent(target.value.replace(/[\n\r]/g, ''));
};
const onCompositionStart = () => {
inComposition.current = true;
};
const onCompositionEnd = () => {
inComposition.current = false;
};
const onKeyDown = _ref2 => {
let {
keyCode
} = _ref2;
// We don't record keyCode when IME is using
if (inComposition.current) return;
lastKeyCode.current = keyCode;
};
const confirmChange = () => {
onSave(current.trim());
};
const onKeyUp = _ref3 => {
let {
keyCode,
ctrlKey,
altKey,
metaKey,
shiftKey
} = _ref3;
// Check if it's a real key
if (lastKeyCode.current !== keyCode || inComposition.current || ctrlKey || altKey || metaKey || shiftKey) {
return;
}
if (keyCode === KeyCode["default"].ENTER) {
confirmChange();
onEnd === null || onEnd === void 0 ? void 0 : onEnd();
} else if (keyCode === KeyCode["default"].ESC) {
onCancel();
}
};
const onBlur = () => {
confirmChange();
};
const [wrapCSSVar, hashId, cssVarCls] = (0,typography_style["default"])(prefixCls);
const textAreaClassName = classnames_default()(prefixCls, `${prefixCls}-edit-content`, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${component}`]: !!component
}, className, hashId, cssVarCls);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: textAreaClassName,
style: style
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_TextArea, {
ref: ref,
maxLength: maxLength,
value: current,
onChange: onChange,
onKeyDown: onKeyDown,
onKeyUp: onKeyUp,
onCompositionStart: onCompositionStart,
onCompositionEnd: onCompositionEnd,
onBlur: onBlur,
"aria-label": ariaLabel,
rows: 1,
autoSize: autoSize
}), enterIcon !== null ? (0,reactNode.cloneElement)(enterIcon, {
className: `${prefixCls}-edit-content-confirm`
}) : null));
};
/* harmony default export */ var typography_Editable = (Editable);
// EXTERNAL MODULE: ./node_modules/copy-to-clipboard/index.js
var copy_to_clipboard = __webpack_require__("./node_modules/copy-to-clipboard/index.js");
var copy_to_clipboard_default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard);
;// ./components/typography/hooks/useCopyClick.ts
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const useCopyClick = _ref => {
let {
copyConfig,
children
} = _ref;
const [copied, setCopied] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [copyLoading, setCopyLoading] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const copyIdRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const cleanCopyId = () => {
if (copyIdRef.current) {
clearTimeout(copyIdRef.current);
}
};
const copyOptions = {};
if (copyConfig.format) {
copyOptions.format = copyConfig.format;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => cleanCopyId, []);
// Keep copy action up to date
const onClick = (0,useEvent["default"])(e => __awaiter(void 0, void 0, void 0, function* () {
var _a;
e === null || e === void 0 ? void 0 : e.preventDefault();
e === null || e === void 0 ? void 0 : e.stopPropagation();
setCopyLoading(true);
try {
const text = typeof copyConfig.text === 'function' ? yield copyConfig.text() : copyConfig.text;
copy_to_clipboard_default()(text || toList(children, true).join('') || '', copyOptions);
setCopyLoading(false);
setCopied(true);
// Trigger tips update
cleanCopyId();
copyIdRef.current = setTimeout(() => {
setCopied(false);
}, 3000);
(_a = copyConfig.onCopy) === null || _a === void 0 ? void 0 : _a.call(copyConfig, e);
} catch (error) {
setCopyLoading(false);
throw error;
}
}));
return {
copied,
copyLoading,
onClick
};
};
/* harmony default export */ var hooks_useCopyClick = (useCopyClick);
;// ./components/typography/hooks/useMergedConfig.ts
function useMergedConfig(propConfig, templateConfig) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const support = !!propConfig;
return [support, Object.assign(Object.assign({}, templateConfig), support && typeof propConfig === 'object' ? propConfig : null)];
}, [propConfig]);
}
;// ./components/typography/hooks/usePrevious.ts
const usePrevious = value => {
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(undefined);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
ref.current = value;
});
return ref.current;
};
/* harmony default export */ var hooks_usePrevious = (usePrevious);
;// ./components/typography/hooks/useTooltipProps.ts
const useTooltipProps = (tooltip, editConfigText, children) => (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
if (tooltip === true) {
return {
title: editConfigText !== null && editConfigText !== void 0 ? editConfigText : children
};
}
if (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(tooltip)) {
return {
title: tooltip
};
}
if (typeof tooltip === 'object') {
return Object.assign({
title: editConfigText !== null && editConfigText !== void 0 ? editConfigText : children
}, tooltip);
}
return {
title: tooltip
};
}, [tooltip, editConfigText, children]);
/* harmony default export */ var hooks_useTooltipProps = (useTooltipProps);
;// ./components/typography/Typography.tsx
var Typography_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;
};
const Typography = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
component: Component = 'article',
className,
rootClassName,
setContentRef,
children,
direction: typographyDirection,
style
} = props,
restProps = Typography_rest(props, ["prefixCls", "component", "className", "rootClassName", "setContentRef", "children", "direction", "style"]);
const {
getPrefixCls,
direction: contextDirection,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('typography');
const direction = typographyDirection !== null && typographyDirection !== void 0 ? typographyDirection : contextDirection;
const mergedRef = setContentRef ? (0,es_ref.composeRef)(ref, setContentRef) : ref;
const prefixCls = getPrefixCls('typography', customizePrefixCls);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Typography');
warning.deprecated(!setContentRef, 'setContentRef', 'ref');
}
// Style
const [wrapCSSVar, hashId, cssVarCls] = (0,typography_style["default"])(prefixCls);
const componentClassName = classnames_default()(prefixCls, contextClassName, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
return wrapCSSVar(
/*#__PURE__*/
// @ts-expect-error: Expression produces a union type that is too complex to represent.
external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({
className: componentClassName,
style: mergedStyle,
ref: mergedRef
}, restProps), children));
});
if (true) {
Typography.displayName = 'Typography';
}
/* harmony default export */ var typography_Typography = (Typography);
;// ./node_modules/@ant-design/icons-svg/es/asn/CopyOutlined.js
// This icon file is generated automatically.
var CopyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, "name": "copy", "theme": "outlined" };
/* harmony default export */ var asn_CopyOutlined = (CopyOutlined);
;// ./node_modules/@ant-design/icons/es/icons/CopyOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CopyOutlined_CopyOutlined = function CopyOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_CopyOutlined
}));
};
/** */
var CopyOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CopyOutlined_CopyOutlined);
if (true) {
CopyOutlined_RefIcon.displayName = 'CopyOutlined';
}
/* harmony default export */ var icons_CopyOutlined = (CopyOutlined_RefIcon);
;// ./components/typography/Base/util.ts
function util_toList(val) {
if (val === false) {
return [false, false];
}
return Array.isArray(val) ? val : [val];
}
function getNode(dom, defaultNode, needDom) {
if (dom === true || dom === undefined) {
return defaultNode;
}
return dom || needDom && defaultNode;
}
/**
* Check for element is native ellipsis
* ref:
* - https://github.com/ant-design/ant-design/issues/50143
* - https://github.com/ant-design/ant-design/issues/50414
*/
function isEleEllipsis(ele) {
// Create a new div to get the size
const childDiv = document.createElement('em');
ele.appendChild(childDiv);
// For test case
if (true) {
childDiv.className = 'ant-typography-css-ellipsis-content-measure';
}
const rect = ele.getBoundingClientRect();
const childRect = childDiv.getBoundingClientRect();
// Reset
ele.removeChild(childDiv);
// Range checker
return (
// Horizontal out of range
rect.left > childRect.left || childRect.right > rect.right ||
// Vertical out of range
rect.top > childRect.top || childRect.bottom > rect.bottom
);
}
const isValidText = val => ['string', 'number'].includes(typeof val);
;// ./components/typography/Base/CopyBtn.tsx
const CopyBtn = _ref => {
let {
prefixCls,
copied,
locale,
iconOnly,
tooltips,
icon,
tabIndex,
onCopy,
loading: btnLoading
} = _ref;
const tooltipNodes = util_toList(tooltips);
const iconNodes = util_toList(icon);
const {
copied: copiedText,
copy: copyText
} = locale !== null && locale !== void 0 ? locale : {};
const systemStr = copied ? copiedText : copyText;
const copyTitle = getNode(tooltipNodes[copied ? 1 : 0], systemStr);
const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
title: copyTitle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
className: classnames_default()(`${prefixCls}-copy`, {
[`${prefixCls}-copy-success`]: copied,
[`${prefixCls}-copy-icon-only`]: iconOnly
}),
onClick: onCopy,
"aria-label": ariaLabel,
tabIndex: tabIndex
}, copied ? getNode(iconNodes[1], /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, null), true) : getNode(iconNodes[0], btnLoading ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CopyOutlined, null), true)));
};
/* harmony default export */ var Base_CopyBtn = (CopyBtn);
;// ./components/typography/Base/Ellipsis.tsx
const MeasureText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
let {
style,
children
} = _ref;
const spanRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
isExceed: () => {
const span = spanRef.current;
return span.scrollHeight > span.clientHeight;
},
getHeight: () => spanRef.current.clientHeight
}));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
"aria-hidden": true,
ref: spanRef,
style: Object.assign({
position: 'fixed',
display: 'block',
left: 0,
top: 0,
pointerEvents: 'none',
backgroundColor: 'rgba(255, 0, 0, 0.65)'
}, style)
}, children);
});
const getNodesLen = nodeList => nodeList.reduce((totalLen, node) => totalLen + (isValidText(node) ? String(node).length : 1), 0);
function sliceNodes(nodeList, len) {
let currLen = 0;
const currentNodeList = [];
for (let i = 0; i < nodeList.length; i += 1) {
// Match to return
if (currLen === len) {
return currentNodeList;
}
const node = nodeList[i];
const canCut = isValidText(node);
const nodeLen = canCut ? String(node).length : 1;
const nextLen = currLen + nodeLen;
// Exceed but current not which means we need cut this
// This will not happen on validate ReactElement
if (nextLen > len) {
const restLen = len - currLen;
currentNodeList.push(String(node).slice(0, restLen));
return currentNodeList;
}
currentNodeList.push(node);
currLen = nextLen;
}
return nodeList;
}
// Measure for the `text` is exceed the `rows` or not
const STATUS_MEASURE_NONE = 0;
const STATUS_MEASURE_PREPARE = 1;
const STATUS_MEASURE_START = 2;
const STATUS_MEASURE_NEED_ELLIPSIS = 3;
const STATUS_MEASURE_NO_NEED_ELLIPSIS = 4;
const lineClipStyle = {
display: '-webkit-box',
overflow: 'hidden',
WebkitBoxOrient: 'vertical'
};
function EllipsisMeasure(props) {
const {
enableMeasure,
width,
text,
children,
rows,
expanded,
miscDeps,
onEllipsis
} = props;
const nodeList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,toArray["default"])(text), [text]);
const nodeLen = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => getNodesLen(nodeList), [text]);
// ========================= Full Content =========================
// Used for measure only, which means it's always render as no need ellipsis
const fullContent = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => children(nodeList, false), [text]);
// ========================= Cut Content ==========================
const [ellipsisCutIndex, setEllipsisCutIndex] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
const cutMidRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ========================= NeedEllipsis =========================
const measureWhiteSpaceRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const needEllipsisRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// Measure for `rows-1` height, to avoid operation exceed the line height
const descRowsEllipsisRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const symbolRowEllipsisRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const [canEllipsis, setCanEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [needEllipsis, setNeedEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(STATUS_MEASURE_NONE);
const [ellipsisHeight, setEllipsisHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const [parentWhiteSpace, setParentWhiteSpace] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
// Trigger start measure
(0,useLayoutEffect["default"])(() => {
if (enableMeasure && width && nodeLen) {
setNeedEllipsis(STATUS_MEASURE_PREPARE);
} else {
setNeedEllipsis(STATUS_MEASURE_NONE);
}
}, [width, text, rows, enableMeasure, nodeList]);
// Measure process
(0,useLayoutEffect["default"])(() => {
var _a, _b, _c, _d;
if (needEllipsis === STATUS_MEASURE_PREPARE) {
setNeedEllipsis(STATUS_MEASURE_START);
// Parent ref `white-space`
const nextWhiteSpace = measureWhiteSpaceRef.current && getComputedStyle(measureWhiteSpaceRef.current).whiteSpace;
setParentWhiteSpace(nextWhiteSpace);
} else if (needEllipsis === STATUS_MEASURE_START) {
const isOverflow = !!((_a = needEllipsisRef.current) === null || _a === void 0 ? void 0 : _a.isExceed());
setNeedEllipsis(isOverflow ? STATUS_MEASURE_NEED_ELLIPSIS : STATUS_MEASURE_NO_NEED_ELLIPSIS);
setEllipsisCutIndex(isOverflow ? [0, nodeLen] : null);
setCanEllipsis(isOverflow);
// Get the basic height of ellipsis rows
const baseRowsEllipsisHeight = ((_b = needEllipsisRef.current) === null || _b === void 0 ? void 0 : _b.getHeight()) || 0;
// Get the height of `rows - 1` + symbol height
const descRowsEllipsisHeight = rows === 1 ? 0 : ((_c = descRowsEllipsisRef.current) === null || _c === void 0 ? void 0 : _c.getHeight()) || 0;
const symbolRowEllipsisHeight = ((_d = symbolRowEllipsisRef.current) === null || _d === void 0 ? void 0 : _d.getHeight()) || 0;
const maxRowsHeight = Math.max(baseRowsEllipsisHeight,
// height of rows with ellipsis
descRowsEllipsisHeight + symbolRowEllipsisHeight);
setEllipsisHeight(maxRowsHeight + 1);
onEllipsis(isOverflow);
}
}, [needEllipsis]);
// ========================= Cut Measure ==========================
const cutMidIndex = ellipsisCutIndex ? Math.ceil((ellipsisCutIndex[0] + ellipsisCutIndex[1]) / 2) : 0;
(0,useLayoutEffect["default"])(() => {
var _a;
const [minIndex, maxIndex] = ellipsisCutIndex || [0, 0];
if (minIndex !== maxIndex) {
const midHeight = ((_a = cutMidRef.current) === null || _a === void 0 ? void 0 : _a.getHeight()) || 0;
const isOverflow = midHeight > ellipsisHeight;
let targetMidIndex = cutMidIndex;
if (maxIndex - minIndex === 1) {
targetMidIndex = isOverflow ? minIndex : maxIndex;
}
setEllipsisCutIndex(isOverflow ? [minIndex, targetMidIndex] : [targetMidIndex, maxIndex]);
}
}, [ellipsisCutIndex, cutMidIndex]);
// ========================= Text Content =========================
const finalContent = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
// Skip everything if `enableMeasure` is disabled
if (!enableMeasure) {
return children(nodeList, false);
}
if (needEllipsis !== STATUS_MEASURE_NEED_ELLIPSIS || !ellipsisCutIndex || ellipsisCutIndex[0] !== ellipsisCutIndex[1]) {
const content = children(nodeList, false);
// Limit the max line count to avoid scrollbar blink unless no need ellipsis
// https://github.com/ant-design/ant-design/issues/42958
if ([STATUS_MEASURE_NO_NEED_ELLIPSIS, STATUS_MEASURE_NONE].includes(needEllipsis)) {
return content;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: Object.assign(Object.assign({}, lineClipStyle), {
WebkitLineClamp: rows
})
}, content);
}
return children(expanded ? nodeList : sliceNodes(nodeList, ellipsisCutIndex[0]), canEllipsis);
}, [expanded, needEllipsis, ellipsisCutIndex, nodeList].concat((0,toConsumableArray["default"])(miscDeps)));
// ============================ Render ============================
const measureStyle = {
width,
margin: 0,
padding: 0,
whiteSpace: parentWhiteSpace === 'nowrap' ? 'normal' : 'inherit'
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, finalContent, needEllipsis === STATUS_MEASURE_START && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {
WebkitLineClamp: rows
}),
ref: needEllipsisRef
}, fullContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {
WebkitLineClamp: rows - 1
}),
ref: descRowsEllipsisRef
}, fullContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {
WebkitLineClamp: 1
}),
ref: symbolRowEllipsisRef
}, children([], true)))), needEllipsis === STATUS_MEASURE_NEED_ELLIPSIS && ellipsisCutIndex && ellipsisCutIndex[0] !== ellipsisCutIndex[1] && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
style: Object.assign(Object.assign({}, measureStyle), {
top: 400
}),
ref: cutMidRef
}, children(sliceNodes(nodeList, cutMidIndex), true))), needEllipsis === STATUS_MEASURE_PREPARE && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
style: {
whiteSpace: 'inherit'
},
ref: measureWhiteSpaceRef
})));
}
;// ./components/typography/Base/EllipsisTooltip.tsx
const EllipsisTooltip = _ref => {
let {
enableEllipsis,
isEllipsis,
children,
tooltipProps
} = _ref;
if (!(tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.title) || !enableEllipsis) {
return children;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({
open: isEllipsis ? undefined : false
}, tooltipProps), children);
};
if (true) {
EllipsisTooltip.displayName = 'EllipsisTooltip';
}
/* harmony default export */ var Base_EllipsisTooltip = (EllipsisTooltip);
;// ./components/typography/Base/index.tsx
var Base_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 wrapperDecorations(_ref, content) {
let {
mark,
code,
underline,
delete: del,
strong,
keyboard,
italic
} = _ref;
let currentContent = content;
function wrap(tag, needed) {
if (!needed) {
return;
}
currentContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(tag, {}, currentContent);
}
wrap('strong', strong);
wrap('u', underline);
wrap('del', del);
wrap('code', code);
wrap('mark', mark);
wrap('kbd', keyboard);
wrap('i', italic);
return currentContent;
}
const ELLIPSIS_STR = '...';
const Base = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
className,
style,
type,
disabled,
children,
ellipsis,
editable,
copyable,
component,
title
} = props,
restProps = Base_rest(props, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]);
const {
getPrefixCls,
direction
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const [textLocale] = (0,useLocale["default"])('Text');
const typographyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const editIconRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
// ============================ MISC ============================
const prefixCls = getPrefixCls('typography', customizePrefixCls);
const textProps = (0,omit["default"])(restProps, ['mark', 'code', 'delete', 'underline', 'strong', 'keyboard', 'italic']);
// ========================== Editable ==========================
const [enableEdit, editConfig] = useMergedConfig(editable);
const [editing, setEditing] = (0,useMergedState["default"])(false, {
value: editConfig.editing
});
const {
triggerType = ['icon']
} = editConfig;
const triggerEdit = edit => {
var _a;
if (edit) {
(_a = editConfig.onStart) === null || _a === void 0 ? void 0 : _a.call(editConfig);
}
setEditing(edit);
};
// Focus edit icon when back
const prevEditing = hooks_usePrevious(editing);
(0,useLayoutEffect["default"])(() => {
var _a;
if (!editing && prevEditing) {
(_a = editIconRef.current) === null || _a === void 0 ? void 0 : _a.focus();
}
}, [editing]);
const onEditClick = e => {
e === null || e === void 0 ? void 0 : e.preventDefault();
triggerEdit(true);
};
const onEditChange = value => {
var _a;
(_a = editConfig.onChange) === null || _a === void 0 ? void 0 : _a.call(editConfig, value);
triggerEdit(false);
};
const onEditCancel = () => {
var _a;
(_a = editConfig.onCancel) === null || _a === void 0 ? void 0 : _a.call(editConfig);
triggerEdit(false);
};
// ========================== Copyable ==========================
const [enableCopy, copyConfig] = useMergedConfig(copyable);
const {
copied,
copyLoading,
onClick: onCopyClick
} = hooks_useCopyClick({
copyConfig,
children
});
// ========================== Ellipsis ==========================
const [isLineClampSupport, setIsLineClampSupport] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [isTextOverflowSupport, setIsTextOverflowSupport] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [isJsEllipsis, setIsJsEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [isNativeEllipsis, setIsNativeEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const [isNativeVisible, setIsNativeVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
const [enableEllipsis, ellipsisConfig] = useMergedConfig(ellipsis, {
expandable: false,
symbol: isExpanded => isExpanded ? textLocale === null || textLocale === void 0 ? void 0 : textLocale.collapse : textLocale === null || textLocale === void 0 ? void 0 : textLocale.expand
});
const [expanded, setExpanded] = (0,useMergedState["default"])(ellipsisConfig.defaultExpanded || false, {
value: ellipsisConfig.expanded
});
const mergedEnableEllipsis = enableEllipsis && (!expanded || ellipsisConfig.expandable === 'collapsible');
// Shared prop to reduce bundle size
const {
rows = 1
} = ellipsisConfig;
const needMeasureEllipsis = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() =>
// Disable ellipsis
mergedEnableEllipsis && (
// Provide suffix
ellipsisConfig.suffix !== undefined || ellipsisConfig.onEllipsis ||
// Can't use css ellipsis since we need to provide the place for button
ellipsisConfig.expandable || enableEdit || enableCopy), [mergedEnableEllipsis, ellipsisConfig, enableEdit, enableCopy]);
(0,useLayoutEffect["default"])(() => {
if (enableEllipsis && !needMeasureEllipsis) {
setIsLineClampSupport(isStyleSupport('webkitLineClamp'));
setIsTextOverflowSupport(isStyleSupport('textOverflow'));
}
}, [needMeasureEllipsis, enableEllipsis]);
const [cssEllipsis, setCssEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedEnableEllipsis);
const canUseCssEllipsis = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (needMeasureEllipsis) {
return false;
}
if (rows === 1) {
return isTextOverflowSupport;
}
return isLineClampSupport;
}, [needMeasureEllipsis, isTextOverflowSupport, isLineClampSupport]);
// We use effect to change from css ellipsis to js ellipsis.
// To make SSR still can see the ellipsis.
(0,useLayoutEffect["default"])(() => {
setCssEllipsis(canUseCssEllipsis && mergedEnableEllipsis);
}, [canUseCssEllipsis, mergedEnableEllipsis]);
const isMergedEllipsis = mergedEnableEllipsis && (cssEllipsis ? isNativeEllipsis : isJsEllipsis);
const cssTextOverflow = mergedEnableEllipsis && rows === 1 && cssEllipsis;
const cssLineClamp = mergedEnableEllipsis && rows > 1 && cssEllipsis;
// >>>>> Expand
const onExpandClick = (e, info) => {
var _a;
setExpanded(info.expanded);
(_a = ellipsisConfig.onExpand) === null || _a === void 0 ? void 0 : _a.call(ellipsisConfig, e, info);
};
const [ellipsisWidth, setEllipsisWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
const onResize = _ref2 => {
let {
offsetWidth
} = _ref2;
setEllipsisWidth(offsetWidth);
};
// >>>>> JS Ellipsis
const onJsEllipsis = jsEllipsis => {
var _a;
setIsJsEllipsis(jsEllipsis);
// Trigger if changed
if (isJsEllipsis !== jsEllipsis) {
(_a = ellipsisConfig.onEllipsis) === null || _a === void 0 ? void 0 : _a.call(ellipsisConfig, jsEllipsis);
}
};
// >>>>> Native ellipsis
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const textEle = typographyRef.current;
if (enableEllipsis && cssEllipsis && textEle) {
const currentEllipsis = isEleEllipsis(textEle);
if (isNativeEllipsis !== currentEllipsis) {
setIsNativeEllipsis(currentEllipsis);
}
}
}, [enableEllipsis, cssEllipsis, children, cssLineClamp, isNativeVisible, ellipsisWidth]);
// https://github.com/ant-design/ant-design/issues/36786
// Use IntersectionObserver to check if element is invisible
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const textEle = typographyRef.current;
if (typeof IntersectionObserver === 'undefined' || !textEle || !cssEllipsis || !mergedEnableEllipsis) {
return;
}
/* eslint-disable-next-line compat/compat */
const observer = new IntersectionObserver(() => {
setIsNativeVisible(!!textEle.offsetParent);
});
observer.observe(textEle);
return () => {
observer.disconnect();
};
}, [cssEllipsis, mergedEnableEllipsis]);
// ========================== Tooltip ===========================
const tooltipProps = hooks_useTooltipProps(ellipsisConfig.tooltip, editConfig.text, children);
const topAriaLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (!enableEllipsis || cssEllipsis) {
return undefined;
}
return [editConfig.text, children, title, tooltipProps.title].find(isValidText);
}, [enableEllipsis, cssEllipsis, title, tooltipProps.title, isMergedEllipsis]);
// =========================== Render ===========================
// >>>>>>>>>>> Editing input
if (editing) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Editable, {
value: (_a = editConfig.text) !== null && _a !== void 0 ? _a : typeof children === 'string' ? children : '',
onSave: onEditChange,
onCancel: onEditCancel,
onEnd: editConfig.onEnd,
prefixCls: prefixCls,
className: className,
style: style,
direction: direction,
component: component,
maxLength: editConfig.maxLength,
autoSize: editConfig.autoSize,
enterIcon: editConfig.enterIcon
});
}
// >>>>>>>>>>> Typography
// Expand
const renderExpand = () => {
const {
expandable,
symbol
} = ellipsisConfig;
return expandable ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
key: "expand",
className: `${prefixCls}-${expanded ? 'collapse' : 'expand'}`,
onClick: e => onExpandClick(e, {
expanded: !expanded
}),
"aria-label": expanded ? textLocale.collapse : textLocale === null || textLocale === void 0 ? void 0 : textLocale.expand
}, typeof symbol === 'function' ? symbol(expanded) : symbol)) : null;
};
// Edit
const renderEdit = () => {
if (!enableEdit) {
return;
}
const {
icon,
tooltip,
tabIndex
} = editConfig;
const editTitle = (0,toArray["default"])(tooltip)[0] || (textLocale === null || textLocale === void 0 ? void 0 : textLocale.edit);
const ariaLabel = typeof editTitle === 'string' ? editTitle : '';
return triggerType.includes('icon') ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
key: "edit",
title: tooltip === false ? '' : editTitle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
type: "button",
ref: editIconRef,
className: `${prefixCls}-edit`,
onClick: onEditClick,
"aria-label": ariaLabel,
tabIndex: tabIndex
}, icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EditOutlined, {
role: "button"
})))) : null;
};
// Copy
const renderCopy = () => {
if (!enableCopy) {
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Base_CopyBtn, Object.assign({
key: "copy"
}, copyConfig, {
prefixCls: prefixCls,
copied: copied,
locale: textLocale,
onCopy: onCopyClick,
loading: copyLoading,
iconOnly: children === null || children === undefined
}));
};
const renderOperations = canEllipsis => [canEllipsis && renderExpand(), renderEdit(), renderCopy()];
const renderEllipsis = canEllipsis => [canEllipsis && !expanded && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
"aria-hidden": true,
key: "ellipsis"
}, ELLIPSIS_STR)), ellipsisConfig.suffix, renderOperations(canEllipsis)];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
onResize: onResize,
disabled: !mergedEnableEllipsis
}, resizeRef => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Base_EllipsisTooltip, {
tooltipProps: tooltipProps,
enableEllipsis: mergedEnableEllipsis,
isEllipsis: isMergedEllipsis
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Typography, Object.assign({
className: classnames_default()({
[`${prefixCls}-${type}`]: type,
[`${prefixCls}-disabled`]: disabled,
[`${prefixCls}-ellipsis`]: enableEllipsis,
[`${prefixCls}-ellipsis-single-line`]: cssTextOverflow,
[`${prefixCls}-ellipsis-multiple-line`]: cssLineClamp
}, className),
prefixCls: customizePrefixCls,
style: Object.assign(Object.assign({}, style), {
WebkitLineClamp: cssLineClamp ? rows : undefined
}),
component: component,
ref: (0,es_ref.composeRef)(resizeRef, typographyRef, ref),
direction: direction,
onClick: triggerType.includes('text') ? onEditClick : undefined,
"aria-label": topAriaLabel === null || topAriaLabel === void 0 ? void 0 : topAriaLabel.toString(),
title: title
}, textProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(EllipsisMeasure, {
enableMeasure: mergedEnableEllipsis && !cssEllipsis,
text: children,
rows: rows,
width: ellipsisWidth,
onEllipsis: onJsEllipsis,
expanded: expanded,
miscDeps: [copied, expanded, copyLoading, enableEdit, enableCopy, textLocale]
}, (node, canEllipsis) => wrapperDecorations(props, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, node.length > 0 && canEllipsis && !expanded && topAriaLabel ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: "show-content",
"aria-hidden": true
}, node)) : node, renderEllipsis(canEllipsis))))))));
});
/* harmony default export */ var typography_Base = (Base);
;// ./components/typography/Link.tsx
var Link_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;
};
const Link = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_a, ref) => {
var {
ellipsis,
rel
} = _a,
restProps = Link_rest(_a, ["ellipsis", "rel"]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Typography.Link');
true ? warning(typeof ellipsis !== 'object', 'usage', '`ellipsis` only supports boolean value.') : 0;
}
const mergedProps = Object.assign(Object.assign({}, restProps), {
rel: rel === undefined && restProps.target === '_blank' ? 'noopener noreferrer' : rel
});
// @ts-expect-error: https://github.com/ant-design/ant-design/issues/26622
delete mergedProps.navigate;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({}, mergedProps, {
ref: ref,
ellipsis: !!ellipsis,
component: "a"
}));
});
/* harmony default export */ var typography_Link = (Link);
;// ./components/typography/Paragraph.tsx
const Paragraph_Paragraph = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({
ref: ref
}, props, {
component: "div"
}))));
/* harmony default export */ var typography_Paragraph = (Paragraph_Paragraph);
;// ./components/typography/Text.tsx
var Text_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;
};
const Text = (_a, ref) => {
var {
ellipsis
} = _a,
restProps = Text_rest(_a, ["ellipsis"]);
const mergedEllipsis = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
if (ellipsis && typeof ellipsis === 'object') {
return (0,omit["default"])(ellipsis, ['expandable', 'rows']);
}
return ellipsis;
}, [ellipsis]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Typography.Text');
true ? warning(typeof ellipsis !== 'object' || !ellipsis || !('expandable' in ellipsis) && !('rows' in ellipsis), 'usage', '`ellipsis` do not support `expandable` or `rows` props.') : 0;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({
ref: ref
}, restProps, {
ellipsis: mergedEllipsis,
component: "span"
}));
};
/* harmony default export */ var typography_Text = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Text));
;// ./components/typography/Title.tsx
var Title_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;
};
const TITLE_ELE_LIST = [1, 2, 3, 4, 5];
const Title_Title = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
const {
level = 1
} = props,
restProps = Title_rest(props, ["level"]);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Typography.Title');
true ? warning(TITLE_ELE_LIST.includes(level), 'usage', 'Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.') : 0;
}
const component = TITLE_ELE_LIST.includes(level) ? `h${level}` : `h1`;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({
ref: ref
}, restProps, {
component: component
}));
});
/* harmony default export */ var typography_Title = (Title_Title);
;// ./components/typography/index.tsx
const components_typography_Typography = typography_Typography;
components_typography_Typography.Text = typography_Text;
components_typography_Typography.Link = typography_Link;
components_typography_Typography.Title = typography_Title;
components_typography_Typography.Paragraph = typography_Paragraph;
/* harmony default export */ var typography = (components_typography_Typography);
;// ./node_modules/rc-upload/es/attr-accept.js
/* harmony default export */ var attr_accept = (function (file, acceptedFiles) {
if (file && acceptedFiles) {
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
var fileName = file.name || '';
var mimeType = file.type || '';
var baseMimeType = mimeType.replace(/\/.*$/, '');
return acceptedFilesArray.some(function (type) {
var validType = type.trim();
// This is something like */*,* allow all files
if (/^\*(\/\*)?$/.test(type)) {
return true;
}
// like .jpg, .png
if (validType.charAt(0) === '.') {
var lowerFileName = fileName.toLowerCase();
var lowerType = validType.toLowerCase();
var affixList = [lowerType];
if (lowerType === '.jpg' || lowerType === '.jpeg') {
affixList = ['.jpg', '.jpeg'];
}
return affixList.some(function (affix) {
return lowerFileName.endsWith(affix);
});
}
// This is something like a image/* mime type
if (/\/\*$/.test(validType)) {
return baseMimeType === validType.replace(/\/.*$/, '');
}
// Full match
if (mimeType === validType) {
return true;
}
// Invalidate type should skip
if (/^\w+$/.test(validType)) {
(0,warning["default"])(false, "Upload takes an invalidate 'accept' type '".concat(validType, "'.Skip for check."));
return true;
}
return false;
});
}
return true;
});
;// ./node_modules/rc-upload/es/request.js
function getError(option, xhr) {
var msg = "cannot ".concat(option.method, " ").concat(option.action, " ").concat(xhr.status, "'");
var err = new Error(msg);
err.status = xhr.status;
err.method = option.method;
err.url = option.action;
return err;
}
function getBody(xhr) {
var text = xhr.responseText || xhr.response;
if (!text) {
return text;
}
try {
return JSON.parse(text);
} catch (e) {
return text;
}
}
function upload(option) {
// eslint-disable-next-line no-undef
var xhr = new XMLHttpRequest();
if (option.onProgress && xhr.upload) {
xhr.upload.onprogress = function progress(e) {
if (e.total > 0) {
e.percent = e.loaded / e.total * 100;
}
option.onProgress(e);
};
}
// eslint-disable-next-line no-undef
var formData = new FormData();
if (option.data) {
Object.keys(option.data).forEach(function (key) {
var value = option.data[key];
// support key-value array data
if (Array.isArray(value)) {
value.forEach(function (item) {
// { list: [ 11, 22 ] }
// formData.append('list[]', 11);
formData.append("".concat(key, "[]"), item);
});
return;
}
formData.append(key, value);
});
}
// eslint-disable-next-line no-undef
if (option.file instanceof Blob) {
formData.append(option.filename, option.file, option.file.name);
} else {
formData.append(option.filename, option.file);
}
xhr.onerror = function error(e) {
option.onError(e);
};
xhr.onload = function onload() {
// allow success when 2xx status
// see https://github.com/react-component/upload/issues/34
if (xhr.status < 200 || xhr.status >= 300) {
return option.onError(getError(option, xhr), getBody(xhr));
}
return option.onSuccess(getBody(xhr), xhr);
};
xhr.open(option.method, option.action, true);
// Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
if (option.withCredentials && 'withCredentials' in xhr) {
xhr.withCredentials = true;
}
var headers = option.headers || {};
// when set headers['X-Requested-With'] = null , can close default XHR header
// see https://github.com/react-component/upload/issues/33
if (headers['X-Requested-With'] !== null) {
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
}
Object.keys(headers).forEach(function (h) {
if (headers[h] !== null) {
xhr.setRequestHeader(h, headers[h]);
}
});
xhr.send(formData);
return {
abort: function abort() {
xhr.abort();
}
};
}
;// ./node_modules/rc-upload/es/traverseFileTree.js
// https://github.com/ant-design/ant-design/issues/50080
var traverseFileTree = /*#__PURE__*/function () {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(files, isAccepted) {
var flattenFileList, progressFileList, readDirectory, _readDirectory, readFile, _readFile, _traverseFileTree, wipIndex;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_readFile = function _readFile3() {
_readFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(item) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", new Promise(function (reslove) {
item.file(function (file) {
if (isAccepted(file)) {
// https://github.com/ant-design/ant-design/issues/16426
if (item.fullPath && !file.webkitRelativePath) {
Object.defineProperties(file, {
webkitRelativePath: {
writable: true
}
});
// eslint-disable-next-line no-param-reassign
file.webkitRelativePath = item.fullPath.replace(/^\//, '');
Object.defineProperties(file, {
webkitRelativePath: {
writable: false
}
});
}
reslove(file);
} else {
reslove(null);
}
});
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _readFile.apply(this, arguments);
};
readFile = function _readFile2(_x4) {
return _readFile.apply(this, arguments);
};
_readDirectory = function _readDirectory3() {
_readDirectory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(directory) {
var dirReader, entries, results, n, i;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
dirReader = directory.createReader();
entries = [];
case 2:
if (false) {}
_context2.next = 5;
return new Promise(function (resolve) {
dirReader.readEntries(resolve, function () {
return resolve([]);
});
});
case 5:
results = _context2.sent;
n = results.length;
if (n) {
_context2.next = 9;
break;
}
return _context2.abrupt("break", 12);
case 9:
for (i = 0; i < n; i++) {
entries.push(results[i]);
}
_context2.next = 2;
break;
case 12:
return _context2.abrupt("return", entries);
case 13:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _readDirectory.apply(this, arguments);
};
readDirectory = function _readDirectory2(_x3) {
return _readDirectory.apply(this, arguments);
};
flattenFileList = [];
progressFileList = [];
files.forEach(function (file) {
return progressFileList.push(file.webkitGetAsEntry());
});
// eslint-disable-next-line @typescript-eslint/naming-convention
_traverseFileTree = /*#__PURE__*/function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item, path) {
var _file, entries;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (item) {
_context.next = 2;
break;
}
return _context.abrupt("return");
case 2:
// eslint-disable-next-line no-param-reassign
item.path = path || '';
if (!item.isFile) {
_context.next = 10;
break;
}
_context.next = 6;
return readFile(item);
case 6:
_file = _context.sent;
if (_file) {
flattenFileList.push(_file);
}
_context.next = 15;
break;
case 10:
if (!item.isDirectory) {
_context.next = 15;
break;
}
_context.next = 13;
return readDirectory(item);
case 13:
entries = _context.sent;
progressFileList.push.apply(progressFileList, (0,toConsumableArray["default"])(entries));
case 15:
case "end":
return _context.stop();
}
}, _callee);
}));
return function _traverseFileTree(_x5, _x6) {
return _ref2.apply(this, arguments);
};
}();
wipIndex = 0;
case 9:
if (!(wipIndex < progressFileList.length)) {
_context4.next = 15;
break;
}
_context4.next = 12;
return _traverseFileTree(progressFileList[wipIndex]);
case 12:
wipIndex++;
_context4.next = 9;
break;
case 15:
return _context4.abrupt("return", flattenFileList);
case 16:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return function traverseFileTree(_x, _x2) {
return _ref.apply(this, arguments);
};
}();
/* harmony default export */ var es_traverseFileTree = (traverseFileTree);
;// ./node_modules/rc-upload/es/uid.js
var now = +new Date();
var uid_index = 0;
function uid_uid() {
// eslint-disable-next-line no-plusplus
return "rc-upload-".concat(now, "-").concat(++uid_index);
}
;// ./node_modules/rc-upload/es/AjaxUploader.js
var AjaxUploader_excluded = ["component", "prefixCls", "className", "classNames", "disabled", "id", "name", "style", "styles", "multiple", "accept", "capture", "children", "directory", "openFileDialogOnClick", "onMouseEnter", "onMouseLeave", "hasControlInside"];
/* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */
var AjaxUploader = /*#__PURE__*/function (_Component) {
(0,inherits["default"])(AjaxUploader, _Component);
var _super = (0,createSuper["default"])(AjaxUploader);
function AjaxUploader() {
var _this;
(0,classCallCheck["default"])(this, AjaxUploader);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
uid: uid_uid()
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "reqs", {});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "fileInput", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "_isMounted", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onChange", function (e) {
var _this$props = _this.props,
accept = _this$props.accept,
directory = _this$props.directory;
var files = e.target.files;
var acceptedFiles = (0,toConsumableArray["default"])(files).filter(function (file) {
return !directory || attr_accept(file, accept);
});
_this.uploadFiles(acceptedFiles);
_this.reset();
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onClick", function (event) {
var el = _this.fileInput;
if (!el) {
return;
}
var target = event.target;
var onClick = _this.props.onClick;
if (target && target.tagName === 'BUTTON') {
var parent = el.parentNode;
parent.focus();
target.blur();
}
el.click();
if (onClick) {
onClick(event);
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onKeyDown", function (e) {
if (e.key === 'Enter') {
_this.onClick(e);
}
});
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onFileDrop", /*#__PURE__*/function () {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
var multiple, files, _files;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
multiple = _this.props.multiple;
e.preventDefault();
if (!(e.type === 'dragover')) {
_context.next = 4;
break;
}
return _context.abrupt("return");
case 4:
if (!_this.props.directory) {
_context.next = 11;
break;
}
_context.next = 7;
return es_traverseFileTree(Array.prototype.slice.call(e.dataTransfer.items), function (_file) {
return attr_accept(_file, _this.props.accept);
});
case 7:
files = _context.sent;
_this.uploadFiles(files);
_context.next = 14;
break;
case 11:
_files = (0,toConsumableArray["default"])(e.dataTransfer.files).filter(function (file) {
return attr_accept(file, _this.props.accept);
});
if (multiple === false) {
_files = _files.slice(0, 1);
}
_this.uploadFiles(_files);
case 14:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x) {
return _ref.apply(this, arguments);
};
}());
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "uploadFiles", function (files) {
var originFiles = (0,toConsumableArray["default"])(files);
var postFiles = originFiles.map(function (file) {
// eslint-disable-next-line no-param-reassign
file.uid = uid_uid();
return _this.processFile(file, originFiles);
});
// Batch upload files
Promise.all(postFiles).then(function (fileList) {
var onBatchStart = _this.props.onBatchStart;
onBatchStart === null || onBatchStart === void 0 || onBatchStart(fileList.map(function (_ref2) {
var origin = _ref2.origin,
parsedFile = _ref2.parsedFile;
return {
file: origin,
parsedFile: parsedFile
};
}));
fileList.filter(function (file) {
return file.parsedFile !== null;
}).forEach(function (file) {
_this.post(file);
});
});
});
/**
* Process file before upload. When all the file is ready, we start upload.
*/
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "processFile", /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file, fileList) {
var beforeUpload, transformedFile, action, mergedAction, data, mergedData, parsedData, parsedFile, mergedParsedFile;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
beforeUpload = _this.props.beforeUpload;
transformedFile = file;
if (!beforeUpload) {
_context2.next = 14;
break;
}
_context2.prev = 3;
_context2.next = 6;
return beforeUpload(file, fileList);
case 6:
transformedFile = _context2.sent;
_context2.next = 12;
break;
case 9:
_context2.prev = 9;
_context2.t0 = _context2["catch"](3);
// Rejection will also trade as false
transformedFile = false;
case 12:
if (!(transformedFile === false)) {
_context2.next = 14;
break;
}
return _context2.abrupt("return", {
origin: file,
parsedFile: null,
action: null,
data: null
});
case 14:
// Get latest action
action = _this.props.action;
if (!(typeof action === 'function')) {
_context2.next = 21;
break;
}
_context2.next = 18;
return action(file);
case 18:
mergedAction = _context2.sent;
_context2.next = 22;
break;
case 21:
mergedAction = action;
case 22:
// Get latest data
data = _this.props.data;
if (!(typeof data === 'function')) {
_context2.next = 29;
break;
}
_context2.next = 26;
return data(file);
case 26:
mergedData = _context2.sent;
_context2.next = 30;
break;
case 29:
mergedData = data;
case 30:
parsedData =
// string type is from legacy `transformFile`.
// Not sure if this will work since no related test case works with it
((0,esm_typeof["default"])(transformedFile) === 'object' || typeof transformedFile === 'string') && transformedFile ? transformedFile : file;
if (parsedData instanceof File) {
parsedFile = parsedData;
} else {
parsedFile = new File([parsedData], file.name, {
type: file.type
});
}
mergedParsedFile = parsedFile;
mergedParsedFile.uid = file.uid;
return _context2.abrupt("return", {
origin: file,
data: mergedData,
parsedFile: mergedParsedFile,
action: mergedAction
});
case 35:
case "end":
return _context2.stop();
}
}, _callee2, null, [[3, 9]]);
}));
return function (_x2, _x3) {
return _ref3.apply(this, arguments);
};
}());
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "saveFileInput", function (node) {
_this.fileInput = node;
});
return _this;
}
(0,createClass["default"])(AjaxUploader, [{
key: "componentDidMount",
value: function componentDidMount() {
this._isMounted = true;
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this._isMounted = false;
this.abort();
}
}, {
key: "post",
value: function post(_ref4) {
var _this2 = this;
var data = _ref4.data,
origin = _ref4.origin,
action = _ref4.action,
parsedFile = _ref4.parsedFile;
if (!this._isMounted) {
return;
}
var _this$props2 = this.props,
onStart = _this$props2.onStart,
customRequest = _this$props2.customRequest,
name = _this$props2.name,
headers = _this$props2.headers,
withCredentials = _this$props2.withCredentials,
method = _this$props2.method;
var uid = origin.uid;
var request = customRequest || upload;
var requestOption = {
action: action,
filename: name,
data: data,
file: parsedFile,
headers: headers,
withCredentials: withCredentials,
method: method || 'post',
onProgress: function onProgress(e) {
var onProgress = _this2.props.onProgress;
onProgress === null || onProgress === void 0 || onProgress(e, parsedFile);
},
onSuccess: function onSuccess(ret, xhr) {
var onSuccess = _this2.props.onSuccess;
onSuccess === null || onSuccess === void 0 || onSuccess(ret, parsedFile, xhr);
delete _this2.reqs[uid];
},
onError: function onError(err, ret) {
var onError = _this2.props.onError;
onError === null || onError === void 0 || onError(err, ret, parsedFile);
delete _this2.reqs[uid];
}
};
onStart(origin);
this.reqs[uid] = request(requestOption);
}
}, {
key: "reset",
value: function reset() {
this.setState({
uid: uid_uid()
});
}
}, {
key: "abort",
value: function abort(file) {
var reqs = this.reqs;
if (file) {
var uid = file.uid ? file.uid : file;
if (reqs[uid] && reqs[uid].abort) {
reqs[uid].abort();
}
delete reqs[uid];
} else {
Object.keys(reqs).forEach(function (uid) {
if (reqs[uid] && reqs[uid].abort) {
reqs[uid].abort();
}
delete reqs[uid];
});
}
}
}, {
key: "render",
value: function render() {
var _this$props3 = this.props,
Tag = _this$props3.component,
prefixCls = _this$props3.prefixCls,
className = _this$props3.className,
_this$props3$classNam = _this$props3.classNames,
classNames = _this$props3$classNam === void 0 ? {} : _this$props3$classNam,
disabled = _this$props3.disabled,
id = _this$props3.id,
name = _this$props3.name,
style = _this$props3.style,
_this$props3$styles = _this$props3.styles,
styles = _this$props3$styles === void 0 ? {} : _this$props3$styles,
multiple = _this$props3.multiple,
accept = _this$props3.accept,
capture = _this$props3.capture,
children = _this$props3.children,
directory = _this$props3.directory,
openFileDialogOnClick = _this$props3.openFileDialogOnClick,
onMouseEnter = _this$props3.onMouseEnter,
onMouseLeave = _this$props3.onMouseLeave,
hasControlInside = _this$props3.hasControlInside,
otherProps = (0,objectWithoutProperties["default"])(_this$props3, AjaxUploader_excluded);
var cls = classnames_default()((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, prefixCls, true), "".concat(prefixCls, "-disabled"), disabled), className, className));
// because input don't have directory/webkitdirectory type declaration
var dirProps = directory ? {
directory: 'directory',
webkitdirectory: 'webkitdirectory'
} : {};
var events = disabled ? {} : {
onClick: openFileDialogOnClick ? this.onClick : function () {},
onKeyDown: openFileDialogOnClick ? this.onKeyDown : function () {},
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onDrop: this.onFileDrop,
onDragOver: this.onFileDrop,
tabIndex: hasControlInside ? undefined : '0'
};
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, (0,esm_extends["default"])({}, events, {
className: cls,
role: hasControlInside ? undefined : 'button',
style: style
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", (0,esm_extends["default"])({}, (0,pickAttrs["default"])(otherProps, {
aria: true,
data: true
}), {
id: id
/**
* https://github.com/ant-design/ant-design/issues/50643,
* https://github.com/react-component/upload/pull/575#issuecomment-2320646552
*/,
name: name,
disabled: disabled,
type: "file",
ref: this.saveFileInput,
onClick: function onClick(e) {
return e.stopPropagation();
} // https://github.com/ant-design/ant-design/issues/19948
,
key: this.state.uid,
style: (0,objectSpread2["default"])({
display: 'none'
}, styles.input),
className: classNames.input,
accept: accept
}, dirProps, {
multiple: multiple,
onChange: this.onChange
}, capture != null ? {
capture: capture
} : {})), children);
}
}]);
return AjaxUploader;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
/* harmony default export */ var es_AjaxUploader = (AjaxUploader);
;// ./node_modules/rc-upload/es/Upload.js
/* eslint react/prop-types:0 */
function Upload_empty() {}
var Upload = /*#__PURE__*/function (_Component) {
(0,inherits["default"])(Upload, _Component);
var _super = (0,createSuper["default"])(Upload);
function Upload() {
var _this;
(0,classCallCheck["default"])(this, Upload);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "uploader", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "saveUploader", function (node) {
_this.uploader = node;
});
return _this;
}
(0,createClass["default"])(Upload, [{
key: "abort",
value: function abort(file) {
this.uploader.abort(file);
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_AjaxUploader, (0,esm_extends["default"])({}, this.props, {
ref: this.saveUploader
}));
}
}]);
return Upload;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
(0,defineProperty["default"])(Upload, "defaultProps", {
component: 'span',
prefixCls: 'rc-upload',
data: {},
headers: {},
name: 'file',
multipart: false,
onStart: Upload_empty,
onError: Upload_empty,
onSuccess: Upload_empty,
multiple: false,
beforeUpload: null,
customRequest: null,
withCredentials: false,
openFileDialogOnClick: true,
hasControlInside: false
});
/* harmony default export */ var es_Upload = (Upload);
;// ./node_modules/rc-upload/es/index.js
/* harmony default export */ var rc_upload_es = (es_Upload);
// EXTERNAL MODULE: ./components/upload/style/index.ts + 5 modules
var upload_style = __webpack_require__("./components/upload/style/index.ts");
;// ./node_modules/@ant-design/icons-svg/es/asn/FileTwoTone.js
// This icon file is generated automatically.
var FileTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }] }; }, "name": "file", "theme": "twotone" };
/* harmony default export */ var asn_FileTwoTone = (FileTwoTone);
;// ./node_modules/@ant-design/icons/es/icons/FileTwoTone.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FileTwoTone_FileTwoTone = function FileTwoTone(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_FileTwoTone
}));
};
/** */
var FileTwoTone_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FileTwoTone_FileTwoTone);
if (true) {
FileTwoTone_RefIcon.displayName = 'FileTwoTone';
}
/* harmony default export */ var icons_FileTwoTone = (FileTwoTone_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/PaperClipOutlined.js
// This icon file is generated automatically.
var PaperClipOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z" } }] }, "name": "paper-clip", "theme": "outlined" };
/* harmony default export */ var asn_PaperClipOutlined = (PaperClipOutlined);
;// ./node_modules/@ant-design/icons/es/icons/PaperClipOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PaperClipOutlined_PaperClipOutlined = function PaperClipOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_PaperClipOutlined
}));
};
/** */
var PaperClipOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PaperClipOutlined_PaperClipOutlined);
if (true) {
PaperClipOutlined_RefIcon.displayName = 'PaperClipOutlined';
}
/* harmony default export */ var icons_PaperClipOutlined = (PaperClipOutlined_RefIcon);
;// ./node_modules/@ant-design/icons-svg/es/asn/PictureTwoTone.js
// This icon file is generated automatically.
var PictureTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M276 368a28 28 0 1056 0 28 28 0 10-56 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z", "fill": primaryColor } }] }; }, "name": "picture", "theme": "twotone" };
/* harmony default export */ var asn_PictureTwoTone = (PictureTwoTone);
;// ./node_modules/@ant-design/icons/es/icons/PictureTwoTone.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PictureTwoTone_PictureTwoTone = function PictureTwoTone(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_PictureTwoTone
}));
};
/** */
var PictureTwoTone_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PictureTwoTone_PictureTwoTone);
if (true) {
PictureTwoTone_RefIcon.displayName = 'PictureTwoTone';
}
/* harmony default export */ var icons_PictureTwoTone = (PictureTwoTone_RefIcon);
;// ./components/upload/utils.ts
function file2Obj(file) {
return Object.assign(Object.assign({}, file), {
lastModified: file.lastModified,
lastModifiedDate: file.lastModifiedDate,
name: file.name,
size: file.size,
type: file.type,
uid: file.uid,
percent: 0,
originFileObj: file
});
}
/** Upload fileList. Replace file if exist or just push into it. */
function updateFileList(file, fileList) {
const nextFileList = (0,toConsumableArray["default"])(fileList);
const fileIndex = nextFileList.findIndex(_ref => {
let {
uid
} = _ref;
return uid === file.uid;
});
if (fileIndex === -1) {
nextFileList.push(file);
} else {
nextFileList[fileIndex] = file;
}
return nextFileList;
}
function getFileItem(file, fileList) {
const matchKey = file.uid !== undefined ? 'uid' : 'name';
return fileList.filter(item => item[matchKey] === file[matchKey])[0];
}
function removeFileItem(file, fileList) {
const matchKey = file.uid !== undefined ? 'uid' : 'name';
const removed = fileList.filter(item => item[matchKey] !== file[matchKey]);
if (removed.length === fileList.length) {
return null;
}
return removed;
}
// ==================== Default Image Preview ====================
const extname = function () {
let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
const temp = url.split('/');
const filename = temp[temp.length - 1];
const filenameWithoutSuffix = filename.split(/#|\?/)[0];
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
};
const isImageFileType = type => type.indexOf('image/') === 0;
const isImageUrl = file => {
if (file.type && !file.thumbUrl) {
return isImageFileType(file.type);
}
const url = file.thumbUrl || file.url || '';
const extension = extname(url);
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(extension)) {
return true;
}
if (/^data:/.test(url)) {
// other file types of base64
return false;
}
if (extension) {
// other file types which have extension
return false;
}
return true;
};
const MEASURE_SIZE = 200;
function previewImage(file) {
return new Promise(resolve => {
if (!file.type || !isImageFileType(file.type)) {
resolve('');
return;
}
const canvas = document.createElement('canvas');
canvas.width = MEASURE_SIZE;
canvas.height = MEASURE_SIZE;
canvas.style.cssText = `position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`;
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
const img = new Image();
img.onload = () => {
const {
width,
height
} = img;
let drawWidth = MEASURE_SIZE;
let drawHeight = MEASURE_SIZE;
let offsetX = 0;
let offsetY = 0;
if (width > height) {
drawHeight = height * (MEASURE_SIZE / width);
offsetY = -(drawHeight - drawWidth) / 2;
} else {
drawWidth = width * (MEASURE_SIZE / height);
offsetX = -(drawWidth - drawHeight) / 2;
}
ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight);
const dataURL = canvas.toDataURL();
document.body.removeChild(canvas);
window.URL.revokeObjectURL(img.src);
resolve(dataURL);
};
img.crossOrigin = 'anonymous';
if (file.type.startsWith('image/svg+xml')) {
const reader = new FileReader();
reader.onload = () => {
if (reader.result && typeof reader.result === 'string') {
img.src = reader.result;
}
};
reader.readAsDataURL(file);
} else if (file.type.startsWith('image/gif')) {
const reader = new FileReader();
reader.onload = () => {
if (reader.result) {
resolve(reader.result);
}
};
reader.readAsDataURL(file);
} else {
img.src = window.URL.createObjectURL(file);
}
});
}
;// ./node_modules/@ant-design/icons-svg/es/asn/DownloadOutlined.js
// This icon file is generated automatically.
var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" };
/* harmony default export */ var asn_DownloadOutlined = (DownloadOutlined);
;// ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DownloadOutlined_DownloadOutlined = function DownloadOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_DownloadOutlined
}));
};
/** */
var DownloadOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DownloadOutlined_DownloadOutlined);
if (true) {
DownloadOutlined_RefIcon.displayName = 'DownloadOutlined';
}
/* harmony default export */ var icons_DownloadOutlined = (DownloadOutlined_RefIcon);
;// ./components/upload/UploadList/ListItem.tsx
const ListItem_ListItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
let {
prefixCls,
className,
style,
locale,
listType,
file,
items,
progress: progressProps,
iconRender,
actionIconRender,
itemRender,
isImgUrl,
showPreviewIcon,
showRemoveIcon,
showDownloadIcon,
previewIcon: customPreviewIcon,
removeIcon: customRemoveIcon,
downloadIcon: customDownloadIcon,
extra: customExtra,
onPreview,
onDownload,
onClose
} = _ref;
var _a, _b;
// Status: which will ignore `removed` status
const {
status
} = file;
const [mergedStatus, setMergedStatus] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(status);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (status !== 'removed') {
setMergedStatus(status);
}
}, [status]);
// Delay to show the progress bar
const [showProgress, setShowProgress] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
const timer = setTimeout(() => {
setShowProgress(true);
}, 300);
return () => {
clearTimeout(timer);
};
}, []);
const iconNode = iconRender(file);
let icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-icon`
}, iconNode);
if (listType === 'picture' || listType === 'picture-card' || listType === 'picture-circle') {
if (mergedStatus === 'uploading' || !file.thumbUrl && !file.url) {
const uploadingClassName = classnames_default()(`${prefixCls}-list-item-thumbnail`, {
[`${prefixCls}-list-item-file`]: mergedStatus !== 'uploading'
});
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: uploadingClassName
}, iconNode);
} else {
const thumbnail = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", {
src: file.thumbUrl || file.url,
alt: file.name,
className: `${prefixCls}-list-item-image`,
crossOrigin: file.crossOrigin
})) : iconNode;
const aClassName = classnames_default()(`${prefixCls}-list-item-thumbnail`, {
[`${prefixCls}-list-item-file`]: isImgUrl && !isImgUrl(file)
});
icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
className: aClassName,
onClick: e => onPreview(file, e),
href: file.url || file.thumbUrl,
target: "_blank",
rel: "noopener noreferrer"
}, thumbnail);
}
}
const listItemClassName = classnames_default()(`${prefixCls}-list-item`, `${prefixCls}-list-item-${mergedStatus}`);
const linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
const removeIcon = (typeof showRemoveIcon === 'function' ? showRemoveIcon(file) : showRemoveIcon) ? actionIconRender((typeof customRemoveIcon === 'function' ? customRemoveIcon(file) : customRemoveIcon) || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DeleteOutlined, null)), () => onClose(file), prefixCls, locale.removeFile,
// acceptUploadDisabled is true, only remove icon will follow Upload disabled prop
// https://github.com/ant-design/ant-design/issues/46171
true) : null;
const downloadIcon = (typeof showDownloadIcon === 'function' ? showDownloadIcon(file) : showDownloadIcon) && mergedStatus === 'done' ? actionIconRender((typeof customDownloadIcon === 'function' ? customDownloadIcon(file) : customDownloadIcon) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownloadOutlined, null), () => onDownload(file), prefixCls, locale.downloadFile) : null;
const downloadOrDelete = listType !== 'picture-card' && listType !== 'picture-circle' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: "download-delete",
className: classnames_default()(`${prefixCls}-list-item-actions`, {
picture: listType === 'picture'
})
}, downloadIcon, removeIcon));
const extraContent = typeof customExtra === 'function' ? customExtra(file) : customExtra;
const extra = extraContent && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-list-item-extra`
}, extraContent));
const listItemNameClass = classnames_default()(`${prefixCls}-list-item-name`);
const fileName = file.url ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", Object.assign({
key: "view",
target: "_blank",
rel: "noopener noreferrer",
className: listItemNameClass,
title: file.name
}, linkProps, {
href: file.url,
onClick: e => onPreview(file, e)
}), file.name, extra)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
key: "view",
className: listItemNameClass,
onClick: e => onPreview(file, e),
title: file.name
}, file.name, extra));
const previewIcon = (typeof showPreviewIcon === 'function' ? showPreviewIcon(file) : showPreviewIcon) && (file.url || file.thumbUrl) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
href: file.url || file.thumbUrl,
target: "_blank",
rel: "noopener noreferrer",
onClick: e => onPreview(file, e),
title: locale.previewFile
}, typeof customPreviewIcon === 'function' ? customPreviewIcon(file) : customPreviewIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeOutlined, null))) : null;
const pictureCardActions = (listType === 'picture-card' || listType === 'picture-circle') && mergedStatus !== 'uploading' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: `${prefixCls}-list-item-actions`
}, previewIcon, mergedStatus === 'done' && downloadIcon, removeIcon));
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const rootPrefixCls = getPrefixCls();
const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: listItemClassName
}, icon, fileName, downloadOrDelete, pictureCardActions, showProgress && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
motionName: `${rootPrefixCls}-fade`,
visible: mergedStatus === 'uploading',
motionDeadline: 2000
}, _ref2 => {
let {
className: motionClassName
} = _ref2;
// show loading icon if upload progress listener is disabled
const loadingProgress = 'percent' in file ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_progress, Object.assign({}, progressProps, {
type: "line",
percent: file.percent,
"aria-label": file['aria-label'],
"aria-labelledby": file['aria-labelledby']
}))) : null;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-list-item-progress`, motionClassName)
}, loadingProgress);
})));
const message = file.response && typeof file.response === 'string' ? file.response : ((_a = file.error) === null || _a === void 0 ? void 0 : _a.statusText) || ((_b = file.error) === null || _b === void 0 ? void 0 : _b.message) || locale.uploadError;
const item = mergedStatus === 'error' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
title: message,
getPopupContainer: node => node.parentNode
}, dom)) : dom;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: classnames_default()(`${prefixCls}-list-item-container`, className),
style: style,
ref: ref
}, itemRender ? itemRender(item, file, items, {
download: onDownload.bind(null, file),
preview: onPreview.bind(null, file),
remove: onClose.bind(null, file)
}) : item);
});
/* harmony default export */ var UploadList_ListItem = (ListItem_ListItem);
;// ./components/upload/UploadList/index.tsx
const InternalUploadList = (props, ref) => {
const {
listType = 'text',
previewFile = previewImage,
onPreview,
onDownload,
onRemove,
locale,
iconRender,
isImageUrl: isImgUrl = isImageUrl,
prefixCls: customizePrefixCls,
items = [],
showPreviewIcon = true,
showRemoveIcon = true,
showDownloadIcon = false,
removeIcon,
previewIcon,
downloadIcon,
extra,
progress = {
size: [-1, 2],
showInfo: false
},
appendAction,
appendActionVisible = true,
itemRender,
disabled
} = props;
const forceUpdate = useForceUpdate();
const [motionAppear, setMotionAppear] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
const isPictureCardOrCirle = ['picture-card', 'picture-circle'].includes(listType);
// ============================= Effect =============================
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
if (!listType.startsWith('picture')) {
return;
}
(items || []).forEach(file => {
if (!(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) {
return;
}
file.thumbUrl = '';
previewFile === null || previewFile === void 0 ? void 0 : previewFile(file.originFileObj).then(previewDataUrl => {
// Need append '' to avoid dead loop
file.thumbUrl = previewDataUrl || '';
forceUpdate();
});
});
}, [listType, items, previewFile]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
setMotionAppear(true);
}, []);
// ============================= Events =============================
const onInternalPreview = (file, e) => {
if (!onPreview) {
return;
}
e === null || e === void 0 ? void 0 : e.preventDefault();
return onPreview(file);
};
const onInternalDownload = file => {
if (typeof onDownload === 'function') {
onDownload(file);
} else if (file.url) {
window.open(file.url);
}
};
const onInternalClose = file => {
onRemove === null || onRemove === void 0 ? void 0 : onRemove(file);
};
const internalIconRender = file => {
if (iconRender) {
return iconRender(file, listType);
}
const isLoading = file.status === 'uploading';
if (listType.startsWith('picture')) {
const loadingIcon = listType === 'picture' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null) : locale.uploading;
const fileIcon = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PictureTwoTone, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FileTwoTone, null);
return isLoading ? loadingIcon : fileIcon;
}
return isLoading ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PaperClipOutlined, null);
};
const actionIconRender = (customIcon, callback, prefixCls, title, acceptUploadDisabled) => {
const btnProps = {
type: 'text',
size: 'small',
title,
onClick: e => {
var _a, _b;
callback();
if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(customIcon)) {
(_b = (_a = customIcon.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
}
},
className: `${prefixCls}-list-item-action`
};
if (acceptUploadDisabled) {
btnProps.disabled = disabled;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(customIcon) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({}, btnProps, {
icon: (0,reactNode.cloneElement)(customIcon, Object.assign(Object.assign({}, customIcon.props), {
onClick: () => {}
}))
}))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({}, btnProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, customIcon)));
};
// ============================== Ref ===============================
// Test needs
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
handlePreview: onInternalPreview,
handleDownload: onInternalDownload
}));
const {
getPrefixCls
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
// ============================= Render =============================
const prefixCls = getPrefixCls('upload', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const listClassNames = classnames_default()(`${prefixCls}-list`, `${prefixCls}-list-${listType}`);
const listItemMotion = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,omit["default"])((0,_util_motion["default"])(rootPrefixCls), ['onAppearEnd', 'onEnterEnd', 'onLeaveEnd']), [rootPrefixCls]);
const motionConfig = Object.assign(Object.assign({}, isPictureCardOrCirle ? {} : listItemMotion), {
motionDeadline: 2000,
motionName: `${prefixCls}-${isPictureCardOrCirle ? 'animate-inline' : 'animate'}`,
keys: (0,toConsumableArray["default"])(items.map(file => ({
key: file.uid,
file
}))),
motionAppear
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: listClassNames
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es.CSSMotionList, Object.assign({}, motionConfig, {
component: false
}), _ref => {
let {
key,
file,
className: motionClassName,
style: motionStyle
} = _ref;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UploadList_ListItem, {
key: key,
locale: locale,
prefixCls: prefixCls,
className: motionClassName,
style: motionStyle,
file: file,
items: items,
progress: progress,
listType: listType,
isImgUrl: isImgUrl,
showPreviewIcon: showPreviewIcon,
showRemoveIcon: showRemoveIcon,
showDownloadIcon: showDownloadIcon,
removeIcon: removeIcon,
previewIcon: previewIcon,
downloadIcon: downloadIcon,
extra: extra,
iconRender: internalIconRender,
actionIconRender: actionIconRender,
itemRender: itemRender,
onPreview: onInternalPreview,
onDownload: onInternalDownload,
onClose: onInternalClose
});
}), appendAction && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], Object.assign({}, motionConfig, {
visible: appendActionVisible,
forceRender: true
}), _ref2 => {
let {
className: motionClassName,
style: motionStyle
} = _ref2;
return (0,reactNode.cloneElement)(appendAction, oriProps => ({
className: classnames_default()(oriProps.className, motionClassName),
style: Object.assign(Object.assign(Object.assign({}, motionStyle), {
// prevent the element has hover css pseudo-class that may cause animation to end prematurely.
pointerEvents: motionClassName ? 'none' : undefined
}), oriProps.style)
}));
})));
};
const UploadList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalUploadList);
if (true) {
UploadList.displayName = 'UploadList';
}
/* harmony default export */ var upload_UploadList = (UploadList);
;// ./components/upload/Upload.tsx
var Upload_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;
const InternalUpload = (props, ref) => {
const {
fileList,
defaultFileList,
onRemove,
showUploadList = true,
listType = 'text',
onPreview,
onDownload,
onChange,
onDrop,
previewFile,
disabled: customDisabled,
locale: propLocale,
iconRender,
isImageUrl,
progress,
prefixCls: customizePrefixCls,
className,
type = 'select',
children,
style,
itemRender,
maxCount,
data = {},
multiple = false,
hasControlInside = true,
action = '',
accept = '',
supportServerRender = true,
rootClassName
} = props;
// ===================== Disabled =====================
const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const [mergedFileList, setMergedFileList] = (0,useMergedState["default"])(defaultFileList || [], {
value: fileList,
postState: list => list !== null && list !== void 0 ? list : []
});
const [dragState, setDragState] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('drop');
const upload = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
const wrapRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
if (true) {
const warning = (0,_util_warning.devUseWarning)('Upload');
true ? warning('fileList' in props || !('value' in props), 'usage', '`value` is not a valid prop, do you mean `fileList`?') : 0;
warning.deprecated(!('transformFile' in props), 'transformFile', 'beforeUpload');
}
// Control mode will auto fill file uid if not provided
external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const timestamp = Date.now();
(fileList || []).forEach((file, index) => {
if (!file.uid && !Object.isFrozen(file)) {
file.uid = `__AUTO__${timestamp}_${index}__`;
}
});
}, [fileList]);
const onInternalChange = (file, changedFileList, event) => {
let cloneList = (0,toConsumableArray["default"])(changedFileList);
let exceedMaxCount = false;
// Cut to match count
if (maxCount === 1) {
cloneList = cloneList.slice(-1);
} else if (maxCount) {
exceedMaxCount = cloneList.length > maxCount;
cloneList = cloneList.slice(0, maxCount);
}
// Prevent React18 auto batch since input[upload] trigger process at same time
// which makes fileList closure problem
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(() => {
setMergedFileList(cloneList);
});
const changeInfo = {
file: file,
fileList: cloneList
};
if (event) {
changeInfo.event = event;
}
if (!exceedMaxCount || file.status === 'removed' ||
// We should ignore event if current file is exceed `maxCount`
cloneList.some(f => f.uid === file.uid)) {
(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(() => {
onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);
});
}
};
const mergedBeforeUpload = (file, fileListArgs) => Upload_awaiter(void 0, void 0, void 0, function* () {
const {
beforeUpload,
transformFile
} = props;
let parsedFile = file;
if (beforeUpload) {
const result = yield beforeUpload(file, fileListArgs);
if (result === false) {
return false;
}
// Hack for LIST_IGNORE, we add additional info to remove from the list
delete file[LIST_IGNORE];
if (result === LIST_IGNORE) {
Object.defineProperty(file, LIST_IGNORE, {
value: true,
configurable: true
});
return false;
}
if (typeof result === 'object' && result) {
parsedFile = result;
}
}
if (transformFile) {
parsedFile = yield transformFile(parsedFile);
}
return parsedFile;
});
const onBatchStart = batchFileInfoList => {
// Skip file which marked as `LIST_IGNORE`, these file will not add to file list
const filteredFileInfoList = batchFileInfoList.filter(info => !info.file[LIST_IGNORE]);
// Nothing to do since no file need upload
if (!filteredFileInfoList.length) {
return;
}
const objectFileList = filteredFileInfoList.map(info => file2Obj(info.file));
// Concat new files with prev files
let newFileList = (0,toConsumableArray["default"])(mergedFileList);
objectFileList.forEach(fileObj => {
// Replace file if exist
newFileList = updateFileList(fileObj, newFileList);
});
objectFileList.forEach((fileObj, index) => {
// Repeat trigger `onChange` event for compatible
let triggerFileObj = fileObj;
if (!filteredFileInfoList[index].parsedFile) {
// `beforeUpload` return false
const {
originFileObj
} = fileObj;
let clone;
try {
clone = new File([originFileObj], originFileObj.name, {
type: originFileObj.type
});
} catch (_a) {
clone = new Blob([originFileObj], {
type: originFileObj.type
});
clone.name = originFileObj.name;
clone.lastModifiedDate = new Date();
clone.lastModified = new Date().getTime();
}
clone.uid = fileObj.uid;
triggerFileObj = clone;
} else {
// Inject `uploading` status
fileObj.status = 'uploading';
}
onInternalChange(triggerFileObj, newFileList);
});
};
const onSuccess = (response, file, xhr) => {
try {
if (typeof response === 'string') {
// biome-ignore lint/style/noParameterAssign: we need to modify response
response = JSON.parse(response);
}
} catch (_a) {
/* do nothing */
}
// removed
if (!getFileItem(file, mergedFileList)) {
return;
}
const targetItem = file2Obj(file);
targetItem.status = 'done';
targetItem.percent = 100;
targetItem.response = response;
targetItem.xhr = xhr;
const nextFileList = updateFileList(targetItem, mergedFileList);
onInternalChange(targetItem, nextFileList);
};
const onProgress = (e, file) => {
// removed
if (!getFileItem(file, mergedFileList)) {
return;
}
const targetItem = file2Obj(file);
targetItem.status = 'uploading';
targetItem.percent = e.percent;
const nextFileList = updateFileList(targetItem, mergedFileList);
onInternalChange(targetItem, nextFileList, e);
};
const onError = (error, response, file) => {
// removed
if (!getFileItem(file, mergedFileList)) {
return;
}
const targetItem = file2Obj(file);
targetItem.error = error;
targetItem.response = response;
targetItem.status = 'error';
const nextFileList = updateFileList(targetItem, mergedFileList);
onInternalChange(targetItem, nextFileList);
};
const handleRemove = file => {
let currentFile;
Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => {
var _a;
// Prevent removing file
if (ret === false) {
return;
}
const removedFileList = removeFileItem(file, mergedFileList);
if (removedFileList) {
currentFile = Object.assign(Object.assign({}, file), {
status: 'removed'
});
mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(item => {
const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';
if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {
item.status = 'removed';
}
});
(_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);
onInternalChange(currentFile, removedFileList);
}
});
};
const onFileDrop = e => {
setDragState(e.type);
if (e.type === 'drop') {
onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);
}
};
// Test needs
external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
onBatchStart,
onSuccess,
onProgress,
onError,
fileList: mergedFileList,
upload: upload.current,
nativeElement: wrapRef.current
}));
const {
getPrefixCls,
direction,
upload: ctxUpload
} = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
const prefixCls = getPrefixCls('upload', customizePrefixCls);
const rcUploadProps = Object.assign(Object.assign({
onBatchStart,
onError,
onProgress,
onSuccess
}, props), {
data,
multiple,
action,
accept,
supportServerRender,
prefixCls,
disabled: mergedDisabled,
beforeUpload: mergedBeforeUpload,
onChange: undefined,
hasControlInside
});
delete rcUploadProps.className;
delete rcUploadProps.style;
// Remove id to avoid open by label when trigger is hidden
// !children: https://github.com/ant-design/ant-design/issues/14298
// disabled: https://github.com/ant-design/ant-design/issues/16478
// https://github.com/ant-design/ant-design/issues/24197
if (!children || mergedDisabled) {
delete rcUploadProps.id;
}
const wrapperCls = `${prefixCls}-wrapper`;
const [wrapCSSVar, hashId, cssVarCls] = (0,upload_style["default"])(prefixCls, wrapperCls);
const [contextLocale] = (0,useLocale["default"])('Upload', en_US["default"].Upload);
const {
showRemoveIcon,
showPreviewIcon,
showDownloadIcon,
removeIcon,
previewIcon,
downloadIcon,
extra
} = typeof showUploadList === 'boolean' ? {} : showUploadList;
// use showRemoveIcon if it is specified explicitly
const realShowRemoveIcon = typeof showRemoveIcon === 'undefined' ? !mergedDisabled : showRemoveIcon;
const renderUploadList = (button, buttonVisible) => {
if (!showUploadList) {
return button;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(upload_UploadList, {
prefixCls: prefixCls,
listType: listType,
items: mergedFileList,
previewFile: previewFile,
onPreview: onPreview,
onDownload: onDownload,
onRemove: handleRemove,
showRemoveIcon: realShowRemoveIcon,
showPreviewIcon: showPreviewIcon,
showDownloadIcon: showDownloadIcon,
removeIcon: removeIcon,
previewIcon: previewIcon,
downloadIcon: downloadIcon,
iconRender: iconRender,
extra: extra,
locale: Object.assign(Object.assign({}, contextLocale), propLocale),
isImageUrl: isImageUrl,
progress: progress,
appendAction: button,
appendActionVisible: buttonVisible,
itemRender: itemRender,
disabled: mergedDisabled
});
};
const mergedCls = classnames_default()(wrapperCls, className, rootClassName, hashId, cssVarCls, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.className, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-picture-card-wrapper`]: listType === 'picture-card',
[`${prefixCls}-picture-circle-wrapper`]: listType === 'picture-circle'
});
const mergedStyle = Object.assign(Object.assign({}, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.style), style);
// ======================== Render ========================
if (type === 'drag') {
const dragCls = classnames_default()(hashId, prefixCls, `${prefixCls}-drag`, {
[`${prefixCls}-drag-uploading`]: mergedFileList.some(file => file.status === 'uploading'),
[`${prefixCls}-drag-hover`]: dragState === 'dragover',
[`${prefixCls}-disabled`]: mergedDisabled,
[`${prefixCls}-rtl`]: direction === 'rtl'
});
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: mergedCls,
ref: wrapRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: dragCls,
style: mergedStyle,
onDrop: onFileDrop,
onDragOver: onFileDrop,
onDragLeave: onFileDrop
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_upload_es, Object.assign({}, rcUploadProps, {
ref: upload,
className: `${prefixCls}-btn`
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: `${prefixCls}-drag-container`
}, children))), renderUploadList()));
}
const uploadBtnCls = classnames_default()(prefixCls, `${prefixCls}-select`, {
[`${prefixCls}-disabled`]: mergedDisabled,
[`${prefixCls}-hidden`]: !children
});
const uploadButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
className: uploadBtnCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_upload_es, Object.assign({}, rcUploadProps, {
ref: upload
})));
if (listType === 'picture-card' || listType === 'picture-circle') {
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: mergedCls,
ref: wrapRef
}, renderUploadList(uploadButton, !!children)));
}
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
className: mergedCls,
ref: wrapRef
}, uploadButton, renderUploadList()));
};
const Upload_Upload = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalUpload);
if (true) {
Upload_Upload.displayName = 'Upload';
}
/* harmony default export */ var upload_Upload = (Upload_Upload);
;// ./components/upload/Dragger.tsx
var Dragger_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;
};
const Dragger = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_a, ref) => {
var {
style,
height,
hasControlInside = false
} = _a,
restProps = Dragger_rest(_a, ["style", "height", "hasControlInside"]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(upload_Upload, Object.assign({
ref: ref,
hasControlInside: hasControlInside
}, restProps, {
type: "drag",
style: Object.assign(Object.assign({}, style), {
height
})
}));
});
if (true) {
Dragger.displayName = 'Dragger';
}
/* harmony default export */ var upload_Dragger = (Dragger);
;// ./components/upload/index.tsx
const components_upload_Upload = upload_Upload;
components_upload_Upload.Dragger = upload_Dragger;
components_upload_Upload.LIST_IGNORE = LIST_IGNORE;
/* harmony default export */ var components_upload = (components_upload_Upload);
// EXTERNAL MODULE: ./components/version/index.tsx + 1 modules
var components_version = __webpack_require__("./components/version/index.tsx");
;// ./node_modules/@rc-component/mutate-observer/es/wrapper.js
var wrapper_DomWrapper = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(DomWrapper, _React$Component);
var _super = (0,createSuper["default"])(DomWrapper);
function DomWrapper() {
(0,classCallCheck["default"])(this, DomWrapper);
return _super.apply(this, arguments);
}
(0,createClass["default"])(DomWrapper, [{
key: "render",
value: function render() {
return this.props.children;
}
}]);
return DomWrapper;
}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
/* harmony default export */ var wrapper = (wrapper_DomWrapper);
;// ./node_modules/@rc-component/mutate-observer/es/useMutateObserver.js
var defaultOptions = {
subtree: true,
childList: true,
attributeFilter: ['style', 'class']
};
function useMutateObserver(nodeOrList, callback) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOptions;
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
if (!(0,canUseDom["default"])() || !nodeOrList) {
return;
}
var instance;
var nodeList = Array.isArray(nodeOrList) ? nodeOrList : [nodeOrList];
if ('MutationObserver' in window) {
instance = new MutationObserver(callback);
nodeList.forEach(function (element) {
instance.observe(element, options);
});
}
return function () {
var _instance, _instance2;
(_instance = instance) === null || _instance === void 0 ? void 0 : _instance.takeRecords();
(_instance2 = instance) === null || _instance2 === void 0 ? void 0 : _instance2.disconnect();
};
}, [options, nodeOrList]);
}
;// ./node_modules/@rc-component/mutate-observer/es/MutateObserver.js
var MutateObserver = function MutateObserver(props) {
var children = props.children,
options = props.options,
_props$onMutate = props.onMutate,
onMutate = _props$onMutate === void 0 ? function () {} : _props$onMutate;
var callback = (0,useEvent["default"])(onMutate);
var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
var canRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children) && (0,es_ref.supportRef)(children);
var mergedRef = (0,es_ref.useComposeRef)(elementRef, canRef ? children.ref : null);
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
_React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
target = _React$useState2[0],
setTarget = _React$useState2[1];
useMutateObserver(target, callback, options);
// =========================== Effect ===========================
// Bind target
(0,useLayoutEffect["default"])(function () {
setTarget((0,findDOMNode["default"])(elementRef.current) || (0,findDOMNode["default"])(wrapperRef.current));
});
// =========================== Render ===========================
if (!children) {
if (true) {
console.error('MutationObserver need children props');
}
return null;
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(wrapper, {
ref: wrapperRef
}, canRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
ref: mergedRef
}) : children);
};
/* harmony default export */ var es_MutateObserver = (MutateObserver);
;// ./node_modules/@rc-component/mutate-observer/es/index.js
/* harmony default export */ var mutate_observer_es = (es_MutateObserver);
;// ./components/watermark/useClips.ts
const FontGap = 3;
function prepareCanvas(width, height) {
let ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const realWidth = width * ratio;
const realHeight = height * ratio;
canvas.setAttribute('width', `${realWidth}px`);
canvas.setAttribute('height', `${realHeight}px`);
ctx.save();
return [ctx, canvas, realWidth, realHeight];
}
/**
* Get the clips of text content.
* This is a lazy hook function since SSR no need this
*/
function useClips() {
// Get single clips
function getClips(content, rotate, ratio, width, height, font, gapX, gapY) {
// ================= Text / Image =================
const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
if (content instanceof HTMLImageElement) {
// Image
ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
} else {
// Text
const {
color,
fontSize,
fontStyle,
fontWeight,
fontFamily,
textAlign
} = font;
const mergedFontSize = Number(fontSize) * ratio;
ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
ctx.fillStyle = color;
ctx.textAlign = textAlign;
ctx.textBaseline = 'top';
const contents = toList(content);
contents === null || contents === void 0 ? void 0 : contents.forEach((item, index) => {
ctx.fillText(item !== null && item !== void 0 ? item : '', contentWidth / 2, index * (mergedFontSize + FontGap * ratio));
});
}
// ==================== Rotate ====================
const angle = Math.PI / 180 * Number(rotate);
const maxSize = Math.max(width, height);
const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
// Copy from `ctx` and rotate
rCtx.translate(realMaxSize / 2, realMaxSize / 2);
rCtx.rotate(angle);
if (contentWidth > 0 && contentHeight > 0) {
rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
}
// Get boundary of rotated text
function getRotatePos(x, y) {
const targetX = x * Math.cos(angle) - y * Math.sin(angle);
const targetY = x * Math.sin(angle) + y * Math.cos(angle);
return [targetX, targetY];
}
let left = 0;
let right = 0;
let top = 0;
let bottom = 0;
const halfWidth = contentWidth / 2;
const halfHeight = contentHeight / 2;
const points = [[0 - halfWidth, 0 - halfHeight], [0 + halfWidth, 0 - halfHeight], [0 + halfWidth, 0 + halfHeight], [0 - halfWidth, 0 + halfHeight]];
points.forEach(_ref => {
let [x, y] = _ref;
const [targetX, targetY] = getRotatePos(x, y);
left = Math.min(left, targetX);
right = Math.max(right, targetX);
top = Math.min(top, targetY);
bottom = Math.max(bottom, targetY);
});
const cutLeft = left + realMaxSize / 2;
const cutTop = top + realMaxSize / 2;
const cutWidth = right - left;
const cutHeight = bottom - top;
// ================ Fill Alternate ================
const realGapX = gapX * ratio;
const realGapY = gapY * ratio;
const filledWidth = (cutWidth + realGapX) * 2;
const filledHeight = cutHeight + realGapY;
const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
function drawImg() {
let targetX = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
let targetY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY, cutWidth, cutHeight);
}
drawImg();
drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio];
}
return getClips;
}
;// ./components/watermark/useRafDebounce.ts
/**
* Callback will only execute last one for each raf
*/
function useRafDebounce(callback) {
const executeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(false);
const rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
const wrapperCallback = (0,useEvent["default"])(callback);
return () => {
if (executeRef.current) {
return;
}
executeRef.current = true;
wrapperCallback();
rafRef.current = (0,raf["default"])(() => {
executeRef.current = false;
});
};
}
;// ./components/watermark/useSingletonCache.ts
/**
* Singleton cache will only take latest `cacheParams` as key
* and return the result for callback matching.
*/
function useSingletonCache() {
const cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([null, null]);
const getCache = (cacheKeys, callback) => {
const filteredKeys = cacheKeys.map(item => item instanceof HTMLElement || isNaN(item) ? '' : item);
if (!(0,isEqual["default"])(cacheRef.current[0], filteredKeys)) {
cacheRef.current = [filteredKeys, callback()];
}
return cacheRef.current[1];
};
return getCache;
}
;// ./components/watermark/utils.ts
/** converting camel-cased strings to be lowercase and link it with Separator */
function toLowercaseSeparator(key) {
return key.replace(/([A-Z])/g, '-$1').toLowerCase();
}
function getStyleStr(style) {
return Object.keys(style).map(key => `${toLowercaseSeparator(key)}: ${style[key]};`).join(' ');
}
/** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
function getPixelRatio() {
return window.devicePixelRatio || 1;
}
/** Whether to re-render the watermark */
const reRendering = (mutation, isWatermarkEle) => {
let flag = false;
// Whether to delete the watermark node
if (mutation.removedNodes.length) {
flag = Array.from(mutation.removedNodes).some(node => isWatermarkEle(node));
}
// Whether the watermark dom property value has been modified
if (mutation.type === 'attributes' && isWatermarkEle(mutation.target)) {
flag = true;
}
return flag;
};
;// ./components/watermark/useWatermark.ts
/**
* Base size of the canvas, 1 for parallel layout and 2 for alternate layout
* Only alternate layout is currently supported
*/
const BaseSize = 2;
const useWatermark_FontGap = 3;
// Prevent external hidden elements from adding accent styles
const emphasizedStyle = {
visibility: 'visible !important'
};
function useWatermark(markStyle) {
const watermarkMap = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(new Map());
const appendWatermark = (base64Url, markWidth, container) => {
if (container) {
if (!watermarkMap.current.get(container)) {
const newWatermarkEle = document.createElement('div');
watermarkMap.current.set(container, newWatermarkEle);
}
const watermarkEle = watermarkMap.current.get(container);
watermarkEle.setAttribute('style', getStyleStr(Object.assign(Object.assign(Object.assign({}, markStyle), {
backgroundImage: `url('${base64Url}')`,
backgroundSize: `${Math.floor(markWidth)}px`
}), emphasizedStyle)));
// Prevents using the browser `Hide Element` to hide watermarks
watermarkEle.removeAttribute('class');
watermarkEle.removeAttribute('hidden');
if (watermarkEle.parentElement !== container) {
container.append(watermarkEle);
}
}
return watermarkMap.current.get(container);
};
const removeWatermark = container => {
const watermarkEle = watermarkMap.current.get(container);
if (watermarkEle && container) {
container.removeChild(watermarkEle);
}
watermarkMap.current.delete(container);
};
const isWatermarkEle = ele => Array.from(watermarkMap.current.values()).includes(ele);
return [appendWatermark, removeWatermark, isWatermarkEle];
}
;// ./components/watermark/index.tsx
/**
* Only return `next` when size changed.
* This is only used for elements compare, not a shallow equal!
*/
function getSizeDiff(prev, next) {
return prev.size === next.size ? prev : next;
}
const DEFAULT_GAP_X = 100;
const DEFAULT_GAP_Y = 100;
const fixedStyle = {
position: 'relative',
overflow: 'hidden'
};
const Watermark = props => {
var _a, _b;
const {
/**
* The antd content layer zIndex is basically below 10
* https://github.com/ant-design/ant-design/blob/6192403b2ce517c017f9e58a32d58774921c10cd/components/style/themes/default.less#L335
*/
zIndex = 9,
rotate = -22,
width,
height,
image,
content,
font = {},
style,
className,
rootClassName,
gap = [DEFAULT_GAP_X, DEFAULT_GAP_Y],
offset,
children,
inherit = true
} = props;
const mergedStyle = Object.assign(Object.assign({}, fixedStyle), style);
const [, token] = (0,useToken["default"])();
const {
color = token.colorFill,
fontSize = token.fontSizeLG,
fontWeight = 'normal',
fontStyle = 'normal',
fontFamily = 'sans-serif',
textAlign = 'center'
} = font;
const [gapX = DEFAULT_GAP_X, gapY = DEFAULT_GAP_Y] = gap;
const gapXCenter = gapX / 2;
const gapYCenter = gapY / 2;
const offsetLeft = (_a = offset === null || offset === void 0 ? void 0 : offset[0]) !== null && _a !== void 0 ? _a : gapXCenter;
const offsetTop = (_b = offset === null || offset === void 0 ? void 0 : offset[1]) !== null && _b !== void 0 ? _b : gapYCenter;
const markStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
const mergedMarkStyle = {
zIndex,
position: 'absolute',
left: 0,
top: 0,
width: '100%',
height: '100%',
pointerEvents: 'none',
backgroundRepeat: 'repeat'
};
/** Calculate the style of the offset */
let positionLeft = offsetLeft - gapXCenter;
let positionTop = offsetTop - gapYCenter;
if (positionLeft > 0) {
mergedMarkStyle.left = `${positionLeft}px`;
mergedMarkStyle.width = `calc(100% - ${positionLeft}px)`;
positionLeft = 0;
}
if (positionTop > 0) {
mergedMarkStyle.top = `${positionTop}px`;
mergedMarkStyle.height = `calc(100% - ${positionTop}px)`;
positionTop = 0;
}
mergedMarkStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
return mergedMarkStyle;
}, [zIndex, offsetLeft, gapXCenter, offsetTop, gapYCenter]);
const [container, setContainer] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState();
// Used for nest case like Modal, Drawer
const [subElements, setSubElements] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(new Set());
// Nest elements should also support watermark
const targetElements = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
const list = container ? [container] : [];
return [].concat(list, (0,toConsumableArray["default"])(Array.from(subElements)));
}, [container, subElements]);
// ============================ Content =============================
/**
* Get the width and height of the watermark. The default values are as follows
* Image: [120, 64]; Content: It's calculated by content;
*/
const getMarkSize = ctx => {
let defaultWidth = 120;
let defaultHeight = 64;
if (!image && ctx.measureText) {
ctx.font = `${Number(fontSize)}px ${fontFamily}`;
const contents = toList(content);
const sizes = contents.map(item => {
const metrics = ctx.measureText(item);
return [metrics.width, metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent];
});
defaultWidth = Math.ceil(Math.max.apply(Math, (0,toConsumableArray["default"])(sizes.map(size => size[0]))));
defaultHeight = Math.ceil(Math.max.apply(Math, (0,toConsumableArray["default"])(sizes.map(size => size[1])))) * contents.length + (contents.length - 1) * FontGap;
}
return [width !== null && width !== void 0 ? width : defaultWidth, height !== null && height !== void 0 ? height : defaultHeight];
};
const getClips = useClips();
const getClipsCache = useSingletonCache();
const [watermarkInfo, setWatermarkInfo] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null);
// Generate new Watermark content
const renderWatermark = () => {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
if (ctx) {
const ratio = getPixelRatio();
const [markWidth, markHeight] = getMarkSize(ctx);
const drawCanvas = drawContent => {
const params = [drawContent || '', rotate, ratio, markWidth, markHeight, {
color,
fontSize,
fontStyle,
fontWeight,
fontFamily,
textAlign
}, gapX, gapY];
const result = getClipsCache(params, () => getClips.apply(void 0, params));
const [nextClips, clipWidth] = result;
setWatermarkInfo([nextClips, clipWidth]);
};
if (image) {
const img = new Image();
img.onload = () => {
drawCanvas(img);
};
img.onerror = () => {
drawCanvas(content);
};
img.crossOrigin = 'anonymous';
img.referrerPolicy = 'no-referrer';
img.src = image;
} else {
drawCanvas(content);
}
}
};
const syncWatermark = useRafDebounce(renderWatermark);
// ============================= Effect =============================
// Append watermark to the container
const [appendWatermark, removeWatermark, isWatermarkEle] = useWatermark(markStyle);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
if (watermarkInfo) {
targetElements.forEach(holder => {
appendWatermark(watermarkInfo[0], watermarkInfo[1], holder);
});
}
}, [watermarkInfo, targetElements]);
// ============================ Observe =============================
const onMutate = (0,useEvent["default"])(mutations => {
mutations.forEach(mutation => {
if (reRendering(mutation, isWatermarkEle)) {
syncWatermark();
} else if (mutation.target === container && mutation.attributeName === 'style') {
// We've only force container not modify.
// Not consider nest case.
const keyStyles = Object.keys(fixedStyle);
for (let i = 0; i < keyStyles.length; i += 1) {
const key = keyStyles[i];
const oriValue = mergedStyle[key];
const currentValue = container.style[key];
if (oriValue && oriValue !== currentValue) {
container.style[key] = oriValue;
}
}
}
});
});
useMutateObserver(targetElements, onMutate);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(syncWatermark, [rotate, zIndex, width, height, image, content, color, fontSize, fontWeight, fontStyle, fontFamily, textAlign, gapX, gapY, offsetLeft, offsetTop]);
// ============================ Context =============================
const watermarkContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
add: ele => {
setSubElements(prev => {
const clone = new Set(prev);
clone.add(ele);
return getSizeDiff(prev, clone);
});
},
remove: ele => {
removeWatermark(ele);
setSubElements(prev => {
const clone = new Set(prev);
clone.delete(ele);
return getSizeDiff(prev, clone);
});
}
}), []);
// ============================= Render =============================
const childNode = inherit ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(watermark_context.Provider, {
value: watermarkContext
}, children)) : children;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: setContainer,
className: classnames_default()(className, rootClassName),
style: mergedStyle
}, childNode);
};
if (true) {
Watermark.displayName = 'Watermark';
}
/* harmony default export */ var watermark = (Watermark);
;// ./components/splitter/Panel.tsx
const InternalPanel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
const {
prefixCls,
className,
children,
size,
style = {}
} = props;
const panelClassName = classnames_default()(`${prefixCls}-panel`, {
[`${prefixCls}-panel-hidden`]: size === 0
}, className);
const hasSize = size !== undefined;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: ref,
className: panelClassName,
style: Object.assign(Object.assign({}, style), {
// Use auto when start from ssr
flexBasis: hasSize ? size : 'auto',
flexGrow: hasSize ? 0 : 1
})
}, children);
});
if (true) {
InternalPanel.displayName = 'Panel';
}
const splitter_Panel_Panel = () => null;
/* harmony default export */ var splitter_Panel = (splitter_Panel_Panel);
;// ./components/splitter/hooks/useItems.ts
var splitter_hooks_useItems_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 getCollapsible(collapsible) {
if (collapsible && typeof collapsible === 'object') {
return collapsible;
}
const mergedCollapsible = !!collapsible;
return {
start: mergedCollapsible,
end: mergedCollapsible
};
}
/**
* Convert `children` into `items`.
*/
function hooks_useItems_useItems(children) {
const items = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,toArray["default"])(children).filter(external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement).map(node => {
const {
props
} = node;
const {
collapsible
} = props,
restProps = splitter_hooks_useItems_rest(props, ["collapsible"]);
return Object.assign(Object.assign({}, restProps), {
collapsible: getCollapsible(collapsible)
});
}), [children]);
return items;
}
;// ./components/splitter/hooks/useResizable.ts
function useResizable(items, pxSizes, isRTL) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
const resizeInfos = [];
for (let i = 0; i < items.length - 1; i += 1) {
const prevItem = items[i];
const nextItem = items[i + 1];
const prevSize = pxSizes[i];
const nextSize = pxSizes[i + 1];
const {
resizable: prevResizable = true,
min: prevMin,
collapsible: prevCollapsible
} = prevItem;
const {
resizable: nextResizable = true,
min: nextMin,
collapsible: nextCollapsible
} = nextItem;
const mergedResizable =
// Both need to be resizable
prevResizable && nextResizable && (
// Prev is not collapsed and limit min size
prevSize !== 0 || !prevMin) && (
// Next is not collapsed and limit min size
nextSize !== 0 || !nextMin);
const startCollapsible =
// Self is collapsible
prevCollapsible.end && prevSize > 0 ||
// Collapsed and can be collapsed
nextCollapsible.start && nextSize === 0 && prevSize > 0;
const endCollapsible =
// Self is collapsible
nextCollapsible.start && nextSize > 0 ||
// Collapsed and can be collapsed
prevCollapsible.end && prevSize === 0 && nextSize > 0;
resizeInfos[i] = {
resizable: mergedResizable,
startCollapsible: !!(isRTL ? endCollapsible : startCollapsible),
endCollapsible: !!(isRTL ? startCollapsible : endCollapsible)
};
}
return resizeInfos;
}, [pxSizes, items]);
}
;// ./components/splitter/hooks/useSizes.ts
function getPtg(str) {
return Number(str.slice(0, -1)) / 100;
}
function isPtg(itemSize) {
return typeof itemSize === 'string' && itemSize.endsWith('%');
}
/**
* Save the size state.
* Align the size into flex percentage base.
*/
function useSizes(items, containerSize) {
const propSizes = items.map(item => item.size);
const itemsCount = items.length;
const mergedContainerSize = containerSize || 0;
const ptg2px = ptg => ptg * mergedContainerSize;
// We do not need care the size state match the `items` length in `useState`.
// It will calculate later.
const [innerSizes, setInnerSizes] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(() => items.map(item => item.defaultSize));
const sizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
var _a;
const mergedSizes = [];
for (let i = 0; i < itemsCount; i += 1) {
mergedSizes[i] = (_a = propSizes[i]) !== null && _a !== void 0 ? _a : innerSizes[i];
}
return mergedSizes;
}, [itemsCount, innerSizes, propSizes]);
// Post handle the size. Will do:
// 1. Convert all the px into percentage if not empty.
// 2. Get rest percentage for exist percentage.
// 3. Fill the rest percentage into empty item.
const postPercentSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
let ptgList = [];
let emptyCount = 0;
// Fill default percentage
for (let i = 0; i < itemsCount; i += 1) {
const itemSize = sizes[i];
if (isPtg(itemSize)) {
ptgList[i] = getPtg(itemSize);
} else if (itemSize || itemSize === 0) {
const num = Number(itemSize);
if (!Number.isNaN(num)) {
ptgList[i] = num / mergedContainerSize;
}
} else {
emptyCount += 1;
ptgList[i] = undefined;
}
}
const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);
if (totalPtg > 1 || !emptyCount) {
// If total percentage is larger than 1, we will scale it down.
const scale = 1 / totalPtg;
ptgList = ptgList.map(ptg => ptg === undefined ? 0 : ptg * scale);
} else {
// If total percentage is smaller than 1, we will fill the rest.
const avgRest = (1 - totalPtg) / emptyCount;
ptgList = ptgList.map(ptg => ptg === undefined ? avgRest : ptg);
}
return ptgList;
}, [sizes, mergedContainerSize]);
const postPxSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => postPercentSizes.map(ptg2px), [postPercentSizes, mergedContainerSize]);
const postPercentMinSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => items.map(item => {
if (isPtg(item.min)) {
return getPtg(item.min);
}
return (item.min || 0) / mergedContainerSize;
}), [items, mergedContainerSize]);
const postPercentMaxSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => items.map(item => {
if (isPtg(item.max)) {
return getPtg(item.max);
}
return (item.max || mergedContainerSize) / mergedContainerSize;
}), [items, mergedContainerSize]);
// If ssr, we will use the size from developer config first.
const panelSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => containerSize ? postPxSizes : sizes, [postPxSizes, containerSize]);
return [panelSizes, postPxSizes, postPercentSizes, postPercentMinSizes, postPercentMaxSizes, setInnerSizes];
}
;// ./components/splitter/hooks/useResize.ts
/**
* Handle user drag resize logic.
*/
function useResize(items, resizableInfos, percentSizes, containerSize, updateSizes, isRTL) {
const limitSizes = items.map(item => [item.min, item.max]);
const mergedContainerSize = containerSize || 0;
const ptg2px = ptg => ptg * mergedContainerSize;
// ======================== Resize ========================
function getLimitSize(str, defaultLimit) {
if (typeof str === 'string') {
return ptg2px(getPtg(str));
}
return str !== null && str !== void 0 ? str : defaultLimit;
}
// Real px sizes
const [cacheSizes, setCacheSizes] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
const cacheCollapsedSize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
/**
* When start drag, check the direct is `start` or `end`.
* This will handle when 2 splitter bar are in the same position.
*/
const [movingIndex, setMovingIndex] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
const getPxSizes = () => percentSizes.map(ptg2px);
const onOffsetStart = index => {
setCacheSizes(getPxSizes());
setMovingIndex({
index,
confirmed: false
});
};
const onOffsetUpdate = (index, offset) => {
var _a;
// First time trigger move index update is not sync in the state
let confirmedIndex = null;
// We need to know what the real index is.
if ((!movingIndex || !movingIndex.confirmed) && offset !== 0) {
// Search for the real index
if (offset > 0) {
confirmedIndex = index;
setMovingIndex({
index,
confirmed: true
});
} else {
for (let i = index; i >= 0; i -= 1) {
if (cacheSizes[i] > 0 && resizableInfos[i].resizable) {
confirmedIndex = i;
setMovingIndex({
index: i,
confirmed: true
});
break;
}
}
}
}
const mergedIndex = (_a = confirmedIndex !== null && confirmedIndex !== void 0 ? confirmedIndex : movingIndex === null || movingIndex === void 0 ? void 0 : movingIndex.index) !== null && _a !== void 0 ? _a : index;
const numSizes = (0,toConsumableArray["default"])(cacheSizes);
const nextIndex = mergedIndex + 1;
// Get boundary
const startMinSize = getLimitSize(limitSizes[mergedIndex][0], 0);
const endMinSize = getLimitSize(limitSizes[nextIndex][0], 0);
const startMaxSize = getLimitSize(limitSizes[mergedIndex][1], mergedContainerSize);
const endMaxSize = getLimitSize(limitSizes[nextIndex][1], mergedContainerSize);
let mergedOffset = offset;
// Align with the boundary
if (numSizes[mergedIndex] + mergedOffset < startMinSize) {
mergedOffset = startMinSize - numSizes[mergedIndex];
}
if (numSizes[nextIndex] - mergedOffset < endMinSize) {
mergedOffset = numSizes[nextIndex] - endMinSize;
}
if (numSizes[mergedIndex] + mergedOffset > startMaxSize) {
mergedOffset = startMaxSize - numSizes[mergedIndex];
}
if (numSizes[nextIndex] - mergedOffset > endMaxSize) {
mergedOffset = numSizes[nextIndex] - endMaxSize;
}
// Do offset
numSizes[mergedIndex] += mergedOffset;
numSizes[nextIndex] -= mergedOffset;
updateSizes(numSizes);
return numSizes;
};
const onOffsetEnd = () => {
setMovingIndex(null);
};
// ======================= Collapse =======================
const onCollapse = (index, type) => {
const currentSizes = getPxSizes();
const adjustedType = isRTL ? type === 'start' ? 'end' : 'start' : type;
const currentIndex = adjustedType === 'start' ? index : index + 1;
const targetIndex = adjustedType === 'start' ? index + 1 : index;
const currentSize = currentSizes[currentIndex];
const targetSize = currentSizes[targetIndex];
if (currentSize !== 0 && targetSize !== 0) {
// Collapse directly
currentSizes[currentIndex] = 0;
currentSizes[targetIndex] += currentSize;
cacheCollapsedSize.current[index] = currentSize;
} else {
const totalSize = currentSize + targetSize;
const currentSizeMin = getLimitSize(limitSizes[currentIndex][0], 0);
const currentSizeMax = getLimitSize(limitSizes[currentIndex][1], mergedContainerSize);
const targetSizeMin = getLimitSize(limitSizes[targetIndex][0], 0);
const targetSizeMax = getLimitSize(limitSizes[targetIndex][1], mergedContainerSize);
const limitStart = Math.max(currentSizeMin, totalSize - targetSizeMax);
const limitEnd = Math.min(currentSizeMax, totalSize - targetSizeMin);
const halfOffset = (limitEnd - limitStart) / 2;
const targetCacheCollapsedSize = cacheCollapsedSize.current[index];
const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
const shouldUseCache = targetCacheCollapsedSize && targetCacheCollapsedSize <= targetSizeMax && targetCacheCollapsedSize >= targetSizeMin && currentCacheCollapsedSize <= currentSizeMax && currentCacheCollapsedSize >= currentSizeMin;
if (shouldUseCache) {
currentSizes[targetIndex] = targetCacheCollapsedSize;
currentSizes[currentIndex] = currentCacheCollapsedSize;
} else {
currentSizes[currentIndex] -= halfOffset;
currentSizes[targetIndex] += halfOffset;
}
}
updateSizes(currentSizes);
return currentSizes;
};
return [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex === null || movingIndex === void 0 ? void 0 : movingIndex.index];
}
;// ./components/splitter/SplitBar.tsx
function getValidNumber(num) {
return typeof num === 'number' && !Number.isNaN(num) ? Math.round(num) : 0;
}
const SplitBar = props => {
const {
prefixCls,
vertical,
index,
active,
ariaNow,
ariaMin,
ariaMax,
resizable,
startCollapsible,
endCollapsible,
onOffsetStart,
onOffsetUpdate,
onOffsetEnd,
onCollapse,
lazy,
containerSize
} = props;
const splitBarPrefixCls = `${prefixCls}-bar`;
// ======================== Resize ========================
const [startPos, setStartPos] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
const [constrainedOffset, setConstrainedOffset] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0);
const constrainedOffsetX = vertical ? 0 : constrainedOffset;
const constrainedOffsetY = vertical ? constrainedOffset : 0;
const onMouseDown = e => {
if (resizable && e.currentTarget) {
setStartPos([e.pageX, e.pageY]);
onOffsetStart(index);
}
};
const onTouchStart = e => {
if (resizable && e.touches.length === 1) {
const touch = e.touches[0];
setStartPos([touch.pageX, touch.pageY]);
onOffsetStart(index);
}
};
// Updated constraint calculation
const getConstrainedOffset = rawOffset => {
const currentPos = containerSize * ariaNow / 100;
const newPos = currentPos + rawOffset;
// Calculate available space
const minAllowed = Math.max(0, containerSize * ariaMin / 100);
const maxAllowed = Math.min(containerSize, containerSize * ariaMax / 100);
// Constrain new position within bounds
const clampedPos = Math.max(minAllowed, Math.min(maxAllowed, newPos));
return clampedPos - currentPos;
};
const handleLazyMove = (0,useEvent["default"])((offsetX, offsetY) => {
const constrainedOffsetValue = getConstrainedOffset(vertical ? offsetY : offsetX);
setConstrainedOffset(constrainedOffsetValue);
});
const handleLazyEnd = (0,useEvent["default"])(() => {
onOffsetUpdate(index, constrainedOffsetX, constrainedOffsetY);
setConstrainedOffset(0);
});
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
if (startPos) {
const onMouseMove = e => {
const {
pageX,
pageY
} = e;
const offsetX = pageX - startPos[0];
const offsetY = pageY - startPos[1];
if (lazy) {
handleLazyMove(offsetX, offsetY);
} else {
onOffsetUpdate(index, offsetX, offsetY);
}
};
const onMouseUp = () => {
if (lazy) {
handleLazyEnd();
}
setStartPos(null);
onOffsetEnd();
};
const handleTouchMove = e => {
if (e.touches.length === 1) {
const touch = e.touches[0];
const offsetX = touch.pageX - startPos[0];
const offsetY = touch.pageY - startPos[1];
if (lazy) {
handleLazyMove(offsetX, offsetY);
} else {
onOffsetUpdate(index, offsetX, offsetY);
}
}
};
const handleTouchEnd = () => {
if (lazy) {
handleLazyEnd();
}
setStartPos(null);
onOffsetEnd();
};
window.addEventListener('touchmove', handleTouchMove);
window.addEventListener('touchend', handleTouchEnd);
window.addEventListener('mousemove', onMouseMove);
window.addEventListener('mouseup', onMouseUp);
return () => {
window.removeEventListener('mousemove', onMouseMove);
window.removeEventListener('mouseup', onMouseUp);
window.removeEventListener('touchmove', handleTouchMove);
window.removeEventListener('touchend', handleTouchEnd);
};
}
}, [startPos, lazy, vertical, index, containerSize, ariaNow, ariaMin, ariaMax]);
const transformStyle = {
[`--${splitBarPrefixCls}-preview-offset`]: `${constrainedOffset}px`
};
// ======================== Render ========================
const StartIcon = vertical ? icons_UpOutlined : icons_LeftOutlined;
const EndIcon = vertical ? icons_DownOutlined : RightOutlined["default"];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: splitBarPrefixCls,
role: "separator",
"aria-valuenow": getValidNumber(ariaNow),
"aria-valuemin": getValidNumber(ariaMin),
"aria-valuemax": getValidNumber(ariaMax)
}, lazy && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(`${splitBarPrefixCls}-preview`, {
[`${splitBarPrefixCls}-preview-active`]: !!constrainedOffset
}),
style: transformStyle
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(`${splitBarPrefixCls}-dragger`, {
[`${splitBarPrefixCls}-dragger-disabled`]: !resizable,
[`${splitBarPrefixCls}-dragger-active`]: active
}),
onMouseDown: onMouseDown,
onTouchStart: onTouchStart
}), startCollapsible && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(`${splitBarPrefixCls}-collapse-bar`, `${splitBarPrefixCls}-collapse-bar-start`),
onClick: () => onCollapse(index, 'start')
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(StartIcon, {
className: classnames_default()(`${splitBarPrefixCls}-collapse-icon`, `${splitBarPrefixCls}-collapse-start`)
}))), endCollapsible && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(`${splitBarPrefixCls}-collapse-bar`, `${splitBarPrefixCls}-collapse-bar-end`),
onClick: () => onCollapse(index, 'end')
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(EndIcon, {
className: classnames_default()(`${splitBarPrefixCls}-collapse-icon`, `${splitBarPrefixCls}-collapse-end`)
}))));
};
/* harmony default export */ var splitter_SplitBar = (SplitBar);
// EXTERNAL MODULE: ./components/splitter/style/index.ts
var splitter_style = __webpack_require__("./components/splitter/style/index.ts");
;// ./components/splitter/Splitter.tsx
/* eslint-disable react/no-array-index-key */
const Splitter = props => {
const {
prefixCls: customizePrefixCls,
className,
style,
layout = 'horizontal',
children,
rootClassName,
onResizeStart,
onResize,
onResizeEnd,
lazy
} = props;
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0,config_provider_context.useComponentConfig)('splitter');
const prefixCls = getPrefixCls('splitter', customizePrefixCls);
const rootCls = hooks_useCSSVarCls(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0,splitter_style["default"])(prefixCls, rootCls);
// ======================== Direct ========================
const isVertical = layout === 'vertical';
const isRTL = direction === 'rtl';
const reverse = !isVertical && isRTL;
// ====================== Items Data ======================
const items = hooks_useItems_useItems(children);
// >>> Warning for uncontrolled
if (true) {
const warning = (0,_util_warning.devUseWarning)('Splitter');
let existSize = false;
let existUndefinedSize = false;
items.forEach(item => {
if (item.size !== undefined) {
existSize = true;
} else {
existUndefinedSize = true;
}
});
if (existSize && existUndefinedSize && !onResize) {
true ? warning(false, 'usage', 'When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.') : 0;
}
}
// ====================== Container =======================
const [containerSize, setContainerSize] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
const onContainerResize = size => {
const {
offsetWidth,
offsetHeight
} = size;
const containerSize = isVertical ? offsetHeight : offsetWidth;
// Skip when container has no size, Such as nested in a hidden tab panel
// to fix: https://github.com/ant-design/ant-design/issues/51106
if (containerSize === 0) {
return;
}
setContainerSize(containerSize);
};
// ========================= Size =========================
const [panelSizes, itemPxSizes, itemPtgSizes, itemPtgMinSizes, itemPtgMaxSizes, updateSizes] = useSizes(items, containerSize);
// ====================== Resizable =======================
const resizableInfos = useResizable(items, itemPxSizes, isRTL);
const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] = useResize(items, resizableInfos, itemPtgSizes, containerSize, updateSizes, isRTL);
// ======================== Events ========================
const onInternalResizeStart = (0,useEvent["default"])(index => {
onOffsetStart(index);
onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart(itemPxSizes);
});
const onInternalResizeUpdate = (0,useEvent["default"])((index, offset) => {
const nextSizes = onOffsetUpdate(index, offset);
onResize === null || onResize === void 0 ? void 0 : onResize(nextSizes);
});
const onInternalResizeEnd = (0,useEvent["default"])(() => {
onOffsetEnd();
onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(itemPxSizes);
});
const onInternalCollapse = (0,useEvent["default"])((index, type) => {
const nextSizes = onCollapse(index, type);
onResize === null || onResize === void 0 ? void 0 : onResize(nextSizes);
onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(nextSizes);
});
// ======================== Styles ========================
const containerClassName = classnames_default()(prefixCls, className, `${prefixCls}-${layout}`, {
[`${prefixCls}-rtl`]: isRTL
}, rootClassName, contextClassName, cssVarCls, rootCls, hashId);
// ======================== Render ========================
const maskCls = `${prefixCls}-mask`;
const stackSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
const mergedSizes = [];
let stack = 0;
for (let i = 0; i < items.length; i += 1) {
stack += itemPtgSizes[i];
mergedSizes.push(stack);
}
return mergedSizes;
}, [itemPtgSizes]);
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es, {
onResize: onContainerResize
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
style: mergedStyle,
className: containerClassName
}, items.map((item, idx) => {
// Panel
const panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InternalPanel, Object.assign({}, item, {
prefixCls: prefixCls,
size: panelSizes[idx]
}));
// Split Bar
let splitBar = null;
const resizableInfo = resizableInfos[idx];
if (resizableInfo) {
const ariaMinStart = (stackSizes[idx - 1] || 0) + itemPtgMinSizes[idx];
const ariaMinEnd = (stackSizes[idx + 1] || 100) - itemPtgMaxSizes[idx + 1];
const ariaMaxStart = (stackSizes[idx - 1] || 0) + itemPtgMaxSizes[idx];
const ariaMaxEnd = (stackSizes[idx + 1] || 100) - itemPtgMinSizes[idx + 1];
splitBar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(splitter_SplitBar, {
lazy: lazy,
index: idx,
active: movingIndex === idx,
prefixCls: prefixCls,
vertical: isVertical,
resizable: resizableInfo.resizable,
ariaNow: stackSizes[idx] * 100,
ariaMin: Math.max(ariaMinStart, ariaMinEnd) * 100,
ariaMax: Math.min(ariaMaxStart, ariaMaxEnd) * 100,
startCollapsible: resizableInfo.startCollapsible,
endCollapsible: resizableInfo.endCollapsible,
onOffsetStart: onInternalResizeStart,
onOffsetUpdate: (index, offsetX, offsetY) => {
let offset = isVertical ? offsetY : offsetX;
if (reverse) {
offset = -offset;
}
onInternalResizeUpdate(index, offset);
},
onOffsetEnd: onInternalResizeEnd,
onCollapse: onInternalCollapse,
containerSize: containerSize || 0
});
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
key: `split-panel-${idx}`
}, panel, splitBar);
}), typeof movingIndex === 'number' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
"aria-hidden": true,
className: classnames_default()(maskCls, `${maskCls}-${layout}`)
})))));
};
if (true) {
Splitter.displayName = 'Splitter';
}
/* harmony default export */ var splitter_Splitter = (Splitter);
;// ./components/splitter/index.tsx
const components_splitter_Splitter = splitter_Splitter;
components_splitter_Splitter.Panel = splitter_Panel;
/* harmony default export */ var splitter = (components_splitter_Splitter);
;// ./components/index.ts
// TODO: Remove in v6
/***/ }),
/***/ "./components/input-number/style/index.ts":
/*!************************************************************!*\
!*** ./components/input-number/style/index.ts + 1 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ input_number_style; }
});
// UNUSED EXPORTS: genRadiusStyle
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/input/style/index.ts
var style = __webpack_require__("./components/input/style/index.ts");
// EXTERNAL MODULE: ./components/input/style/token.ts
var style_token = __webpack_require__("./components/input/style/token.ts");
// EXTERNAL MODULE: ./components/input/style/variants.ts
var variants = __webpack_require__("./components/input/style/variants.ts");
// EXTERNAL MODULE: ./components/style/index.tsx
var components_style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/compact-item.ts
var compact_item = __webpack_require__("./components/style/compact-item.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var fast_color_es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
;// ./components/input-number/style/token.ts
const prepareComponentToken = token => {
var _a;
const handleVisible = (_a = token.handleVisible) !== null && _a !== void 0 ? _a : 'auto';
const handleWidth = token.controlHeightSM - token.lineWidth * 2;
return Object.assign(Object.assign({}, (0,style_token.initComponentToken)(token)), {
controlWidth: 90,
handleWidth,
handleFontSize: token.fontSize / 2,
handleVisible,
handleActiveBg: token.colorFillAlter,
handleBg: token.colorBgContainer,
filledHandleBg: new fast_color_es.FastColor(token.colorFillSecondary).onBackground(token.colorBgContainer).toHexString(),
handleHoverColor: token.colorPrimary,
handleBorderColor: token.colorBorder,
handleOpacity: handleVisible === true ? 1 : 0,
handleVisibleWidth: handleVisible === true ? handleWidth : 0
});
};
;// ./components/input-number/style/index.ts
const genRadiusStyle = (_ref, size) => {
let {
componentCls,
borderRadiusSM,
borderRadiusLG
} = _ref;
const borderRadius = size === 'lg' ? borderRadiusLG : borderRadiusSM;
return {
[`&-${size}`]: {
[`${componentCls}-handler-wrap`]: {
borderStartEndRadius: borderRadius,
borderEndEndRadius: borderRadius
},
[`${componentCls}-handler-up`]: {
borderStartEndRadius: borderRadius
},
[`${componentCls}-handler-down`]: {
borderEndEndRadius: borderRadius
}
}
};
};
const genInputNumberStyles = token => {
const {
componentCls,
lineWidth,
lineType,
borderRadius,
inputFontSizeSM,
inputFontSizeLG,
controlHeightLG,
controlHeightSM,
colorError,
paddingInlineSM,
paddingBlockSM,
paddingBlockLG,
paddingInlineLG,
colorTextDescription,
motionDurationMid,
handleHoverColor,
handleOpacity,
paddingInline,
paddingBlock,
handleBg,
handleActiveBg,
colorTextDisabled,
borderRadiusSM,
borderRadiusLG,
controlWidth,
handleBorderColor,
filledHandleBg,
lineHeightLG,
calc
} = token;
return [{
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), (0,style.genBasicInputStyle)(token)), {
display: 'inline-block',
width: controlWidth,
margin: 0,
padding: 0,
borderRadius
}), (0,variants.genOutlinedStyle)(token, {
[`${componentCls}-handler-wrap`]: {
background: handleBg,
[`${componentCls}-handler-down`]: {
borderBlockStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
}
}
})), (0,variants.genFilledStyle)(token, {
[`${componentCls}-handler-wrap`]: {
background: filledHandleBg,
[`${componentCls}-handler-down`]: {
borderBlockStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
}
},
'&:focus-within': {
[`${componentCls}-handler-wrap`]: {
background: handleBg
}
}
})), (0,variants.genUnderlinedStyle)(token, {
[`${componentCls}-handler-wrap`]: {
background: handleBg,
[`${componentCls}-handler-down`]: {
borderBlockStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
}
}
})), (0,variants.genBorderlessStyle)(token)), {
'&-rtl': {
direction: 'rtl',
[`${componentCls}-input`]: {
direction: 'rtl'
}
},
'&-lg': {
padding: 0,
fontSize: inputFontSizeLG,
lineHeight: lineHeightLG,
borderRadius: borderRadiusLG,
[`input${componentCls}-input`]: {
height: calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal(),
padding: `${(0,cssinjs.unit)(paddingBlockLG)} ${(0,cssinjs.unit)(paddingInlineLG)}`
}
},
'&-sm': {
padding: 0,
fontSize: inputFontSizeSM,
borderRadius: borderRadiusSM,
[`input${componentCls}-input`]: {
height: calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal(),
padding: `${(0,cssinjs.unit)(paddingBlockSM)} ${(0,cssinjs.unit)(paddingInlineSM)}`
}
},
// ===================== Out Of Range =====================
'&-out-of-range': {
[`${componentCls}-input-wrap`]: {
input: {
color: colorError
}
}
},
// Style for input-group: input with label, with button or dropdown...
'&-group': Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), (0,style.genInputGroupStyle)(token)), {
'&-wrapper': Object.assign(Object.assign(Object.assign({
display: 'inline-block',
textAlign: 'start',
verticalAlign: 'top',
[`${componentCls}-affix-wrapper`]: {
width: '100%'
},
// Size
'&-lg': {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusLG,
fontSize: token.fontSizeLG
}
},
'&-sm': {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusSM
}
}
}, (0,variants.genOutlinedGroupStyle)(token)), (0,variants.genFilledGroupStyle)(token)), {
// Fix the issue of using icons in Space Compact mode
// https://github.com/ant-design/ant-design/issues/45764
[`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
[`${componentCls}, ${componentCls}-group-addon`]: {
borderRadius: 0
}
},
[`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {
[`${componentCls}, ${componentCls}-group-addon`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {
[`${componentCls}, ${componentCls}-group-addon`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
}
})
}),
[`&-disabled ${componentCls}-input`]: {
cursor: 'not-allowed'
},
[componentCls]: {
'&-input': Object.assign(Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), {
width: '100%',
padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(paddingInline)}`,
textAlign: 'start',
backgroundColor: 'transparent',
border: 0,
borderRadius,
outline: 0,
transition: `all ${motionDurationMid} linear`,
appearance: 'textfield',
fontSize: 'inherit'
}), (0,style.genPlaceholderStyle)(token.colorTextPlaceholder)), {
'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
margin: 0,
webkitAppearance: 'none',
appearance: 'none'
}
})
},
[`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
width: token.handleWidth,
opacity: 1
}
})
},
// Handler
{
[componentCls]: Object.assign(Object.assign(Object.assign({
[`${componentCls}-handler-wrap`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineEnd: 0,
width: token.handleVisibleWidth,
opacity: handleOpacity,
height: '100%',
borderStartStartRadius: 0,
borderStartEndRadius: borderRadius,
borderEndEndRadius: borderRadius,
borderEndStartRadius: 0,
display: 'flex',
flexDirection: 'column',
alignItems: 'stretch',
transition: `all ${motionDurationMid}`,
overflow: 'hidden',
// Fix input number inside Menu makes icon too large
// We arise the selector priority by nest selector here
// https://github.com/ant-design/ant-design/issues/14367
[`${componentCls}-handler`]: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flex: 'auto',
height: '40%',
[`
${componentCls}-handler-up-inner,
${componentCls}-handler-down-inner
`]: {
marginInlineEnd: 0,
fontSize: token.handleFontSize
}
}
},
[`${componentCls}-handler`]: {
height: '50%',
overflow: 'hidden',
color: colorTextDescription,
fontWeight: 'bold',
lineHeight: 0,
textAlign: 'center',
cursor: 'pointer',
borderInlineStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`,
transition: `all ${motionDurationMid} linear`,
'&:active': {
background: handleActiveBg
},
// Hover
'&:hover': {
height: `60%`,
[`
${componentCls}-handler-up-inner,
${componentCls}-handler-down-inner
`]: {
color: handleHoverColor
}
},
'&-up-inner, &-down-inner': Object.assign(Object.assign({}, (0,components_style.resetIcon)()), {
color: colorTextDescription,
transition: `all ${motionDurationMid} linear`,
userSelect: 'none'
})
},
[`${componentCls}-handler-up`]: {
borderStartEndRadius: borderRadius
},
[`${componentCls}-handler-down`]: {
borderEndEndRadius: borderRadius
}
}, genRadiusStyle(token, 'lg')), genRadiusStyle(token, 'sm')), {
// Disabled
'&-disabled, &-readonly': {
[`${componentCls}-handler-wrap`]: {
display: 'none'
},
[`${componentCls}-input`]: {
color: 'inherit'
}
},
[`
${componentCls}-handler-up-disabled,
${componentCls}-handler-down-disabled
`]: {
cursor: 'not-allowed'
},
[`
${componentCls}-handler-up-disabled:hover &-handler-up-inner,
${componentCls}-handler-down-disabled:hover &-handler-down-inner
`]: {
color: colorTextDisabled
}
})
}];
};
const genAffixWrapperStyles = token => {
const {
componentCls,
paddingBlock,
paddingInline,
inputAffixPadding,
controlWidth,
borderRadiusLG,
borderRadiusSM,
paddingInlineLG,
paddingInlineSM,
paddingBlockLG,
paddingBlockSM,
motionDurationMid
} = token;
return {
[`${componentCls}-affix-wrapper`]: Object.assign(Object.assign({
[`input${componentCls}-input`]: {
padding: `${(0,cssinjs.unit)(paddingBlock)} 0`
}
}, (0,style.genBasicInputStyle)(token)), {
// or number handler will cover form status
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
width: controlWidth,
padding: 0,
paddingInlineStart: paddingInline,
'&-lg': {
borderRadius: borderRadiusLG,
paddingInlineStart: paddingInlineLG,
[`input${componentCls}-input`]: {
padding: `${(0,cssinjs.unit)(paddingBlockLG)} 0`
}
},
'&-sm': {
borderRadius: borderRadiusSM,
paddingInlineStart: paddingInlineSM,
[`input${componentCls}-input`]: {
padding: `${(0,cssinjs.unit)(paddingBlockSM)} 0`
}
},
[`&:not(${componentCls}-disabled):hover`]: {
zIndex: 1
},
'&-focused, &:focus': {
zIndex: 1
},
[`&-disabled > ${componentCls}-disabled`]: {
background: 'transparent'
},
[`> div${componentCls}`]: {
width: '100%',
border: 'none',
outline: 'none',
[`&${componentCls}-focused`]: {
boxShadow: 'none !important'
}
},
'&::before': {
display: 'inline-block',
width: 0,
visibility: 'hidden',
content: '"\\a0"'
},
[`${componentCls}-handler-wrap`]: {
zIndex: 2
},
[componentCls]: {
position: 'static',
color: 'inherit',
'&-prefix, &-suffix': {
display: 'flex',
flex: 'none',
alignItems: 'center',
pointerEvents: 'none'
},
'&-prefix': {
marginInlineEnd: inputAffixPadding
},
'&-suffix': {
insetBlockStart: 0,
insetInlineEnd: 0,
height: '100%',
marginInlineEnd: paddingInline,
marginInlineStart: inputAffixPadding,
transition: `margin ${motionDurationMid}`
}
},
[`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
width: token.handleWidth,
opacity: 1
},
[`&:not(${componentCls}-affix-wrapper-without-controls):hover ${componentCls}-suffix`]: {
marginInlineEnd: token.calc(token.handleWidth).add(paddingInline).equal()
}
})
};
};
/* harmony default export */ var input_number_style = ((0,genStyleUtils.genStyleHooks)('InputNumber', token => {
const inputNumberToken = (0,es.mergeToken)(token, (0,style_token.initInputToken)(token));
return [genInputNumberStyles(inputNumberToken), genAffixWrapperStyles(inputNumberToken),
// =====================================================
// == Space Compact ==
// =====================================================
(0,compact_item.genCompactItemStyle)(inputNumberToken)];
}, prepareComponentToken, {
unitless: {
handleOpacity: true
}
}));
/***/ }),
/***/ "./components/input/style/index.ts":
/*!*****************************************!*\
!*** ./components/input/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genBasicInputStyle: function() { return /* binding */ genBasicInputStyle; },
/* harmony export */ genInputGroupStyle: function() { return /* binding */ genInputGroupStyle; },
/* harmony export */ genInputSmallStyle: function() { return /* binding */ genInputSmallStyle; },
/* harmony export */ genPlaceholderStyle: function() { return /* binding */ genPlaceholderStyle; },
/* harmony export */ useSharedStyle: function() { return /* binding */ useSharedStyle; }
/* harmony export */ });
/* unused harmony exports genActiveStyle, genInputStyle, genAffixStyle */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_compact_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../style/compact-item */ "./components/style/compact-item.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _token__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./token */ "./components/input/style/token.ts");
/* harmony import */ var _variants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./variants */ "./components/input/style/variants.ts");
const genPlaceholderStyle = color => ({
// Firefox
'&::-moz-placeholder': {
opacity: 1
},
'&::placeholder': {
color,
userSelect: 'none' // https://github.com/ant-design/ant-design/pull/32639
},
'&:placeholder-shown': {
textOverflow: 'ellipsis'
}
});
const genActiveStyle = token => ({
borderColor: token.activeBorderColor,
boxShadow: token.activeShadow,
outline: 0,
backgroundColor: token.activeBg
});
const genInputLargeStyle = token => {
const {
paddingBlockLG,
lineHeightLG,
borderRadiusLG,
paddingInlineLG
} = token;
return {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingBlockLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingInlineLG)}`,
fontSize: token.inputFontSizeLG,
lineHeight: lineHeightLG,
borderRadius: borderRadiusLG
};
};
const genInputSmallStyle = token => ({
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingBlockSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingInlineSM)}`,
fontSize: token.inputFontSizeSM,
borderRadius: token.borderRadiusSM
});
const genBasicInputStyle = token => Object.assign(Object.assign({
position: 'relative',
display: 'inline-block',
width: '100%',
minWidth: 0,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingBlock)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingInline)}`,
color: token.colorText,
fontSize: token.inputFontSize,
lineHeight: token.lineHeight,
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationMid}`
}, genPlaceholderStyle(token.colorTextPlaceholder)), {
// Reset height for `textarea`s
'textarea&': {
maxWidth: '100%',
// prevent textarea resize from coming out of its container
height: 'auto',
minHeight: token.controlHeight,
lineHeight: token.lineHeight,
verticalAlign: 'bottom',
transition: `all ${token.motionDurationSlow}, height 0s`,
resize: 'vertical'
},
// Size
'&-lg': Object.assign({}, genInputLargeStyle(token)),
'&-sm': Object.assign({}, genInputSmallStyle(token)),
// RTL
'&-rtl, &-textarea-rtl': {
direction: 'rtl'
}
});
const genInputGroupStyle = token => {
const {
componentCls,
antCls
} = token;
return {
position: 'relative',
display: 'table',
width: '100%',
borderCollapse: 'separate',
borderSpacing: 0,
// Undo padding and float of grid classes
"&[class*='col-']": {
paddingInlineEnd: token.paddingXS,
'&:last-child': {
paddingInlineEnd: 0
}
},
// Sizing options
[`&-lg ${componentCls}, &-lg > ${componentCls}-group-addon`]: Object.assign({}, genInputLargeStyle(token)),
[`&-sm ${componentCls}, &-sm > ${componentCls}-group-addon`]: Object.assign({}, genInputSmallStyle(token)),
// Fix https://github.com/ant-design/ant-design/issues/5754
[`&-lg ${antCls}-select-single ${antCls}-select-selector`]: {
height: token.controlHeightLG
},
[`&-sm ${antCls}-select-single ${antCls}-select-selector`]: {
height: token.controlHeightSM
},
[`> ${componentCls}`]: {
display: 'table-cell',
'&:not(:first-child):not(:last-child)': {
borderRadius: 0
}
},
[`${componentCls}-group`]: {
'&-addon, &-wrap': {
display: 'table-cell',
width: 1,
whiteSpace: 'nowrap',
verticalAlign: 'middle',
'&:not(:first-child):not(:last-child)': {
borderRadius: 0
}
},
'&-wrap > *': {
display: 'block !important'
},
'&-addon': {
position: 'relative',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingInline)}`,
color: token.colorText,
fontWeight: 'normal',
fontSize: token.inputFontSize,
textAlign: 'center',
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationSlow}`,
lineHeight: 1,
// Reset Select's style in addon
[`${antCls}-select`]: {
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(token.paddingBlock).add(1).mul(-1).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(token.paddingInline).mul(-1).equal())}`,
[`&${antCls}-select-single:not(${antCls}-select-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`${antCls}-select-selector`]: {
backgroundColor: 'inherit',
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} transparent`,
boxShadow: 'none'
}
}
},
// https://github.com/ant-design/ant-design/issues/31333
[`${antCls}-cascader-picker`]: {
margin: `-9px ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(token.paddingInline).mul(-1).equal())}`,
backgroundColor: 'transparent',
[`${antCls}-cascader-input`]: {
textAlign: 'start',
border: 0,
boxShadow: 'none'
}
}
}
},
[componentCls]: {
width: '100%',
marginBottom: 0,
textAlign: 'inherit',
'&:focus': {
zIndex: 1,
// Fix https://gw.alipayobjects.com/zos/rmsportal/DHNpoqfMXSfrSnlZvhsJ.png
borderInlineEndWidth: 1
},
'&:hover': {
zIndex: 1,
borderInlineEndWidth: 1,
[`${componentCls}-search-with-button &`]: {
zIndex: 0
}
}
},
// Reset rounded corners
[`> ${componentCls}:first-child, ${componentCls}-group-addon:first-child`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0,
// Reset Select's style in addon
[`${antCls}-select ${antCls}-select-selector`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`> ${componentCls}-affix-wrapper`]: {
[`&:not(:first-child) ${componentCls}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
},
[`&:not(:last-child) ${componentCls}`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`> ${componentCls}:last-child, ${componentCls}-group-addon:last-child`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0,
// Reset Select's style in addon
[`${antCls}-select ${antCls}-select-selector`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
},
[`${componentCls}-affix-wrapper`]: {
'&:not(:last-child)': {
borderStartEndRadius: 0,
borderEndEndRadius: 0,
[`${componentCls}-search &`]: {
borderStartStartRadius: token.borderRadius,
borderEndStartRadius: token.borderRadius
}
},
[`&:not(:first-child), ${componentCls}-search &:not(:first-child)`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
},
[`&${componentCls}-group-compact`]: Object.assign(Object.assign({
display: 'block'
}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.clearFix)()), {
[`${componentCls}-group-addon, ${componentCls}-group-wrap, > ${componentCls}`]: {
'&:not(:first-child):not(:last-child)': {
borderInlineEndWidth: token.lineWidth,
'&:hover, &:focus': {
zIndex: 1
}
}
},
'& > *': {
display: 'inline-flex',
float: 'none',
verticalAlign: 'top',
// https://github.com/ant-design/ant-design-pro/issues/139
borderRadius: 0
},
[`
& > ${componentCls}-affix-wrapper,
& > ${componentCls}-number-affix-wrapper,
& > ${antCls}-picker-range
`]: {
display: 'inline-flex'
},
'& > *:not(:last-child)': {
marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal(),
borderInlineEndWidth: token.lineWidth
},
// Undo float for .ant-input-group .ant-input
[componentCls]: {
float: 'none'
},
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
[`& > ${antCls}-select > ${antCls}-select-selector,
& > ${antCls}-select-auto-complete ${componentCls},
& > ${antCls}-cascader-picker ${componentCls},
& > ${componentCls}-group-wrapper ${componentCls}`]: {
borderInlineEndWidth: token.lineWidth,
borderRadius: 0,
'&:hover, &:focus': {
zIndex: 1
}
},
[`& > ${antCls}-select-focused`]: {
zIndex: 1
},
// update z-index for arrow icon
[`& > ${antCls}-select > ${antCls}-select-arrow`]: {
zIndex: 1 // https://github.com/ant-design/ant-design/issues/20371
},
[`& > *:first-child,
& > ${antCls}-select:first-child > ${antCls}-select-selector,
& > ${antCls}-select-auto-complete:first-child ${componentCls},
& > ${antCls}-cascader-picker:first-child ${componentCls}`]: {
borderStartStartRadius: token.borderRadius,
borderEndStartRadius: token.borderRadius
},
[`& > *:last-child,
& > ${antCls}-select:last-child > ${antCls}-select-selector,
& > ${antCls}-cascader-picker:last-child ${componentCls},
& > ${antCls}-cascader-picker-focused:last-child ${componentCls}`]: {
borderInlineEndWidth: token.lineWidth,
borderStartEndRadius: token.borderRadius,
borderEndEndRadius: token.borderRadius
},
// https://github.com/ant-design/ant-design/issues/12493
[`& > ${antCls}-select-auto-complete ${componentCls}`]: {
verticalAlign: 'top'
},
[`${componentCls}-group-wrapper + ${componentCls}-group-wrapper`]: {
marginInlineStart: token.calc(token.lineWidth).mul(-1).equal(),
[`${componentCls}-affix-wrapper`]: {
borderRadius: 0
}
},
[`${componentCls}-group-wrapper:not(:last-child)`]: {
[`&${componentCls}-search > ${componentCls}-group`]: {
[`& > ${componentCls}-group-addon > ${componentCls}-search-button`]: {
borderRadius: 0
},
[`& > ${componentCls}`]: {
borderStartStartRadius: token.borderRadius,
borderStartEndRadius: 0,
borderEndEndRadius: 0,
borderEndStartRadius: token.borderRadius
}
}
}
})
};
};
const genInputStyle = token => {
const {
componentCls,
controlHeightSM,
lineWidth,
calc
} = token;
const FIXED_CHROME_COLOR_HEIGHT = 16;
const colorSmallPadding = calc(controlHeightSM).sub(calc(lineWidth).mul(2)).sub(FIXED_CHROME_COLOR_HEIGHT).div(2).equal();
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), genBasicInputStyle(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_3__.genOutlinedStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_3__.genFilledStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_3__.genBorderlessStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_3__.genUnderlinedStyle)(token)), {
'&[type="color"]': {
height: token.controlHeight,
[`&${componentCls}-lg`]: {
height: token.controlHeightLG
},
[`&${componentCls}-sm`]: {
height: controlHeightSM,
paddingTop: colorSmallPadding,
paddingBottom: colorSmallPadding
}
},
'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration': {
'-webkit-appearance': 'none'
}
})
};
};
const genAllowClearStyle = token => {
const {
componentCls
} = token;
return {
// ========================= Input =========================
[`${componentCls}-clear-icon`]: {
margin: 0,
padding: 0,
lineHeight: 0,
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
verticalAlign: -1,
// https://github.com/ant-design/ant-design/pull/18151
// https://codesandbox.io/s/wizardly-sun-u10br
cursor: 'pointer',
transition: `color ${token.motionDurationSlow}`,
border: 'none',
outline: 'none',
backgroundColor: 'transparent',
'&:hover': {
color: token.colorTextTertiary
},
'&:active': {
color: token.colorText
},
'&-hidden': {
visibility: 'hidden'
},
'&-has-suffix': {
margin: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.inputAffixPadding)}`
}
}
};
};
const genAffixStyle = token => {
const {
componentCls,
inputAffixPadding,
colorTextDescription,
motionDurationSlow,
colorIcon,
colorIconHover,
iconCls
} = token;
const affixCls = `${componentCls}-affix-wrapper`;
const affixClsDisabled = `${componentCls}-affix-wrapper-disabled`;
return {
[affixCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, genBasicInputStyle(token)), {
display: 'inline-flex',
[`&:not(${componentCls}-disabled):hover`]: {
zIndex: 1,
[`${componentCls}-search-with-button &`]: {
zIndex: 0
}
},
'&-focused, &:focus': {
zIndex: 1
},
[`> input${componentCls}`]: {
padding: 0
},
[`> input${componentCls}, > textarea${componentCls}`]: {
fontSize: 'inherit',
border: 'none',
borderRadius: 0,
outline: 'none',
background: 'transparent',
color: 'inherit',
'&::-ms-reveal': {
display: 'none'
},
'&:focus': {
boxShadow: 'none !important'
}
},
'&::before': {
display: 'inline-block',
width: 0,
visibility: 'hidden',
content: '"\\a0"'
},
[componentCls]: {
'&-prefix, &-suffix': {
display: 'flex',
flex: 'none',
alignItems: 'center',
'> *:not(:last-child)': {
marginInlineEnd: token.paddingXS
}
},
'&-show-count-suffix': {
color: colorTextDescription
},
'&-show-count-has-suffix': {
marginInlineEnd: token.paddingXXS
},
'&-prefix': {
marginInlineEnd: inputAffixPadding
},
'&-suffix': {
marginInlineStart: inputAffixPadding
}
}
}), genAllowClearStyle(token)), {
// password
[`${iconCls}${componentCls}-password-icon`]: {
color: colorIcon,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
'&:hover': {
color: colorIconHover
}
}
}),
// 覆盖 affix-wrapper borderRadius!
[`${componentCls}-underlined`]: {
borderRadius: 0
},
[affixClsDisabled]: {
// password disabled
[`${iconCls}${componentCls}-password-icon`]: {
color: colorIcon,
cursor: 'not-allowed',
'&:hover': {
color: colorIcon
}
}
}
};
};
const genGroupStyle = token => {
const {
componentCls,
borderRadiusLG,
borderRadiusSM
} = token;
return {
[`${componentCls}-group`]: Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), genInputGroupStyle(token)), {
'&-rtl': {
direction: 'rtl'
},
'&-wrapper': Object.assign(Object.assign(Object.assign({
display: 'inline-block',
width: '100%',
textAlign: 'start',
verticalAlign: 'top',
'&-rtl': {
direction: 'rtl'
},
// Size
'&-lg': {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusLG,
fontSize: token.inputFontSizeLG
}
},
'&-sm': {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusSM
}
}
}, (0,_variants__WEBPACK_IMPORTED_MODULE_3__.genOutlinedGroupStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_3__.genFilledGroupStyle)(token)), {
// '&-disabled': {
// [`${componentCls}-group-addon`]: {
// ...genDisabledStyle(token),
// },
// },
// Fix the issue of using icons in Space Compact mode
// https://github.com/ant-design/ant-design/issues/42122
[`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
[`${componentCls}, ${componentCls}-group-addon`]: {
borderRadius: 0
}
},
[`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {
[`${componentCls}, ${componentCls}-group-addon`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {
[`${componentCls}, ${componentCls}-group-addon`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
},
// Fix the issue of input use show-count param in space compact mode
// https://github.com/ant-design/ant-design/issues/46872
[`&:not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
[`${componentCls}-affix-wrapper`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
// Fix the issue of input use `addonAfter` param in space compact mode
// https://github.com/ant-design/ant-design/issues/52483
[`&:not(${componentCls}-compact-first-item)${componentCls}-compact-item`]: {
[`${componentCls}-affix-wrapper`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
}
})
})
};
};
const genSearchInputStyle = token => {
const {
componentCls,
antCls
} = token;
const searchPrefixCls = `${componentCls}-search`;
return {
[searchPrefixCls]: {
[componentCls]: {
'&:hover, &:focus': {
[`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
borderInlineStartColor: token.colorPrimaryHover
}
}
},
[`${componentCls}-affix-wrapper`]: {
height: token.controlHeight,
borderRadius: 0
},
// fix slight height diff in Firefox:
// https://ant.design/components/auto-complete-cn/#auto-complete-demo-certain-category
[`${componentCls}-lg`]: {
lineHeight: token.calc(token.lineHeightLG).sub(0.0002).equal()
},
[`> ${componentCls}-group`]: {
[`> ${componentCls}-group-addon:last-child`]: {
insetInlineStart: -1,
padding: 0,
border: 0,
[`${searchPrefixCls}-button`]: {
// Fix https://github.com/ant-design/ant-design/issues/47150
marginInlineEnd: -1,
borderStartStartRadius: 0,
borderEndStartRadius: 0,
boxShadow: 'none'
},
[`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
color: token.colorTextDescription,
'&:hover': {
color: token.colorPrimaryHover
},
'&:active': {
color: token.colorPrimaryActive
},
[`&${antCls}-btn-loading::before`]: {
insetInlineStart: 0,
insetInlineEnd: 0,
insetBlockStart: 0,
insetBlockEnd: 0
}
}
}
},
[`${searchPrefixCls}-button`]: {
height: token.controlHeight,
'&:hover, &:focus': {
zIndex: 1
}
},
'&-large': {
[`${componentCls}-affix-wrapper, ${searchPrefixCls}-button`]: {
height: token.controlHeightLG
}
},
'&-small': {
[`${componentCls}-affix-wrapper, ${searchPrefixCls}-button`]: {
height: token.controlHeightSM
}
},
'&-rtl': {
direction: 'rtl'
},
// ===================== Compact Item Customized Styles =====================
[`&${componentCls}-compact-item`]: {
[`&:not(${componentCls}-compact-last-item)`]: {
[`${componentCls}-group-addon`]: {
[`${componentCls}-search-button`]: {
marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal(),
borderRadius: 0
}
}
},
[`&:not(${componentCls}-compact-first-item)`]: {
[`${componentCls},${componentCls}-affix-wrapper`]: {
borderRadius: 0
}
},
[`> ${componentCls}-group-addon ${componentCls}-search-button,
> ${componentCls},
${componentCls}-affix-wrapper`]: {
'&:hover, &:focus, &:active': {
zIndex: 2
}
},
[`> ${componentCls}-affix-wrapper-focused`]: {
zIndex: 2
}
}
}
};
};
// ============================== Range ===============================
const genRangeStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-out-of-range`]: {
[`&, & input, & textarea, ${componentCls}-show-count-suffix, ${componentCls}-data-count`]: {
color: token.colorError
}
}
};
};
// ============================== Export ==============================
const useSharedStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)(['Input', 'Shared'], token => {
const inputToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, (0,_token__WEBPACK_IMPORTED_MODULE_0__.initInputToken)(token));
return [genInputStyle(inputToken), genAffixStyle(inputToken)];
}, _token__WEBPACK_IMPORTED_MODULE_0__.initComponentToken, {
resetFont: false
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)(['Input', 'Component'], token => {
const inputToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, (0,_token__WEBPACK_IMPORTED_MODULE_0__.initInputToken)(token));
return [genGroupStyle(inputToken), genSearchInputStyle(inputToken), genRangeStyle(inputToken),
// =====================================================
// == Space Compact ==
// =====================================================
(0,_style_compact_item__WEBPACK_IMPORTED_MODULE_6__.genCompactItemStyle)(inputToken)];
}, _token__WEBPACK_IMPORTED_MODULE_0__.initComponentToken, {
resetFont: false
}));
/***/ }),
/***/ "./components/input/style/token.ts":
/*!*****************************************!*\
!*** ./components/input/style/token.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initComponentToken: function() { return /* binding */ initComponentToken; },
/* harmony export */ initInputToken: function() { return /* binding */ initInputToken; }
/* harmony export */ });
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
function initInputToken(token) {
return (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.mergeToken)(token, {
inputAffixPadding: token.paddingXXS
});
}
const initComponentToken = token => {
const {
controlHeight,
fontSize,
lineHeight,
lineWidth,
controlHeightSM,
controlHeightLG,
fontSizeLG,
lineHeightLG,
paddingSM,
controlPaddingHorizontalSM,
controlPaddingHorizontal,
colorFillAlter,
colorPrimaryHover,
colorPrimary,
controlOutlineWidth,
controlOutline,
colorErrorOutline,
colorWarningOutline,
colorBgContainer,
inputFontSize,
inputFontSizeLG,
inputFontSizeSM
} = token;
const mergedFontSize = inputFontSize || fontSize;
const mergedFontSizeSM = inputFontSizeSM || mergedFontSize;
const mergedFontSizeLG = inputFontSizeLG || fontSizeLG;
const paddingBlock = Math.round((controlHeight - mergedFontSize * lineHeight) / 2 * 10) / 10 - lineWidth;
const paddingBlockSM = Math.round((controlHeightSM - mergedFontSizeSM * lineHeight) / 2 * 10) / 10 - lineWidth;
const paddingBlockLG = Math.ceil((controlHeightLG - mergedFontSizeLG * lineHeightLG) / 2 * 10) / 10 - lineWidth;
return {
paddingBlock: Math.max(paddingBlock, 0),
paddingBlockSM: Math.max(paddingBlockSM, 0),
paddingBlockLG: Math.max(paddingBlockLG, 0),
paddingInline: paddingSM - lineWidth,
paddingInlineSM: controlPaddingHorizontalSM - lineWidth,
paddingInlineLG: controlPaddingHorizontal - lineWidth,
addonBg: colorFillAlter,
activeBorderColor: colorPrimary,
hoverBorderColor: colorPrimaryHover,
activeShadow: `0 0 0 ${controlOutlineWidth}px ${controlOutline}`,
errorActiveShadow: `0 0 0 ${controlOutlineWidth}px ${colorErrorOutline}`,
warningActiveShadow: `0 0 0 ${controlOutlineWidth}px ${colorWarningOutline}`,
hoverBg: colorBgContainer,
activeBg: colorBgContainer,
inputFontSize: mergedFontSize,
inputFontSizeLG: mergedFontSizeLG,
inputFontSizeSM: mergedFontSizeSM
};
};
/***/ }),
/***/ "./components/input/style/variants.ts":
/*!********************************************!*\
!*** ./components/input/style/variants.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genBaseOutlinedStyle: function() { return /* binding */ genBaseOutlinedStyle; },
/* harmony export */ genBorderlessStyle: function() { return /* binding */ genBorderlessStyle; },
/* harmony export */ genDisabledStyle: function() { return /* binding */ genDisabledStyle; },
/* harmony export */ genFilledGroupStyle: function() { return /* binding */ genFilledGroupStyle; },
/* harmony export */ genFilledStyle: function() { return /* binding */ genFilledStyle; },
/* harmony export */ genOutlinedGroupStyle: function() { return /* binding */ genOutlinedGroupStyle; },
/* harmony export */ genOutlinedStyle: function() { return /* binding */ genOutlinedStyle; },
/* harmony export */ genUnderlinedStyle: function() { return /* binding */ genUnderlinedStyle; }
/* harmony export */ });
/* unused harmony exports genHoverStyle, genBaseUnderlinedStyle */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genHoverStyle = token => ({
borderColor: token.hoverBorderColor,
backgroundColor: token.hoverBg
});
const genDisabledStyle = token => ({
color: token.colorTextDisabled,
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
boxShadow: 'none',
cursor: 'not-allowed',
opacity: 1,
'input[disabled], textarea[disabled]': {
cursor: 'not-allowed'
},
'&:hover:not([disabled])': Object.assign({}, genHoverStyle((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.mergeToken)(token, {
hoverBorderColor: token.colorBorder,
hoverBg: token.colorBgContainerDisabled
})))
});
/* ============== Outlined ============== */
const genBaseOutlinedStyle = (token, options) => ({
background: token.colorBgContainer,
borderWidth: token.lineWidth,
borderStyle: token.lineType,
borderColor: options.borderColor,
'&:hover': {
borderColor: options.hoverBorderColor,
backgroundColor: token.hoverBg
},
'&:focus, &:focus-within': {
borderColor: options.activeBorderColor,
boxShadow: options.activeShadow,
outline: 0,
backgroundColor: token.activeBg
}
});
const genOutlinedStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseOutlinedStyle(token, options)), {
[`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {
color: options.affixColor
}
}),
[`&${token.componentCls}-status-${options.status}${token.componentCls}-disabled`]: {
borderColor: options.borderColor
}
});
const genOutlinedStyle = (token, extraStyles) => ({
'&-outlined': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {
borderColor: token.colorBorder,
hoverBorderColor: token.hoverBorderColor,
activeBorderColor: token.activeBorderColor,
activeShadow: token.activeShadow
})), {
[`&${token.componentCls}-disabled, &[disabled]`]: Object.assign({}, genDisabledStyle(token))
}), genOutlinedStatusStyle(token, {
status: 'error',
borderColor: token.colorError,
hoverBorderColor: token.colorErrorBorderHover,
activeBorderColor: token.colorError,
activeShadow: token.errorActiveShadow,
affixColor: token.colorError
})), genOutlinedStatusStyle(token, {
status: 'warning',
borderColor: token.colorWarning,
hoverBorderColor: token.colorWarningBorderHover,
activeBorderColor: token.colorWarning,
activeShadow: token.warningActiveShadow,
affixColor: token.colorWarning
})), extraStyles)
});
const genOutlinedGroupStatusStyle = (token, options) => ({
[`&${token.componentCls}-group-wrapper-status-${options.status}`]: {
[`${token.componentCls}-group-addon`]: {
borderColor: options.addonBorderColor,
color: options.addonColor
}
}
});
const genOutlinedGroupStyle = token => ({
'&-outlined': Object.assign(Object.assign(Object.assign({
[`${token.componentCls}-group`]: {
'&-addon': {
background: token.addonBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
},
'&-addon:first-child': {
borderInlineEnd: 0
},
'&-addon:last-child': {
borderInlineStart: 0
}
}
}, genOutlinedGroupStatusStyle(token, {
status: 'error',
addonBorderColor: token.colorError,
addonColor: token.colorErrorText
})), genOutlinedGroupStatusStyle(token, {
status: 'warning',
addonBorderColor: token.colorWarning,
addonColor: token.colorWarningText
})), {
[`&${token.componentCls}-group-wrapper-disabled`]: {
[`${token.componentCls}-group-addon`]: Object.assign({}, genDisabledStyle(token))
}
})
});
/* ============ Borderless ============ */
const genBorderlessStyle = (token, extraStyles) => {
const {
componentCls
} = token;
return {
'&-borderless': Object.assign({
background: 'transparent',
border: 'none',
'&:focus, &:focus-within': {
outline: 'none'
},
// >>>>> Disabled
[`&${componentCls}-disabled, &[disabled]`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed'
},
// >>>>> Status
[`&${componentCls}-status-error`]: {
'&, & input, & textarea': {
color: token.colorError
}
},
[`&${componentCls}-status-warning`]: {
'&, & input, & textarea': {
color: token.colorWarning
}
}
}, extraStyles)
};
};
/* ============== Filled ============== */
const genBaseFilledStyle = (token, options) => ({
background: options.bg,
borderWidth: token.lineWidth,
borderStyle: token.lineType,
borderColor: 'transparent',
'input&, & input, textarea&, & textarea': {
color: options === null || options === void 0 ? void 0 : options.inputColor
},
'&:hover': {
background: options.hoverBg
},
'&:focus, &:focus-within': {
outline: 0,
borderColor: options.activeBorderColor,
backgroundColor: token.activeBg
}
});
const genFilledStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseFilledStyle(token, options)), {
[`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {
color: options.affixColor
}
})
});
const genFilledStyle = (token, extraStyles) => ({
'&-filled': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {
bg: token.colorFillTertiary,
hoverBg: token.colorFillSecondary,
activeBorderColor: token.activeBorderColor
})), {
[`&${token.componentCls}-disabled, &[disabled]`]: Object.assign({}, genDisabledStyle(token))
}), genFilledStatusStyle(token, {
status: 'error',
bg: token.colorErrorBg,
hoverBg: token.colorErrorBgHover,
activeBorderColor: token.colorError,
inputColor: token.colorErrorText,
affixColor: token.colorError
})), genFilledStatusStyle(token, {
status: 'warning',
bg: token.colorWarningBg,
hoverBg: token.colorWarningBgHover,
activeBorderColor: token.colorWarning,
inputColor: token.colorWarningText,
affixColor: token.colorWarning
})), extraStyles)
});
const genFilledGroupStatusStyle = (token, options) => ({
[`&${token.componentCls}-group-wrapper-status-${options.status}`]: {
[`${token.componentCls}-group-addon`]: {
background: options.addonBg,
color: options.addonColor
}
}
});
const genFilledGroupStyle = token => ({
'&-filled': Object.assign(Object.assign(Object.assign({
[`${token.componentCls}-group`]: {
'&-addon': {
background: token.colorFillTertiary
},
[`${token.componentCls}-filled:not(:focus):not(:focus-within)`]: {
'&:not(:first-child)': {
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
'&:not(:last-child)': {
borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
}
}
}, genFilledGroupStatusStyle(token, {
status: 'error',
addonBg: token.colorErrorBg,
addonColor: token.colorErrorText
})), genFilledGroupStatusStyle(token, {
status: 'warning',
addonBg: token.colorWarningBg,
addonColor: token.colorWarningText
})), {
[`&${token.componentCls}-group-wrapper-disabled`]: {
[`${token.componentCls}-group`]: {
'&-addon': {
background: token.colorFillTertiary,
color: token.colorTextDisabled
},
'&-addon:first-child': {
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
},
'&-addon:last-child': {
borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
}
}
}
})
});
/* ============== Underlined ============== */
// https://github.com/ant-design/ant-design/issues/51379
const genBaseUnderlinedStyle = (token, options) => ({
background: token.colorBgContainer,
borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} 0`,
borderStyle: `${token.lineType} none`,
borderColor: `transparent transparent ${options.borderColor} transparent`,
borderRadius: 0,
'&:hover': {
borderColor: `transparent transparent ${options.borderColor} transparent`,
backgroundColor: token.hoverBg
},
'&:focus, &:focus-within': {
borderColor: `transparent transparent ${options.borderColor} transparent`,
outline: 0,
backgroundColor: token.activeBg
}
});
const genUnderlinedStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, options)), {
[`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {
color: options.affixColor
}
}),
[`&${token.componentCls}-status-${options.status}${token.componentCls}-disabled`]: {
borderColor: `transparent transparent ${options.borderColor} transparent`
}
});
const genUnderlinedStyle = (token, extraStyles) => ({
'&-underlined': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, {
borderColor: token.colorBorder,
hoverBorderColor: token.hoverBorderColor,
activeBorderColor: token.activeBorderColor,
activeShadow: token.activeShadow
})), {
// >>>>> Disabled
[`&${token.componentCls}-disabled, &[disabled]`]: {
color: token.colorTextDisabled,
boxShadow: 'none',
cursor: 'not-allowed',
'&:hover': {
borderColor: `transparent transparent ${token.colorBorder} transparent`
}
},
'input[disabled], textarea[disabled]': {
cursor: 'not-allowed'
}
}), genUnderlinedStatusStyle(token, {
status: 'error',
borderColor: token.colorError,
hoverBorderColor: token.colorErrorBorderHover,
activeBorderColor: token.colorError,
activeShadow: token.errorActiveShadow,
affixColor: token.colorError
})), genUnderlinedStatusStyle(token, {
status: 'warning',
borderColor: token.colorWarning,
hoverBorderColor: token.colorWarningBorderHover,
activeBorderColor: token.colorWarning,
activeShadow: token.warningActiveShadow,
affixColor: token.colorWarning
})), extraStyles)
});
/***/ }),
/***/ "./components/layout/style/index.ts":
/*!******************************************!*\
!*** ./components/layout/style/index.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ DEPRECATED_TOKENS: function() { return /* binding */ DEPRECATED_TOKENS; },
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const genLayoutStyle = token => {
const {
antCls,
// .ant
componentCls,
// .ant-layout
colorText,
footerBg,
headerHeight,
headerPadding,
headerColor,
footerPadding,
fontSize,
bodyBg,
headerBg
} = token;
return {
[componentCls]: {
display: 'flex',
flex: 'auto',
flexDirection: 'column',
/* fix firefox can't set height smaller than content on flex item */
minHeight: 0,
background: bodyBg,
'&, *': {
boxSizing: 'border-box'
},
[`&${componentCls}-has-sider`]: {
flexDirection: 'row',
[`> ${componentCls}, > ${componentCls}-content`]: {
// https://segmentfault.com/a/1190000019498300
width: 0
}
},
[`${componentCls}-header, &${componentCls}-footer`]: {
flex: '0 0 auto'
},
// RTL
'&-rtl': {
direction: 'rtl'
}
},
// ==================== Header ====================
[`${componentCls}-header`]: {
height: headerHeight,
padding: headerPadding,
color: headerColor,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerHeight),
background: headerBg,
// Other components/menu/style/index.less line:686
// Integration with header element so menu items have the same height
[`${antCls}-menu`]: {
lineHeight: 'inherit'
}
},
// ==================== Footer ====================
[`${componentCls}-footer`]: {
padding: footerPadding,
color: colorText,
fontSize,
background: footerBg
},
// =================== Content ====================
[`${componentCls}-content`]: {
flex: 'auto',
color: colorText,
// fix firefox can't set height smaller than content on flex item
minHeight: 0
}
};
};
const prepareComponentToken = token => {
const {
colorBgLayout,
controlHeight,
controlHeightLG,
colorText,
controlHeightSM,
marginXXS,
colorTextLightSolid,
colorBgContainer
} = token;
const paddingInline = controlHeightLG * 1.25;
return {
// Deprecated
colorBgHeader: '#001529',
colorBgBody: colorBgLayout,
colorBgTrigger: '#002140',
bodyBg: colorBgLayout,
headerBg: '#001529',
headerHeight: controlHeight * 2,
headerPadding: `0 ${paddingInline}px`,
headerColor: colorText,
footerPadding: `${controlHeightSM}px ${paddingInline}px`,
footerBg: colorBgLayout,
siderBg: '#001529',
triggerHeight: controlHeightLG + marginXXS * 2,
triggerBg: '#002140',
triggerColor: colorTextLightSolid,
zeroTriggerWidth: controlHeightLG,
zeroTriggerHeight: controlHeightLG,
lightSiderBg: colorBgContainer,
lightTriggerBg: colorBgContainer,
lightTriggerColor: colorText
};
};
// ============================== Export ==============================
const DEPRECATED_TOKENS = [['colorBgBody', 'bodyBg'], ['colorBgHeader', 'headerBg'], ['colorBgTrigger', 'triggerBg']];
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Layout', token => [genLayoutStyle(token)], prepareComponentToken, {
deprecatedTokens: DEPRECATED_TOKENS
}));
/***/ }),
/***/ "./components/list/style/index.ts":
/*!****************************************!*\
!*** ./components/list/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBorderedStyle = token => {
const {
listBorderedCls,
componentCls,
paddingLG,
margin,
itemPaddingSM,
itemPaddingLG,
marginLG,
borderRadiusLG
} = token;
return {
[listBorderedCls]: {
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderRadius: borderRadiusLG,
[`${componentCls}-header,${componentCls}-footer,${componentCls}-item`]: {
paddingInline: paddingLG
},
[`${componentCls}-pagination`]: {
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(margin)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginLG)}`
}
},
[`${listBorderedCls}${componentCls}-sm`]: {
[`${componentCls}-item,${componentCls}-header,${componentCls}-footer`]: {
padding: itemPaddingSM
}
},
[`${listBorderedCls}${componentCls}-lg`]: {
[`${componentCls}-item,${componentCls}-header,${componentCls}-footer`]: {
padding: itemPaddingLG
}
}
};
};
const genResponsiveStyle = token => {
const {
componentCls,
screenSM,
screenMD,
marginLG,
marginSM,
margin
} = token;
return {
[`@media screen and (max-width:${screenMD}px)`]: {
[componentCls]: {
[`${componentCls}-item`]: {
[`${componentCls}-item-action`]: {
marginInlineStart: marginLG
}
}
},
[`${componentCls}-vertical`]: {
[`${componentCls}-item`]: {
[`${componentCls}-item-extra`]: {
marginInlineStart: marginLG
}
}
}
},
[`@media screen and (max-width: ${screenSM}px)`]: {
[componentCls]: {
[`${componentCls}-item`]: {
flexWrap: 'wrap',
[`${componentCls}-action`]: {
marginInlineStart: marginSM
}
}
},
[`${componentCls}-vertical`]: {
[`${componentCls}-item`]: {
flexWrap: 'wrap-reverse',
[`${componentCls}-item-main`]: {
minWidth: token.contentWidth
},
[`${componentCls}-item-extra`]: {
margin: `auto auto ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(margin)}`
}
}
}
}
};
};
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
antCls,
controlHeight,
minHeight,
paddingSM,
marginLG,
padding,
itemPadding,
colorPrimary,
itemPaddingSM,
itemPaddingLG,
paddingXS,
margin,
colorText,
colorTextDescription,
motionDurationSlow,
lineWidth,
headerBg,
footerBg,
emptyTextPadding,
metaMarginBottom,
avatarMarginRight,
titleMarginBottom,
descriptionFontSize
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'relative',
'*': {
outline: 'none'
},
[`${componentCls}-header`]: {
background: headerBg
},
[`${componentCls}-footer`]: {
background: footerBg
},
[`${componentCls}-header, ${componentCls}-footer`]: {
paddingBlock: paddingSM
},
[`${componentCls}-pagination`]: {
marginBlockStart: marginLG,
// https://github.com/ant-design/ant-design/issues/20037
[`${antCls}-pagination-options`]: {
textAlign: 'start'
}
},
[`${componentCls}-spin`]: {
minHeight,
textAlign: 'center'
},
[`${componentCls}-items`]: {
margin: 0,
padding: 0,
listStyle: 'none'
},
[`${componentCls}-item`]: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: itemPadding,
color: colorText,
[`${componentCls}-item-meta`]: {
display: 'flex',
flex: 1,
alignItems: 'flex-start',
maxWidth: '100%',
[`${componentCls}-item-meta-avatar`]: {
marginInlineEnd: avatarMarginRight
},
[`${componentCls}-item-meta-content`]: {
flex: '1 0',
width: 0,
color: colorText
},
[`${componentCls}-item-meta-title`]: {
margin: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginXXS)} 0`,
color: colorText,
fontSize: token.fontSize,
lineHeight: token.lineHeight,
'> a': {
color: colorText,
transition: `all ${motionDurationSlow}`,
'&:hover': {
color: colorPrimary
}
}
},
[`${componentCls}-item-meta-description`]: {
color: colorTextDescription,
fontSize: descriptionFontSize,
lineHeight: token.lineHeight
}
},
[`${componentCls}-item-action`]: {
flex: '0 0 auto',
marginInlineStart: token.marginXXL,
padding: 0,
fontSize: 0,
listStyle: 'none',
'& > li': {
position: 'relative',
display: 'inline-block',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`,
color: colorTextDescription,
fontSize: token.fontSize,
lineHeight: token.lineHeight,
textAlign: 'center',
'&:first-child': {
paddingInlineStart: 0
}
},
[`${componentCls}-item-action-split`]: {
position: 'absolute',
insetBlockStart: '50%',
insetInlineEnd: 0,
width: lineWidth,
height: token.calc(token.fontHeight).sub(token.calc(token.marginXXS).mul(2)).equal(),
transform: 'translateY(-50%)',
backgroundColor: token.colorSplit
}
}
},
[`${componentCls}-empty`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)} 0`,
color: colorTextDescription,
fontSize: token.fontSizeSM,
textAlign: 'center'
},
[`${componentCls}-empty-text`]: {
padding: emptyTextPadding,
color: token.colorTextDisabled,
fontSize: token.fontSize,
textAlign: 'center'
},
// ============================ without flex ============================
[`${componentCls}-item-no-flex`]: {
display: 'block'
}
}),
[`${componentCls}-grid ${antCls}-col > ${componentCls}-item`]: {
display: 'block',
maxWidth: '100%',
marginBlockEnd: margin,
paddingBlock: 0,
borderBlockEnd: 'none'
},
[`${componentCls}-vertical ${componentCls}-item`]: {
alignItems: 'initial',
[`${componentCls}-item-main`]: {
display: 'block',
flex: 1
},
[`${componentCls}-item-extra`]: {
marginInlineStart: marginLG
},
[`${componentCls}-item-meta`]: {
marginBlockEnd: metaMarginBottom,
[`${componentCls}-item-meta-title`]: {
marginBlockStart: 0,
marginBlockEnd: titleMarginBottom,
color: colorText,
fontSize: token.fontSizeLG,
lineHeight: token.lineHeightLG
}
},
[`${componentCls}-item-action`]: {
marginBlockStart: padding,
marginInlineStart: 'auto',
'> li': {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)}`,
'&:first-child': {
paddingInlineStart: 0
}
}
}
},
[`${componentCls}-split ${componentCls}-item`]: {
borderBlockEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
'&:last-child': {
borderBlockEnd: 'none'
}
},
[`${componentCls}-split ${componentCls}-header`]: {
borderBlockEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
[`${componentCls}-split${componentCls}-empty ${componentCls}-footer`]: {
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
[`${componentCls}-loading ${componentCls}-spin-nested-loading`]: {
minHeight: controlHeight
},
[`${componentCls}-split${componentCls}-something-after-last-item ${antCls}-spin-container > ${componentCls}-items > ${componentCls}-item:last-child`]: {
borderBlockEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
[`${componentCls}-lg ${componentCls}-item`]: {
padding: itemPaddingLG
},
[`${componentCls}-sm ${componentCls}-item`]: {
padding: itemPaddingSM
},
// Horizontal
[`${componentCls}:not(${componentCls}-vertical)`]: {
[`${componentCls}-item-no-flex`]: {
[`${componentCls}-item-action`]: {
float: 'right'
}
}
}
};
};
const prepareComponentToken = token => ({
contentWidth: 220,
itemPadding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentVertical)} 0`,
itemPaddingSM: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentVerticalSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentHorizontal)}`,
itemPaddingLG: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentVerticalLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentHorizontalLG)}`,
headerBg: 'transparent',
footerBg: 'transparent',
emptyTextPadding: token.padding,
metaMarginBottom: token.padding,
avatarMarginRight: token.padding,
titleMarginBottom: token.paddingSM,
descriptionFontSize: token.fontSize
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('List', token => {
const listToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
listBorderedCls: `${token.componentCls}-bordered`,
minHeight: token.controlHeightLG
});
return [genBaseStyle(listToken), genBorderedStyle(listToken), genResponsiveStyle(listToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/locale/ar_EG.ts":
/*!************************************************!*\
!*** ./components/locale/ar_EG.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ar_EG; }
});
;// ./node_modules/rc-pagination/es/locale/ar_EG.js
var locale = {
// Options
items_per_page: '/ الصفحة',
jump_to: 'الذهاب إلى',
jump_to_confirm: 'تأكيد',
page: 'الصفحة',
// Pagination
prev_page: 'الصفحة السابقة',
next_page: 'الصفحة التالية',
prev_5: 'خمس صفحات سابقة',
next_5: 'خمس صفحات تالية',
prev_3: 'ثلاث صفحات سابقة',
next_3: 'ثلاث صفحات تالية',
page_size: 'مقاس الصفحه'
};
/* harmony default export */ var ar_EG = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ar_EG.js
var ar_EG_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ar_EG',
today: 'اليوم',
now: 'الأن',
backToToday: 'العودة إلى اليوم',
ok: 'تأكيد',
clear: 'مسح',
week: 'الأسبوع',
month: 'الشهر',
year: 'السنة',
timeSelect: 'اختيار الوقت',
dateSelect: 'اختيار التاريخ',
monthSelect: 'اختيار الشهر',
yearSelect: 'اختيار السنة',
decadeSelect: 'اختيار العقد',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'الشهر السابق (PageUp)',
nextMonth: 'الشهر التالى(PageDown)',
previousYear: 'العام السابق (Control + left)',
nextYear: 'العام التالى (Control + right)',
previousDecade: 'العقد السابق',
nextDecade: 'العقد التالى',
previousCentury: 'القرن السابق',
nextCentury: 'القرن التالى'
});
/* harmony default export */ var locale_ar_EG = (ar_EG_locale);
;// ./components/time-picker/locale/ar_EG.ts
const locale_ar_EG_locale = {
placeholder: 'اختيار الوقت'
};
/* harmony default export */ var time_picker_locale_ar_EG = (locale_ar_EG_locale);
;// ./components/date-picker/locale/ar_EG.ts
// Merge into a locale object
const date_picker_locale_ar_EG_locale = {
lang: Object.assign({
placeholder: 'اختيار التاريخ',
rangePlaceholder: ['البداية', 'النهاية'],
yearFormat: 'YYYY',
monthFormat: 'MMMM',
monthBeforeYear: true,
shortWeekDays: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
shortMonths: ['يناير', 'فبراير', 'مارس', 'إبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
}, locale_ar_EG),
timePickerLocale: Object.assign({}, time_picker_locale_ar_EG)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ar_EG = (date_picker_locale_ar_EG_locale);
;// ./components/calendar/locale/ar_EG.ts
/* harmony default export */ var calendar_locale_ar_EG = (date_picker_locale_ar_EG);
;// ./components/locale/ar_EG.ts
const typeTemplate = 'ليس ${label} من نوع ${type} صالحًا';
const localeValues = {
locale: 'ar',
Pagination: ar_EG,
DatePicker: date_picker_locale_ar_EG,
TimePicker: time_picker_locale_ar_EG,
Calendar: calendar_locale_ar_EG,
global: {
placeholder: 'يرجى التحديد'
},
Table: {
filterTitle: 'الفلاتر',
filterConfirm: 'تأكيد',
filterReset: 'إعادة ضبط',
selectAll: 'اختيار الكل',
selectInvert: 'إلغاء الاختيار',
selectionAll: 'حدد جميع البيانات',
sortTitle: 'رتب',
expand: 'توسيع الصف',
collapse: 'طي الصف',
triggerDesc: 'ترتيب تنازلي',
triggerAsc: 'ترتيب تصاعدي',
cancelSort: 'إلغاء الترتيب'
},
Tour: {
Next: 'التالي',
Previous: 'السابق',
Finish: 'إنهاء'
},
Modal: {
okText: 'تأكيد',
cancelText: 'إلغاء',
justOkText: 'تأكيد'
},
Popconfirm: {
okText: 'تأكيد',
cancelText: 'إلغاء'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'ابحث هنا',
itemUnit: 'عنصر',
itemsUnit: 'عناصر'
},
Upload: {
uploading: 'جاري الرفع...',
removeFile: 'احذف الملف',
uploadError: 'مشكلة فى الرفع',
previewFile: 'استعرض الملف',
downloadFile: 'تحميل الملف'
},
Empty: {
description: 'لا توجد بيانات'
},
Icon: {
icon: 'أيقونة'
},
Text: {
edit: 'تعديل',
copy: 'نسخ',
copied: 'نقل',
expand: 'وسع'
},
Form: {
defaultValidateMessages: {
default: 'خطأ في حقل الإدخال ${label}',
required: 'يرجى إدخال ${label}',
enum: '${label} يجب أن يكون واحدا من [${enum}]',
whitespace: '${label} لا يمكن أن يكون حرفًا فارغًا',
date: {
format: '${label} تنسيق التاريخ غير صحيح',
parse: '${label} لا يمكن تحويلها إلى تاريخ',
invalid: 'تاريخ ${label} غير صحيح'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: 'يجب ${label} ان يكون ${len} أحرف',
min: '${label} على الأقل ${min} أحرف',
max: '${label} يصل إلى ${max} أحرف',
range: 'يجب ${label} ان يكون مابين ${min}-${max} أحرف'
},
number: {
len: '${len} ان يساوي ${label} يجب',
min: '${min} الأدنى هو ${label} حد',
max: '${max} الأقصى هو ${label} حد',
range: '${max}-${min} ان يكون مابين ${label} يجب'
},
array: {
len: 'يجب أن يكون ${label} طوله ${len}',
min: 'يجب أن يكون ${label} طوله الأدنى ${min}',
max: 'يجب أن يكون ${label} طوله الأقصى ${max}',
range: 'يجب أن يكون ${label} طوله مابين ${min}-${max}'
},
pattern: {
mismatch: 'لا يتطابق ${label} مع ${pattern}'
}
}
},
Image: {
preview: 'معاينة'
},
QRCode: {
expired: 'انتهت صلاحية رمز الاستجابة السريعة',
refresh: 'انقر للتحديث',
scanned: 'تم المسح'
},
ColorPicker: {
presetEmpty: 'لا يوجد',
transparent: 'شفاف',
singleColor: 'لون واحد',
gradientColor: 'تدرج لوني'
}
};
/* harmony default export */ var components_locale_ar_EG = (localeValues);
/***/ }),
/***/ "./components/locale/az_AZ.ts":
/*!************************************************!*\
!*** ./components/locale/az_AZ.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_az_AZ; }
});
;// ./node_modules/rc-pagination/es/locale/az_AZ.js
var locale = {
// Options
items_per_page: '/ səhifə',
jump_to: 'Get',
jump_to_confirm: 'təsdiqlə',
page: '',
// Pagination
prev_page: 'Əvvəlki Səhifə',
next_page: 'Növbəti Səhifə',
prev_5: 'Əvvəlki 5 Səhifə',
next_5: 'Növbəti 5 Səhifə',
prev_3: 'Əvvəlki 3 Səhifə',
next_3: 'Növbəti 3 Səhifə',
page_size: 'Page Size'
};
/* harmony default export */ var az_AZ = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/az_AZ.js
var az_AZ_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'az_AZ',
today: 'Bugün',
now: 'İndi',
backToToday: 'Bugünə qayıt',
ok: 'Təsdiq',
clear: 'Təmizlə',
week: 'Həftə',
month: 'Ay',
year: 'İl',
timeSelect: 'vaxtı seç',
dateSelect: 'tarixi seç',
weekSelect: 'Həftə seç',
monthSelect: 'Ay seç',
yearSelect: 'il seç',
decadeSelect: 'Onillik seçin',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Əvvəlki ay (PageUp)',
nextMonth: 'Növbəti ay (PageDown)',
previousYear: 'Sonuncu il (Control + left)',
nextYear: 'Növbəti il (Control + right)',
previousDecade: 'Sonuncu onillik',
nextDecade: 'Növbəti onillik',
previousCentury: 'Sonuncu əsr',
nextCentury: 'Növbəti əsr'
});
/* harmony default export */ var locale_az_AZ = (az_AZ_locale);
;// ./components/time-picker/locale/az_AZ.ts
const locale_az_AZ_locale = {
placeholder: 'Vaxtı seç',
rangePlaceholder: ['Başlama tarixi', 'Bitmə tarixi']
};
/* harmony default export */ var time_picker_locale_az_AZ = (locale_az_AZ_locale);
;// ./components/date-picker/locale/az_AZ.ts
const date_picker_locale_az_AZ_locale = {
lang: Object.assign({
placeholder: 'Tarix seçin',
rangePlaceholder: ['Başlama tarixi', 'Bitmə tarixi'],
yearPlaceholder: 'İl seçin',
quarterPlaceholder: 'Rüb seçin',
monthPlaceholder: 'Ay seçin',
weekPlaceholder: 'Həftə seçin',
rangeYearPlaceholder: ['Başlama il', 'Bitmə il'],
rangeQuarterPlaceholder: ['Başlama rüb', 'Bitmə rüb'],
rangeMonthPlaceholder: ['Başlama ay', 'Bitmə ay'],
rangeWeekPlaceholder: ['Başlama həftə', 'Bitmə həftə']
}, locale_az_AZ),
timePickerLocale: Object.assign({}, time_picker_locale_az_AZ)
};
/* harmony default export */ var date_picker_locale_az_AZ = (date_picker_locale_az_AZ_locale);
;// ./components/calendar/locale/az_AZ.ts
/* harmony default export */ var calendar_locale_az_AZ = (date_picker_locale_az_AZ);
;// ./components/locale/az_AZ.ts
const typeTemplate = '${label} Hökmlü deyil ${type}';
const localeValues = {
locale: 'az',
Pagination: az_AZ,
DatePicker: date_picker_locale_az_AZ,
TimePicker: time_picker_locale_az_AZ,
Calendar: calendar_locale_az_AZ,
global: {
placeholder: 'Zəhmət olmasa seçin'
},
Table: {
filterTitle: 'Filter menyu',
filterConfirm: 'Axtar',
filterReset: 'Sıfırla',
emptyText: 'Məlumat yoxdur',
selectAll: 'Cari səhifəni seç',
selectInvert: 'Mövcud səhifənin elementlərinin sırasını tərs çevir',
filterEmptyText: 'Filter yoxdur',
filterCheckAll: 'Bütün maddələri seç',
filterSearchPlaceholder: 'Filterlərdə axtar',
selectNone: 'Bütün məlumatı sil',
selectionAll: 'Bütün məlumatı seç',
sortTitle: 'Sırala',
expand: 'Sıranı genişləndir',
collapse: 'Sıranı qapadın',
triggerDesc: 'Azalan sıralama üçün klik edin',
triggerAsc: 'Artan sıralama üçün klik edin',
cancelSort: 'Sıralamayı ləğv edin'
},
Tour: {
Next: 'Növbəti',
Previous: 'Əvvəlki',
Finish: 'Bitir'
},
Modal: {
okText: 'Bəli',
cancelText: 'Ləğv et',
justOkText: 'Bəli'
},
Popconfirm: {
okText: 'Bəli',
cancelText: 'Ləğv et'
},
Transfer: {
titles: ['', ''],
notFoundContent: 'Tapılmadı',
searchPlaceholder: 'Burada axtar',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Sil',
selectCurrent: 'Cari səhifəni seç',
removeCurrent: 'Cari səhifəni sil',
selectAll: 'Bütün məlumatı seç',
deselectAll: 'Bütün seçmə nişanlarını sil',
removeAll: 'Bütün məlumatı sil',
selectInvert: 'Mövcud səhifənin elementlərinin sırasını tərs çevir'
},
Upload: {
uploading: 'Yüklənir...',
removeFile: 'Faylı sil',
uploadError: 'Yükləmə xətası',
previewFile: 'Fayla önbaxış',
downloadFile: 'Faylı yüklə'
},
Empty: {
description: 'Məlumat yoxdur'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Dəyişiklik et',
copy: 'Kopyala',
copied: 'Kopyalandı',
expand: 'Genişləndir',
collapse: 'Yığılma'
},
Form: {
optional: '(Seçimli)',
defaultValidateMessages: {
default: 'Sahə təsdiq xətası ${label}',
required: 'Xahiş edirik daxil olun ${label}',
enum: '${label} Onlardan biri olmalıdır[${enum}]',
whitespace: '${label} Null xarakter ola bilməz',
date: {
format: '${label} Tarix formatı hökmlü deyil',
parse: '${label} Tarixi döndərmək mümkün deyil',
invalid: '${label} səhv tarixdir'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} Olmalıdır ${len} işarələr',
min: '${label} ən az ${min} işarələr',
max: '${label} ən çox ${max} işarələr',
range: '${label} Olmalıdır ${min}-${max} hərflər arasında'
},
number: {
len: '${label} Bərabər olmalıdır ${len}',
min: '${label} Minimal dəyəri ${min}',
max: '${label} Maksimal qiymət: ${max}',
range: '${label} Olmalıdır ${min}-${max} aralarında'
},
array: {
len: 'Olmalıdır ${len} parça ${label}',
min: 'ən az ${min} parça ${label}',
max: 'ən çox ${max} parça ${label}',
range: '${label} miqdarıOlmalıdır ${min}-${max} aralarında'
},
pattern: {
mismatch: '${label} Şablona uyğun gəlmir ${pattern}'
}
}
},
Image: {
preview: 'Önbaxış'
},
QRCode: {
expired: 'QR kodunun müddəti bitmişdir',
refresh: 'Yenilə',
scanned: 'Gözətildi'
},
ColorPicker: {
presetEmpty: 'Boşdur',
transparent: 'Şəffaf',
singleColor: 'Tək rəng',
gradientColor: 'Gradient rəng'
}
};
/* harmony default export */ var components_locale_az_AZ = (localeValues);
/***/ }),
/***/ "./components/locale/bg_BG.ts":
/*!************************************************!*\
!*** ./components/locale/bg_BG.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_bg_BG; }
});
;// ./node_modules/rc-pagination/es/locale/bg_BG.js
var locale = {
// Options
items_per_page: '/ страница',
jump_to: 'Към',
jump_to_confirm: 'потвърждавам',
page: '',
// Pagination
prev_page: 'Предишна страница',
next_page: 'Следваща страница',
prev_5: 'Предишни 5 страници',
next_5: 'Следващи 5 страници',
prev_3: 'Предишни 3 страници',
next_3: 'Следващи 3 страници',
page_size: 'Page Size'
};
/* harmony default export */ var bg_BG = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/bg_BG.js
var bg_BG_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'bg_BG',
today: 'Днес',
now: 'Сега',
backToToday: 'Към днес',
ok: 'Добре',
clear: 'Изчистване',
week: 'Седмица',
month: 'Месец',
year: 'Година',
timeSelect: 'Избор на час',
dateSelect: 'Избор на дата',
monthSelect: 'Избор на месец',
yearSelect: 'Избор на година',
decadeSelect: 'Десетилетие',
dateFormat: 'D M YYYY',
dateTimeFormat: 'D M YYYY HH:mm:ss',
previousMonth: 'Предишен месец (PageUp)',
nextMonth: 'Следващ месец (PageDown)',
previousYear: 'Последна година (Control + left)',
nextYear: 'Следваща година (Control + right)',
previousDecade: 'Предишно десетилетие',
nextDecade: 'Следващо десетилетие',
previousCentury: 'Последен век',
nextCentury: 'Следващ век'
});
/* harmony default export */ var locale_bg_BG = (bg_BG_locale);
;// ./components/time-picker/locale/bg_BG.ts
const locale_bg_BG_locale = {
placeholder: 'Избор на час'
};
/* harmony default export */ var time_picker_locale_bg_BG = (locale_bg_BG_locale);
;// ./components/date-picker/locale/bg_BG.ts
// Merge into a locale object
const date_picker_locale_bg_BG_locale = {
lang: Object.assign({
placeholder: 'Избор на дата',
rangePlaceholder: ['Начална', 'Крайна']
}, locale_bg_BG),
timePickerLocale: Object.assign({}, time_picker_locale_bg_BG)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_bg_BG = (date_picker_locale_bg_BG_locale);
;// ./components/calendar/locale/bg_BG.ts
/* harmony default export */ var calendar_locale_bg_BG = (date_picker_locale_bg_BG);
;// ./components/locale/bg_BG.ts
const typeTemplate = '${label} не е валиден ${type}';
const localeValues = {
locale: 'bg',
Pagination: bg_BG,
DatePicker: date_picker_locale_bg_BG,
TimePicker: time_picker_locale_bg_BG,
Calendar: calendar_locale_bg_BG,
Table: {
filterTitle: 'Филтриране',
filterConfirm: 'Добре',
filterReset: 'Нулриане',
selectAll: 'Избор на текуща страница',
selectInvert: 'Обръщане'
},
Modal: {
okText: 'Добре',
cancelText: 'Отказ',
justOkText: 'Добре'
},
Popconfirm: {
okText: 'Добре',
cancelText: 'Отказ'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Търсене',
itemUnit: 'избор',
itemsUnit: 'избори'
},
Upload: {
uploading: 'Качване...',
removeFile: 'Премахване',
uploadError: 'Грешка при качването',
previewFile: 'Преглед',
downloadFile: 'Свали файл'
},
Empty: {
description: 'Няма данни'
},
Form: {
optional: '(по желание)',
defaultValidateMessages: {
default: 'грешка при проверка на полето ${label}',
required: 'Моля, въведете ${label}',
enum: '${label} трябва да е един от [${enum}]',
whitespace: '${label} Не може да бъде нулев знак',
date: {
format: '${label} невалиден формат на датата',
parse: '${label} не може да се преобразува в дата',
invalid: '${label} е невалидна дата'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ще бъде ${len} знака',
min: '${label} най-малко ${min} герои',
max: '${label} повечето ${max} герои',
range: '${label} Трябва да е вътре ${min}-${max} между знаци'
},
number: {
len: '${label} трябва да е равно на ${len}',
min: '${label} Минималната стойност е ${min}',
max: '${label} Максималната стойност е ${max}',
range: '${label} Трябва да е вътре ${min}-${max} между'
},
array: {
len: 'ще бъде ${len} индивидуален ${label}',
min: 'най-малко ${min} индивидуален ${label}',
max: 'повечето ${max} индивидуален ${label}',
range: '${label} Количеството трябва да е вътре ${min}-${max} между'
},
pattern: {
mismatch: '${label} не отговаря на модела ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_bg_BG = (localeValues);
/***/ }),
/***/ "./components/locale/bn_BD.ts":
/*!************************************************!*\
!*** ./components/locale/bn_BD.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_bn_BD; }
});
;// ./node_modules/rc-pagination/es/locale/bn_BD.js
var locale = {
// Options
items_per_page: '/ পৃষ্ঠা',
jump_to: 'যাও',
jump_to_confirm: 'নিশ্চিত',
page: 'পৃষ্ঠা',
// Pagination
prev_page: 'আগের পৃষ্ঠা',
next_page: 'পরের পৃষ্ঠা',
prev_5: 'পূর্ববর্তী ৫ পৃষ্ঠা',
next_5: 'পরবর্তী ৫ পৃষ্ঠা',
prev_3: 'পূর্ববর্তী ৩ পৃষ্ঠা',
next_3: 'পরবর্তী ৩ পৃষ্ঠা',
page_size: 'পাতার আকার'
};
/* harmony default export */ var bn_BD = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/bn_BD.js
var bn_BD_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'bn_BD',
today: 'আজ',
now: 'এখন',
backToToday: 'আজকে ফিরে চলুন',
ok: 'ওকে',
clear: 'পরিস্কার',
week: 'সপ্তাহ',
month: 'মাস',
year: 'বছর',
timeSelect: 'সময় নির্বাচন',
dateSelect: 'তারিখ নির্বাচন',
weekSelect: 'সপ্তাহ পছন্দ করুন',
monthSelect: 'মাস পছন্দ করুন',
yearSelect: 'বছর পছন্দ করুন',
decadeSelect: 'একটি দশক পছন্দ করুন',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'গত মাস (PageUp)',
nextMonth: 'আগামী মাস (PageDown)',
previousYear: 'গত বছর (Control + left)',
nextYear: 'আগামী বছর (Control + right)',
previousDecade: 'গত দশক',
nextDecade: 'পরের দশক',
previousCentury: 'গত শতাব্দী',
nextCentury: 'পরের শতাব্দী'
});
/* harmony default export */ var locale_bn_BD = (bn_BD_locale);
;// ./components/time-picker/locale/bn_BD.ts
const locale_bn_BD_locale = {
placeholder: 'সময় নির্বাচন',
rangePlaceholder: ['সময় শুরু', 'শেষ সময়']
};
/* harmony default export */ var time_picker_locale_bn_BD = (locale_bn_BD_locale);
;// ./components/date-picker/locale/bn_BD.ts
// Merge into a locale object
const date_picker_locale_bn_BD_locale = {
lang: Object.assign({
placeholder: 'তারিখ নির্বাচন',
yearPlaceholder: 'বছর নির্বাচন',
quarterPlaceholder: 'কোয়ার্টার নির্বাচন',
monthPlaceholder: 'মাস নির্বাচন',
weekPlaceholder: 'সপ্তাহ নির্বাচন',
rangePlaceholder: ['শুরুর তারিখ', 'শেষ তারিখ'],
rangeYearPlaceholder: ['শুরুর বছর', 'শেষ বছর'],
rangeMonthPlaceholder: ['শুরুর মাস', 'শেষ মাস'],
rangeWeekPlaceholder: ['শুরুর সপ্তাহ', 'শেষ সপ্তাহ']
}, locale_bn_BD),
timePickerLocale: Object.assign({}, time_picker_locale_bn_BD)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_bn_BD = (date_picker_locale_bn_BD_locale);
;// ./components/calendar/locale/bn_BD.ts
/* harmony default export */ var calendar_locale_bn_BD = (date_picker_locale_bn_BD);
;// ./components/locale/bn_BD.ts
const typeTemplate = '${label} টি সঠিক ${type} নয়।';
const localeValues = {
locale: 'bn-bd',
Pagination: bn_BD,
DatePicker: date_picker_locale_bn_BD,
TimePicker: time_picker_locale_bn_BD,
Calendar: calendar_locale_bn_BD,
global: {
placeholder: 'অনুগ্রহ করে নির্বাচন করুন'
},
Table: {
filterTitle: 'ফিল্টার মেনু',
filterConfirm: 'ঠিক',
filterReset: 'রিসেট',
filterEmptyText: 'ফিল্টার নেই',
emptyText: 'কোনও ডেটা নেই',
selectAll: 'বর্তমান পৃষ্ঠা নির্বাচন করুন',
selectInvert: 'বর্তমান পৃষ্ঠাটি উল্টে দিন',
selectNone: 'সমস্ত ডেটা সাফ করুন',
selectionAll: 'সমস্ত ডেটা নির্বাচন করুন',
sortTitle: 'সাজান',
expand: 'সারি প্রসারিত করুন',
collapse: 'সারি সঙ্কুচিত করুন',
triggerDesc: 'অবতরণকে সাজানোর জন্য ক্লিক করুন',
triggerAsc: 'আরোহী বাছাই করতে ক্লিক করুন',
cancelSort: 'বাছাই বাতিল করতে ক্লিক করুন'
},
Modal: {
okText: 'ঠিক',
cancelText: 'বাতিল',
justOkText: 'ঠিক'
},
Popconfirm: {
okText: 'ঠিক',
cancelText: 'বাতিল'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'এখানে অনুসন্ধান',
itemUnit: 'আইটেম',
itemsUnit: 'আইটেমসমূহ',
remove: 'অপসারণ',
selectCurrent: 'বর্তমান পৃষ্ঠা নির্বাচন করুন',
removeCurrent: 'বর্তমান পৃষ্ঠাটি সরান',
selectAll: 'সমস্ত ডেটা নির্বাচন করুন',
removeAll: 'সমস্ত ডেটা সরান',
selectInvert: 'বর্তমান পৃষ্ঠাটি উল্টে দিন'
},
Upload: {
uploading: 'আপলোড হচ্ছে ...',
removeFile: 'ফাইল সরান',
uploadError: 'আপলোডে সমস্যা',
previewFile: 'ফাইলের পূর্বরূপ',
downloadFile: 'ফাইল ডাউনলোড'
},
Empty: {
description: 'কোনও ডেটা নেই'
},
Icon: {
icon: 'আইকন'
},
Text: {
edit: 'সম্পাদনা',
copy: 'অনুলিপি',
copied: 'অনুলিপি হয়েছে',
expand: 'বিস্তৃত করা'
},
Form: {
optional: '(ঐচ্ছিক)',
defaultValidateMessages: {
default: '${label} এর ক্ষেত্রে ক্ষেত্র বৈধতা ত্রুটি',
required: 'অনুগ্রহ করে ${label} প্রবেশ করান',
enum: '${label} অবশ্যই [${enum}] এর মধ্যে একটি হতে হবে',
whitespace: '${label} ফাঁকা অক্ষর হতে পারে না',
date: {
format: '${label} তারিখ ফরমেট সঠিক নয়।',
parse: '${label} তারিখে রূপান্তর করা যায় না',
invalid: '${label} একটি সঠিক তারিখ না।'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} অবশ্যই ${len} অক্ষরের হতে হবে।',
min: '${label} অবশ্যই অন্তত ${min} অক্ষরের হতে হবে।',
max: '${label} অবশ্যই ${max} পর্যন্ত অক্ষরের হতে হবে।',
range: '${label} অবশ্যই ${min}-${max} অক্ষরের এর মধ্যে হতে হবে।'
},
number: {
len: '${label} অবশ্যই ${len} এর সমান হতে হবে',
min: '${label} অবশ্যই সর্বনিম্ন ${min} হতে হবে',
max: '${label} অবশ্যই সর্বোচ্চ ${max} হতে হবে',
range: '${label} অবশ্যই ${min}-${max} এর মধ্যে হতে হবে'
},
array: {
len: 'অবশ্যই ${len} ${label} হতে হবে',
min: 'কমপক্ষে ${min} ${label}',
max: 'সর্বাধিক হিসাবে ${max} ${label}',
range: '${label} এর পরিমাণ অবশ্যই ${min}-${max} এর মধ্যে হতে হবে'
},
pattern: {
mismatch: '${label} এই ${pattern} প্যাটার্নের সাথে মেলে না'
}
}
},
Image: {
preview: 'পূর্বরূপ'
}
};
/* harmony default export */ var components_locale_bn_BD = (localeValues);
/***/ }),
/***/ "./components/locale/by_BY.ts":
/*!************************************************!*\
!*** ./components/locale/by_BY.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_by_BY; }
});
;// ./node_modules/rc-pagination/es/locale/by_BY.js
var locale = {
// Options
items_per_page: '/старонка',
jump_to: 'Перайсці',
jump_to_confirm: 'Пацвердзіць',
page: '',
// Pagination
prev_page: 'Назад',
next_page: 'Наперад',
prev_5: 'Папярэднія 5',
next_5: 'Наступныя 5',
prev_3: 'Папярэднія 3',
next_3: 'Наступныя 3',
page_size: 'памер старонкі'
};
/* harmony default export */ var by_BY = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/by_BY.js
var by_BY_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'by_BY',
today: 'Сёння',
now: 'Зараз',
backToToday: 'Дадзеная дата',
ok: 'OK',
clear: 'Ачысціць',
week: 'Тыдзень',
month: 'Месяц',
year: 'Год',
timeSelect: 'Выбраць час',
dateSelect: 'Выбраць дату',
weekSelect: 'Выбраць тыдзень',
monthSelect: 'Выбраць месяц',
yearSelect: 'Выбраць год',
decadeSelect: 'Выбраць дзесяцігоддзе',
dateFormat: 'D-M-YYYY',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
previousMonth: 'Папярэдні месяц (PageUp)',
nextMonth: 'Наступны месяц (PageDown)',
previousYear: 'Папярэдні год (Control + left)',
nextYear: 'Наступны год (Control + right)',
previousDecade: 'Папярэдняе дзесяцігоддзе',
nextDecade: 'Наступнае дзесяцігоддзе',
previousCentury: 'Папярэдні век',
nextCentury: 'Наступны век'
});
/* harmony default export */ var locale_by_BY = (by_BY_locale);
;// ./components/time-picker/locale/by_BY.ts
const locale_by_BY_locale = {
placeholder: 'Выберыце час',
rangePlaceholder: ['Час пачатку', 'Час заканчэння']
};
/* harmony default export */ var time_picker_locale_by_BY = (locale_by_BY_locale);
;// ./components/date-picker/locale/by_BY.ts
const date_picker_locale_by_BY_locale = {
lang: Object.assign({
placeholder: 'Выберыце дату',
yearPlaceholder: 'Выберыце год',
quarterPlaceholder: 'Выберыце квартал',
monthPlaceholder: 'Выберыце месяц',
weekPlaceholder: 'Выберыце тыдзень',
rangePlaceholder: ['Дата пачатку', 'Дата заканчэння'],
rangeYearPlaceholder: ['Год пачатку', 'Год заканчэння'],
rangeQuarterPlaceholder: ['Квартал пачатку', 'Квартал заканчэння'],
rangeMonthPlaceholder: ['Месяц пачатку', 'Месяц заканчэння'],
rangeWeekPlaceholder: ['Тыдзень пачаку', 'Тыдзень заканчэння']
}, locale_by_BY),
timePickerLocale: Object.assign({}, time_picker_locale_by_BY)
};
/* harmony default export */ var date_picker_locale_by_BY = (date_picker_locale_by_BY_locale);
;// ./components/calendar/locale/by_BY.ts
/* harmony default export */ var calendar_locale_by_BY = (date_picker_locale_by_BY);
;// ./components/locale/by_BY.ts
const typeTemplate = "${label} не з'яўляецца тыпам ${type}";
const localeValues = {
locale: 'by',
Pagination: by_BY,
DatePicker: date_picker_locale_by_BY,
TimePicker: time_picker_locale_by_BY,
Calendar: calendar_locale_by_BY,
global: {
placeholder: 'Калі ласка, выберыце'
},
Table: {
filterTitle: 'Фільтр',
filterConfirm: 'OK',
filterReset: 'Скінуць',
filterEmptyText: 'Без фільтраў',
filterCheckAll: 'Выбраць усё',
filterSearchPlaceholder: 'Пошук фільтраў',
emptyText: 'Няма даных',
selectAll: 'Выбраць усё',
selectInvert: 'Інвертаваць выбар',
selectNone: 'Ачысціць усе даныя',
selectionAll: 'Выбраць усе даныя',
sortTitle: 'Сартаванне',
expand: 'Разгарнуць радок',
collapse: 'Згарнуць радок',
triggerDesc: 'Націсніце для сартавання па ўбыванні',
triggerAsc: 'Націсніце для сартавання па ўзрастанні',
cancelSort: 'Націсніце, каб адмяніць сартаванне'
},
Modal: {
okText: 'OK',
cancelText: 'Адмена',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Адмена'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Пошук',
itemUnit: 'элем.',
itemsUnit: 'элем.',
remove: 'Выдаліць',
selectCurrent: 'Вылучыць бягучую старонку',
removeCurrent: 'Выдаліць бягучую старонку',
selectAll: 'Выбраць усе даныя',
removeAll: 'Выдаліць усе даныя',
selectInvert: 'Паказаць у адваротным парадку'
},
Upload: {
uploading: 'Запампоўка...',
removeFile: 'Выдаліць файл',
uploadError: 'Адбылася памылка пры запампоўцы',
previewFile: 'Перадпрагляд файла',
downloadFile: 'Спампаваць файл'
},
Empty: {
description: 'Няма даных'
},
Icon: {
icon: 'Іконка'
},
Text: {
edit: 'Рэдагаваць',
copy: 'Капіяваць',
copied: 'Капіяванне завершана',
expand: 'Разгарнуць'
},
Form: {
optional: '(не абавязкова)',
defaultValidateMessages: {
default: 'Памылка праверкі поля «${label}»',
required: 'Калі ласка, увядзіце «${label}»',
enum: 'Поле «${label}» павінна быць адным з [${enum}]',
whitespace: 'Поле «${label}» не можа быць пустым',
date: {
format: 'Поле «${label}» мае няправільны фармат даты',
parse: 'Поле «${label}» не можа быць пераўтворана ў дату',
invalid: "Поле «${label}» не з'яўляецца карэктнай датай"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: 'Значэнне поля «${label}» павінна мець даўжыню ${len} сімвалаў',
min: 'Значэнне поля «${label}» павінна мець не меней за ${min} сімвалаў',
max: 'Значэнне поля «${label}» павінна быць не даўжэй за ${max} сімвалаў',
range: 'Значэнне поля «${label}» павінна мець даўжыню ${min}-${max} сімвалаў'
},
number: {
len: 'Значэнне поля «${label}» павінна быць роўнае ${len}',
min: 'Значэнне поля «${label}» павінна быць больш або роўнае ${min}',
max: 'Значэнне поля «${label}» павінна быць больш або роўнае ${max}',
range: 'Значэнне поля «${label}» павінна быць паміж ${min} і ${max}'
},
array: {
len: 'Колькасць элементаў у полі «${label}» павінна быць роўная ${len}',
min: 'Колькасць элементаў у полі «${label}» павінна быць не меней за ${min}',
max: 'Колькасць элементаў у полі «${label}» павінна быць не болей за ${max}',
range: 'Колькасць элементаў у полі «${label}» павінна быць паміж ${min} і ${max}'
},
pattern: {
mismatch: 'Значэнне поля «${label}» не адпавядае шаблону ${pattern}'
}
}
},
Image: {
preview: 'Preview'
}
};
/* harmony default export */ var components_locale_by_BY = (localeValues);
/***/ }),
/***/ "./components/locale/ca_ES.ts":
/*!************************************************!*\
!*** ./components/locale/ca_ES.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ca_ES; }
});
;// ./node_modules/rc-pagination/es/locale/ca_ES.js
var locale = {
// Options
items_per_page: '/ pàgina',
jump_to: 'Anar a',
jump_to_confirm: 'Confirma',
page: '',
// Pagination
prev_page: 'Pàgina prèvia',
next_page: 'Pàgina següent',
prev_5: '5 pàgines prèvies',
next_5: '5 pàgines següents',
prev_3: '3 pàgines prèvies',
next_3: '3 pàgines següents',
page_size: 'mida de la pàgina'
};
/* harmony default export */ var ca_ES = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ca_ES.js
var ca_ES_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ca_ES',
today: 'Avui',
now: 'Ara',
backToToday: 'Tornar a avui',
ok: 'Acceptar',
clear: 'Netejar',
week: 'Setmana',
month: 'Mes',
year: 'Any',
timeSelect: 'Seleccionar hora',
dateSelect: 'Seleccionar data',
monthSelect: 'Escollir un mes',
yearSelect: 'Escollir un any',
decadeSelect: 'Escollir una dècada',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Mes anterior (PageUp)',
nextMonth: 'Mes següent (PageDown)',
previousYear: 'Any anterior (Control + left)',
nextYear: 'Mes següent (Control + right)',
previousDecade: 'Dècada anterior',
nextDecade: 'Dècada següent',
previousCentury: 'Segle anterior',
nextCentury: 'Segle següent'
});
/* harmony default export */ var locale_ca_ES = (ca_ES_locale);
;// ./components/time-picker/locale/ca_ES.ts
const locale_ca_ES_locale = {
placeholder: 'Seleccionar hora'
};
/* harmony default export */ var time_picker_locale_ca_ES = (locale_ca_ES_locale);
;// ./components/date-picker/locale/ca_ES.ts
// Merge into a locale object
const date_picker_locale_ca_ES_locale = {
lang: Object.assign({
placeholder: 'Seleccionar data',
rangePlaceholder: ['Data inicial', 'Data final']
}, locale_ca_ES),
timePickerLocale: Object.assign({}, time_picker_locale_ca_ES)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ca_ES = (date_picker_locale_ca_ES_locale);
;// ./components/calendar/locale/ca_ES.ts
/* harmony default export */ var calendar_locale_ca_ES = (date_picker_locale_ca_ES);
;// ./components/locale/ca_ES.ts
const typeTemplate = '${label} no és un ${type} vàlid';
const localeValues = {
locale: 'ca',
Pagination: ca_ES,
DatePicker: date_picker_locale_ca_ES,
TimePicker: time_picker_locale_ca_ES,
Calendar: calendar_locale_ca_ES,
global: {
placeholder: 'Seleccionar'
},
Table: {
filterTitle: 'Filtrar el menú',
filterConfirm: 'D’acord',
filterReset: 'Reiniciar',
filterEmptyText: 'Sense filtres',
selectAll: 'Seleccionar la pàgina actual',
selectInvert: 'Invertir la selecció',
selectionAll: 'Seleccionar-ho tot',
sortTitle: 'Ordenar',
expand: 'Ampliar la fila',
collapse: 'Plegar la fila',
triggerDesc: 'Ordre descendent',
triggerAsc: 'Ordre ascendent',
cancelSort: 'Desactivar l’ordre'
},
Modal: {
okText: 'D’acord',
cancelText: 'Cancel·lar',
justOkText: 'D’acord'
},
Popconfirm: {
okText: 'D’acord',
cancelText: 'Cancel·lar'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Cercar',
itemUnit: 'ítem',
itemsUnit: 'ítems',
remove: 'Eliminar',
selectCurrent: 'Seleccionar la pàgina actual',
removeCurrent: 'Eliminar la selecció',
selectAll: 'Seleccionar-ho tot',
removeAll: 'Eliminar-ho tot',
selectInvert: 'Invertir la selecció'
},
Upload: {
uploading: 'Carregant…',
removeFile: 'Eliminar el fitxer',
uploadError: 'Error de càrrega',
previewFile: 'Vista prèvia del fitxer',
downloadFile: 'Baixar el fitxer'
},
Empty: {
description: 'Sense dades'
},
Icon: {
icon: 'icona'
},
Text: {
edit: 'Editar',
copy: 'Copiar',
copied: 'Copiat',
expand: 'Ampliar'
},
Form: {
optional: '(opcional)',
defaultValidateMessages: {
default: 'Error de validació del camp ${label}',
required: 'Introdueix ${label}',
enum: '${label} ha de ser un de [${enum}]',
whitespace: '${label} no pot ser un caràcter en blanc',
date: {
format: 'El format de la data de ${label} és invàlid',
parse: '${label} no es pot convertir a cap data',
invalid: '${label} és una data invàlida'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ha de ser de ${len} caràcters',
min: '${label} ha de tenir com a mínim ${min} caràcters',
max: '${label} ha de tenir com a màxim ${max} caràcters',
range: '${label} ha d’estar entre ${min} i ${max} caràcters'
},
number: {
len: '${label} ha de ser igual a ${len}',
min: '${label} ha de tenir un valor mínim de ${min}',
max: '${label} ha de tenir un valor màxim de ${max}',
range: '${label} ha de tenir un valor entre ${min} i ${max}'
},
array: {
len: 'La llargada de ${label} ha de ser de ${len}',
min: 'La llargada de ${label} ha de ser com a mínim de ${min}',
max: 'La llargada de ${label} ha de ser com a màxim de ${max}',
range: 'La llargada de ${label} ha d’estar entre ${min} i ${max}'
},
pattern: {
mismatch: '${label} no coincideix amb el patró ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_ca_ES = (localeValues);
/***/ }),
/***/ "./components/locale/context.ts":
/*!**************************************!*\
!*** ./components/locale/context.ts ***!
\**************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
const LocaleContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);
/* harmony default export */ __webpack_exports__["default"] = (LocaleContext);
/***/ }),
/***/ "./components/locale/cs_CZ.ts":
/*!************************************************!*\
!*** ./components/locale/cs_CZ.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_cs_CZ; }
});
;// ./node_modules/rc-pagination/es/locale/cs_CZ.js
var locale = {
// Options
items_per_page: '/ strana',
jump_to: 'Přejít',
jump_to_confirm: 'potvrdit',
page: '',
// Pagination
prev_page: 'Předchozí strana',
next_page: 'Následující strana',
prev_5: 'Předchozích 5 stran',
next_5: 'Následujících 5 stran',
prev_3: 'Předchozí 3 strany',
next_3: 'Následující 3 strany',
page_size: 'velikost stránky'
};
/* harmony default export */ var cs_CZ = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/cs_CZ.js
var cs_CZ_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'cs_CZ',
today: 'Dnes',
now: 'Nyní',
backToToday: 'Zpět na dnešek',
ok: 'OK',
clear: 'Vymazat',
week: 'Týden',
month: 'Měsíc',
year: 'Rok',
timeSelect: 'Vybrat čas',
dateSelect: 'Vybrat datum',
monthSelect: 'Vyberte měsíc',
yearSelect: 'Vyberte rok',
decadeSelect: 'Vyberte dekádu',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Předchozí měsíc (PageUp)',
nextMonth: 'Následující (PageDown)',
previousYear: 'Předchozí rok (Control + left)',
nextYear: 'Následující rok (Control + right)',
previousDecade: 'Předchozí dekáda',
nextDecade: 'Následující dekáda',
previousCentury: 'Předchozí století',
nextCentury: 'Následující století'
});
/* harmony default export */ var locale_cs_CZ = (cs_CZ_locale);
;// ./components/time-picker/locale/cs_CZ.ts
const locale_cs_CZ_locale = {
placeholder: 'Vybrat čas'
};
/* harmony default export */ var time_picker_locale_cs_CZ = (locale_cs_CZ_locale);
;// ./components/date-picker/locale/cs_CZ.ts
// Merge into a locale object
const date_picker_locale_cs_CZ_locale = {
lang: Object.assign({
placeholder: 'Vybrat datum',
rangePlaceholder: ['Od', 'Do']
}, locale_cs_CZ),
timePickerLocale: Object.assign({}, time_picker_locale_cs_CZ)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_cs_CZ = (date_picker_locale_cs_CZ_locale);
;// ./components/calendar/locale/cs_CZ.ts
/* harmony default export */ var calendar_locale_cs_CZ = (date_picker_locale_cs_CZ);
;// ./components/locale/cs_CZ.ts
const typeTemplate = '${label} není platný ${type}';
const localeValues = {
locale: 'cs',
Pagination: cs_CZ,
DatePicker: date_picker_locale_cs_CZ,
TimePicker: time_picker_locale_cs_CZ,
Calendar: calendar_locale_cs_CZ,
global: {
placeholder: 'Prosím vyber'
},
Table: {
filterTitle: 'Filtr',
filterConfirm: 'Potvrdit',
filterReset: 'Obnovit',
filterEmptyText: 'Žádné filtry',
filterCheckAll: 'Vybrat všechny položky',
filterSearchPlaceholder: 'Vyhledat ve filtrech',
emptyText: 'Žádná data',
selectAll: 'Vybrat všechny řádky na současné stránce',
selectInvert: 'Invertovat výběr na současné stránce',
selectNone: 'Odznačit vše',
selectionAll: 'Vybrat všechny řádky',
sortTitle: 'Řadit',
expand: 'Rozbalit řádek',
collapse: 'Zabalit řádek',
triggerDesc: 'Klikni pro sestupné řazení',
triggerAsc: 'Klikni pro vzestupné řazení',
cancelSort: 'Klikni pro zrušení řazení'
},
Modal: {
okText: 'OK',
cancelText: 'Zrušit',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Zrušit'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Vyhledávání',
itemUnit: 'položka',
itemsUnit: 'položek',
remove: 'Odstranit',
selectCurrent: 'Vybrat aktuální stranu',
removeCurrent: 'Smazat aktuální stranu',
selectAll: 'Označit vše',
removeAll: 'Odznačit vše',
selectInvert: 'Opačný výběr'
},
Upload: {
uploading: 'Nahrávání...',
removeFile: 'Odstranit soubor',
uploadError: 'Chyba při nahrávání',
previewFile: 'Zobrazit soubor',
downloadFile: 'Stáhnout soubor'
},
Empty: {
description: 'Žádná data'
},
Icon: {
icon: 'ikona'
},
Text: {
edit: 'Upravit',
copy: 'Kopírovat',
copied: 'Zkopírované',
expand: 'Zvětšit'
},
Form: {
optional: '(nepovinné)',
defaultValidateMessages: {
default: 'Validační chyba pole pro ${label}',
required: 'Prosím vložte ${label}',
enum: '${label} musí být jeden z [${enum}]',
whitespace: '${label} nemůže být prázdný znak',
date: {
format: '${label} formát datumu je neplatný',
parse: '${label} není možné konvertovat na datum',
invalid: '${label} je neplatné datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} musí být ${len} znaků',
min: '${label} musí být alespoň ${min} znaků',
max: '${label} musí být do ${max} znaků',
range: '${label} musí být mezi ${min}-${max} znaky'
},
number: {
len: '${label} musí být stejný jako ${len}',
min: '${label} musí být minimálně ${min}',
max: '${label} musí být maximálně ${max}',
range: '${label} musí být mezi ${min}-${max}'
},
array: {
len: 'Musí být ${len} ${label}',
min: 'Alespoň ${min} ${label}',
max: 'Nejvíc ${max} ${label}',
range: 'Počet ${label} musí být mezi ${min}-${max}'
},
pattern: {
mismatch: '${label} neodpovídá vzoru ${pattern}'
}
}
},
Image: {
preview: 'Náhled'
}
};
/* harmony default export */ var components_locale_cs_CZ = (localeValues);
/***/ }),
/***/ "./components/locale/da_DK.ts":
/*!************************************************!*\
!*** ./components/locale/da_DK.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_da_DK; }
});
;// ./node_modules/rc-pagination/es/locale/da_DK.js
var locale = {
// Options
items_per_page: '/ side',
jump_to: 'Gå til',
jump_to_confirm: 'bekræft',
page: 'Side',
// Pagination
prev_page: 'Forrige Side',
next_page: 'Næste Side',
prev_5: 'Forrige 5 Sider',
next_5: 'Næste 5 Sider',
prev_3: 'Forrige 3 Sider',
next_3: 'Næste 3 Sider',
page_size: 'sidestørrelse'
};
/* harmony default export */ var da_DK = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/da_DK.js
var da_DK_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'da_DK',
today: 'I dag',
now: 'Nu',
backToToday: 'Gå til i dag',
ok: 'OK',
clear: 'Ryd',
week: 'Uge',
month: 'Måned',
year: 'År',
timeSelect: 'Vælg tidspunkt',
dateSelect: 'Vælg dato',
monthSelect: 'Vælg måned',
yearSelect: 'Vælg år',
decadeSelect: 'Vælg årti',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Forrige måned (Page Up)',
nextMonth: 'Næste måned (Page Down)',
previousYear: 'Forrige år (Ctrl-venstre pil)',
nextYear: 'Næste år (Ctrl-højre pil)',
previousDecade: 'Forrige årti',
nextDecade: 'Næste årti',
previousCentury: 'Forrige århundrede',
nextCentury: 'Næste århundrede'
});
/* harmony default export */ var locale_da_DK = (da_DK_locale);
;// ./components/time-picker/locale/da_DK.ts
const locale_da_DK_locale = {
placeholder: 'Vælg tid',
rangePlaceholder: ['Starttidspunkt', 'Sluttidspunkt']
};
/* harmony default export */ var time_picker_locale_da_DK = (locale_da_DK_locale);
;// ./components/date-picker/locale/da_DK.ts
// Merge into a locale object
const date_picker_locale_da_DK_locale = {
lang: Object.assign({
placeholder: 'Vælg dato',
rangePlaceholder: ['Startdato', 'Slutdato']
}, locale_da_DK),
timePickerLocale: Object.assign({}, time_picker_locale_da_DK)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_da_DK = (date_picker_locale_da_DK_locale);
;// ./components/calendar/locale/da_DK.ts
/* harmony default export */ var calendar_locale_da_DK = (date_picker_locale_da_DK);
;// ./components/locale/da_DK.ts
const typeTemplate = '${label} er ikke en gyldig ${type}';
const localeValues = {
locale: 'da',
DatePicker: date_picker_locale_da_DK,
TimePicker: time_picker_locale_da_DK,
Calendar: calendar_locale_da_DK,
Pagination: da_DK,
Table: {
filterTitle: 'Filtermenu',
filterConfirm: 'OK',
filterReset: 'Nulstil',
filterEmptyText: 'Ingen filtre',
emptyText: 'Ingen data',
selectAll: 'Vælg alle',
selectNone: 'Ryd alt data',
selectInvert: 'Invertér valg',
selectionAll: 'Vælg alt data',
sortTitle: 'Sortér',
expand: 'Udvid række',
collapse: 'Flet række',
triggerDesc: 'Klik for at sortere faldende',
triggerAsc: 'Klik for at sortere stigende',
cancelSort: 'Klik for at annullere sortering'
},
Modal: {
okText: 'OK',
cancelText: 'Afbryd',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Afbryd'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Søg her',
itemUnit: 'element',
itemsUnit: 'elementer'
},
Upload: {
uploading: 'Uploader...',
removeFile: 'Fjern fil',
uploadError: 'Fejl ved upload',
previewFile: 'Forhåndsvisning',
downloadFile: 'Download fil'
},
Empty: {
description: 'Ingen data'
},
Form: {
optional: '(valgfrit)',
defaultValidateMessages: {
default: 'Feltvalideringsfejl ${label}',
required: 'Indtast venligst ${label}',
enum: '${label} skal være en af [${enum}]',
whitespace: '${label} kan ikke være et tomt tegn',
date: {
format: '${label} Datoformatet er ugyldigt',
parse: '${label} kan ikke konverteres til en dato',
invalid: '${label} er en ugyldig dato'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} skal være ${len} tegn',
min: '${label} mindst ${min} tegn',
max: '${label} op til ${max} tegn',
range: '${label} skal være mellem ${min} og ${max} tegn'
},
number: {
len: '${label} skal være lig med ${len}',
min: '${label} Minimumsværdien er ${min}',
max: '${label} maksimal værdi er ${max}',
range: '${label} skal være mellem ${min}-${max}'
},
array: {
len: 'Skal være ${len} ${label}',
min: 'Mindst ${min} ${label}',
max: 'Højst ${max} ${label}',
range: 'Mængden af ${label} skal være mellem ${min}-${max}'
},
pattern: {
mismatch: '${label} stemmer ikke overens med mønsteret ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_da_DK = (localeValues);
/***/ }),
/***/ "./components/locale/de_DE.ts":
/*!************************************************!*\
!*** ./components/locale/de_DE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_de_DE; }
});
;// ./node_modules/rc-pagination/es/locale/de_DE.js
var locale = {
// Options
items_per_page: '/ Seite',
jump_to: 'Gehe zu',
jump_to_confirm: 'bestätigen',
page: 'Seite',
// Pagination
prev_page: 'Vorherige Seite',
next_page: 'Nächste Seite',
prev_5: '5 Seiten zurück',
next_5: '5 Seiten vor',
prev_3: '3 Seiten zurück',
next_3: '3 Seiten vor',
page_size: 'Page Size'
};
/* harmony default export */ var de_DE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/de_DE.js
var de_DE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'de_DE',
today: 'Heute',
now: 'Jetzt',
backToToday: 'Zurück zu Heute',
ok: 'OK',
clear: 'Zurücksetzen',
week: 'Woche',
month: 'Monat',
year: 'Jahr',
timeSelect: 'Zeit wählen',
dateSelect: 'Datum wählen',
monthSelect: 'Wähle einen Monat',
yearSelect: 'Wähle ein Jahr',
decadeSelect: 'Wähle ein Jahrzehnt',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Vorheriger Monat (PageUp)',
nextMonth: 'Nächster Monat (PageDown)',
previousYear: 'Vorheriges Jahr (Ctrl + left)',
nextYear: 'Nächstes Jahr (Ctrl + right)',
previousDecade: 'Vorheriges Jahrzehnt',
nextDecade: 'Nächstes Jahrzehnt',
previousCentury: 'Vorheriges Jahrhundert',
nextCentury: 'Nächstes Jahrhundert'
});
/* harmony default export */ var locale_de_DE = (de_DE_locale);
;// ./components/time-picker/locale/de_DE.ts
const locale_de_DE_locale = {
placeholder: 'Zeit auswählen',
rangePlaceholder: ['Startzeit', 'Endzeit']
};
/* harmony default export */ var time_picker_locale_de_DE = (locale_de_DE_locale);
;// ./components/date-picker/locale/de_DE.ts
// Merge into a locale object
const date_picker_locale_de_DE_locale = {
lang: Object.assign({
placeholder: 'Datum auswählen',
rangePlaceholder: ['Startdatum', 'Enddatum'],
shortWeekDays: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
shortMonths: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez']
}, locale_de_DE),
timePickerLocale: Object.assign({}, time_picker_locale_de_DE)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_de_DE = (date_picker_locale_de_DE_locale);
;// ./components/calendar/locale/de_DE.ts
/* harmony default export */ var calendar_locale_de_DE = (date_picker_locale_de_DE);
;// ./components/locale/de_DE.ts
const typeTemplate = '${label} ist nicht gültig. ${type} erwartet';
const localeValues = {
locale: 'de',
Pagination: de_DE,
DatePicker: date_picker_locale_de_DE,
TimePicker: time_picker_locale_de_DE,
Calendar: calendar_locale_de_DE,
global: {
placeholder: 'Bitte auswählen'
},
Table: {
filterTitle: 'Filter-Menü',
filterConfirm: 'OK',
filterReset: 'Zurücksetzen',
filterEmptyText: 'Keine Filter',
filterSearchPlaceholder: 'Suche in Filtern',
filterCheckAll: 'Alle auswählen',
selectAll: 'Selektiere Alle',
selectInvert: 'Selektion Invertieren',
selectionAll: 'Wählen Sie alle Daten aus',
sortTitle: 'Sortieren',
emptyText: 'Keine Daten',
expand: 'Zeile erweitern',
collapse: 'Zeile reduzieren',
triggerDesc: 'Klicken zur absteigenden Sortierung',
triggerAsc: 'Klicken zur aufsteigenden Sortierung',
cancelSort: 'Klicken zum Abbrechen der Sortierung'
},
Tour: {
Next: 'Weiter',
Previous: 'Zurück',
Finish: 'Fertig'
},
Modal: {
okText: 'OK',
cancelText: 'Abbrechen',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Abbrechen'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Suchen',
itemUnit: 'Eintrag',
itemsUnit: 'Einträge',
remove: 'Entfernen',
selectCurrent: 'Alle auf aktueller Seite auswählen',
removeCurrent: 'Auswahl auf aktueller Seite aufheben',
selectAll: 'Alle auswählen',
deselectAll: 'Alle abwählen',
removeAll: 'Auswahl aufheben',
selectInvert: 'Auswahl umkehren'
},
Upload: {
uploading: 'Hochladen...',
removeFile: 'Datei entfernen',
uploadError: 'Fehler beim Hochladen',
previewFile: 'Dateivorschau',
downloadFile: 'Download-Datei'
},
Empty: {
description: 'Keine Daten'
},
Text: {
edit: 'Bearbeiten',
copy: 'Kopieren',
copied: 'Kopiert',
expand: 'Erweitern'
},
Form: {
defaultValidateMessages: {
default: 'Feld-Validierungsfehler: ${label}',
required: 'Bitte geben Sie ${label} an',
enum: '${label} muss eines der folgenden sein [${enum}]',
whitespace: '${label} darf kein Leerzeichen sein',
date: {
format: '${label} ist ein ungültiges Datumsformat',
parse: '${label} kann nicht in ein Datum umgewandelt werden',
invalid: '${label} ist ein ungültiges Datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} muss genau ${len} Zeichen lang sein',
min: '${label} muss mindestens ${min} Zeichen lang sein',
max: '${label} darf höchstens ${max} Zeichen lang sein',
range: '${label} muss zwischen ${min} und ${max} Zeichen lang sein'
},
number: {
len: '${label} muss gleich ${len} sein',
min: '${label} muss mindestens ${min} sein',
max: '${label} darf maximal ${max} sein',
range: '${label} muss zwischen ${min} und ${max} liegen'
},
array: {
len: 'Es müssen ${len} ${label} sein',
min: 'Es müssen mindestens ${min} ${label} sein',
max: 'Es dürfen maximal ${max} ${label} sein',
range: 'Die Anzahl an ${label} muss zwischen ${min} und ${max} liegen'
},
pattern: {
mismatch: '${label} entspricht nicht dem ${pattern} Muster'
}
}
},
Image: {
preview: 'Vorschau'
},
QRCode: {
expired: 'QR-Code abgelaufen',
refresh: 'Aktualisieren'
}
};
/* harmony default export */ var components_locale_de_DE = (localeValues);
/***/ }),
/***/ "./components/locale/el_GR.ts":
/*!************************************************!*\
!*** ./components/locale/el_GR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_el_GR; }
});
;// ./node_modules/rc-pagination/es/locale/el_GR.js
var locale = {
// Options
items_per_page: '/ σελίδα',
jump_to: 'Μετάβαση',
jump_to_confirm: 'επιβεβαιώνω',
page: '',
// Pagination
prev_page: 'Προηγούμενη Σελίδα',
next_page: 'Επόμενη Σελίδα',
prev_5: 'Προηγούμενες 5 Σελίδες',
next_5: 'Επόμενες 5 σελίδες',
prev_3: 'Προηγούμενες 3 Σελίδες',
next_3: 'Επόμενες 3 Σελίδες',
page_size: 'Μέγεθος σελίδας'
};
/* harmony default export */ var el_GR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/el_GR.js
var el_GR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'el_GR',
today: 'Σήμερα',
now: 'Τώρα',
backToToday: 'Πίσω στη σημερινή μέρα',
ok: 'OK',
clear: 'Καθαρισμός',
week: 'Εβδομάδα',
month: 'Μήνας',
year: 'Έτος',
timeSelect: 'Επιλογή ώρας',
dateSelect: 'Επιλογή ημερομηνίας',
monthSelect: 'Επιλογή μήνα',
yearSelect: 'Επιλογή έτους',
decadeSelect: 'Επιλογή δεκαετίας',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Προηγούμενος μήνας (PageUp)',
nextMonth: 'Επόμενος μήνας (PageDown)',
previousYear: 'Προηγούμενο έτος (Control + αριστερά)',
nextYear: 'Επόμενο έτος (Control + δεξιά)',
previousDecade: 'Προηγούμενη δεκαετία',
nextDecade: 'Επόμενη δεκαετία',
previousCentury: 'Προηγούμενος αιώνας',
nextCentury: 'Επόμενος αιώνας'
});
/* harmony default export */ var locale_el_GR = (el_GR_locale);
;// ./components/time-picker/locale/el_GR.ts
const locale_el_GR_locale = {
placeholder: 'Επιλέξτε ώρα'
};
/* harmony default export */ var time_picker_locale_el_GR = (locale_el_GR_locale);
;// ./components/date-picker/locale/el_GR.ts
// Merge into a locale object
const date_picker_locale_el_GR_locale = {
lang: Object.assign({
placeholder: 'Επιλέξτε ημερομηνία',
yearPlaceholder: 'Επιλέξτε έτος',
quarterPlaceholder: 'Επιλέξτε τρίμηνο',
monthPlaceholder: 'Επιλέξτε μήνα',
weekPlaceholder: 'Επιλέξτε εβδομάδα',
rangePlaceholder: ['Αρχική ημερομηνία', 'Τελική ημερομηνία'],
rangeYearPlaceholder: ['Αρχικό έτος', 'Τελικό έτος'],
rangeMonthPlaceholder: ['Αρχικός μήνας', 'Τελικός μήνας'],
rangeQuarterPlaceholder: ['Αρχικό τρίμηνο', 'Τελικό τρίμηνο'],
rangeWeekPlaceholder: ['Αρχική εβδομάδα', 'Τελική εβδομάδα']
}, locale_el_GR),
timePickerLocale: Object.assign({}, time_picker_locale_el_GR)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_el_GR = (date_picker_locale_el_GR_locale);
;// ./components/calendar/locale/el_GR.ts
/* harmony default export */ var calendar_locale_el_GR = (date_picker_locale_el_GR);
;// ./components/locale/el_GR.ts
const typeTemplate = 'Το ${label} δεν είναι έγκυρο ${type}';
const localeValues = {
locale: 'el',
Pagination: el_GR,
DatePicker: date_picker_locale_el_GR,
TimePicker: time_picker_locale_el_GR,
Calendar: calendar_locale_el_GR,
global: {
placeholder: 'Παρακαλώ επιλέξτε'
},
Table: {
filterTitle: 'Μενού φίλτρων',
filterConfirm: 'ΟΚ',
filterReset: 'Επαναφορά',
filterEmptyText: 'Χωρίς φίλτρα',
filterCheckAll: 'Επιλογή όλων',
filterSearchPlaceholder: 'Αναζήτηση στα φίλτρα',
emptyText: 'Δεν υπάρχουν δεδομένα',
selectAll: 'Επιλογή τρέχουσας σελίδας',
selectInvert: 'Αντιστροφή τρέχουσας σελίδας',
selectNone: 'Εκκαθάριση όλων των δεδομένων',
selectionAll: 'Επιλογή όλων των δεδομένων',
sortTitle: 'Ταξινόμηση',
expand: 'Ανάπτυξη σειράς',
collapse: 'Σύμπτυξη σειράς',
triggerDesc: 'Κλικ για φθίνουσα ταξινόμηση',
triggerAsc: 'Κλικ για αύξουσα ταξινόμηση',
cancelSort: 'Κλικ για ακύρωση ταξινόμησης'
},
Modal: {
okText: 'ΟΚ',
cancelText: 'Άκυρο',
justOkText: 'Εντάξει'
},
Tour: {
Next: 'Επόμενο',
Previous: 'Προηγούμενο',
Finish: 'Τέλος'
},
Popconfirm: {
okText: 'ΟΚ',
cancelText: 'Άκυρο'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Αναζήτηση',
itemUnit: 'αντικείμενο',
itemsUnit: 'αντικείμενα',
remove: 'Αφαίρεση',
selectCurrent: 'Επιλογή τρέχουσας σελίδας',
removeCurrent: 'Αφαίρεση τρέχουσας σελίδας',
selectAll: 'Επιλογή όλων των δεδομένων',
removeAll: 'Αφαίρεση όλων των δεδομένων',
selectInvert: 'Αντιστροφή τρέχουσας σελίδας'
},
Upload: {
uploading: 'Μεταφόρτωση...',
removeFile: 'Αφαίρεση αρχείου',
uploadError: 'Σφάλμα μεταφόρτωσης',
previewFile: 'Προεπισκόπηση αρχείου',
downloadFile: 'Λήψη αρχείου'
},
Empty: {
description: 'Δεν υπάρχουν δεδομένα'
},
Icon: {
icon: 'εικονίδιο'
},
Text: {
edit: 'Επεξεργασία',
copy: 'Αντιγραφή',
copied: 'Αντιγράφηκε',
expand: 'Ανάπτυξη',
collapse: 'Σύμπτυξη'
},
Form: {
optional: '(προαιρετικό)',
defaultValidateMessages: {
default: 'Σφάλμα επικύρωσης πεδίου για ${label}',
required: 'Παρακαλώ εισάγετε ${label}',
enum: 'Το ${label} πρέπει να είναι ένα από [${enum}]',
whitespace: 'Το ${label} δεν μπορεί να είναι κενός χαρακτήρας',
date: {
format: 'Η μορφή ημερομηνίας του ${label} είναι άκυρη',
parse: 'Το ${label} δεν μπορεί να μετατραπεί σε ημερομηνία',
invalid: 'Το ${label} είναι μια άκυρη ημερομηνία'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: 'Το ${label} πρέπει να είναι ${len} χαρακτήρες',
min: 'Το ${label} πρέπει να είναι τουλάχιστον ${min} χαρακτήρες',
max: 'Το ${label} πρέπει να είναι το πολύ ${max} χαρακτήρες',
range: 'Το ${label} πρέπει να είναι μεταξύ ${min}-${max} χαρακτήρων'
},
number: {
len: 'Το ${label} πρέπει να είναι ίσο με ${len}',
min: 'Το ${label} πρέπει να είναι τουλάχιστον ${min}',
max: 'Το ${label} πρέπει να είναι το πολύ ${max}',
range: 'Το ${label} πρέπει να είναι μεταξύ ${min}-${max}'
},
array: {
len: 'Πρέπει να είναι ${len} ${label}',
min: 'Τουλάχιστον ${min} ${label}',
max: 'Το πολύ ${max} ${label}',
range: 'Το ποσό του ${label} πρέπει να είναι μεταξύ ${min}-${max}'
},
pattern: {
mismatch: 'Το ${label} δεν ταιριάζει με το μοτίβο ${pattern}'
}
}
},
Image: {
preview: 'Προεπισκόπηση'
},
QRCode: {
expired: 'Ο κωδικός QR έληξε',
refresh: 'Ανανέωση',
scanned: 'Σαρώθηκε'
},
ColorPicker: {
presetEmpty: 'Κενό',
transparent: 'Διαφανές',
singleColor: 'Μονόχρωμο',
gradientColor: 'Διαβάθμιση χρώματος'
}
};
/* harmony default export */ var components_locale_el_GR = (localeValues);
/***/ }),
/***/ "./components/locale/en_GB.ts":
/*!************************************************!*\
!*** ./components/locale/en_GB.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_en_GB; }
});
;// ./node_modules/rc-pagination/es/locale/en_GB.js
var locale = {
// Options
items_per_page: '/ page',
jump_to: 'Go to',
jump_to_confirm: 'confirm',
page: 'Page',
// Pagination
prev_page: 'Previous Page',
next_page: 'Next Page',
prev_5: 'Previous 5 Pages',
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages',
page_size: 'Page Size'
};
/* harmony default export */ var en_GB = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/en_GB.js
var en_GB_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'en_GB',
today: 'Today',
now: 'Now',
backToToday: 'Back to today',
ok: 'OK',
clear: 'Clear',
week: 'Week',
month: 'Month',
year: 'Year',
timeSelect: 'Select time',
dateSelect: 'Select date',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
nextYear: 'Next year (Control + right)',
previousDecade: 'Last decade',
nextDecade: 'Next decade',
previousCentury: 'Last century',
nextCentury: 'Next century'
});
/* harmony default export */ var locale_en_GB = (en_GB_locale);
;// ./components/time-picker/locale/en_GB.ts
const locale_en_GB_locale = {
placeholder: 'Select time'
};
/* harmony default export */ var time_picker_locale_en_GB = (locale_en_GB_locale);
;// ./components/date-picker/locale/en_GB.ts
// Merge into a locale object
const date_picker_locale_en_GB_locale = {
lang: Object.assign({
placeholder: 'Select date',
yearPlaceholder: 'Select year',
quarterPlaceholder: 'Select quarter',
monthPlaceholder: 'Select month',
weekPlaceholder: 'Select week',
rangePlaceholder: ['Start date', 'End date'],
rangeYearPlaceholder: ['Start year', 'End year'],
rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],
rangeMonthPlaceholder: ['Start month', 'End month'],
rangeWeekPlaceholder: ['Start week', 'End week']
}, locale_en_GB),
timePickerLocale: Object.assign({}, time_picker_locale_en_GB)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_en_GB = (date_picker_locale_en_GB_locale);
;// ./components/calendar/locale/en_GB.ts
/* harmony default export */ var calendar_locale_en_GB = (date_picker_locale_en_GB);
;// ./components/locale/en_GB.ts
const typeTemplate = '${label} is not a valid ${type}';
const localeValues = {
locale: 'en-gb',
Pagination: en_GB,
DatePicker: date_picker_locale_en_GB,
TimePicker: time_picker_locale_en_GB,
Calendar: calendar_locale_en_GB,
global: {
placeholder: 'Please select'
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'No filters',
filterCheckAll: 'Select all items',
filterSearchPlaceholder: 'Search in filters',
emptyText: 'No data',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
selectNone: 'Clear all data',
selectionAll: 'Select all data',
sortTitle: 'Sort',
expand: 'Expand row',
collapse: 'Collapse row',
triggerDesc: 'Click to sort descending',
triggerAsc: 'Click to sort ascending',
cancelSort: 'Click to cancel sorting'
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remove',
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page'
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
downloadFile: 'Download file'
},
Empty: {
description: 'No Data'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Edit',
copy: 'Copy',
copied: 'Copied',
expand: 'Expand'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
enum: '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} must be ${len} characters',
min: '${label} must be at least ${min} characters',
max: '${label} must be up to ${max} characters',
range: '${label} must be between ${min}-${max} characters'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} must be minimum ${min}',
max: '${label} must be maximum ${max}',
range: '${label} must be between ${min}-${max}'
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}'
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}'
}
}
},
Image: {
preview: 'Preview'
}
};
/* harmony default export */ var components_locale_en_GB = (localeValues);
/***/ }),
/***/ "./components/locale/en_US.ts":
/*!************************************!*\
!*** ./components/locale/en_US.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/en_US */ "./node_modules/rc-pagination/es/locale/en_US.js");
/* harmony import */ var _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/en_US */ "./components/calendar/locale/en_US.ts");
/* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.ts");
/* harmony import */ var _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/en_US */ "./components/time-picker/locale/en_US.ts");
const typeTemplate = '${label} is not a valid ${type}';
const localeValues = {
locale: 'en',
Pagination: rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__["default"],
DatePicker: _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_1__["default"],
TimePicker: _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__["default"],
Calendar: _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_3__["default"],
global: {
placeholder: 'Please select'
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'No filters',
filterCheckAll: 'Select all items',
filterSearchPlaceholder: 'Search in filters',
emptyText: 'No data',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
selectNone: 'Clear all data',
selectionAll: 'Select all data',
sortTitle: 'Sort',
expand: 'Expand row',
collapse: 'Collapse row',
triggerDesc: 'Click to sort descending',
triggerAsc: 'Click to sort ascending',
cancelSort: 'Click to cancel sorting'
},
Tour: {
Next: 'Next',
Previous: 'Previous',
Finish: 'Finish'
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remove',
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
deselectAll: 'Deselect all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page'
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
downloadFile: 'Download file'
},
Empty: {
description: 'No data'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Edit',
copy: 'Copy',
copied: 'Copied',
expand: 'Expand',
collapse: 'Collapse'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
enum: '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} must be ${len} characters',
min: '${label} must be at least ${min} characters',
max: '${label} must be up to ${max} characters',
range: '${label} must be between ${min}-${max} characters'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} must be minimum ${min}',
max: '${label} must be maximum ${max}',
range: '${label} must be between ${min}-${max}'
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}'
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}'
}
}
},
Image: {
preview: 'Preview'
},
QRCode: {
expired: 'QR code expired',
refresh: 'Refresh',
scanned: 'Scanned'
},
ColorPicker: {
presetEmpty: 'Empty',
transparent: 'Transparent',
singleColor: 'Single',
gradientColor: 'Gradient'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/locale/es_ES.ts":
/*!************************************************!*\
!*** ./components/locale/es_ES.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_es_ES; }
});
;// ./node_modules/rc-pagination/es/locale/es_ES.js
var locale = {
// Options
items_per_page: '/ página',
jump_to: 'Ir a',
jump_to_confirm: 'confirmar',
page: 'Página',
// Pagination
prev_page: 'Página anterior',
next_page: 'Página siguiente',
prev_5: '5 páginas previas',
next_5: '5 páginas siguientes',
prev_3: '3 páginas previas',
next_3: '3 páginas siguientes',
page_size: 'tamaño de página'
};
/* harmony default export */ var es_ES = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/es_ES.js
var es_ES_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'es_ES',
today: 'Hoy',
now: 'Ahora',
backToToday: 'Volver a hoy',
ok: 'Aceptar',
clear: 'Limpiar',
week: 'Semana',
month: 'Mes',
year: 'Año',
timeSelect: 'Seleccionar hora',
dateSelect: 'Seleccionar fecha',
monthSelect: 'Elegir un mes',
yearSelect: 'Elegir un año',
decadeSelect: 'Elegir una década',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Mes anterior (PageUp)',
nextMonth: 'Mes siguiente (PageDown)',
previousYear: 'Año anterior (Control + left)',
nextYear: 'Año siguiente (Control + right)',
previousDecade: 'Década anterior',
nextDecade: 'Década siguiente',
previousCentury: 'Siglo anterior',
nextCentury: 'Siglo siguiente'
});
/* harmony default export */ var locale_es_ES = (es_ES_locale);
;// ./components/time-picker/locale/es_ES.ts
const locale_es_ES_locale = {
placeholder: 'Seleccionar hora'
};
/* harmony default export */ var time_picker_locale_es_ES = (locale_es_ES_locale);
;// ./components/date-picker/locale/es_ES.ts
// Merge into a locale object
const date_picker_locale_es_ES_locale = {
lang: Object.assign({
placeholder: 'Seleccionar fecha',
rangePlaceholder: ['Fecha inicial', 'Fecha final'],
shortWeekDays: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'],
shortMonths: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic']
}, locale_es_ES),
timePickerLocale: Object.assign({}, time_picker_locale_es_ES)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_es_ES = (date_picker_locale_es_ES_locale);
;// ./components/calendar/locale/es_ES.ts
/* harmony default export */ var calendar_locale_es_ES = (date_picker_locale_es_ES);
;// ./components/locale/es_ES.ts
const typeTemplate = '${label} no es un ${type} válido';
const localeValues = {
locale: 'es',
Pagination: es_ES,
DatePicker: date_picker_locale_es_ES,
TimePicker: time_picker_locale_es_ES,
Calendar: calendar_locale_es_ES,
global: {
placeholder: 'Seleccione'
},
Table: {
filterTitle: 'Filtrar menú',
filterConfirm: 'Aceptar',
filterReset: 'Reiniciar',
filterEmptyText: 'Sin filtros',
filterCheckAll: 'Seleccionar todo',
filterSearchPlaceholder: 'Buscar en filtros',
emptyText: 'Sin datos',
selectAll: 'Seleccionar todo',
selectInvert: 'Invertir selección',
selectNone: 'Vacíe todo',
selectionAll: 'Seleccionar todos los datos',
sortTitle: 'Ordenar',
expand: 'Expandir fila',
collapse: 'Colapsar fila',
triggerDesc: 'Click para ordenar en orden descendente',
triggerAsc: 'Click para ordenar en orden ascendente',
cancelSort: 'Click para cancelar ordenamiento'
},
Tour: {
Next: 'Siguiente',
Previous: 'Anterior',
Finish: 'Finalizar'
},
Modal: {
okText: 'Aceptar',
cancelText: 'Cancelar',
justOkText: 'Aceptar'
},
Popconfirm: {
okText: 'Aceptar',
cancelText: 'Cancelar'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Buscar aquí',
itemUnit: 'elemento',
itemsUnit: 'elementos',
remove: 'Eliminar',
selectCurrent: 'Seleccionar página actual',
removeCurrent: 'Eliminar página actual',
selectAll: 'Seleccionar todos los datos',
removeAll: 'Eliminar todos los datos',
selectInvert: 'Invertir página actual'
},
Upload: {
uploading: 'Subiendo...',
removeFile: 'Eliminar archivo',
uploadError: 'Error al subir el archivo',
previewFile: 'Vista previa',
downloadFile: 'Descargar archivo'
},
Empty: {
description: 'No hay datos'
},
Icon: {
icon: 'ícono'
},
Text: {
edit: 'Editar',
copy: 'Copiar',
copied: 'Copiado',
expand: 'Expandir'
},
Form: {
optional: '(opcional)',
defaultValidateMessages: {
default: 'Error de validación del campo ${label}',
required: 'Por favor, rellena ${label}',
enum: '${label} debe ser uno de [${enum}]',
whitespace: '${label} no puede ser un carácter en blanco',
date: {
format: 'El formato de fecha de ${label} es inválido',
parse: '${label} no se puede convertir a una fecha',
invalid: '${label} es una fecha inválida'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} debe tener ${len} caracteres',
min: '${label} debe tener al menos ${min} caracteres',
max: '${label} debe tener hasta ${max} caracteres',
range: '${label} debe tener entre ${min}-${max} caracteres'
},
number: {
len: '${label} debe ser igual a ${len}',
min: '${label} valor mínimo es ${min}',
max: '${label} valor máximo es ${max}',
range: '${label} debe ser entre ${min}-${max}'
},
array: {
len: 'Debe ser ${len} ${label}',
min: 'Al menos ${min} ${label}',
max: 'Como máximo ${max} ${label}',
range: 'El valor de ${label} debe estar entre ${min}-${max}'
},
pattern: {
mismatch: '${label} no coincide con el patrón ${pattern}'
}
}
},
Image: {
preview: 'Previsualización'
}
};
/* harmony default export */ var components_locale_es_ES = (localeValues);
/***/ }),
/***/ "./components/locale/et_EE.ts":
/*!************************************************!*\
!*** ./components/locale/et_EE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_et_EE; }
});
;// ./node_modules/rc-pagination/es/locale/et_EE.js
var locale = {
// Options
items_per_page: '/ leheküljel',
jump_to: 'Hüppa',
jump_to_confirm: 'Kinnitage',
page: '',
// Pagination
prev_page: 'Eelmine leht',
next_page: 'Järgmine leht',
prev_5: 'Eelmised 5 lehekülge',
next_5: 'Järgmised 5 lehekülge',
prev_3: 'Eelmised 3 lehekülge',
next_3: 'Järgmised 3 lehekülge',
page_size: 'lehe suurus'
};
/* harmony default export */ var et_EE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/et_EE.js
var et_EE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'et_EE',
today: 'Täna',
now: 'Praegu',
backToToday: 'Tagasi tänase juurde',
ok: 'OK',
clear: 'Tühista',
week: 'Nädal',
month: 'Kuu',
year: 'Aasta',
timeSelect: 'Vali aeg',
dateSelect: 'Vali kuupäev',
monthSelect: 'Vali kuu',
yearSelect: 'Vali aasta',
decadeSelect: 'Vali dekaad',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Eelmine kuu (PageUp)',
nextMonth: 'Järgmine kuu (PageDown)',
previousYear: 'Eelmine aasta (Control + left)',
nextYear: 'Järgmine aasta (Control + right)',
previousDecade: 'Eelmine dekaad',
nextDecade: 'Järgmine dekaad',
previousCentury: 'Eelmine sajand',
nextCentury: 'Järgmine sajand'
});
/* harmony default export */ var locale_et_EE = (et_EE_locale);
;// ./components/time-picker/locale/et_EE.ts
const locale_et_EE_locale = {
placeholder: 'Vali aeg'
};
/* harmony default export */ var time_picker_locale_et_EE = (locale_et_EE_locale);
;// ./components/date-picker/locale/et_EE.ts
// 统一合并为完整的 Locale
const date_picker_locale_et_EE_locale = {
lang: Object.assign({
placeholder: 'Vali kuupäev',
rangePlaceholder: ['Algus kuupäev', 'Lõpu kuupäev']
}, locale_et_EE),
timePickerLocale: Object.assign({}, time_picker_locale_et_EE)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_et_EE = (date_picker_locale_et_EE_locale);
;// ./components/calendar/locale/et_EE.ts
/* harmony default export */ var calendar_locale_et_EE = (date_picker_locale_et_EE);
;// ./components/locale/et_EE.ts
const typeTemplate = '${label} ei ole kehtiv ${type}';
const localeValues = {
locale: 'et',
Pagination: et_EE,
DatePicker: date_picker_locale_et_EE,
TimePicker: time_picker_locale_et_EE,
Calendar: calendar_locale_et_EE,
global: {
placeholder: 'Palun vali'
},
Table: {
filterTitle: 'Filtri menüü',
filterConfirm: 'OK',
filterReset: 'Nulli',
filterEmptyText: 'Filtreid pole',
filterCheckAll: 'Vali kõik',
filterSearchPlaceholder: 'Otsi filtritest',
emptyText: 'Andmed puuduvad',
selectAll: 'Vali kõik',
selectInvert: 'Inverteeri valik',
selectNone: 'Kustuta kõik andmed',
selectionAll: 'Vali kõik andmed',
sortTitle: 'Sorteeri',
expand: 'Laienda rida',
collapse: 'Ahenda rida',
triggerDesc: 'Klõpsa kahanevalt sortimiseks',
triggerAsc: 'Klõpsa kasvavalt sortimiseks',
cancelSort: 'Klõpsa sortimise tühistamiseks'
},
Modal: {
okText: 'OK',
cancelText: 'Tühista',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Tühista'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Otsi siit',
itemUnit: 'kogus',
itemsUnit: 'kogused',
remove: 'Eemalda',
selectCurrent: 'Vali praegune leht',
removeCurrent: 'Eemalda praegune leht',
selectAll: 'Vali kõik',
removeAll: 'Eemalda kõik andmed',
selectInvert: 'Inverteeri valik'
},
Upload: {
uploading: 'Üleslaadimine...',
removeFile: 'Eemalda fail',
uploadError: 'Üleslaadimise tõrge',
previewFile: 'Faili eelvaade',
downloadFile: 'Lae fail alla'
},
Empty: {
description: 'Andmed puuduvad'
},
Icon: {
icon: 'ikoon'
},
Text: {
edit: 'Muuda',
copy: 'Kopeeri',
copied: 'Kopeeritud',
expand: 'Laienda'
},
Form: {
optional: '(valikuline)',
defaultValidateMessages: {
default: '${label} välja valideerimise viga',
required: 'Palun sisesta ${label}',
enum: '${label} peab olema üks järgmistest: [${enum}]',
whitespace: '${label} ei saa olla tühi märk',
date: {
format: '${label} kuupäevavorming on kehtetu',
parse: '${label} ei saa kuupäevaks teisendada',
invalid: '${label} on vale kuupäev'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} peab koosnema ${len} tähemärgist',
min: '${label} peab olema vähemalt ${min} tähemärki',
max: '${label} peab olema kuni ${max} tähemärki',
range: '${label} peab olema vahemikus ${min}–${max} tähemärki'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} peab olema vähemalt ${min}',
max: '${label} peab olema maksimaalne ${max}',
range: '${label} peab olema vahemikus ${min}–${max}'
},
array: {
len: 'Peab olema ${len} ${label}',
min: 'Vähemalt ${min} ${label}',
max: 'Maksimaalselt ${max} ${label}',
range: '${label} summa peab olema vahemikus ${min}–${max}'
},
pattern: {
mismatch: '${label} ei vasta mustrile ${pattern}'
}
}
},
Image: {
preview: 'Eelvaade'
}
};
/* harmony default export */ var components_locale_et_EE = (localeValues);
/***/ }),
/***/ "./components/locale/eu_ES.ts":
/*!************************************************!*\
!*** ./components/locale/eu_ES.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_eu_ES; }
});
;// ./node_modules/rc-pagination/es/locale/eu_ES.js
var locale = {
// Options
items_per_page: '/ orrialde',
jump_to: '-ra joan',
jump_to_confirm: 'baieztatu',
page: 'Orrialde',
// Pagination
prev_page: 'Aurreko orrialdea',
next_page: 'Hurrengo orrialdea',
prev_5: 'aurreko 5 orrialde',
next_5: 'hurrengo 5 orrialde',
prev_3: 'aurreko 3 orrialde',
next_3: 'hurrengo 3 orrialde',
page_size: 'orrien tamaina'
};
/* harmony default export */ var eu_ES = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/eu_ES.js
var eu_ES_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'eu_ES',
today: 'Gaur',
now: 'Orain',
backToToday: 'Gaur itzuli',
ok: 'OK',
clear: 'Garbitu',
week: 'Asteko',
month: 'Hilabete',
year: 'Urte',
timeSelect: 'Ordua aukeratu',
dateSelect: 'Eguna aukeratu',
weekSelect: 'Astea aukeratu',
monthSelect: 'Hilabetea aukeratu',
yearSelect: 'Urtea aukeratu',
decadeSelect: 'Hamarkada aukeratu',
dateFormat: 'YYYY/M/D',
dateTimeFormat: 'YYYY/M/D HH:mm:ss',
monthBeforeYear: false,
previousMonth: 'Aurreko hilabetea (RePag)',
nextMonth: 'Urrengo hilabetea (AvPag)',
previousYear: 'Aurreko urtea (Control + ezkerra)',
nextYear: 'Urrento urtea (Control + eskuina)',
previousDecade: 'Aurreko hamarkada',
nextDecade: 'Urrengo hamarkada',
previousCentury: 'Aurreko mendea',
nextCentury: 'Urrengo mendea'
});
/* harmony default export */ var locale_eu_ES = (eu_ES_locale);
;// ./components/time-picker/locale/eu_ES.ts
const locale_eu_ES_locale = {
placeholder: 'Aukeratu ordua'
};
/* harmony default export */ var time_picker_locale_eu_ES = (locale_eu_ES_locale);
;// ./components/date-picker/locale/eu_ES.ts
// Merge into a locale object
const date_picker_locale_eu_ES_locale = {
lang: Object.assign({
placeholder: 'Hautatu data',
rangePlaceholder: ['Hasierako data', 'Amaiera data']
}, locale_eu_ES),
timePickerLocale: Object.assign({}, time_picker_locale_eu_ES)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_eu_ES = (date_picker_locale_eu_ES_locale);
;// ./components/calendar/locale/eu_ES.ts
/* harmony default export */ var calendar_locale_eu_ES = (date_picker_locale_eu_ES);
;// ./components/locale/eu_ES.ts
const typeTemplate = '${label} ez da ${type} balioduna';
const localeValues = {
locale: 'eu',
Pagination: eu_ES,
DatePicker: date_picker_locale_eu_ES,
TimePicker: time_picker_locale_eu_ES,
Calendar: calendar_locale_eu_ES,
global: {
placeholder: 'Aukeratu'
},
Table: {
filterTitle: 'Iragazi menua',
filterConfirm: 'Onartu',
filterReset: 'Garbitu',
filterEmptyText: 'Iragazkirik gabe',
filterCheckAll: 'Hautatu dena',
filterSearchPlaceholder: 'Bilatu iragazkietan',
emptyText: 'Daturik gabe',
selectAll: 'Hautatu dena',
selectInvert: 'Alderantzikatu hautaketa',
selectNone: 'Hustu dena',
selectionAll: 'Hautatu datu guztiak',
sortTitle: 'Ordenatu',
expand: 'Zabaldu',
collapse: 'Itxi',
triggerDesc: 'Egin klik beheranzko ordenean ordenatzeko',
triggerAsc: 'Egin klik goranzko ordenean ordenatzeko',
cancelSort: 'Egin klik ordenamendua ezeztatzeko'
},
Tour: {
Next: 'Hurrengoa',
Previous: 'Aurrekoa',
Finish: 'Bukatu'
},
Modal: {
okText: 'Onartu',
cancelText: 'Utzi',
justOkText: 'Onartu'
},
Popconfirm: {
okText: 'Onartu',
cancelText: 'Utzi'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Bilatu hemen',
itemUnit: 'elementu',
itemsUnit: 'elementuak',
remove: 'Ezabatu',
selectCurrent: 'Hautatu uneko orria',
removeCurrent: 'Uneko orria ezabatu',
selectAll: 'Datu guztiak hautatu',
removeAll: 'Ezabatu datu guztiak',
selectInvert: 'Uneko orrialdea alderantzikatu'
},
Upload: {
uploading: 'Igotzen...',
removeFile: 'Fitxategia ezabatu',
uploadError: 'Errorea fitxategia igotzerakoan',
previewFile: 'Aurrebista',
downloadFile: 'Fitxategia deskargatu'
},
Empty: {
description: 'Ez dago daturik'
},
Icon: {
icon: 'ikono'
},
Text: {
edit: 'Editatu',
copy: 'Kopiatu',
copied: 'Kopiatuta',
expand: 'Zabaldu'
},
Form: {
optional: '(aukerakoa)',
defaultValidateMessages: {
default: '${label} eremuaren balidazio errorea',
required: 'Mesedez, sartu ${label}',
enum: '${label} [${enum}] -tako bat izan behar da',
whitespace: '${label} ezin da izan karaktere zuri bat',
date: {
format: '${label} dataren formatua baliogabea da',
parse: '${label} ezin da data batera doitu',
invalid: '${label} data baliogabea da'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} eremuak ${len} karaktere izan dehar ditu',
min: '${label} eremuak gutxienez ${min} karaktere izan behar ditu',
max: '${label} eremuak gehienez ${max} karaktere izan behar ditu',
range: '${label} eremuak ${min}-${max} karaktere artean izan behar ditu'
},
number: {
len: '${label} eremuaren balioa ${len} izan behar da',
min: '${label} eremuaren balio minimoa ${min} da',
max: '${label} eremuaren balio maximoa ${max} da',
range: '${label} eremuaren balioa ${min}-${max} artekoa izan behar da'
},
array: {
len: '${len} ${label} izan behar dira',
min: 'Gutxienez ${min} ${label}',
max: 'Gehienez ${max} ${label}',
range: '${label} kopuruak ${min}-${max} -ra bitartekoa izan behar du'
},
pattern: {
mismatch: '${label} ez dator bat ${pattern} patroiarekin'
}
}
},
Image: {
preview: 'Aurrebista'
},
QRCode: {
expired: 'QR kodea kadukatuta',
refresh: 'Freskatu'
},
ColorPicker: {
presetEmpty: 'Hustu',
transparent: 'Gardena',
singleColor: 'Kolore bakarra',
gradientColor: 'Gradiente kolorea'
}
};
/* harmony default export */ var components_locale_eu_ES = (localeValues);
/***/ }),
/***/ "./components/locale/fa_IR.ts":
/*!************************************************!*\
!*** ./components/locale/fa_IR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_fa_IR; }
});
;// ./node_modules/rc-pagination/es/locale/fa_IR.js
var locale = {
// Options
items_per_page: '/ صفحه',
jump_to: 'برو به',
jump_to_confirm: 'تایید',
page: '',
// Pagination
prev_page: 'صفحه قبلی',
next_page: 'صفحه بعدی',
prev_5: '۵ صفحه قبلی',
next_5: '۵ صفحه بعدی',
prev_3: '۳ صفحه قبلی',
next_3: '۳ صفحه بعدی',
page_size: 'اندازه صفحه'
};
/* harmony default export */ var fa_IR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/fa_IR.js
var fa_IR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'fa_IR',
today: 'امروز',
now: 'اکنون',
backToToday: 'بازگشت به روز',
ok: 'باشه',
clear: 'پاک کردن',
week: 'هفته',
month: 'ماه',
year: 'سال',
timeSelect: 'انتخاب زمان',
dateSelect: 'انتخاب تاریخ',
monthSelect: 'یک ماه را انتخاب کنید',
yearSelect: 'یک سال را انتخاب کنید',
decadeSelect: 'یک دهه را انتخاب کنید',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'ماه قبل (PageUp)',
nextMonth: 'ماه بعد (PageDown)',
previousYear: 'سال قبل (Control + left)',
nextYear: 'سال بعد (Control + right)',
previousDecade: 'دهه قبل',
nextDecade: 'دهه بعد',
previousCentury: 'قرن قبل',
nextCentury: 'قرن بعد'
});
/* harmony default export */ var locale_fa_IR = (fa_IR_locale);
;// ./components/time-picker/locale/fa_IR.ts
const locale_fa_IR_locale = {
placeholder: 'انتخاب زمان',
rangePlaceholder: ['زمان شروع', 'زمان پایان']
};
/* harmony default export */ var time_picker_locale_fa_IR = (locale_fa_IR_locale);
;// ./components/date-picker/locale/fa_IR.ts
// Merge into a locale object
const date_picker_locale_fa_IR_locale = {
lang: Object.assign({
placeholder: 'انتخاب تاریخ',
yearPlaceholder: 'انتخاب سال',
quarterPlaceholder: 'انتخاب فصل',
monthPlaceholder: 'انتخاب ماه',
weekPlaceholder: 'انتخاب هفته',
rangePlaceholder: ['تاریخ شروع', 'تاریخ پایان'],
rangeYearPlaceholder: ['سال شروع', 'سال پایان'],
rangeQuarterPlaceholder: ['فصل شروع', 'فصل پایان'],
rangeMonthPlaceholder: ['ماه شروع', 'ماه پایان'],
rangeWeekPlaceholder: ['هفته شروع', 'هفته پایان']
}, locale_fa_IR),
timePickerLocale: Object.assign({}, time_picker_locale_fa_IR)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_fa_IR = (date_picker_locale_fa_IR_locale);
;// ./components/calendar/locale/fa_IR.ts
/* harmony default export */ var calendar_locale_fa_IR = (date_picker_locale_fa_IR);
;// ./components/locale/fa_IR.ts
const typeTemplate = '${label} از نوع ${type} معتبر نیست';
const localeValues = {
locale: 'fa',
Pagination: fa_IR,
DatePicker: date_picker_locale_fa_IR,
TimePicker: time_picker_locale_fa_IR,
Calendar: calendar_locale_fa_IR,
global: {
placeholder: 'لطفاً انتخاب کنید'
},
Table: {
filterTitle: 'منوی فیلتر',
filterConfirm: 'تایید',
filterReset: 'پاک کردن',
filterEmptyText: 'بدون فیلتر',
filterCheckAll: 'انتخاب همهی موارد',
filterSearchPlaceholder: 'جستجو در فیلترها',
emptyText: 'بدون داده',
selectAll: 'انتخاب صفحهی کنونی',
selectInvert: 'معکوس کردن انتخابها در صفحه ی کنونی',
selectNone: 'انتخاب هیچکدام',
selectionAll: 'انتخاب همهی دادهها',
sortTitle: 'مرتب سازی',
expand: 'باز شدن ردیف',
collapse: 'بستن ردیف',
triggerDesc: 'ترتیب نزولی',
triggerAsc: 'ترتیب صعودی',
cancelSort: 'لغوِ ترتیبِ داده شده'
},
Tour: {
Next: 'بعدی',
Previous: 'قبلی',
Finish: 'پایان'
},
Modal: {
okText: 'تایید',
cancelText: 'لغو',
justOkText: 'تایید'
},
Popconfirm: {
okText: 'تایید',
cancelText: 'لغو'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'جستجو',
itemUnit: 'عدد',
itemsUnit: 'عدد',
remove: 'حذف',
selectCurrent: 'انتخاب صفحه فعلی',
removeCurrent: 'پاک کردن انتخابهای صفحه فعلی',
selectAll: 'انتخاب همه',
removeAll: 'پاک کردن همه انتخابها',
selectInvert: 'معکوس کردن انتخابها در صفحه ی کنونی'
},
Upload: {
uploading: 'در حال آپلود...',
removeFile: 'حذف فایل',
uploadError: 'خطا در آپلود',
previewFile: 'مشاهدهی فایل',
downloadFile: 'دریافت فایل'
},
Empty: {
description: 'دادهای موجود نیست'
},
Icon: {
icon: 'آیکن'
},
Text: {
edit: 'ویرایش',
copy: 'کپی',
copied: 'کپی شد',
expand: 'توسعه'
},
Form: {
optional: '(اختیاری)',
defaultValidateMessages: {
default: 'خطا در ${label}',
required: 'فیلد ${label} اجباریست',
enum: '${label} باید یکی از [${enum}] باشد',
whitespace: '${label} نمیتواند خالی باشد',
date: {
format: 'ساختار تاریخ در ${label} نامعتبر است',
parse: '${label} قابل تبدیل به تاریخ نیست',
invalid: '${label} تاریخی نا معتبر است'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} باید ${len} کاراکتر باشد',
min: '${label} باید حداقل ${min} کاراکتر باشد',
max: '${label} باید حداکثر ${max} کاراکتر باشد',
range: '${label} باید بین ${min}-${max} کاراکتر باشد'
},
number: {
len: '${label} باید برابر ${len}',
min: '${label} حداقل میتواند ${min} باشد',
max: '${label} حداکثر میتواند ${max} باشد',
range: '${label} باید بین ${min}-${max} باشد'
},
array: {
len: 'تعداد ${label} باید ${len} باشد.',
min: 'تعداد ${label} حداقل باید ${min} باشد',
max: 'تعداد ${label} حداکثر باید ${max} باشد',
range: 'مقدار ${label} باید بین ${min}-${max} باشد'
},
pattern: {
mismatch: 'الگوی ${label} با ${pattern} برابری نمیکند'
}
}
},
Image: {
preview: 'پیشنمایش'
},
QRCode: {
expired: 'QR Code منقضی شذد',
refresh: 'بهروزرسانی'
}
};
/* harmony default export */ var components_locale_fa_IR = (localeValues);
/***/ }),
/***/ "./components/locale/fi_FI.ts":
/*!************************************************!*\
!*** ./components/locale/fi_FI.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_fi_FI; }
});
;// ./node_modules/rc-pagination/es/locale/fi_FI.js
var locale = {
// Options
items_per_page: '/ sivu',
jump_to: 'Mene',
jump_to_confirm: 'Potvrdite',
page: 'Sivu',
// Pagination
prev_page: 'Edellinen sivu',
next_page: 'Seuraava sivu',
prev_5: 'Edelliset 5 sivua',
next_5: 'Seuraavat 5 sivua',
prev_3: 'Edelliset 3 sivua',
next_3: 'Seuraavat 3 sivua',
page_size: 'Page Size'
};
/* harmony default export */ var fi_FI = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/fi_FI.js
var fi_FI_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'fi_FI',
today: 'Tänään',
now: 'Nyt',
backToToday: 'Tämä päivä',
ok: 'OK',
clear: 'Tyhjennä',
week: 'Viikko',
month: 'Kuukausi',
year: 'Vuosi',
timeSelect: 'Valise aika',
dateSelect: 'Valitse päivä',
monthSelect: 'Valitse kuukausi',
yearSelect: 'Valitse vuosi',
decadeSelect: 'Valitse vuosikymmen',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Edellinen kuukausi (PageUp)',
nextMonth: 'Seuraava kuukausi (PageDown)',
previousYear: 'Edellinen vuosi (Control + left)',
nextYear: 'Seuraava vuosi (Control + right)',
previousDecade: 'Edellinen vuosikymmen',
nextDecade: 'Seuraava vuosikymmen',
previousCentury: 'Edellinen vuosisata',
nextCentury: 'Seuraava vuosisata'
});
/* harmony default export */ var locale_fi_FI = (fi_FI_locale);
;// ./components/time-picker/locale/fi_FI.ts
const locale_fi_FI_locale = {
placeholder: 'Valitse aika'
};
/* harmony default export */ var time_picker_locale_fi_FI = (locale_fi_FI_locale);
;// ./components/date-picker/locale/fi_FI.ts
// Merge into a locale object
const date_picker_locale_fi_FI_locale = {
lang: Object.assign({
placeholder: 'Valitse päivä',
rangePlaceholder: ['Alkamispäivä', 'Päättymispäivä']
}, locale_fi_FI),
timePickerLocale: Object.assign({}, time_picker_locale_fi_FI)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_fi_FI = (date_picker_locale_fi_FI_locale);
;// ./components/calendar/locale/fi_FI.ts
/* harmony default export */ var calendar_locale_fi_FI = (date_picker_locale_fi_FI);
;// ./components/locale/fi_FI.ts
const localeValues = {
locale: 'fi',
Pagination: fi_FI,
DatePicker: date_picker_locale_fi_FI,
TimePicker: time_picker_locale_fi_FI,
Calendar: calendar_locale_fi_FI,
Table: {
filterTitle: 'Suodatus valikko',
filterConfirm: 'OK',
filterReset: 'Tyhjennä',
selectAll: 'Valitse kaikki',
selectInvert: 'Valitse päinvastoin',
sortTitle: 'Lajittele',
triggerDesc: 'Lajittele laskevasti',
triggerAsc: 'Lajittele nousevasti',
cancelSort: 'Peruuta lajittelu'
},
Modal: {
okText: 'OK',
cancelText: 'Peruuta',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Peruuta'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Etsi täältä',
itemUnit: 'kohde',
itemsUnit: 'kohdetta'
},
Upload: {
uploading: 'Lähetetään...',
removeFile: 'Poista tiedosto',
uploadError: 'Virhe lähetyksessä',
previewFile: 'Esikatsele tiedostoa',
downloadFile: 'Lataa tiedosto'
},
Empty: {
description: 'Ei kohteita'
},
Text: {
edit: 'Muokkaa',
copy: 'Kopioi',
copied: 'Kopioitu',
expand: 'Näytä lisää'
}
};
/* harmony default export */ var components_locale_fi_FI = (localeValues);
/***/ }),
/***/ "./components/locale/fr_BE.ts":
/*!************************************************!*\
!*** ./components/locale/fr_BE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_fr_BE; }
});
;// ./node_modules/rc-pagination/es/locale/fr_BE.js
var locale = {
// Options
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: '',
// Pagination
prev_page: 'Page précédente',
next_page: 'Page suivante',
prev_5: '5 Pages précédentes',
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
page_size: 'Page Size'
};
/* harmony default export */ var fr_BE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/fr_BE.js
var fr_BE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'fr_BE',
today: "Aujourd'hui",
now: 'Maintenant',
backToToday: "Aujourd'hui",
ok: 'OK',
clear: 'Rétablir',
week: 'Semaine',
month: 'Mois',
year: 'Année',
timeSelect: "Sélectionner l'heure",
dateSelect: "Sélectionner l'heure",
monthSelect: 'Choisissez un mois',
yearSelect: 'Choisissez une année',
decadeSelect: 'Choisissez une décennie',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Mois précédent (PageUp)',
nextMonth: 'Mois suivant (PageDown)',
previousYear: 'Année précédente (Ctrl + gauche)',
nextYear: 'Année prochaine (Ctrl + droite)',
previousDecade: 'Décennie précédente',
nextDecade: 'Décennie suivante',
previousCentury: 'Siècle précédent',
nextCentury: 'Siècle suivant'
});
/* harmony default export */ var locale_fr_BE = (fr_BE_locale);
;// ./components/time-picker/locale/fr_BE.ts
const locale_fr_BE_locale = {
placeholder: "Sélectionner l'heure",
rangePlaceholder: ['Heure de début', 'Heure de fin']
};
/* harmony default export */ var time_picker_locale_fr_BE = (locale_fr_BE_locale);
;// ./components/date-picker/locale/fr_BE.ts
// Merge into a locale object
const date_picker_locale_fr_BE_locale = {
lang: Object.assign({
placeholder: 'Sélectionner une date',
yearPlaceholder: 'Sélectionner une année',
quarterPlaceholder: 'Sélectionner un trimestre',
monthPlaceholder: 'Sélectionner un mois',
weekPlaceholder: 'Sélectionner une semaine',
rangePlaceholder: ['Date de début', 'Date de fin'],
rangeYearPlaceholder: ['Année de début', 'Année de fin'],
rangeMonthPlaceholder: ['Mois de début', 'Mois de fin'],
rangeWeekPlaceholder: ['Semaine de début', 'Semaine de fin']
}, locale_fr_BE),
timePickerLocale: Object.assign({}, time_picker_locale_fr_BE)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_fr_BE = (date_picker_locale_fr_BE_locale);
;// ./components/calendar/locale/fr_BE.ts
/* harmony default export */ var calendar_locale_fr_BE = (date_picker_locale_fr_BE);
;// ./components/locale/fr_BE.ts
const typeTemplate = "La valeur du champ ${label} n'est pas valide pour le type ${type}";
const localeValues = {
locale: 'fr',
Pagination: fr_BE,
DatePicker: date_picker_locale_fr_BE,
TimePicker: time_picker_locale_fr_BE,
Calendar: calendar_locale_fr_BE,
Table: {
filterTitle: 'Filtrer',
filterConfirm: 'OK',
filterReset: 'Réinitialiser',
filterEmptyText: 'Aucun filtre',
filterCheckAll: 'Tout sélectionner',
filterSearchPlaceholder: 'Chercher dans les filtres',
emptyText: 'Aucune donnée',
selectAll: 'Sélectionner la page actuelle',
selectInvert: 'Inverser la sélection de la page actuelle',
selectNone: 'Désélectionner toutes les données',
selectionAll: 'Sélectionner toutes les données',
sortTitle: 'Trier',
expand: 'Développer la ligne',
collapse: 'Réduire la ligne',
triggerDesc: 'Trier par ordre décroissant',
triggerAsc: 'Trier par ordre croissant',
cancelSort: 'Annuler le tri'
},
Tour: {
Next: 'Étape suivante',
Previous: 'Étape précédente',
Finish: 'Fin de la visite guidée'
},
Modal: {
okText: 'OK',
cancelText: 'Annuler',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuler'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Rechercher',
itemUnit: 'élément',
itemsUnit: 'éléments',
remove: 'Désélectionner',
selectCurrent: 'Sélectionner la page actuelle',
removeCurrent: 'Désélectionner la page actuelle',
selectAll: 'Sélectionner toutes les données',
removeAll: 'Désélectionner toutes les données',
selectInvert: 'Inverser la sélection de la page actuelle'
},
Upload: {
uploading: 'Téléchargement...',
removeFile: 'Effacer le fichier',
uploadError: 'Erreur de téléchargement',
previewFile: 'Fichier de prévisualisation',
downloadFile: 'Télécharger un fichier'
},
Empty: {
description: 'Aucune donnée'
},
Icon: {
icon: 'icône'
},
Text: {
edit: 'Éditer',
copy: 'Copier',
copied: 'Copie effectuée',
expand: 'Développer'
},
Form: {
optional: '(optionnel)',
defaultValidateMessages: {
default: 'Erreur de validation pour le champ ${label}',
required: 'Le champ ${label} est obligatoire',
enum: 'La valeur du champ ${label} doit être parmi [${enum}]',
whitespace: 'La valeur du champ ${label} ne peut pas être vide',
date: {
format: "La valeur du champ ${label} n'est pas au format date",
parse: 'La valeur du champ ${label} ne peut pas être convertie vers une date',
invalid: "La valeur du champ ${label} n'est pas une date valide"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: 'La taille du champ ${label} doit être de ${len} caractères',
min: 'La taille du champ ${label} doit être au minimum de ${min} caractères',
max: 'La taille du champ ${label} doit être au maximum de ${max} caractères',
range: 'La taille du champ ${label} doit être entre ${min} et ${max} caractères'
},
number: {
len: 'La valeur du champ ${label} doit être égale à ${len}',
min: 'La valeur du champ ${label} doit être plus grande que ${min}',
max: 'La valeur du champ ${label} doit être plus petit que ${max}',
range: 'La valeur du champ ${label} doit être entre ${min} et ${max}'
},
array: {
len: 'La taille du tableau ${label} doit être de ${len}',
min: 'La taille du tableau ${label} doit être au minimum de ${min}',
max: 'La taille du tableau ${label} doit être au maximum de ${max}',
range: 'La taille du tableau ${label} doit être entre ${min}-${max}'
},
pattern: {
mismatch: 'La valeur du champ ${label} ne correspond pas au modèle ${pattern}'
}
}
},
Image: {
preview: 'Aperçu'
}
};
/* harmony default export */ var components_locale_fr_BE = (localeValues);
/***/ }),
/***/ "./components/locale/fr_CA.ts":
/*!************************************************!*\
!*** ./components/locale/fr_CA.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_fr_CA; }
});
;// ./node_modules/rc-pagination/es/locale/fr_CA.js
var locale = {
// Options
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: 'Page',
// Pagination
prev_page: 'Page précédente',
next_page: 'Page suivante',
prev_5: '5 Pages précédentes',
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
page_size: 'taille de la page'
};
/* harmony default export */ var fr_CA = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/fr_CA.js
var fr_CA_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'fr_CA',
today: "Aujourd'hui",
now: 'Maintenant',
backToToday: "Aujourd'hui",
ok: 'OK',
clear: 'Rétablir',
week: 'Semaine',
month: 'Mois',
year: 'Année',
timeSelect: "Sélectionner l'heure",
dateSelect: 'Sélectionner la date',
monthSelect: 'Choisissez un mois',
yearSelect: 'Choisissez une année',
decadeSelect: 'Choisissez une décennie',
dateFormat: 'DD/MM/YYYY',
dayFormat: 'DD',
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
previousMonth: 'Mois précédent (PageUp)',
nextMonth: 'Mois suivant (PageDown)',
previousYear: 'Année précédente (Ctrl + gauche)',
nextYear: 'Année prochaine (Ctrl + droite)',
previousDecade: 'Décennie précédente',
nextDecade: 'Décennie suivante',
previousCentury: 'Siècle précédent',
nextCentury: 'Siècle suivant'
});
/* harmony default export */ var locale_fr_CA = (fr_CA_locale);
;// ./components/time-picker/locale/fr_CA.ts
const locale_fr_CA_locale = {
placeholder: "Sélectionner l'heure",
rangePlaceholder: ['Heure de début', 'Heure de fin']
};
/* harmony default export */ var time_picker_locale_fr_CA = (locale_fr_CA_locale);
;// ./components/date-picker/locale/fr_CA.ts
// Merge into a locale object
const date_picker_locale_fr_CA_locale = {
lang: Object.assign({
placeholder: 'Sélectionner une date',
yearPlaceholder: 'Sélectionner une année',
quarterPlaceholder: 'Sélectionner un trimestre',
monthPlaceholder: 'Sélectionner un mois',
weekPlaceholder: 'Sélectionner une semaine',
rangePlaceholder: ['Date de début', 'Date de fin'],
rangeYearPlaceholder: ['Année de début', 'Année de fin'],
rangeMonthPlaceholder: ['Mois de début', 'Mois de fin'],
rangeWeekPlaceholder: ['Semaine de début', 'Semaine de fin']
}, locale_fr_CA),
timePickerLocale: Object.assign({}, time_picker_locale_fr_CA)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_fr_CA = (date_picker_locale_fr_CA_locale);
;// ./components/calendar/locale/fr_CA.ts
/* harmony default export */ var calendar_locale_fr_CA = (date_picker_locale_fr_CA);
;// ./components/locale/fr_CA.ts
const typeTemplate = "La valeur du champ ${label} n'est pas valide pour le type ${type}";
const localeValues = {
locale: 'fr',
Pagination: fr_CA,
DatePicker: date_picker_locale_fr_CA,
TimePicker: time_picker_locale_fr_CA,
Calendar: calendar_locale_fr_CA,
Table: {
filterTitle: 'Filtrer',
filterConfirm: 'OK',
filterReset: 'Réinitialiser',
filterEmptyText: 'Aucun filtre',
filterCheckAll: 'Tout sélectionner',
filterSearchPlaceholder: 'Chercher dans les filtres',
emptyText: 'Aucune donnée',
selectAll: 'Sélectionner la page actuelle',
selectInvert: 'Inverser la sélection de la page actuelle',
selectNone: 'Désélectionner toutes les données',
selectionAll: 'Sélectionner toutes les données',
sortTitle: 'Trier',
expand: 'Développer la ligne',
collapse: 'Réduire la ligne',
triggerDesc: 'Trier par ordre décroissant',
triggerAsc: 'Trier par ordre croissant',
cancelSort: 'Annuler le tri'
},
Modal: {
okText: 'OK',
cancelText: 'Annuler',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuler'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Rechercher',
itemUnit: 'élément',
itemsUnit: 'éléments',
remove: 'Désélectionner',
selectCurrent: 'Sélectionner la page actuelle',
removeCurrent: 'Désélectionner la page actuelle',
selectAll: 'Sélectionner toutes les données',
removeAll: 'Désélectionner toutes les données',
selectInvert: 'Inverser la sélection de la page actuelle'
},
Upload: {
uploading: 'Téléchargement...',
removeFile: 'Effacer le fichier',
uploadError: 'Erreur de téléchargement',
previewFile: 'Fichier de prévisualisation',
downloadFile: 'Télécharger un fichier'
},
Empty: {
description: 'Aucune donnée'
},
Icon: {
icon: 'icône'
},
Text: {
edit: 'Éditer',
copy: 'Copier',
copied: 'Copie effectuée',
expand: 'Développer'
},
Form: {
optional: '(optionnel)',
defaultValidateMessages: {
default: 'Erreur de validation pour le champ ${label}',
required: 'Le champ ${label} est obligatoire',
enum: 'La valeur du champ ${label} doit être parmi [${enum}]',
whitespace: 'La valeur du champ ${label} ne peut pas être vide',
date: {
format: "La valeur du champ ${label} n'est pas au format date",
parse: 'La valeur du champ ${label} ne peut pas être convertie vers une date',
invalid: "La valeur du champ ${label} n'est pas une date valide"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: 'La taille du champ ${label} doit être de ${len} caractères',
min: 'La taille du champ ${label} doit être au minimum de ${min} caractères',
max: 'La taille du champ ${label} doit être au maximum de ${max} caractères',
range: 'La taille du champ ${label} doit être entre ${min} et ${max} caractères'
},
number: {
len: 'La valeur du champ ${label} doit être égale à ${len}',
min: 'La valeur du champ ${label} doit être plus grande que ${min}',
max: 'La valeur du champ ${label} doit être plus petit que ${max}',
range: 'La valeur du champ ${label} doit être entre ${min} et ${max}'
},
array: {
len: 'La taille du tableau ${label} doit être de ${len}',
min: 'La taille du tableau ${label} doit être au minimum de ${min}',
max: 'La taille du tableau ${label} doit être au maximum de ${max}',
range: 'La taille du tableau ${label} doit être entre ${min}-${max}'
},
pattern: {
mismatch: 'La valeur du champ ${label} ne correspond pas au modèle ${pattern}'
}
}
},
Image: {
preview: 'Aperçu'
}
};
/* harmony default export */ var components_locale_fr_CA = (localeValues);
/***/ }),
/***/ "./components/locale/fr_FR.ts":
/*!************************************************!*\
!*** ./components/locale/fr_FR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_fr_FR; }
});
;// ./node_modules/rc-pagination/es/locale/fr_FR.js
var locale = {
// Options
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: 'Page',
// Pagination
prev_page: 'Page précédente',
next_page: 'Page suivante',
prev_5: '5 Pages précédentes',
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
page_size: 'taille de la page'
};
/* harmony default export */ var fr_FR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/fr_FR.js
var fr_FR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'fr_FR',
today: "Aujourd'hui",
now: 'Maintenant',
backToToday: "Aujourd'hui",
ok: 'OK',
clear: 'Rétablir',
week: 'Semaine',
month: 'Mois',
year: 'Année',
timeSelect: "Sélectionner l'heure",
dateSelect: 'Sélectionner la date',
monthSelect: 'Choisissez un mois',
yearSelect: 'Choisissez une année',
decadeSelect: 'Choisissez une décennie',
dateFormat: 'DD/MM/YYYY',
dayFormat: 'DD',
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
previousMonth: 'Mois précédent (PageUp)',
nextMonth: 'Mois suivant (PageDown)',
previousYear: 'Année précédente (Ctrl + gauche)',
nextYear: 'Année prochaine (Ctrl + droite)',
previousDecade: 'Décennie précédente',
nextDecade: 'Décennie suivante',
previousCentury: 'Siècle précédent',
nextCentury: 'Siècle suivant'
});
/* harmony default export */ var locale_fr_FR = (fr_FR_locale);
;// ./components/time-picker/locale/fr_FR.ts
const locale_fr_FR_locale = {
placeholder: "Sélectionner l'heure",
rangePlaceholder: ['Heure de début', 'Heure de fin']
};
/* harmony default export */ var time_picker_locale_fr_FR = (locale_fr_FR_locale);
;// ./components/date-picker/locale/fr_FR.ts
// Merge into a locale object
const date_picker_locale_fr_FR_locale = {
lang: Object.assign({
placeholder: 'Sélectionner une date',
yearPlaceholder: 'Sélectionner une année',
quarterPlaceholder: 'Sélectionner un trimestre',
monthPlaceholder: 'Sélectionner un mois',
weekPlaceholder: 'Sélectionner une semaine',
rangePlaceholder: ['Date de début', 'Date de fin'],
rangeYearPlaceholder: ['Année de début', 'Année de fin'],
rangeMonthPlaceholder: ['Mois de début', 'Mois de fin'],
rangeWeekPlaceholder: ['Semaine de début', 'Semaine de fin']
}, locale_fr_FR),
timePickerLocale: Object.assign({}, time_picker_locale_fr_FR)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_fr_FR = (date_picker_locale_fr_FR_locale);
;// ./components/calendar/locale/fr_FR.ts
/* harmony default export */ var calendar_locale_fr_FR = (date_picker_locale_fr_FR);
;// ./components/locale/fr_FR.ts
const typeTemplate = "La valeur du champ ${label} n'est pas valide pour le type ${type}";
const localeValues = {
locale: 'fr',
Pagination: fr_FR,
DatePicker: date_picker_locale_fr_FR,
TimePicker: time_picker_locale_fr_FR,
Calendar: calendar_locale_fr_FR,
Table: {
filterTitle: 'Filtrer',
filterConfirm: 'OK',
filterReset: 'Réinitialiser',
filterEmptyText: 'Aucun filtre',
filterCheckAll: 'Tout sélectionner',
filterSearchPlaceholder: 'Chercher dans les filtres',
emptyText: 'Aucune donnée',
selectAll: 'Sélectionner la page actuelle',
selectInvert: 'Inverser la sélection de la page actuelle',
selectNone: 'Désélectionner toutes les données',
selectionAll: 'Sélectionner toutes les données',
sortTitle: 'Trier',
expand: 'Développer la ligne',
collapse: 'Réduire la ligne',
triggerDesc: 'Trier par ordre décroissant',
triggerAsc: 'Trier par ordre croissant',
cancelSort: 'Annuler le tri'
},
Tour: {
Next: 'Étape suivante',
Previous: 'Étape précédente',
Finish: 'Fin de la visite guidée'
},
Modal: {
okText: 'OK',
cancelText: 'Annuler',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuler'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Rechercher',
itemUnit: 'élément',
itemsUnit: 'éléments',
remove: 'Désélectionner',
selectCurrent: 'Sélectionner la page actuelle',
removeCurrent: 'Désélectionner la page actuelle',
selectAll: 'Sélectionner toutes les données',
removeAll: 'Désélectionner toutes les données',
selectInvert: 'Inverser la sélection de la page actuelle'
},
Upload: {
uploading: 'Téléchargement...',
removeFile: 'Effacer le fichier',
uploadError: 'Erreur de téléchargement',
previewFile: 'Fichier de prévisualisation',
downloadFile: 'Télécharger un fichier'
},
Empty: {
description: 'Aucune donnée'
},
Icon: {
icon: 'icône'
},
Text: {
edit: 'Éditer',
copy: 'Copier',
copied: 'Copie effectuée',
expand: 'Développer'
},
Form: {
optional: '(optionnel)',
defaultValidateMessages: {
default: 'Erreur de validation pour le champ ${label}',
required: 'Le champ ${label} est obligatoire',
enum: 'La valeur du champ ${label} doit être parmi [${enum}]',
whitespace: 'La valeur du champ ${label} ne peut pas être vide',
date: {
format: "La valeur du champ ${label} n'est pas au format date",
parse: 'La valeur du champ ${label} ne peut pas être convertie vers une date',
invalid: "La valeur du champ ${label} n'est pas une date valide"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: 'La taille du champ ${label} doit être de ${len} caractères',
min: 'La taille du champ ${label} doit être au minimum de ${min} caractères',
max: 'La taille du champ ${label} doit être au maximum de ${max} caractères',
range: 'La taille du champ ${label} doit être entre ${min} et ${max} caractères'
},
number: {
len: 'La valeur du champ ${label} doit être égale à ${len}',
min: 'La valeur du champ ${label} doit être plus grande que ${min}',
max: 'La valeur du champ ${label} doit être plus petit que ${max}',
range: 'La valeur du champ ${label} doit être entre ${min} et ${max}'
},
array: {
len: 'La taille du tableau ${label} doit être de ${len}',
min: 'La taille du tableau ${label} doit être au minimum de ${min}',
max: 'La taille du tableau ${label} doit être au maximum de ${max}',
range: 'La taille du tableau ${label} doit être entre ${min}-${max}'
},
pattern: {
mismatch: 'La valeur du champ ${label} ne correspond pas au modèle ${pattern}'
}
}
},
Image: {
preview: 'Aperçu'
}
};
/* harmony default export */ var components_locale_fr_FR = (localeValues);
/***/ }),
/***/ "./components/locale/ga_IE.ts":
/*!************************************************!*\
!*** ./components/locale/ga_IE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ga_IE; }
});
;// ./node_modules/rc-pagination/es/locale/ga_IE.js
var locale = {
// Options
items_per_page: '/ leathanach',
jump_to: 'Téigh',
jump_to_confirm: 'dheimhnigh',
page: '',
// Pagination
prev_page: 'Leathanach Roimhe Seo',
next_page: 'An chéad leathanach eile',
prev_5: '5 leathanach roimhe seo',
next_5: 'Ar Aghaidh 5 Leathanaigh',
prev_3: '3 leathanach roimhe seo',
next_3: 'Ar Aghaidh 3 Leathanaigh',
page_size: 'Page Size'
};
/* harmony default export */ var ga_IE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ga_IE.js
var ga_IE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ga_IE',
today: 'inniu',
now: 'anois',
backToToday: 'Ar ais inniu',
ok: 'ceart go leor',
clear: 'soiléir',
week: 'seachtain',
month: 'mhí',
year: 'bhliain',
timeSelect: 'roghnaigh am',
dateSelect: 'roghnaigh dáta',
weekSelect: 'Roghnaigh seachtain',
monthSelect: 'Roghnaigh mí',
yearSelect: 'Roghnaigh bliain',
decadeSelect: 'Roghnaigh deich mbliana',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'An mhí roimhe seo (PageUp)',
nextMonth: 'An mhí seo chugainn (PageDown)',
previousYear: 'Anuraidh (Control + left)',
nextYear: 'An bhliain seo chugainn (Control + right)',
previousDecade: 'Le deich mbliana anuas',
nextDecade: 'Deich mbliana amach romhainn',
previousCentury: 'An chéid seo caite',
nextCentury: 'An chéad aois eile'
});
/* harmony default export */ var locale_ga_IE = (ga_IE_locale);
;// ./components/time-picker/locale/ga_IE.ts
const locale_ga_IE_locale = {
placeholder: 'Roghnaigh am',
rangePlaceholder: ['Am tosaigh', 'Am deiridh']
};
/* harmony default export */ var time_picker_locale_ga_IE = (locale_ga_IE_locale);
;// ./components/date-picker/locale/ga_IE.ts
// Merge into a locale object
const date_picker_locale_ga_IE_locale = {
lang: Object.assign({
placeholder: 'Roghnaigh dáta',
yearPlaceholder: 'Roghnaigh bliain',
quarterPlaceholder: 'Roghnaigh ráithe',
monthPlaceholder: 'Roghnaigh mí',
weekPlaceholder: 'Roghnaigh seachtain',
rangePlaceholder: ['Dáta tosaigh', 'Dáta deiridh'],
rangeYearPlaceholder: ['Tús na bliana', 'Deireadh na bliana'],
rangeMonthPlaceholder: ['Tosaigh mhí', 'Deireadh mhí'],
rangeWeekPlaceholder: ['Tosaigh an tseachtain', 'Deireadh na seachtaine']
}, locale_ga_IE),
timePickerLocale: Object.assign({}, time_picker_locale_ga_IE)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ga_IE = (date_picker_locale_ga_IE_locale);
;// ./components/calendar/locale/ga_IE.ts
/* harmony default export */ var calendar_locale_ga_IE = (date_picker_locale_ga_IE);
;// ./components/locale/ga_IE.ts
const typeTemplate = '${label} is not a valid ${type}';
const localeValues = {
locale: 'ga',
Pagination: ga_IE,
DatePicker: date_picker_locale_ga_IE,
TimePicker: time_picker_locale_ga_IE,
Calendar: calendar_locale_ga_IE,
global: {
placeholder: 'Please select'
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
selectionAll: 'Select all data',
sortTitle: 'Sort',
expand: 'Expand row',
collapse: 'Collapse row',
triggerDesc: 'Click to sort descending',
triggerAsc: 'Click to sort ascending',
cancelSort: 'Click to cancel sorting'
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remove',
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page'
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
downloadFile: 'Download file'
},
Empty: {
description: 'No Data'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Edit',
copy: 'Copy',
copied: 'Copied',
expand: 'Expand'
},
Form: {
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
enum: '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} must be ${len} characters',
min: '${label} must be at least ${min} characters',
max: '${label} must be up to ${max} characters',
range: '${label} must be between ${min}-${max} characters'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} must be minimum ${min}',
max: '${label} must be maximum ${max}',
range: '${label} must be between ${min}-${max}'
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}'
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_ga_IE = (localeValues);
/***/ }),
/***/ "./components/locale/gl_ES.ts":
/*!************************************************!*\
!*** ./components/locale/gl_ES.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_gl_ES; }
});
;// ./node_modules/rc-pagination/es/locale/gl_ES.js
var locale = {
// Options
items_per_page: '/ páxina',
jump_to: 'Ir a',
jump_to_confirm: 'confirmar',
page: '',
// Pagination
prev_page: 'Páxina anterior',
next_page: 'Páxina seguinte',
prev_5: '5 páxinas previas',
next_5: '5 páxinas seguintes',
prev_3: '3 páxinas previas',
next_3: '3 páxinas seguintes',
page_size: 'Page Size'
};
/* harmony default export */ var gl_ES = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/gl_ES.js
var gl_ES_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'gl_ES',
today: 'Hoxe',
now: 'Agora',
backToToday: 'Voltar a hoxe',
ok: 'Aceptar',
clear: 'Limpar',
week: 'Semana',
month: 'Mes',
year: 'Ano',
timeSelect: 'Seleccionar hora',
dateSelect: 'Seleccionar data',
monthSelect: 'Elexir un mes',
yearSelect: 'Elexir un año',
decadeSelect: 'Elexir unha década',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Mes anterior (PageUp)',
nextMonth: 'Mes seguinte (PageDown)',
previousYear: 'Ano anterior (Control + left)',
nextYear: 'Ano seguinte (Control + right)',
previousDecade: 'Década anterior',
nextDecade: 'Década seguinte',
previousCentury: 'Século anterior',
nextCentury: 'Século seguinte'
});
/* harmony default export */ var locale_gl_ES = (gl_ES_locale);
;// ./components/time-picker/locale/gl_ES.ts
const locale_gl_ES_locale = {
placeholder: 'Escolla hora'
};
/* harmony default export */ var time_picker_locale_gl_ES = (locale_gl_ES_locale);
;// ./components/date-picker/locale/gl_ES.ts
// Merge into a locale object
const date_picker_locale_gl_ES_locale = {
lang: Object.assign({
placeholder: 'Escolla data',
rangePlaceholder: ['Data inicial', 'Data final']
}, locale_gl_ES),
timePickerLocale: Object.assign({}, time_picker_locale_gl_ES)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_gl_ES = (date_picker_locale_gl_ES_locale);
;// ./components/calendar/locale/gl_ES.ts
/* harmony default export */ var calendar_locale_gl_ES = (date_picker_locale_gl_ES);
;// ./components/locale/gl_ES.ts
const typeTemplate = '${label} non é un ${type} válido';
const localeValues = {
locale: 'gl',
Pagination: gl_ES,
DatePicker: date_picker_locale_gl_ES,
TimePicker: time_picker_locale_gl_ES,
Calendar: calendar_locale_gl_ES,
global: {
placeholder: 'Escolla'
},
Table: {
filterTitle: 'Filtrar menú',
filterConfirm: 'Aceptar',
filterReset: 'Reiniciar',
selectAll: 'Seleccionar todo',
selectInvert: 'Invertir selección',
sortTitle: 'Ordenar'
},
Modal: {
okText: 'Aceptar',
cancelText: 'Cancelar',
justOkText: 'Aceptar'
},
Popconfirm: {
okText: 'Aceptar',
cancelText: 'Cancelar'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Buscar aquí',
itemUnit: 'elemento',
itemsUnit: 'elementos'
},
Upload: {
uploading: 'Subindo...',
removeFile: 'Eliminar arquivo',
uploadError: 'Error ao subir o arquivo',
previewFile: 'Vista previa',
downloadFile: 'Descargar arquivo'
},
Empty: {
description: 'Non hai datos'
},
Icon: {
icon: 'icona'
},
Text: {
edit: 'editar',
copy: 'copiar',
copied: 'copiado',
expand: 'expandir'
},
Form: {
defaultValidateMessages: {
default: 'Error de validación do campo ${label}',
required: 'Por favor complete ${label}',
enum: '${label} ten que ser un de [${enum}]',
whitespace: '${label} non pode ter ningún caracter en branco',
date: {
format: 'O formato de data ${label} non é válido',
parse: '${label} non se pode convertir a unha data',
invalid: '${label} é unha data inválida'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} debe ter ${len} caracteres',
min: '${label} debe ter como mínimo ${min} caracteres',
max: '${label} debe ter ata ${max} caracteres',
range: '${label} debe ter entre ${min}-${max} caracteres'
},
number: {
len: '${label} debe ser igual a ${len}',
min: '${label} valor mínimo é ${min}',
max: '${label} valor máximo é ${max}',
range: '${label} debe estar entre ${min}-${max}'
},
array: {
len: 'Debe ser ${len} ${label}',
min: 'Como mínimo ${min} ${label}',
max: 'Como máximo ${max} ${label}',
range: 'O valor de ${label} debe estar entre ${min}-${max}'
},
pattern: {
mismatch: '${label} non coincide co patrón ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_gl_ES = (localeValues);
/***/ }),
/***/ "./components/locale/he_IL.ts":
/*!************************************************!*\
!*** ./components/locale/he_IL.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_he_IL; }
});
;// ./node_modules/rc-pagination/es/locale/he_IL.js
var locale = {
// Options
items_per_page: '/ עמוד',
jump_to: 'עבור אל',
jump_to_confirm: 'אישור',
page: '',
// Pagination
prev_page: 'העמוד הקודם',
next_page: 'העמוד הבא',
prev_5: '5 עמודים קודמים',
next_5: '5 עמודים הבאים',
prev_3: '3 עמודים קודמים',
next_3: '3 עמודים הבאים',
page_size: 'Page Size'
};
/* harmony default export */ var he_IL = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/he_IL.js
var he_IL_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'he_IL',
today: 'היום',
now: 'עכשיו',
backToToday: 'חזור להיום',
ok: 'אישור',
clear: 'איפוס',
week: 'שבוע',
month: 'חודש',
year: 'שנה',
timeSelect: 'בחר שעה',
dateSelect: 'בחר תאריך',
weekSelect: 'בחר שבוע',
monthSelect: 'בחר חודש',
yearSelect: 'בחר שנה',
decadeSelect: 'בחר עשור',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'חודש קודם (PageUp)',
nextMonth: 'חודש הבא (PageDown)',
previousYear: 'שנה שעברה (Control + left)',
nextYear: 'שנה הבאה (Control + right)',
previousDecade: 'העשור הקודם',
nextDecade: 'העשור הבא',
previousCentury: 'המאה הקודמת',
nextCentury: 'המאה הבאה'
});
/* harmony default export */ var locale_he_IL = (he_IL_locale);
;// ./components/time-picker/locale/he_IL.ts
const locale_he_IL_locale = {
placeholder: 'בחר שעה'
};
/* harmony default export */ var time_picker_locale_he_IL = (locale_he_IL_locale);
;// ./components/date-picker/locale/he_IL.ts
// Merge into a locale object
const date_picker_locale_he_IL_locale = {
lang: Object.assign({
placeholder: 'בחר תאריך',
rangePlaceholder: ['תאריך התחלה', 'תאריך סיום']
}, locale_he_IL),
timePickerLocale: Object.assign({}, time_picker_locale_he_IL)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_he_IL = (date_picker_locale_he_IL_locale);
;// ./components/calendar/locale/he_IL.ts
/* harmony default export */ var calendar_locale_he_IL = (date_picker_locale_he_IL);
;// ./components/locale/he_IL.ts
const typeTemplate = '${label} הוא לא ${type} תקין';
const localeValues = {
locale: 'he',
Pagination: he_IL,
DatePicker: date_picker_locale_he_IL,
TimePicker: time_picker_locale_he_IL,
Calendar: calendar_locale_he_IL,
global: {
placeholder: 'אנא בחר'
},
Table: {
filterTitle: 'תפריט סינון',
filterConfirm: 'אישור',
filterReset: 'איפוס',
selectAll: 'בחר הכל',
selectInvert: 'הפוך בחירה',
selectionAll: 'בחר את כל הנתונים',
sortTitle: 'מיון',
expand: 'הרחב שורה',
collapse: 'צמצם שורה',
triggerDesc: 'לחץ למיון לפי סדר יורד',
triggerAsc: 'לחץ למיון לפי סדר עולה',
cancelSort: 'לחץ כדי לבטל את המיון'
},
Tour: {
Next: 'הבא',
Previous: 'הקודם',
Finish: 'סיום'
},
Modal: {
okText: 'אישור',
cancelText: 'ביטול',
justOkText: 'אישור'
},
Popconfirm: {
okText: 'אישור',
cancelText: 'ביטול'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'חפש כאן',
itemUnit: 'פריט',
itemsUnit: 'פריטים'
},
Upload: {
uploading: 'מעלה...',
removeFile: 'הסר קובץ',
uploadError: 'שגיאת העלאה',
previewFile: 'הצג קובץ',
downloadFile: 'הורד קובץ'
},
Empty: {
description: 'אין מידע'
},
Icon: {
icon: 'סמל'
},
Text: {
edit: 'ערוך',
copy: 'העתק',
copied: 'הועתק',
expand: 'הרחב'
},
Form: {
defaultValidateMessages: {
default: 'ערך השדה שגוי ${label}',
required: 'בבקשה הזן ${label}',
enum: '${label} חייב להיות אחד מערכים אלו [${enum}]',
whitespace: '${label} לא יכול להיות ריק',
date: {
format: '${label} תאריך לא תקין',
parse: '${label} לא ניתן להמיר לתאריך',
invalid: '${label} הוא לא תאריך תקין'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} חייב להיות ${len} תווים',
min: '${label} חייב להיות ${min} תווים',
max: '${label} מקסימום ${max} תווים',
range: '${label} חייב להיות בין ${min}-${max} תווים'
},
number: {
len: '${label} חייב להיות שווה ל ${len}',
min: '${label} ערך מינימלי הוא ${min}',
max: '${label} ערך מקסימלי הוא ${max}',
range: '${label} חייב להיות בין ${min}-${max}'
},
array: {
len: 'חייב להיות ${len} ${label}',
min: 'מינימום ${min} ${label}',
max: 'מקסימום ${max} ${label}',
range: 'הסכום של ${label} חייב להיות בין ${min}-${max}'
},
pattern: {
mismatch: '${label} לא תואם לתבנית ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_he_IL = (localeValues);
/***/ }),
/***/ "./components/locale/hi_IN.ts":
/*!************************************************!*\
!*** ./components/locale/hi_IN.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_hi_IN; }
});
;// ./node_modules/rc-pagination/es/locale/hi_IN.js
var locale = {
// Options
items_per_page: '/ पृष्ठ',
jump_to: 'इस पर चलें',
jump_to_confirm: 'पुष्टि करें',
page: '',
// Pagination
prev_page: 'पिछला पृष्ठ',
next_page: 'अगला पृष्ठ',
prev_5: 'पिछले 5 पृष्ठ',
next_5: 'अगले 5 पृष्ठ',
prev_3: 'पिछले 3 पृष्ठ',
next_3: 'अगले 3 पेज',
page_size: 'Page Size'
};
/* harmony default export */ var hi_IN = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/hi_IN.js
var hi_IN_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'hi_IN',
today: 'आज',
now: 'अभी',
backToToday: 'आज तक',
ok: 'ठीक',
clear: 'स्पष्ट',
week: 'सप्ताह',
month: 'महीना',
year: 'साल',
timeSelect: 'समय का चयन करें',
dateSelect: 'तारीख़ चुनें',
weekSelect: 'एक सप्ताह चुनें',
monthSelect: 'एक महीना चुनें',
yearSelect: 'एक वर्ष चुनें',
decadeSelect: 'एक दशक चुनें',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'पिछला महीना (पेजअप)',
nextMonth: 'अगले महीने (पेजडाउन)',
previousYear: 'पिछले साल (Ctrl + बाएं)',
nextYear: 'अगले साल (Ctrl + दाहिना)',
previousDecade: 'पिछला दशक',
nextDecade: 'अगले दशक',
previousCentury: 'पीछ्ली शताब्दी',
nextCentury: 'अगली सदी'
});
/* harmony default export */ var locale_hi_IN = (hi_IN_locale);
;// ./components/time-picker/locale/hi_IN.ts
const locale_hi_IN_locale = {
placeholder: 'समय का चयन करें',
rangePlaceholder: ['आरंभिक समय', 'अंत समय']
};
/* harmony default export */ var time_picker_locale_hi_IN = (locale_hi_IN_locale);
;// ./components/date-picker/locale/hi_IN.ts
// Merge into a locale object
const date_picker_locale_hi_IN_locale = {
lang: Object.assign({
placeholder: 'तारीख़ चुनें',
yearPlaceholder: 'वर्ष चुनें',
quarterPlaceholder: 'तिमाही चुनें',
monthPlaceholder: 'महीना चुनिए',
weekPlaceholder: 'सप्ताह चुनें',
rangePlaceholder: ['प्रारंभ तिथि', 'समाप्ति तिथि'],
rangeYearPlaceholder: ['आरंभिक वर्ष', 'अंत वर्ष'],
rangeMonthPlaceholder: ['आरंभिक महीना', 'अंत महीना'],
rangeWeekPlaceholder: ['आरंभिक सप्ताह', 'अंत सप्ताह']
}, locale_hi_IN),
timePickerLocale: Object.assign({}, time_picker_locale_hi_IN)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_hi_IN = (date_picker_locale_hi_IN_locale);
;// ./components/calendar/locale/hi_IN.ts
/* harmony default export */ var calendar_locale_hi_IN = (date_picker_locale_hi_IN);
;// ./components/locale/hi_IN.ts
const typeTemplate = '${label} मान्य ${type} नहीं है';
const localeValues = {
locale: 'hi',
Pagination: hi_IN,
DatePicker: date_picker_locale_hi_IN,
TimePicker: time_picker_locale_hi_IN,
Calendar: calendar_locale_hi_IN,
global: {
placeholder: 'कृपया चुनें'
},
Table: {
filterTitle: 'सूची बंद करें',
filterConfirm: 'अच्छी तरह से',
filterReset: 'रीसेट',
filterEmptyText: 'कोई फ़िल्टर नहीं',
emptyText: 'कोई जानकारी नहीं',
selectAll: 'वर्तमान पृष्ठ का चयन करें',
selectInvert: 'वर्तमान पृष्ठ घुमाएं',
selectNone: 'सभी डेटा साफ़ करें',
selectionAll: 'सभी डेटा का चयन करें',
sortTitle: 'द्वारा क्रमबद्ध करें',
expand: 'पंक्ति का विस्तार करें',
collapse: 'पंक्ति संक्षिप्त करें',
triggerDesc: 'अवरोही क्रमित करने के लिए क्लिक करें',
triggerAsc: 'आरोही क्रमित करने के लिए क्लिक करें',
cancelSort: 'छँटाई रद्द करने के लिए क्लिक करें'
},
Modal: {
okText: 'अच्छी तरह से',
cancelText: 'रद्द करना',
justOkText: 'अच्छी तरह से'
},
Popconfirm: {
okText: 'अच्छी तरह से',
cancelText: 'रद्द करना'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'यहां खोजें',
itemUnit: 'तत्त्व',
itemsUnit: 'विषय-वस्तु',
remove: 'हटाए',
selectCurrent: 'वर्तमान पृष्ठ का चयन करें',
removeCurrent: 'वर्तमान पृष्ठ हटाएं',
selectAll: 'सभी डेटा का चयन करें',
removeAll: 'सभी डेटा हटाएं',
selectInvert: 'वर्तमान पृष्ठ को उल्टा करें'
},
Upload: {
uploading: 'अपलोड हो रहा...',
removeFile: 'फ़ाइल निकालें',
uploadError: 'अपलोड में त्रुटि',
previewFile: 'फ़ाइल पूर्वावलोकन',
downloadFile: 'फ़ाइल डाउनलोड करें'
},
Empty: {
description: 'कोई आकड़ा उपलब्ध नहीं है'
},
Icon: {
icon: 'आइकन'
},
Text: {
edit: 'संपादित करें',
copy: 'प्रतिलिपि',
copied: 'कॉपी किया गया',
expand: 'विस्तार'
},
Form: {
optional: '(ऐच्छिक)',
defaultValidateMessages: {
default: '${label} के लिए फील्ड सत्यापन त्रुटि',
required: 'कृपया ${label} दर्ज करें',
enum: '${label} [${enum}] में से एक होना चाहिए',
whitespace: '${label} एक खाली अक्षर नहीं हो सकता',
date: {
format: '${label} तिथि प्रारूप अमान्य है',
parse: '${label} को तारीख में नहीं बदला जा सकता',
invalid: '${label} एक अमान्य तिथि है'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ${len} अक्षर का होना चाहिए',
min: '${label} कम से कम ${min} वर्णों का होना चाहिए',
max: '${label} अधिकतम ${max} वर्णों का होना चाहिए',
range: '${label} ${min}-${max} वर्णों के बीच होना चाहिए'
},
number: {
len: '${label} ${len} के बराबर होना चाहिए',
min: '${label} कम से कम ${min} होना चाहिए',
max: '${label} अधिकतम ${max} होना चाहिए',
range: '${label} ${min}-${max} के बीच होना चाहिए'
},
array: {
len: '${len} ${label} होना चाहिए',
min: 'कम से कम ${min} ${label}',
max: 'ज्यादा से ज्यादा ${max} ${label}',
range: '${label} की राशि ${min}-${max} के बीच होनी चाहिए'
},
pattern: {
mismatch: '${label} ${pattern} पैटर्न से मेल नहीं खाता'
}
}
},
Image: {
preview: 'पूर्वावलोकन'
}
};
/* harmony default export */ var components_locale_hi_IN = (localeValues);
/***/ }),
/***/ "./components/locale/hr_HR.ts":
/*!************************************************!*\
!*** ./components/locale/hr_HR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_hr_HR; }
});
;// ./node_modules/rc-pagination/es/locale/hr_HR.js
var locale = {
// Options
items_per_page: '/ str',
jump_to: 'Idi na',
jump_to_confirm: 'potvrdi',
page: '',
// Pagination
prev_page: 'Prijašnja stranica',
next_page: 'Sljedeća stranica',
prev_5: 'Prijašnjih 5 stranica',
next_5: 'Sljedećih 5 stranica',
prev_3: 'Prijašnje 3 stranice',
next_3: 'Sljedeće 3 stranice',
page_size: 'Page Size'
};
/* harmony default export */ var hr_HR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/hr_HR.js
var hr_HR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'hr_HR',
today: 'Danas',
now: 'Sad',
backToToday: 'Natrag na danas',
ok: 'OK',
clear: 'Očisti',
week: 'Sedmica',
month: 'Mjesec',
year: 'Godina',
timeSelect: 'odaberite vrijeme',
dateSelect: 'odaberite datum',
weekSelect: 'Odaberite tjedan',
monthSelect: 'Odaberite mjesec',
yearSelect: 'Odaberite godinu',
decadeSelect: 'Odaberite desetljeće',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Prošli mjesec (PageUp)',
nextMonth: 'Sljedeći mjesec (PageDown)',
previousYear: 'Prošla godina (Control + left)',
nextYear: 'Sljedeća godina (Control + right)',
previousDecade: 'Prošlo desetljeće',
nextDecade: 'Sljedeće desetljeće',
previousCentury: 'Prošlo stoljeće',
nextCentury: 'Sljedeće stoljeće'
});
/* harmony default export */ var locale_hr_HR = (hr_HR_locale);
;// ./components/time-picker/locale/hr_HR.ts
const locale_hr_HR_locale = {
placeholder: 'Odaberite vrijeme',
rangePlaceholder: ['Vrijeme početka', 'Vrijeme završetka']
};
/* harmony default export */ var time_picker_locale_hr_HR = (locale_hr_HR_locale);
;// ./components/date-picker/locale/hr_HR.ts
// Merge into a locale object
const date_picker_locale_hr_HR_locale = {
lang: Object.assign({
placeholder: 'Odaberite datum',
yearPlaceholder: 'Odaberite godinu',
quarterPlaceholder: 'Odaberite četvrtinu',
monthPlaceholder: 'Odaberite mjesec',
weekPlaceholder: 'Odaberite tjedan',
rangePlaceholder: ['Početni datum', 'Završni datum'],
rangeYearPlaceholder: ['Početna godina', 'Završna godina'],
rangeMonthPlaceholder: ['Početni mjesec', 'Završni mjesec'],
rangeWeekPlaceholder: ['Početni tjedan', 'Završni tjedan']
}, locale_hr_HR),
timePickerLocale: Object.assign({}, time_picker_locale_hr_HR)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_hr_HR = (date_picker_locale_hr_HR_locale);
;// ./components/calendar/locale/hr_HR.ts
/* harmony default export */ var calendar_locale_hr_HR = (date_picker_locale_hr_HR);
;// ./components/locale/hr_HR.ts
const typeTemplate = '${label} nije valjan ${type}';
const localeValues = {
locale: 'hr',
Pagination: hr_HR,
DatePicker: date_picker_locale_hr_HR,
TimePicker: time_picker_locale_hr_HR,
Calendar: calendar_locale_hr_HR,
global: {
placeholder: 'Molimo označite'
},
Table: {
filterTitle: 'Filter meni',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'Nema filtera',
emptyText: 'Nema podataka',
selectAll: 'Označi trenutnu stranicu',
selectInvert: 'Invertiraj trenutnu stranicu',
selectionAll: 'Odaberite sve podatke',
sortTitle: 'Sortiraj',
expand: 'Proširi redak',
collapse: 'Sažmi redak',
triggerDesc: 'Kliknite za sortiranje silazno',
triggerAsc: 'Kliknite za sortiranje uzlazno',
cancelSort: 'Kliknite da biste otkazali sortiranje'
},
Modal: {
okText: 'OK',
cancelText: 'Odustani',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Odustani'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Pretraži ovdje',
itemUnit: 'stavka',
itemsUnit: 'stavke',
remove: 'Ukloniti',
selectCurrent: 'Odaberite trenutnu stranicu',
removeCurrent: 'Ukloni trenutnu stranicu',
selectAll: 'Odaberite sve podatke',
removeAll: 'Uklonite sve podatke',
selectInvert: 'Obrni trenutnu stranicu'
},
Upload: {
uploading: 'Upload u tijeku...',
removeFile: 'Makni datoteku',
uploadError: 'Greška kod uploada',
previewFile: 'Pogledaj datoteku',
downloadFile: 'Preuzmi datoteku'
},
Empty: {
description: 'Nema podataka'
},
Icon: {
icon: 'ikona'
},
Text: {
edit: 'Uredi',
copy: 'Kopiraj',
copied: 'Kopiranje uspješno',
expand: 'Proširi'
},
Form: {
optional: '(neobavezno)',
defaultValidateMessages: {
default: 'Pogreška provjere valjanosti polja za ${label}',
required: 'Molimo unesite ${label}',
enum: '${label} mora biti jedan od [${enum}]',
whitespace: '${label} ne može biti prazan znak',
date: {
format: '${label} format datuma je nevažeći',
parse: '${label} ne može se pretvoriti u datum',
invalid: '${label} je nevažeći datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} mora biti ${len} slova',
min: '${label} mora biti najmanje ${min} slova',
max: '${label} mora biti do ${max} slova',
range: '${label} mora biti između ${min}-${max} slova'
},
number: {
len: '${label} mora biti jednak ${len}',
min: '${label} mora biti minimalano ${min}',
max: '${label} mora biti maksimalano ${max}',
range: '${label} mora biti između ${min}-${max}'
},
array: {
len: 'Mora biti ${len} ${label}',
min: 'Najmanje ${min} ${label}',
max: 'Najviše ${max} ${label}',
range: 'Količina ${label} mora biti između ${min}-${max}'
},
pattern: {
mismatch: '${label} ne odgovara obrascu ${pattern}'
}
}
},
Image: {
preview: 'Pregled'
}
};
/* harmony default export */ var components_locale_hr_HR = (localeValues);
/***/ }),
/***/ "./components/locale/hu_HU.ts":
/*!************************************************!*\
!*** ./components/locale/hu_HU.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_hu_HU; }
});
;// ./node_modules/rc-pagination/es/locale/hu_HU.js
var locale = {
// Options
items_per_page: '/ oldal',
// '/ page',
jump_to: 'Ugrás',
// 'Goto',
jump_to_confirm: 'megerősít',
// 'confirm',
page: '',
// Pagination
prev_page: 'Előző oldal',
// 'Previous Page',
next_page: 'Következő oldal',
// 'Next Page',
prev_5: 'Előző 5 oldal',
// 'Previous 5 Pages',
next_5: 'Következő 5 oldal',
// 'Next 5 Pages',
prev_3: 'Előző 3 oldal',
// 'Previous 3 Pages',
next_3: 'Következő 3 oldal',
// 'Next 3 Pages',
page_size: 'Page Size'
};
/* harmony default export */ var hu_HU = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/hu_HU.js
var hu_HU_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'hu_HU',
today: 'Ma',
// 'Today',
now: 'Most',
// 'Now',
backToToday: 'Vissza a mai napra',
// 'Back to today',
ok: 'OK',
clear: 'Törlés',
// 'Clear',
week: 'Hét',
month: 'Hónap',
// 'Month',
year: 'Év',
// 'Year',
timeSelect: 'Időpont kiválasztása',
// 'Select time',
dateSelect: 'Dátum kiválasztása',
// 'Select date',
monthSelect: 'Hónap kiválasztása',
// 'Choose a month',
yearSelect: 'Év kiválasztása',
// 'Choose a year',
decadeSelect: 'Évtized kiválasztása',
// 'Choose a decade',
dateFormat: 'YYYY/MM/DD',
// 'M/D/YYYY',
dayFormat: 'DD',
// 'D',
dateTimeFormat: 'YYYY/MM/DD HH:mm:ss',
// 'M/D/YYYY HH:mm:ss',
previousMonth: 'Előző hónap (PageUp)',
// 'Previous month (PageUp)',
nextMonth: 'Következő hónap (PageDown)',
// 'Next month (PageDown)',
previousYear: 'Múlt év (Control + left)',
// 'Last year (Control + left)',
nextYear: 'Jövő év (Control + right)',
// 'Next year (Control + right)',
previousDecade: 'Előző évtized',
// 'Last decade',
nextDecade: 'Következő évtized',
// 'Next decade',
previousCentury: 'Múlt évszázad',
// 'Last century',
nextCentury: 'Jövő évszázad' // 'Next century',
});
/* harmony default export */ var locale_hu_HU = (hu_HU_locale);
;// ./components/time-picker/locale/hu_HU.ts
const locale_hu_HU_locale = {
placeholder: 'Válasszon időt'
};
/* harmony default export */ var time_picker_locale_hu_HU = (locale_hu_HU_locale);
;// ./components/date-picker/locale/hu_HU.ts
// Merge into a locale object
const date_picker_locale_hu_HU_locale = {
lang: Object.assign({
placeholder: 'Válasszon dátumot',
rangePlaceholder: ['Kezdő dátum', 'Befejezés dátuma']
}, locale_hu_HU),
timePickerLocale: Object.assign({}, time_picker_locale_hu_HU)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_hu_HU = (date_picker_locale_hu_HU_locale);
;// ./components/calendar/locale/hu_HU.ts
/* harmony default export */ var calendar_locale_hu_HU = (date_picker_locale_hu_HU);
;// ./components/locale/hu_HU.ts
const localeValues = {
locale: 'hu',
Pagination: hu_HU,
DatePicker: date_picker_locale_hu_HU,
TimePicker: time_picker_locale_hu_HU,
Calendar: calendar_locale_hu_HU,
Table: {
filterTitle: 'Szűrők',
filterConfirm: 'Alkalmazás',
filterReset: 'Visszaállítás',
selectAll: 'Jelenlegi oldal kiválasztása',
selectInvert: 'Jelenlegi oldal inverze',
sortTitle: 'Rendezés'
},
Modal: {
okText: 'Alkalmazás',
cancelText: 'Visszavonás',
justOkText: 'Alkalmazás'
},
Popconfirm: {
okText: 'Alkalmazás',
cancelText: 'Visszavonás'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Keresés',
itemUnit: 'elem',
itemsUnit: 'elemek'
},
Upload: {
uploading: 'Feltöltés...',
removeFile: 'Fájl eltávolítása',
uploadError: 'Feltöltési hiba',
previewFile: 'Fájl előnézet',
downloadFile: 'Fájl letöltése'
},
Empty: {
description: 'Nincs adat'
}
};
/* harmony default export */ var components_locale_hu_HU = (localeValues);
/***/ }),
/***/ "./components/locale/hy_AM.ts":
/*!************************************!*\
!*** ./components/locale/hy_AM.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
const datePickerLocale = {
lang: {
locale: 'hy-am',
placeholder: 'Ընտրեք ամսաթիվը',
rangePlaceholder: ['Մեկնարկի ամսաթիվ', 'Ավարտի ամսաթիվը'],
today: 'Այսօր',
now: 'Հիմա',
backToToday: 'Վերադառնալ այսօր',
ok: 'Օկ',
clear: 'Մաքրել',
week: 'Շաբաթ',
month: 'Ամիս',
year: 'Տարի',
timeSelect: 'ընտրեք ժամը',
dateSelect: 'ընտրեք ամսաթիվը',
weekSelect: 'Ընտրեք շաբաթը',
monthSelect: 'Ընտրեք ամիսը',
yearSelect: 'Ընտրեք տարին',
decadeSelect: 'Ընտրեք տասնամյակը',
yearFormat: 'YYYY',
dayFormat: 'DD',
monthBeforeYear: true,
previousMonth: 'Անցած ամիս (PageUp)',
nextMonth: 'Մյուս ամիս (PageDown)',
previousYear: 'Անցած տարի (Control + left)',
nextYear: 'Մյուս տարի (Control + right)',
previousDecade: 'Անցած տասնամյակ',
nextDecade: 'Մյուս տասնամյակ',
previousCentury: 'Անցած դար',
nextCentury: 'Մյուս դար'
},
timePickerLocale: {
placeholder: 'Ընտրեք ժամը'
}
};
const localeValues = {
locale: 'hy-am',
Pagination: {
// Options.jsx
items_per_page: '/ էջ',
jump_to: 'Գնալ',
jump_to_confirm: 'հաստատել',
page: '',
// Pagination.jsx
prev_page: 'Նախորդ Էջ',
next_page: 'Հաջորդ Էջ',
prev_5: 'Նախորդ 5 Էջերը',
next_5: 'Հաջորդ 5 Էջերը',
prev_3: 'Նախորդ 3 Էջերը',
next_3: 'Հաջորդ 3 Էջերը'
},
DatePicker: datePickerLocale,
TimePicker: {
placeholder: 'Ընտրեք ժամը'
},
Calendar: datePickerLocale,
global: {
placeholder: 'Ընտրեք'
},
Table: {
filterTitle: 'ֆիլտրի ընտրացանկ',
filterConfirm: 'ֆիլտրել',
filterReset: 'Զրոյացնել',
selectAll: 'Ընտրեք ընթացիկ էջը',
selectInvert: 'Փոխարկել ընթացիկ էջը',
sortTitle: 'Տեսակավորել',
expand: 'Ընդլայնեք տողը',
collapse: 'Կրճատել տողը'
},
Modal: {
okText: 'Օկ',
cancelText: 'Չեղարկել',
justOkText: 'Օկ'
},
Popconfirm: {
okText: 'Հաստատել',
cancelText: 'Մերժել'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Որոնեք այստեղ',
itemUnit: 'պարագան',
itemsUnit: 'պարագաները'
},
Upload: {
uploading: 'Ներբեռնում...',
removeFile: 'Հեռացնել ֆայլը',
uploadError: 'Ներբեռնման սխալ',
previewFile: 'Դիտել ֆայլը',
downloadFile: 'Ներբեռնել ֆայլը'
},
Empty: {
description: 'Տվյալներ չկան'
},
Icon: {
icon: 'պատկեր'
},
Text: {
edit: 'Խմբագրել',
copy: 'Պատճենել',
copied: 'Պատճենվել է',
expand: 'Տեսնել ավելին'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/locale/id_ID.ts":
/*!************************************************!*\
!*** ./components/locale/id_ID.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_id_ID; }
});
;// ./node_modules/rc-pagination/es/locale/id_ID.js
var locale = {
// Options
items_per_page: '/ halaman',
jump_to: 'Menuju',
jump_to_confirm: 'konfirmasi',
page: 'Halaman',
// Pagination
prev_page: 'Halaman Sebelumnya',
next_page: 'Halaman Berikutnya',
prev_5: '5 Halaman Sebelumnya',
next_5: '5 Halaman Berikutnya',
prev_3: '3 Halaman Sebelumnya',
next_3: '3 Halaman Berikutnya',
page_size: 'ukuran halaman'
};
/* harmony default export */ var id_ID = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/id_ID.js
var id_ID_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'id_ID',
today: 'Hari ini',
now: 'Sekarang',
backToToday: 'Kembali ke hari ini',
ok: 'Baik',
clear: 'Bersih',
week: 'Minggu',
month: 'Bulan',
year: 'Tahun',
timeSelect: 'pilih waktu',
dateSelect: 'pilih tanggal',
weekSelect: 'Pilih satu minggu',
monthSelect: 'Pilih satu bulan',
yearSelect: 'Pilih satu tahun',
decadeSelect: 'Pilih satu dekade',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Bulan sebelumnya (PageUp)',
nextMonth: 'Bulan selanjutnya (PageDown)',
previousYear: 'Tahun lalu (Control + kiri)',
nextYear: 'Tahun selanjutnya (Kontrol + kanan)',
previousDecade: 'Dekade terakhir',
nextDecade: 'Dekade berikutnya',
previousCentury: 'Abad terakhir',
nextCentury: 'Abad berikutnya'
});
/* harmony default export */ var locale_id_ID = (id_ID_locale);
;// ./components/time-picker/locale/id_ID.ts
const locale_id_ID_locale = {
placeholder: 'Pilih waktu',
rangePlaceholder: ['Waktu awal', 'Waktu akhir']
};
/* harmony default export */ var time_picker_locale_id_ID = (locale_id_ID_locale);
;// ./components/date-picker/locale/id_ID.ts
// Merge into a locale object
const date_picker_locale_id_ID_locale = {
lang: Object.assign({
placeholder: 'Pilih tanggal',
yearPlaceholder: 'Pilih tahun',
quarterPlaceholder: 'Pilih kuartal',
monthPlaceholder: 'Pilih bulan',
weekPlaceholder: 'Pilih minggu',
rangePlaceholder: ['Tanggal awal', 'Tanggal akhir'],
rangeYearPlaceholder: ['Tahun awal', 'Tahun akhir'],
rangeQuarterPlaceholder: ['Kuartal awal', 'Kuartal akhir'],
rangeMonthPlaceholder: ['Bulan awal', 'Bulan akhir'],
rangeWeekPlaceholder: ['Minggu awal', 'Minggu akhir']
}, locale_id_ID),
timePickerLocale: Object.assign({}, time_picker_locale_id_ID)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_id_ID = (date_picker_locale_id_ID_locale);
;// ./components/calendar/locale/id_ID.ts
/* harmony default export */ var calendar_locale_id_ID = (date_picker_locale_id_ID);
;// ./components/locale/id_ID.ts
const typeTemplate = '${label} tidak valid ${type}';
const localeValues = {
locale: 'id',
Pagination: id_ID,
DatePicker: date_picker_locale_id_ID,
TimePicker: time_picker_locale_id_ID,
Calendar: calendar_locale_id_ID,
global: {
placeholder: 'Silahkan pilih'
},
Table: {
filterTitle: 'Menu filter',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'Tidak ada filter',
filterCheckAll: 'Pilih semua item',
filterSearchPlaceholder: 'Cari di filter',
emptyText: 'Tidak ada data',
selectAll: 'Pilih halaman saat ini',
selectInvert: 'Balikkan halaman saat ini',
selectNone: 'Hapus semua data',
selectionAll: 'Pilih semua data',
sortTitle: 'Urutkan',
expand: 'Perluas baris',
collapse: 'Perkecil baris',
triggerDesc: 'Klik untuk mengurutkan secara menurun',
triggerAsc: 'Klik untuk mengurutkan secara menaik',
cancelSort: 'Klik untuk membatalkan pengurutan'
},
Tour: {
Next: 'Selanjutnya',
Previous: 'Sebelumnya',
Finish: 'Selesai'
},
Modal: {
okText: 'OK',
cancelText: 'Batal',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Batal'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Cari di sini',
itemUnit: 'data',
itemsUnit: 'data',
remove: 'Hapus',
selectCurrent: 'Pilih halaman saat ini',
removeCurrent: 'Hapus halaman saat ini',
selectAll: 'Pilih semua data',
deselectAll: 'Batal pilih semua data',
removeAll: 'Hapus semua data',
selectInvert: 'Balikkan halaman saat ini'
},
Upload: {
uploading: 'Mengunggah...',
removeFile: 'Hapus file',
uploadError: 'Kesalahan pengunggahan',
previewFile: 'Pratinjau file',
downloadFile: 'Unduh file'
},
Empty: {
description: 'Tidak ada data'
},
Icon: {
icon: 'ikon'
},
Text: {
edit: 'Ubah',
copy: 'Salin',
copied: 'Disalin',
expand: 'Perluas',
collapse: 'Perkecil'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: 'Kesalahan validasi untuk ${label}',
required: 'Tolong masukkan ${label}',
enum: '${label} harus menjadi salah satu dari [${enum}]',
whitespace: '${label} tidak boleh berupa karakter kosong',
date: {
format: '${label} format tanggal tidak valid',
parse: '${label} tidak dapat diubah menjadi tanggal',
invalid: '${label} adalah tanggal yang tidak valid'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} harus berupa ${len} karakter',
min: '${label} harus minimal ${min} karakter',
max: '${label} harus maksimal ${max} karakter',
range: '${label} harus diantara ${min}-${max} karakter'
},
number: {
len: '${label} harus sama dengan ${len}',
min: '${label} harus minimal ${min}',
max: '${label} harus maksimal ${max}',
range: '${label} harus di antara ${min}-${max}'
},
array: {
len: 'Harus ${len} ${label}',
min: 'Minimal ${min} ${label}',
max: 'Maksimal ${max} ${label}',
range: 'Jumlah ${label} harus di antara ${min}-${max}'
},
pattern: {
mismatch: '${label} tidak sesuai dengan pola ${pattern}'
}
}
},
Image: {
preview: 'Pratinjau'
},
QRCode: {
expired: 'Kode QR sudah habis masa berlakunya',
refresh: 'Segarkan',
scanned: 'Dipindai'
},
ColorPicker: {
presetEmpty: 'Kosong',
transparent: 'Transparan',
singleColor: 'Warna tunggal',
gradientColor: 'Warna gradien'
}
};
/* harmony default export */ var components_locale_id_ID = (localeValues);
/***/ }),
/***/ "./components/locale/is_IS.ts":
/*!************************************************!*\
!*** ./components/locale/is_IS.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_is_IS; }
});
;// ./node_modules/rc-pagination/es/locale/is_IS.js
var locale = {
// Options
items_per_page: '/ síðu',
jump_to: 'Síða',
jump_to_confirm: 'staðfest',
page: '',
// Pagination
prev_page: 'Fyrri síða',
next_page: 'Næsta síða',
prev_5: 'Til baka 5 síður',
next_5: 'Áfram 5 síður',
prev_3: 'Til baka 3 síður',
next_3: 'Áfram 3 síður',
page_size: 'Page Size'
};
/* harmony default export */ var is_IS = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/is_IS.js
var is_IS_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'is_IS',
today: 'Í dag',
now: 'Núna',
backToToday: 'Til baka til dagsins í dag',
ok: 'Í lagi',
clear: 'Hreinsa',
week: 'Vika',
month: 'Mánuður',
year: 'Ár',
timeSelect: 'Velja tíma',
dateSelect: 'Velja dag',
monthSelect: 'Velja mánuð',
yearSelect: 'Velja ár',
decadeSelect: 'Velja áratug',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Fyrri mánuður (PageUp)',
nextMonth: 'Næsti mánuður (PageDown)',
previousYear: 'Fyrra ár (Control + left)',
nextYear: 'Næsta ár (Control + right)',
previousDecade: 'Fyrri áratugur',
nextDecade: 'Næsti áratugur',
previousCentury: 'Fyrri öld',
nextCentury: 'Næsta öld'
});
/* harmony default export */ var locale_is_IS = (is_IS_locale);
;// ./components/time-picker/locale/is_IS.ts
const locale_is_IS_locale = {
placeholder: 'Velja tíma'
};
/* harmony default export */ var time_picker_locale_is_IS = (locale_is_IS_locale);
;// ./components/date-picker/locale/is_IS.ts
// Merge into a locale object
const date_picker_locale_is_IS_locale = {
lang: Object.assign({
placeholder: 'Veldu dag',
rangePlaceholder: ['Upphafsdagur', 'Lokadagur']
}, locale_is_IS),
timePickerLocale: Object.assign({}, time_picker_locale_is_IS)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_is_IS = (date_picker_locale_is_IS_locale);
;// ./components/calendar/locale/is_IS.ts
/* harmony default export */ var calendar_locale_is_IS = (date_picker_locale_is_IS);
;// ./components/locale/is_IS.ts
const typeTemplate = '${label} er ekki gilt ${type}';
const localeValues = {
locale: 'is',
Pagination: is_IS,
DatePicker: date_picker_locale_is_IS,
TimePicker: time_picker_locale_is_IS,
Calendar: calendar_locale_is_IS,
Table: {
filterTitle: 'Afmarkanir',
filterConfirm: 'Staðfesta',
filterReset: 'Núllstilla',
selectAll: 'Velja allt',
selectInvert: 'Viðsnúa vali'
},
Modal: {
okText: 'Áfram',
cancelText: 'Hætta við',
justOkText: 'Í lagi'
},
Popconfirm: {
okText: 'Áfram',
cancelText: 'Hætta við'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Leita hér',
itemUnit: 'færsla',
itemsUnit: 'færslur'
},
Upload: {
uploading: 'Hleð upp...',
removeFile: 'Fjarlægja skrá',
uploadError: 'Villa við að hlaða upp',
previewFile: 'Forskoða skrá',
downloadFile: 'Hlaða niður skrá'
},
Empty: {
description: 'Engin gögn'
},
Form: {
optional: '(Valfrjálst)',
defaultValidateMessages: {
default: 'Villa við staðfestingu reits ${label}',
required: 'gjörðu svo vel að koma inn ${label}',
enum: '${label} verður að vera einn af [${enum}]',
whitespace: '${label} getur ekki verið tómur stafur',
date: {
format: '${label} dagsetningarsnið er ógilt',
parse: 'Ekki er hægt að breyta ${label} í dag',
invalid: '${label} er ógild dagsetning'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} verður að vera ${len} stafir',
min: '${label} er að minnsta kosti ${min} stafir að lengd',
max: '${label} getur verið allt að ${max} stafir',
range: '${label} verður að vera á milli ${min}-${max} stafir'
},
number: {
len: '${label} verður að vera jafngildi ${len}',
min: 'Lágmarksgildi ${label} er ${mín}',
max: 'Hámarksgildi ${label} er ${max}',
range: '${label} verður að vera á milli ${min}-${max}'
},
array: {
len: 'Verður að vera ${len}${label}',
min: 'Að minnsta kosti ${min}${label}',
max: 'Í mesta lagi ${max}${label}',
range: 'Magn ${label} verður að vera á milli ${min}-${max}'
},
pattern: {
mismatch: '${label} passar ekki við mynstur ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_is_IS = (localeValues);
/***/ }),
/***/ "./components/locale/it_IT.ts":
/*!************************************************!*\
!*** ./components/locale/it_IT.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_it_IT; }
});
;// ./node_modules/rc-pagination/es/locale/it_IT.js
var locale = {
// Options
items_per_page: '/ pagina',
jump_to: 'vai a',
jump_to_confirm: 'Conferma',
page: 'Pagina',
// Pagination
prev_page: 'Pagina precedente',
next_page: 'Pagina successiva',
prev_5: 'Precedente 5 pagine',
next_5: 'Prossime 5 pagine',
prev_3: 'Precedente 3 pagine',
next_3: 'Prossime 3 pagine',
page_size: 'dimensioni della pagina'
};
/* harmony default export */ var it_IT = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/it_IT.js
var it_IT_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'it_IT',
today: 'Oggi',
now: 'Adesso',
backToToday: 'Torna ad oggi',
ok: 'OK',
clear: 'Cancella',
week: 'Settimana',
month: 'Mese',
year: 'Anno',
timeSelect: "Seleziona l'ora",
dateSelect: 'Seleziona la data',
monthSelect: 'Seleziona il mese',
yearSelect: "Seleziona l'anno",
decadeSelect: 'Seleziona il decennio',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Il mese scorso (PageUp)',
nextMonth: 'Il prossimo mese (PageDown)',
previousYear: "L'anno scorso (Control + sinistra)",
nextYear: "L'anno prossimo (Control + destra)",
previousDecade: 'Ultimo decennio',
nextDecade: 'Prossimo decennio',
previousCentury: 'Secolo precedente',
nextCentury: 'Prossimo secolo'
});
/* harmony default export */ var locale_it_IT = (it_IT_locale);
;// ./components/time-picker/locale/it_IT.ts
const locale_it_IT_locale = {
placeholder: "Selezionare l'orario",
rangePlaceholder: ['Inizio orario', 'Fine orario']
};
/* harmony default export */ var time_picker_locale_it_IT = (locale_it_IT_locale);
;// ./components/date-picker/locale/it_IT.ts
// Merge into a locale object
const date_picker_locale_it_IT_locale = {
lang: Object.assign({
placeholder: 'Selezionare la data',
rangePlaceholder: ["Data d'inizio", 'Data di fine']
}, locale_it_IT),
timePickerLocale: Object.assign({}, time_picker_locale_it_IT)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_it_IT = (date_picker_locale_it_IT_locale);
;// ./components/calendar/locale/it_IT.ts
/* harmony default export */ var calendar_locale_it_IT = (date_picker_locale_it_IT);
;// ./components/locale/it_IT.ts
const typeTemplate = ' ${label} non è un ${type} valido';
const localeValues = {
locale: 'it',
Pagination: it_IT,
DatePicker: date_picker_locale_it_IT,
TimePicker: time_picker_locale_it_IT,
Calendar: calendar_locale_it_IT,
global: {
placeholder: 'Selezionare'
},
Table: {
filterTitle: 'Menù Filtro',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'Senza filtri',
filterCheckAll: 'Seleziona tutti',
filterSearchPlaceholder: 'Cerca nei filtri',
emptyText: 'Senza dati',
selectAll: 'Seleziona pagina corrente',
selectInvert: 'Inverti selezione nella pagina corrente',
selectNone: 'Deseleziona tutto',
selectionAll: 'Seleziona tutto',
sortTitle: 'Ordina',
expand: 'Espandi riga',
collapse: 'Comprimi riga ',
triggerDesc: 'Clicca per ordinare in modo discendente',
triggerAsc: 'Clicca per ordinare in modo ascendente',
cancelSort: "Clicca per eliminare l'ordinamento"
},
Tour: {
Next: 'Successivo',
Previous: 'Precedente',
Finish: 'Termina'
},
Modal: {
okText: 'OK',
cancelText: 'Annulla',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annulla'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Cerca qui',
itemUnit: 'elemento',
itemsUnit: 'elementi',
remove: 'Elimina',
selectCurrent: 'Seleziona la pagina corrente',
removeCurrent: 'Rimuovi la pagina corrente',
selectAll: 'Seleziona tutti i dati',
removeAll: 'Rimuovi tutti i dati',
selectInvert: 'Inverti la pagina corrente'
},
Upload: {
uploading: 'Caricamento...',
removeFile: 'Rimuovi il file',
uploadError: 'Errore di caricamento',
previewFile: 'Anteprima file',
downloadFile: 'Scarica file'
},
Empty: {
description: 'Nessun dato'
},
Icon: {
icon: 'icona'
},
Text: {
edit: 'modifica',
copy: 'copia',
copied: 'copia effettuata',
expand: 'espandi'
},
Form: {
optional: '(opzionale)',
defaultValidateMessages: {
default: 'Errore di convalida del campo ${label}',
required: 'Si prega di inserire ${label}',
enum: '${label} deve essere uno di [${enum}]',
whitespace: '${label} non può essere un carattere vuoto',
date: {
format: 'Il formato della data ${label} non è valido',
parse: '${label} non può essere convertito in una data',
invalid: '${label} non è una data valida'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} deve avere ${len} caratteri',
min: '${label} deve contenere almeno ${min} caratteri',
max: '${label} deve contenere fino a ${max} caratteri',
range: '${label} deve contenere tra ${min}-${max} caratteri'
},
number: {
len: '${label} deve essere uguale a ${len}',
min: '${label} valore minimo è ${min}',
max: '${label} valor e massimo è ${max}',
range: '${label} deve essere compreso tra ${min}-${max}'
},
array: {
len: 'Deve essere ${len} ${label}',
min: 'Almeno ${min} ${label}',
max: 'Massimo ${max} ${label}',
range: 'Il totale di ${label} deve essere compreso tra ${min}-${max}'
},
pattern: {
mismatch: '${label} non corrisponde al modello ${pattern}'
}
}
},
Image: {
preview: 'Anteprima'
}
};
/* harmony default export */ var components_locale_it_IT = (localeValues);
/***/ }),
/***/ "./components/locale/ja_JP.ts":
/*!************************************************!*\
!*** ./components/locale/ja_JP.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ja_JP; }
});
;// ./node_modules/rc-pagination/es/locale/ja_JP.js
var locale = {
// Options
items_per_page: '件 / ページ',
jump_to: '移動',
jump_to_confirm: '確認する',
page: 'ページ',
// Pagination
prev_page: '前のページ',
next_page: '次のページ',
prev_5: '前 5ページ',
next_5: '次 5ページ',
prev_3: '前 3ページ',
next_3: '次 3ページ',
page_size: 'ページサイズ'
};
/* harmony default export */ var ja_JP = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ja_JP.js
var ja_JP_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ja_JP',
today: '今日',
now: '現在時刻',
backToToday: '今日に戻る',
ok: '確定',
timeSelect: '時間を選択',
dateSelect: '日時を選択',
weekSelect: '週を選択',
clear: 'クリア',
week: '週',
month: '月',
year: '年',
previousMonth: '前月 (ページアップキー)',
nextMonth: '翌月 (ページダウンキー)',
monthSelect: '月を選択',
yearSelect: '年を選択',
decadeSelect: '年代を選択',
yearFormat: 'YYYY年',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒',
previousYear: '前年 (Controlを押しながら左キー)',
nextYear: '翌年 (Controlを押しながら右キー)',
previousDecade: '前の年代',
nextDecade: '次の年代',
previousCentury: '前の世紀',
nextCentury: '次の世紀',
monthBeforeYear: false
});
/* harmony default export */ var locale_ja_JP = (ja_JP_locale);
;// ./components/time-picker/locale/ja_JP.ts
const locale_ja_JP_locale = {
placeholder: '時間を選択',
rangePlaceholder: ['開始時間', '終了時間']
};
/* harmony default export */ var time_picker_locale_ja_JP = (locale_ja_JP_locale);
;// ./components/date-picker/locale/ja_JP.ts
// Merge into a locale object
const date_picker_locale_ja_JP_locale = {
lang: Object.assign({
placeholder: '日付を選択',
yearPlaceholder: '年を選択',
quarterPlaceholder: '四半期を選択',
monthPlaceholder: '月を選択',
weekPlaceholder: '週を選択',
rangePlaceholder: ['開始日付', '終了日付'],
rangeYearPlaceholder: ['開始年', '終了年'],
rangeMonthPlaceholder: ['開始月', '終了月'],
rangeQuarterPlaceholder: ['開始四半期', '終了四半期'],
rangeWeekPlaceholder: ['開始週', '終了週'],
shortWeekDays: ['日', '月', '火', '水', '木', '金', '土'],
shortMonths: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
}, locale_ja_JP),
timePickerLocale: Object.assign({}, time_picker_locale_ja_JP)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ja_JP = (date_picker_locale_ja_JP_locale);
;// ./components/calendar/locale/ja_JP.ts
/* harmony default export */ var calendar_locale_ja_JP = (date_picker_locale_ja_JP);
;// ./components/locale/ja_JP.ts
const typeTemplate = '${label}は有効な${type}ではありません';
const localeValues = {
locale: 'ja',
Pagination: ja_JP,
DatePicker: date_picker_locale_ja_JP,
TimePicker: time_picker_locale_ja_JP,
Calendar: calendar_locale_ja_JP,
global: {
placeholder: '選んでください'
},
Table: {
filterTitle: 'フィルター',
filterConfirm: 'OK',
filterReset: 'リセット',
filterEmptyText: 'フィルターなし',
filterCheckAll: 'すべてを選択',
filterSearchPlaceholder: 'フィルターで検索',
emptyText: 'データなし',
selectAll: 'ページ単位で選択',
selectInvert: 'ページ単位で反転',
selectNone: 'クリア',
selectionAll: 'すべてを選択',
sortTitle: 'ソート',
expand: '展開する',
collapse: '折り畳む',
triggerDesc: 'クリックで降順にソート',
triggerAsc: 'クリックで昇順にソート',
cancelSort: 'ソートをキャンセル'
},
Tour: {
Next: '次',
Previous: '前の',
Finish: '仕上げる'
},
Modal: {
okText: 'OK',
cancelText: 'キャンセル',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'キャンセル'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'ここを検索',
itemUnit: 'アイテム',
itemsUnit: 'アイテム',
remove: '削除',
selectCurrent: '現在のページを選択',
removeCurrent: '現在のページを削除',
selectAll: 'ページ単位で選択',
deselectAll: 'すべてのデータの選択を解除する',
removeAll: 'ページ単位で削除',
selectInvert: 'ページ単位で反転'
},
Upload: {
uploading: 'アップロード中...',
removeFile: 'ファイルを削除',
uploadError: 'アップロードエラー',
previewFile: 'ファイルをプレビュー',
downloadFile: 'ダウンロードファイル'
},
Empty: {
description: 'データがありません'
},
Icon: {
icon: 'アイコン'
},
Text: {
edit: '編集',
copy: 'コピー',
copied: 'コピーされました',
expand: '拡大する',
collapse: '崩壊'
},
Form: {
optional: '(オプション)',
defaultValidateMessages: {
default: '${label}のフィールド検証エラー',
required: '${label}を入力してください',
enum: '${label}は[${enum}]のいずれかである必要があります',
whitespace: '${label}は空白文字にすることはできません',
date: {
format: '${label}の日付形式は不正です',
parse: '${label}は日付に変換できません',
invalid: '${label}は不正な日付です'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}は${len}文字である必要があります',
min: '${label}は${min}文字以上である必要があります',
max: '${label}は${max}文字以下である必要があります',
range: '${label}は${min}-${max}文字の範囲である必要があります'
},
number: {
len: '${label}は${len}と等しい必要があります',
min: '${label}の最小値は${min}です',
max: '${label}の最大値は${max}です',
range: '${label}は${min}-${max}の範囲である必要があります'
},
array: {
len: '${label}は${len}である必要があります',
min: '${label}の最小は${min}です',
max: '${label}の最大は${max}です',
range: '${label}の合計は${min}-${max}の範囲である必要があります'
},
pattern: {
mismatch: '${label}はパターン${pattern}と一致しません'
}
}
},
Image: {
preview: 'プレビュー'
},
QRCode: {
expired: 'QRコードの有効期限が切れました',
refresh: 'リフレッシュ',
scanned: 'スキャン済み'
},
ColorPicker: {
presetEmpty: '空の',
transparent: '透明',
singleColor: '単色',
gradientColor: 'グラデーション'
}
};
/* harmony default export */ var components_locale_ja_JP = (localeValues);
/***/ }),
/***/ "./components/locale/ka_GE.ts":
/*!************************************************!*\
!*** ./components/locale/ka_GE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ka_GE; }
});
;// ./node_modules/rc-pagination/es/locale/ka_GE.js
var locale = {
// Options
items_per_page: '/ გვერდი.',
jump_to: 'გადასვლა',
jump_to_confirm: 'დადასტურება',
page: '',
// Pagination
prev_page: 'წინა გვერდი',
next_page: 'შემდეგი გვერდი',
prev_5: 'წინა 5 გვერდი',
next_5: 'შემდეგი 5 გვერდი',
prev_3: 'წინა 3 გვერდი',
next_3: 'შემდეგი 3 გვერდი',
page_size: 'Page Size'
};
/* harmony default export */ var ka_GE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ka_GE.js
var ka_GE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ka_GE',
today: 'დღეს',
now: 'ახლა',
backToToday: 'მიმდინარე თარიღი',
ok: 'OK',
clear: 'გასუფთავება',
week: 'კვირა',
month: 'თვე',
year: 'წელი',
timeSelect: 'დროის არჩევა',
dateSelect: 'თარიღის არჩევა',
weekSelect: 'კვირის არჩევა',
monthSelect: 'თვის არჩევა',
yearSelect: 'წლის არჩევა',
decadeSelect: 'ათწლეულის არჩევა',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'წინა თვე (PageUp)',
nextMonth: 'მომდევნო თვე (PageDown)',
previousYear: 'წინა წელი (Control + left)',
nextYear: 'მომდევნო წელი (Control + right)',
previousDecade: 'წინა ათწლეული',
nextDecade: 'მომდევნო ათწლეული',
previousCentury: 'გასული საუკუნე',
nextCentury: 'მომდევნო საუკუნე'
});
/* harmony default export */ var locale_ka_GE = (ka_GE_locale);
;// ./components/time-picker/locale/ka_GE.ts
const locale_ka_GE_locale = {
placeholder: 'აირჩიეთ დრო',
rangePlaceholder: ['საწყისი თარიღი', 'საბოლოო თარიღი']
};
/* harmony default export */ var time_picker_locale_ka_GE = (locale_ka_GE_locale);
;// ./components/date-picker/locale/ka_GE.ts
const date_picker_locale_ka_GE_locale = {
lang: Object.assign({
placeholder: 'აირჩიეთ თარიღი',
yearPlaceholder: 'აირჩიეთ წელი',
quarterPlaceholder: 'აირჩიეთ მეოთხედი',
monthPlaceholder: 'აირჩიეთ თვე',
weekPlaceholder: 'აირჩიეთ კვირა',
rangePlaceholder: ['საწყისი თარიღი', 'საბოლოო თარიღი'],
rangeYearPlaceholder: ['საწყისი წელი', 'საბოლოო წელი'],
rangeMonthPlaceholder: ['საწყისი თვე', 'საბოლოო თვე'],
rangeWeekPlaceholder: ['საწყისი კვირა', 'საბოლოო კვირა']
}, locale_ka_GE),
timePickerLocale: Object.assign({}, time_picker_locale_ka_GE)
};
/* harmony default export */ var date_picker_locale_ka_GE = (date_picker_locale_ka_GE_locale);
;// ./components/calendar/locale/ka_GE.ts
/* harmony default export */ var calendar_locale_ka_GE = (date_picker_locale_ka_GE);
;// ./components/locale/ka_GE.ts
const typeTemplate = '${label} არ არის სწორი ${type}';
const localeValues = {
locale: 'ka',
Pagination: ka_GE,
DatePicker: date_picker_locale_ka_GE,
TimePicker: time_picker_locale_ka_GE,
Calendar: calendar_locale_ka_GE,
global: {
placeholder: 'გთხოვთ აირჩიოთ'
},
Table: {
filterTitle: 'ფილტრის მენიუ',
filterConfirm: 'კარგი',
filterReset: 'გასუფთავება',
filterEmptyText: 'ფილტრები არაა',
emptyText: 'ინფორმაცია არაა',
selectAll: 'აირჩიეთ მიმდინარე გვერდი',
selectInvert: 'შეაბრუნეთ მიმდინარე გვერდი',
selectNone: 'მონაცემების გასუფთავება',
selectionAll: 'ყველას მონიშვნა',
sortTitle: 'დალაგება',
expand: 'სტრიქონის გაშლა',
collapse: 'სტრიქონის შეკუმშვა',
triggerDesc: 'დაღმავალი დალაგება',
triggerAsc: 'აღმავალი დალაგება',
cancelSort: 'დალაგების გაუქმება'
},
Modal: {
okText: 'კარგი',
cancelText: 'გაუქმება',
justOkText: 'ოკ'
},
Popconfirm: {
okText: 'კარგი',
cancelText: 'გაუქმება'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'მოძებნე აქ',
itemUnit: 'ერთეული',
itemsUnit: 'ერთეულები',
remove: 'ამოშლა',
selectCurrent: 'მიმდინარე გვერდის არჩევა',
removeCurrent: 'მიმდინარე გვერდის ამოშლა',
selectAll: 'ყველას მონიშვნა',
removeAll: 'ყველას წაშლა',
selectInvert: 'მიმდინარე გვერდის შებრუნება'
},
Upload: {
uploading: 'იტვირთება...',
removeFile: 'ფაილის ამოშლა',
uploadError: 'ატვირთვის შეცდომა',
previewFile: 'ფაილის გადახედვა',
downloadFile: 'ფაილის ჩამოტვირთვა'
},
Empty: {
description: 'ინფორმაცია არაა'
},
Icon: {
icon: 'ხატულა'
},
Text: {
edit: 'რედაქტირება',
copy: 'ასლი',
copied: 'ასლი აღებულია',
expand: 'გაშლა'
},
Form: {
optional: '(არასავალდებულო)',
defaultValidateMessages: {
default: 'ველის შემოწმების შეცდომა ${label}-ისთვის',
required: 'გთხოვთ შეიყვანეთ ${label}',
enum: '${label} უნდა იყოს ერთ-ერთი [${enum}]-დან',
whitespace: '${label} არ შეიძლება იყოს ცარიელი სიმბოლო',
date: {
format: '${label} თარიღის ფორმატი არასწორია',
parse: '${label} თარიღში კონვერტირება არ არის შესაძლებელი',
invalid: '${label} არასწორი თარიღია'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} უნდა იყოს ${len} სიმბოლო',
min: '${label} უნდა იყოს სულ მცირე ${min} სიმბოლო',
max: '${label} უნდა იყოს მაქსიმუმ ${max} სიმბოლო',
range: '${label} უნდა იყოს ${min}-${max} სიმბოლოს შორის'
},
number: {
len: '${label} უნდა იყოს ${len} ტოლი',
min: '${label} უნდა იყოს მინუმიმ ${min}',
max: '${label} უნდა იყოს მაქსიმუმ ${max}',
range: '${label} უნდა იყოს ${min}-${max} შორის'
},
array: {
len: 'უნდა იყოს ${len} ${label}',
min: 'სულ მცირე ${min} ${label}',
max: 'არაუმეტეს ${max} ${label}',
range: '${label}-ის რაოდენობა უნდა იყოს ${min}-${max} შორის'
},
pattern: {
mismatch: '${label} არ ერგება შაბლონს ${pattern}'
}
}
},
Image: {
preview: 'გადახედვა'
}
};
/* harmony default export */ var components_locale_ka_GE = (localeValues);
/***/ }),
/***/ "./components/locale/kk_KZ.ts":
/*!************************************************!*\
!*** ./components/locale/kk_KZ.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_kk_KZ; }
});
;// ./node_modules/rc-pagination/es/locale/kk_KZ.js
var locale = {
// Options
items_per_page: '/ бет',
jump_to: 'Секіру',
jump_to_confirm: 'Растау',
page: '',
// Pagination
prev_page: 'Артқа',
next_page: 'Алға',
prev_5: 'Алдыңғы 5',
next_5: 'Келесі 5',
prev_3: 'Алдыңғы 3',
next_3: 'Келесі 3',
page_size: 'Page Size'
};
/* harmony default export */ var kk_KZ = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/kk_KZ.js
var kk_KZ_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'kk_KZ',
today: 'Бүгін',
now: 'Қазір',
backToToday: 'Ағымдағы күн',
ok: 'Таңдау',
clear: 'Таза',
week: 'Апта',
month: 'Ай',
year: 'Жыл',
timeSelect: 'Уақытты таңдау',
dateSelect: 'Күнді таңдау',
monthSelect: 'Айды таңдаңыз',
yearSelect: 'Жылды таңдаңыз',
decadeSelect: 'Онжылды таңдаңыз',
dateFormat: 'D-M-YYYY',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
previousMonth: 'Алдыңғы ай (PageUp)',
nextMonth: 'Келесі ай (PageDown)',
previousYear: 'Алдыңғы жыл (Control + left)',
nextYear: 'Келесі жыл (Control + right)',
previousDecade: 'Алдыңғы онжылдық',
nextDecade: 'Келесі онжылдық',
previousCentury: 'Алдыңғы ғасыр',
nextCentury: 'Келесі ғасыр'
});
/* harmony default export */ var locale_kk_KZ = (kk_KZ_locale);
;// ./components/time-picker/locale/kk_KZ.ts
const locale_kk_KZ_locale = {
placeholder: 'Уақытты таңдаңыз',
rangePlaceholder: ['Бастау уақыты', 'Аяқталу уақыты']
};
/* harmony default export */ var time_picker_locale_kk_KZ = (locale_kk_KZ_locale);
;// ./components/date-picker/locale/kk_KZ.ts
// Merge into a locale object
const date_picker_locale_kk_KZ_locale = {
lang: Object.assign({
placeholder: 'Күнді таңдаңыз',
yearPlaceholder: 'Жылды таңдаңыз',
quarterPlaceholder: 'Тоқсанды таңдаңыз',
monthPlaceholder: 'Айды таңдаңыз',
weekPlaceholder: 'Аптаны таңдаңыз',
rangePlaceholder: ['Бастау күні', 'Аяқталу күні'],
rangeYearPlaceholder: ['Бастау жылы', 'Аяқталу жылы'],
rangeMonthPlaceholder: ['Бастау айы', 'Аяқталу айы'],
rangeWeekPlaceholder: ['Бастау апта', 'Аяқталу апта']
}, locale_kk_KZ),
timePickerLocale: Object.assign({}, time_picker_locale_kk_KZ)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_kk_KZ = (date_picker_locale_kk_KZ_locale);
;// ./components/calendar/locale/kk_KZ.ts
/* harmony default export */ var calendar_locale_kk_KZ = (date_picker_locale_kk_KZ);
;// ./components/locale/kk_KZ.ts
const typeTemplate = '${label} ${type} типі емес';
const localeValues = {
locale: 'kk',
Pagination: kk_KZ,
DatePicker: date_picker_locale_kk_KZ,
TimePicker: time_picker_locale_kk_KZ,
Calendar: calendar_locale_kk_KZ,
global: {
placeholder: 'Таңдаңыз'
},
Table: {
filterTitle: 'Фильтр',
filterConfirm: 'OK',
filterReset: 'Тазарту',
filterEmptyText: 'Фильтр жоқ',
emptyText: 'Деректер жоқ',
selectAll: 'Барлығын таңдау',
selectInvert: 'Таңдауды төңкеру',
selectionAll: 'Барлық деректерді таңдаңыз',
sortTitle: 'Сұрыптау',
expand: 'Жолды жазу',
collapse: 'Жолды бүктеу',
triggerDesc: 'Төмендеуді сұрыптау үшін басыңыз',
triggerAsc: 'Өсу ретімен сұрыптау үшін басыңыз',
cancelSort: 'Сұрыптаудан бас тарту үшін басыңыз'
},
Modal: {
okText: 'Жарайды',
cancelText: 'Болдырмау',
justOkText: 'Жарайды'
},
Popconfirm: {
okText: 'Жарайды',
cancelText: 'Болдырмау'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Іздеу',
itemUnit: 'элемент.',
itemsUnit: 'элемент.',
remove: 'Жою',
selectAll: 'Барлық деректерді таңдау',
selectCurrent: 'Ағымдағы бетті таңдау',
selectInvert: 'Кері тәртіпте көрсету',
removeAll: 'Барлық деректерді жою',
removeCurrent: 'Ағымдағы парақты өшіру'
},
Upload: {
uploading: 'Жүктеу...',
removeFile: 'Файлды жою',
uploadError: 'Жүктеу кезінде қате пайда болды',
previewFile: 'Файлды алдын ала қарау',
downloadFile: 'Файлды жүктеу'
},
Empty: {
description: 'Деректер жоқ'
},
Icon: {
icon: 'белгішесі'
},
Text: {
edit: 'Өңдеу',
copy: 'Көшіру',
copied: 'Көшірілді',
expand: 'Жазу'
},
Form: {
defaultValidateMessages: {
default: '${label} өрісін тексеру қателігі',
required: '${label} енгізіңіз',
enum: '${label} [${enum}] қатарынан болуы керек',
whitespace: '${label} бос болмауы керек',
date: {
format: '${label} жарамды күн форматы емес',
parse: '${label} күнге түрлендірілмейді',
invalid: '${label} жарамды күн емес'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ${len} таңбадан тұруы керек',
min: '${label} ${min} таңбадан үлкен немесе оған тең болуы керек',
max: '${label} ${max} таңбадан кем немесе оған тең болуы керек',
range: '${label} ұзындығы ${min}-${max} таңба аралығында болуы керек'
},
number: {
len: '${label} ${len} тең болуы керек',
min: '${label} ${min} мәнінен үлкен немесе оған тең болуы керек',
max: '${label} ${max} мәнінен аз немесе оған тең болуы керек'
},
array: {
len: '${label} элементтерінің саны ${len} тең болуы керек',
min: '${label} элементтерінің саны ${min} көп немесе оған тең болуы керек',
max: '${label} элементтерінің саны ${max} аз немесе оған тең болуы керек',
range: '${label} элементтерінің саны ${min} - ${max} аралығында болуы керек'
},
pattern: {
mismatch: '${label} ${pattern} мен сәйкес келмейді'
}
}
}
};
/* harmony default export */ var components_locale_kk_KZ = (localeValues);
/***/ }),
/***/ "./components/locale/km_KH.ts":
/*!************************************************!*\
!*** ./components/locale/km_KH.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_km_KH; }
});
;// ./node_modules/rc-pagination/es/locale/km_KH.js
var locale = {
// Options
items_per_page: '/ ទំព័រ',
jump_to: 'លោតទៅ',
jump_to_confirm: 'បញ្ជាក់',
page: 'ទំព័រ',
// Pagination
prev_page: 'ទំព័រមុន',
next_page: 'ទំព័របន្ទាប់',
prev_5: '៥ ទំព័រថយក្រោយ',
next_5: '៥ ទំព័រទៅមុខ',
prev_3: '៣ ទំព័រថយក្រោយ',
next_3: '៣ ទំព័រទៅមុខ',
page_size: 'Page Size'
};
/* harmony default export */ var km_KH = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/km_KH.js
var km_KH_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'km',
today: 'ថ្ងៃនេះ',
now: 'ឥឡូវនេះ',
backToToday: 'ត្រលប់ទៅថ្ងៃនេះ',
ok: 'កំណត់',
timeSelect: 'រយៈពេលជ្រើសរើស',
dateSelect: 'ជ្រើសរើសកាលបរិច្ឆេទ',
weekSelect: 'ជ្រើសរើសសប្តាហ៍',
clear: 'ច្បាស់',
week: 'សប្តាហ៍',
month: 'ខែ',
year: 'ឆ្នាំ',
previousMonth: 'ខែមុន (ឡើងទំព័រ)',
nextMonth: 'ខែបន្ទាប់ (ប៊ូតុងចុះទំព័រ)',
monthSelect: 'ជ្រើសរើសខែ',
yearSelect: 'ជ្រើសរើសឆ្នាំ',
decadeSelect: 'ជ្រើសរើសអាយុ',
dateFormat: 'YYYY-M-D',
dateTimeFormat: 'YYYY-M-D HH:mm:ss',
previousYear: 'ឆ្នាំមុន (Controlគ្រាប់ចុចបូកព្រួញខាងឆ្វេង)',
nextYear: 'ឆ្នាំក្រោយ (Control គ្រាប់ចុចបូកព្រួញស្ដាំ)',
previousDecade: 'ជំនាន់ចុងក្រោយ',
nextDecade: 'ជំនាន់ក្រោយ',
previousCentury: 'សតវត្សចុងក្រោយ',
nextCentury: 'សតវត្សរ៍បន្ទាប់',
monthBeforeYear: false
});
/* harmony default export */ var locale_km_KH = (km_KH_locale);
;// ./components/time-picker/locale/km_KH.ts
const locale_km_KH_locale = {
placeholder: 'រើសម៉ោង',
rangePlaceholder: ['ម៉ោងចប់ផ្ដើម', 'ម៉ោងបញ្ចប់']
};
/* harmony default export */ var time_picker_locale_km_KH = (locale_km_KH_locale);
;// ./components/date-picker/locale/km_KH.ts
// Merge into a locale object
const date_picker_locale_km_KH_locale = {
lang: Object.assign({
placeholder: 'រើសថ្ងៃ',
yearPlaceholder: 'រើសឆ្នាំ',
quarterPlaceholder: 'រើសត្រីមាស',
monthPlaceholder: 'រើសខែ',
weekPlaceholder: 'រើសសប្តាហ៍',
rangePlaceholder: ['ថ្ងៃចាប់ផ្ដើម', 'ថ្ងៃបញ្ចប់'],
rangeYearPlaceholder: ['ឆ្នាំចាប់ផ្ដើម', 'ឆ្នាំបញ្ចប់'],
rangeMonthPlaceholder: ['ខែចាប់ផ្ដើម', 'ខែបញ្ចប់'],
rangeWeekPlaceholder: ['សប្ដាហ៍ចាប់ផ្ដើម', 'សប្ដាហ៍បញ្ចប់']
}, locale_km_KH),
timePickerLocale: Object.assign({}, time_picker_locale_km_KH)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_km_KH = (date_picker_locale_km_KH_locale);
;// ./components/calendar/locale/km_KH.ts
/* harmony default export */ var calendar_locale_km_KH = (date_picker_locale_km_KH);
;// ./components/locale/km_KH.ts
const typeTemplate = '${label} is not a valid ${type}';
const localeValues = {
locale: 'km',
Pagination: km_KH,
DatePicker: date_picker_locale_km_KH,
TimePicker: time_picker_locale_km_KH,
Calendar: calendar_locale_km_KH,
Table: {
filterTitle: 'បញ្ចីតម្រៀប',
filterConfirm: 'យល់ព្រម',
filterReset: 'ត្រឡប់ដើម',
filterEmptyText: 'គ្មានបញ្ចីតម្រៀប',
emptyText: 'គ្មានទិន្នន័យ',
selectAll: 'រើសក្នុងទំព័រនេះ',
selectInvert: 'បញ្ច្រាសក្នុងទំព័រនេះ',
selectNone: 'លុបចេញទាំងអស់',
selectionAll: 'រើសយកទាំងអស់',
sortTitle: 'តម្រៀប',
expand: 'ពន្លាត',
collapse: 'បិតបាំង',
triggerDesc: 'ចុចដើម្បីរៀបតាមលំដាប់ធំ',
triggerAsc: 'ចុចដើម្បីរៀបតាមលំដាប់តូច',
cancelSort: 'ចុចដើម្បីបោះបង់'
},
Modal: {
okText: 'យល់ព្រម',
cancelText: 'បោះបង់',
justOkText: 'យល់ព្រម'
},
Popconfirm: {
okText: 'យល់ព្រម',
cancelText: 'បោះបង់'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'ស្វែងរកនៅទីនេះ',
itemUnit: '',
itemsUnit: 'items'
},
Upload: {
uploading: 'កំពុងបញ្ចូលឡើង...',
removeFile: 'លុបឯកសារ',
uploadError: 'បញ្ចូលមិនជោកជ័យ',
previewFile: 'មើលឯកសារ',
downloadFile: 'ទាញយកឯកសារ'
},
Empty: {
description: 'គ្មានទិន្នន័យ'
},
Form: {
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
enum: '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} must be ${len} characters',
min: '${label} must be at least ${min} characters',
max: '${label} must be up to ${max} characters',
range: '${label} must be between ${min}-${max} characters'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} must be minimum ${min}',
max: '${label} must be maximum ${max}',
range: '${label} must be between ${min}-${max}'
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}'
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_km_KH = (localeValues);
/***/ }),
/***/ "./components/locale/kmr_IQ.ts":
/*!*************************************!*\
!*** ./components/locale/kmr_IQ.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var rc_pagination_es_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/kmr_IQ */ "./node_modules/rc-pagination/es/locale/kmr_IQ.js");
/* harmony import */ var _calendar_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/kmr_IQ */ "./components/calendar/locale/kmr_IQ.ts");
/* harmony import */ var _date_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/kmr_IQ */ "./components/date-picker/locale/kmr_IQ.ts");
/* harmony import */ var _time_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/kmr_IQ */ "./components/time-picker/locale/kmr_IQ.ts");
const localeValues = {
locale: 'ku',
Pagination: rc_pagination_es_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_0__["default"],
DatePicker: _date_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_1__["default"],
TimePicker: _time_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_2__["default"],
Calendar: _calendar_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_3__["default"],
Table: {
filterTitle: 'Menuê peldanka',
filterConfirm: 'Temam',
filterReset: 'Jê bibe',
selectAll: 'Hemî hilbijêre',
selectInvert: 'Hilbijartinan veguhere'
},
Modal: {
okText: 'Temam',
cancelText: 'Betal ke',
justOkText: 'Temam'
},
Popconfirm: {
okText: 'Temam',
cancelText: 'Betal ke'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Lêgerîn',
itemUnit: 'tişt',
itemsUnit: 'tişt'
},
Upload: {
uploading: 'Bardike...',
removeFile: 'Pelê rabike',
uploadError: 'Xeta barkirine',
previewFile: 'Pelê pêşbibîne',
downloadFile: 'Pelê dakêşin'
},
Empty: {
description: 'Agahî tune'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/locale/kn_IN.ts":
/*!************************************************!*\
!*** ./components/locale/kn_IN.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_kn_IN; }
});
;// ./node_modules/rc-pagination/es/locale/kn_IN.js
var locale = {
// Options
items_per_page: '/ ಪುಟ',
jump_to: 'ಜಿಗಿತವನ್ನು',
jump_to_confirm: 'ಖಚಿತಪಡಿಸಲು ಜಿಗಿತವನ್ನು',
page: '',
// Pagination
prev_page: 'ಹಿಂದಿನ ಪುಟ',
next_page: 'ಮುಂದಿನ ಪುಟ',
prev_5: 'ಹಿಂದಿನ 5 ಪುಟಗಳು',
next_5: 'ಮುಂದಿನ 5 ಪುಟಗಳು',
prev_3: 'ಹಿಂದಿನ 3 ಪುಟಗಳು',
next_3: 'ಮುಂದಿನ 3 ಪುಟಗಳು',
page_size: 'Page Size'
};
/* harmony default export */ var kn_IN = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/kn_IN.js
var kn_IN_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'kn_IN',
today: 'ಇಂದು',
now: 'ಈಗ',
backToToday: 'ಇಂದು ಹಿಂದಿರುಗಿ',
ok: 'ಸರಿ',
clear: 'ಸ್ಪಷ್ಟ',
week: 'ವಾರ',
month: 'ತಿಂಗಳು',
year: 'ವರ್ಷ',
timeSelect: 'ಸಮಯ ಆಯ್ಕೆಮಾಡಿ',
dateSelect: 'ದಿನಾಂಕವನ್ನು ಆಯ್ಕೆ ಮಾಡಿ',
weekSelect: 'ಒಂದು ವಾರದ ಆರಿಸಿ',
monthSelect: 'ಒಂದು ತಿಂಗಳು ಆಯ್ಕೆಮಾಡಿ',
yearSelect: 'ಒಂದು ವರ್ಷ ಆರಿಸಿ',
decadeSelect: 'ಒಂದು ದಶಕದ ಆಯ್ಕೆಮಾಡಿ',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'ಹಿಂದಿನ ತಿಂಗಳು (ಪೇಜ್ಅಪ್)',
nextMonth: 'ಮುಂದಿನ ತಿಂಗಳು (ಪೇಜ್ಡೌನ್)',
previousYear: 'ಕಳೆದ ವರ್ಷ (Ctrl + ಎಡ)',
nextYear: 'ಮುಂದಿನ ವರ್ಷ (Ctrl + ಬಲ)',
previousDecade: 'ಕಳೆದ ದಶಕ',
nextDecade: 'ಮುಂದಿನ ದಶಕ',
previousCentury: 'ಕಳೆದ ಶತಮಾನ',
nextCentury: 'ಮುಂದಿನ ಶತಮಾನ'
});
/* harmony default export */ var locale_kn_IN = (kn_IN_locale);
;// ./components/time-picker/locale/kn_IN.ts
const locale_kn_IN_locale = {
placeholder: 'ಸಮಯ ಆಯ್ಕೆಮಾಡಿ'
};
/* harmony default export */ var time_picker_locale_kn_IN = (locale_kn_IN_locale);
;// ./components/date-picker/locale/kn_IN.ts
// Merge into a locale object
const date_picker_locale_kn_IN_locale = {
lang: Object.assign({
placeholder: 'ದಿನಾಂಕ ಆಯ್ಕೆಮಾಡಿ',
yearPlaceholder: 'ವರ್ಷ ಆಯ್ಕೆಮಾಡಿ',
rangePlaceholder: ['ಪ್ರಾರಂಭ ದಿನಾಂಕ', 'ಅಂತಿಮ ದಿನಾಂಕ'],
quarterPlaceholder: 'ಕಾಲುಭಾಗವನ್ನು ಆಯ್ಕೆಮಾಡಿ',
monthPlaceholder: 'ತಿಂಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ',
weekPlaceholder: 'ವಾರವನ್ನು ಆಯ್ಕೆಮಾಡಿ',
rangeYearPlaceholder: ['ಉದ್ಘಾಟನಾ ವರ್ಷ', 'ಅಂತಿಮ ವರ್ಷ'],
rangeQuarterPlaceholder: ['ತ್ರೈಮಾಸಿಕದ ಆರಂಭ', 'ಅಂತಿಮ ತ್ರೈಮಾಸಿಕ'],
rangeMonthPlaceholder: ['ಆರಂಭಿಕ ತಿಂಗಳು', 'ಅಂತಿಮ ತಿಂಗಳು'],
rangeWeekPlaceholder: ['ತೆರೆಯುವ ವಾರ', 'ಅಂತಿಮ ವಾರ']
}, locale_kn_IN),
timePickerLocale: Object.assign({}, time_picker_locale_kn_IN)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_kn_IN = (date_picker_locale_kn_IN_locale);
;// ./components/calendar/locale/kn_IN.ts
/* harmony default export */ var calendar_locale_kn_IN = (date_picker_locale_kn_IN);
;// ./components/locale/kn_IN.ts
const typeTemplate = '${label} ಮಾನ್ಯವಾದ ${type} ಅಲ್ಲ';
const localeValues = {
locale: 'kn',
Pagination: kn_IN,
DatePicker: date_picker_locale_kn_IN,
TimePicker: time_picker_locale_kn_IN,
Calendar: calendar_locale_kn_IN,
// locales for all comoponents
global: {
placeholder: 'ದಯವಿಟ್ಟು ಆರಿಸಿ'
},
Table: {
filterTitle: 'ಪಟ್ಟಿ ಸೋಸಿ',
filterConfirm: 'ಸರಿ',
filterReset: 'ಮರುಹೊಂದಿಸಿ',
emptyText: 'ಮಾಹಿತಿ ಇಲ್ಲ',
selectAll: 'ಪ್ರಸ್ತುತ ಪುಟವನ್ನು ಆಯ್ಕೆಮಾಡಿ',
selectInvert: 'ಪ್ರಸ್ತುತ ಪುಟವನ್ನು ತಿರುಗಿಸಿ',
sortTitle: 'ವಿಂಗಡಿಸಿ',
filterEmptyText: 'ಫಿಲ್ಟರ್ ಇಲ್ಲ',
filterCheckAll: 'ಎಲ್ಲಾ ಐಟಂಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ',
filterSearchPlaceholder: 'ಫಿಲ್ಟರ್ಗಳೊಂದಿಗೆ ಹುಡುಕಿ',
selectNone: 'ಯಾವುದನ್ನೂ ಆಯ್ಕೆ ಮಾಡಬೇಡಿ',
selectionAll: 'ಎಲ್ಲಾ ಡೇಟಾವನ್ನು ಆಯ್ಕೆಮಾಡಿ',
expand: 'ಶ್ರೇಣಿಯನ್ನು ವಿಸ್ತರಿಸಿ',
collapse: 'ಸಾಲುಗಳನ್ನು ಸಂಕುಚಿಸಿ',
triggerDesc: 'ಅವರೋಹಣ ಕ್ರಮದಲ್ಲಿ ವಿಂಗಡಿಸಲು ಕ್ಲಿಕ್ ಮಾಡಿ',
triggerAsc: 'ಏರೋಹಣ ಕ್ರಮದಲ್ಲಿ ವಿಂಗಡಿಸಲು ಕ್ಲಿಕ್ ಮಾಡಿ',
cancelSort: 'ವಿಂಗಡಣೆಯನ್ನು ರದ್ದುಗೊಳಿಸಲು ಕ್ಲಿಕ್ ಮಾಡಿ'
},
Modal: {
okText: 'ಸರಿ',
cancelText: 'ರದ್ದು',
justOkText: 'ಸರಿ'
},
Popconfirm: {
okText: 'ಸರಿ',
cancelText: 'ರದ್ದು'
},
Transfer: {
titles: ['', ''],
notFoundContent: 'ದೊರೆತಿಲ್ಲ',
searchPlaceholder: 'ಇಲ್ಲಿ ಹುಡುಕಿ',
itemUnit: 'ವಿಷಯ',
itemsUnit: 'ವಿಷಯಗಳು'
},
Upload: {
uploading: 'ಏರಿಸಿ...',
removeFile: 'ಫೈಲ್ ತೆಗೆದುಹಾಕಿ',
uploadError: 'ಏರಿಸುವ ದೋಷ',
previewFile: 'ಫೈಲ್ ಮುನ್ನೋಟ',
downloadFile: 'ಫೈಲ್ ಡೌನ್ಲೋಡ್ ಮಾಡಿ'
},
Empty: {
description: 'ಮಾಹಿತಿ ಇಲ್ಲ'
},
Icon: {
icon: 'ಚಿಹ್ನೆ'
},
Text: {
edit: 'ಸಂಪಾದಿಸಿ',
copy: 'ಪ್ರತಿಯನ್ನು ತೆಗೆದುಕೊಳ್ಳಿ',
copied: 'ನಕಲಿಸಲಾಗಿದೆ',
expand: 'ಶ್ರೇಣಿಯನ್ನು ವಿಸ್ತರಿಸಿ',
collapse: 'ಸಾಲುಗಳನ್ನು ಸಂಕುಚಿಸಿ'
},
Form: {
optional: '(ಐಚ್ಛಿಕ)',
defaultValidateMessages: {
default: '${label} ಗಾಗಿ ಕ್ಷೇತ್ರ ಮೌಲ್ಯೀಕರಣ ದೋಷ',
required: '${label} ನಮೂದಿಸಿ',
enum: '${label} [${enum}] ನಲ್ಲಿ ಒಂದಾಗಿರಬೇಕು.',
whitespace: '${label} ಖಾಲಿ ಅಕ್ಷರವಾಗಿರಬಾರದು',
date: {
format: '${label} ದಿನಾಂಕ ಸ್ವರೂಪವು ಅಮಾನ್ಯವಾಗಿದೆ',
parse: '${label} ಅನ್ನು ದಿನಾಂಕಕ್ಕೆ ಪರಿವರ್ತಿಸಲಾಗುವುದಿಲ್ಲ',
invalid: '${label} ಒಂದು ಅಮಾನ್ಯ ದಿನಾಂಕವಾಗಿದೆ'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ${len} ಅಕ್ಷರಗಳಾಗಿರಬೇಕು',
min: '${label} ಕನಿಷ್ಠ ${min} ಅಕ್ಷರಗಳಾಗಿರಬೇಕು',
max: '${label} ಗರಿಷ್ಠ ${max} ಅಕ್ಷರಗಳಾಗಿರಬೇಕು',
range: '${label} ${min}-${max} ಅಕ್ಷರಗಳ ನಡುವೆ ಇರಬೇಕು'
},
number: {
len: '${label} ${len} ಗೆ ಸಮನಾಗಿರಬೇಕು',
min: '${label} ಕನಿಷ್ಠ ${min} ಆಗಿರಬೇಕು',
max: '${label} ಹೆಚ್ಚೆಂದರೆ ${max} ಆಗಿರಬೇಕು',
range: '${label} ${min}-${max} ನಡುವೆ ಇರಬೇಕು'
},
array: {
len: '${label} ${len} ಗೆ ಸಮನಾಗಿರಬೇಕು',
min: '${label} ಕನಿಷ್ಠ ${min} ಆಗಿರಬೇಕು',
max: '${label} ಹೆಚ್ಚೆಂದರೆ ${max} ಆಗಿರಬೇಕು',
range: '${label} ${min}-${max} ನಡುವೆ ಇರಬೇಕು'
},
pattern: {
mismatch: '${label} ಮಾದರಿಯು ${pattern} ಗೆ ಹೊಂದಿಕೆಯಾಗುವುದಿಲ್ಲ'
}
}
},
Image: {
preview: 'ಮುನ್ನೋಟ'
},
QRCode: {
expired: 'QR ಕೋಡ್ ಅವಧಿ ಮೀರಿದೆ',
refresh: 'ನವೀಕರಿಸಿ'
}
};
/* harmony default export */ var components_locale_kn_IN = (localeValues);
/***/ }),
/***/ "./components/locale/ko_KR.ts":
/*!************************************************!*\
!*** ./components/locale/ko_KR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ko_KR; }
});
;// ./node_modules/rc-pagination/es/locale/ko_KR.js
var locale = {
// Options
items_per_page: '/ 페이지',
jump_to: '이동하기',
jump_to_confirm: '확인하다',
page: '페이지',
// Pagination
prev_page: '이전 페이지',
next_page: '다음 페이지',
prev_5: '이전 5 페이지',
next_5: '다음 5 페이지',
prev_3: '이전 3 페이지',
next_3: '다음 3 페이지',
page_size: '페이지 크기'
};
/* harmony default export */ var ko_KR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ko_KR.js
var ko_KR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ko_KR',
today: '오늘',
now: '현재 시각',
backToToday: '오늘로 돌아가기',
ok: '확인',
clear: '지우기',
week: '주',
month: '월',
year: '년',
timeSelect: '시간 선택',
dateSelect: '날짜 선택',
monthSelect: '달 선택',
yearSelect: '연 선택',
decadeSelect: '연대 선택',
yearFormat: 'YYYY년',
dateFormat: 'YYYY-MM-DD',
dateTimeFormat: 'YYYY-MM-DD HH:mm:ss',
monthBeforeYear: false,
previousMonth: '이전 달 (PageUp)',
nextMonth: '다음 달 (PageDown)',
previousYear: '이전 해 (Control + left)',
nextYear: '다음 해 (Control + right)',
previousDecade: '이전 연대',
nextDecade: '다음 연대',
previousCentury: '이전 세기',
nextCentury: '다음 세기'
});
/* harmony default export */ var locale_ko_KR = (ko_KR_locale);
;// ./components/time-picker/locale/ko_KR.ts
const locale_ko_KR_locale = {
placeholder: '시간 선택',
rangePlaceholder: ['시작 시간', '종료 시간']
};
/* harmony default export */ var time_picker_locale_ko_KR = (locale_ko_KR_locale);
;// ./components/date-picker/locale/ko_KR.ts
// Merge into a locale object
const date_picker_locale_ko_KR_locale = {
lang: Object.assign({
placeholder: '날짜 선택',
yearPlaceholder: '연도 선택',
quarterPlaceholder: '분기 선택',
monthPlaceholder: '월 선택',
weekPlaceholder: '주 선택',
rangePlaceholder: ['시작일', '종료일'],
rangeYearPlaceholder: ['시작 연도', '종료 연도'],
rangeMonthPlaceholder: ['시작 월', '종료 월'],
rangeQuarterPlaceholder: ['시작 분기', '종료 분기'],
rangeWeekPlaceholder: ['시작 주', '종료 주'],
shortWeekDays: ['일', '월', '화', '수', '목', '금', '토'],
shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
}, locale_ko_KR),
timePickerLocale: Object.assign({}, time_picker_locale_ko_KR)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ko_KR = (date_picker_locale_ko_KR_locale);
;// ./components/calendar/locale/ko_KR.ts
/* harmony default export */ var calendar_locale_ko_KR = (date_picker_locale_ko_KR);
;// ./components/locale/ko_KR.ts
const typeTemplate = '${label} 유효하지 않은 ${type}';
const localeValues = {
locale: 'ko',
Pagination: ko_KR,
DatePicker: date_picker_locale_ko_KR,
TimePicker: time_picker_locale_ko_KR,
Calendar: calendar_locale_ko_KR,
global: {
placeholder: '선택하세요'
},
Table: {
filterTitle: '필터 메뉴',
filterConfirm: '확인',
filterReset: '초기화',
filterEmptyText: '필터 없음',
filterCheckAll: '전체 선택',
filterSearchPlaceholder: '필터 검색',
emptyText: '데이터 없음',
selectAll: '전체 선택',
selectInvert: '선택 반전',
selectNone: '없음',
selectionAll: '전체 선택',
sortTitle: '정렬',
expand: '펼치기',
collapse: '접기',
triggerDesc: '내림차순으로 정렬하기',
triggerAsc: '오름차순으로 정렬하기',
cancelSort: '정렬 취소하기'
},
Tour: {
Next: '다음',
Previous: '이전',
Finish: '종료'
},
Modal: {
okText: '확인',
cancelText: '취소',
justOkText: '확인'
},
Popconfirm: {
okText: '확인',
cancelText: '취소'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: '여기에 검색하세요',
itemUnit: '개',
itemsUnit: '개',
remove: '삭제',
selectCurrent: '현재 페이지 선택',
removeCurrent: '현재 페이지 삭제',
selectAll: '전체 선택',
removeAll: '전체 삭제',
selectInvert: '선택 반전'
},
Upload: {
uploading: '업로드 중...',
removeFile: '파일 삭제',
uploadError: '업로드 실패',
previewFile: '파일 미리보기',
downloadFile: '파일 다운로드'
},
Empty: {
description: '데이터 없음'
},
Icon: {
icon: '아이콘'
},
Text: {
edit: '수정',
copy: '복사',
copied: '복사 됨',
expand: '확장'
},
Form: {
optional: '(선택사항)',
defaultValidateMessages: {
default: '필드 유효성 검사 오류 ${label}',
required: '${label} 값을 입력해 주세요',
enum: '${label} [${enum}] 중에 하나여야 합니다',
whitespace: '${label} 비워둘 수 없습니다',
date: {
format: '${label} 유효하지 않은 날짜 형식입니다',
parse: '${label} 날짜 형식으로 변환될 수 없습니다',
invalid: '${label} 유효하지 않은 날짜입니다'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ${len}글자여야 합니다',
min: '${label} 적어도 ${min}글자 이상이어야 합니다',
max: '${label} ${max}글자 이하여야 합니다',
range: '${label} ${min}-${max}글자 사이어야 합니다'
},
number: {
len: '${label} 값은 ${len}이어야 합니다',
min: '${label} 최솟값은 ${min}입니다',
max: '${label} 최댓값은 ${max}입니다',
range: '${label} 값은 ${min}-${max} 사이어야 합니다'
},
array: {
len: '${len}이어야 합니다 ${label}',
min: '최소 ${min}이어야 합니다 ${label}',
max: '최대 ${max}이어야 합니다 ${label}',
range: '${label} ${min}-${max} 사이어야 합니다'
},
pattern: {
mismatch: '${label} ${pattern} 패턴과 일치하지 않습니다'
}
}
},
Image: {
preview: '미리보기'
},
QRCode: {
expired: '만료된 QR 코드',
refresh: '새로고침'
},
ColorPicker: {
presetEmpty: '미정',
transparent: '투명',
singleColor: '단색',
gradientColor: '그라데이션'
}
};
/* harmony default export */ var components_locale_ko_KR = (localeValues);
/***/ }),
/***/ "./components/locale/ku_IQ.ts":
/*!************************************!*\
!*** ./components/locale/ku_IQ.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var rc_pagination_es_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/kmr_IQ */ "./node_modules/rc-pagination/es/locale/kmr_IQ.js");
/* harmony import */ var _calendar_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/kmr_IQ */ "./components/calendar/locale/kmr_IQ.ts");
/* harmony import */ var _date_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/kmr_IQ */ "./components/date-picker/locale/kmr_IQ.ts");
/* harmony import */ var _time_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/kmr_IQ */ "./components/time-picker/locale/kmr_IQ.ts");
// please use antd/locale/kmr_IQ instead
// keep this file for compatibility
// https://github.com/ant-design/ant-design/issues/25778
const localeValues = {
locale: 'ku-iq',
Pagination: rc_pagination_es_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_0__["default"],
DatePicker: _date_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_1__["default"],
TimePicker: _time_picker_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_2__["default"],
Calendar: _calendar_locale_kmr_IQ__WEBPACK_IMPORTED_MODULE_3__["default"],
Table: {
filterTitle: 'Menuê peldanka',
filterConfirm: 'Temam',
filterReset: 'Jê bibe',
selectAll: 'Hemî hilbijêre',
selectInvert: 'Hilbijartinan veguhere'
},
Modal: {
okText: 'Temam',
cancelText: 'Betal ke',
justOkText: 'Temam'
},
Popconfirm: {
okText: 'Temam',
cancelText: 'Betal ke'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Lêgerîn',
itemUnit: 'tişt',
itemsUnit: 'tişt'
},
Upload: {
uploading: 'Bardike...',
removeFile: 'Pelê rabike',
uploadError: 'Xeta barkirine',
previewFile: 'Pelê pêşbibîne',
downloadFile: 'Pelê dakêşin'
},
Empty: {
description: 'Agahî tune'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/locale/lt_LT.ts":
/*!************************************************!*\
!*** ./components/locale/lt_LT.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_lt_LT; }
});
;// ./node_modules/rc-pagination/es/locale/lt_LT.js
var locale = {
// Options
items_per_page: '/ psl.',
jump_to: 'Pereiti į',
jump_to_confirm: 'patvirtinti',
page: 'psl.',
// Pagination
prev_page: 'Atgal',
next_page: 'Pirmyn',
prev_5: 'Grįžti 5 psl.',
next_5: 'Peršokti 5 psl.',
prev_3: 'Grįžti 3 psl.',
next_3: 'Peršokti 3 psl.',
page_size: 'Puslapio dydis'
};
/* harmony default export */ var lt_LT = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/lt_LT.js
var lt_LT_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'lt_LT',
today: 'Šiandien',
now: 'Dabar',
backToToday: 'Rodyti šiandien',
ok: 'Gerai',
clear: 'Išvalyti',
week: 'Savaitė',
month: 'Mėnesis',
year: 'Metai',
timeSelect: 'Pasirinkti laiką',
dateSelect: 'Pasirinkti datą',
weekSelect: 'Pasirinkti savaitę',
monthSelect: 'Pasirinkti mėnesį',
yearSelect: 'Pasirinkti metus',
decadeSelect: 'Pasirinkti dešimtmetį',
dateFormat: 'YYYY-MM-DD',
dayFormat: 'DD',
dateTimeFormat: 'YYYY-MM-DD HH:MM:SS',
previousMonth: 'Buvęs mėnesis (PageUp)',
nextMonth: 'Kitas mėnesis (PageDown)',
previousYear: 'Buvę metai (Control + left)',
nextYear: 'Kiti metai (Control + right)',
previousDecade: 'Buvęs dešimtmetis',
nextDecade: 'Kitas dešimtmetis',
previousCentury: 'Buvęs amžius',
nextCentury: 'Kitas amžius'
});
/* harmony default export */ var locale_lt_LT = (lt_LT_locale);
;// ./components/time-picker/locale/lt_LT.ts
const locale_lt_LT_locale = {
placeholder: 'Pasirinkite laiką',
rangePlaceholder: ['Pradžios laikas', 'Pabaigos laikas']
};
/* harmony default export */ var time_picker_locale_lt_LT = (locale_lt_LT_locale);
;// ./components/date-picker/locale/lt_LT.ts
// Merge into a locale object
const date_picker_locale_lt_LT_locale = {
lang: Object.assign({
placeholder: 'Pasirinkite datą',
yearPlaceholder: 'Pasirinkite metus',
quarterPlaceholder: 'Pasirinkite ketvirtį',
monthPlaceholder: 'Pasirinkite mėnesį',
weekPlaceholder: 'Pasirinkite savaitę',
rangePlaceholder: ['Pradžios data', 'Pabaigos data'],
rangeYearPlaceholder: ['Pradžios metai', 'Pabaigos metai'],
rangeQuarterPlaceholder: ['Pradžios ketvirtis', 'Pabaigos ketvirtis'],
rangeMonthPlaceholder: ['Pradžios mėnesis', 'Pabaigos mėnesis'],
rangeWeekPlaceholder: ['Pradžios savaitė', 'Pabaigos savaitė']
}, locale_lt_LT),
timePickerLocale: Object.assign({}, time_picker_locale_lt_LT)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_lt_LT = (date_picker_locale_lt_LT_locale);
;// ./components/calendar/locale/lt_LT.ts
/* harmony default export */ var calendar_locale_lt_LT = (date_picker_locale_lt_LT);
;// ./components/locale/lt_LT.ts
const typeTemplate = '${label} neatitinka tipo ${type}';
const localeValues = {
locale: 'lt',
Pagination: lt_LT,
DatePicker: date_picker_locale_lt_LT,
TimePicker: time_picker_locale_lt_LT,
Calendar: calendar_locale_lt_LT,
global: {
placeholder: 'Pasirinkite'
},
Table: {
filterTitle: 'Filtras',
filterConfirm: 'Gerai',
filterReset: 'Atstatyti',
filterEmptyText: 'Be filtrų',
filterCheckAll: 'Pasirinkti visus',
filterSearchPlaceholder: 'Ieškoti filtruose',
emptyText: 'Nėra duomenų',
selectAll: 'Pasirinkti viską',
selectInvert: 'Apversti pasirinkimą',
selectNone: 'Išvalyti visus',
selectionAll: 'Rinktis visus',
sortTitle: 'Rikiavimas',
expand: 'Išskleisti',
collapse: 'Suskleisti',
triggerDesc: 'Spustelėkite norėdami rūšiuoti mažėjančia tvarka',
triggerAsc: 'Spustelėkite norėdami rūšiuoti didėjančia tvarka',
cancelSort: 'Spustelėkite, kad atšauktumėte rūšiavimą'
},
Tour: {
Next: 'Kitas',
Previous: 'Ankstesnis',
Finish: 'Baigti'
},
Modal: {
okText: 'Taip',
cancelText: 'Atšaukti',
justOkText: 'Gerai'
},
Popconfirm: {
okText: 'Taip',
cancelText: 'Atšaukti'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Paieška',
itemUnit: 'vnt.',
itemsUnit: 'vnt.',
remove: 'Pašalinti',
selectCurrent: 'Pasirinkti dabartinį puslapį',
removeCurrent: 'Ištrinti dabartinį puslapį',
selectAll: 'Pasirinkti viską',
removeAll: 'Ištrinti viską',
selectInvert: 'Apversti pasirinkimą'
},
Upload: {
uploading: 'Įkeliami duomenys...',
removeFile: 'Ištrinti failą',
uploadError: 'Įkeliant įvyko klaida',
previewFile: 'Failo peržiūra',
downloadFile: 'Atsisiųsti failą'
},
Empty: {
description: 'Nėra duomenų'
},
Icon: {
icon: 'piktograma'
},
Text: {
edit: 'Redaguoti',
copy: 'Kopijuoti',
copied: 'Nukopijuota',
expand: 'Plačiau'
},
Form: {
optional: '(neprivaloma)',
defaultValidateMessages: {
default: 'Klaida laukelyje ${label}',
required: 'Prašome įvesti ${label}',
enum: '${label} turi būti vienas iš [${enum}]',
whitespace: '${label} negali likti tuščias',
date: {
format: '${label} neteisingas datos formatas',
parse: '${label} negali būti konvertuotas į datą',
invalid: '${label} neatitinka datos formato'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} turi būti ${len} simbolių',
min: '${label} turi būti bent ${min} simbolių',
max: '${label} turi būti ne ilgesnis nei ${max} simbolių',
range: 'Laukelio ${label} reikšmės ribos ${min}-${max} simbolių'
},
number: {
len: '${label} turi būti lygi ${len}',
min: '${label} turi būti lygus arba didesnis už ${min}',
max: '${label} turi būti lygus arba mažesnis už ${max}',
range: '${label} turi būti tarp ${min}-${max}'
},
array: {
len: 'Pasirinktas kiekis ${label} turi būti lygus ${len}',
min: 'Pasirinktas kiekis ${label} turi būti bent ${min}',
max: 'Pasirinktas kiekis ${label} turi būti ne ilgesnis nei ${max}',
range: 'Pasirinktas ${label} kiekis turi būti tarp ${min}-${max}'
},
pattern: {
mismatch: '${label} neatitinka modelio ${pattern}'
}
}
},
Image: {
preview: 'Peržiūrėti'
},
QRCode: {
expired: 'QR kodo galiojimas baigėsi',
refresh: 'Atnaujinti'
},
ColorPicker: {
presetEmpty: 'Tuščia',
transparent: 'Permatomas',
singleColor: 'Vieno spalvos',
gradientColor: 'Gradientas'
}
};
/* harmony default export */ var components_locale_lt_LT = (localeValues);
/***/ }),
/***/ "./components/locale/lv_LV.ts":
/*!************************************************!*\
!*** ./components/locale/lv_LV.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_lv_LV; }
});
;// ./node_modules/rc-pagination/es/locale/lv_LV.js
var locale = {
// Options
items_per_page: '/ lappuse',
jump_to: 'iet uz',
jump_to_confirm: 'apstiprināt',
page: '',
// Pagination
prev_page: 'Iepriekšējā lapa',
next_page: 'Nākamā lapaspuse',
prev_5: 'Iepriekšējās 5 lapas',
next_5: 'Nākamās 5 lapas',
prev_3: 'Iepriekšējās 3 lapas',
next_3: 'Nākamās 3 lapas',
page_size: 'Page Size'
};
/* harmony default export */ var lv_LV = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/lv_LV.js
var lv_LV_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'lv_LV',
today: 'Šodien',
now: 'Tagad',
backToToday: 'Atpakaļ pie šodienas',
ok: 'OK',
clear: 'Skaidrs',
week: 'Nedēļa',
month: 'Mēnesis',
year: 'Gads',
timeSelect: 'Izvēlieties laiku',
dateSelect: 'Izvēlieties datumu',
monthSelect: 'Izvēlieties mēnesi',
yearSelect: 'Izvēlieties gadu',
decadeSelect: 'Izvēlieties desmit gadus',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Iepriekšējais mēnesis (PageUp)',
nextMonth: 'Nākammēnes (PageDown)',
previousYear: 'Pagājušais gads (Control + left)',
nextYear: 'Nākamgad (Control + right)',
previousDecade: 'Pēdējā desmitgadē',
nextDecade: 'Nākamā desmitgade',
previousCentury: 'Pagājušajā gadsimtā',
nextCentury: 'Nākamajā gadsimtā'
});
/* harmony default export */ var locale_lv_LV = (lv_LV_locale);
;// ./components/time-picker/locale/lv_LV.ts
const locale_lv_LV_locale = {
placeholder: 'Izvēlieties laiku'
};
/* harmony default export */ var time_picker_locale_lv_LV = (locale_lv_LV_locale);
;// ./components/date-picker/locale/lv_LV.ts
// Merge into a locale object
const date_picker_locale_lv_LV_locale = {
lang: Object.assign({
placeholder: 'Izvēlieties datumu',
rangePlaceholder: ['Sākuma datums', 'Beigu datums']
}, locale_lv_LV),
timePickerLocale: Object.assign({}, time_picker_locale_lv_LV)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_lv_LV = (date_picker_locale_lv_LV_locale);
;// ./components/calendar/locale/lv_LV.ts
/* harmony default export */ var calendar_locale_lv_LV = (date_picker_locale_lv_LV);
;// ./components/locale/lv_LV.ts
const localeValues = {
locale: 'lv',
Pagination: lv_LV,
DatePicker: date_picker_locale_lv_LV,
TimePicker: time_picker_locale_lv_LV,
Calendar: calendar_locale_lv_LV,
Table: {
filterTitle: 'Filtrēšanas izvēlne',
filterConfirm: 'OK',
filterReset: 'Atiestatīt',
selectAll: 'Atlasiet pašreizējo lapu',
selectInvert: 'Pārvērst pašreizējo lapu'
},
Modal: {
okText: 'OK',
cancelText: 'Atcelt',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Atcelt'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Meklēt šeit',
itemUnit: 'vienumu',
itemsUnit: 'vienumus'
},
Upload: {
uploading: 'Augšupielāde...',
removeFile: 'Noņemt failu',
uploadError: 'Augšupielādes kļūda',
previewFile: 'Priekšskatiet failu',
downloadFile: 'Lejupielādēt failu'
},
Empty: {
description: 'Nav datu'
}
};
/* harmony default export */ var components_locale_lv_LV = (localeValues);
/***/ }),
/***/ "./components/locale/mk_MK.ts":
/*!************************************************!*\
!*** ./components/locale/mk_MK.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_mk_MK; }
});
;// ./node_modules/rc-pagination/es/locale/mk_MK.js
var locale = {
// Options
items_per_page: '/ стр',
jump_to: 'Оди на',
jump_to_confirm: 'потврди',
page: '',
// Pagination
prev_page: 'Претходна страница',
next_page: 'Наредна страница',
prev_5: 'Претходни 5 страници',
next_5: 'Наредни 5 страници',
prev_3: 'Претходни 3 страници',
next_3: 'Наредни 3 страници',
page_size: 'Page Size'
};
/* harmony default export */ var mk_MK = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/mk_MK.js
var mk_MK_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'mk_MK',
today: 'Денес',
now: 'Сега',
backToToday: 'Назад до денес',
ok: 'ОК',
clear: 'Избриши',
week: 'Недела',
month: 'Месец',
year: 'Година',
timeSelect: 'Избери време',
dateSelect: 'Избери датум',
monthSelect: 'Избери месец',
yearSelect: 'Избери година',
decadeSelect: 'Избери деценија',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Претходен месец (PageUp)',
nextMonth: 'Нареден месец (PageDown)',
previousYear: 'Претходна година (Control + left)',
nextYear: 'Наредна година (Control + right)',
previousDecade: 'Претходна деценија',
nextDecade: 'Наредна деценија',
previousCentury: 'Претходен век',
nextCentury: 'Нареден век'
});
/* harmony default export */ var locale_mk_MK = (mk_MK_locale);
;// ./components/time-picker/locale/mk_MK.ts
const locale_mk_MK_locale = {
placeholder: 'Избери време'
};
/* harmony default export */ var time_picker_locale_mk_MK = (locale_mk_MK_locale);
;// ./components/date-picker/locale/mk_MK.ts
// Merge into a locale object
const date_picker_locale_mk_MK_locale = {
lang: Object.assign({
placeholder: 'Избери датум',
rangePlaceholder: ['Од датум', 'До датум']
}, locale_mk_MK),
timePickerLocale: Object.assign({}, time_picker_locale_mk_MK)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_mk_MK = (date_picker_locale_mk_MK_locale);
;// ./components/calendar/locale/mk_MK.ts
/* harmony default export */ var calendar_locale_mk_MK = (date_picker_locale_mk_MK);
;// ./components/locale/mk_MK.ts
const localeValues = {
locale: 'mk',
Pagination: mk_MK,
DatePicker: date_picker_locale_mk_MK,
TimePicker: time_picker_locale_mk_MK,
Calendar: calendar_locale_mk_MK,
global: {
placeholder: 'Ве молиме означете'
},
Table: {
filterTitle: 'Мени за филтрирање',
filterConfirm: 'ОК',
filterReset: 'Избриши',
selectAll: 'Одбери страница',
selectInvert: 'Инвертирај страница'
},
Modal: {
okText: 'ОК',
cancelText: 'Откажи',
justOkText: 'ОК'
},
Popconfirm: {
okText: 'ОК',
cancelText: 'Откажи'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Пребарај тука',
itemUnit: 'предмет',
itemsUnit: 'предмети'
},
Upload: {
uploading: 'Се прикачува...',
removeFile: 'Избриши фајл',
uploadError: 'Грешка при прикачување',
previewFile: 'Прикажи фајл',
downloadFile: 'Преземи фајл'
},
Empty: {
description: 'Нема податоци'
},
Icon: {
icon: 'Икона'
},
Text: {
edit: 'Уреди',
copy: 'Копирај',
copied: 'Копирано',
expand: 'Зголеми'
}
};
/* harmony default export */ var components_locale_mk_MK = (localeValues);
/***/ }),
/***/ "./components/locale/ml_IN.ts":
/*!************************************************!*\
!*** ./components/locale/ml_IN.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ml_IN; }
});
;// ./node_modules/rc-pagination/es/locale/ml_IN.js
var locale = {
// Options
items_per_page: '/ പേജ്',
jump_to: 'അടുത്തത്',
jump_to_confirm: 'ഉറപ്പാക്കുക',
page: '',
// Pagination
prev_page: 'മുൻപുള്ള പേജ്',
next_page: 'അടുത്ത പേജ്',
prev_5: 'മുൻപുള്ള 5 പേജുകൾ',
next_5: 'അടുത്ത 5 പേജുകൾ',
prev_3: 'മുൻപുള്ള 3 പേജുകൾ',
next_3: 'അടുത്ത 3 പേജുകൾ',
page_size: 'Page Size'
};
/* harmony default export */ var ml_IN = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ml_IN.js
var ml_IN_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ml_IN',
today: 'ഇന്ന്',
now: 'ഇപ്പോൾ',
backToToday: 'ഇന്നത്തെ ദിവസത്തിലേക്ക് തിരിച്ചു പോകുക',
ok: 'ശരിയാണ്',
clear: 'നീക്കം ചെയ്യുക',
week: 'ആഴ്ച',
month: 'മാസം',
year: 'വർഷം',
timeSelect: 'സമയം തിരഞ്ഞെടുക്കുക',
dateSelect: 'ദിവസം തിരഞ്ഞെടുക്കുക',
weekSelect: 'വാരം തിരഞ്ഞെടുക്കുക',
monthSelect: 'മാസം തിരഞ്ഞെടുക്കുക',
yearSelect: 'വർഷം തിരഞ്ഞെടുക്കുക',
decadeSelect: 'ദശാബ്ദം തിരഞ്ഞെടുക്കുക',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'കഴിഞ്ഞ മാസം (PageUp)',
nextMonth: 'അടുത്ത മാസം (PageDown)',
previousYear: 'കഴിഞ്ഞ വർഷം (Control + left)',
nextYear: 'അടുത്ത വർഷം (Control + right)',
previousDecade: 'കഴിഞ്ഞ ദശാബ്ദം',
nextDecade: 'അടുത്ത ദശാബ്ദം',
previousCentury: 'കഴിഞ്ഞ നൂറ്റാണ്ട്',
nextCentury: 'അടുത്ത നൂറ്റാണ്ട്'
});
/* harmony default export */ var locale_ml_IN = (ml_IN_locale);
;// ./components/time-picker/locale/ml_IN.ts
const locale_ml_IN_locale = {
placeholder: 'സമയം തിരഞ്ഞെടുക്കുക',
rangePlaceholder: ['ആരംഭ സമയം', 'അവസാന സമയം']
};
/* harmony default export */ var time_picker_locale_ml_IN = (locale_ml_IN_locale);
;// ./components/date-picker/locale/ml_IN.ts
// Merge into a locale object
const date_picker_locale_ml_IN_locale = {
lang: Object.assign({
placeholder: 'തിയതി തിരഞ്ഞെടുക്കുക',
yearPlaceholder: 'വർഷം തിരഞ്ഞെടുക്കുക',
quarterPlaceholder: 'ത്രൈമാസം തിരഞ്ഞെടുക്കുക',
monthPlaceholder: 'മാസം തിരഞ്ഞെടുക്കുക',
weekPlaceholder: 'വാരം തിരഞ്ഞെടുക്കുക',
rangePlaceholder: ['ആരംഭ ദിനം', 'അവസാന ദിനം'],
rangeYearPlaceholder: ['ആരംഭ വർഷം', 'അവസാന വർഷം'],
rangeMonthPlaceholder: ['ആരംഭ മാസം', 'അവസാന മാസം'],
rangeWeekPlaceholder: ['ആരംഭ വാരം', 'അവസാന വാരം']
}, locale_ml_IN),
timePickerLocale: Object.assign({}, time_picker_locale_ml_IN)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ml_IN = (date_picker_locale_ml_IN_locale);
;// ./components/calendar/locale/ml_IN.ts
/* harmony default export */ var calendar_locale_ml_IN = (date_picker_locale_ml_IN);
;// ./components/locale/ml_IN.ts
const typeTemplate = '${label} അസാധുവായ ${type} ആണ്';
const localeValues = {
locale: 'ml',
Pagination: ml_IN,
DatePicker: date_picker_locale_ml_IN,
TimePicker: time_picker_locale_ml_IN,
Calendar: calendar_locale_ml_IN,
global: {
placeholder: 'ദയവായി തിരഞ്ഞെടുക്കുക'
},
Table: {
filterTitle: 'ഫിൽറ്റർ',
filterConfirm: 'ശരിയാണ്',
filterReset: 'പുനഃക്രമീകരിക്കുക',
filterEmptyText: 'ഫിൽറ്ററുകളൊന്നുമില്ല',
emptyText: 'ഡാറ്റയൊന്നുമില്ല',
selectAll: 'നിലവിലെ പേജ് തിരഞ്ഞെടുക്കുക',
selectInvert: 'നിലവിലെ പേജിൽ ഇല്ലാത്തത് തിരഞ്ഞെടുക്കുക',
selectNone: 'എല്ലാ ഡാറ്റയും നീക്കം ചെയ്യുക',
selectionAll: 'എല്ലാ ഡാറ്റയും തിരഞ്ഞെടുക്കുക',
sortTitle: 'ക്രമമാക്കുക',
expand: 'വരി വികസിപ്പിക്കുക',
collapse: 'വരി ചുരുക്കുക',
triggerDesc: 'അവരോഹണ ക്രമത്തിനായി ക്ലിക്ക് ചെയ്യുക',
triggerAsc: 'ആരോഹണ ക്രമത്തിനായി ക്ലിക്ക് ചെയ്യുക',
cancelSort: 'ക്രമീകരണം ഒഴിവാക്കുന്നതിനായി ക്ലിക്ക് ചെയ്യുക'
},
Modal: {
okText: 'ശരിയാണ്',
cancelText: 'റദ്ദാക്കുക',
justOkText: 'ശരിയാണ്'
},
Popconfirm: {
okText: 'ശരിയാണ്',
cancelText: 'റദ്ദാക്കുക'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'ഇവിടെ തിരയുക',
itemUnit: 'ഇനം',
itemsUnit: 'ഇനങ്ങൾ',
remove: 'നീക്കം ചെയ്യുക',
selectCurrent: 'നിലവിലെ പേജ് തിരഞ്ഞെടുക്കുക',
removeCurrent: 'നിലവിലെ പേജ് നീക്കം ചെയ്യുക',
selectAll: 'എല്ലാ ഡാറ്റയും തിരഞ്ഞെടുക്കുക',
removeAll: 'എല്ലാ ഡാറ്റയും നീക്കം ചെയ്യുക',
selectInvert: 'നിലവിലെ പേജിൽ ഇല്ലാത്തത് തിരഞ്ഞെടുക്കുക'
},
Upload: {
uploading: 'അപ്ലോഡ് ചെയ്തു കൊണ്ടിരിക്കുന്നു...',
removeFile: 'ഫയൽ നീക്കം ചെയ്യുക',
uploadError: 'അപ്ലോഡിൽ പിശക് സംഭവിച്ചിരിക്കുന്നു',
previewFile: 'ഫയൽ പ്രിവ്യൂ ചെയ്യുക',
downloadFile: 'ഫയൽ ഡൗൺലോഡ് ചെയ്യുക'
},
Empty: {
description: 'ഡാറ്റയൊന്നുമില്ല'
},
Icon: {
icon: 'ഐക്കൺ'
},
Text: {
edit: 'തിരുത്തുക',
copy: 'കോപ്പി ചെയ്യുക',
copied: 'കോപ്പി ചെയ്തു',
expand: 'വികസിപ്പിക്കുക'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: '${label} ഫീൽഡിൽ വാലിഡേഷൻ പിശകുണ്ട്',
required: 'ദയവായി ${label} രേഖപ്പെടുത്തുക',
enum: '${label} നിർബന്ധമായും [${enum}]-ൽ നിന്നുള്ളതായിരിക്കണം',
whitespace: '${label} ശൂന്യമായി വെക്കാനാകില്ല',
date: {
format: '${label} തീയതി രൂപരേഖ അസാധുവാണ്',
parse: '${label} ഒരു തീയതിയാക്കി മാറ്റാൻ സാധിക്കില്ല',
invalid: '${label} ഒരു അസാധുവായ തീയതി ആണ്'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} നിർബന്ധമായും ${len} അക്ഷരങ്ങൾ ഉണ്ടായിരിക്കണം',
min: '${label} നിർബന്ധമായും ${min} അക്ഷരങ്ങൾ എങ്കിലും ഉണ്ടായിരിക്കണം',
max: '${label} നിർബന്ധമായും ${max} അക്ഷരങ്ങളിൽ കൂടാൻ പാടില്ല',
range: '${label} നിർബന്ധമായും ${min}-നും ${max}-നും ഇടയിൽ അക്ഷരങ്ങൾ ഉള്ളതായിരിക്കണം'
},
number: {
len: '${label} നിർബന്ധമായും ${len}-നു തുല്യമായിരിക്കണം',
min: '${label} നിർബന്ധമായും ${min}-ൽ കുറയാൻ പാടില്ല',
max: '${label} നിർബന്ധമായും ${max}-ൽ കൂടാൻ പാടില്ല',
range: '${label} നിർബന്ധമായും ${min}-നും ${max}-നും ഇടയിൽ ആയിരിക്കണം'
},
array: {
len: 'നിർബന്ധമായും ${len} ${label} ഉണ്ടായിരിക്കണം',
min: 'കുറഞ്ഞപക്ഷം ${min} ${label} എങ്കിലും ഉണ്ടായിരിക്കണം',
max: 'അങ്ങേയറ്റം ${max} ${label} ആയിരിക്കണം',
range: '${label}-ന്റെ എണ്ണം നിർബന്ധമായും ${min}-നും ${max}-നും ഇടയിൽ ആയിരിക്കണം'
},
pattern: {
mismatch: '${label} ${pattern} മാതൃകയുമായി യോജിക്കുന്നില്ല'
}
}
},
Image: {
preview: 'പ്രിവ്യൂ'
}
};
/* harmony default export */ var components_locale_ml_IN = (localeValues);
/***/ }),
/***/ "./components/locale/mn_MN.ts":
/*!************************************************!*\
!*** ./components/locale/mn_MN.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_mn_MN; }
});
;// ./node_modules/rc-pagination/es/locale/mn_MN.js
var locale = {
// Options
items_per_page: '/ хуудас',
jump_to: 'Шилжих',
jump_to_confirm: 'сонгох',
page: '',
// Pagination
prev_page: 'Өмнөх хуудас',
next_page: 'Дараагийн хуудас',
prev_5: 'Дараагийн 5 хуудас',
next_5: 'Дараагийн 5 хуудас',
prev_3: 'Дараагийн 3 хуудас',
next_3: 'Дараагийн 3 хуудас',
page_size: 'Page Size'
};
/* harmony default export */ var mn_MN = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/mn_MN.js
var mn_MN_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'mn_MN',
today: 'Өнөөдөр',
now: 'Одоо',
backToToday: 'Өнөөдөрлүү буцах',
ok: 'OK',
clear: 'Цэвэрлэх',
week: 'Долоо хоног',
month: 'Сар',
year: 'Жил',
timeSelect: 'Цаг сонгох',
dateSelect: 'Огноо сонгох',
weekSelect: '7 хоног сонгох',
monthSelect: 'Сар сонгох',
yearSelect: 'Жил сонгох',
decadeSelect: 'Арван сонгох',
dateFormat: 'YYYY/MM/DD',
dayFormat: 'DD',
dateTimeFormat: 'YYYY/MM/DD HH:mm:ss',
previousMonth: 'Өмнөх сар (PageUp)',
nextMonth: 'Дараа сар (PageDown)',
previousYear: 'Өмнөх жил (Control + left)',
nextYear: 'Дараа жил (Control + right)',
previousDecade: 'Өмнөх арван',
nextDecade: 'Дараа арван',
previousCentury: 'Өмнөх зуун',
nextCentury: 'Дараа зуун'
});
/* harmony default export */ var locale_mn_MN = (mn_MN_locale);
;// ./components/time-picker/locale/mn_MN.ts
const locale_mn_MN_locale = {
placeholder: 'Цаг сонгох'
};
/* harmony default export */ var time_picker_locale_mn_MN = (locale_mn_MN_locale);
;// ./components/date-picker/locale/mn_MN.ts
// Merge into a locale object
const date_picker_locale_mn_MN_locale = {
lang: Object.assign({
placeholder: 'Огноо сонгох',
rangePlaceholder: ['Эхлэх огноо', 'Дуусах огноо']
}, locale_mn_MN),
timePickerLocale: Object.assign({}, time_picker_locale_mn_MN)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_mn_MN = (date_picker_locale_mn_MN_locale);
;// ./components/calendar/locale/mn_MN.ts
/* harmony default export */ var calendar_locale_mn_MN = (date_picker_locale_mn_MN);
;// ./components/locale/mn_MN.ts
const typeTemplate = '${label} нь хүчинтэй ${type} биш';
const localeValues = {
locale: 'mn-mn',
Pagination: mn_MN,
DatePicker: date_picker_locale_mn_MN,
TimePicker: time_picker_locale_mn_MN,
Calendar: calendar_locale_mn_MN,
global: {
placeholder: 'Сонгоно уу'
},
Table: {
filterTitle: 'Хайх цэс',
filterConfirm: 'Тийм',
filterReset: 'Цэвэрлэх',
filterEmptyText: 'Шүүлтүүр байхгүй',
filterCheckAll: 'Бүх зүйлийг сонгоно уу',
filterSearchPlaceholder: 'Шүүлтүүрээс хайх',
emptyText: 'Өгөгдөл алга',
selectAll: 'Бүгдийг сонгох',
selectInvert: 'Бусдыг сонгох',
selectNone: 'Бүх өгөгдлийг арилгах',
selectionAll: 'Бүх өгөгдлийг сонгоно уу',
sortTitle: 'Эрэмбэлэх',
expand: 'Мөрийг өргөжүүлэх',
collapse: 'Мөрийг буулгах',
triggerDesc: 'Буурах байдлаар эрэмбэлэхийн тулд товшино уу',
triggerAsc: 'Өсөхөөр эрэмбэлэхийн тулд товшино уу',
cancelSort: 'Эрэмбэлэхийг цуцлахын тулд товшино уу'
},
Modal: {
okText: 'Тийм',
cancelText: 'Цуцлах',
justOkText: 'Тийм'
},
Popconfirm: {
okText: 'Тийм',
cancelText: 'Цуцлах'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Хайх',
itemUnit: 'Зүйл',
itemsUnit: 'Зүйлүүд',
remove: 'Устгах',
selectCurrent: 'Одоогийн хуудсыг сонгоно уу',
removeCurrent: 'Одоогийн хуудсыг устгана уу',
selectAll: 'Бүх өгөгдлийг сонгоно уу',
removeAll: 'Бүх өгөгдлийг устгана уу',
selectInvert: 'Одоогийн хуудсыг эргүүлэх'
},
Upload: {
uploading: 'Хуулж байна...',
removeFile: 'Файл устгах',
uploadError: 'Хуулахад алдаа гарлаа',
previewFile: 'Файлыг түргэн үзэх',
downloadFile: 'Файлыг татах'
},
Empty: {
description: 'Мэдээлэл байхгүй байна'
},
Icon: {
icon: 'дүрс'
},
Text: {
edit: 'Засварлах',
copy: 'Хуулбарлах',
copied: 'Хуулсан',
expand: 'Өргөтгөх'
},
Form: {
optional: '(сонголттой)',
defaultValidateMessages: {
default: '${label}-ийн талбарын баталгаажуулалтын алдаа',
required: '${label} оруулна уу',
enum: '${label} нь [${enum}]-ийн нэг байх ёстой',
whitespace: '${label} нь хоосон тэмдэгт байж болохгүй',
date: {
format: '${label} огнооны формат буруу байна',
parse: '${label}-г огноо руу хөрвүүлэх боломжгүй',
invalid: '${label} нь хүчингүй огноо юм'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ${len} тэмдэгттэй байх ёстой',
min: '${label} хамгийн багадаа ${min} тэмдэгттэй байх ёстой',
max: '${label} нь ${max} хүртэлх тэмдэгттэй байх ёстой',
range: '${label} ${min}-${max} тэмдэгтийн хооронд байх ёстой'
},
number: {
len: '${label} нь ${len}-тэй тэнцүү байх ёстой',
min: '${label} хамгийн багадаа ${min} байх ёстой',
max: '${label} дээд тал нь ${max} байх ёстой',
range: '${label} ${min}-${max} хооронд байх ёстой'
},
array: {
len: '${len} ${label} байх ёстой',
min: 'Дор хаяж ${мин} ${label}',
max: 'Хамгийн ихдээ ${max} ${label}',
range: '${label}-н хэмжээ ${min}-${max} хооронд байх ёстой'
},
pattern: {
mismatch: '${label} нь ${pattern} загвартай тохирохгүй байна'
}
}
},
Image: {
preview: 'Урьдчилан үзэх'
}
};
/* harmony default export */ var components_locale_mn_MN = (localeValues);
/***/ }),
/***/ "./components/locale/ms_MY.ts":
/*!************************************************!*\
!*** ./components/locale/ms_MY.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ms_MY; }
});
;// ./node_modules/rc-pagination/es/locale/ms_MY.js
var locale = {
// Options
items_per_page: '/ halaman',
jump_to: 'Lompat ke',
jump_to_confirm: 'Sahkan',
page: '',
// Pagination
prev_page: 'Halaman sebelumnya',
next_page: 'Halam seterusnya',
prev_5: '5 halaman sebelum',
next_5: '5 halaman seterusnya',
prev_3: '3 halaman sebelumnya',
next_3: '3 halaman seterusnya',
page_size: 'Page Size'
};
/* harmony default export */ var ms_MY = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ms_MY.js
var ms_MY_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ms_MY',
today: 'Hari ini',
now: 'Sekarang',
backToToday: 'Kembali ke hari ini',
ok: 'OK',
timeSelect: 'Pilih masa',
dateSelect: 'Pilih tarikh',
weekSelect: 'Pilih minggu',
clear: 'Padam',
week: 'Minggu',
month: 'Bulan',
year: 'Tahun',
previousMonth: 'Bulan lepas',
nextMonth: 'Bulan depan',
monthSelect: 'Pilih bulan',
yearSelect: 'Pilih tahun',
decadeSelect: 'Pilih dekad',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousYear: 'Tahun lepas (Ctrl+left)',
nextYear: 'Tahun depan (Ctrl+right)',
previousDecade: 'Dekad lepas',
nextDecade: 'Dekad depan',
previousCentury: 'Abad lepas',
nextCentury: 'Abad depan',
monthBeforeYear: false
});
/* harmony default export */ var locale_ms_MY = (ms_MY_locale);
;// ./components/time-picker/locale/ms_MY.ts
const locale_ms_MY_locale = {
placeholder: 'Sila pilih masa'
};
/* harmony default export */ var time_picker_locale_ms_MY = (locale_ms_MY_locale);
;// ./components/date-picker/locale/ms_MY.ts
// Merge into a locale object
const date_picker_locale_ms_MY_locale = {
lang: Object.assign({
placeholder: 'Pilih tarikh',
rangePlaceholder: ['Tarikh mula', 'Tarikh akhir']
}, locale_ms_MY),
timePickerLocale: Object.assign({}, time_picker_locale_ms_MY)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ms_MY = (date_picker_locale_ms_MY_locale);
;// ./components/calendar/locale/ms_MY.ts
/* harmony default export */ var calendar_locale_ms_MY = (date_picker_locale_ms_MY);
;// ./components/locale/ms_MY.ts
const typeTemplate = '${label} bukan ${type} jenis yang sah';
const localeValues = {
locale: 'ms-my',
Pagination: ms_MY,
DatePicker: date_picker_locale_ms_MY,
TimePicker: time_picker_locale_ms_MY,
Calendar: calendar_locale_ms_MY,
global: {
placeholder: 'Sila pilih'
},
Table: {
filterTitle: 'Cari dengan tajuk',
filterConfirm: 'OK',
filterReset: 'Menetapkan semula',
emptyText: 'Tiada data',
selectAll: 'Pilih Semua',
selectInvert: 'Terbalikkan',
filterEmptyText: 'Tiada Saringan',
filterCheckAll: 'Semak Semua',
filterSearchPlaceholder: 'Cari',
selectNone: 'Kosong Semua',
selectionAll: 'Semua Data',
sortTitle: 'Urutkan',
expand: 'Buka',
collapse: 'Tutup',
triggerDesc: 'Turun',
triggerAsc: 'Naik',
cancelSort: 'Batal Urut'
},
Modal: {
okText: 'OK',
cancelText: 'Batal',
justOkText: 'OK'
},
Tour: {
Next: 'Seterusnya',
Previous: 'Sebelumnya',
Finish: 'Tamat'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Batal'
},
Transfer: {
titles: ['', ''],
notFoundContent: 'Tidak dijumpai',
searchPlaceholder: 'Carian di sini',
itemUnit: 'item',
itemsUnit: 'item',
remove: 'Buang',
selectCurrent: 'Pilih Halaman Ini',
removeCurrent: 'Buang Dari Halaman Ini',
selectAll: 'Pilih Semua',
removeAll: 'Buang Semua',
selectInvert: 'Balik Pilihan'
},
Upload: {
uploading: 'Sedang memuat naik...',
removeFile: 'Buang fail',
uploadError: 'Masalah muat naik',
previewFile: 'Tengok fail',
downloadFile: 'Muat turun fail'
},
Empty: {
description: 'Tiada data'
},
Icon: {
icon: 'ikon'
},
Text: {
edit: 'Sunting',
copy: 'Salin',
copied: 'Berjaya menyalin',
expand: 'Kembang'
},
Form: {
optional: '(Opsional)',
defaultValidateMessages: {
default: 'Ralat pengesahan untuk ${label}',
required: 'Isi ${label}',
enum: '${label} mesti salah satu dari [${enum}]',
whitespace: '${label} tidak boleh kosong',
date: {
format: 'Format tarikh ${label} salah',
parse: '${label} tidak boleh jadi tarikh',
invalid: '${label} adalah tarikh tidak sah'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} mesti ${len} aksara',
min: 'Min ${min} aksara',
max: 'Max ${max} aksara',
range: '${label} antara ${min}-${max} aksara'
},
number: {
len: '${label} sama dengan ${len}',
min: 'Min ${min}',
max: 'Max ${max}',
range: '${label} antara ${min}-${max}'
},
array: {
len: '${len} ${label}',
min: 'Min ${min} ${label}',
max: 'Max ${max} ${label}',
range: '${label} antara ${min}-${max}'
},
pattern: {
mismatch: '${label} tidak sesuai ${pattern}'
}
}
},
Image: {
preview: 'Pratonton'
},
QRCode: {
expired: 'Kod QR luput',
refresh: 'Segar Semula'
},
ColorPicker: {
presetEmpty: 'Tiada',
transparent: 'Tidak tembus cahaya',
singleColor: 'Warna tunggal',
gradientColor: 'Warna gradien'
}
};
/* harmony default export */ var components_locale_ms_MY = (localeValues);
/***/ }),
/***/ "./components/locale/my_MM.ts":
/*!************************************************!*\
!*** ./components/locale/my_MM.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_my_MM; }
});
;// ./node_modules/rc-pagination/es/locale/my_MM.js
var locale = {
// Options
items_per_page: '/ စာမျက်နှာ',
jump_to: 'သွားရန်',
jump_to_confirm: 'သေချာပြီ',
page: '',
// Pagination
prev_page: 'ယခင်စာမျက်နှာ',
next_page: 'နောက်စာမျက်နှာ',
prev_5: 'ယခင် ၅ခုမြောက်',
next_5: 'နောက် ၅ခုမြောက်',
prev_3: 'ယခင် ၃ခုမြောက်',
next_3: 'နောက် ၃ခုမြောက်',
page_size: 'Page Size'
};
/* harmony default export */ var my_MM = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/my_MM.js
var my_MM_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'my_MM',
today: 'ယနေ့',
now: 'ယခု',
backToToday: 'ယနေ့မတိုင်ခင်သို့',
ok: 'OK',
clear: 'ရှင်းမည်',
week: 'အပတ်',
month: 'လ',
year: 'နှစ်',
timeSelect: 'အချိန်ကိုရွေး',
dateSelect: 'နေ့ကိုရွေး',
weekSelect: 'သီတင်းပတ်ကိုရွေး',
monthSelect: 'လကိုရွေး',
yearSelect: 'နှစ်ကိုရွေး',
decadeSelect: 'ဆယ်စုနှစ်ကိုရွေး',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'ယခင်လ (PageUp)',
nextMonth: 'နောက်လ (PageDown)',
previousYear: 'ယခင်နှစ် (Control + left)',
nextYear: 'နောက်နှစ် (Control + right)',
previousDecade: 'ယခင်ဆယ်စုနှစ်',
nextDecade: 'နောက်ဆယ်စုနှစ်',
previousCentury: 'ယခင်ရာစုနှစ်',
nextCentury: 'နောက်ရာစုနှစ်'
});
/* harmony default export */ var locale_my_MM = (my_MM_locale);
;// ./components/time-picker/locale/my_MM.ts
const locale_my_MM_locale = {
placeholder: 'အချိန်ရွေးပါ။',
rangePlaceholder: ['စတင်ချိန်', 'ကုန်ဆုံးချိန်']
};
/* harmony default export */ var time_picker_locale_my_MM = (locale_my_MM_locale);
;// ./components/date-picker/locale/my_MM.ts
// Merge into a locale object
const date_picker_locale_my_MM_locale = {
lang: Object.assign({
placeholder: 'ရက်စွဲကို ရွေးပါ။',
yearPlaceholder: 'နှစ်ကို ရွေးပါ။',
quarterPlaceholder: 'လေးပုံတစ်ပုံကို ရွေးပါ။',
monthPlaceholder: 'လကိုရွေးပါ။',
weekPlaceholder: 'ရက်သတ္တပတ်ကို ရွေးပါ။',
rangePlaceholder: ['စတင်သည့်ရက်စွဲ', 'ကုန်ဆုံးရက်'],
rangeYearPlaceholder: ['စတင်သည့်နှစ်', 'နှစ်ကုန်'],
rangeQuarterPlaceholder: ['လေးပုံတစ်ပုံကို စတင်ပါ။', 'အဆုံးသုံးလ'],
rangeMonthPlaceholder: ['စတင်လ', 'လကုန်'],
rangeWeekPlaceholder: ['ရက်သတ္တပတ်စတင်ပါ။', 'သီတင်းပတ်ကုန်']
}, locale_my_MM),
timePickerLocale: Object.assign({}, time_picker_locale_my_MM)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_my_MM = (date_picker_locale_my_MM_locale);
;// ./components/calendar/locale/my_MM.ts
/* harmony default export */ var calendar_locale_my_MM = (date_picker_locale_my_MM);
;// ./components/locale/my_MM.ts
const typeTemplate = '${label} သည် တရားဝင် ${type} မဟုတ်ပါ';
const localeValues = {
locale: 'my',
Pagination: my_MM,
DatePicker: date_picker_locale_my_MM,
TimePicker: time_picker_locale_my_MM,
Calendar: calendar_locale_my_MM,
// locales for all components
global: {
placeholder: 'ကျေးဇူးပြု၍ ရွေးချယ်ပါ။'
},
Table: {
filterTitle: 'စစ်ထုတ်ခြင်း မီနူ',
filterConfirm: 'အိုကေ',
filterReset: 'ပြန်လည်သတ်မှတ်ပါ။',
filterEmptyText: 'စစ်ထုတ်မှုများမရှိပါ။',
filterCheckAll: 'ပစ္စည်းအားလုံးကို ရွေးပါ။',
filterSearchPlaceholder: 'စစ်ထုတ်မှုများတွင် ရှာဖွေပါ။',
selectAll: 'လက်ရှိစာမျက်နှာကို ရွေးပါ။',
selectInvert: 'လက်ရှိစာမျက်နှာကို ပြောင်းလိုက်ပါ။',
selectNone: 'ဒေတာအားလုံးကို ရှင်းလင်းပါ။',
selectionAll: 'ဒေတာအားလုံးကို ရွေးပါ။',
sortTitle: 'မျိုးတူစု',
expand: 'အတန်းချဲ့ပါ။',
collapse: 'အတန်းကို ခေါက်သိမ်းပါ။',
cancelSort: 'အမျိုးအစားခွဲခြင်းကို ပယ်ဖျက်ရန် နှိပ်ပါ။'
},
Tour: {
Next: 'နောက်တစ်ခု',
Previous: 'အရင်',
Finish: 'ပြီးအောင်'
},
Modal: {
okText: 'အိုကေ',
cancelText: 'မလုပ်တော့',
justOkText: 'အိုကေ'
},
Popconfirm: {
cancelText: 'မလုပ်တော့',
okText: 'အိုကေ'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'ဒီမှာရှာပါ။',
itemUnit: 'ပစ္စည်း',
itemsUnit: 'ပစ္စည်းများ',
remove: 'ဖယ်ရှားပါ။',
selectCurrent: 'လက်ရှိစာမျက်နှာကို ရွေးပါ။',
removeCurrent: 'လက်ရှိစာမျက်နှာကို ဖယ်ရှားပါ။',
selectAll: 'ဒေတာအားလုံးကို ရွေးပါ။',
removeAll: 'ဒေတာအားလုံးကို ဖယ်ရှားပါ။',
selectInvert: 'လက်ရှိစာမျက်နှာကို ပြောင်းလိုက်ပါ။'
},
Upload: {
uploading: 'တင်ခြင်း။...',
removeFile: 'ဖိုင်ကို ဖယ်ရှားပါ။',
uploadError: 'အပ်လုဒ်အမှား',
previewFile: 'ဖိုင်ကို အစမ်းကြည့်ပါ။',
downloadFile: 'ဖိုင်ကိုဒေါင်းလုဒ်လုပ်ပါ။'
},
Empty: {
description: 'ဒေတာမရှိပါ။'
},
Icon: {
icon: 'အိုင်ကွန်'
},
Text: {
edit: 'တည်းဖြတ်ပါ။',
copy: 'ကော်ပီ',
copied: 'ကူးယူသည်။',
expand: 'ချဲ့ထွင်ပါ။'
},
Form: {
optional: '(ချန်လှပ်ထားနိုင်သည်)',
defaultValidateMessages: {
default: '${label} အတွက် အကွက်အတည်ပြုခြင်း အမှား',
required: '${label} ကို ထည့်ပါ',
enum: '${label} သည် [${enum}] မှ တစ်ခု ဖြစ်ရမည်',
whitespace: '${label} သည် အလွတ်စာလုံးမဖြစ်ရပါ။',
date: {
format: '${label} ရက်စွဲဖော်မတ်သည် မမှန်ကန်ပါ။',
parse: '${label} ကို ရက်စွဲအဖြစ် ပြောင်းလဲ၍မရပါ။',
invalid: '${label} သည် မမှန်ကန်သော ရက်စွဲတစ်ခုဖြစ်သည်။'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} သည် ${len} စာလုံးဖြစ်ရမည်။',
min: '${label} သည် အနည်းဆုံး စာလုံး ${min} ရှိရမည်။',
max: '${label} သည် ${max} စာလုံးအထိ ရှိရပါမည်။',
range: '${label} သည် ${min}-${max} စာလုံးကြားရှိရမည်။'
},
number: {
len: '${label} သည် ${len} နှင့် ညီရမည်',
min: '${label} သည် အနည်းဆုံး ${min} ဖြစ်ရမည်',
max: '${label} သည် အများဆုံး ${max} ဖြစ်ရမည်',
range: '${label} သည် ${min}-${max} ကြားရှိရမည်'
},
array: {
len: '${len} ${label} ဖြစ်ရမည်',
min: 'အနည်းဆုံး ${min} ${label}',
max: 'အများဆုံး ${max} ${label}',
range: '${label} ၏ ပမာဏသည် ${min}-${max} အကြား ဖြစ်ရမည်'
},
pattern: {
mismatch: '${label} သည် ပုံစံ ${pattern} နှင့် မကိုက်ညီပါ'
}
}
},
Image: {
preview: 'စမ်းကြည့်ပါ။'
},
QRCode: {
expired: 'QR ကုဒ် သက်တမ်းကုန်သွားပါပြီ။',
refresh: 'ပြန်လည်စတင်ပါ။'
}
};
/* harmony default export */ var components_locale_my_MM = (localeValues);
/***/ }),
/***/ "./components/locale/nb_NO.ts":
/*!************************************************!*\
!*** ./components/locale/nb_NO.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_nb_NO; }
});
;// ./node_modules/rc-pagination/es/locale/nb_NO.js
var locale = {
// Options
items_per_page: '/ side',
jump_to: 'Gå til side',
page: 'Side',
// Pagination
prev_page: 'Forrige side',
next_page: 'Neste side',
prev_5: '5 forrige',
next_5: '5 neste',
prev_3: '3 forrige',
next_3: '3 neste',
page_size: 'sidestørrelse'
};
/* harmony default export */ var nb_NO = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/nb_NO.js
var nb_NO_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'nb_NO',
today: 'I dag',
now: 'Nå',
backToToday: 'Gå til i dag',
ok: 'OK',
clear: 'Annuller',
week: 'Uke',
month: 'Måned',
year: 'År',
timeSelect: 'Velg tidspunkt',
dateSelect: 'Velg dato',
weekSelect: 'Velg uke',
monthSelect: 'Velg måned',
yearSelect: 'Velg år',
decadeSelect: 'Velg tiår',
dateFormat: 'DD.MM.YYYY',
dayFormat: 'DD',
dateTimeFormat: 'DD.MM.YYYY HH:mm:ss',
previousMonth: 'Forrige måned (PageUp)',
nextMonth: 'Neste måned (PageDown)',
previousYear: 'Forrige år (Control + venstre)',
nextYear: 'Neste år (Control + høyre)',
previousDecade: 'Forrige tiår',
nextDecade: 'Neste tiår',
previousCentury: 'Forrige århundre',
nextCentury: 'Neste århundre'
});
/* harmony default export */ var locale_nb_NO = (nb_NO_locale);
;// ./components/time-picker/locale/nb_NO.ts
const locale_nb_NO_locale = {
placeholder: 'Velg tid',
rangePlaceholder: ['Starttid', 'Sluttid']
};
/* harmony default export */ var time_picker_locale_nb_NO = (locale_nb_NO_locale);
;// ./components/date-picker/locale/nb_NO.ts
// Merge into a locale object
const date_picker_locale_nb_NO_locale = {
lang: Object.assign({
placeholder: 'Velg dato',
yearPlaceholder: 'Velg år',
quarterPlaceholder: 'Velg kvartal',
monthPlaceholder: 'Velg måned',
weekPlaceholder: 'Velg uke',
rangePlaceholder: ['Startdato', 'Sluttdato'],
rangeYearPlaceholder: ['Startår', 'Sluttår'],
rangeMonthPlaceholder: ['Startmåned', 'Sluttmåned'],
rangeWeekPlaceholder: ['Start uke', 'Sluttuke']
}, locale_nb_NO),
timePickerLocale: Object.assign({}, time_picker_locale_nb_NO)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_nb_NO = (date_picker_locale_nb_NO_locale);
;// ./components/calendar/locale/nb_NO.ts
/* harmony default export */ var calendar_locale_nb_NO = (date_picker_locale_nb_NO);
;// ./components/locale/nb_NO.ts
const typeTemplate = '${label} er ikke et gyldig ${type}';
const localeValues = {
locale: 'nb',
Pagination: nb_NO,
DatePicker: date_picker_locale_nb_NO,
TimePicker: time_picker_locale_nb_NO,
Calendar: calendar_locale_nb_NO,
global: {
placeholder: 'Vennligst velg'
},
Table: {
filterTitle: 'Filtermeny',
filterConfirm: 'OK',
filterReset: 'Nullstill',
filterEmptyText: 'Ingen filtre',
selectAll: 'Velg alle',
selectInvert: 'Inverter gjeldende side',
selectionAll: 'Velg all data',
sortTitle: 'Sorter',
expand: 'Utvid rad',
collapse: 'Skjul rad',
triggerDesc: 'Sorter data i synkende rekkefølge',
triggerAsc: 'Sorterer data i stigende rekkefølge',
cancelSort: 'Klikk for å avbryte sorteringen'
},
Modal: {
okText: 'OK',
cancelText: 'Avbryt',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Avbryt'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Søk her',
itemUnit: 'element',
itemsUnit: 'elementer',
remove: 'Fjern',
selectCurrent: 'Velg gjeldende side',
removeCurrent: 'Fjern gjeldende side',
selectAll: 'Velg all data',
removeAll: 'Fjern all data',
selectInvert: 'Inverter gjeldende side'
},
Upload: {
uploading: 'Laster opp...',
removeFile: 'Fjern fil',
uploadError: 'Feil ved opplastning',
previewFile: 'Forhåndsvisning',
downloadFile: 'Last ned fil'
},
Empty: {
description: 'Ingen data'
},
Icon: {
icon: 'ikon'
},
Text: {
edit: 'Rediger',
copy: 'Kopier',
copied: 'Kopiert',
expand: 'Utvid'
},
Form: {
defaultValidateMessages: {
default: 'Feltvalideringsfeil ${label}',
required: 'Vennligst skriv inn ${label}',
enum: '${label} må være en av [${enum}]',
whitespace: '${label} kan ikke være et blankt tegn',
date: {
format: '${label} datoformatet er ugyldig',
parse: '${label} kan ikke konverteres til en dato',
invalid: '${label} er en ugyldig dato'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} må være ${len} tegn',
min: '${label} må minst ha ${min} tegn',
max: '${label} opp til ${max} tegn',
range: '${label} må være mellom ${min}-${max} tegn'
},
number: {
len: '${label} må være lik ${len}',
min: '${label} minimumsverdien er ${min}',
max: '${label} maksimumsverdien er ${max}',
range: '${label} må være mellom ${min}-${max}'
},
array: {
len: 'Må være ${len} ${label}',
min: 'Må være minst ${min} ${label}',
max: 'På det meste ${max} ${label}',
range: 'Totalt av ${label} må være mellom ${min}-${max}'
},
pattern: {
mismatch: '${label} stemmer ikke overens med mønsteret ${pattern}'
}
}
}
};
/* harmony default export */ var components_locale_nb_NO = (localeValues);
/***/ }),
/***/ "./components/locale/ne_NP.ts":
/*!************************************!*\
!*** ./components/locale/ne_NP.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/en_US */ "./node_modules/rc-pagination/es/locale/en_US.js");
/* harmony import */ var _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/en_US */ "./components/calendar/locale/en_US.ts");
/* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.ts");
/* harmony import */ var _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/en_US */ "./components/time-picker/locale/en_US.ts");
const typeTemplate = '${label} यो एक मान्य ${type} होइन';
const localeValues = {
locale: 'ne-np',
Pagination: rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__["default"],
DatePicker: _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_1__["default"],
TimePicker: _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__["default"],
Calendar: _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_3__["default"],
global: {
placeholder: 'कृपया छान्नुहोस्'
},
Table: {
filterTitle: 'फिल्टर मेनु',
filterConfirm: 'हो',
filterReset: 'रीसेट',
filterEmptyText: 'कुनै फिल्टर छैन',
filterCheckAll: 'सबै छान्नु',
filterSearchPlaceholder: 'फिल्टर भित्र खोज्नुहोस्',
emptyText: 'डाटा छैन',
selectAll: 'सबै छान्नुुहोस्',
selectInvert: 'छनौट उल्टाउनुहोस',
selectNone: 'सबै खाली गर्नुहोस्',
selectionAll: 'सबै छान्नु',
sortTitle: 'क्रमबद्ध',
expand: 'पङ्क्ति विस्तार गर्नुहोस्',
collapse: 'पङ्क्ति बन्द गर्नुहोस्',
triggerDesc: 'तल क्रमबद्ध गर्न क्लिक गर्नुहोस्',
triggerAsc: 'बढ्दो अर्डर गर्न क्लिक गर्नुहोस्',
cancelSort: 'क्रमबद्ध नगर्नुहोस्'
},
Modal: {
okText: 'हो',
cancelText: 'होईन',
justOkText: 'हो'
},
Popconfirm: {
okText: 'हो',
cancelText: 'होईन'
},
Tour: {
Next: 'अर्को पाइला',
Previous: 'अघिल्लो',
Finish: 'भ्रमण अन्त्य गर्नुहोस्'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'यहाँ खोज्नुहोस्',
itemUnit: 'वस्तु',
itemsUnit: 'वस्तुहरू',
remove: 'मेटाउन',
selectCurrent: 'सबै हालको पृष्ठ चयन गर्नुहोस्',
removeCurrent: 'हालको पृष्ठ मेटाउनुहोस्',
selectAll: 'सबै छान्नु',
deselectAll: 'सबै अचयन गर्नुहोस्',
removeAll: 'सबै मेटाउनुहोस्',
selectInvert: 'हालको पृष्ठ उल्टाउनुहोस्'
},
Upload: {
uploading: 'अपलोड गर्दै...',
removeFile: 'फाइल हटाउनुहोस्',
uploadError: 'अप्लोडमा समस्या भयो',
previewFile: 'फाइल पूर्वावलोकन गर्नुहोस्',
downloadFile: 'डाउनलोड फाइल'
},
Empty: {
description: 'डाटा छैन'
},
Icon: {
icon: 'आइकन'
},
Text: {
edit: 'सम्पादन गर्नुहोस्',
copy: 'कापी',
copied: 'सफलतापूर्वक प्रतिलिपि गरियो',
expand: 'विस्तार गर्नुहोस्',
collapse: 'बन्द'
},
Form: {
optional: '(ऐच्छिक)',
defaultValidateMessages: {
default: 'क्षेत्र प्रमाणीकरण त्रुटि${label}',
required: 'कृपया प्रविष्ट गर्नुहोस्${label}',
enum: '${label}ती मध्ये एक हुनुपर्छ[${enum}]',
whitespace: '${label}शून्य वर्ण हुन सक्दैन',
date: {
format: '${label}अमान्य मिति ढाँचा',
parse: '${label}मितिमा रूपान्तरण गर्न सकिँदैन',
invalid: '${label}अवैध मिति हो'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}${len}वर्ण हुनुपर्छ',
min: '${label}कम्तिमा${min}पात्रहरू',
max: '${label}धेरैजसो${max}पात्रहरू',
range: '${label}मा हुनुपर्छ${min}-${max}वर्णहरू बीच'
},
number: {
len: '${label}बराबर हुनुपर्छ${len}',
min: '${label}न्यूनतम मूल्य छ${min}',
max: '${label}अधिकतम मान हो${max}',
range: '${label}मा हुनुपर्छ${min}-${max}बीचमा'
},
array: {
len: 'हुनै पर्छ${len}व्यक्तिगत${label}',
min: 'कम्तिमा${min}व्यक्तिगत${label}',
max: 'धेरैजसो${max}व्यक्तिगत${label}',
range: '${label}मात्रा भित्र हुनुपर्छ${min}-${max}बीचमा'
},
pattern: {
mismatch: '${label}ढाँचासँग मेल खाँदैन${pattern}'
}
}
},
Image: {
preview: 'पूर्वावलोकन'
},
QRCode: {
expired: 'QR कोडको म्याद सकियो',
refresh: 'रिफ्रेस गर्न क्लिक गर्नुहोस्',
scanned: 'स्क्यान गरियो'
},
ColorPicker: {
presetEmpty: 'अहिलेसम्म कुनै पनि छैन',
transparent: 'पारदर्शी',
singleColor: 'एक रंग',
gradientColor: 'ग्रेडिएण्ट'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/locale/nl_BE.ts":
/*!************************************************!*\
!*** ./components/locale/nl_BE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_nl_BE; }
});
;// ./node_modules/rc-pagination/es/locale/nl_BE.js
var locale = {
// Options
items_per_page: '/ pagina',
jump_to: 'Ga naar',
jump_to_confirm: 'bevestigen',
page: '',
// Pagination
prev_page: 'Vorige pagina',
next_page: 'Volgende pagina',
prev_5: "Vorige 5 pagina's",
next_5: "Volgende 5 pagina's",
prev_3: "Vorige 3 pagina's",
next_3: "Volgende 3 pagina's",
page_size: 'Page Size'
};
/* harmony default export */ var nl_BE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/nl_BE.js
var nl_BE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'nl_BE',
today: 'Vandaag',
now: 'Nu',
backToToday: 'Terug naar vandaag',
ok: 'OK',
clear: 'Reset',
week: 'Week',
month: 'Maand',
year: 'Jaar',
timeSelect: 'Selecteer tijd',
dateSelect: 'Selecteer datum',
monthSelect: 'Kies een maand',
yearSelect: 'Kies een jaar',
decadeSelect: 'Kies een decennium',
dateFormat: 'D-M-YYYY',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
previousMonth: 'Vorige maand (PageUp)',
nextMonth: 'Volgende maand (PageDown)',
previousYear: 'Vorig jaar (Control + left)',
nextYear: 'Volgend jaar (Control + right)',
previousDecade: 'Vorig decennium',
nextDecade: 'Volgend decennium',
previousCentury: 'Vorige eeuw',
nextCentury: 'Volgende eeuw'
});
/* harmony default export */ var locale_nl_BE = (nl_BE_locale);
;// ./components/time-picker/locale/nl_BE.ts
const locale_nl_BE_locale = {
placeholder: 'Selecteer tijd',
rangePlaceholder: ['Start tijd', 'Eind tijd']
};
/* harmony default export */ var time_picker_locale_nl_BE = (locale_nl_BE_locale);
;// ./components/date-picker/locale/nl_BE.ts
// Merge into a locale object
const date_picker_locale_nl_BE_locale = {
lang: Object.assign({
monthPlaceholder: 'Selecteer maand',
placeholder: 'Selecteer datum',
quarterPlaceholder: 'Selecteer kwartaal',
rangeMonthPlaceholder: ['Begin maand', 'Eind maand'],
rangePlaceholder: ['Begin datum', 'Eind datum'],
rangeWeekPlaceholder: ['Begin week', 'Eind week'],
rangeYearPlaceholder: ['Begin jaar', 'Eind jaar'],
weekPlaceholder: 'Selecteer week',
yearPlaceholder: 'Selecteer jaar'
}, locale_nl_BE),
timePickerLocale: Object.assign({}, time_picker_locale_nl_BE)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_nl_BE = (date_picker_locale_nl_BE_locale);
;// ./components/calendar/locale/nl_BE.ts
/* harmony default export */ var calendar_locale_nl_BE = (date_picker_locale_nl_BE);
;// ./components/locale/nl_BE.ts
const typeTemplate = '${label} is geen geldige ${type}';
const localeValues = {
locale: 'nl-be',
Pagination: nl_BE,
DatePicker: date_picker_locale_nl_BE,
TimePicker: time_picker_locale_nl_BE,
Calendar: calendar_locale_nl_BE,
global: {
placeholder: 'Maak een selectie'
},
Table: {
cancelSort: 'Klik om sortering te annuleren',
collapse: 'Rij inklappen',
emptyText: 'Geen data',
expand: 'Rij uitklappen',
filterConfirm: 'OK',
filterEmptyText: 'Geen filters',
filterReset: 'Reset',
filterTitle: 'Filteren',
selectAll: 'Selecteer huidige pagina',
selectInvert: 'Keer volgorde om',
selectNone: 'Maak selectie leeg',
selectionAll: 'Selecteer alle data',
sortTitle: 'Sorteren',
triggerAsc: 'Klik om oplopend te sorteren',
triggerDesc: 'Klik om aflopend te sorteren'
},
Tour: {
Next: 'Volgende',
Previous: 'Vorige',
Finish: 'Voltooien'
},
Modal: {
okText: 'OK',
cancelText: 'Annuleer',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuleer'
},
Transfer: {
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Verwijder',
removeAll: 'Verwijder alles',
removeCurrent: 'Verwijder huidige pagina',
searchPlaceholder: 'Zoek hier',
selectAll: 'Selecteer alles',
selectCurrent: 'Selecteer huidige pagina',
selectInvert: 'Huidige pagina omkeren',
titles: ['', '']
},
Upload: {
downloadFile: 'Bestand downloaden',
previewFile: 'Preview file',
removeFile: 'Verwijder bestand',
uploadError: 'Fout tijdens uploaden',
uploading: 'Uploaden...'
},
Empty: {
description: 'Geen gegevens'
},
Icon: {
icon: 'icoon'
},
Text: {
edit: 'Bewerken',
copy: 'kopiëren',
copied: 'Gekopieerd',
expand: 'Uitklappen'
},
Form: {
optional: '(optioneel)',
defaultValidateMessages: {
default: 'Validatiefout voor ${label}',
required: 'Gelieve ${label} in te vullen',
enum: '${label} moet één van [${enum}] zijn',
whitespace: '${label} mag geen blanco teken zijn',
date: {
format: '${label} heeft een ongeldig formaat',
parse: '${label} kan niet naar een datum omgezet worden',
invalid: '${label} is een ongeldige datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} moet ${len} karakters lang zijn',
min: '${label} moet minimaal ${min} karakters lang zijn',
max: '${label} mag maximaal ${max} karakters lang zijn',
range: '${label} moet tussen ${min}-${max} karakters lang zijn'
},
number: {
len: '${label} moet gelijk zijn aan ${len}',
min: '${label} moet minimaal ${min} zijn',
max: '${label} mag maximaal ${max} zijn',
range: '${label} moet tussen ${min}-${max} liggen'
},
array: {
len: 'Moeten ${len} ${label} zijn',
min: 'Minimaal ${min} ${label}',
max: 'maximaal ${max} ${label}',
range: 'Het aantal ${label} moet tussen ${min}-${max} liggen'
},
pattern: {
mismatch: '${label} komt niet overeen met het patroon ${pattern}'
}
}
},
Image: {
preview: 'Voorbeeld'
}
};
/* harmony default export */ var components_locale_nl_BE = (localeValues);
/***/ }),
/***/ "./components/locale/nl_NL.ts":
/*!************************************************!*\
!*** ./components/locale/nl_NL.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_nl_NL; }
});
;// ./node_modules/rc-pagination/es/locale/nl_NL.js
var locale = {
// Options
items_per_page: '/ pagina',
jump_to: 'Ga naar',
jump_to_confirm: 'bevestigen',
page: 'Pagina',
// Pagination
prev_page: 'Vorige pagina',
next_page: 'Volgende pagina',
prev_5: "Vorige 5 pagina's",
next_5: "Volgende 5 pagina's",
prev_3: "Vorige 3 pagina's",
next_3: "Volgende 3 pagina's",
page_size: 'pagina grootte'
};
/* harmony default export */ var nl_NL = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/nl_NL.js
var nl_NL_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'nl_NL',
today: 'Vandaag',
now: 'Nu',
backToToday: 'Terug naar vandaag',
ok: 'OK',
clear: 'Reset',
week: 'Week',
month: 'Maand',
year: 'Jaar',
timeSelect: 'Selecteer tijd',
dateSelect: 'Selecteer datum',
monthSelect: 'Kies een maand',
yearSelect: 'Kies een jaar',
decadeSelect: 'Kies een decennium',
dateFormat: 'D-M-YYYY',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
previousMonth: 'Vorige maand (PageUp)',
nextMonth: 'Volgende maand (PageDown)',
previousYear: 'Vorig jaar (Control + left)',
nextYear: 'Volgend jaar (Control + right)',
previousDecade: 'Vorig decennium',
nextDecade: 'Volgend decennium',
previousCentury: 'Vorige eeuw',
nextCentury: 'Volgende eeuw'
});
/* harmony default export */ var locale_nl_NL = (nl_NL_locale);
;// ./components/time-picker/locale/nl_NL.ts
const locale_nl_NL_locale = {
placeholder: 'Selecteer tijd',
rangePlaceholder: ['Start tijd', 'Eind tijd']
};
/* harmony default export */ var time_picker_locale_nl_NL = (locale_nl_NL_locale);
;// ./components/date-picker/locale/nl_NL.ts
// Merge into a locale object
const date_picker_locale_nl_NL_locale = {
lang: Object.assign({
monthPlaceholder: 'Selecteer maand',
placeholder: 'Selecteer datum',
quarterPlaceholder: 'Selecteer kwartaal',
rangeMonthPlaceholder: ['Begin maand', 'Eind maand'],
rangePlaceholder: ['Begin datum', 'Eind datum'],
rangeWeekPlaceholder: ['Begin week', 'Eind week'],
rangeYearPlaceholder: ['Begin jaar', 'Eind jaar'],
weekPlaceholder: 'Selecteer week',
yearPlaceholder: 'Selecteer jaar'
}, locale_nl_NL),
timePickerLocale: Object.assign({}, time_picker_locale_nl_NL)
};
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
/* harmony default export */ var date_picker_locale_nl_NL = (date_picker_locale_nl_NL_locale);
;// ./components/calendar/locale/nl_NL.ts
/* harmony default export */ var calendar_locale_nl_NL = (date_picker_locale_nl_NL);
;// ./components/locale/nl_NL.ts
const typeTemplate = '${label} is geen geldige ${type}';
const localeValues = {
locale: 'nl',
Pagination: nl_NL,
DatePicker: date_picker_locale_nl_NL,
TimePicker: time_picker_locale_nl_NL,
Calendar: calendar_locale_nl_NL,
global: {
placeholder: 'Maak een selectie'
},
Table: {
cancelSort: 'Klik om sortering te annuleren',
collapse: 'Rij inklappen',
emptyText: 'Geen data',
expand: 'Rij uitklappen',
filterConfirm: 'OK',
filterEmptyText: 'Geen filters',
filterReset: 'Reset',
filterTitle: 'Filteren',
selectAll: 'Selecteer huidige pagina',
selectInvert: 'Keer volgorde om',
selectNone: 'Maak selectie leeg',
selectionAll: 'Selecteer alle data',
sortTitle: 'Sorteren',
triggerAsc: 'Klik om oplopend te sorteren',
triggerDesc: 'Klik om aflopend te sorteren'
},
Tour: {
Next: 'Volgende',
Previous: 'Vorige',
Finish: 'Voltooien'
},
Modal: {
okText: 'OK',
cancelText: 'Annuleer',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuleer'
},
Transfer: {
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Verwijder',
removeAll: 'Verwijder alles',
removeCurrent: 'Verwijder huidige pagina',
searchPlaceholder: 'Zoek hier',
selectAll: 'Selecteer alles',
selectCurrent: 'Selecteer huidige pagina',
selectInvert: 'Huidige pagina omkeren',
titles: ['', '']
},
Upload: {
downloadFile: 'Bestand downloaden',
previewFile: 'Preview file',
removeFile: 'Verwijder bestand',
uploadError: 'Fout tijdens uploaden',
uploading: 'Uploaden...'
},
Empty: {
description: 'Geen gegevens'
},
Icon: {
icon: 'icoon'
},
Text: {
edit: 'Bewerken',
copy: 'kopiëren',
copied: 'Gekopieerd',
expand: 'Uitklappen'
},
Form: {
optional: '(optioneel)',
defaultValidateMessages: {
default: 'Validatiefout voor ${label}',
required: 'Gelieve ${label} in te vullen',
enum: '${label} moet één van [${enum}] zijn',
whitespace: '${label} mag geen blanco teken zijn',
date: {
format: '${label} heeft een ongeldig formaat',
parse: '${label} kan niet naar een datum omgezet worden',
invalid: '${label} is een ongeldige datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} moet ${len} karakters lang zijn',
min: '${label} moet minimaal ${min} karakters lang zijn',
max: '${label} mag maximaal ${max} karakters lang zijn',
range: '${label} moet tussen ${min}-${max} karakters lang zijn'
},
number: {
len: '${label} moet gelijk zijn aan ${len}',
min: '${label} moet minimaal ${min} zijn',
max: '${label} mag maximaal ${max} zijn',
range: '${label} moet tussen ${min}-${max} liggen'
},
array: {
len: 'Moeten ${len} ${label} zijn',
min: 'Minimaal ${min} ${label}',
max: 'maximaal ${max} ${label}',
range: 'Het aantal ${label} moet tussen ${min}-${max} liggen'
},
pattern: {
mismatch: '${label} komt niet overeen met het patroon ${pattern}'
}
}
},
Image: {
preview: 'Voorbeeld'
}
};
/* harmony default export */ var components_locale_nl_NL = (localeValues);
/***/ }),
/***/ "./components/locale/pl_PL.ts":
/*!************************************************!*\
!*** ./components/locale/pl_PL.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_pl_PL; }
});
;// ./node_modules/rc-pagination/es/locale/pl_PL.js
var locale = {
// Options
items_per_page: 'na stronę',
jump_to: 'Idź do',
jump_to_confirm: 'potwierdź',
page: '',
// Pagination
prev_page: 'Poprzednia strona',
next_page: 'Następna strona',
prev_5: 'Poprzednie 5 stron',
next_5: 'Następne 5 stron',
prev_3: 'Poprzednie 3 strony',
next_3: 'Następne 3 strony',
page_size: 'rozmiar strony'
};
/* harmony default export */ var pl_PL = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/pl_PL.js
var pl_PL_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'pl_PL',
today: 'Dzisiaj',
now: 'Teraz',
backToToday: 'Ustaw dzisiaj',
ok: 'OK',
clear: 'Wyczyść',
week: 'Tydzień',
month: 'Miesiąc',
year: 'Rok',
timeSelect: 'Ustaw czas',
dateSelect: 'Ustaw datę',
monthSelect: 'Wybierz miesiąc',
yearSelect: 'Wybierz rok',
decadeSelect: 'Wybierz dekadę',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Poprzedni miesiąc (PageUp)',
nextMonth: 'Następny miesiąc (PageDown)',
previousYear: 'Ostatni rok (Ctrl + left)',
nextYear: 'Następny rok (Ctrl + right)',
previousDecade: 'Ostatnia dekada',
nextDecade: 'Następna dekada',
previousCentury: 'Ostatni wiek',
nextCentury: 'Następny wiek'
});
/* harmony default export */ var locale_pl_PL = (pl_PL_locale);
;// ./components/time-picker/locale/pl_PL.ts
const locale_pl_PL_locale = {
placeholder: 'Wybierz godzinę'
};
/* harmony default export */ var time_picker_locale_pl_PL = (locale_pl_PL_locale);
;// ./components/date-picker/locale/pl_PL.ts
// Merge into a locale object
const date_picker_locale_pl_PL_locale = {
lang: Object.assign({
placeholder: 'Wybierz datę',
rangePlaceholder: ['Data początkowa', 'Data końcowa'],
yearFormat: 'YYYY',
monthFormat: 'MMMM',
monthBeforeYear: true,
shortWeekDays: ['Niedz', 'Pon', 'Wt', 'Śr', 'Czw', 'Pt', 'Sob'],
shortMonths: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru']
}, locale_pl_PL),
timePickerLocale: Object.assign({}, time_picker_locale_pl_PL)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_pl_PL = (date_picker_locale_pl_PL_locale);
;// ./components/calendar/locale/pl_PL.ts
/* harmony default export */ var calendar_locale_pl_PL = (date_picker_locale_pl_PL);
;// ./components/locale/pl_PL.ts
const typeTemplate = '${label} nie posiada poprawnej wartości dla typu ${type}';
const localeValues = {
locale: 'pl',
Pagination: pl_PL,
DatePicker: date_picker_locale_pl_PL,
TimePicker: time_picker_locale_pl_PL,
Calendar: calendar_locale_pl_PL,
global: {
placeholder: 'Wybierz'
},
Table: {
filterTitle: 'Menu filtra',
filterConfirm: 'OK',
filterReset: 'Usuń filtry',
filterEmptyText: 'Brak filtrów',
filterCheckAll: 'Wybierz wszystkie elementy',
filterSearchPlaceholder: 'Szukaj w filtrach',
emptyText: 'Brak danych',
selectAll: 'Zaznacz bieżącą stronę',
selectInvert: 'Odwróć zaznaczenie',
selectNone: 'Wyczyść',
selectionAll: 'Wybierz wszystkie',
sortTitle: 'Sortowanie',
expand: 'Rozwiń wiersz',
collapse: 'Zwiń wiersz',
triggerDesc: 'Sortuj malejąco',
triggerAsc: 'Sortuj rosnąco',
cancelSort: 'Usuń sortowanie'
},
Tour: {
Next: 'Dalej',
Previous: 'Wróć',
Finish: 'Zakończ'
},
Modal: {
okText: 'OK',
cancelText: 'Anuluj',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Anuluj'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Szukaj',
itemUnit: 'obiekt',
itemsUnit: 'obiekty',
remove: 'Usuń',
selectCurrent: 'Wybierz aktualną stronę',
removeCurrent: 'Usuń aktualną stronę',
selectAll: 'Wybierz wszystkie',
removeAll: 'Usuń wszystkie',
selectInvert: 'Odwróć wybór'
},
Upload: {
uploading: 'Wysyłanie...',
removeFile: 'Usuń plik',
uploadError: 'Błąd wysyłania',
previewFile: 'Podejrzyj plik',
downloadFile: 'Pobieranie pliku'
},
Empty: {
description: 'Brak danych'
},
Icon: {
icon: 'Ikona'
},
Text: {
edit: 'Edytuj',
copy: 'Kopiuj',
copied: 'Skopiowany',
expand: 'Rozwiń'
},
Form: {
optional: '(opcjonalne)',
defaultValidateMessages: {
default: 'Błąd walidacji dla pola ${label}',
required: 'Pole ${label} jest wymagane',
enum: 'Pole ${label} musi posiadać wartość z listy: [${enum}]',
whitespace: 'Pole ${label} nie może być puste',
date: {
format: '${label} posiada zły format daty',
parse: '${label} nie może zostać zinterpretowane jako data',
invalid: '${label} jest niepoprawną datą'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} musi posiadać ${len} znaków',
min: '${label} musi posiadać co namniej ${min} znaków',
max: '${label} musi posiadać maksymalnie ${max} znaków',
range: '${label} musi posiadać między ${min} a ${max} znaków'
},
number: {
len: '${label} musi mieć wartość o długości ${len}',
min: '${label} musi mieć wartość większą lub równą ${min}',
max: '${label} musi mieć wartość mniejszą lub równą ${max}',
range: '${label} musi mieć wartość pomiędzy ${min} a ${max}'
},
array: {
len: '${label} musi posiadać ${len} elementów',
min: '${label} musi posiadać co najmniej ${min} elementów',
max: '${label} musi posiadać maksymalnie ${max} elementów',
range: '${label} musi posiadać między ${min} a ${max} elementów'
},
pattern: {
mismatch: '${label} nie posiada wartości zgodnej ze wzorem ${pattern}'
}
}
},
Image: {
preview: 'Podgląd'
}
};
/* harmony default export */ var components_locale_pl_PL = (localeValues);
/***/ }),
/***/ "./components/locale/pt_BR.ts":
/*!************************************************!*\
!*** ./components/locale/pt_BR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_pt_BR; }
});
;// ./node_modules/rc-pagination/es/locale/pt_BR.js
var locale = {
// Options
items_per_page: '/ página',
jump_to: 'Vá até',
jump_to_confirm: 'confirme',
page: 'Página',
// Pagination
prev_page: 'Página anterior',
next_page: 'Próxima página',
prev_5: '5 páginas anteriores',
next_5: '5 próximas páginas',
prev_3: '3 páginas anteriores',
next_3: '3 próximas páginas',
page_size: 'tamanho da página'
};
/* harmony default export */ var pt_BR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/pt_BR.js
var pt_BR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'pt_BR',
today: 'Hoje',
now: 'Agora',
backToToday: 'Voltar para hoje',
ok: 'OK',
clear: 'Limpar',
week: 'Semana',
month: 'Mês',
year: 'Ano',
timeSelect: 'Selecionar hora',
dateSelect: 'Selecionar data',
monthSelect: 'Escolher mês',
yearSelect: 'Escolher ano',
decadeSelect: 'Escolher década',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: false,
previousMonth: 'Mês anterior (PageUp)',
nextMonth: 'Próximo mês (PageDown)',
previousYear: 'Ano anterior (Control + esquerda)',
nextYear: 'Próximo ano (Control + direita)',
previousDecade: 'Década anterior',
nextDecade: 'Próxima década',
previousCentury: 'Século anterior',
nextCentury: 'Próximo século',
shortWeekDays: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'],
shortMonths: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez']
});
/* harmony default export */ var locale_pt_BR = (pt_BR_locale);
;// ./components/time-picker/locale/pt_BR.ts
const locale_pt_BR_locale = {
placeholder: 'Hora'
};
/* harmony default export */ var time_picker_locale_pt_BR = (locale_pt_BR_locale);
;// ./components/date-picker/locale/pt_BR.ts
// Merge into a locale object
const date_picker_locale_pt_BR_locale = {
lang: Object.assign({
placeholder: 'Selecionar data',
rangePlaceholder: ['Data inicial', 'Data final']
}, locale_pt_BR),
timePickerLocale: Object.assign({}, time_picker_locale_pt_BR)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_pt_BR = (date_picker_locale_pt_BR_locale);
;// ./components/calendar/locale/pt_BR.ts
/* harmony default export */ var calendar_locale_pt_BR = (date_picker_locale_pt_BR);
;// ./components/locale/pt_BR.ts
const typeTemplate = '${label} não é um ${type} válido';
const localeValues = {
locale: 'pt-br',
Pagination: pt_BR,
DatePicker: date_picker_locale_pt_BR,
TimePicker: time_picker_locale_pt_BR,
Calendar: calendar_locale_pt_BR,
global: {
placeholder: 'Por favor escolha'
},
Table: {
filterTitle: 'Menu de Filtro',
filterConfirm: 'OK',
filterReset: 'Resetar',
filterEmptyText: 'Sem filtros',
filterCheckAll: 'Selecionar todos os itens',
filterSearchPlaceholder: 'Pesquisar nos filtros',
emptyText: 'Sem conteúdo',
selectAll: 'Selecionar página atual',
selectInvert: 'Inverter seleção',
selectNone: 'Apagar todo o conteúdo',
selectionAll: 'Selecionar todo o conteúdo',
sortTitle: 'Ordenar título',
expand: 'Expandir linha',
collapse: 'Colapsar linha',
triggerDesc: 'Clique organiza por descendente',
triggerAsc: 'Clique organiza por ascendente',
cancelSort: 'Clique para cancelar organização'
},
Tour: {
Next: 'Próximo',
Previous: 'Anterior',
Finish: 'Finalizar'
},
Modal: {
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancelar'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Procurar',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remover',
selectCurrent: 'Selecionar página atual',
removeCurrent: 'Remover página atual',
selectAll: 'Selecionar todos',
removeAll: 'Remover todos',
selectInvert: 'Inverter seleção atual'
},
Upload: {
uploading: 'Enviando...',
removeFile: 'Remover arquivo',
uploadError: 'Erro no envio',
previewFile: 'Visualizar arquivo',
downloadFile: 'Baixar arquivo'
},
Empty: {
description: 'Não há dados'
},
Icon: {
icon: 'ícone'
},
Text: {
edit: 'editar',
copy: 'copiar',
copied: 'copiado',
expand: 'expandir'
},
Form: {
optional: '(opcional)',
defaultValidateMessages: {
default: 'Erro ${label} na validação de campo',
required: 'Por favor, insira ${label}',
enum: '${label} deve ser um dos seguinte: [${enum}]',
whitespace: '${label} não pode ser um carácter vazio',
date: {
format: ' O formato de data ${label} é inválido',
parse: '${label} não pode ser convertido para uma data',
invalid: '${label} é uma data inválida'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} deve possuir ${len} caracteres',
min: '${label} deve possuir ao menos ${min} caracteres',
max: '${label} deve possuir no máximo ${max} caracteres',
range: '${label} deve possuir entre ${min} e ${max} caracteres'
},
number: {
len: '${label} deve ser igual à ${len}',
min: 'O valor mínimo de ${label} é ${min}',
max: 'O valor máximo de ${label} é ${max}',
range: '${label} deve estar entre ${min} e ${max}'
},
array: {
len: 'Deve ser ${len} ${label}',
min: 'No mínimo ${min} ${label}',
max: 'No máximo ${max} ${label}',
range: 'A quantidade de ${label} deve estar entre ${min} e ${max}'
},
pattern: {
mismatch: '${label} não se encaixa no padrão ${pattern}'
}
}
},
Image: {
preview: 'Pré-visualização'
}
};
/* harmony default export */ var components_locale_pt_BR = (localeValues);
/***/ }),
/***/ "./components/locale/pt_PT.ts":
/*!************************************************!*\
!*** ./components/locale/pt_PT.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_pt_PT; }
});
;// ./node_modules/rc-pagination/es/locale/pt_PT.js
var locale = {
// Options
items_per_page: '/ página',
jump_to: 'Saltar',
jump_to_confirm: 'confirmar',
page: 'Página',
// Pagination
prev_page: 'Página Anterior',
next_page: 'Página Seguinte',
prev_5: 'Recuar 5 Páginas',
next_5: 'Avançar 5 Páginas',
prev_3: 'Recuar 3 Páginas',
next_3: 'Avançar 3 Páginas',
page_size: 'mărimea paginii'
};
/* harmony default export */ var pt_PT = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/pt_PT.js
var pt_PT_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'pt_PT',
today: 'Hoje',
now: 'Agora',
backToToday: 'Hoje',
ok: 'OK',
clear: 'Limpar',
week: 'Semana',
month: 'Mês',
year: 'Ano',
timeSelect: 'Selecionar hora',
dateSelect: 'Selecionar data',
monthSelect: 'Selecionar mês',
yearSelect: 'Selecionar ano',
decadeSelect: 'Selecionar década',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Mês anterior (PageUp)',
nextMonth: 'Mês seguinte (PageDown)',
previousYear: 'Ano anterior (Control + left)',
nextYear: 'Ano seguinte (Control + right)',
previousDecade: 'Década anterior',
nextDecade: 'Década seguinte',
previousCentury: 'Século anterior',
nextCentury: 'Século seguinte',
shortWeekDays: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'],
shortMonths: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez']
});
/* harmony default export */ var locale_pt_PT = (pt_PT_locale);
;// ./components/time-picker/locale/pt_PT.ts
const locale_pt_PT_locale = {
placeholder: 'Hora'
};
/* harmony default export */ var time_picker_locale_pt_PT = (locale_pt_PT_locale);
;// ./components/date-picker/locale/pt_PT.ts
// Merge into a locale object
const date_picker_locale_pt_PT_locale = {
lang: Object.assign(Object.assign({}, locale_pt_PT), {
placeholder: 'Data',
rangePlaceholder: ['Data inicial', 'Data final'],
today: 'Hoje',
now: 'Agora',
backToToday: 'Hoje',
ok: 'OK',
clear: 'Limpar',
month: 'Mês',
year: 'Ano',
timeSelect: 'Hora',
dateSelect: 'Selecionar data',
monthSelect: 'Selecionar mês',
yearSelect: 'Selecionar ano',
decadeSelect: 'Selecionar década',
yearFormat: 'YYYY',
monthFormat: 'MMMM',
monthBeforeYear: false,
previousMonth: 'Mês anterior (PageUp)',
nextMonth: 'Mês seguinte (PageDown)',
previousYear: 'Ano anterior (Control + left)',
nextYear: 'Ano seguinte (Control + right)',
previousDecade: 'Última década',
nextDecade: 'Próxima década',
previousCentury: 'Último século',
nextCentury: 'Próximo século'
}),
timePickerLocale: Object.assign(Object.assign({}, time_picker_locale_pt_PT), {
placeholder: 'Hora'
})
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_pt_PT = (date_picker_locale_pt_PT_locale);
;// ./components/calendar/locale/pt_PT.ts
/* harmony default export */ var calendar_locale_pt_PT = (date_picker_locale_pt_PT);
;// ./components/locale/pt_PT.ts
const typeTemplate = '${label} não é um(a) ${type} válido(a)';
const localeValues = {
locale: 'pt',
Pagination: pt_PT,
DatePicker: date_picker_locale_pt_PT,
TimePicker: time_picker_locale_pt_PT,
Calendar: calendar_locale_pt_PT,
global: {
placeholder: 'Por favor, selecione'
},
Table: {
filterTitle: 'Filtro',
filterConfirm: 'Aplicar',
filterReset: 'Repor',
filterEmptyText: 'Sem filtros',
filterCheckAll: 'Selecionar todos os itens',
filterSearchPlaceholder: 'Pesquisar nos filtros',
emptyText: 'Sem dados',
selectAll: 'Selecionar página atual',
selectInvert: 'Inverter página atual',
selectNone: 'Limpar todos os dados',
selectionAll: 'Selecionar todos os dados',
sortTitle: 'Ordenar',
expand: 'Expandir linha',
collapse: 'Colapsar linha',
triggerDesc: 'Clique para ordenar decrescente',
triggerAsc: 'Clique para ordenar crescente',
cancelSort: 'Clique para cancelar ordenação'
},
Tour: {
Next: 'Próximo',
Previous: 'Anterior',
Finish: 'Terminar'
},
Modal: {
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancelar'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Procurar...',
itemUnit: 'item',
itemsUnit: 'itens',
remove: 'Remover',
selectCurrent: 'Selecionar página atual',
removeCurrent: 'Remover página atual',
selectAll: 'Selecionar tudo',
deselectAll: 'Desmarcar tudo',
removeAll: 'Remover tudo',
selectInvert: 'Inverter página actual'
},
Upload: {
uploading: 'A carregar...',
removeFile: 'Remover',
uploadError: 'Erro ao carregar',
previewFile: 'Pré-visualizar',
downloadFile: 'Descarregar'
},
Empty: {
description: 'Sem dados'
},
Icon: {
icon: 'ícone'
},
Text: {
edit: 'Editar',
copy: 'Copiar',
copied: 'Copiado',
expand: 'Expandir',
collapse: 'Colapsar'
},
Form: {
optional: '(opcional)',
defaultValidateMessages: {
default: 'Erro de validação no campo ${label}',
required: 'Por favor, introduza ${label}',
enum: '${label} deve ser um dos valores [${enum}]',
whitespace: '${label} não pode ser um carácter em branco',
date: {
format: 'Formato da data ${label} é inválido',
parse: '${label} não pode ser convertido para data',
invalid: '${label} é uma data inválida'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} deve ter ${len} caracteres',
min: '${label} deve ter pelo menos ${min} caracteres',
max: '${label} deve ter até ${max} caracteres',
range: '${label} deve ter entre ${min}-${max} caracteres'
},
number: {
len: '${label} deve ser igual a ${len}',
min: '${label} deve ser no mínimo ${min}',
max: '${label} deve ser no máximo ${max}',
range: '${label} deve estar entre ${min}-${max}'
},
array: {
len: 'Deve ter ${len} ${label}',
min: 'Pelo menos ${min} ${label}',
max: 'No máximo ${max} ${label}',
range: 'A quantidade de ${label} deve estar entre ${min}-${max}'
},
pattern: {
mismatch: '${label} não corresponde ao padrão ${pattern}'
}
}
},
Image: {
preview: 'Pré-visualizar'
},
QRCode: {
expired: 'Código QR expirou',
refresh: 'Atualizar',
scanned: 'Digitalizado'
},
ColorPicker: {
presetEmpty: 'Vazio',
transparent: 'Transparente',
singleColor: 'Simples',
gradientColor: 'Gradiente'
}
};
/* harmony default export */ var components_locale_pt_PT = (localeValues);
/***/ }),
/***/ "./components/locale/ro_RO.ts":
/*!************************************************!*\
!*** ./components/locale/ro_RO.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ro_RO; }
});
;// ./node_modules/rc-pagination/es/locale/ro_RO.js
var locale = {
// Options
items_per_page: '/ pagină',
jump_to: 'Mergi la',
jump_to_confirm: 'confirm',
page: '',
// Pagination
prev_page: 'Pagina Anterioară',
next_page: 'Pagina Următoare',
prev_5: '5 Pagini Anterioare',
next_5: '5 Pagini Următoare',
prev_3: '3 Pagini Anterioare',
next_3: '3 Pagini Următoare',
page_size: 'Page Size'
};
/* harmony default export */ var ro_RO = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ro_RO.js
var ro_RO_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ro_RO',
today: 'Azi',
now: 'Acum',
backToToday: 'Înapoi la azi',
ok: 'OK',
clear: 'Șterge',
week: 'Săptămână',
month: 'Lună',
year: 'An',
timeSelect: 'selectează timpul',
dateSelect: 'selectează data',
weekSelect: 'Alege o săptămână',
monthSelect: 'Alege o lună',
yearSelect: 'Alege un an',
decadeSelect: 'Alege un deceniu',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Luna anterioară (PageUp)',
nextMonth: 'Luna următoare (PageDown)',
previousYear: 'Anul anterior (Control + stânga)',
nextYear: 'Anul următor (Control + dreapta)',
previousDecade: 'Deceniul anterior',
nextDecade: 'Deceniul următor',
previousCentury: 'Secolul anterior',
nextCentury: 'Secolul următor'
});
/* harmony default export */ var locale_ro_RO = (ro_RO_locale);
;// ./components/time-picker/locale/ro_RO.ts
const locale_ro_RO_locale = {
placeholder: 'Selectează ora'
};
/* harmony default export */ var time_picker_locale_ro_RO = (locale_ro_RO_locale);
;// ./components/date-picker/locale/ro_RO.ts
// Merge into a locale object
const date_picker_locale_ro_RO_locale = {
lang: Object.assign({
placeholder: 'Selectează data',
rangePlaceholder: ['Data start', 'Data sfârșit']
}, locale_ro_RO),
timePickerLocale: Object.assign({}, time_picker_locale_ro_RO)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ro_RO = (date_picker_locale_ro_RO_locale);
;// ./components/calendar/locale/ro_RO.ts
/* harmony default export */ var calendar_locale_ro_RO = (date_picker_locale_ro_RO);
;// ./components/locale/ro_RO.ts
const typeTemplate = '${label} nu conține tipul corect (${type})';
const localeValues = {
locale: 'ro',
Pagination: ro_RO,
DatePicker: date_picker_locale_ro_RO,
TimePicker: time_picker_locale_ro_RO,
Calendar: calendar_locale_ro_RO,
global: {
placeholder: 'Selectează'
},
Table: {
filterTitle: 'Filtrează',
filterConfirm: 'OK',
filterReset: 'Resetează',
filterEmptyText: 'Fără filtre',
emptyText: 'Nu există date',
selectAll: 'Selectează pagina curentă',
selectInvert: 'Inversează pagina curentă',
selectNone: 'Șterge selecția',
selectionAll: 'Selectează toate datele',
sortTitle: 'Ordonează',
expand: 'Extinde rândul',
collapse: 'Micșorează rândul',
triggerDesc: 'Apasă pentru ordonare descrescătoare',
triggerAsc: 'Apasă pentru ordonare crescătoare',
cancelSort: 'Apasă pentru a anula ordonarea'
},
Modal: {
okText: 'OK',
cancelText: 'Anulare',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Anulare'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Căutare',
itemUnit: 'element',
itemsUnit: 'elemente',
remove: 'Șterge',
selectCurrent: 'Selectează pagina curentă',
removeCurrent: 'Șterge pagina curentă',
selectAll: 'Selectează toate datele',
removeAll: 'Șterge toate datele',
selectInvert: 'Inversează pagina curentă'
},
Upload: {
uploading: 'Se transferă...',
removeFile: 'Înlătură fișierul',
uploadError: 'Eroare la upload',
previewFile: 'Previzualizare fișier',
downloadFile: 'Descărcare fișier'
},
Empty: {
description: 'Fără date'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'editează',
copy: 'copiază',
copied: 'copiat',
expand: 'extinde'
},
Form: {
optional: '(opțional)',
defaultValidateMessages: {
default: 'Eroare la validarea câmpului ${label}',
required: 'Vă rugăm introduceți ${label}',
enum: '${label} trebuie să fie una din valorile [${enum}]',
whitespace: '${label} nu poate fi gol',
date: {
format: '${label} - data nu este în formatul corect',
parse: '${label} nu poate fi convertit la o dată',
invalid: '${label} este o dată invalidă'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} trebuie să conțină ${len} caractere',
min: '${label} trebuie să conțină cel puțin ${min} caractere',
max: '${label} trebuie să conțină cel mult ${max} caractere',
range: '${label} trebuie să conțină între ${min}-${max} caractere'
},
number: {
len: '${label} trebuie să conțină ${len} cifre',
min: '${label} trebuie să fie minim ${min}',
max: '${label} trebuie să fie maxim ${max}',
range: '${label} trebuie să fie între ${min}-${max}'
},
array: {
len: '${label} trebuie să conțină ${len} elemente',
min: '${label} trebuie să conțină cel puțin ${min} elemente',
max: '${label} trebuie să conțină cel mult ${max} elemente',
range: '${label} trebuie să conțină între ${min}-${max} elemente'
},
pattern: {
mismatch: '${label} nu respectă șablonul ${pattern}'
}
}
},
Image: {
preview: 'Preview'
}
};
/* harmony default export */ var components_locale_ro_RO = (localeValues);
/***/ }),
/***/ "./components/locale/ru_RU.ts":
/*!************************************************!*\
!*** ./components/locale/ru_RU.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ru_RU; }
});
;// ./node_modules/rc-pagination/es/locale/ru_RU.js
var locale = {
// Options
items_per_page: '/ стр.',
jump_to: 'Перейти',
jump_to_confirm: 'подтвердить',
page: 'Страница',
// Pagination
prev_page: 'Назад',
next_page: 'Вперед',
prev_5: 'Предыдущие 5',
next_5: 'Следующие 5',
prev_3: 'Предыдущие 3',
next_3: 'Следующие 3',
page_size: 'размер страницы'
};
/* harmony default export */ var ru_RU = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ru_RU.js
var ru_RU_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ru_RU',
today: 'Сегодня',
now: 'Сейчас',
backToToday: 'Текущая дата',
ok: 'ОК',
clear: 'Очистить',
week: 'Неделя',
month: 'Месяц',
year: 'Год',
timeSelect: 'Выбрать время',
dateSelect: 'Выбрать дату',
monthSelect: 'Выбрать месяц',
yearSelect: 'Выбрать год',
decadeSelect: 'Выбрать десятилетие',
dateFormat: 'D-M-YYYY',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
previousMonth: 'Предыдущий месяц (PageUp)',
nextMonth: 'Следующий месяц (PageDown)',
previousYear: 'Предыдущий год (Control + left)',
nextYear: 'Следующий год (Control + right)',
previousDecade: 'Предыдущее десятилетие',
nextDecade: 'Следущее десятилетие',
previousCentury: 'Предыдущий век',
nextCentury: 'Следующий век'
});
/* harmony default export */ var locale_ru_RU = (ru_RU_locale);
;// ./components/time-picker/locale/ru_RU.ts
const locale_ru_RU_locale = {
placeholder: 'Выберите время',
rangePlaceholder: ['Время начала', 'Время окончания']
};
/* harmony default export */ var time_picker_locale_ru_RU = (locale_ru_RU_locale);
;// ./components/date-picker/locale/ru_RU.ts
/** Created by Andrey Gayvoronsky on 13/04/16. */
// Merge into a locale object
const date_picker_locale_ru_RU_locale = {
lang: Object.assign({
placeholder: 'Выберите дату',
yearPlaceholder: 'Выберите год',
quarterPlaceholder: 'Выберите квартал',
monthPlaceholder: 'Выберите месяц',
weekPlaceholder: 'Выберите неделю',
rangePlaceholder: ['Начальная дата', 'Конечная дата'],
rangeYearPlaceholder: ['Начальный год', 'Год окончания'],
rangeMonthPlaceholder: ['Начальный месяц', 'Конечный месяц'],
rangeWeekPlaceholder: ['Начальная неделя', 'Конечная неделя'],
shortWeekDays: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
shortMonths: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек']
}, locale_ru_RU),
timePickerLocale: Object.assign({}, time_picker_locale_ru_RU)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ru_RU = (date_picker_locale_ru_RU_locale);
;// ./components/calendar/locale/ru_RU.ts
/* harmony default export */ var calendar_locale_ru_RU = (date_picker_locale_ru_RU);
;// ./components/locale/ru_RU.ts
const typeTemplate = '${label} не является типом ${type}';
const localeValues = {
locale: 'ru',
Pagination: ru_RU,
DatePicker: date_picker_locale_ru_RU,
TimePicker: time_picker_locale_ru_RU,
Calendar: calendar_locale_ru_RU,
global: {
placeholder: 'Пожалуйста выберите'
},
Table: {
filterTitle: 'Фильтр',
filterConfirm: 'OK',
filterReset: 'Сбросить',
filterEmptyText: 'Без фильтров',
filterCheckAll: 'Выбрать все элементы',
filterSearchPlaceholder: 'Поиск в фильтрах',
emptyText: 'Нет данных',
selectAll: 'Выбрать всё',
selectInvert: 'Инвертировать выбор',
selectNone: 'Очистить все данные',
selectionAll: 'Выбрать все данные',
sortTitle: 'Сортировка',
expand: 'Развернуть строку',
collapse: 'Свернуть строку',
triggerDesc: 'Нажмите для сортировки по убыванию',
triggerAsc: 'Нажмите для сортировки по возрастанию',
cancelSort: 'Нажмите, чтобы отменить сортировку'
},
Tour: {
Next: 'Далее',
Previous: 'Назад',
Finish: 'Завершить'
},
Modal: {
okText: 'OK',
cancelText: 'Отмена',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Отмена'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Поиск',
itemUnit: 'элем.',
itemsUnit: 'элем.',
remove: 'Удалить',
selectAll: 'Выбрать все данные',
deselectAll: 'Очистить все данные',
selectCurrent: 'Выбрать текущую страницу',
selectInvert: 'Инвертировать выбор',
removeAll: 'Удалить все данные',
removeCurrent: 'Удалить текущую страницу'
},
Upload: {
uploading: 'Загрузка...',
removeFile: 'Удалить файл',
uploadError: 'При загрузке произошла ошибка',
previewFile: 'Предпросмотр файла',
downloadFile: 'Загрузить файл'
},
Empty: {
description: 'Нет данных'
},
Icon: {
icon: 'иконка'
},
Text: {
edit: 'Редактировать',
copy: 'Копировать',
copied: 'Скопировано',
expand: 'Раскрыть',
collapse: 'Свернуть'
},
Form: {
optional: '(необязательно)',
defaultValidateMessages: {
default: 'Ошибка проверки поля ${label}',
required: 'Пожалуйста, введите ${label}',
enum: '${label} должен быть одним из [${enum}]',
whitespace: '${label} не может быть пустым',
date: {
format: '${label} не правильный формат даты',
parse: '${label} не может быть преобразовано в дату',
invalid: '${label} не является корректной датой'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} должна быть ${len} символов',
min: '${label} должна быть больше или равна ${min} символов',
max: '${label} должна быть меньше или равна ${max} символов',
range: 'Длина ${label} должна быть между ${min}-${max} символами'
},
number: {
len: '${label} должна быть равна ${len}',
min: '${label} должна быть больше или равна ${min}',
max: '${label} должна быть меньше или равна ${max}',
range: '${label} должна быть между ${min}-${max}'
},
array: {
len: 'Количество элементов ${label} должно быть равно ${len}',
min: 'Количество элементов ${label} должно быть больше или равно ${min}',
max: 'Количество элементов ${label} должно быть меньше или равно ${max}',
range: 'Количество элементов ${label} должно быть между ${min} и ${max}'
},
pattern: {
mismatch: '${label} не соответствует шаблону ${pattern}'
}
}
},
Image: {
preview: 'Предпросмотр'
},
QRCode: {
expired: 'QR-код устарел',
refresh: 'Обновить'
},
ColorPicker: {
presetEmpty: 'Пустой',
transparent: 'Прозрачный',
singleColor: 'Один цвет',
gradientColor: 'Градиент'
}
};
/* harmony default export */ var components_locale_ru_RU = (localeValues);
/***/ }),
/***/ "./components/locale/si_LK.ts":
/*!************************************************!*\
!*** ./components/locale/si_LK.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_si_LK; }
});
;// ./node_modules/rc-pagination/es/locale/si_LK.js
var locale = {
// Options
items_per_page: '/ පිටුව',
jump_to: 'වෙත යන්න',
jump_to_confirm: 'තහවුරු',
page: 'පිටුව',
// Pagination
prev_page: 'කලින් පිටුව',
next_page: 'ඊළඟ පිටුව',
prev_5: 'කලින් පිටු 5',
next_5: 'ඊළඟ පිටු 5',
prev_3: 'කලින් පිටු 3',
next_3: 'ඊළඟ පිටු 3',
page_size: 'පිටුවේ ප්රමාණය'
};
/* harmony default export */ var si_LK = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/si_LK.js
var si_LK_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'si_LK',
today: 'අද',
now: 'දැන්',
backToToday: 'අදට ආපසු',
ok: 'හරි',
clear: 'හිස් කරන්න',
week: 'සතිය',
month: 'මාසය',
year: 'අවුරුද්ද',
timeSelect: 'වේලාවක් තෝරන්න',
dateSelect: 'දිනයක් තෝරන්න',
weekSelect: 'සතියක් තෝරන්න',
monthSelect: 'මාසයක් තෝරන්න',
yearSelect: 'අවුරුද්දක් තෝරන්න',
decadeSelect: 'දශකයක් තෝරන්න',
dateFormat: 'YYYY/M/D',
dateTimeFormat: 'YYYY/M/D HH:mm:ss',
monthBeforeYear: false,
previousMonth: 'කලින් මාසය (පිටුව ඉහළට)',
nextMonth: 'ඊළඟ මාසය (පිටුව පහළට)',
previousYear: 'පසුගිය අවුරුද්ද (Control + වම)',
nextYear: 'ඊළඟ අවුරුද්ද (Control + දකුණ)',
previousDecade: 'පසුගිය දශකය',
nextDecade: 'ඊළඟ දශකය',
previousCentury: 'පසුගිය සියවස',
nextCentury: 'ඊළඟ සියවස'
});
/* harmony default export */ var locale_si_LK = (si_LK_locale);
;// ./components/time-picker/locale/si_LK.ts
const locale_si_LK_locale = {
placeholder: 'වේලාව තෝරන්න',
rangePlaceholder: ['ආරම්භක වේලාව', 'නිමවන වේලාව']
};
/* harmony default export */ var time_picker_locale_si_LK = (locale_si_LK_locale);
;// ./components/date-picker/locale/si_LK.ts
// Merge into a locale object
const date_picker_locale_si_LK_locale = {
lang: Object.assign({
placeholder: 'දිනය තෝරන්න',
yearPlaceholder: 'අවුරුද්ද තෝරන්න',
quarterPlaceholder: 'කාර්තුව තෝරන්න',
monthPlaceholder: 'මාසය තෝරන්න',
weekPlaceholder: 'සතිය තෝරන්න',
rangePlaceholder: ['ආරම්භක දිනය', 'නිමවන දිනය'],
rangeYearPlaceholder: ['ආර්ම්භක අවුරුද්ද', 'නිමවන අවුරුද්ද'],
rangeQuarterPlaceholder: ['ආරම්භක කාර්තුව', 'නිමවන කාර්තුව'],
rangeMonthPlaceholder: ['ආරම්භක මාසය', 'නිමවන මාසය'],
rangeWeekPlaceholder: ['ආරම්භක සතිය', 'නිමවන සතිය']
}, locale_si_LK),
timePickerLocale: Object.assign({}, time_picker_locale_si_LK)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_si_LK = (date_picker_locale_si_LK_locale);
;// ./components/calendar/locale/si_LK.ts
/* harmony default export */ var calendar_locale_si_LK = (date_picker_locale_si_LK);
;// ./components/locale/si_LK.ts
const typeTemplate = '${label} වලංගු ${type} ක් නොවේ';
const localeValues = {
locale: 'si',
Pagination: si_LK,
DatePicker: date_picker_locale_si_LK,
TimePicker: time_picker_locale_si_LK,
Calendar: calendar_locale_si_LK,
global: {
placeholder: 'කරුණාකර තෝරන්න'
},
Table: {
filterTitle: 'පෙරහන්',
filterConfirm: 'හරි',
filterReset: 'යළි සකසන්න',
filterEmptyText: 'පෙරහන් නැත',
filterCheckAll: 'සියළු අථක තෝරන්න',
filterSearchPlaceholder: 'පෙරහන් තුළ සොයන්න',
emptyText: 'දත්ත නැත',
selectAll: 'වත්මන් පිටුව තෝරන්න',
selectInvert: 'වත්මන් පිටුව යටියනය',
selectNone: 'සියළු දත්ත ඉවතලන්න',
selectionAll: 'සියළු දත්ත තෝරන්න',
sortTitle: 'පෙළගැසීම',
expand: 'පේළිය දිගහරින්න',
collapse: 'පේළිය හකුළන්න',
triggerDesc: 'අවරෝහණව පෙළගැසීමට ඔබන්න',
triggerAsc: 'ආරෝහණව පෙළගැසීමට ඔබන්න',
cancelSort: 'පෙළගැසීම අවලංගු කිරීමට ඔබන්න'
},
Modal: {
okText: 'හරි',
cancelText: 'අවලංගු කරන්න',
justOkText: 'හරි'
},
Popconfirm: {
okText: 'හරි',
cancelText: 'අවලංගු කරන්න'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'මෙතැන සොයන්න',
itemUnit: 'අථකය',
itemsUnit: 'අථක',
remove: 'ඉවත් කරන්න',
selectCurrent: 'වත්මන් පිටුව තෝරන්න',
removeCurrent: 'වත්මන් පිටුව ඉවත් කරන්න',
selectAll: 'සියළු දත්ත තෝරන්න',
removeAll: 'සියළු දත්ත ඉවතලන්න',
selectInvert: 'වත්මන් පිටුව යටියනය'
},
Upload: {
uploading: 'උඩුගත වෙමින්...',
removeFile: 'ගොනුව ඉවතලන්න',
uploadError: 'උඩුගත වීමේ දෝෂයකි',
previewFile: 'ගොනුවේ පෙරදසුන',
downloadFile: 'ගොනුව බාගන්න'
},
Empty: {
description: 'දත්ත නැත'
},
Icon: {
icon: 'නිරූපකය'
},
Text: {
edit: 'සංස්කරණය',
copy: 'පිටපත්',
copied: 'පිටපත් විය',
expand: 'විහිදුවන්න'
},
Form: {
optional: '(විකල්පයකි)',
defaultValidateMessages: {
default: '${label} සඳහා ක්ෂේත්රය වලංගුකරණයේ දෝෂයකි',
required: '${label} ඇතුල් කරන්න',
enum: '[${enum}] වලින් එකක් ${label} විය යුතුය',
whitespace: '${label} හිස් අකුරක් නොවිය යුතුය',
date: {
format: '${label} දිනයේ ආකෘතිය වැරදිය',
parse: '${label} දිනයකට පරිවර්තනය කළ නොහැකිය',
invalid: '${label} වලංගු නොවන දිනයකි'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} අකුරු ${len}ක් විය යුතුය',
min: '${label} අවමය අකුරු ${min}ක් විය යුතුය',
max: '${label} අකුරු ${max}ක් දක්වා විය යුතුය',
range: '${label} අකුරු ${min}-${max}ක් අතර විය යුතුය'
},
number: {
len: '${label} නිසැකව ${len} සමාන විය යුතුය',
min: '${label} අවමය ${min} විය යුතුය',
max: '${label} උපරිමය ${max} විය යුතුය',
range: '${label} නිසැකව ${min}-${max} අතර විය යුතුය'
},
array: {
len: '${len} ${label} විය යුතුය',
min: 'අවම වශයෙන් ${min} ${label}',
max: 'උපරිම වශයෙන් ${max} ${label}',
range: '${label} ගණන ${min}-${max} අතර විය යුතුය'
},
pattern: {
mismatch: '${pattern} රටාවට ${label} නොගැළපේ'
}
}
},
Image: {
preview: 'පෙරදසුන'
}
};
/* harmony default export */ var components_locale_si_LK = (localeValues);
/***/ }),
/***/ "./components/locale/sk_SK.ts":
/*!************************************************!*\
!*** ./components/locale/sk_SK.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_sk_SK; }
});
;// ./node_modules/rc-pagination/es/locale/sk_SK.js
var locale = {
// Options
items_per_page: '/ strana',
jump_to: 'Choď na',
jump_to_confirm: 'potvrdit',
page: '',
// Pagination
prev_page: 'Predchádzajúca strana',
next_page: 'Nasledujúca strana',
prev_5: 'Predchádzajúcich 5 strán',
next_5: 'Nasledujúcich 5 strán',
prev_3: 'Predchádzajúce 3 strany',
next_3: 'Nasledujúce 3 strany',
page_size: 'Page Size'
};
/* harmony default export */ var sk_SK = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/sk_SK.js
var sk_SK_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'sk_SK',
today: 'Dnes',
now: 'Teraz',
backToToday: 'Späť na dnes',
ok: 'OK',
clear: 'Vymazať',
week: 'Týždeň',
month: 'Mesiac',
year: 'Rok',
timeSelect: 'Vybrať čas',
dateSelect: 'Vybrať dátum',
monthSelect: 'Vybrať mesiac',
yearSelect: 'Vybrať rok',
decadeSelect: 'Vybrať dekádu',
dateFormat: 'D.M.YYYY',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
previousMonth: 'Predchádzajúci mesiac (PageUp)',
nextMonth: 'Nasledujúci mesiac (PageDown)',
previousYear: 'Predchádzajúci rok (Control + left)',
nextYear: 'Nasledujúci rok (Control + right)',
previousDecade: 'Predchádzajúca dekáda',
nextDecade: 'Nasledujúca dekáda',
previousCentury: 'Predchádzajúce storočie',
nextCentury: 'Nasledujúce storočie'
});
/* harmony default export */ var locale_sk_SK = (sk_SK_locale);
;// ./components/time-picker/locale/sk_SK.ts
const locale_sk_SK_locale = {
placeholder: 'Vybrať čas'
};
/* harmony default export */ var time_picker_locale_sk_SK = (locale_sk_SK_locale);
;// ./components/date-picker/locale/sk_SK.ts
// 统一合并为完整的 Locale
const date_picker_locale_sk_SK_locale = {
lang: Object.assign({
placeholder: 'Vybrať dátum',
rangePlaceholder: ['Od', 'Do']
}, locale_sk_SK),
timePickerLocale: Object.assign({}, time_picker_locale_sk_SK)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_sk_SK = (date_picker_locale_sk_SK_locale);
;// ./components/calendar/locale/sk_SK.ts
/* harmony default export */ var calendar_locale_sk_SK = (date_picker_locale_sk_SK);
;// ./components/locale/sk_SK.ts
const typeTemplate = '${label} nie je platný ${type}';
const localeValues = {
locale: 'sk',
Pagination: sk_SK,
DatePicker: date_picker_locale_sk_SK,
TimePicker: time_picker_locale_sk_SK,
Calendar: calendar_locale_sk_SK,
global: {
placeholder: 'Prosím vyber'
},
Table: {
filterTitle: 'Filter',
filterConfirm: 'OK',
filterReset: 'Obnoviť',
filterEmptyText: 'Žiadne filtre',
filterCheckAll: 'Vyber všetky položky',
filterSearchPlaceholder: 'Vyhľadaj vo filtroch',
emptyText: 'Žiadne dáta',
selectAll: 'Označ všetky položky',
selectInvert: 'Opačný výber položiek',
selectNone: 'Odznač všetko',
selectionAll: 'Označ všetko',
sortTitle: 'Zoradiť',
expand: 'Rozbaliť riadok',
collapse: 'Zbaliť riadok',
triggerDesc: 'Kliknutím zoradíš zostupne',
triggerAsc: 'Kliknutím zoradíš vzostupne',
cancelSort: 'Kliknutím zrušíš zoradenie'
},
Modal: {
okText: 'OK',
cancelText: 'Zrušiť',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Zrušiť'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Vyhľadávanie',
itemUnit: 'položka',
itemsUnit: 'položiek',
remove: 'Odstráň',
selectCurrent: 'Vyber aktuálnu stranu',
removeCurrent: 'Zmaž aktuálnu stranu',
selectAll: 'Označ všetko',
removeAll: 'Odznač všetko',
selectInvert: 'Opačný výber'
},
Upload: {
uploading: 'Nahrávanie...',
removeFile: 'Odstrániť súbor',
uploadError: 'Chyba pri nahrávaní',
previewFile: 'Zobraziť súbor',
downloadFile: 'Stiahnuť súbor'
},
Empty: {
description: 'Žiadne dáta'
},
Icon: {
icon: 'ikona'
},
Text: {
edit: 'Upraviť',
copy: 'Kopírovať',
copied: 'Skopírované',
expand: 'Zväčšiť'
},
Form: {
optional: '(nepovinné)',
defaultValidateMessages: {
default: 'Validačná chyba poľa pre ${label}',
required: 'Prosím vlož ${label}',
enum: '${label} musí byť jeden z [${enum}]',
whitespace: '${label} nemôže byť prázdny znak',
date: {
format: '${label} formát dátumu je neplatný',
parse: '${label} nie je možné konvertovať na dátum',
invalid: '${label} je neplatný dátum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} musí byť ${len} znakov',
min: '${label} musí byť aspoň ${min} znakov',
max: '${label} musí byť do ${max} znakov',
range: '${label} musí byť medzi ${min}-${max} znakmi'
},
number: {
len: '${label} musí byť rovnaký ako ${len}',
min: '${label} musí byť minimálne ${min}',
max: '${label} musí byť maximálne ${max}',
range: '${label} musí byť medzi ${min}-${max}'
},
array: {
len: 'Musí byť ${len} ${label}',
min: 'Aspoň ${min} ${label}',
max: 'Najviac ${max} ${label}',
range: 'Počet ${label} musí byť medzi ${min}-${max}'
},
pattern: {
mismatch: '${label} nezodpovedá vzoru ${pattern}'
}
}
},
Image: {
preview: 'Náhľad'
}
};
/* harmony default export */ var components_locale_sk_SK = (localeValues);
/***/ }),
/***/ "./components/locale/sl_SI.ts":
/*!************************************************!*\
!*** ./components/locale/sl_SI.ts + 4 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_sl_SI; }
});
;// ./node_modules/rc-pagination/es/locale/sl_SI.js
var locale = {
// Options
items_per_page: '/ strani',
jump_to: 'Pojdi na',
jump_to_confirm: 'potrdi',
page: '',
// Pagination
prev_page: 'Prejšnja stran',
next_page: 'Naslednja stran',
prev_5: 'Prejšnjih 5 strani',
next_5: 'Naslednjih 5 strani',
prev_3: 'Prejšnje 3 strani',
next_3: 'Naslednje 3 strani',
page_size: 'Page Size'
};
/* harmony default export */ var sl_SI = (locale);
;// ./components/time-picker/locale/sl_SI.ts
const sl_SI_locale = {
placeholder: 'Izberite čas'
};
/* harmony default export */ var locale_sl_SI = (sl_SI_locale);
;// ./components/date-picker/locale/sl_SI.ts
// Merge into a locale object
const locale_sl_SI_locale = {
lang: {
locale: 'sl',
placeholder: 'Izberite datum',
rangePlaceholder: ['Začetni datum', 'Končni datum'],
today: 'Danes',
now: 'Trenutno',
backToToday: 'Nazaj na trenutni datum',
ok: 'OK',
clear: 'Počisti',
week: 'Teden',
month: 'Mesec',
year: 'Leto',
timeSelect: 'Izberi čas',
dateSelect: 'Izberi datum',
monthSelect: 'Izberite mesec',
yearSelect: 'Izberite leto',
decadeSelect: 'Izberite desetletje',
yearFormat: 'YYYY',
monthFormat: 'MMMM',
monthBeforeYear: true,
previousMonth: 'Prejšnji mesec (PageUp)',
nextMonth: 'Naslednji mesec (PageDown)',
previousYear: 'Lansko leto (Control + left)',
nextYear: 'Naslednje leto (Control + right)',
previousDecade: 'Prejšnje desetletje',
nextDecade: 'Naslednje desetletje',
previousCentury: 'Zadnje stoletje',
nextCentury: 'Naslednje stoletje'
},
timePickerLocale: Object.assign({}, locale_sl_SI)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_sl_SI = (locale_sl_SI_locale);
;// ./components/calendar/locale/sl_SI.ts
/* harmony default export */ var calendar_locale_sl_SI = (date_picker_locale_sl_SI);
;// ./components/locale/sl_SI.ts
const localeValues = {
locale: 'sl',
Pagination: sl_SI,
DatePicker: date_picker_locale_sl_SI,
TimePicker: locale_sl_SI,
Calendar: calendar_locale_sl_SI,
Table: {
filterTitle: 'Filter',
filterConfirm: 'Filtriraj',
filterReset: 'Pobriši filter',
selectAll: 'Izberi vse na trenutni strani',
selectInvert: 'Obrni izbor na trenutni strani'
},
Modal: {
okText: 'V redu',
cancelText: 'Prekliči',
justOkText: 'V redu'
},
Popconfirm: {
okText: 'v redu',
cancelText: 'Prekliči'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Išči tukaj',
itemUnit: 'Objekt',
itemsUnit: 'Objektov'
},
Upload: {
uploading: 'Nalaganje...',
removeFile: 'Odstrani datoteko',
uploadError: 'Napaka pri nalaganju',
previewFile: 'Predogled datoteke',
downloadFile: 'Prenos datoteke'
},
Empty: {
description: 'Ni podatkov'
}
};
/* harmony default export */ var components_locale_sl_SI = (localeValues);
/***/ }),
/***/ "./components/locale/sr_RS.ts":
/*!************************************************!*\
!*** ./components/locale/sr_RS.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_sr_RS; }
});
;// ./node_modules/rc-pagination/es/locale/sr_RS.js
var locale = {
// Options
items_per_page: '/ strani',
jump_to: 'Idi na',
page: '',
// Pagination
prev_page: 'Prethodna strana',
next_page: 'Sledeća strana',
prev_5: 'Prethodnih 5 Strana',
next_5: 'Sledećih 5 Strana',
prev_3: 'Prethodnih 3 Strane',
next_3: 'Sledećih 3 Strane',
page_size: 'Page Size'
};
/* harmony default export */ var sr_RS = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/sr_RS.js
var sr_RS_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'sr_RS',
today: 'Danas',
now: 'Sada',
backToToday: 'Vrati se na danas',
ok: 'U redu',
clear: 'Obriši',
week: 'Nedelja',
month: 'Mesec',
year: 'Godina',
timeSelect: 'Izaberi vreme',
dateSelect: 'Izaberi datum',
monthSelect: 'Izaberi mesec',
yearSelect: 'Izaberi godinu',
decadeSelect: 'Izaberi deceniju',
dateFormat: 'DD.MM.YYYY',
dateTimeFormat: 'DD.MM.YYYY HH:mm:ss',
previousMonth: 'Prethodni mesec (PageUp)',
nextMonth: 'Sledeći mesec (PageDown)',
previousYear: 'Prethodna godina (Control + left)',
nextYear: 'Sledeća godina (Control + right)',
previousDecade: 'Prethodna decenija',
nextDecade: 'Sledeća decenija',
previousCentury: 'Prethodni vek',
nextCentury: 'Sledeći vek'
});
/* harmony default export */ var locale_sr_RS = (sr_RS_locale);
;// ./components/time-picker/locale/sr_RS.ts
const locale_sr_RS_locale = {
placeholder: 'Izaberi vreme',
rangePlaceholder: ['Vreme početka', 'Vreme završetka']
};
/* harmony default export */ var time_picker_locale_sr_RS = (locale_sr_RS_locale);
;// ./components/date-picker/locale/sr_RS.ts
// Merge into a locale object
const date_picker_locale_sr_RS_locale = {
lang: Object.assign({
placeholder: 'Izaberi datum',
yearPlaceholder: 'Izaberi godinu',
quarterPlaceholder: 'Izaberi tromesečje',
monthPlaceholder: 'Izaberi mesec',
weekPlaceholder: 'Izaberi sedmicu',
rangePlaceholder: ['Datum početka', 'Datum završetka'],
rangeYearPlaceholder: ['Godina početka', 'Godina završetka'],
rangeMonthPlaceholder: ['Mesec početka', 'Mesec završetka'],
rangeWeekPlaceholder: ['Sedmica početka', 'Sedmica završetka']
}, locale_sr_RS),
timePickerLocale: Object.assign({}, time_picker_locale_sr_RS)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_sr_RS = (date_picker_locale_sr_RS_locale);
;// ./components/calendar/locale/sr_RS.ts
/* harmony default export */ var calendar_locale_sr_RS = (date_picker_locale_sr_RS);
;// ./components/locale/sr_RS.ts
const typeTemplate = '${label} nije važeći ${type}';
const localeValues = {
locale: 'sr',
Pagination: sr_RS,
DatePicker: date_picker_locale_sr_RS,
TimePicker: time_picker_locale_sr_RS,
Calendar: calendar_locale_sr_RS,
global: {
placeholder: 'Izaberi'
},
Table: {
filterTitle: 'Meni filtera',
filterConfirm: 'U redu',
filterReset: 'Poništi',
filterEmptyText: 'Nema filtera',
emptyText: 'Nema podataka',
selectAll: 'Izaberi trenutnu stranicu',
selectInvert: 'Obrni izbor trenutne stranice',
selectNone: 'Obriši sve podatke',
selectionAll: 'Izaberi sve podatke',
sortTitle: 'Sortiraj',
expand: 'Proširi red',
collapse: 'Skupi red',
triggerDesc: 'Klikni da sortiraš po padajućem redosledu',
triggerAsc: 'Klikni da sortiraš po rastućem redosledu',
cancelSort: 'Klikni da otkažeš sortiranje'
},
Modal: {
okText: 'U redu',
cancelText: 'Otkaži',
justOkText: 'U redu'
},
Popconfirm: {
okText: 'U redu',
cancelText: 'Otkaži'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Pretraži ovde',
itemUnit: 'stavka',
itemsUnit: 'stavki',
remove: 'Ukloni',
selectCurrent: 'Izaberi trenutnu stranicu',
removeCurrent: 'Ukloni trenutnu stranicu',
selectAll: 'Izaberi sve podatke',
removeAll: 'Ukloni sve podatke',
selectInvert: 'Obrni izbor trenutne stranice'
},
Upload: {
uploading: 'Otpremanje...',
removeFile: 'Ukloni datoteku',
uploadError: 'Greška pri otpremanju',
previewFile: 'Pregledaj datoteku',
downloadFile: 'Preuzmi datoteku'
},
Empty: {
description: 'Nema podataka'
},
Icon: {
icon: 'ikona'
},
Text: {
edit: 'Uredi',
copy: 'Kopiraj',
copied: 'Kopirano',
expand: 'Proširi'
},
Form: {
optional: '(opcionalno)',
defaultValidateMessages: {
default: 'Greška pri proveri valjanosti za ${label}',
required: 'Unesi ${label}',
enum: '${label} mora da bude nešto od [${enum}]',
whitespace: '${label} ne može biti prazan znak',
date: {
format: '${label} format datuma je nevažeći',
parse: '${label} se ne može konvertovati u datum',
invalid: '${label} je nevažeći datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} mora da sadrži ${len} znakova',
min: '${label} mora da sadrži bar ${min} znakova',
max: '${label} mora da sadrži do ${max} znakova',
range: '${label} mora da sadrži između ${min} i ${max} znakova'
},
number: {
len: '${label} mora biti jednak ${len}',
min: '${label} mora biti najmanje ${min}',
max: '${label} mora biti najviše ${max}',
range: '${label} mora biti između ${min} i ${max}'
},
array: {
len: 'Mora biti ${len} ${label}',
min: 'Najmanje ${min} ${label}',
max: 'najviše ${max} ${label}',
range: 'Iznos ${label} mora biti između ${min} i ${max}'
},
pattern: {
mismatch: '${label} ne odgovara obrascu ${pattern}'
}
}
},
Image: {
preview: 'Pregled'
}
};
/* harmony default export */ var components_locale_sr_RS = (localeValues);
/***/ }),
/***/ "./components/locale/sv_SE.ts":
/*!************************************************!*\
!*** ./components/locale/sv_SE.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_sv_SE; }
});
;// ./node_modules/rc-pagination/es/locale/sv_SE.js
var locale = {
// Options
items_per_page: '/ sida',
jump_to: 'Gå till',
jump_to_confirm: 'bekräfta',
page: 'Sida',
// Pagination
prev_page: 'Föreg sida',
next_page: 'Nästa sida',
prev_5: 'Föreg 5 sidor',
next_5: 'Nästa 5 sidor',
prev_3: 'Föreg 3 sidor',
next_3: 'Nästa 3 sidor',
page_size: 'sidstorlek'
};
/* harmony default export */ var sv_SE = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/sv_SE.js
var sv_SE_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'sv_SE',
today: 'I dag',
now: 'Nu',
backToToday: 'Till idag',
ok: 'OK',
clear: 'Avbryt',
week: 'Vecka',
month: 'Månad',
year: 'År',
timeSelect: 'Välj tidpunkt',
dateSelect: 'Välj datum',
monthSelect: 'Välj månad',
yearSelect: 'Välj år',
decadeSelect: 'Välj årtionde',
dateFormat: 'YYYY-MM-DD',
dateTimeFormat: 'YYYY-MM-DD H:mm:ss',
previousMonth: 'Förra månaden (PageUp)',
nextMonth: 'Nästa månad (PageDown)',
previousYear: 'Föreg år (Control + left)',
nextYear: 'Nästa år (Control + right)',
previousDecade: 'Föreg årtionde',
nextDecade: 'Nästa årtionde',
previousCentury: 'Föreg århundrade',
nextCentury: 'Nästa århundrade'
});
/* harmony default export */ var locale_sv_SE = (sv_SE_locale);
;// ./components/time-picker/locale/sv_SE.ts
const locale_sv_SE_locale = {
placeholder: 'Välj tid'
};
/* harmony default export */ var time_picker_locale_sv_SE = (locale_sv_SE_locale);
;// ./components/date-picker/locale/sv_SE.ts
// Merge into a locale object
const date_picker_locale_sv_SE_locale = {
lang: Object.assign({
placeholder: 'Välj datum',
yearPlaceholder: 'Välj år',
quarterPlaceholder: 'Välj kvartal',
monthPlaceholder: 'Välj månad',
weekPlaceholder: 'Välj vecka',
rangePlaceholder: ['Startdatum', 'Slutdatum'],
rangeYearPlaceholder: ['Startår', 'Slutår'],
rangeMonthPlaceholder: ['Startmånad', 'Slutmånad'],
rangeWeekPlaceholder: ['Startvecka', 'Slutvecka']
}, locale_sv_SE),
timePickerLocale: Object.assign({}, time_picker_locale_sv_SE)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_sv_SE = (date_picker_locale_sv_SE_locale);
;// ./components/calendar/locale/sv_SE.ts
/* harmony default export */ var calendar_locale_sv_SE = (date_picker_locale_sv_SE);
;// ./components/locale/sv_SE.ts
const typeTemplate = '${label} är inte en giltig ${type}';
const localeValues = {
locale: 'sv',
Pagination: sv_SE,
DatePicker: date_picker_locale_sv_SE,
TimePicker: time_picker_locale_sv_SE,
Calendar: calendar_locale_sv_SE,
global: {
placeholder: 'Vänligen välj'
},
Table: {
filterTitle: 'Filtermeny',
filterConfirm: 'OK',
filterReset: 'Återställ',
filterEmptyText: 'Inga filter',
filterCheckAll: 'Markera alla objekt',
filterSearchPlaceholder: 'Sök i filter',
emptyText: 'Ingen data',
selectAll: 'Markera nuvarande sida',
selectInvert: 'Invertera nuvarande sida',
selectNone: 'Avmarkera all data',
selectionAll: 'Markera all data',
sortTitle: 'Sortera',
expand: 'Expandera rad',
collapse: 'Komprimera rad',
triggerDesc: 'Klicka för att sortera i fallande ordning',
triggerAsc: 'Klicka för att sortera i stigande ordning',
cancelSort: 'Klicka för att avbryta sortering'
},
Tour: {
Next: 'Nästa',
Previous: 'Föregående',
Finish: 'Avsluta'
},
Modal: {
okText: 'OK',
cancelText: 'Avbryt',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Avbryt'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Sök här',
itemUnit: 'objekt',
itemsUnit: 'objekt',
remove: 'Ta bort',
selectCurrent: 'Markera nuvarande sida',
removeCurrent: 'Ta bort nuvarande sida',
selectAll: 'Markera all data',
removeAll: 'Ta bort all data',
selectInvert: 'Invertera nuvarande sida'
},
Upload: {
uploading: 'Laddar upp...',
removeFile: 'Ta bort fil',
uploadError: 'Uppladdningsfel',
previewFile: 'Förhandsgranska fil',
downloadFile: 'Ladda ned fil'
},
Empty: {
description: 'Ingen data'
},
Icon: {
icon: 'ikon'
},
Text: {
edit: 'Redigera',
copy: 'Kopiera',
copied: 'Kopierad',
expand: 'Expandera'
},
Form: {
optional: '(valfritt)',
defaultValidateMessages: {
default: 'Fältvalideringsfel för ${label}',
required: 'Vänligen fyll i ${label}',
enum: '${label} måste vara en av [${enum}]',
whitespace: '${label} kan inte vara ett tomt tecken',
date: {
format: '${label} datumformatet är ogiltigt',
parse: '${label} kan inte konverteras till ett datum',
invalid: '${label} är ett ogiltigt datum'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} måste vara ${len} tecken',
min: '${label} måste vara minst ${min} tecken',
max: '${label} måste vara högst ${max} tecken',
range: '${label} måste vara mellan ${min}-${max} tecken'
},
number: {
len: '${label} måste vara lika med ${len}',
min: '${label} måste vara minst ${min}',
max: '${label} måste vara högst ${max}',
range: '${label} måste vara mellan ${min}-${max}'
},
array: {
len: 'Måste vara ${len} ${label}',
min: 'Minst ${min} ${label}',
max: 'Högst ${max} ${label}',
range: 'Antal ${label} måste vara mellan ${min}-${max}'
},
pattern: {
mismatch: '${label} stämmer inte överens med mönstret ${pattern}'
}
}
},
Image: {
preview: 'Förhandsgranska'
},
QRCode: {
expired: 'QR-koden har upphört att gälla',
refresh: 'Uppdatera'
}
};
/* harmony default export */ var components_locale_sv_SE = (localeValues);
/***/ }),
/***/ "./components/locale/ta_IN.ts":
/*!************************************************!*\
!*** ./components/locale/ta_IN.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ta_IN; }
});
;// ./node_modules/rc-pagination/es/locale/ta_IN.js
var locale = {
// Options
items_per_page: '/ பக்கம்',
jump_to: 'அடுத்த',
jump_to_confirm: 'உறுதிப்படுத்தவும்',
page: '',
// Pagination
prev_page: 'முந்தைய பக்கம்',
next_page: 'அடுத்த பக்கம்',
prev_5: 'முந்தைய 5 பக்கங்கள்',
next_5: 'அடுத்த 5 பக்கங்கள்',
prev_3: 'முந்தைய 3 பக்கங்கள்',
next_3: 'அடுத்த 3 பக்கங்கள்',
page_size: 'Page Size'
};
/* harmony default export */ var ta_IN = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ta_IN.js
var ta_IN_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ta_IN',
today: 'இன்று',
now: 'இப்போது',
backToToday: 'இன்றுக்கு திரும்பு',
ok: 'சரி',
clear: 'அழி',
week: 'வாரம்',
month: 'மாதம்',
year: 'வருடம்',
timeSelect: 'நேரத்தைத் தேர்ந்தெடு',
dateSelect: 'தேதியைத் தேர்ந்தெடு',
weekSelect: 'வாரத்தைத் தேர்வுசெய்க',
monthSelect: 'மாதத்தைத் தேர்வுசெய்க',
yearSelect: 'வருடத்தைத் தேர்வுசெய்க',
decadeSelect: 'தசாப்தத்தைத் தேர்வுசெய்க',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'முந்தைய மாதம் (PageUp)',
nextMonth: 'அடுத்த மாதம் (PageDown)',
previousYear: 'முந்தைய வருடம் (Control + left)',
nextYear: 'அடுத்த வருடம் (Control + right)',
previousDecade: 'முந்தைய தசாப்தம்',
nextDecade: 'அடுத்த தசாப்தம்',
previousCentury: 'முந்தைய நூற்றாண்டு',
nextCentury: 'அடுத்த நூற்றாண்டு'
});
/* harmony default export */ var locale_ta_IN = (ta_IN_locale);
;// ./components/time-picker/locale/ta_IN.ts
const locale_ta_IN_locale = {
placeholder: 'நேரத்தைத் தேர்ந்தெடுக்கவும்'
};
/* harmony default export */ var time_picker_locale_ta_IN = (locale_ta_IN_locale);
;// ./components/date-picker/locale/ta_IN.ts
// Tamil Locale added to rc-calendar
// Merge into a locale object
const date_picker_locale_ta_IN_locale = {
lang: Object.assign({
placeholder: 'தேதியைத் தேர்ந்தெடுக்கவும்',
rangePlaceholder: ['தொடக்க தேதி', 'கடைசி தேதி'],
quarterPlaceholder: 'காலாண்டைத் தேர்ந்தெடுக்கவும்',
monthPlaceholder: 'மாதத்தைத் தேர்ந்தெடுக்கவும்',
weekPlaceholder: 'வாரத்தைத் தேர்ந்தெடுக்கவும்',
rangeYearPlaceholder: ['தொடக்க ஆண்டு', 'இறுதி ஆண்டு'],
rangeQuarterPlaceholder: ['காலாண்டு தொடக்கம்', 'இறுதி காலாண்டு'],
rangeMonthPlaceholder: ['தொடக்க மாதம்', 'இறுதி மாதம்'],
rangeWeekPlaceholder: ['வாரம் தொடங்கு', 'இறுதி வாரம்']
}, locale_ta_IN),
timePickerLocale: Object.assign({}, time_picker_locale_ta_IN)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ta_IN = (date_picker_locale_ta_IN_locale);
;// ./components/calendar/locale/ta_IN.ts
/* harmony default export */ var calendar_locale_ta_IN = (date_picker_locale_ta_IN);
;// ./components/locale/ta_IN.ts
const typeTemplate = '${label} is not a valid ${type}';
const localeValues = {
locale: 'ta',
Pagination: ta_IN,
DatePicker: date_picker_locale_ta_IN,
TimePicker: time_picker_locale_ta_IN,
Calendar: calendar_locale_ta_IN,
// locales for all comoponents
global: {
placeholder: 'தேதியைத் தேர்ந்தெடுக்கவும்'
},
Table: {
filterTitle: 'பட்டியலை மூடு',
filterConfirm: 'சரி',
filterReset: 'மீட்டமை',
emptyText: 'தகவல் இல்லை',
selectAll: 'அனைத்தையும் தேர்வுசெய்',
selectInvert: 'தலைகீழாக மாற்று',
sortTitle: 'தலைப்பை வரிசைப்படுத்தவும்',
filterEmptyText: 'No filters',
filterCheckAll: 'அனைத்து பொருட்களையும் தேர்ந்தெடுக்கவும்',
filterSearchPlaceholder: 'வடிப்பான்களில் தேடவும்',
expand: 'வரிசையை விரிவாக்கு',
collapse: 'வரிசையைச் சுருக்கு',
triggerDesc: 'இறங்குவரிசையை வரிசைப்படுத்த கிளிக் செய்யவும்',
triggerAsc: 'ஏறுவரிசையில் வரிசைப்படுத்த கிளிக் செய்யவும்',
cancelSort: 'வரிசையாக்கத்தை ரத்து செய்ய கிளிக் செய்யவும்'
},
Modal: {
okText: 'சரி',
cancelText: 'ரத்து செய்யவும்',
justOkText: 'பரவாயில்லை, சரி'
},
Popconfirm: {
okText: 'சரி',
cancelText: 'ரத்து செய்யவும்'
},
Transfer: {
titles: ['', ''],
notFoundContent: 'உள்ளடக்கம் கிடைக்கவில்லை',
searchPlaceholder: 'இங்கு தேடவும்',
itemUnit: 'தகவல்',
itemsUnit: 'தகவல்கள்'
},
Upload: {
uploading: 'பதிவேற்றுகிறது...',
removeFile: 'கோப்பை அகற்று',
uploadError: 'பதிவேற்றுவதில் பிழை',
previewFile: 'கோப்பை முன்னோட்டமிடுங்கள்',
downloadFile: 'பதிவிறக்க கோப்பு'
},
Empty: {
description: 'தகவல் இல்லை'
},
Icon: {
icon: 'உருவம்'
},
Text: {
edit: 'திருத்து',
copy: 'நகல் எடு',
copied: 'நகல் எடுக்கப்பட்டது',
expand: 'விரிவாக்கவும்'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: '${label}க்கான புல சரிபார்ப்பு பிழை',
required: '${label} ஐ உள்ளிடவும்',
enum: '${label} கண்டிப்பாக [${enum}] இல் ஒன்றாக இருக்க வேண்டும்',
whitespace: '${label} வெற்று எழுத்தாக இருக்கக்கூடாது',
date: {
format: '${label} தேதி வடிவம் தவறானது',
parse: '${label}ஐ தேதியாக மாற்ற முடியாது',
invalid: '${label} என்பது தவறான தேதி'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} கண்டிப்பாக ${len} எழுத்துகளாக இருக்க வேண்டும்',
min: '${label} குறைந்தது ${min} எழுத்துகளாக இருக்க வேண்டும்',
max: '${label} ${max} எழுத்துகள் வரை இருக்க வேண்டும்',
range: '${label} கண்டிப்பாக ${min}-${max} எழுத்துகளுக்கு இடையில் இருக்க வேண்டும்'
},
number: {
len: '${label} கண்டிப்பாக ${len}க்கு சமமாக இருக்க வேண்டும்',
min: '${label} குறைந்தபட்சம் ${min} ஆக இருக்க வேண்டும்',
max: '${label} அதிகபட்சம் ${max} ஆக இருக்க வேண்டும்',
range: '${label} கண்டிப்பாக ${min}-${max} இடையே இருக்க வேண்டும்'
},
array: {
len: '${len} ${label} ஆக இருக்க வேண்டும்',
min: 'குறைந்தது ${min} ${label}',
max: 'அதிகபட்சம் ${max} ${label}',
range: '${label} இன் தொகை கண்டிப்பாக ${min}-${max} இடையே இருக்க வேண்டும்'
},
pattern: {
mismatch: '${label} ஆனது ${pattern} வடிவத்துடன் பொருந்தவில்லை'
}
}
},
Image: {
preview: 'முன்னோட்ட'
},
QRCode: {
expired: 'QR குறியீடு காலாவதியானது',
refresh: 'புதுப்பிப்பு'
}
};
/* harmony default export */ var components_locale_ta_IN = (localeValues);
/***/ }),
/***/ "./components/locale/th_TH.ts":
/*!************************************************!*\
!*** ./components/locale/th_TH.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_th_TH; }
});
;// ./node_modules/rc-pagination/es/locale/th_TH.js
var locale = {
// Options
items_per_page: '/ หน้า',
jump_to: 'ไปยัง',
jump_to_confirm: 'ยืนยัน',
page: 'หน้า',
// Pagination
prev_page: 'หน้าก่อนหน้า',
next_page: 'หน้าถัดไป',
prev_5: 'ย้อนกลับ 5 หน้า',
next_5: 'ถัดไป 5 หน้า',
prev_3: 'ย้อนกลับ 3 หน้า',
next_3: 'ถัดไป 3 หน้า',
page_size: 'ขนาดหน้า'
};
/* harmony default export */ var th_TH = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/th_TH.js
var th_TH_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'th_TH',
today: 'วันนี้',
now: 'ตอนนี้',
backToToday: 'กลับไปยังวันนี้',
ok: 'ตกลง',
clear: 'ลบล้าง',
week: 'สัปดาห์',
month: 'เดือน',
year: 'ปี',
timeSelect: 'เลือกเวลา',
dateSelect: 'เลือกวัน',
monthSelect: 'เลือกเดือน',
yearSelect: 'เลือกปี',
decadeSelect: 'เลือกทศวรรษ',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'เดือนก่อนหน้า (PageUp)',
nextMonth: 'เดือนถัดไป (PageDown)',
previousYear: 'ปีก่อนหน้า (Control + left)',
nextYear: 'ปีถัดไป (Control + right)',
previousDecade: 'ทศวรรษก่อนหน้า',
nextDecade: 'ทศวรรษถัดไป',
previousCentury: 'ศตวรรษก่อนหน้า',
nextCentury: 'ศตวรรษถัดไป'
});
/* harmony default export */ var locale_th_TH = (th_TH_locale);
;// ./components/time-picker/locale/th_TH.ts
const locale_th_TH_locale = {
placeholder: 'เลือกเวลา'
};
/* harmony default export */ var time_picker_locale_th_TH = (locale_th_TH_locale);
;// ./components/date-picker/locale/th_TH.ts
// Merge into a locale object
const date_picker_locale_th_TH_locale = {
lang: Object.assign({
placeholder: 'เลือกวันที่',
yearPlaceholder: 'เลือกปี',
quarterPlaceholder: 'เลือกไตรมาส',
monthPlaceholder: 'เลือกเดือน',
weekPlaceholder: 'เลือกสัปดาห์',
rangePlaceholder: ['วันเริ่มต้น', 'วันสิ้นสุด'],
rangeYearPlaceholder: ['ปีเริ่มต้น', 'ปีสิ้นสุด'],
rangeMonthPlaceholder: ['เดือนเริ่มต้น', 'เดือนสิ้นสุด'],
rangeWeekPlaceholder: ['สัปดาห์เริ่มต้น', 'สัปดาห์สิ้นสุด']
}, locale_th_TH),
timePickerLocale: Object.assign({}, time_picker_locale_th_TH)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_th_TH = (date_picker_locale_th_TH_locale);
;// ./components/calendar/locale/th_TH.ts
/* harmony default export */ var calendar_locale_th_TH = (date_picker_locale_th_TH);
;// ./components/locale/th_TH.ts
const typeTemplate = '${label} ไม่ใช่ ${type} ที่ถูกต้อง';
const localeValues = {
locale: 'th',
Pagination: th_TH,
DatePicker: date_picker_locale_th_TH,
TimePicker: time_picker_locale_th_TH,
Calendar: calendar_locale_th_TH,
global: {
placeholder: 'กรุณาเลือก'
},
Table: {
filterTitle: 'ตัวกรอง',
filterConfirm: 'ยืนยัน',
filterReset: 'รีเซ็ต',
filterEmptyText: 'ไม่มีตัวกรอง',
filterCheckAll: 'เลือกรายการทั้งหมด',
filterSearchPlaceholder: 'ค้นหาตัวกรอง',
emptyText: 'ไม่มีข้อมูล',
selectAll: 'เลือกทั้งหมดในหน้านี้',
selectInvert: 'กลับสถานะการเลือกในหน้านี้',
selectNone: 'ไม่เลือกข้อมูลทั้งหมด',
selectionAll: 'เลือกข้อมูลทั้งหมด',
sortTitle: 'เรียง',
expand: 'แสดงแถวข้อมูล',
collapse: 'ย่อแถวข้อมูล',
triggerDesc: 'คลิกเรียงจากมากไปน้อย',
triggerAsc: 'คลิกเรียงจากน้อยไปมาก',
cancelSort: 'คลิกเพื่อยกเลิกการเรียง'
},
Tour: {
Next: 'ถัดไป',
Previous: 'ย้อนกลับ',
Finish: 'เสร็จสิ้น'
},
Modal: {
okText: 'ตกลง',
cancelText: 'ยกเลิก',
justOkText: 'ตกลง'
},
Popconfirm: {
okText: 'ตกลง',
cancelText: 'ยกเลิก'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'ค้นหา',
itemUnit: 'ชิ้น',
itemsUnit: 'ชิ้น',
remove: 'นำออก',
selectCurrent: 'เลือกทั้งหมดในหน้านี้',
removeCurrent: 'นำออกทั้งหมดในหน้านี้',
selectAll: 'เลือกข้อมูลทั้งหมด',
deselectAll: 'ยกเลิกการเลือกทั้งหมด',
removeAll: 'นำข้อมูลออกทั้งหมด',
selectInvert: 'กลับสถานะการเลือกในหน้านี้'
},
Upload: {
uploading: 'กำลังอัปโหลด...',
removeFile: 'ลบไฟล์',
uploadError: 'เกิดข้อผิดพลาดในการอัปโหลด',
previewFile: 'ดูตัวอย่างไฟล์',
downloadFile: 'ดาวน์โหลดไฟล์'
},
Empty: {
description: 'ไม่มีข้อมูล'
},
Icon: {
icon: 'ไอคอน'
},
Text: {
edit: 'แก้ไข',
copy: 'คัดลอก',
copied: 'คัดลอกแล้ว',
expand: 'ขยาย',
collapse: 'ย่อ'
},
Form: {
optional: '(ไม่จำเป็น)',
defaultValidateMessages: {
default: 'ฟิลด์ ${label} ไม่ผ่านเงื่อนไขการตรวจสอบ',
required: 'กรุณากรอก ${label}',
enum: '${label} ต้องเป็นค่าใดค่าหนึ่งใน [${enum}]',
whitespace: '${label} ไม่สามารถเป็นช่องว่างได้',
date: {
format: 'รูปแบบวันที่ ${label} ไม่ถูกต้อง',
parse: '${label} ไม่สามารถแปลงเป็นวันที่ได้',
invalid: '${label} เป็นวันที่ที่ไม่ถูกต้อง'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ต้องมี ${len} ตัวอักษร',
min: '${label} ต้องมีอย่างน้อย ${min} ตัวอักษร',
max: '${label} มีได้สูงสุด ${max} ตัวอักษร',
range: '${label} ต้องมี ${min}-${max} ตัวอักษร'
},
number: {
len: '${label} ต้องมี ${len} ตัว',
min: 'ค่าต่ำสุด ${label} คือ ${min}',
max: 'ค่าสูงสุด ${label} คือ ${max}',
range: '${label} ต้องมีค่า ${min}-${max}'
},
array: {
len: 'ต้องมี ${len} ${label}',
min: 'ต้องมีอย่างน้อย ${min} ${label}',
max: 'มีได้สูงสุด ${max} ${label}',
range: 'จำนวน ${label} ต้องอยู่ในช่วง ${min}-${max}'
},
pattern: {
mismatch: '${label} ไม่ตรงกับรูปแบบ ${pattern}'
}
}
},
Image: {
preview: 'ดูตัวอย่าง'
},
QRCode: {
expired: 'คิวอาร์โค้ดหมดอายุ',
refresh: 'รีเฟรช',
scanned: 'สแกนแล้ว'
},
ColorPicker: {
presetEmpty: 'ไม่มีข้อมูล',
transparent: 'โปร่งใส',
singleColor: 'สีเดียว',
gradientColor: 'สีไล่ระดับ'
}
};
/* harmony default export */ var components_locale_th_TH = (localeValues);
/***/ }),
/***/ "./components/locale/tk_TK.ts":
/*!************************************************!*\
!*** ./components/locale/tk_TK.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_tk_TK; }
});
;// ./node_modules/rc-pagination/es/locale/tk_TK.js
var locale = {
// Options
items_per_page: '/ sahypa',
jump_to: 'Git',
jump_to_confirm: 'tassykla',
page: 'Sahypa',
// Pagination
prev_page: 'Öňki sahypa',
next_page: 'Soňky sahypa',
prev_5: 'Öňki 5 sahypa',
next_5: 'Soňky 5 sahypa',
prev_3: 'Öňki 3 sahypa',
next_3: 'Soňky 3 sahypa',
page_size: 'Sahypa sany'
};
/* harmony default export */ var tk_TK = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/tk_TK.js
var tk_TK_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'tk_TK',
today: 'Şugün',
now: 'Şuwagt',
backToToday: 'Şugüne gaýt',
ok: 'Bolýar',
clear: 'Arassala',
month: 'Aý',
week: 'Hepde',
year: 'Ýyl',
timeSelect: 'Wagt saýla',
dateSelect: 'Gün saýla',
monthSelect: 'Aý saýla',
yearSelect: 'Ýyl saýla',
decadeSelect: 'On ýyllygy saýla',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Öňki aý (PageUp)',
nextMonth: 'Soňky aý (PageDown)',
previousYear: 'Öňki ýyl (Control + çep)',
nextYear: 'Soňky ýyl (Control + sag)',
previousDecade: 'Öňki on ýyl',
nextDecade: 'Soňky on ýyl',
previousCentury: 'Öňki asyr',
nextCentury: 'Soňky asyr'
});
/* harmony default export */ var locale_tk_TK = (tk_TK_locale);
;// ./components/time-picker/locale/tk_TK.ts
const locale_tk_TK_locale = {
placeholder: 'Wagty saýlaň',
rangePlaceholder: ['Başlanýan wagty', 'Gutarýan wagty']
};
/* harmony default export */ var time_picker_locale_tk_TK = (locale_tk_TK_locale);
;// ./components/date-picker/locale/tk_TK.ts
const date_picker_locale_tk_TK_locale = {
lang: Object.assign({
placeholder: 'Wagt saýlaň',
rangePlaceholder: ['Başlanýan wagty', 'Gutarýan wagty'],
yearPlaceholder: 'Ýyl saýlaň',
quarterPlaceholder: 'Çärýek saýlaň',
monthPlaceholder: 'Aý saýlaň',
weekPlaceholder: 'Hepde saýlaň',
rangeYearPlaceholder: ['Başlanýan ýyly', 'Gutarýan ýyly'],
rangeQuarterPlaceholder: ['Başlanýan çärýegi', 'Gutarýan çärýegi'],
rangeMonthPlaceholder: ['Başlanýan aýy', 'Gutarýan aýy'],
rangeWeekPlaceholder: ['Başlanýan hepdesi', 'Gutarýan hepdesi']
}, locale_tk_TK),
timePickerLocale: Object.assign({}, time_picker_locale_tk_TK)
};
/* harmony default export */ var date_picker_locale_tk_TK = (date_picker_locale_tk_TK_locale);
;// ./components/calendar/locale/tk_TK.ts
/* harmony default export */ var calendar_locale_tk_TK = (date_picker_locale_tk_TK);
;// ./components/locale/tk_TK.ts
const typeTemplate = '${label} ${type} görnüşinde däl';
const localeValues = {
locale: 'tk',
Pagination: tk_TK,
DatePicker: date_picker_locale_tk_TK,
TimePicker: time_picker_locale_tk_TK,
Calendar: calendar_locale_tk_TK,
global: {
placeholder: 'Saýlaň'
},
Table: {
filterTitle: 'Filter',
filterConfirm: 'Bolýar',
filterReset: 'Arassala',
filterEmptyText: 'Filtersiz',
emptyText: 'Maglumat ýok',
selectAll: 'Ählisini saýla',
selectInvert: 'Tersini saýlaň',
selectNone: 'Ähli maglumatlary arassala',
selectionAll: 'Ähli maglumatlary saýla',
sortTitle: 'Tertiple',
expand: 'Setirleri aç',
collapse: 'Setirleri ýygna',
triggerDesc: 'Kemelýän tertipde tertiple',
triggerAsc: 'Artýan tertipde tertiple',
cancelSort: 'Tertipleri arassala'
},
Modal: {
okText: 'Bolýar',
cancelText: 'Ýatyr',
justOkText: 'Bolýar'
},
Popconfirm: {
okText: 'Bolýar',
cancelText: 'Ýatyr'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Gözle',
itemUnit: 'elem.',
itemsUnit: 'elem.',
remove: 'Poz',
selectAll: 'Ähli maglumatlary saýla',
selectCurrent: 'Şu sahypany saýlaň',
selectInvert: 'Ters tertipde görkez',
removeAll: 'Ähli maglumatlary poz',
removeCurrent: 'Şu sahypany poz'
},
Upload: {
uploading: 'Ugradylýar...',
removeFile: 'Faýly poz',
uploadError: 'Ugratmakda näsazlyk ýüze çykdy',
previewFile: 'Faýly görmek',
downloadFile: 'Faýly ýükle'
},
Empty: {
description: 'Maglumat ýok'
},
Icon: {
icon: 'nyşan'
},
Text: {
edit: 'Üýtgetmek',
copy: 'Göçürmek',
copied: 'Göçürildi',
expand: 'Ýygnamak'
},
Form: {
defaultValidateMessages: {
default: '${label} meýdany barlanmady',
required: '${label} meýdany giriziň',
enum: '${label} meýdan şulardan biri bolmaly: [${enum}]',
whitespace: '${label} meýdany boş bolup bilmeýär',
date: {
format: '${label} ýalňyş wagt formaty',
parse: '${label} meýdany wagta çalşyp bolmady',
invalid: '${label} meýdany nädogry wagt'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} meýdany ${len} simwol bolmaly',
min: '${label} meýdany ${min} simwoldan az bolmaly däl',
max: '${label} meýdany ${max} simwoldan köp bolmaly däl',
range: '${label} meýdany ${min}-${max} simwol aralygynda bolmaly'
},
number: {
len: '${label} meýdan ${len} simwol bolmaly',
min: '${label} meýdany ${min} simwoldan az bolmaly däl',
max: '${label} meýdany ${max} simwoldan köp bolmaly däl'
},
array: {
len: '${label} meýdanynyň elementleriniň sany ${len} deň bolmaly',
min: '${label} meýdanynyň elementleriniň sany ${min} az bolmaly däl',
max: '${label} meýdanynyň elementleriniň sany ${max} köp bolmaly däl',
range: '${label} meýdanynyň elementleriniň sany ${min} we ${max} aralykda bolmaly'
},
pattern: {
mismatch: '${label} meýdany ${pattern} şablony bilen gabat gelmeýär'
}
}
},
Image: {
preview: 'Öňünden görmek'
}
};
/* harmony default export */ var components_locale_tk_TK = (localeValues);
/***/ }),
/***/ "./components/locale/tr_TR.ts":
/*!************************************************!*\
!*** ./components/locale/tr_TR.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_tr_TR; }
});
;// ./node_modules/rc-pagination/es/locale/tr_TR.js
var locale = {
// Options
items_per_page: '/ sayfa',
jump_to: 'Git',
jump_to_confirm: 'onayla',
page: 'Sayfa',
// Pagination
prev_page: 'Önceki Sayfa',
next_page: 'Sonraki Sayfa',
prev_5: 'Önceki 5 Sayfa',
next_5: 'Sonraki 5 Sayfa',
prev_3: 'Önceki 3 Sayfa',
next_3: 'Sonraki 3 Sayfa',
page_size: 'sayfa boyutu'
};
/* harmony default export */ var tr_TR = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/tr_TR.js
var tr_TR_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'tr_TR',
today: 'Bugün',
now: 'Şimdi',
backToToday: 'Bugüne Geri Dön',
ok: 'Tamam',
clear: 'Temizle',
week: 'Hafta',
month: 'Ay',
year: 'Yıl',
timeSelect: 'Zaman Seç',
dateSelect: 'Tarih Seç',
monthSelect: 'Ay Seç',
yearSelect: 'Yıl Seç',
decadeSelect: 'On Yıl Seç',
dateFormat: 'DD/MM/YYYY',
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
previousMonth: 'Önceki Ay (PageUp)',
nextMonth: 'Sonraki Ay (PageDown)',
previousYear: 'Önceki Yıl (Control + Sol)',
nextYear: 'Sonraki Yıl (Control + Sağ)',
previousDecade: 'Önceki On Yıl',
nextDecade: 'Sonraki On Yıl',
previousCentury: 'Önceki Yüzyıl',
nextCentury: 'Sonraki Yüzyıl',
shortWeekDays: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'],
shortMonths: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara']
});
/* harmony default export */ var locale_tr_TR = (tr_TR_locale);
;// ./components/time-picker/locale/tr_TR.ts
const locale_tr_TR_locale = {
placeholder: 'Zaman seç',
rangePlaceholder: ['Başlangıç zamanı', 'Bitiş zamanı']
};
/* harmony default export */ var time_picker_locale_tr_TR = (locale_tr_TR_locale);
;// ./components/date-picker/locale/tr_TR.ts
// Merge into a locale object
const date_picker_locale_tr_TR_locale = {
lang: Object.assign({
placeholder: 'Tarih seç',
yearPlaceholder: 'Yıl seç',
quarterPlaceholder: 'Çeyrek seç',
monthPlaceholder: 'Ay seç',
weekPlaceholder: 'Hafta seç',
rangePlaceholder: ['Başlangıç tarihi', 'Bitiş tarihi'],
rangeYearPlaceholder: ['Başlangıç yılı', 'Bitiş yılı'],
rangeMonthPlaceholder: ['Başlangıç ayı', 'Bitiş ayı'],
rangeWeekPlaceholder: ['Başlangıç haftası', 'Bitiş haftası']
}, locale_tr_TR),
timePickerLocale: Object.assign({}, time_picker_locale_tr_TR)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_tr_TR = (date_picker_locale_tr_TR_locale);
;// ./components/calendar/locale/tr_TR.ts
/* harmony default export */ var calendar_locale_tr_TR = (date_picker_locale_tr_TR);
;// ./components/locale/tr_TR.ts
const typeTemplate = '${label} geçerli bir ${type} değil';
const localeValues = {
locale: 'tr',
Pagination: tr_TR,
DatePicker: date_picker_locale_tr_TR,
TimePicker: time_picker_locale_tr_TR,
Calendar: calendar_locale_tr_TR,
global: {
placeholder: 'Lütfen seçiniz'
},
Table: {
filterTitle: 'Filtre menüsü',
filterConfirm: 'Tamam',
filterReset: 'Sıfırla',
filterEmptyText: 'Filtre yok',
filterCheckAll: 'Tümünü seç',
selectAll: 'Tüm sayfayı seç',
selectInvert: 'Tersini seç',
selectionAll: 'Tümünü seç',
sortTitle: 'Sırala',
expand: 'Satırı genişlet',
collapse: 'Satırı daralt',
triggerDesc: 'Azalan düzende sırala',
triggerAsc: 'Artan düzende sırala',
cancelSort: 'Sıralamayı kaldır'
},
Tour: {
Next: 'Sonraki',
Previous: 'Önceki',
Finish: 'Bitir'
},
Modal: {
okText: 'Tamam',
cancelText: 'İptal',
justOkText: 'Tamam'
},
Popconfirm: {
okText: 'Tamam',
cancelText: 'İptal'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Arama',
itemUnit: 'Öğe',
itemsUnit: 'Öğeler',
remove: 'Kaldır',
selectCurrent: 'Tüm sayfayı seç',
removeCurrent: 'Sayfayı kaldır',
selectAll: 'Tümünü seç',
deselectAll: 'Tümünün seçimini kaldır',
removeAll: 'Tümünü kaldır',
selectInvert: 'Tersini seç'
},
Upload: {
uploading: 'Yükleniyor...',
removeFile: 'Dosyayı kaldır',
uploadError: 'Yükleme hatası',
previewFile: 'Dosyayı önizle',
downloadFile: 'Dosyayı indir'
},
Empty: {
description: 'Veri Yok'
},
Icon: {
icon: 'ikon'
},
Text: {
edit: 'Düzenle',
copy: 'Kopyala',
copied: 'Kopyalandı',
expand: 'Genişlet'
},
Form: {
optional: '(opsiyonel)',
defaultValidateMessages: {
default: 'Alan doğrulama hatası ${label}',
required: '${label} gerekli bir alan',
enum: '${label} şunlardan biri olmalı: [${enum}]',
whitespace: '${label} sadece boşluk olamaz',
date: {
format: '${label} tarih biçimi geçersiz',
parse: '${label} bir tarihe dönüştürülemedi',
invalid: '${label} geçersiz bir tarih'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ${len} karakter olmalı',
min: '${label} en az ${min} karakter olmalı',
max: '${label} en çok ${max} karakter olmalı',
range: '${label} ${min}-${max} karakter arası olmalı'
},
number: {
len: '${label} ${len} olmalı',
min: '${label} en az ${min} olmalı',
max: '${label} en çok ${max} olmalı',
range: '${label} ${min}-${max} arası olmalı'
},
array: {
len: '${label} sayısı ${len} olmalı',
min: '${label} sayısı en az ${min} olmalı',
max: '${label} sayısı en çok ${max} olmalı',
range: '${label} sayısı ${min}-${max} arası olmalı'
},
pattern: {
mismatch: '${label} şu kalıpla eşleşmeli: ${pattern}'
}
}
},
Image: {
preview: 'Önizleme'
}
};
/* harmony default export */ var components_locale_tr_TR = (localeValues);
/***/ }),
/***/ "./components/locale/uk_UA.ts":
/*!************************************************!*\
!*** ./components/locale/uk_UA.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_uk_UA; }
});
;// ./node_modules/rc-pagination/es/locale/uk_UA.js
var locale = {
// Options
items_per_page: '/ сторінці',
jump_to: 'Перейти',
jump_to_confirm: 'підтвердити',
page: '',
// Pagination
prev_page: 'Попередня сторінка',
next_page: 'Наступна сторінка',
prev_5: 'Попередні 5 сторінок',
next_5: 'Наступні 5 сторінок',
prev_3: 'Попередні 3 сторінки',
next_3: 'Наступні 3 сторінки',
page_size: 'Page Size'
};
/* harmony default export */ var uk_UA = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/uk_UA.js
var uk_UA_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'uk_UA',
today: 'Сьогодні',
now: 'Зараз',
backToToday: 'Поточна дата',
ok: 'OK',
clear: 'Очистити',
week: 'Тиждень',
month: 'Місяць',
year: 'Рік',
timeSelect: 'Обрати час',
dateSelect: 'Обрати дату',
monthSelect: 'Обрати місяць',
yearSelect: 'Обрати рік',
decadeSelect: 'Обрати десятиріччя',
dateFormat: 'D-M-YYYY',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
previousMonth: 'Попередній місяць (PageUp)',
nextMonth: 'Наступний місяць (PageDown)',
previousYear: 'Попередній рік (Control + left)',
nextYear: 'Наступний рік (Control + right)',
previousDecade: 'Попереднє десятиріччя',
nextDecade: 'Наступне десятиріччя',
previousCentury: 'Попереднє століття',
nextCentury: 'Наступне століття'
});
/* harmony default export */ var locale_uk_UA = (uk_UA_locale);
;// ./components/time-picker/locale/uk_UA.ts
const locale_uk_UA_locale = {
placeholder: 'Оберіть час',
rangePlaceholder: ['Початковий час', 'Кінцевий час']
};
/* harmony default export */ var time_picker_locale_uk_UA = (locale_uk_UA_locale);
;// ./components/date-picker/locale/uk_UA.ts
// Merge into a locale object
const date_picker_locale_uk_UA_locale = {
lang: Object.assign({
placeholder: 'Оберіть дату',
yearPlaceholder: 'Оберіть рік',
quarterPlaceholder: 'Оберіть квартал',
monthPlaceholder: 'Оберіть місяць',
weekPlaceholder: 'Оберіть тиждень',
rangePlaceholder: ['Початкова дата', 'Кінцева дата'],
rangeYearPlaceholder: ['Початковий рік', 'Кінцевий рік'],
rangeMonthPlaceholder: ['Початковий місяць', 'Кінцевий місяць'],
rangeWeekPlaceholder: ['Початковий тиждень', 'Кінцевий тиждень'],
shortWeekDays: ['Нд', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
shortMonths: ['Січ', 'Лют', 'Бер', 'Кві', 'Тра', 'Чер', 'Лип', 'Сер', 'Вер', 'Жов', 'Лис', 'Гру']
}, locale_uk_UA),
timePickerLocale: Object.assign({}, time_picker_locale_uk_UA)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_uk_UA = (date_picker_locale_uk_UA_locale);
;// ./components/calendar/locale/uk_UA.ts
/* harmony default export */ var calendar_locale_uk_UA = (date_picker_locale_uk_UA);
;// ./components/locale/uk_UA.ts
const typeTemplate = '${label} не є типом ${type}';
const localeValues = {
locale: 'uk',
Pagination: uk_UA,
DatePicker: date_picker_locale_uk_UA,
TimePicker: time_picker_locale_uk_UA,
Calendar: calendar_locale_uk_UA,
global: {
placeholder: 'Будь ласка, оберіть'
},
Table: {
filterTitle: 'Фільтрувати',
filterConfirm: 'OK',
filterReset: 'Скинути',
filterEmptyText: 'Фільтри відсутні',
filterCheckAll: 'Обрати всі',
filterSearchPlaceholder: 'Пошук у фільтрах',
emptyText: 'Даних немає',
selectAll: 'Обрати всі на сторінці',
selectInvert: 'Інвертувати вибір',
selectNone: 'Очистити вибір',
selectionAll: 'Обрати всі',
sortTitle: 'Сортувати',
expand: 'Розгорнути рядок',
collapse: 'Згорнути рядок',
triggerDesc: 'Сортувати за спаданням',
triggerAsc: 'Сортувати за зростанням',
cancelSort: 'Відмінити сортування'
},
Tour: {
Next: 'Далі',
Previous: 'Назад',
Finish: 'Завершити'
},
Modal: {
okText: 'Гаразд',
cancelText: 'Скасувати',
justOkText: 'Гаразд'
},
Popconfirm: {
okText: 'Гаразд',
cancelText: 'Скасувати'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Введіть текст для пошуку',
itemUnit: 'елем.',
itemsUnit: 'елем.',
remove: 'Видалити',
selectCurrent: 'Вибрати поточну сторінку',
removeCurrent: 'Скасувати вибір на сторінці',
selectAll: 'Вибрати всі дані',
deselectAll: 'Очистити вибір',
removeAll: 'Скасувати вибір',
selectInvert: 'Інвертувати поточну сторінку'
},
Upload: {
uploading: 'Завантаження ...',
removeFile: 'Видалити файл',
uploadError: 'Помилка завантаження',
previewFile: 'Попередній перегляд файлу',
downloadFile: 'Завантажити файл'
},
Empty: {
description: 'Даних немає'
},
Icon: {
icon: 'іконка'
},
Text: {
edit: 'Редагувати',
copy: 'Скопіювати',
copied: 'Скопійовано',
expand: 'Розширити'
},
Form: {
optional: '(опціонально)',
defaultValidateMessages: {
default: 'Помилка валідації для поля ${label}',
required: 'Будь ласка, заповніть ${label}',
enum: 'Лише одне зі значень [${enum}] доступне для ${label}',
whitespace: 'Значення у полі ${label} не може бути пробілом',
date: {
format: 'Не валідний формат дати у ${label}',
parse: 'Значення ${label} не може бути приведене до дати',
invalid: 'Не валідна дата у ${label}'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} має містити ${len} символів',
min: '${label} має містити не менш, ніж ${min} символів',
max: '${label} має містити не більш, ніж ${max} символів',
range: '${label} має містити ${min}-${max} символів'
},
number: {
len: '${label} має дорівнювати ${len}',
min: '${label} має бути не менш, ніж ${min}',
max: '${label} має бути не більш, ніж ${max}',
range: '${label} має бути в межах ${min}-${max}'
},
array: {
len: '${label} має містити ${len} елементи',
min: '${label} має містити не менш, ніж ${min} елементи',
max: '${label} має містити не більш, ніж ${max} елементи',
range: 'Кількість елементів в ${label} має бути в межах ${min}-${max}'
},
pattern: {
mismatch: '${label} не відповідає шаблону ${pattern}'
}
}
},
Image: {
preview: 'Попередній перегляд'
},
QRCode: {
expired: 'QR-код закінчився',
refresh: 'Оновити'
}
};
/* harmony default export */ var components_locale_uk_UA = (localeValues);
/***/ }),
/***/ "./components/locale/ur_PK.ts":
/*!************************************************!*\
!*** ./components/locale/ur_PK.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_ur_PK; }
});
;// ./node_modules/rc-pagination/es/locale/ur_PK.js
var locale = {
// Options
items_per_page: '/ صفحہ',
jump_to: 'پاس جاؤ',
jump_to_confirm: 'تصدیق کریں',
page: '',
// Pagination
prev_page: 'پچھلا صفحہ',
next_page: 'اگلا صفحہ',
prev_5: 'پچھلے 5 صفحات',
next_5: 'اگلے 5 صفحات',
prev_3: 'پچھلے 3 صفحات',
next_3: 'اگلے 3 صفحات',
page_size: 'Page Size'
};
/* harmony default export */ var ur_PK = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/ur_PK.js
var ur_PK_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'ur_PK',
today: 'آج',
now: 'ابھی',
backToToday: 'آج واپس',
ok: 'ٹھیک ہے',
clear: 'صاف',
week: 'ہفتہ',
month: 'مہینہ',
year: 'سال',
timeSelect: 'وقت منتخب کریں',
dateSelect: 'تاریخ منتخب کریں',
weekSelect: 'ایک ہفتہ کا انتخاب کریں',
monthSelect: 'ایک مہینہ کا انتخاب کریں',
yearSelect: 'ایک سال کا انتخاب کریں',
decadeSelect: 'ایک دہائی کا انتخاب کریں',
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'پچھلے مہینے (PageUp)',
nextMonth: 'اگلے مہینے (PageDown)',
previousYear: 'گزشتہ سال (Control + left)',
nextYear: 'اگلے سال (Control + right)',
previousDecade: 'پچھلی دہائی',
nextDecade: 'اگلی دہائی',
previousCentury: 'پچھلی صدی',
nextCentury: 'اگلی صدی'
});
/* harmony default export */ var locale_ur_PK = (ur_PK_locale);
;// ./components/time-picker/locale/ur_PK.ts
const locale_ur_PK_locale = {
placeholder: 'وقت منتخب کریں',
rangePlaceholder: ['وقت منتخب کریں', 'آخر وقت']
};
/* harmony default export */ var time_picker_locale_ur_PK = (locale_ur_PK_locale);
;// ./components/date-picker/locale/ur_PK.ts
// Merge into a locale object
const date_picker_locale_ur_PK_locale = {
lang: Object.assign({
placeholder: 'تاریخ منتخب کریں',
yearPlaceholder: 'سال کو منتخب کریں',
quarterPlaceholder: 'کوارٹر منتخب کریں',
monthPlaceholder: 'ماہ منتخب کریں',
weekPlaceholder: 'ہفتہ منتخب کریں',
rangePlaceholder: ['شروع کرنے کی تاریخ', 'آخری تاریخ'],
rangeYearPlaceholder: ['آغاز سال', 'آخر سال'],
rangeMonthPlaceholder: ['مہینہ شروع', 'اختتامی مہینہ'],
rangeWeekPlaceholder: ['ہفتے شروع کریں', 'اختتام ہفتہ']
}, locale_ur_PK),
timePickerLocale: Object.assign({}, time_picker_locale_ur_PK)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_ur_PK = (date_picker_locale_ur_PK_locale);
;// ./components/calendar/locale/ur_PK.ts
/* harmony default export */ var calendar_locale_ur_PK = (date_picker_locale_ur_PK);
;// ./components/locale/ur_PK.ts
const typeTemplate = '${label} درست نہیں ہے ${type}';
const localeValues = {
locale: 'ur',
Pagination: ur_PK,
DatePicker: date_picker_locale_ur_PK,
TimePicker: time_picker_locale_ur_PK,
Calendar: calendar_locale_ur_PK,
global: {
placeholder: 'منتخب کریں'
},
Table: {
filterTitle: 'فلٹر مینو',
filterConfirm: 'ٹھیک ہے',
filterReset: 'ری سیٹ کریں',
filterEmptyText: 'فلٹرز نہیں',
emptyText: 'کوئی ڈیٹا نہیں',
selectAll: 'موجودہ صفحہ منتخب کریں',
selectInvert: 'موجودہ صفحے کو الٹ دیں',
selectNone: 'تمام ڈیٹا صاف کریں',
selectionAll: 'تمام ڈیٹا کو منتخب کریں',
sortTitle: 'ترتیب دیں',
expand: 'پھیلائیں',
collapse: 'سمیٹیں',
triggerDesc: 'نزولی کو ترتیب دینے کیلئے کلک کریں',
triggerAsc: 'چڑھنے کو ترتیب دینے کیلئے کلک کریں',
cancelSort: 'ترتیب کو منسوخ کرنے کیلئے دبائیں'
},
Modal: {
okText: 'ٹھیک ہے',
cancelText: 'منسوخ کریں',
justOkText: 'ٹھیک ہے'
},
Popconfirm: {
okText: 'ٹھیک ہے',
cancelText: 'منسوخ کریں'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'یہاں تلاش کریں',
itemUnit: 'شے',
itemsUnit: 'اشیاء',
remove: 'ہٹائیں',
selectCurrent: 'موجودہ صفحہ منتخب کریں',
removeCurrent: 'موجودہ صفحہ ہٹائیں',
selectAll: 'تمام ڈیٹا کو منتخب کریں',
removeAll: 'تمام ڈیٹا کو ہٹا دیں',
selectInvert: 'موجودہ صفحے کو الٹ دیں'
},
Upload: {
uploading: 'اپ لوڈ ہو رہا ہے…',
removeFile: 'فائل کو ہٹا دیں',
uploadError: 'اپ لوڈ کی خرابی',
previewFile: 'پیش نظار فائل',
downloadFile: 'فائل ڈاؤن لوڈ کریں'
},
Empty: {
description: 'کوئی ڈیٹا نہیں'
},
Icon: {
icon: 'آئیکن'
},
Text: {
edit: 'ترمیم',
copy: 'کاپی',
copied: 'کاپی ہوگیا',
expand: 'پھیلائیں'
},
Form: {
optional: '(اختیاری)',
defaultValidateMessages: {
default: ' ${label} کیلئے فیلڈ کی توثیق میں نقص',
required: 'درج کریں ${label}',
enum: '${label} ایک ہونا ضروری ہے [${enum}]',
whitespace: '${label} خالی نہیں ہوسکتا',
date: {
format: '${label} تاریخ کی شکل غلط ہے',
parse: '${label} تاریخ میں تبدیل نہیں کیا جاسکتا',
invalid: '${label} غلط تاریخ ہے'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} ضروری ہے ${len} حروف',
min: '${label} کم از کم ہونا چاہئے ${min} حروف',
max: '${label} تک ہونا چاہئے ${max} حروف',
range: '${label} کے درمیان ہونا چاہئے ${min}-${max} حروف'
},
number: {
len: '${label} کے برابر ہونا چاہئے ${len}',
min: '${label} کم از کم ہونا چاہئے ${min}',
max: '${label} زیادہ سے زیادہ ہونا چاہئے ${max}',
range: '${label} کے درمیان ہونا چاہئے ${min}-${max}'
},
array: {
len: 'ضروری ہے ${len} ${label}',
min: 'کم از کم ${min} ${label}',
max: 'زیادہ سے زیادہ ${max} ${label}',
range: 'کی رقم ${label} کے درمیان ہونا چاہئے ${min}-${max}'
},
pattern: {
mismatch: '${label} پیٹرن سے ملتا نہیں ہے ${pattern}'
}
}
},
Image: {
preview: 'پیش نظارہ'
}
};
/* harmony default export */ var components_locale_ur_PK = (localeValues);
/***/ }),
/***/ "./components/locale/useLocale.ts":
/*!****************************************!*\
!*** ./components/locale/useLocale.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context */ "./components/locale/context.ts");
/* harmony import */ var _en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./en_US */ "./components/locale/en_US.ts");
const useLocale = (componentName, defaultLocale) => {
const fullLocale = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_context__WEBPACK_IMPORTED_MODULE_1__["default"]);
const getLocale = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
var _a;
const locale = defaultLocale || _en_US__WEBPACK_IMPORTED_MODULE_2__["default"][componentName];
const localeFromContext = (_a = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale[componentName]) !== null && _a !== void 0 ? _a : {};
return Object.assign(Object.assign({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});
}, [componentName, defaultLocale, fullLocale]);
const getLocaleCode = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
const localeCode = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.locale;
// Had use LocaleProvide but didn't set locale
if ((fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.exist) && !localeCode) {
return _en_US__WEBPACK_IMPORTED_MODULE_2__["default"].locale;
}
return localeCode;
}, [fullLocale]);
return [getLocale, getLocaleCode];
};
/* harmony default export */ __webpack_exports__["default"] = (useLocale);
/***/ }),
/***/ "./components/locale/uz_UZ.ts":
/*!************************************************!*\
!*** ./components/locale/uz_UZ.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_uz_UZ; }
});
;// ./node_modules/rc-pagination/es/locale/uz_UZ.js
var locale = {
// Options
items_per_page: '/ sah.',
jump_to: "O'tish",
jump_to_confirm: 'tasdiqlash',
page: 'Sahifa',
// Pagination
prev_page: 'Orqaga',
next_page: 'Oldinga',
prev_5: 'Oldingi 5',
next_5: 'Keyingi 5',
prev_3: 'Oldingi 3',
next_3: 'Keyingi 3',
page_size: 'sahifa hajmi'
};
/* harmony default export */ var uz_UZ = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/uz_UZ.js
var uz_UZ_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'uz_UZ',
today: 'Bugun',
now: 'Hozir',
backToToday: 'Bugunga qaytish',
ok: 'OK',
clear: 'Toza',
week: 'Xafta',
month: 'Oy',
year: 'Yil',
timeSelect: 'vaqtni tanlang',
dateSelect: 'sanani tanlang',
weekSelect: 'Haftani tanlang',
monthSelect: 'Oyni tanlang',
yearSelect: 'Yilni tanlang',
decadeSelect: "O'n yilni tanlang",
dateFormat: 'M/D/YYYY',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
previousMonth: 'Oldingi oy (PageUp)',
nextMonth: 'Keyingi oy (PageDown)',
previousYear: "O'tgan yili (Control + left)",
nextYear: 'Keyingi yil (Control + right)',
previousDecade: "Oxirgi o'n yil",
nextDecade: "Keyingi o'n yil",
previousCentury: "O'tgan asr",
nextCentury: 'Keyingi asr'
});
/* harmony default export */ var locale_uz_UZ = (uz_UZ_locale);
;// ./components/time-picker/locale/uz_UZ.ts
const locale_uz_UZ_locale = {
placeholder: 'Vaqtni tanlang',
rangePlaceholder: ['Boshlanish vaqti', 'Tugallanish vaqti']
};
/* harmony default export */ var time_picker_locale_uz_UZ = (locale_uz_UZ_locale);
;// ./components/date-picker/locale/uz_UZ.ts
// Merge into a locale object
const date_picker_locale_uz_UZ_locale = {
lang: Object.assign({
placeholder: 'Sanani tanlang',
yearPlaceholder: 'Yilni tanlang',
quarterPlaceholder: 'Chorakni tanlang',
monthPlaceholder: 'Oyni tanlang',
weekPlaceholder: 'Haftani tanlang',
rangePlaceholder: ['Boshlanish sanasi', 'Tugallanish sanasi'],
rangeYearPlaceholder: ['Boshlanish yili', 'Tugallanish yili'],
rangeMonthPlaceholder: ['Boshlanish oyi', 'Tugallanish oyi'],
rangeWeekPlaceholder: ['Boshlanish haftasi', 'Tugallanish haftasi']
}, locale_uz_UZ),
timePickerLocale: Object.assign({}, time_picker_locale_uz_UZ)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_uz_UZ = (date_picker_locale_uz_UZ_locale);
;// ./components/calendar/locale/uz_UZ.ts
/* harmony default export */ var calendar_locale_uz_UZ = (date_picker_locale_uz_UZ);
;// ./components/locale/uz_UZ.ts
const typeTemplate = '${label} ${type} turi emas';
const localeValues = {
// NOTE: In
// https://github.com/react-component/picker/blob/master/src/locale/uz_UZ.ts
// and
// https://github.com/react-component/pagination/blob/master/src/locale/uz_UZ.ts
// both implemented as uz-latn Uzbek
locale: 'uz-latn',
Pagination: uz_UZ,
DatePicker: date_picker_locale_uz_UZ,
TimePicker: time_picker_locale_uz_UZ,
Calendar: calendar_locale_uz_UZ,
global: {
placeholder: 'Iltimos tanlang'
},
Table: {
filterTitle: 'Filtr',
filterConfirm: 'OK',
filterReset: 'Bekor qilish',
filterEmptyText: 'Filtrlarsiz',
filterCheckAll: 'Barcha elementlarni tanlash',
filterSearchPlaceholder: 'Filtrlarda qidiruv',
emptyText: "Ma'lumotlar topilmadi",
selectAll: 'Barchasini tanlash',
selectInvert: 'Tanlovni aylantirish',
selectNone: "Barcha ma'lumotlarni tozalang",
selectionAll: 'Barchasini tanlash',
sortTitle: 'Tartiblash',
expand: 'Satirni yozish',
collapse: "Satirni yig'ish",
triggerDesc: 'Kamayish tartibida tartiblash uchun bosing',
triggerAsc: "O'sish tartibida tartiblash uchun bosing",
cancelSort: 'Tartiblshni rad etish uchun bosing'
},
Tour: {
Next: "So'ngra",
Previous: 'Ortga',
Finish: 'Tugatish'
},
Modal: {
okText: 'OK',
cancelText: 'Yopish',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Bekor qilish'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Qidiruv',
itemUnit: 'elem.',
itemsUnit: 'elem.',
remove: 'Oʻchirish',
selectAll: "Barch ma'lumotlarni tanlash",
selectCurrent: 'Joriy sahifani tanlash',
selectInvert: 'Tanlovni aylantirish',
removeAll: "Barcha ma'lumotlarni o'chirish",
removeCurrent: "Joriy sahifani o'chirish"
},
Upload: {
uploading: 'Yuklanmoqda...',
removeFile: "Faylni o'chirish",
uploadError: 'Yuklashda xatolik yuz berdi',
previewFile: "Faylni oldindan ko'rish",
downloadFile: 'Faylni yuklash'
},
Empty: {
description: 'Maʼlumot topilmadi'
},
Icon: {
icon: 'ikonka'
},
Text: {
edit: 'Tahrirlash',
copy: 'Nusxalash',
copied: 'Nusxalandi',
expand: 'Ochib qoyish'
},
Form: {
optional: '(shart emas)',
defaultValidateMessages: {
default: '${label} maydonini tekshirishda xatolik yuz berdi',
required: 'Iltimos, ${label} kiriting',
enum: '${label}, [${enum}] dan biri boʻlishi kerak',
whitespace: '${label} boʻsh boʻlishi mumkin emas',
date: {
format: '${label} toʻgʻri sana formatida emas',
parse: '${label} sanaga aylantirilmaydi',
invalid: "${label} tog'ri sana emas"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}, ${len} ta belgidan iborat boʻlishi kerak',
min: '${label} должна быть больше или равна ${min} символов',
max: '${label}, ${max} belgidan katta yoki teng boʻlishi kerak',
range: '${label} uzunligi ${min}-${max} belgilar orasida boʻlishi kerak'
},
number: {
len: '${label}, ${len} ga teng boʻlishi kerak',
min: '${label}, ${min} dan katta yoki teng boʻlishi kerak',
max: '${label}, ${max} dan kichik yoki teng boʻlishi kerak',
range: '${label}, ${min}-${max} orasida boʻlishi kerak'
},
array: {
len: '${label} elementlari soni ${len} ga teng boʻlishi kerak',
min: '${label} elementlari soni ${min} dan katta yoki teng boʻlishi kerak',
max: '${label} elementlari soni ${max} dan kam yoki teng boʻlishi kerak',
range: '${label} elementlari soni ${min} va ${max} orasida boʻlishi kerak'
},
pattern: {
mismatch: '${label}, ${pattern} andazasiga mos emas'
}
}
},
Image: {
preview: 'Ko‘rib chiqish'
},
QRCode: {
expired: 'QR-kod eskirgan',
refresh: 'Yangilash'
}
};
/* harmony default export */ var components_locale_uz_UZ = (localeValues);
/***/ }),
/***/ "./components/locale/vi_VN.ts":
/*!************************************************!*\
!*** ./components/locale/vi_VN.ts + 5 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_vi_VN; }
});
;// ./node_modules/rc-pagination/es/locale/vi_VN.js
var locale = {
// Options
items_per_page: '/ trang',
jump_to: 'Đến',
jump_to_confirm: 'xác nhận',
page: 'Trang',
// Pagination
prev_page: 'Trang Trước',
next_page: 'Trang Kế',
prev_5: 'Về 5 Trang Trước',
next_5: 'Đến 5 Trang Kế',
prev_3: 'Về 3 Trang Trước',
next_3: 'Đến 3 Trang Kế',
page_size: 'kích thước trang'
};
/* harmony default export */ var vi_VN = (locale);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/vi_VN.js
var vi_VN_locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'vi_VN',
today: 'Hôm nay',
now: 'Bây giờ',
backToToday: 'Trở về hôm nay',
ok: 'OK',
clear: 'Xóa',
week: 'Tuần',
month: 'Tháng',
year: 'Năm',
timeSelect: 'Chọn thời gian',
dateSelect: 'Chọn ngày',
weekSelect: 'Chọn tuần',
monthSelect: 'Chọn tháng',
yearSelect: 'Chọn năm',
decadeSelect: 'Chọn thập kỷ',
dateFormat: 'D/M/YYYY',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
previousMonth: 'Tháng trước (PageUp)',
nextMonth: 'Tháng sau (PageDown)',
previousYear: 'Năm trước (Control + left)',
nextYear: 'Năm sau (Control + right)',
previousDecade: 'Thập kỷ trước',
nextDecade: 'Thập kỷ sau',
previousCentury: 'Thế kỷ trước',
nextCentury: 'Thế kỷ sau'
});
/* harmony default export */ var locale_vi_VN = (vi_VN_locale);
;// ./components/time-picker/locale/vi_VN.ts
const locale_vi_VN_locale = {
placeholder: 'Chọn thời gian',
rangePlaceholder: ['Bắt đầu', 'Kết thúc']
};
/* harmony default export */ var time_picker_locale_vi_VN = (locale_vi_VN_locale);
;// ./components/date-picker/locale/vi_VN.ts
// Merge into a locale object
const date_picker_locale_vi_VN_locale = {
lang: Object.assign({
placeholder: 'Chọn thời điểm',
yearPlaceholder: 'Chọn năm',
quarterPlaceholder: 'Chọn quý',
monthPlaceholder: 'Chọn tháng',
weekPlaceholder: 'Chọn tuần',
rangePlaceholder: ['Ngày bắt đầu', 'Ngày kết thúc'],
rangeYearPlaceholder: ['Năm bắt đầu', 'Năm kết thúc'],
rangeQuarterPlaceholder: ['Quý bắt đầu', 'Quý kết thúc'],
rangeMonthPlaceholder: ['Tháng bắt đầu', 'Tháng kết thúc'],
rangeWeekPlaceholder: ['Tuần bắt đầu', 'Tuần kết thúc']
}, locale_vi_VN),
timePickerLocale: Object.assign({}, time_picker_locale_vi_VN)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_vi_VN = (date_picker_locale_vi_VN_locale);
;// ./components/calendar/locale/vi_VN.ts
/* harmony default export */ var calendar_locale_vi_VN = (date_picker_locale_vi_VN);
;// ./components/locale/vi_VN.ts
const typeTemplate = '${label} không phải kiểu ${type} hợp lệ';
const localeValues = {
locale: 'vi',
Pagination: vi_VN,
DatePicker: date_picker_locale_vi_VN,
TimePicker: time_picker_locale_vi_VN,
Calendar: calendar_locale_vi_VN,
global: {
placeholder: 'Vui lòng chọn'
},
Table: {
filterTitle: 'Bộ lọc',
filterConfirm: 'Đồng ý',
filterReset: 'Bỏ lọc',
filterEmptyText: 'Không có bộ lọc',
filterCheckAll: 'Chọn tất cả',
filterSearchPlaceholder: 'Tìm kiếm bộ lọc',
emptyText: 'Trống',
selectAll: 'Chọn tất cả',
selectInvert: 'Chọn ngược lại',
selectNone: 'Bỏ chọn tất cả',
selectionAll: 'Chọn tất cả',
sortTitle: 'Sắp xếp',
expand: 'Mở rộng dòng',
collapse: 'Thu gọn dòng',
triggerDesc: 'Nhấp để sắp xếp giảm dần',
triggerAsc: 'Nhấp để sắp xếp tăng dần',
cancelSort: 'Nhấp để hủy sắp xếp'
},
Tour: {
Next: 'Tiếp',
Previous: 'Trước',
Finish: 'Hoàn thành'
},
Modal: {
okText: 'Đồng ý',
cancelText: 'Hủy',
justOkText: 'OK'
},
Popconfirm: {
okText: 'Đồng ý',
cancelText: 'Hủy'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Tìm ở đây',
itemUnit: 'mục',
itemsUnit: 'mục',
remove: 'Gỡ bỏ',
selectCurrent: 'Chọn trang hiện tại',
removeCurrent: 'Gỡ bỏ trang hiện tại',
selectAll: 'Chọn tất cả',
removeAll: 'Gỡ bỏ tất cả',
selectInvert: 'Đảo ngược trang hiện tại'
},
Upload: {
uploading: 'Đang tải lên...',
removeFile: 'Gỡ bỏ tập tin',
uploadError: 'Lỗi tải lên',
previewFile: 'Xem trước tập tin',
downloadFile: 'Tải tập tin'
},
Empty: {
description: 'Trống'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Chỉnh sửa',
copy: 'Sao chép',
copied: 'Đã sao chép',
expand: 'Mở rộng'
},
Form: {
optional: '(Tùy chọn)',
defaultValidateMessages: {
default: '${label} không đáp ứng điều kiện quy định',
required: 'Hãy nhập thông tin cho trường ${label}',
enum: '${label} phải có giá trị nằm trong tập [${enum}]',
whitespace: '${label} không được chứa khoảng trắng',
date: {
format: '${label} sai định dạng ngày tháng',
parse: 'Không thể chuyển ${label} sang kiểu Ngày tháng',
invalid: '${label} không phải giá trị Ngày tháng hợp lệ'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} phải dài đúng ${len} ký tự',
min: 'Độ dài tối thiểu trường ${label} là ${min} ký tự',
max: 'Độ dài tối đa trường ${label} là ${max} ký tự',
range: 'Độ dài trường ${label} phải từ ${min} đến ${max} ký tự'
},
number: {
len: '${label} phải bằng ${len}',
min: '${label} phải lớn hơn hoặc bằng ${min}',
max: '${label} phải nhỏ hơn hoặc bằng ${max}',
range: '${label} phải nằm trong khoảng ${min}-${max}'
},
array: {
len: 'Mảng ${label} phải có ${len} phần tử ',
min: 'Mảng ${label} phải chứa tối thiểu ${min} phần tử ',
max: 'Mảng ${label} phải chứa tối đa ${max} phần tử ',
range: 'Mảng ${label} phải chứa từ ${min}-${max} phần tử'
},
pattern: {
mismatch: '${label} không thỏa mãn mẫu kiểm tra ${pattern}'
}
}
},
Image: {
preview: 'Xem trước'
},
QRCode: {
expired: 'Mã QR hết hạn',
refresh: 'Làm mới'
}
};
/* harmony default export */ var components_locale_vi_VN = (localeValues);
/***/ }),
/***/ "./components/locale/zh_CN.ts":
/*!************************************************!*\
!*** ./components/locale/zh_CN.ts + 4 modules ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_locale_zh_CN; }
});
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
var zh_CN = __webpack_require__("./node_modules/rc-pagination/es/locale/zh_CN.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
;// ./node_modules/rc-picker/es/locale/zh_CN.js
var locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
locale: 'zh_CN',
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '确定',
timeSelect: '选择时间',
dateSelect: '选择日期',
weekSelect: '选择周',
clear: '清除',
week: '周',
month: '月',
year: '年',
previousMonth: '上个月 (翻页上键)',
nextMonth: '下个月 (翻页下键)',
monthSelect: '选择月份',
yearSelect: '选择年份',
decadeSelect: '选择年代',
previousYear: '上一年 (Control键加左方向键)',
nextYear: '下一年 (Control键加右方向键)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世纪',
nextCentury: '下一世纪',
yearFormat: 'YYYY年',
cellDateFormat: 'D',
monthBeforeYear: false
});
/* harmony default export */ var locale_zh_CN = (locale);
;// ./components/time-picker/locale/zh_CN.ts
const zh_CN_locale = {
placeholder: '请选择时间',
rangePlaceholder: ['开始时间', '结束时间']
};
/* harmony default export */ var time_picker_locale_zh_CN = (zh_CN_locale);
;// ./components/date-picker/locale/zh_CN.ts
// 统一合并为完整的 Locale
const locale_zh_CN_locale = {
lang: Object.assign({
placeholder: '请选择日期',
yearPlaceholder: '请选择年份',
quarterPlaceholder: '请选择季度',
monthPlaceholder: '请选择月份',
weekPlaceholder: '请选择周',
rangePlaceholder: ['开始日期', '结束日期'],
rangeYearPlaceholder: ['开始年份', '结束年份'],
rangeMonthPlaceholder: ['开始月份', '结束月份'],
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
rangeWeekPlaceholder: ['开始周', '结束周']
}, locale_zh_CN),
timePickerLocale: Object.assign({}, time_picker_locale_zh_CN)
};
// should add whitespace between char in Button
locale_zh_CN_locale.lang.ok = '确定';
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_zh_CN = (locale_zh_CN_locale);
;// ./components/calendar/locale/zh_CN.ts
/* harmony default export */ var calendar_locale_zh_CN = (date_picker_locale_zh_CN);
;// ./components/locale/zh_CN.ts
const typeTemplate = '${label}不是一个有效的${type}';
const localeValues = {
locale: 'zh-cn',
Pagination: zh_CN["default"],
DatePicker: date_picker_locale_zh_CN,
TimePicker: time_picker_locale_zh_CN,
Calendar: calendar_locale_zh_CN,
// locales for all components
global: {
placeholder: '请选择'
},
Table: {
filterTitle: '筛选',
filterConfirm: '确定',
filterReset: '重置',
filterEmptyText: '无筛选项',
filterCheckAll: '全选',
filterSearchPlaceholder: '在筛选项中搜索',
emptyText: '暂无数据',
selectAll: '全选当页',
selectInvert: '反选当页',
selectNone: '清空所有',
selectionAll: '全选所有',
sortTitle: '排序',
expand: '展开行',
collapse: '关闭行',
triggerDesc: '点击降序',
triggerAsc: '点击升序',
cancelSort: '取消排序'
},
Modal: {
okText: '确定',
cancelText: '取消',
justOkText: '知道了'
},
Tour: {
Next: '下一步',
Previous: '上一步',
Finish: '结束导览'
},
Popconfirm: {
cancelText: '取消',
okText: '确定'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: '请输入搜索内容',
itemUnit: '项',
itemsUnit: '项',
remove: '删除',
selectCurrent: '全选当页',
removeCurrent: '删除当页',
selectAll: '全选所有',
deselectAll: '取消全选',
removeAll: '删除全部',
selectInvert: '反选当页'
},
Upload: {
uploading: '文件上传中',
removeFile: '删除文件',
uploadError: '上传错误',
previewFile: '预览文件',
downloadFile: '下载文件'
},
Empty: {
description: '暂无数据'
},
Icon: {
icon: '图标'
},
Text: {
edit: '编辑',
copy: '复制',
copied: '复制成功',
expand: '展开',
collapse: '收起'
},
Form: {
optional: '(可选)',
defaultValidateMessages: {
default: '字段验证错误${label}',
required: '请输入${label}',
enum: '${label}必须是其中一个[${enum}]',
whitespace: '${label}不能为空字符',
date: {
format: '${label}日期格式无效',
parse: '${label}不能转换为日期',
invalid: '${label}是一个无效日期'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}须为${len}个字符',
min: '${label}最少${min}个字符',
max: '${label}最多${max}个字符',
range: '${label}须在${min}-${max}字符之间'
},
number: {
len: '${label}必须等于${len}',
min: '${label}最小值为${min}',
max: '${label}最大值为${max}',
range: '${label}须在${min}-${max}之间'
},
array: {
len: '须为${len}个${label}',
min: '最少${min}个${label}',
max: '最多${max}个${label}',
range: '${label}数量须在${min}-${max}之间'
},
pattern: {
mismatch: '${label}与模式不匹配${pattern}'
}
}
},
Image: {
preview: '预览'
},
QRCode: {
expired: '二维码过期',
refresh: '点击刷新',
scanned: '已扫描'
},
ColorPicker: {
presetEmpty: '暂无',
transparent: '无色',
singleColor: '单色',
gradientColor: '渐变色'
}
};
/* harmony default export */ var components_locale_zh_CN = (localeValues);
/***/ }),
/***/ "./components/locale/zh_HK.ts":
/*!************************************!*\
!*** ./components/locale/zh_HK.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var rc_pagination_es_locale_zh_TW__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/zh_TW */ "./node_modules/rc-pagination/es/locale/zh_TW.js");
/* harmony import */ var _calendar_locale_zh_TW__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/zh_TW */ "./components/calendar/locale/zh_TW.ts");
/* harmony import */ var _date_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/zh_TW */ "./components/date-picker/locale/zh_TW.ts");
/* harmony import */ var _time_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/zh_TW */ "./components/time-picker/locale/zh_TW.ts");
const typeTemplate = '${label}不是一個有效的${type}';
const localeValues = {
locale: 'zh-hk',
Pagination: rc_pagination_es_locale_zh_TW__WEBPACK_IMPORTED_MODULE_0__["default"],
DatePicker: _date_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_1__["default"],
TimePicker: _time_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_2__["default"],
Calendar: _calendar_locale_zh_TW__WEBPACK_IMPORTED_MODULE_3__["default"],
global: {
placeholder: '請選擇'
},
Table: {
filterTitle: '篩選器',
filterConfirm: '確定',
filterReset: '重置',
filterEmptyText: '無篩選項',
filterCheckAll: '全選',
filterSearchPlaceholder: '在篩選項中搜尋',
emptyText: '暫無數據',
selectAll: '全部選取',
selectInvert: '反向選取',
selectNone: '清空所有',
selectionAll: '全選所有',
sortTitle: '排序',
expand: '展開行',
collapse: '關閉行',
triggerDesc: '點擊降序',
triggerAsc: '點擊升序',
cancelSort: '取消排序'
},
Modal: {
okText: '確定',
cancelText: '取消',
justOkText: '知道了'
},
Tour: {
Next: '下一步',
Previous: '上一步',
Finish: '結束導覽'
},
Popconfirm: {
okText: '確定',
cancelText: '取消'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: '搜尋資料',
itemUnit: '項目',
itemsUnit: '項目',
remove: '刪除',
selectCurrent: '全選當頁',
removeCurrent: '刪除當頁',
selectAll: '全選所有',
removeAll: '刪除全部',
selectInvert: '反選當頁'
},
Upload: {
uploading: '正在上傳...',
removeFile: '刪除檔案',
uploadError: '上傳失敗',
previewFile: '檔案預覽',
downloadFile: '下载文件'
},
Empty: {
description: '無此資料'
},
Icon: {
icon: '圖標'
},
Text: {
edit: '編輯',
copy: '複製',
copied: '複製成功',
expand: '展開'
},
Form: {
defaultValidateMessages: {
default: '字段驗證錯誤${label}',
required: '請輸入${label}',
enum: '${label}必須是其中一個[${enum}]',
whitespace: '${label}不能為空字符',
date: {
format: '${label}日期格式無效',
parse: '${label}不能轉換為日期',
invalid: '${label}是一個無效日期'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}須為${len}個字符',
min: '${label}最少${min}個字符',
max: '${label}最多${max}個字符',
range: '${label}須在${min}-${max}字符之間'
},
number: {
len: '${label}必須等於${len}',
min: '${label}最小值為${min}',
max: '${label}最大值為${max}',
range: '${label}須在${min}-${max}之間'
},
array: {
len: '須為${len}個${label}',
min: '最少${min}個${label}',
max: '最多${max}個${label}',
range: '${label}數量須在${min}-${max}之間'
},
pattern: {
mismatch: '${label}與模式不匹配${pattern}'
}
}
},
Image: {
preview: '預覽'
},
QRCode: {
expired: '二維碼過期',
refresh: '點擊刷新',
scanned: '已掃描'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/locale/zh_TW.ts":
/*!************************************!*\
!*** ./components/locale/zh_TW.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var rc_pagination_es_locale_zh_TW__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/zh_TW */ "./node_modules/rc-pagination/es/locale/zh_TW.js");
/* harmony import */ var _calendar_locale_zh_TW__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/zh_TW */ "./components/calendar/locale/zh_TW.ts");
/* harmony import */ var _date_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/zh_TW */ "./components/date-picker/locale/zh_TW.ts");
/* harmony import */ var _time_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/zh_TW */ "./components/time-picker/locale/zh_TW.ts");
const typeTemplate = '${label}不是一個有效的${type}';
const localeValues = {
locale: 'zh-tw',
Pagination: rc_pagination_es_locale_zh_TW__WEBPACK_IMPORTED_MODULE_0__["default"],
DatePicker: _date_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_1__["default"],
TimePicker: _time_picker_locale_zh_TW__WEBPACK_IMPORTED_MODULE_2__["default"],
Calendar: _calendar_locale_zh_TW__WEBPACK_IMPORTED_MODULE_3__["default"],
global: {
placeholder: '請選擇'
},
Table: {
filterTitle: '篩選器',
filterConfirm: '確定',
filterReset: '重置',
filterEmptyText: '無篩選項',
filterCheckAll: '全選',
filterSearchPlaceholder: '在篩選項中搜尋',
emptyText: '暫無數據',
selectAll: '全部選取',
selectInvert: '反向選取',
selectNone: '清空所有',
selectionAll: '全選所有',
sortTitle: '排序',
expand: '展開行',
collapse: '關閉行',
triggerDesc: '點擊降序',
triggerAsc: '點擊升序',
cancelSort: '取消排序'
},
Modal: {
okText: '確定',
cancelText: '取消',
justOkText: '知道了'
},
Tour: {
Next: '下一步',
Previous: '上一步',
Finish: '結束導覽'
},
Popconfirm: {
okText: '確定',
cancelText: '取消'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: '搜尋資料',
itemUnit: '項目',
itemsUnit: '項目',
remove: '删除',
selectCurrent: '全選當頁',
removeCurrent: '删除當頁',
selectAll: '全選所有',
removeAll: '删除全部',
selectInvert: '反選當頁'
},
Upload: {
uploading: '正在上傳...',
removeFile: '刪除檔案',
uploadError: '上傳失敗',
previewFile: '檔案預覽',
downloadFile: '下载文件'
},
Empty: {
description: '無此資料'
},
Icon: {
icon: '圖標'
},
Text: {
edit: '編輯',
copy: '複製',
copied: '複製成功',
expand: '展開'
},
Form: {
optional: '(可選)',
defaultValidateMessages: {
default: '字段驗證錯誤${label}',
required: '請輸入${label}',
enum: '${label}必須是其中一個[${enum}]',
whitespace: '${label}不能為空字符',
date: {
format: '${label}日期格式無效',
parse: '${label}不能轉換為日期',
invalid: '${label}是一個無效日期'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}須為${len}個字符',
min: '${label}最少${min}個字符',
max: '${label}最多${max}個字符',
range: '${label}須在${min}-${max}字符之間'
},
number: {
len: '${label}必須等於${len}',
min: '${label}最小值為${min}',
max: '${label}最大值為${max}',
range: '${label}須在${min}-${max}之間'
},
array: {
len: '須為${len}個${label}',
min: '最少${min}個${label}',
max: '最多${max}個${label}',
range: '${label}數量須在${min}-${max}之間'
},
pattern: {
mismatch: '${label}與模式不匹配${pattern}'
}
}
},
Image: {
preview: '預覽'
},
QRCode: {
expired: '二維碼過期',
refresh: '點擊刷新',
scanned: '已掃描'
}
};
/* harmony default export */ __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "./components/mentions/style/index.ts":
/*!********************************************!*\
!*** ./components/mentions/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.ts");
/* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/token.ts");
/* harmony import */ var _input_style_variants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../input/style/variants */ "./components/input/style/variants.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genMentionsStyle = token => {
const {
componentCls,
colorTextDisabled,
controlItemBgHover,
controlPaddingHorizontal,
colorText,
motionDurationSlow,
lineHeight,
controlHeight,
paddingInline,
paddingBlock,
fontSize,
fontSizeIcon,
colorTextTertiary,
colorTextQuaternary,
colorBgElevated,
paddingXXS,
paddingLG,
borderRadius,
borderRadiusLG,
boxShadowSecondary,
itemPaddingVertical,
calc
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genBasicInputStyle)(token)), {
position: 'relative',
display: 'inline-block',
height: 'auto',
padding: 0,
overflow: 'hidden',
lineHeight,
whiteSpace: 'pre-wrap',
verticalAlign: 'bottom'
}), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genOutlinedStyle)(token)), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genFilledStyle)(token)), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genBorderlessStyle)(token)), {
'&-affix-wrapper': Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genBasicInputStyle)(token)), {
display: 'inline-flex',
padding: 0,
'&::before': {
display: 'inline-block',
width: 0,
visibility: 'hidden',
content: '"\\a0"'
},
[`${componentCls}-suffix`]: {
position: 'absolute',
top: 0,
insetInlineEnd: paddingInline,
bottom: 0,
zIndex: 1,
display: 'inline-flex',
alignItems: 'center',
margin: 'auto'
},
[`&:has(${componentCls}-suffix) > ${componentCls} > textarea`]: {
paddingInlineEnd: paddingLG
},
[`${componentCls}-clear-icon`]: {
position: 'absolute',
insetInlineEnd: 0,
insetBlockStart: calc(fontSize).mul(lineHeight).mul(0.5).add(paddingBlock).equal(),
transform: `translateY(-50%)`,
margin: 0,
padding: 0,
color: colorTextQuaternary,
fontSize: fontSizeIcon,
verticalAlign: -1,
// https://github.com/ant-design/ant-design/pull/18151
// https://codesandbox.io/s/wizardly-sun-u10br
cursor: 'pointer',
transition: `color ${motionDurationSlow}`,
border: 'none',
outline: 'none',
backgroundColor: 'transparent',
'&:hover': {
color: colorTextTertiary
},
'&:active': {
color: colorText
},
'&-hidden': {
visibility: 'hidden'
}
}
})
}), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genUnderlinedStyle)(token)), {
'&-disabled': {
'> textarea': Object.assign({}, (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genDisabledStyle)(token))
},
// ================= Input Area =================
[`&, &-affix-wrapper > ${componentCls}`]: {
[`> textarea, ${componentCls}-measure`]: {
color: colorText,
boxSizing: 'border-box',
minHeight: token.calc(controlHeight).sub(2),
margin: 0,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3__.unit)(paddingBlock)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3__.unit)(paddingInline)}`,
overflow: 'inherit',
overflowX: 'hidden',
overflowY: 'auto',
fontWeight: 'inherit',
fontSize: 'inherit',
fontFamily: 'inherit',
fontStyle: 'inherit',
fontVariant: 'inherit',
fontSizeAdjust: 'inherit',
fontStretch: 'inherit',
lineHeight: 'inherit',
direction: 'inherit',
letterSpacing: 'inherit',
whiteSpace: 'inherit',
textAlign: 'inherit',
verticalAlign: 'top',
wordWrap: 'break-word',
wordBreak: 'inherit',
tabSize: 'inherit'
},
'> textarea': Object.assign({
width: '100%',
border: 'none',
outline: 'none',
resize: 'none',
backgroundColor: 'transparent'
}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genPlaceholderStyle)(token.colorTextPlaceholder)),
[`${componentCls}-measure`]: {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
zIndex: -1,
color: 'transparent',
pointerEvents: 'none',
'> span': {
display: 'inline-block',
minHeight: '1em'
}
}
},
// ================== Dropdown ==================
'&-dropdown': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'absolute',
top: -9999,
insetInlineStart: -9999,
zIndex: token.zIndexPopup,
boxSizing: 'border-box',
fontSize,
fontVariant: 'initial',
padding: paddingXXS,
backgroundColor: colorBgElevated,
borderRadius: borderRadiusLG,
outline: 'none',
boxShadow: boxShadowSecondary,
'&-hidden': {
display: 'none'
},
[`${componentCls}-dropdown-menu`]: {
maxHeight: token.dropdownHeight,
margin: 0,
paddingInlineStart: 0,
// Override default ul/ol
overflow: 'auto',
listStyle: 'none',
outline: 'none',
'&-item': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_0__.textEllipsis), {
position: 'relative',
display: 'block',
minWidth: token.controlItemWidth,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3__.unit)(itemPaddingVertical)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_3__.unit)(controlPaddingHorizontal)}`,
color: colorText,
borderRadius,
fontWeight: 'normal',
lineHeight,
cursor: 'pointer',
transition: `background ${motionDurationSlow} ease`,
'&:hover': {
backgroundColor: controlItemBgHover
},
'&-disabled': {
color: colorTextDisabled,
cursor: 'not-allowed',
'&:hover': {
color: colorTextDisabled,
backgroundColor: controlItemBgHover,
cursor: 'not-allowed'
}
},
'&-selected': {
color: colorText,
fontWeight: token.fontWeightStrong,
backgroundColor: controlItemBgHover
},
'&-active': {
backgroundColor: controlItemBgHover
}
})
}
})
})
};
};
const prepareComponentToken = token => Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_4__.initComponentToken)(token)), {
dropdownHeight: 250,
controlItemWidth: 100,
zIndexPopup: token.zIndexPopupBase + 50,
itemPaddingVertical: (token.controlHeight - token.fontHeight) / 2
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.genStyleHooks)('Mentions', token => {
const mentionsToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(token, (0,_input_style__WEBPACK_IMPORTED_MODULE_4__.initInputToken)(token));
return [genMentionsStyle(mentionsToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/menu/style/index.ts":
/*!****************************************************!*\
!*** ./components/menu/style/index.ts + 4 modules ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ menu_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/motion/collapse.ts
var collapse = __webpack_require__("./components/style/motion/collapse.ts");
// EXTERNAL MODULE: ./components/style/motion/slide.ts
var slide = __webpack_require__("./components/style/motion/slide.ts");
// EXTERNAL MODULE: ./components/style/motion/zoom.ts
var zoom = __webpack_require__("./components/style/motion/zoom.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var cssinjs_utils_es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/menu/style/horizontal.ts
const getHorizontalStyle = token => {
const {
componentCls,
motionDurationSlow,
horizontalLineHeight,
colorSplit,
lineWidth,
lineType,
itemPaddingInline
} = token;
return {
[`${componentCls}-horizontal`]: {
lineHeight: horizontalLineHeight,
border: 0,
borderBottom: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
boxShadow: 'none',
'&::after': {
display: 'block',
clear: 'both',
height: 0,
content: '"\\20"'
},
// ======================= Item =======================
[`${componentCls}-item, ${componentCls}-submenu`]: {
position: 'relative',
display: 'inline-block',
verticalAlign: 'bottom',
paddingInline: itemPaddingInline
},
[`> ${componentCls}-item:hover,
> ${componentCls}-item-active,
> ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
backgroundColor: 'transparent'
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(',')
},
// ===================== Sub Menu =====================
[`${componentCls}-submenu-arrow`]: {
display: 'none'
}
}
};
};
/* harmony default export */ var horizontal = (getHorizontalStyle);
;// ./components/menu/style/rtl.ts
const getRTLStyle = _ref => {
let {
componentCls,
menuArrowOffset,
calc
} = _ref;
return {
[`${componentCls}-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-submenu-rtl`]: {
transformOrigin: '100% 0'
},
// Vertical Arrow
[`${componentCls}-rtl${componentCls}-vertical,
${componentCls}-submenu-rtl ${componentCls}-vertical`]: {
[`${componentCls}-submenu-arrow`]: {
'&::before': {
transform: `rotate(-45deg) translateY(${(0,cssinjs.unit)(calc(menuArrowOffset).mul(-1).equal())})`
},
'&::after': {
transform: `rotate(45deg) translateY(${(0,cssinjs.unit)(menuArrowOffset)})`
}
}
}
};
};
/* harmony default export */ var rtl = (getRTLStyle);
;// ./components/menu/style/theme.ts
const accessibilityFocus = token => Object.assign({}, (0,style.genFocusOutline)(token));
const getThemeStyle = (token, themeSuffix) => {
const {
componentCls,
itemColor,
itemSelectedColor,
subMenuItemSelectedColor,
groupTitleColor,
itemBg,
subMenuItemBg,
itemSelectedBg,
activeBarHeight,
activeBarWidth,
activeBarBorderWidth,
motionDurationSlow,
motionEaseInOut,
motionEaseOut,
itemPaddingInline,
motionDurationMid,
itemHoverColor,
lineType,
colorSplit,
// Disabled
itemDisabledColor,
// Danger
dangerItemColor,
dangerItemHoverColor,
dangerItemSelectedColor,
dangerItemActiveBg,
dangerItemSelectedBg,
// Bg
popupBg,
itemHoverBg,
itemActiveBg,
menuSubMenuBg,
// Horizontal
horizontalItemSelectedColor,
horizontalItemSelectedBg,
horizontalItemBorderRadius,
horizontalItemHoverBg
} = token;
return {
[`${componentCls}-${themeSuffix}, ${componentCls}-${themeSuffix} > ${componentCls}`]: {
color: itemColor,
background: itemBg,
[`&${componentCls}-root:focus-visible`]: Object.assign({}, accessibilityFocus(token)),
// ======================== Item ========================
[`${componentCls}-item`]: {
'&-group-title, &-extra': {
color: groupTitleColor
}
},
[`${componentCls}-submenu-selected > ${componentCls}-submenu-title`]: {
color: subMenuItemSelectedColor
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
color: itemColor,
[`&:not(${componentCls}-item-disabled):focus-visible`]: Object.assign({}, accessibilityFocus(token))
},
// Disabled
[`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
color: `${itemDisabledColor} !important`
},
// Hover
[`${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
[`&:hover, > ${componentCls}-submenu-title:hover`]: {
color: itemHoverColor
}
},
[`&:not(${componentCls}-horizontal)`]: {
[`${componentCls}-item:not(${componentCls}-item-selected)`]: {
'&:hover': {
backgroundColor: itemHoverBg
},
'&:active': {
backgroundColor: itemActiveBg
}
},
[`${componentCls}-submenu-title`]: {
'&:hover': {
backgroundColor: itemHoverBg
},
'&:active': {
backgroundColor: itemActiveBg
}
}
},
// Danger - only Item has
[`${componentCls}-item-danger`]: {
color: dangerItemColor,
[`&${componentCls}-item:hover`]: {
[`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
color: dangerItemHoverColor
}
},
[`&${componentCls}-item:active`]: {
background: dangerItemActiveBg
}
},
[`${componentCls}-item a`]: {
'&, &:hover': {
color: 'inherit'
}
},
[`${componentCls}-item-selected`]: {
color: itemSelectedColor,
// Danger
[`&${componentCls}-item-danger`]: {
color: dangerItemSelectedColor
},
'a, a:hover': {
color: 'inherit'
}
},
[`& ${componentCls}-item-selected`]: {
backgroundColor: itemSelectedBg,
// Danger
[`&${componentCls}-item-danger`]: {
backgroundColor: dangerItemSelectedBg
}
},
[`&${componentCls}-submenu > ${componentCls}`]: {
backgroundColor: menuSubMenuBg
},
// ===== 设置浮层的颜色 =======
// !dark 模式会被popupBg 会被rest 为 darkPopupBg
[`&${componentCls}-popup > ${componentCls}`]: {
backgroundColor: popupBg
},
[`&${componentCls}-submenu-popup > ${componentCls}`]: {
backgroundColor: popupBg
},
// ===== 设置浮层的颜色 end =======
// ====================== Horizontal ======================
[`&${componentCls}-horizontal`]: Object.assign(Object.assign({}, themeSuffix === 'dark' ? {
borderBottom: 0
} : {}), {
[`> ${componentCls}-item, > ${componentCls}-submenu`]: {
top: activeBarBorderWidth,
marginTop: token.calc(activeBarBorderWidth).mul(-1).equal(),
marginBottom: 0,
borderRadius: horizontalItemBorderRadius,
'&::after': {
position: 'absolute',
insetInline: itemPaddingInline,
bottom: 0,
borderBottom: `${(0,cssinjs.unit)(activeBarHeight)} solid transparent`,
transition: `border-color ${motionDurationSlow} ${motionEaseInOut}`,
content: '""'
},
'&:hover, &-active, &-open': {
background: horizontalItemHoverBg,
'&::after': {
borderBottomWidth: activeBarHeight,
borderBottomColor: horizontalItemSelectedColor
}
},
'&-selected': {
color: horizontalItemSelectedColor,
backgroundColor: horizontalItemSelectedBg,
'&:hover': {
backgroundColor: horizontalItemSelectedBg
},
'&::after': {
borderBottomWidth: activeBarHeight,
borderBottomColor: horizontalItemSelectedColor
}
}
}
}),
// ================== Inline & Vertical ===================
//
[`&${componentCls}-root`]: {
[`&${componentCls}-inline, &${componentCls}-vertical`]: {
borderInlineEnd: `${(0,cssinjs.unit)(activeBarBorderWidth)} ${lineType} ${colorSplit}`
}
},
// ======================== Inline ========================
[`&${componentCls}-inline`]: {
// Sub
[`${componentCls}-sub${componentCls}-inline`]: {
background: subMenuItemBg
},
[`${componentCls}-item`]: {
position: 'relative',
'&::after': {
position: 'absolute',
insetBlock: 0,
insetInlineEnd: 0,
borderInlineEnd: `${(0,cssinjs.unit)(activeBarWidth)} solid ${itemSelectedColor}`,
transform: 'scaleY(0.0001)',
opacity: 0,
transition: [`transform ${motionDurationMid} ${motionEaseOut}`, `opacity ${motionDurationMid} ${motionEaseOut}`].join(','),
content: '""'
},
// Danger
[`&${componentCls}-item-danger`]: {
'&::after': {
borderInlineEndColor: dangerItemSelectedColor
}
}
},
[`${componentCls}-selected, ${componentCls}-item-selected`]: {
'&::after': {
transform: 'scaleY(1)',
opacity: 1,
transition: [`transform ${motionDurationMid} ${motionEaseInOut}`, `opacity ${motionDurationMid} ${motionEaseInOut}`].join(',')
}
}
}
}
};
};
/* harmony default export */ var theme = (getThemeStyle);
;// ./components/menu/style/vertical.ts
const getVerticalInlineStyle = token => {
const {
componentCls,
itemHeight,
itemMarginInline,
padding,
menuArrowSize,
marginXS,
itemMarginBlock,
itemWidth,
itemPaddingInline
} = token;
const paddingWithArrow = token.calc(menuArrowSize).add(padding).add(marginXS).equal();
return {
[`${componentCls}-item`]: {
position: 'relative',
overflow: 'hidden'
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
height: itemHeight,
lineHeight: (0,cssinjs.unit)(itemHeight),
paddingInline: itemPaddingInline,
overflow: 'hidden',
textOverflow: 'ellipsis',
marginInline: itemMarginInline,
marginBlock: itemMarginBlock,
width: itemWidth
},
[`> ${componentCls}-item,
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
height: itemHeight,
lineHeight: (0,cssinjs.unit)(itemHeight)
},
[`${componentCls}-item-group-list ${componentCls}-submenu-title,
${componentCls}-submenu-title`]: {
paddingInlineEnd: paddingWithArrow
}
};
};
const getVerticalStyle = token => {
const {
componentCls,
iconCls,
itemHeight,
colorTextLightSolid,
dropdownWidth,
controlHeightLG,
motionEaseOut,
paddingXL,
itemMarginInline,
fontSizeLG,
motionDurationFast,
motionDurationSlow,
paddingXS,
boxShadowSecondary,
collapsedWidth,
collapsedIconSize
} = token;
const inlineItemStyle = {
height: itemHeight,
lineHeight: (0,cssinjs.unit)(itemHeight),
listStylePosition: 'inside',
listStyleType: 'disc'
};
return [{
[componentCls]: {
'&-inline, &-vertical': Object.assign({
[`&${componentCls}-root`]: {
boxShadow: 'none'
}
}, getVerticalInlineStyle(token))
},
[`${componentCls}-submenu-popup`]: {
[`${componentCls}-vertical`]: Object.assign(Object.assign({}, getVerticalInlineStyle(token)), {
boxShadow: boxShadowSecondary
})
}
},
// Vertical only
{
[`${componentCls}-submenu-popup ${componentCls}-vertical${componentCls}-sub`]: {
minWidth: dropdownWidth,
maxHeight: `calc(100vh - ${(0,cssinjs.unit)(token.calc(controlHeightLG).mul(2.5).equal())})`,
padding: '0',
overflow: 'hidden',
borderInlineEnd: 0,
// https://github.com/ant-design/ant-design/issues/22244
// https://github.com/ant-design/ant-design/issues/26812
"&:not([class*='-active'])": {
overflowX: 'hidden',
overflowY: 'auto'
}
}
},
// Inline Only
{
[`${componentCls}-inline`]: {
width: '100%',
// Motion enhance for first level
[`&${componentCls}-root`]: {
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
display: 'flex',
alignItems: 'center',
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationFast} ${motionEaseOut}`].join(','),
[`> ${componentCls}-title-content`]: {
flex: 'auto',
minWidth: 0,
overflow: 'hidden',
textOverflow: 'ellipsis'
},
'> *': {
flex: 'none'
}
}
},
// >>>>> Sub
[`${componentCls}-sub${componentCls}-inline`]: {
padding: 0,
border: 0,
borderRadius: 0,
boxShadow: 'none',
[`& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: inlineItemStyle,
[`& ${componentCls}-item-group-title`]: {
paddingInlineStart: paddingXL
}
},
// >>>>> Item
[`${componentCls}-item`]: inlineItemStyle
}
},
// Inline Collapse Only
{
[`${componentCls}-inline-collapsed`]: {
width: collapsedWidth,
[`&${componentCls}-root`]: {
[`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
[`> ${componentCls}-inline-collapsed-noicon`]: {
fontSize: fontSizeLG,
textAlign: 'center'
}
}
},
[`> ${componentCls}-item,
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
insetInlineStart: 0,
paddingInline: `calc(50% - ${(0,cssinjs.unit)(token.calc(collapsedIconSize).div(2).equal())} - ${(0,cssinjs.unit)(itemMarginInline)})`,
textOverflow: 'clip',
[`
${componentCls}-submenu-arrow,
${componentCls}-submenu-expand-icon
`]: {
opacity: 0
},
[`${componentCls}-item-icon, ${iconCls}`]: {
margin: 0,
fontSize: collapsedIconSize,
lineHeight: (0,cssinjs.unit)(itemHeight),
'+ span': {
display: 'inline-block',
opacity: 0
}
}
},
[`${componentCls}-item-icon, ${iconCls}`]: {
display: 'inline-block'
},
'&-tooltip': {
pointerEvents: 'none',
[`${componentCls}-item-icon, ${iconCls}`]: {
display: 'none'
},
'a, a:hover': {
color: colorTextLightSolid
}
},
[`${componentCls}-item-group-title`]: Object.assign(Object.assign({}, style.textEllipsis), {
paddingInline: paddingXS
})
}
}];
};
/* harmony default export */ var vertical = (getVerticalStyle);
;// ./components/menu/style/index.ts
const genMenuItemStyle = token => {
const {
componentCls,
motionDurationSlow,
motionDurationMid,
motionEaseInOut,
motionEaseOut,
iconCls,
iconSize,
iconMarginInlineEnd
} = token;
return {
// >>>>> Item
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
position: 'relative',
display: 'block',
margin: 0,
whiteSpace: 'nowrap',
cursor: 'pointer',
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding calc(${motionDurationSlow} + 0.1s) ${motionEaseInOut}`].join(','),
[`${componentCls}-item-icon, ${iconCls}`]: {
minWidth: iconSize,
fontSize: iconSize,
transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(','),
'+ span': {
marginInlineStart: iconMarginInlineEnd,
opacity: 1,
transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(',')
}
},
[`${componentCls}-item-icon`]: Object.assign({}, (0,style.resetIcon)()),
[`&${componentCls}-item-only-child`]: {
[`> ${iconCls}, > ${componentCls}-item-icon`]: {
marginInlineEnd: 0
}
}
},
// Disabled state sets text to gray and nukes hover/tab effects
[`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
background: 'none !important',
cursor: 'not-allowed',
'&::after': {
borderColor: 'transparent !important'
},
a: {
color: 'inherit !important',
cursor: 'not-allowed',
pointerEvents: 'none'
},
[`> ${componentCls}-submenu-title`]: {
color: 'inherit !important',
cursor: 'not-allowed'
}
}
};
};
const genSubMenuArrowStyle = token => {
const {
componentCls,
motionDurationSlow,
motionEaseInOut,
borderRadius,
menuArrowSize,
menuArrowOffset
} = token;
return {
[`${componentCls}-submenu`]: {
'&-expand-icon, &-arrow': {
position: 'absolute',
top: '50%',
insetInlineEnd: token.margin,
width: menuArrowSize,
color: 'currentcolor',
transform: 'translateY(-50%)',
transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`
},
'&-arrow': {
// →
'&::before, &::after': {
position: 'absolute',
width: token.calc(menuArrowSize).mul(0.6).equal(),
height: token.calc(menuArrowSize).mul(0.15).equal(),
backgroundColor: 'currentcolor',
borderRadius,
transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(','),
content: '""'
},
'&::before': {
transform: `rotate(45deg) translateY(${(0,cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
},
'&::after': {
transform: `rotate(-45deg) translateY(${(0,cssinjs.unit)(menuArrowOffset)})`
}
}
}
};
};
// =============================== Base ===============================
const getBaseStyle = token => {
const {
antCls,
componentCls,
fontSize,
motionDurationSlow,
motionDurationMid,
motionEaseInOut,
paddingXS,
padding,
colorSplit,
lineWidth,
zIndexPopup,
borderRadiusLG,
subMenuItemBorderRadius,
menuArrowSize,
menuArrowOffset,
lineType,
groupTitleLineHeight,
groupTitleFontSize
} = token;
return [
// Misc
{
'': {
[componentCls]: Object.assign(Object.assign({}, (0,style.clearFix)()), {
// Hidden
'&-hidden': {
display: 'none'
}
})
},
[`${componentCls}-submenu-hidden`]: {
display: 'none'
}
}, {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), (0,style.clearFix)()), {
marginBottom: 0,
paddingInlineStart: 0,
// Override default ul/ol
fontSize,
lineHeight: 0,
listStyle: 'none',
outline: 'none',
// Magic cubic here but smooth transition
transition: `width ${motionDurationSlow} cubic-bezier(0.2, 0, 0, 1) 0s`,
'ul, ol': {
margin: 0,
padding: 0,
listStyle: 'none'
},
// Overflow ellipsis
'&-overflow': {
display: 'flex',
[`${componentCls}-item`]: {
flex: 'none'
}
},
[`${componentCls}-item, ${componentCls}-submenu, ${componentCls}-submenu-title`]: {
borderRadius: token.itemBorderRadius
},
[`${componentCls}-item-group-title`]: {
padding: `${(0,cssinjs.unit)(paddingXS)} ${(0,cssinjs.unit)(padding)}`,
fontSize: groupTitleFontSize,
lineHeight: groupTitleLineHeight,
transition: `all ${motionDurationSlow}`
},
[`&-horizontal ${componentCls}-submenu`]: {
transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`].join(',')
},
[`${componentCls}-submenu, ${componentCls}-submenu-inline`]: {
transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationMid} ${motionEaseInOut}`].join(',')
},
[`${componentCls}-submenu ${componentCls}-sub`]: {
cursor: 'initial',
transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(',')
},
[`${componentCls}-title-content`]: {
transition: `color ${motionDurationSlow}`,
'&-with-extra': {
display: 'inline-flex',
alignItems: 'center',
width: '100%'
},
// https://github.com/ant-design/ant-design/issues/41143
[`> ${antCls}-typography-ellipsis-single-line`]: {
display: 'inline',
verticalAlign: 'unset'
},
[`${componentCls}-item-extra`]: {
marginInlineStart: 'auto',
paddingInlineStart: token.padding
}
},
[`${componentCls}-item a`]: {
'&::before': {
position: 'absolute',
inset: 0,
backgroundColor: 'transparent',
content: '""'
}
},
// Removed a Badge related style seems it's safe
// https://github.com/ant-design/ant-design/issues/19809
// >>>>> Divider
[`${componentCls}-item-divider`]: {
overflow: 'hidden',
lineHeight: 0,
borderColor: colorSplit,
borderStyle: lineType,
borderWidth: 0,
borderTopWidth: lineWidth,
marginBlock: lineWidth,
padding: 0,
'&-dashed': {
borderStyle: 'dashed'
}
}
}), genMenuItemStyle(token)), {
[`${componentCls}-item-group`]: {
[`${componentCls}-item-group-list`]: {
margin: 0,
padding: 0,
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
paddingInline: `${(0,cssinjs.unit)(token.calc(fontSize).mul(2).equal())} ${(0,cssinjs.unit)(padding)}`
}
}
},
// ======================= Sub Menu =======================
'&-submenu': {
'&-popup': {
position: 'absolute',
zIndex: zIndexPopup,
borderRadius: borderRadiusLG,
boxShadow: 'none',
transformOrigin: '0 0',
[`&${componentCls}-submenu`]: {
background: 'transparent'
},
// https://github.com/ant-design/ant-design/issues/13955
'&::before': {
position: 'absolute',
inset: 0,
zIndex: -1,
width: '100%',
height: '100%',
opacity: 0,
content: '""'
},
[`> ${componentCls}`]: Object.assign(Object.assign(Object.assign({
borderRadius: borderRadiusLG
}, genMenuItemStyle(token)), genSubMenuArrowStyle(token)), {
[`${componentCls}-item, ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
borderRadius: subMenuItemBorderRadius
},
[`${componentCls}-submenu-title::after`]: {
transition: `transform ${motionDurationSlow} ${motionEaseInOut}`
}
})
},
[`
&-placement-leftTop,
&-placement-bottomRight,
`]: {
transformOrigin: '100% 0'
},
[`
&-placement-leftBottom,
&-placement-topRight,
`]: {
transformOrigin: '100% 100%'
},
[`
&-placement-rightBottom,
&-placement-topLeft,
`]: {
transformOrigin: '0 100%'
},
[`
&-placement-bottomLeft,
&-placement-rightTop,
`]: {
transformOrigin: '0 0'
},
[`
&-placement-leftTop,
&-placement-leftBottom
`]: {
paddingInlineEnd: token.paddingXS
},
[`
&-placement-rightTop,
&-placement-rightBottom
`]: {
paddingInlineStart: token.paddingXS
},
[`
&-placement-topRight,
&-placement-topLeft
`]: {
paddingBottom: token.paddingXS
},
[`
&-placement-bottomRight,
&-placement-bottomLeft
`]: {
paddingTop: token.paddingXS
}
}
}), genSubMenuArrowStyle(token)), {
[`&-inline-collapsed ${componentCls}-submenu-arrow,
&-inline ${componentCls}-submenu-arrow`]: {
// ↓
'&::before': {
transform: `rotate(-45deg) translateX(${(0,cssinjs.unit)(menuArrowOffset)})`
},
'&::after': {
transform: `rotate(45deg) translateX(${(0,cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
}
},
[`${componentCls}-submenu-open${componentCls}-submenu-inline > ${componentCls}-submenu-title > ${componentCls}-submenu-arrow`]: {
// ↑
transform: `translateY(${(0,cssinjs.unit)(token.calc(menuArrowSize).mul(0.2).mul(-1).equal())})`,
'&::after': {
transform: `rotate(-45deg) translateX(${(0,cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
},
'&::before': {
transform: `rotate(45deg) translateX(${(0,cssinjs.unit)(menuArrowOffset)})`
}
}
})
},
// Integration with header element so menu items have the same height
{
[`${antCls}-layout-header`]: {
[componentCls]: {
lineHeight: 'inherit'
}
}
}];
};
const prepareComponentToken = token => {
var _a, _b, _c;
const {
colorPrimary,
colorError,
colorTextDisabled,
colorErrorBg,
colorText,
colorTextDescription,
colorBgContainer,
colorFillAlter,
colorFillContent,
lineWidth,
lineWidthBold,
controlItemBgActive,
colorBgTextHover,
controlHeightLG,
lineHeight,
colorBgElevated,
marginXXS,
padding,
fontSize,
controlHeightSM,
fontSizeLG,
colorTextLightSolid,
colorErrorHover
} = token;
const activeBarWidth = (_a = token.activeBarWidth) !== null && _a !== void 0 ? _a : 0;
const activeBarBorderWidth = (_b = token.activeBarBorderWidth) !== null && _b !== void 0 ? _b : lineWidth;
const itemMarginInline = (_c = token.itemMarginInline) !== null && _c !== void 0 ? _c : token.marginXXS;
const colorTextDark = new es.FastColor(colorTextLightSolid).setA(0.65).toRgbString();
return {
dropdownWidth: 160,
zIndexPopup: token.zIndexPopupBase + 50,
radiusItem: token.borderRadiusLG,
itemBorderRadius: token.borderRadiusLG,
radiusSubMenuItem: token.borderRadiusSM,
subMenuItemBorderRadius: token.borderRadiusSM,
colorItemText: colorText,
itemColor: colorText,
colorItemTextHover: colorText,
itemHoverColor: colorText,
colorItemTextHoverHorizontal: colorPrimary,
horizontalItemHoverColor: colorPrimary,
colorGroupTitle: colorTextDescription,
groupTitleColor: colorTextDescription,
colorItemTextSelected: colorPrimary,
itemSelectedColor: colorPrimary,
subMenuItemSelectedColor: colorPrimary,
colorItemTextSelectedHorizontal: colorPrimary,
horizontalItemSelectedColor: colorPrimary,
colorItemBg: colorBgContainer,
itemBg: colorBgContainer,
colorItemBgHover: colorBgTextHover,
itemHoverBg: colorBgTextHover,
colorItemBgActive: colorFillContent,
itemActiveBg: controlItemBgActive,
colorSubItemBg: colorFillAlter,
subMenuItemBg: colorFillAlter,
colorItemBgSelected: controlItemBgActive,
itemSelectedBg: controlItemBgActive,
colorItemBgSelectedHorizontal: 'transparent',
horizontalItemSelectedBg: 'transparent',
colorActiveBarWidth: 0,
activeBarWidth,
colorActiveBarHeight: lineWidthBold,
activeBarHeight: lineWidthBold,
colorActiveBarBorderSize: lineWidth,
activeBarBorderWidth,
// Disabled
colorItemTextDisabled: colorTextDisabled,
itemDisabledColor: colorTextDisabled,
// Danger
colorDangerItemText: colorError,
dangerItemColor: colorError,
colorDangerItemTextHover: colorError,
dangerItemHoverColor: colorError,
colorDangerItemTextSelected: colorError,
dangerItemSelectedColor: colorError,
colorDangerItemBgActive: colorErrorBg,
dangerItemActiveBg: colorErrorBg,
colorDangerItemBgSelected: colorErrorBg,
dangerItemSelectedBg: colorErrorBg,
itemMarginInline,
horizontalItemBorderRadius: 0,
horizontalItemHoverBg: 'transparent',
itemHeight: controlHeightLG,
groupTitleLineHeight: lineHeight,
collapsedWidth: controlHeightLG * 2,
popupBg: colorBgElevated,
itemMarginBlock: marginXXS,
itemPaddingInline: padding,
horizontalLineHeight: `${controlHeightLG * 1.15}px`,
iconSize: fontSize,
iconMarginInlineEnd: controlHeightSM - fontSize,
collapsedIconSize: fontSizeLG,
groupTitleFontSize: fontSize,
// Disabled
darkItemDisabledColor: new es.FastColor(colorTextLightSolid).setA(0.25).toRgbString(),
// Dark
darkItemColor: colorTextDark,
darkDangerItemColor: colorError,
darkItemBg: '#001529',
darkPopupBg: '#001529',
darkSubMenuItemBg: '#000c17',
darkItemSelectedColor: colorTextLightSolid,
darkItemSelectedBg: colorPrimary,
darkDangerItemSelectedBg: colorError,
darkItemHoverBg: 'transparent',
darkGroupTitleColor: colorTextDark,
darkItemHoverColor: colorTextLightSolid,
darkDangerItemHoverColor: colorErrorHover,
darkDangerItemSelectedColor: colorTextLightSolid,
darkDangerItemActiveBg: colorError,
// internal
itemWidth: activeBarWidth ? `calc(100% + ${activeBarBorderWidth}px)` : `calc(100% - ${itemMarginInline * 2}px)`
};
};
// ============================== Export ==============================
/* harmony default export */ var menu_style = (function (prefixCls) {
let rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
let injectStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
const useStyle = (0,genStyleUtils.genStyleHooks)('Menu', token => {
const {
colorBgElevated,
controlHeightLG,
fontSize,
darkItemColor,
darkDangerItemColor,
darkItemBg,
darkSubMenuItemBg,
darkItemSelectedColor,
darkItemSelectedBg,
darkDangerItemSelectedBg,
darkItemHoverBg,
darkGroupTitleColor,
darkItemHoverColor,
darkItemDisabledColor,
darkDangerItemHoverColor,
darkDangerItemSelectedColor,
darkDangerItemActiveBg,
popupBg,
darkPopupBg
} = token;
const menuArrowSize = token.calc(fontSize).div(7).mul(5).equal();
// Menu Token
const menuToken = (0,cssinjs_utils_es.mergeToken)(token, {
menuArrowSize,
menuHorizontalHeight: token.calc(controlHeightLG).mul(1.15).equal(),
menuArrowOffset: token.calc(menuArrowSize).mul(0.25).equal(),
menuSubMenuBg: colorBgElevated,
calc: token.calc,
popupBg
});
const menuDarkToken = (0,cssinjs_utils_es.mergeToken)(menuToken, {
itemColor: darkItemColor,
itemHoverColor: darkItemHoverColor,
groupTitleColor: darkGroupTitleColor,
itemSelectedColor: darkItemSelectedColor,
subMenuItemSelectedColor: darkItemSelectedColor,
itemBg: darkItemBg,
popupBg: darkPopupBg,
subMenuItemBg: darkSubMenuItemBg,
itemActiveBg: 'transparent',
itemSelectedBg: darkItemSelectedBg,
activeBarHeight: 0,
activeBarBorderWidth: 0,
itemHoverBg: darkItemHoverBg,
// Disabled
itemDisabledColor: darkItemDisabledColor,
// Danger
dangerItemColor: darkDangerItemColor,
dangerItemHoverColor: darkDangerItemHoverColor,
dangerItemSelectedColor: darkDangerItemSelectedColor,
dangerItemActiveBg: darkDangerItemActiveBg,
dangerItemSelectedBg: darkDangerItemSelectedBg,
menuSubMenuBg: darkSubMenuItemBg,
// Horizontal
horizontalItemSelectedColor: darkItemSelectedColor,
horizontalItemSelectedBg: darkItemSelectedBg
});
return [
// Basic
getBaseStyle(menuToken),
// Horizontal
horizontal(menuToken),
// Hard code for some light style
// Vertical
vertical(menuToken),
// Hard code for some light style
// Theme
theme(menuToken, 'light'), theme(menuDarkToken, 'dark'),
// RTL
rtl(menuToken),
// Motion
(0,collapse["default"])(menuToken), (0,slide.initSlideMotion)(menuToken, 'slide-up'), (0,slide.initSlideMotion)(menuToken, 'slide-down'), (0,zoom.initZoomMotion)(menuToken, 'zoom-big')];
}, prepareComponentToken, {
deprecatedTokens: [['colorGroupTitle', 'groupTitleColor'], ['radiusItem', 'itemBorderRadius'], ['radiusSubMenuItem', 'subMenuItemBorderRadius'], ['colorItemText', 'itemColor'], ['colorItemTextHover', 'itemHoverColor'], ['colorItemTextHoverHorizontal', 'horizontalItemHoverColor'], ['colorItemTextSelected', 'itemSelectedColor'], ['colorItemTextSelectedHorizontal', 'horizontalItemSelectedColor'], ['colorItemTextDisabled', 'itemDisabledColor'], ['colorDangerItemText', 'dangerItemColor'], ['colorDangerItemTextHover', 'dangerItemHoverColor'], ['colorDangerItemTextSelected', 'dangerItemSelectedColor'], ['colorDangerItemBgActive', 'dangerItemActiveBg'], ['colorDangerItemBgSelected', 'dangerItemSelectedBg'], ['colorItemBg', 'itemBg'], ['colorItemBgHover', 'itemHoverBg'], ['colorSubItemBg', 'subMenuItemBg'], ['colorItemBgActive', 'itemActiveBg'], ['colorItemBgSelectedHorizontal', 'horizontalItemSelectedBg'], ['colorActiveBarWidth', 'activeBarWidth'], ['colorActiveBarHeight', 'activeBarHeight'], ['colorActiveBarBorderSize', 'activeBarBorderWidth'], ['colorItemBgSelected', 'itemSelectedBg']],
// Dropdown will handle menu style self. We do not need to handle this.
injectStyle,
unitless: {
groupTitleLineHeight: true
}
});
return useStyle(prefixCls, rootCls);
});
/***/ }),
/***/ "./components/message/style/index.ts":
/*!*******************************************!*\
!*** ./components/message/style/index.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _util_hooks_useZIndex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_util/hooks/useZIndex */ "./components/_util/hooks/useZIndex.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genMessageStyle = token => {
const {
componentCls,
iconCls,
boxShadow,
colorText,
colorSuccess,
colorError,
colorWarning,
colorInfo,
fontSizeLG,
motionEaseInOutCirc,
motionDurationSlow,
marginXS,
paddingXS,
borderRadiusLG,
zIndexPopup,
// Custom token
contentPadding,
contentBg
} = token;
const noticeCls = `${componentCls}-notice`;
const messageMoveIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('MessageMoveIn', {
'0%': {
padding: 0,
transform: 'translateY(-100%)',
opacity: 0
},
'100%': {
padding: paddingXS,
transform: 'translateY(0)',
opacity: 1
}
});
const messageMoveOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('MessageMoveOut', {
'0%': {
maxHeight: token.height,
padding: paddingXS,
opacity: 1
},
'100%': {
maxHeight: 0,
padding: 0,
opacity: 0
}
});
const noticeStyle = {
padding: paddingXS,
textAlign: 'center',
[`${componentCls}-custom-content`]: {
display: 'flex',
alignItems: 'center'
},
[`${componentCls}-custom-content > ${iconCls}`]: {
marginInlineEnd: marginXS,
// affected by ltr or rtl
fontSize: fontSizeLG
},
[`${noticeCls}-content`]: {
display: 'inline-block',
padding: contentPadding,
background: contentBg,
borderRadius: borderRadiusLG,
boxShadow,
pointerEvents: 'all'
},
[`${componentCls}-success > ${iconCls}`]: {
color: colorSuccess
},
[`${componentCls}-error > ${iconCls}`]: {
color: colorError
},
[`${componentCls}-warning > ${iconCls}`]: {
color: colorWarning
},
[`${componentCls}-info > ${iconCls},
${componentCls}-loading > ${iconCls}`]: {
color: colorInfo
}
};
return [
// ============================ Holder ============================
{
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
color: colorText,
position: 'fixed',
top: marginXS,
width: '100%',
pointerEvents: 'none',
zIndex: zIndexPopup,
[`${componentCls}-move-up`]: {
animationFillMode: 'forwards'
},
[`
${componentCls}-move-up-appear,
${componentCls}-move-up-enter
`]: {
animationName: messageMoveIn,
animationDuration: motionDurationSlow,
animationPlayState: 'paused',
animationTimingFunction: motionEaseInOutCirc
},
[`
${componentCls}-move-up-appear${componentCls}-move-up-appear-active,
${componentCls}-move-up-enter${componentCls}-move-up-enter-active
`]: {
animationPlayState: 'running'
},
[`${componentCls}-move-up-leave`]: {
animationName: messageMoveOut,
animationDuration: motionDurationSlow,
animationPlayState: 'paused',
animationTimingFunction: motionEaseInOutCirc
},
[`${componentCls}-move-up-leave${componentCls}-move-up-leave-active`]: {
animationPlayState: 'running'
},
'&-rtl': {
direction: 'rtl',
span: {
direction: 'rtl'
}
}
})
},
// ============================ Notice ============================
{
[componentCls]: {
[`${noticeCls}-wrapper`]: Object.assign({}, noticeStyle)
}
},
// ============================= Pure =============================
{
[`${componentCls}-notice-pure-panel`]: Object.assign(Object.assign({}, noticeStyle), {
padding: 0,
textAlign: 'start'
})
}];
};
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexPopupBase + _util_hooks_useZIndex__WEBPACK_IMPORTED_MODULE_2__.CONTAINER_MAX_OFFSET + 10,
contentBg: token.colorBgElevated,
contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`
});
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Message', token => {
// Gen-style functions here
const combinedToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.mergeToken)(token, {
height: 150
});
return [genMessageStyle(combinedToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/modal/style/index.ts":
/*!*****************************************!*\
!*** ./components/modal/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genModalMaskStyle: function() { return /* binding */ genModalMaskStyle; },
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
/* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../grid/style */ "./components/grid/style/index.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/fade.ts");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
function box(position) {
return {
position,
inset: 0
};
}
const genModalMaskStyle = token => {
const {
componentCls,
antCls
} = token;
return [{
[`${componentCls}-root`]: {
[`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {
// reset scale avoid mousePosition bug
transform: 'none',
opacity: 0,
animationDuration: token.motionDurationSlow,
// https://github.com/ant-design/ant-design/issues/11777
userSelect: 'none'
},
// https://github.com/ant-design/ant-design/issues/37329
// https://github.com/ant-design/ant-design/issues/40272
[`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {
pointerEvents: 'none'
},
[`${componentCls}-mask`]: Object.assign(Object.assign({}, box('fixed')), {
zIndex: token.zIndexPopupBase,
height: '100%',
backgroundColor: token.colorBgMask,
pointerEvents: 'none',
[`${componentCls}-hidden`]: {
display: 'none'
}
}),
[`${componentCls}-wrap`]: Object.assign(Object.assign({}, box('fixed')), {
zIndex: token.zIndexPopupBase,
overflow: 'auto',
outline: 0,
WebkitOverflowScrolling: 'touch'
})
}
}, {
[`${componentCls}-root`]: (0,_style_motion__WEBPACK_IMPORTED_MODULE_1__.initFadeMotion)(token)
}];
};
const genModalStyle = token => {
const {
componentCls
} = token;
return [
// ======================== Root =========================
{
[`${componentCls}-root`]: {
[`${componentCls}-wrap-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-centered`]: {
textAlign: 'center',
'&::before': {
display: 'inline-block',
width: 0,
height: '100%',
verticalAlign: 'middle',
content: '""'
},
[componentCls]: {
top: 0,
display: 'inline-block',
paddingBottom: 0,
textAlign: 'start',
verticalAlign: 'middle'
}
},
[`@media (max-width: ${token.screenSMMax}px)`]: {
[componentCls]: {
maxWidth: 'calc(100vw - 16px)',
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.marginXS)} auto`
},
[`${componentCls}-centered`]: {
[componentCls]: {
flex: 1
}
}
}
}
},
// ======================== Modal ========================
{
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.resetComponent)(token)), {
pointerEvents: 'none',
position: 'relative',
top: 100,
width: 'auto',
maxWidth: `calc(100vw - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.calc(token.margin).mul(2).equal())})`,
margin: '0 auto',
paddingBottom: token.paddingLG,
[`${componentCls}-title`]: {
margin: 0,
color: token.titleColor,
fontWeight: token.fontWeightStrong,
fontSize: token.titleFontSize,
lineHeight: token.titleLineHeight,
wordWrap: 'break-word'
},
[`${componentCls}-content`]: {
position: 'relative',
backgroundColor: token.contentBg,
backgroundClip: 'padding-box',
border: 0,
borderRadius: token.borderRadiusLG,
boxShadow: token.boxShadow,
pointerEvents: 'auto',
padding: token.contentPadding
},
[`${componentCls}-close`]: Object.assign({
position: 'absolute',
top: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),
insetInlineEnd: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),
zIndex: token.calc(token.zIndexPopupBase).add(10).equal(),
padding: 0,
color: token.modalCloseIconColor,
fontWeight: token.fontWeightStrong,
lineHeight: 1,
textDecoration: 'none',
background: 'transparent',
borderRadius: token.borderRadiusSM,
width: token.modalCloseBtnSize,
height: token.modalCloseBtnSize,
border: 0,
outline: 0,
cursor: 'pointer',
transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
'&-x': {
display: 'flex',
fontSize: token.fontSizeLG,
fontStyle: 'normal',
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.modalCloseBtnSize),
justifyContent: 'center',
textTransform: 'none',
textRendering: 'auto'
},
'&:disabled': {
pointerEvents: 'none'
},
'&:hover': {
color: token.modalCloseIconHoverColor,
backgroundColor: token.colorBgTextHover,
textDecoration: 'none'
},
'&:active': {
backgroundColor: token.colorBgTextActive
}
}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.genFocusStyle)(token)),
[`${componentCls}-header`]: {
color: token.colorText,
background: token.headerBg,
borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.borderRadiusLG)} 0 0`,
marginBottom: token.headerMarginBottom,
padding: token.headerPadding,
borderBottom: token.headerBorderBottom
},
[`${componentCls}-body`]: {
fontSize: token.fontSize,
lineHeight: token.lineHeight,
wordWrap: 'break-word',
padding: token.bodyPadding,
[`${componentCls}-body-skeleton`]: {
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.margin)} auto`
}
},
[`${componentCls}-footer`]: {
textAlign: 'end',
background: token.footerBg,
marginTop: token.footerMarginTop,
padding: token.footerPadding,
borderTop: token.footerBorderTop,
borderRadius: token.footerBorderRadius,
[`> ${token.antCls}-btn + ${token.antCls}-btn`]: {
marginInlineStart: token.marginXS
}
},
[`${componentCls}-open`]: {
overflow: 'hidden'
}
})
},
// ======================== Pure =========================
{
[`${componentCls}-pure-panel`]: {
top: 'auto',
padding: 0,
display: 'flex',
flexDirection: 'column',
[`${componentCls}-content,
${componentCls}-body,
${componentCls}-confirm-body-wrapper`]: {
display: 'flex',
flexDirection: 'column',
flex: 'auto'
},
[`${componentCls}-confirm-body`]: {
marginBottom: 'auto'
}
}
}];
};
const genRTLStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-root`]: {
[`${componentCls}-wrap-rtl`]: {
direction: 'rtl',
[`${componentCls}-confirm-body`]: {
direction: 'rtl'
}
}
}
};
};
const genResponsiveWidthStyle = token => {
const {
componentCls
} = token;
const gridMediaSizesMap = (0,_grid_style__WEBPACK_IMPORTED_MODULE_4__.getMediaSize)(token);
delete gridMediaSizesMap.xs;
const responsiveStyles = Object.keys(gridMediaSizesMap).map(key => ({
[`@media (min-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(gridMediaSizesMap[key])})`]: {
width: `var(--${componentCls.replace('.', '')}-${key}-width)`
}
}));
return {
[`${componentCls}-root`]: {
[componentCls]: [{
width: `var(--${componentCls.replace('.', '')}-xs-width)`
}].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(responsiveStyles))
}
};
};
// ============================== Export ==============================
const prepareToken = token => {
const headerPaddingVertical = token.padding;
const headerFontSize = token.fontSizeHeading5;
const headerLineHeight = token.lineHeightHeading5;
const modalToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
modalHeaderHeight: token.calc(token.calc(headerLineHeight).mul(headerFontSize).equal()).add(token.calc(headerPaddingVertical).mul(2).equal()).equal(),
modalFooterBorderColorSplit: token.colorSplit,
modalFooterBorderStyle: token.lineType,
modalFooterBorderWidth: token.lineWidth,
modalCloseIconColor: token.colorIcon,
modalCloseIconHoverColor: token.colorIconHover,
modalCloseBtnSize: token.controlHeight,
modalConfirmIconSize: token.fontHeight,
modalTitleHeight: token.calc(token.titleFontSize).mul(token.titleLineHeight).equal()
});
return modalToken;
};
const prepareComponentToken = token => ({
footerBg: 'transparent',
headerBg: token.colorBgElevated,
titleLineHeight: token.lineHeightHeading5,
titleFontSize: token.fontSizeHeading5,
contentBg: token.colorBgElevated,
titleColor: token.colorTextHeading,
// internal
contentPadding: token.wireframe ? 0 : `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingMD)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingContentHorizontalLG)}`,
headerPadding: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingLG)}` : 0,
headerBorderBottom: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}` : 'none',
headerMarginBottom: token.wireframe ? 0 : token.marginXS,
bodyPadding: token.wireframe ? token.paddingLG : 0,
footerPadding: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.padding)}` : 0,
footerBorderTop: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}` : 'none',
footerBorderRadius: token.wireframe ? `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.borderRadiusLG)}` : 0,
footerMarginTop: token.wireframe ? 0 : token.marginSM,
confirmBodyPadding: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.padding * 2)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.padding * 2)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.paddingLG)}` : 0,
confirmIconMarginInlineEnd: token.wireframe ? token.margin : token.marginSM,
confirmBtnsMarginTop: token.wireframe ? token.marginLG : token.marginSM
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Modal', token => {
const modalToken = prepareToken(token);
return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_7__.initZoomMotion)(modalToken, 'zoom'), genResponsiveWidthStyle(modalToken)];
}, prepareComponentToken, {
unitless: {
titleLineHeight: true
}
}));
/***/ }),
/***/ "./components/notification/style/index.ts":
/*!************************************************************!*\
!*** ./components/notification/style/index.ts + 3 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ notification_style; },
genNoticeStyle: function() { return /* binding */ genNoticeStyle; },
prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
prepareNotificationToken: function() { return /* binding */ prepareNotificationToken; }
});
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/_util/hooks/useZIndex.ts
var useZIndex = __webpack_require__("./components/_util/hooks/useZIndex.ts");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
;// ./components/notification/style/placement.ts
const genNotificationPlacementStyle = token => {
const {
componentCls,
notificationMarginEdge,
animationMaxHeight
} = token;
const noticeCls = `${componentCls}-notice`;
const rightFadeIn = new cssinjs.Keyframes('antNotificationFadeIn', {
'0%': {
transform: `translate3d(100%, 0, 0)`,
opacity: 0
},
'100%': {
transform: `translate3d(0, 0, 0)`,
opacity: 1
}
});
const topFadeIn = new cssinjs.Keyframes('antNotificationTopFadeIn', {
'0%': {
top: -animationMaxHeight,
opacity: 0
},
'100%': {
top: 0,
opacity: 1
}
});
const bottomFadeIn = new cssinjs.Keyframes('antNotificationBottomFadeIn', {
'0%': {
bottom: token.calc(animationMaxHeight).mul(-1).equal(),
opacity: 0
},
'100%': {
bottom: 0,
opacity: 1
}
});
const leftFadeIn = new cssinjs.Keyframes('antNotificationLeftFadeIn', {
'0%': {
transform: `translate3d(-100%, 0, 0)`,
opacity: 0
},
'100%': {
transform: `translate3d(0, 0, 0)`,
opacity: 1
}
});
return {
[componentCls]: {
[`&${componentCls}-top, &${componentCls}-bottom`]: {
marginInline: 0,
[noticeCls]: {
marginInline: 'auto auto'
}
},
[`&${componentCls}-top`]: {
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: topFadeIn
}
},
[`&${componentCls}-bottom`]: {
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: bottomFadeIn
}
},
[`&${componentCls}-topRight, &${componentCls}-bottomRight`]: {
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: rightFadeIn
}
},
[`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {
marginRight: {
value: 0,
_skip_check_: true
},
marginLeft: {
value: notificationMarginEdge,
_skip_check_: true
},
[noticeCls]: {
marginInlineEnd: 'auto',
marginInlineStart: 0
},
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: leftFadeIn
}
}
}
};
};
/* harmony default export */ var placement = (genNotificationPlacementStyle);
;// ./components/notification/interface.ts
const NotificationPlacements = ['top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'];
;// ./components/notification/style/stack.ts
const placementAlignProperty = {
topLeft: 'left',
topRight: 'right',
bottomLeft: 'left',
bottomRight: 'right',
top: 'left',
bottom: 'left'
};
const genPlacementStackStyle = (token, placement) => {
const {
componentCls
} = token;
return {
[`${componentCls}-${placement}`]: {
[`&${componentCls}-stack > ${componentCls}-notice-wrapper`]: {
[placement.startsWith('top') ? 'top' : 'bottom']: 0,
[placementAlignProperty[placement]]: {
value: 0,
_skip_check_: true
}
}
}
};
};
const genStackChildrenStyle = token => {
const childrenStyle = {};
for (let i = 1; i < token.notificationStackLayer; i++) {
childrenStyle[`&:nth-last-child(${i + 1})`] = {
overflow: 'hidden',
[`& > ${token.componentCls}-notice`]: {
opacity: 0,
transition: `opacity ${token.motionDurationMid}`
}
};
}
return Object.assign({
[`&:not(:nth-last-child(-n+${token.notificationStackLayer}))`]: {
opacity: 0,
overflow: 'hidden',
color: 'transparent',
pointerEvents: 'none'
}
}, childrenStyle);
};
const genStackedNoticeStyle = token => {
const childrenStyle = {};
for (let i = 1; i < token.notificationStackLayer; i++) {
childrenStyle[`&:nth-last-child(${i + 1})`] = {
background: token.colorBgBlur,
backdropFilter: 'blur(10px)',
'-webkit-backdrop-filter': 'blur(10px)'
};
}
return Object.assign({}, childrenStyle);
};
const genStackStyle = token => {
const {
componentCls
} = token;
return Object.assign({
[`${componentCls}-stack`]: {
[`& > ${componentCls}-notice-wrapper`]: Object.assign({
transition: `transform ${token.motionDurationSlow}, backdrop-filter 0s`,
willChange: 'transform, opacity',
position: 'absolute'
}, genStackChildrenStyle(token))
},
[`${componentCls}-stack:not(${componentCls}-stack-expanded)`]: {
[`& > ${componentCls}-notice-wrapper`]: Object.assign({}, genStackedNoticeStyle(token))
},
[`${componentCls}-stack${componentCls}-stack-expanded`]: {
[`& > ${componentCls}-notice-wrapper`]: {
'&:not(:nth-last-child(-n + 1))': {
opacity: 1,
overflow: 'unset',
color: 'inherit',
pointerEvents: 'auto',
[`& > ${token.componentCls}-notice`]: {
opacity: 1
}
},
'&:after': {
content: '""',
position: 'absolute',
height: token.margin,
width: '100%',
insetInline: 0,
bottom: token.calc(token.margin).mul(-1).equal(),
background: 'transparent',
pointerEvents: 'auto'
}
}
}
}, NotificationPlacements.map(placement => genPlacementStackStyle(token, placement)).reduce((acc, cur) => Object.assign(Object.assign({}, acc), cur), {}));
};
/* harmony default export */ var stack = (genStackStyle);
;// ./components/notification/style/index.ts
const genNoticeStyle = token => {
const {
iconCls,
componentCls,
// .ant-notification
boxShadow,
fontSizeLG,
notificationMarginBottom,
borderRadiusLG,
colorSuccess,
colorInfo,
colorWarning,
colorError,
colorTextHeading,
notificationBg,
notificationPadding,
notificationMarginEdge,
notificationProgressBg,
notificationProgressHeight,
fontSize,
lineHeight,
width,
notificationIconSize,
colorText
} = token;
const noticeCls = `${componentCls}-notice`;
return {
position: 'relative',
marginBottom: notificationMarginBottom,
marginInlineStart: 'auto',
background: notificationBg,
borderRadius: borderRadiusLG,
boxShadow,
[noticeCls]: {
padding: notificationPadding,
width,
maxWidth: `calc(100vw - ${(0,cssinjs.unit)(token.calc(notificationMarginEdge).mul(2).equal())})`,
overflow: 'hidden',
lineHeight,
wordWrap: 'break-word'
},
[`${noticeCls}-message`]: {
marginBottom: token.marginXS,
color: colorTextHeading,
fontSize: fontSizeLG,
lineHeight: token.lineHeightLG
},
[`${noticeCls}-description`]: {
fontSize,
color: colorText
},
[`${noticeCls}-closable ${noticeCls}-message`]: {
paddingInlineEnd: token.paddingLG
},
[`${noticeCls}-with-icon ${noticeCls}-message`]: {
marginBottom: token.marginXS,
marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),
fontSize: fontSizeLG
},
[`${noticeCls}-with-icon ${noticeCls}-description`]: {
marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),
fontSize
},
// Icon & color style in different selector level
// https://github.com/ant-design/ant-design/issues/16503
// https://github.com/ant-design/ant-design/issues/15512
[`${noticeCls}-icon`]: {
position: 'absolute',
fontSize: notificationIconSize,
lineHeight: 1,
// icon-font
[`&-success${iconCls}`]: {
color: colorSuccess
},
[`&-info${iconCls}`]: {
color: colorInfo
},
[`&-warning${iconCls}`]: {
color: colorWarning
},
[`&-error${iconCls}`]: {
color: colorError
}
},
[`${noticeCls}-close`]: Object.assign({
position: 'absolute',
top: token.notificationPaddingVertical,
insetInlineEnd: token.notificationPaddingHorizontal,
color: token.colorIcon,
outline: 'none',
width: token.notificationCloseButtonSize,
height: token.notificationCloseButtonSize,
borderRadius: token.borderRadiusSM,
transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
'&:hover': {
color: token.colorIconHover,
backgroundColor: token.colorBgTextHover
},
'&:active': {
backgroundColor: token.colorBgTextActive
}
}, (0,style.genFocusStyle)(token)),
[`${noticeCls}-progress`]: {
position: 'absolute',
display: 'block',
appearance: 'none',
WebkitAppearance: 'none',
inlineSize: `calc(100% - ${(0,cssinjs.unit)(borderRadiusLG)} * 2)`,
left: {
_skip_check_: true,
value: borderRadiusLG
},
right: {
_skip_check_: true,
value: borderRadiusLG
},
bottom: 0,
blockSize: notificationProgressHeight,
border: 0,
'&, &::-webkit-progress-bar': {
borderRadius: borderRadiusLG,
backgroundColor: `rgba(0, 0, 0, 0.04)`
},
'&::-moz-progress-bar': {
background: notificationProgressBg
},
'&::-webkit-progress-value': {
borderRadius: borderRadiusLG,
background: notificationProgressBg
}
},
[`${noticeCls}-actions`]: {
float: 'right',
marginTop: token.marginSM
}
};
};
const genNotificationStyle = token => {
const {
componentCls,
// .ant-notification
notificationMarginBottom,
notificationMarginEdge,
motionDurationMid,
motionEaseInOut
} = token;
const noticeCls = `${componentCls}-notice`;
const fadeOut = new cssinjs.Keyframes('antNotificationFadeOut', {
'0%': {
maxHeight: token.animationMaxHeight,
marginBottom: notificationMarginBottom
},
'100%': {
maxHeight: 0,
marginBottom: 0,
paddingTop: 0,
paddingBottom: 0,
opacity: 0
}
});
return [
// ============================ Holder ============================
{
[componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
position: 'fixed',
zIndex: token.zIndexPopup,
marginRight: {
value: notificationMarginEdge,
_skip_check_: true
},
[`${componentCls}-hook-holder`]: {
position: 'relative'
},
// animation
[`${componentCls}-fade-appear-prepare`]: {
opacity: '0 !important'
},
[`${componentCls}-fade-enter, ${componentCls}-fade-appear`]: {
animationDuration: token.motionDurationMid,
animationTimingFunction: motionEaseInOut,
animationFillMode: 'both',
opacity: 0,
animationPlayState: 'paused'
},
[`${componentCls}-fade-leave`]: {
animationTimingFunction: motionEaseInOut,
animationFillMode: 'both',
animationDuration: motionDurationMid,
animationPlayState: 'paused'
},
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationPlayState: 'running'
},
[`${componentCls}-fade-leave${componentCls}-fade-leave-active`]: {
animationName: fadeOut,
animationPlayState: 'running'
},
// RTL
'&-rtl': {
direction: 'rtl',
[`${noticeCls}-actions`]: {
float: 'left'
}
}
})
},
// ============================ Notice ============================
{
[componentCls]: {
[`${noticeCls}-wrapper`]: Object.assign({}, genNoticeStyle(token))
}
}];
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexPopupBase + useZIndex.CONTAINER_MAX_OFFSET + 50,
width: 384
});
const prepareNotificationToken = token => {
const notificationPaddingVertical = token.paddingMD;
const notificationPaddingHorizontal = token.paddingLG;
const notificationToken = (0,es.mergeToken)(token, {
notificationBg: token.colorBgElevated,
notificationPaddingVertical,
notificationPaddingHorizontal,
notificationIconSize: token.calc(token.fontSizeLG).mul(token.lineHeightLG).equal(),
notificationCloseButtonSize: token.calc(token.controlHeightLG).mul(0.55).equal(),
notificationMarginBottom: token.margin,
notificationPadding: `${(0,cssinjs.unit)(token.paddingMD)} ${(0,cssinjs.unit)(token.paddingContentHorizontalLG)}`,
notificationMarginEdge: token.marginLG,
animationMaxHeight: 150,
notificationStackLayer: 3,
notificationProgressHeight: 2,
notificationProgressBg: `linear-gradient(90deg, ${token.colorPrimaryBorderHover}, ${token.colorPrimary})`
});
return notificationToken;
};
/* harmony default export */ var notification_style = ((0,genStyleUtils.genStyleHooks)('Notification', token => {
const notificationToken = prepareNotificationToken(token);
return [genNotificationStyle(notificationToken), placement(notificationToken), stack(notificationToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/pagination/style/index.ts":
/*!**********************************************!*\
!*** ./components/pagination/style/index.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
/* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.ts");
/* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/token.ts");
/* harmony import */ var _input_style_variants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../input/style/variants */ "./components/input/style/variants.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const genPaginationDisabledStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-disabled`]: {
'&, &:hover': {
cursor: 'not-allowed',
[`${componentCls}-item-link`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed'
}
},
'&:focus-visible': {
cursor: 'not-allowed',
[`${componentCls}-item-link`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed'
}
}
},
[`&${componentCls}-disabled`]: {
cursor: 'not-allowed',
[`${componentCls}-item`]: {
cursor: 'not-allowed',
'&:hover, &:active': {
backgroundColor: 'transparent'
},
a: {
color: token.colorTextDisabled,
backgroundColor: 'transparent',
border: 'none',
cursor: 'not-allowed'
},
'&-active': {
borderColor: token.colorBorder,
backgroundColor: token.itemActiveBgDisabled,
'&:hover, &:active': {
backgroundColor: token.itemActiveBgDisabled
},
a: {
color: token.itemActiveColorDisabled
}
}
},
[`${componentCls}-item-link`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed',
'&:hover, &:active': {
backgroundColor: 'transparent'
},
[`${componentCls}-simple&`]: {
backgroundColor: 'transparent',
'&:hover, &:active': {
backgroundColor: 'transparent'
}
}
},
[`${componentCls}-simple-pager`]: {
color: token.colorTextDisabled
},
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
[`${componentCls}-item-link-icon`]: {
opacity: 0
},
[`${componentCls}-item-ellipsis`]: {
opacity: 1
}
}
},
[`&${componentCls}-simple`]: {
[`${componentCls}-prev, ${componentCls}-next`]: {
[`&${componentCls}-disabled ${componentCls}-item-link`]: {
'&:hover, &:active': {
backgroundColor: 'transparent'
}
}
}
}
};
};
const genPaginationMiniStyle = token => {
const {
componentCls
} = token;
return {
[`&${componentCls}-mini ${componentCls}-total-text, &${componentCls}-mini ${componentCls}-simple-pager`]: {
height: token.itemSizeSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
},
[`&${componentCls}-mini ${componentCls}-item`]: {
minWidth: token.itemSizeSM,
height: token.itemSizeSM,
margin: 0,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.itemSizeSM).sub(2).equal())
},
[`&${componentCls}-mini:not(${componentCls}-disabled) ${componentCls}-item:not(${componentCls}-item-active)`]: {
backgroundColor: 'transparent',
borderColor: 'transparent',
'&:hover': {
backgroundColor: token.colorBgTextHover
},
'&:active': {
backgroundColor: token.colorBgTextActive
}
},
[`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: {
minWidth: token.itemSizeSM,
height: token.itemSizeSM,
margin: 0,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
},
[`&${componentCls}-mini:not(${componentCls}-disabled)`]: {
[`${componentCls}-prev, ${componentCls}-next`]: {
[`&:hover ${componentCls}-item-link`]: {
backgroundColor: token.colorBgTextHover
},
[`&:active ${componentCls}-item-link`]: {
backgroundColor: token.colorBgTextActive
},
[`&${componentCls}-disabled:hover ${componentCls}-item-link`]: {
backgroundColor: 'transparent'
}
}
},
[`
&${componentCls}-mini ${componentCls}-prev ${componentCls}-item-link,
&${componentCls}-mini ${componentCls}-next ${componentCls}-item-link
`]: {
backgroundColor: 'transparent',
borderColor: 'transparent',
'&::after': {
height: token.itemSizeSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
}
},
[`&${componentCls}-mini ${componentCls}-jump-prev, &${componentCls}-mini ${componentCls}-jump-next`]: {
height: token.itemSizeSM,
marginInlineEnd: 0,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
},
[`&${componentCls}-mini ${componentCls}-options`]: {
marginInlineStart: token.paginationMiniOptionsMarginInlineStart,
'&-size-changer': {
top: token.miniOptionsSizeChangerTop
},
'&-quick-jumper': {
height: token.itemSizeSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM),
input: Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genInputSmallStyle)(token)), {
width: token.paginationMiniQuickJumperInputWidth,
height: token.controlHeightSM
})
}
}
};
};
const genPaginationSimpleStyle = token => {
const {
componentCls
} = token;
return {
[`
&${componentCls}-simple ${componentCls}-prev,
&${componentCls}-simple ${componentCls}-next
`]: {
height: token.itemSizeSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM),
verticalAlign: 'top',
[`${componentCls}-item-link`]: {
height: token.itemSizeSM,
backgroundColor: 'transparent',
border: 0,
'&:hover': {
backgroundColor: token.colorBgTextHover
},
'&:active': {
backgroundColor: token.colorBgTextActive
},
'&::after': {
height: token.itemSizeSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
}
}
},
[`&${componentCls}-simple ${componentCls}-simple-pager`]: {
display: 'inline-block',
height: token.itemSizeSM,
marginInlineEnd: token.marginXS,
input: {
boxSizing: 'border-box',
height: '100%',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paginationItemPaddingInline)}`,
textAlign: 'center',
backgroundColor: token.itemInputBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadius,
outline: 'none',
transition: `border-color ${token.motionDurationMid}`,
color: 'inherit',
'&:hover': {
borderColor: token.colorPrimary
},
'&:focus': {
borderColor: token.colorPrimaryHover,
boxShadow: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.inputOutlineOffset)} 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.controlOutlineWidth)} ${token.controlOutline}`
},
'&[disabled]': {
color: token.colorTextDisabled,
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
cursor: 'not-allowed'
}
}
}
};
};
const genPaginationJumpStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
outline: 0,
[`${componentCls}-item-container`]: {
position: 'relative',
[`${componentCls}-item-link-icon`]: {
color: token.colorPrimary,
fontSize: token.fontSizeSM,
opacity: 0,
transition: `all ${token.motionDurationMid}`,
'&-svg': {
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
margin: 'auto'
}
},
[`${componentCls}-item-ellipsis`]: {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
display: 'block',
margin: 'auto',
color: token.colorTextDisabled,
letterSpacing: token.paginationEllipsisLetterSpacing,
textAlign: 'center',
textIndent: token.paginationEllipsisTextIndent,
opacity: 1,
transition: `all ${token.motionDurationMid}`
}
},
'&:hover': {
[`${componentCls}-item-link-icon`]: {
opacity: 1
},
[`${componentCls}-item-ellipsis`]: {
opacity: 0
}
}
},
[`
${componentCls}-prev,
${componentCls}-jump-prev,
${componentCls}-jump-next
`]: {
marginInlineEnd: token.marginXS
},
[`
${componentCls}-prev,
${componentCls}-next,
${componentCls}-jump-prev,
${componentCls}-jump-next
`]: {
display: 'inline-block',
minWidth: token.itemSize,
height: token.itemSize,
color: token.colorText,
fontFamily: token.fontFamily,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSize),
textAlign: 'center',
verticalAlign: 'middle',
listStyle: 'none',
borderRadius: token.borderRadius,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`
},
[`${componentCls}-prev, ${componentCls}-next`]: {
outline: 0,
button: {
color: token.colorText,
cursor: 'pointer',
userSelect: 'none'
},
[`${componentCls}-item-link`]: {
display: 'block',
width: '100%',
height: '100%',
padding: 0,
fontSize: token.fontSizeSM,
textAlign: 'center',
backgroundColor: 'transparent',
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} transparent`,
borderRadius: token.borderRadius,
outline: 'none',
transition: `all ${token.motionDurationMid}`
},
[`&:hover ${componentCls}-item-link`]: {
backgroundColor: token.colorBgTextHover
},
[`&:active ${componentCls}-item-link`]: {
backgroundColor: token.colorBgTextActive
},
[`&${componentCls}-disabled:hover`]: {
[`${componentCls}-item-link`]: {
backgroundColor: 'transparent'
}
}
},
[`${componentCls}-slash`]: {
marginInlineEnd: token.paginationSlashMarginInlineEnd,
marginInlineStart: token.paginationSlashMarginInlineStart
},
[`${componentCls}-options`]: {
display: 'inline-block',
marginInlineStart: token.margin,
verticalAlign: 'middle',
'&-size-changer': {
display: 'inline-block',
width: 'auto'
},
'&-quick-jumper': {
display: 'inline-block',
height: token.controlHeight,
marginInlineStart: token.marginXS,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.controlHeight),
verticalAlign: 'top',
input: Object.assign(Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genBasicInputStyle)(token)), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genBaseOutlinedStyle)(token, {
borderColor: token.colorBorder,
hoverBorderColor: token.colorPrimaryHover,
activeBorderColor: token.colorPrimary,
activeShadow: token.activeShadow
})), {
'&[disabled]': Object.assign({}, (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_2__.genDisabledStyle)(token)),
width: token.calc(token.controlHeightLG).mul(1.25).equal(),
height: token.controlHeight,
boxSizing: 'border-box',
margin: 0,
marginInlineStart: token.marginXS,
marginInlineEnd: token.marginXS
})
}
}
};
};
const genPaginationItemStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-item`]: {
display: 'inline-block',
minWidth: token.itemSize,
height: token.itemSize,
marginInlineEnd: token.marginXS,
fontFamily: token.fontFamily,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.itemSize).sub(2).equal()),
textAlign: 'center',
verticalAlign: 'middle',
listStyle: 'none',
backgroundColor: token.itemBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} transparent`,
borderRadius: token.borderRadius,
outline: 0,
cursor: 'pointer',
userSelect: 'none',
a: {
display: 'block',
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paginationItemPaddingInline)}`,
color: token.colorText,
'&:hover': {
textDecoration: 'none'
}
},
[`&:not(${componentCls}-item-active)`]: {
'&:hover': {
transition: `all ${token.motionDurationMid}`,
backgroundColor: token.colorBgTextHover
},
'&:active': {
backgroundColor: token.colorBgTextActive
}
},
'&-active': {
fontWeight: token.fontWeightStrong,
backgroundColor: token.itemActiveBg,
borderColor: token.colorPrimary,
a: {
color: token.colorPrimary
},
'&:hover': {
borderColor: token.colorPrimaryHover
},
'&:hover a': {
color: token.colorPrimaryHover
}
}
}
};
};
const genPaginationStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.resetComponent)(token)), {
display: 'flex',
'&-start': {
justifyContent: 'start'
},
'&-center': {
justifyContent: 'center'
},
'&-end': {
justifyContent: 'end'
},
'ul, ol': {
margin: 0,
padding: 0,
listStyle: 'none'
},
'&::after': {
display: 'block',
clear: 'both',
height: 0,
overflow: 'hidden',
visibility: 'hidden',
content: '""'
},
[`${componentCls}-total-text`]: {
display: 'inline-block',
height: token.itemSize,
marginInlineEnd: token.marginXS,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.itemSize).sub(2).equal()),
verticalAlign: 'middle'
}
}), genPaginationItemStyle(token)), genPaginationJumpStyle(token)), genPaginationSimpleStyle(token)), genPaginationMiniStyle(token)), genPaginationDisabledStyle(token)), {
// media query style
[`@media only screen and (max-width: ${token.screenLG}px)`]: {
[`${componentCls}-item`]: {
'&-after-jump-prev, &-before-jump-next': {
display: 'none'
}
}
},
[`@media only screen and (max-width: ${token.screenSM}px)`]: {
[`${componentCls}-options`]: {
display: 'none'
}
}
}),
// rtl style
[`&${token.componentCls}-rtl`]: {
direction: 'rtl'
}
};
};
const genPaginationFocusStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}:not(${componentCls}-disabled)`]: {
[`${componentCls}-item`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.genFocusStyle)(token)),
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
'&:focus-visible': Object.assign({
[`${componentCls}-item-link-icon`]: {
opacity: 1
},
[`${componentCls}-item-ellipsis`]: {
opacity: 0
}
}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.genFocusOutline)(token))
},
[`${componentCls}-prev, ${componentCls}-next`]: {
[`&:focus-visible ${componentCls}-item-link`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.genFocusOutline)(token))
}
}
};
};
const prepareComponentToken = token => Object.assign({
itemBg: token.colorBgContainer,
itemSize: token.controlHeight,
itemSizeSM: token.controlHeightSM,
itemActiveBg: token.colorBgContainer,
itemLinkBg: token.colorBgContainer,
itemActiveColorDisabled: token.colorTextDisabled,
itemActiveBgDisabled: token.controlItemBgActiveDisabled,
itemInputBg: token.colorBgContainer,
miniOptionsSizeChangerTop: 0
}, (0,_input_style__WEBPACK_IMPORTED_MODULE_4__.initComponentToken)(token));
const prepareToken = token => (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
inputOutlineOffset: 0,
paginationMiniOptionsMarginInlineStart: token.calc(token.marginXXS).div(2).equal(),
paginationMiniQuickJumperInputWidth: token.calc(token.controlHeightLG).mul(1.1).equal(),
paginationItemPaddingInline: token.calc(token.marginXXS).mul(1.5).equal(),
paginationEllipsisLetterSpacing: token.calc(token.marginXXS).div(2).equal(),
paginationSlashMarginInlineStart: token.marginSM,
paginationSlashMarginInlineEnd: token.marginSM,
paginationEllipsisTextIndent: '0.13em' // magic for ui experience
}, (0,_input_style__WEBPACK_IMPORTED_MODULE_4__.initInputToken)(token));
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Pagination', token => {
const paginationToken = prepareToken(token);
return [genPaginationStyle(paginationToken), genPaginationFocusStyle(paginationToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/popconfirm/style/index.ts":
/*!**********************************************!*\
!*** ./components/popconfirm/style/index.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
iconCls,
antCls,
zIndexPopup,
colorText,
colorWarning,
marginXXS,
marginXS,
fontSize,
fontWeightStrong,
colorTextHeading
} = token;
return {
[componentCls]: {
zIndex: zIndexPopup,
[`&${antCls}-popover`]: {
fontSize
},
[`${componentCls}-message`]: {
marginBottom: marginXS,
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'start',
[`> ${componentCls}-message-icon ${iconCls}`]: {
color: colorWarning,
fontSize,
lineHeight: 1,
marginInlineEnd: marginXS
},
[`${componentCls}-title`]: {
fontWeight: fontWeightStrong,
color: colorTextHeading,
'&:only-child': {
fontWeight: 'normal'
}
},
[`${componentCls}-description`]: {
marginTop: marginXXS,
color: colorText
}
},
[`${componentCls}-buttons`]: {
textAlign: 'end',
whiteSpace: 'nowrap',
button: {
marginInlineStart: marginXS
}
}
}
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
zIndexPopupBase
} = token;
return {
zIndexPopup: zIndexPopupBase + 60
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('Popconfirm', token => genBaseStyle(token), prepareComponentToken, {
resetStyle: false
}));
/***/ }),
/***/ "./components/popover/style/index.ts":
/*!*******************************************!*\
!*** ./components/popover/style/index.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/placementArrow */ "./components/style/placementArrow.ts");
/* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/interface/presetColors.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genBaseStyle = token => {
const {
componentCls,
popoverColor,
titleMinWidth,
fontWeightStrong,
innerPadding,
boxShadowSecondary,
colorTextHeading,
borderRadiusLG,
zIndexPopup,
titleMarginBottom,
colorBgElevated,
popoverBg,
titleBorderBottom,
innerContentPadding,
titlePadding
} = token;
return [{
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'absolute',
top: 0,
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
left: {
_skip_check_: true,
value: 0
},
zIndex: zIndexPopup,
fontWeight: 'normal',
whiteSpace: 'normal',
textAlign: 'start',
cursor: 'auto',
userSelect: 'text',
// When use `autoArrow`, origin will follow the arrow position
'--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',
transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),
'--antd-arrow-background-color': colorBgElevated,
width: 'max-content',
maxWidth: '100vw',
'&-rtl': {
direction: 'rtl'
},
'&-hidden': {
display: 'none'
},
[`${componentCls}-content`]: {
position: 'relative'
},
[`${componentCls}-inner`]: {
backgroundColor: popoverBg,
backgroundClip: 'padding-box',
borderRadius: borderRadiusLG,
boxShadow: boxShadowSecondary,
padding: innerPadding
},
[`${componentCls}-title`]: {
minWidth: titleMinWidth,
marginBottom: titleMarginBottom,
color: colorTextHeading,
fontWeight: fontWeightStrong,
borderBottom: titleBorderBottom,
padding: titlePadding
},
[`${componentCls}-inner-content`]: {
color: popoverColor,
padding: innerContentPadding
}
})
},
// Arrow Style
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__["default"])(token, 'var(--antd-arrow-background-color)'),
// Pure Render
{
[`${componentCls}-pure`]: {
position: 'relative',
maxWidth: 'none',
margin: token.sizePopupArrow,
display: 'inline-block',
[`${componentCls}-content`]: {
display: 'inline-block'
}
}
}];
};
const genColorStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: _theme_internal__WEBPACK_IMPORTED_MODULE_2__.PresetColors.map(colorKey => {
const lightColor = token[`${colorKey}6`];
return {
[`&${componentCls}-${colorKey}`]: {
'--antd-arrow-background-color': lightColor,
[`${componentCls}-inner`]: {
backgroundColor: lightColor
},
[`${componentCls}-arrow`]: {
background: 'transparent'
}
}
};
})
};
};
const prepareComponentToken = token => {
const {
lineWidth,
controlHeight,
fontHeight,
padding,
wireframe,
zIndexPopupBase,
borderRadiusLG,
marginXS,
lineType,
colorSplit,
paddingSM
} = token;
const titlePaddingBlockDist = controlHeight - fontHeight;
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
const popoverPaddingHorizontal = padding;
return Object.assign(Object.assign(Object.assign({
titleMinWidth: 177,
zIndexPopup: zIndexPopupBase + 30
}, (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_3__.getArrowToken)(token)), (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__.getArrowOffsetToken)({
contentRadius: borderRadiusLG,
limitVerticalRadius: true
})), {
// internal
innerPadding: wireframe ? 0 : 12,
titleMarginBottom: wireframe ? 0 : marginXS,
titlePadding: wireframe ? `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px` : 0,
titleBorderBottom: wireframe ? `${lineWidth}px ${lineType} ${colorSplit}` : 'none',
innerContentPadding: wireframe ? `${paddingSM}px ${popoverPaddingHorizontal}px` : 0
});
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Popover', token => {
const {
colorBgElevated,
colorText
} = token;
const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
popoverBg: colorBgElevated,
popoverColor: colorText
});
return [genBaseStyle(popoverToken), genColorStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_6__.initZoomMotion)(popoverToken, 'zoom-big')];
}, prepareComponentToken, {
resetStyle: false,
deprecatedTokens: [['width', 'titleMinWidth'], ['minWidth', 'titleMinWidth']]
}));
/***/ }),
/***/ "./components/progress/style/index.ts":
/*!********************************************!*\
!*** ./components/progress/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ LineStrokeColorVar: function() { return /* binding */ LineStrokeColorVar; },
/* harmony export */ Percent: function() { return /* binding */ Percent; }
/* harmony export */ });
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const LineStrokeColorVar = '--progress-line-stroke-color';
const Percent = '--progress-percent';
const genAntProgressActive = isRtl => {
const direction = isRtl ? '100%' : '-100%';
return new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes(`antProgress${isRtl ? 'RTL' : 'LTR'}Active`, {
'0%': {
transform: `translateX(${direction}) scaleX(0)`,
opacity: 0.1
},
'20%': {
transform: `translateX(${direction}) scaleX(0)`,
opacity: 0.5
},
to: {
transform: 'translateX(0) scaleX(1)',
opacity: 0
}
});
};
const genBaseStyle = token => {
const {
componentCls: progressCls,
iconCls: iconPrefixCls
} = token;
return {
[progressCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
display: 'inline-block',
'&-rtl': {
direction: 'rtl'
},
'&-line': {
position: 'relative',
width: '100%',
fontSize: token.fontSize
},
[`${progressCls}-outer`]: {
display: 'inline-flex',
alignItems: 'center',
width: '100%'
},
[`${progressCls}-inner`]: {
position: 'relative',
display: 'inline-block',
width: '100%',
flex: 1,
overflow: 'hidden',
verticalAlign: 'middle',
backgroundColor: token.remainingColor,
borderRadius: token.lineBorderRadius
},
[`${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {
[`${progressCls}-circle-path`]: {
stroke: token.defaultColor
}
},
[`${progressCls}-success-bg, ${progressCls}-bg`]: {
position: 'relative',
background: token.defaultColor,
borderRadius: token.lineBorderRadius,
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`
},
[`${progressCls}-layout-bottom`]: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
[`${progressCls}-text`]: {
width: 'max-content',
marginInlineStart: 0,
marginTop: token.marginXXS
}
},
[`${progressCls}-bg`]: {
overflow: 'hidden',
'&::after': {
content: '""',
background: {
_multi_value_: true,
value: ['inherit', `var(${LineStrokeColorVar})`]
},
height: '100%',
width: `calc(1 / var(${Percent}) * 100%)`,
display: 'block'
},
[`&${progressCls}-bg-inner`]: {
minWidth: 'max-content',
'&::after': {
content: 'none'
},
[`${progressCls}-text-inner`]: {
color: token.colorWhite,
[`&${progressCls}-text-bright`]: {
color: 'rgba(0, 0, 0, 0.45)'
}
}
}
},
[`${progressCls}-success-bg`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
backgroundColor: token.colorSuccess
},
[`${progressCls}-text`]: {
display: 'inline-block',
marginInlineStart: token.marginXS,
color: token.colorText,
lineHeight: 1,
width: '2em',
whiteSpace: 'nowrap',
textAlign: 'start',
verticalAlign: 'middle',
wordBreak: 'normal',
[iconPrefixCls]: {
fontSize: token.fontSize
},
[`&${progressCls}-text-outer`]: {
width: 'max-content'
},
[`&${progressCls}-text-outer${progressCls}-text-start`]: {
width: 'max-content',
marginInlineStart: 0,
marginInlineEnd: token.marginXS
}
},
[`${progressCls}-text-inner`]: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
width: '100%',
height: '100%',
marginInlineStart: 0,
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXXS)}`,
[`&${progressCls}-text-start`]: {
justifyContent: 'start'
},
[`&${progressCls}-text-end`]: {
justifyContent: 'end'
}
},
[`&${progressCls}-status-active`]: {
[`${progressCls}-bg::before`]: {
position: 'absolute',
inset: 0,
backgroundColor: token.colorBgContainer,
borderRadius: token.lineBorderRadius,
opacity: 0,
animationName: genAntProgressActive(),
animationDuration: token.progressActiveMotionDuration,
animationTimingFunction: token.motionEaseOutQuint,
animationIterationCount: 'infinite',
content: '""'
}
},
[`&${progressCls}-rtl${progressCls}-status-active`]: {
[`${progressCls}-bg::before`]: {
animationName: genAntProgressActive(true)
}
},
[`&${progressCls}-status-exception`]: {
[`${progressCls}-bg`]: {
backgroundColor: token.colorError
},
[`${progressCls}-text`]: {
color: token.colorError
}
},
[`&${progressCls}-status-exception ${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {
[`${progressCls}-circle-path`]: {
stroke: token.colorError
}
},
[`&${progressCls}-status-success`]: {
[`${progressCls}-bg`]: {
backgroundColor: token.colorSuccess
},
[`${progressCls}-text`]: {
color: token.colorSuccess
}
},
[`&${progressCls}-status-success ${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {
[`${progressCls}-circle-path`]: {
stroke: token.colorSuccess
}
}
})
};
};
const genCircleStyle = token => {
const {
componentCls: progressCls,
iconCls: iconPrefixCls
} = token;
return {
[progressCls]: {
[`${progressCls}-circle-trail`]: {
stroke: token.remainingColor
},
[`&${progressCls}-circle ${progressCls}-inner`]: {
position: 'relative',
lineHeight: 1,
backgroundColor: 'transparent'
},
[`&${progressCls}-circle ${progressCls}-text`]: {
position: 'absolute',
insetBlockStart: '50%',
insetInlineStart: 0,
width: '100%',
margin: 0,
padding: 0,
color: token.circleTextColor,
fontSize: token.circleTextFontSize,
lineHeight: 1,
whiteSpace: 'normal',
textAlign: 'center',
transform: 'translateY(-50%)',
[iconPrefixCls]: {
fontSize: token.circleIconFontSize
}
},
[`${progressCls}-circle&-status-exception`]: {
[`${progressCls}-text`]: {
color: token.colorError
}
},
[`${progressCls}-circle&-status-success`]: {
[`${progressCls}-text`]: {
color: token.colorSuccess
}
}
},
[`${progressCls}-inline-circle`]: {
lineHeight: 1,
[`${progressCls}-inner`]: {
verticalAlign: 'bottom'
}
}
};
};
const genStepStyle = token => {
const {
componentCls: progressCls
} = token;
return {
[progressCls]: {
[`${progressCls}-steps`]: {
display: 'inline-block',
'&-outer': {
display: 'flex',
flexDirection: 'row',
alignItems: 'center'
},
'&-item': {
flexShrink: 0,
minWidth: token.progressStepMinWidth,
marginInlineEnd: token.progressStepMarginInlineEnd,
backgroundColor: token.remainingColor,
transition: `all ${token.motionDurationSlow}`,
'&-active': {
backgroundColor: token.defaultColor
}
}
}
}
};
};
const genSmallLine = token => {
const {
componentCls: progressCls,
iconCls: iconPrefixCls
} = token;
return {
[progressCls]: {
[`${progressCls}-small&-line, ${progressCls}-small&-line ${progressCls}-text ${iconPrefixCls}`]: {
fontSize: token.fontSizeSM
}
}
};
};
const prepareComponentToken = token => ({
circleTextColor: token.colorText,
defaultColor: token.colorInfo,
remainingColor: token.colorFillSecondary,
lineBorderRadius: 100,
// magic for capsule shape, should be a very large number
circleTextFontSize: '1em',
circleIconFontSize: `${token.fontSize / token.fontSizeSM}em`
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Progress', token => {
const progressStepMarginInlineEnd = token.calc(token.marginXXS).div(2).equal();
const progressToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
progressStepMarginInlineEnd,
progressStepMinWidth: progressStepMarginInlineEnd,
progressActiveMotionDuration: '2.4s'
});
return [genBaseStyle(progressToken), genCircleStyle(progressToken), genStepStyle(progressToken), genSmallLine(progressToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/qr-code/style/index.ts":
/*!*******************************************!*\
!*** ./components/qr-code/style/index.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genQRCodeStyle = token => {
const {
componentCls,
lineWidth,
lineType,
colorSplit
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
padding: token.paddingSM,
backgroundColor: token.colorWhite,
borderRadius: token.borderRadiusLG,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
position: 'relative',
overflow: 'hidden',
[`& > ${componentCls}-mask`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
zIndex: 10,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
width: '100%',
height: '100%',
color: token.colorText,
lineHeight: token.lineHeight,
background: token.QRCodeMaskBackgroundColor,
textAlign: 'center',
[`& > ${componentCls}-expired, & > ${componentCls}-scanned`]: {
color: token.QRCodeTextColor
}
},
'> canvas': {
alignSelf: 'stretch',
flex: 'auto',
minWidth: 0
},
'&-icon': {
marginBlockEnd: token.marginXS,
fontSize: token.controlHeight
}
}),
[`${componentCls}-borderless`]: {
borderColor: 'transparent',
padding: 0,
borderRadius: 0
}
};
};
const prepareComponentToken = token => ({
QRCodeMaskBackgroundColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorBgContainer).setA(0.96).toRgbString()
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('QRCode', token => {
const mergedToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.mergeToken)(token, {
QRCodeTextColor: token.colorText
});
return genQRCodeStyle(mergedToken);
}, prepareComponentToken));
/***/ }),
/***/ "./components/radio/style/index.ts":
/*!*****************************************!*\
!*** ./components/radio/style/index.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Styles ==============================
// styles from RadioGroup only
const getGroupRadioStyle = token => {
const {
componentCls,
antCls
} = token;
const groupPrefixCls = `${componentCls}-group`;
return {
[groupPrefixCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
display: 'inline-block',
fontSize: 0,
// RTL
[`&${groupPrefixCls}-rtl`]: {
direction: 'rtl'
},
[`&${groupPrefixCls}-block`]: {
display: 'flex'
},
[`${antCls}-badge ${antCls}-badge-count`]: {
zIndex: 1
},
[`> ${antCls}-badge:not(:first-child) > ${antCls}-button-wrapper`]: {
borderInlineStart: 'none'
}
})
};
};
// Styles from radio-wrapper
const getRadioBasicStyle = token => {
const {
componentCls,
wrapperMarginInlineEnd,
colorPrimary,
radioSize,
motionDurationSlow,
motionDurationMid,
motionEaseInOutCirc,
colorBgContainer,
colorBorder,
lineWidth,
colorBgContainerDisabled,
colorTextDisabled,
paddingXS,
dotColorDisabled,
lineType,
radioColor,
radioBgColor,
calc
} = token;
const radioInnerPrefixCls = `${componentCls}-inner`;
const dotPadding = 4;
const radioDotDisabledSize = calc(radioSize).sub(calc(dotPadding).mul(2));
const radioSizeCalc = calc(1).mul(radioSize).equal({
unit: true
});
return {
[`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
display: 'inline-flex',
alignItems: 'baseline',
marginInlineStart: 0,
marginInlineEnd: wrapperMarginInlineEnd,
cursor: 'pointer',
'&:last-child': {
marginInlineEnd: 0
},
// RTL
[`&${componentCls}-wrapper-rtl`]: {
direction: 'rtl'
},
'&-disabled': {
cursor: 'not-allowed',
color: token.colorTextDisabled
},
'&::after': {
display: 'inline-block',
width: 0,
overflow: 'hidden',
content: '"\\a0"'
},
'&-block': {
flex: 1,
justifyContent: 'center'
},
// hashId 在 wrapper 上,只能铺平
[`${componentCls}-checked::after`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
width: '100%',
height: '100%',
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorPrimary}`,
borderRadius: '50%',
visibility: 'hidden',
opacity: 0,
content: '""'
},
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'relative',
display: 'inline-block',
outline: 'none',
cursor: 'pointer',
alignSelf: 'center',
borderRadius: '50%'
}),
[`${componentCls}-wrapper:hover &,
&:hover ${radioInnerPrefixCls}`]: {
borderColor: colorPrimary
},
[`${componentCls}-input:focus-visible + ${radioInnerPrefixCls}`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.genFocusOutline)(token)),
[`${componentCls}:hover::after, ${componentCls}-wrapper:hover &::after`]: {
visibility: 'visible'
},
[`${componentCls}-inner`]: {
'&::after': {
boxSizing: 'border-box',
position: 'absolute',
insetBlockStart: '50%',
insetInlineStart: '50%',
display: 'block',
width: radioSizeCalc,
height: radioSizeCalc,
marginBlockStart: calc(1).mul(radioSize).div(-2).equal({
unit: true
}),
marginInlineStart: calc(1).mul(radioSize).div(-2).equal({
unit: true
}),
backgroundColor: radioColor,
borderBlockStart: 0,
borderInlineStart: 0,
borderRadius: radioSizeCalc,
transform: 'scale(0)',
opacity: 0,
transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`,
content: '""'
},
boxSizing: 'border-box',
position: 'relative',
insetBlockStart: 0,
insetInlineStart: 0,
display: 'block',
width: radioSizeCalc,
height: radioSizeCalc,
backgroundColor: colorBgContainer,
borderColor: colorBorder,
borderStyle: 'solid',
borderWidth: lineWidth,
borderRadius: '50%',
transition: `all ${motionDurationMid}`
},
[`${componentCls}-input`]: {
position: 'absolute',
inset: 0,
zIndex: 1,
cursor: 'pointer',
opacity: 0
},
// 选中状态
[`${componentCls}-checked`]: {
[radioInnerPrefixCls]: {
borderColor: colorPrimary,
backgroundColor: radioBgColor,
'&::after': {
transform: `scale(${token.calc(token.dotSize).div(radioSize).equal()})`,
opacity: 1,
transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`
}
}
},
[`${componentCls}-disabled`]: {
cursor: 'not-allowed',
[radioInnerPrefixCls]: {
backgroundColor: colorBgContainerDisabled,
borderColor: colorBorder,
cursor: 'not-allowed',
'&::after': {
backgroundColor: dotColorDisabled
}
},
[`${componentCls}-input`]: {
cursor: 'not-allowed'
},
[`${componentCls}-disabled + span`]: {
color: colorTextDisabled,
cursor: 'not-allowed'
},
[`&${componentCls}-checked`]: {
[radioInnerPrefixCls]: {
'&::after': {
transform: `scale(${calc(radioDotDisabledSize).div(radioSize).equal()})`
}
}
}
},
[`span${componentCls} + *`]: {
paddingInlineStart: paddingXS,
paddingInlineEnd: paddingXS
}
})
};
};
// Styles from radio-button
const getRadioButtonStyle = token => {
const {
buttonColor,
controlHeight,
componentCls,
lineWidth,
lineType,
colorBorder,
motionDurationSlow,
motionDurationMid,
buttonPaddingInline,
fontSize,
buttonBg,
fontSizeLG,
controlHeightLG,
controlHeightSM,
paddingXS,
borderRadius,
borderRadiusSM,
borderRadiusLG,
buttonCheckedBg,
buttonSolidCheckedColor,
colorTextDisabled,
colorBgContainerDisabled,
buttonCheckedBgDisabled,
buttonCheckedColorDisabled,
colorPrimary,
colorPrimaryHover,
colorPrimaryActive,
buttonSolidCheckedBg,
buttonSolidCheckedHoverBg,
buttonSolidCheckedActiveBg,
calc
} = token;
return {
[`${componentCls}-button-wrapper`]: {
position: 'relative',
display: 'inline-block',
height: controlHeight,
margin: 0,
paddingInline: buttonPaddingInline,
paddingBlock: 0,
color: buttonColor,
fontSize,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(controlHeight).sub(calc(lineWidth).mul(2)).equal()),
background: buttonBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorBorder}`,
// strange align fix for chrome but works
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
borderBlockStartWidth: calc(lineWidth).add(0.02).equal(),
borderInlineStartWidth: 0,
borderInlineEndWidth: lineWidth,
cursor: 'pointer',
transition: [`color ${motionDurationMid}`, `background ${motionDurationMid}`, `box-shadow ${motionDurationMid}`].join(','),
a: {
color: buttonColor
},
[`> ${componentCls}-button`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
zIndex: -1,
width: '100%',
height: '100%'
},
'&:not(:first-child)': {
'&::before': {
position: 'absolute',
insetBlockStart: calc(lineWidth).mul(-1).equal(),
insetInlineStart: calc(lineWidth).mul(-1).equal(),
display: 'block',
boxSizing: 'content-box',
width: 1,
height: '100%',
paddingBlock: lineWidth,
paddingInline: 0,
backgroundColor: colorBorder,
transition: `background-color ${motionDurationSlow}`,
content: '""'
}
},
'&:first-child': {
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(lineWidth)} ${lineType} ${colorBorder}`,
borderStartStartRadius: borderRadius,
borderEndStartRadius: borderRadius
},
'&:last-child': {
borderStartEndRadius: borderRadius,
borderEndEndRadius: borderRadius
},
'&:first-child:last-child': {
borderRadius
},
[`${componentCls}-group-large &`]: {
height: controlHeightLG,
fontSize: fontSizeLG,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal()),
'&:first-child': {
borderStartStartRadius: borderRadiusLG,
borderEndStartRadius: borderRadiusLG
},
'&:last-child': {
borderStartEndRadius: borderRadiusLG,
borderEndEndRadius: borderRadiusLG
}
},
[`${componentCls}-group-small &`]: {
height: controlHeightSM,
paddingInline: calc(paddingXS).sub(lineWidth).equal(),
paddingBlock: 0,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal()),
'&:first-child': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM
},
'&:last-child': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM
}
},
'&:hover': {
position: 'relative',
color: colorPrimary
},
'&:has(:focus-visible)': Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.genFocusOutline)(token)),
[`${componentCls}-inner, input[type='checkbox'], input[type='radio']`]: {
width: 0,
height: 0,
opacity: 0,
pointerEvents: 'none'
},
[`&-checked:not(${componentCls}-button-wrapper-disabled)`]: {
zIndex: 1,
color: colorPrimary,
background: buttonCheckedBg,
borderColor: colorPrimary,
'&::before': {
backgroundColor: colorPrimary
},
'&:first-child': {
borderColor: colorPrimary
},
'&:hover': {
color: colorPrimaryHover,
borderColor: colorPrimaryHover,
'&::before': {
backgroundColor: colorPrimaryHover
}
},
'&:active': {
color: colorPrimaryActive,
borderColor: colorPrimaryActive,
'&::before': {
backgroundColor: colorPrimaryActive
}
}
},
[`${componentCls}-group-solid &-checked:not(${componentCls}-button-wrapper-disabled)`]: {
color: buttonSolidCheckedColor,
background: buttonSolidCheckedBg,
borderColor: buttonSolidCheckedBg,
'&:hover': {
color: buttonSolidCheckedColor,
background: buttonSolidCheckedHoverBg,
borderColor: buttonSolidCheckedHoverBg
},
'&:active': {
color: buttonSolidCheckedColor,
background: buttonSolidCheckedActiveBg,
borderColor: buttonSolidCheckedActiveBg
}
},
'&-disabled': {
color: colorTextDisabled,
backgroundColor: colorBgContainerDisabled,
borderColor: colorBorder,
cursor: 'not-allowed',
'&:first-child, &:hover': {
color: colorTextDisabled,
backgroundColor: colorBgContainerDisabled,
borderColor: colorBorder
}
},
[`&-disabled${componentCls}-button-wrapper-checked`]: {
color: buttonCheckedColorDisabled,
backgroundColor: buttonCheckedBgDisabled,
borderColor: colorBorder,
boxShadow: 'none'
},
'&-block': {
flex: 1,
textAlign: 'center'
}
}
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
wireframe,
padding,
marginXS,
lineWidth,
fontSizeLG,
colorText,
colorBgContainer,
colorTextDisabled,
controlItemBgActiveDisabled,
colorTextLightSolid,
colorPrimary,
colorPrimaryHover,
colorPrimaryActive,
colorWhite
} = token;
const dotPadding = 4; // Fixed value
const radioSize = fontSizeLG;
const radioDotSize = wireframe ? radioSize - dotPadding * 2 : radioSize - (dotPadding + lineWidth) * 2;
return {
// Radio
radioSize,
dotSize: radioDotSize,
dotColorDisabled: colorTextDisabled,
// Radio buttons
buttonSolidCheckedColor: colorTextLightSolid,
buttonSolidCheckedBg: colorPrimary,
buttonSolidCheckedHoverBg: colorPrimaryHover,
buttonSolidCheckedActiveBg: colorPrimaryActive,
buttonBg: colorBgContainer,
buttonCheckedBg: colorBgContainer,
buttonColor: colorText,
buttonCheckedBgDisabled: controlItemBgActiveDisabled,
buttonCheckedColorDisabled: colorTextDisabled,
buttonPaddingInline: padding - lineWidth,
wrapperMarginInlineEnd: marginXS,
// internal
radioColor: wireframe ? colorPrimary : colorWhite,
radioBgColor: wireframe ? colorBgContainer : colorPrimary
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Radio', token => {
const {
controlOutline,
controlOutlineWidth
} = token;
const radioFocusShadow = `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(controlOutlineWidth)} ${controlOutline}`;
const radioButtonFocusShadow = radioFocusShadow;
const radioToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
radioFocusShadow,
radioButtonFocusShadow
});
return [getGroupRadioStyle(radioToken), getRadioBasicStyle(radioToken), getRadioButtonStyle(radioToken)];
}, prepareComponentToken, {
unitless: {
radioSize: true,
dotSize: true
}
}));
/***/ }),
/***/ "./components/rate/style/index.ts":
/*!****************************************!*\
!*** ./components/rate/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genRateStarStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-star`]: {
position: 'relative',
display: 'inline-block',
color: 'inherit',
cursor: 'pointer',
'&:not(:last-child)': {
marginInlineEnd: token.marginXS
},
'> div': {
transition: `all ${token.motionDurationMid}, outline 0s`,
'&:hover': {
transform: token.starHoverScale
},
'&:focus': {
outline: 0
},
'&:focus-visible': {
outline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} dashed ${token.starColor}`,
transform: token.starHoverScale
}
},
'&-first, &-second': {
color: token.starBg,
transition: `all ${token.motionDurationMid}`,
userSelect: 'none'
},
'&-first': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: '50%',
height: '100%',
overflow: 'hidden',
opacity: 0
},
[`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {
opacity: 1
},
[`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {
color: 'inherit'
}
}
};
};
const genRateRtlStyle = token => ({
[`&-rtl${token.componentCls}`]: {
direction: 'rtl'
}
});
const genRateStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
display: 'inline-block',
margin: 0,
padding: 0,
color: token.starColor,
fontSize: token.starSize,
lineHeight: 1,
listStyle: 'none',
outline: 'none',
// disable styles
[`&-disabled${componentCls} ${componentCls}-star`]: {
cursor: 'default',
'> div:hover': {
transform: 'scale(1)'
}
}
}), genRateStarStyle(token)), genRateRtlStyle(token))
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
starColor: token.yellow6,
starSize: token.controlHeightLG * 0.5,
starHoverScale: 'scale(1.1)',
starBg: token.colorFillContent
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Rate', token => {
const rateToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {});
return [genRateStyle(rateToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/result/style/index.ts":
/*!******************************************!*\
!*** ./components/result/style/index.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Styles ==============================
const genBaseStyle = token => {
const {
componentCls,
lineHeightHeading3,
iconCls,
padding,
paddingXL,
paddingXS,
paddingLG,
marginXS,
lineHeight
} = token;
return {
// Result
[componentCls]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(paddingLG).mul(2).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXL)}`,
// RTL
'&-rtl': {
direction: 'rtl'
}
},
// Exception Status image
[`${componentCls} ${componentCls}-image`]: {
width: token.imageWidth,
height: token.imageHeight,
margin: 'auto'
},
[`${componentCls} ${componentCls}-icon`]: {
marginBottom: paddingLG,
textAlign: 'center',
[`& > ${iconCls}`]: {
fontSize: token.iconFontSize
}
},
[`${componentCls} ${componentCls}-title`]: {
color: token.colorTextHeading,
fontSize: token.titleFontSize,
lineHeight: lineHeightHeading3,
marginBlock: marginXS,
textAlign: 'center'
},
[`${componentCls} ${componentCls}-subtitle`]: {
color: token.colorTextDescription,
fontSize: token.subtitleFontSize,
lineHeight,
textAlign: 'center'
},
[`${componentCls} ${componentCls}-content`]: {
marginTop: paddingLG,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(padding).mul(2.5).equal())}`,
backgroundColor: token.colorFillAlter
},
[`${componentCls} ${componentCls}-extra`]: {
margin: token.extraMargin,
textAlign: 'center',
'& > *': {
marginInlineEnd: paddingXS,
'&:last-child': {
marginInlineEnd: 0
}
}
}
};
};
const genStatusIconStyle = token => {
const {
componentCls,
iconCls
} = token;
return {
[`${componentCls}-success ${componentCls}-icon > ${iconCls}`]: {
color: token.resultSuccessIconColor
},
[`${componentCls}-error ${componentCls}-icon > ${iconCls}`]: {
color: token.resultErrorIconColor
},
[`${componentCls}-info ${componentCls}-icon > ${iconCls}`]: {
color: token.resultInfoIconColor
},
[`${componentCls}-warning ${componentCls}-icon > ${iconCls}`]: {
color: token.resultWarningIconColor
}
};
};
const genResultStyle = token => [genBaseStyle(token), genStatusIconStyle(token)];
const getStyle = token => genResultStyle(token);
// ============================== Export ==============================
const prepareComponentToken = token => ({
titleFontSize: token.fontSizeHeading3,
subtitleFontSize: token.fontSize,
iconFontSize: token.fontSizeHeading3 * 3,
extraMargin: `${token.paddingLG}px 0 0 0`
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Result', token => {
const resultInfoIconColor = token.colorInfo;
const resultErrorIconColor = token.colorError;
const resultSuccessIconColor = token.colorSuccess;
const resultWarningIconColor = token.colorWarning;
const resultToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
resultInfoIconColor,
resultErrorIconColor,
resultSuccessIconColor,
resultWarningIconColor,
imageWidth: 250,
imageHeight: 295
});
return [getStyle(resultToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/segmented/style/index.ts":
/*!*********************************************!*\
!*** ./components/segmented/style/index.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// ============================== Mixins ==============================
function getItemDisabledStyle(cls, token) {
return {
[`${cls}, ${cls}:hover, ${cls}:focus`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed'
}
};
}
function getItemSelectedStyle(token) {
return {
backgroundColor: token.itemSelectedBg,
boxShadow: token.boxShadowTertiary
};
}
const segmentedTextEllipsisCss = Object.assign({
overflow: 'hidden'
}, _style__WEBPACK_IMPORTED_MODULE_0__.textEllipsis);
// ============================== Styles ==============================
const genSegmentedStyle = token => {
const {
componentCls
} = token;
const labelHeight = token.calc(token.controlHeight).sub(token.calc(token.trackPadding).mul(2)).equal();
const labelHeightLG = token.calc(token.controlHeightLG).sub(token.calc(token.trackPadding).mul(2)).equal();
const labelHeightSM = token.calc(token.controlHeightSM).sub(token.calc(token.trackPadding).mul(2)).equal();
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
display: 'inline-block',
padding: token.trackPadding,
color: token.itemColor,
background: token.trackBg,
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`
}), (0,_style__WEBPACK_IMPORTED_MODULE_0__.genFocusStyle)(token)), {
[`${componentCls}-group`]: {
position: 'relative',
display: 'flex',
alignItems: 'stretch',
justifyItems: 'flex-start',
flexDirection: 'row',
width: '100%'
},
// RTL styles
[`&${componentCls}-rtl`]: {
direction: 'rtl'
},
[`&${componentCls}-vertical`]: {
[`${componentCls}-group`]: {
flexDirection: 'column'
},
[`${componentCls}-thumb`]: {
width: '100%',
height: 0,
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingXXS)}`
}
},
// block styles
[`&${componentCls}-block`]: {
display: 'flex'
},
[`&${componentCls}-block ${componentCls}-item`]: {
flex: 1,
minWidth: 0
},
// item styles
[`${componentCls}-item`]: {
position: 'relative',
textAlign: 'center',
cursor: 'pointer',
transition: `color ${token.motionDurationMid} ${token.motionEaseInOut}`,
borderRadius: token.borderRadiusSM,
// Fix Safari render bug
// https://github.com/ant-design/ant-design/issues/45250
transform: 'translateZ(0)',
'&-selected': Object.assign(Object.assign({}, getItemSelectedStyle(token)), {
color: token.itemSelectedColor
}),
'&-focused': Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.genFocusOutline)(token)),
'&::after': {
content: '""',
position: 'absolute',
zIndex: -1,
width: '100%',
height: '100%',
top: 0,
insetInlineStart: 0,
borderRadius: 'inherit',
opacity: 0,
transition: `opacity ${token.motionDurationMid}`,
// This is mandatory to make it not clickable or hoverable
// Ref: https://github.com/ant-design/ant-design/issues/40888
pointerEvents: 'none'
},
[`&:hover:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
color: token.itemHoverColor,
'&::after': {
opacity: 1,
backgroundColor: token.itemHoverBg
}
},
[`&:active:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
color: token.itemHoverColor,
'&::after': {
opacity: 1,
backgroundColor: token.itemActiveBg
}
},
'&-label': Object.assign({
minHeight: labelHeight,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(labelHeight),
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.segmentedPaddingHorizontal)}`
}, segmentedTextEllipsisCss),
// syntactic sugar to add `icon` for Segmented Item
'&-icon + *': {
marginInlineStart: token.calc(token.marginSM).div(2).equal()
},
'&-input': {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
width: 0,
height: 0,
opacity: 0,
pointerEvents: 'none'
}
},
// thumb styles
[`${componentCls}-thumb`]: Object.assign(Object.assign({}, getItemSelectedStyle(token)), {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
width: 0,
height: '100%',
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingXXS)} 0`,
borderRadius: token.borderRadiusSM,
transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOut}, height ${token.motionDurationSlow} ${token.motionEaseInOut}`,
[`& ~ ${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)::after`]: {
backgroundColor: 'transparent'
}
}),
// size styles
[`&${componentCls}-lg`]: {
borderRadius: token.borderRadiusLG,
[`${componentCls}-item-label`]: {
minHeight: labelHeightLG,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(labelHeightLG),
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.segmentedPaddingHorizontal)}`,
fontSize: token.fontSizeLG
},
[`${componentCls}-item, ${componentCls}-thumb`]: {
borderRadius: token.borderRadius
}
},
[`&${componentCls}-sm`]: {
borderRadius: token.borderRadiusSM,
[`${componentCls}-item-label`]: {
minHeight: labelHeightSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(labelHeightSM),
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.segmentedPaddingHorizontalSM)}`
},
[`${componentCls}-item, ${componentCls}-thumb`]: {
borderRadius: token.borderRadiusXS
}
}
}), getItemDisabledStyle(`&-disabled ${componentCls}-item`, token)), getItemDisabledStyle(`${componentCls}-item-disabled`, token)), {
// transition effect when `appear-active`
[`${componentCls}-thumb-motion-appear-active`]: {
transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOut}, width ${token.motionDurationSlow} ${token.motionEaseInOut}`,
willChange: 'transform, width'
},
[`&${componentCls}-shape-round`]: {
borderRadius: 9999,
[`${componentCls}-item, ${componentCls}-thumb`]: {
borderRadius: 9999
}
}
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
colorTextLabel,
colorText,
colorFillSecondary,
colorBgElevated,
colorFill,
lineWidthBold,
colorBgLayout
} = token;
return {
trackPadding: lineWidthBold,
trackBg: colorBgLayout,
itemColor: colorTextLabel,
itemHoverColor: colorText,
itemHoverBg: colorFillSecondary,
itemSelectedBg: colorBgElevated,
itemActiveBg: colorFill,
itemSelectedColor: colorText
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Segmented', token => {
const {
lineWidth,
calc
} = token;
const segmentedToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
segmentedPaddingHorizontal: calc(token.controlPaddingHorizontal).sub(lineWidth).equal(),
segmentedPaddingHorizontalSM: calc(token.controlPaddingHorizontalSM).sub(lineWidth).equal()
});
return [genSegmentedStyle(segmentedToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/select/style/index.ts":
/*!******************************************************!*\
!*** ./components/select/style/index.ts + 4 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ select_style; }
});
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/compact-item.ts
var compact_item = __webpack_require__("./components/style/compact-item.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/style/motion/slide.ts
var slide = __webpack_require__("./components/style/motion/slide.ts");
// EXTERNAL MODULE: ./components/style/motion/move.ts
var move = __webpack_require__("./components/style/motion/move.ts");
;// ./components/select/style/dropdown.ts
const genItemStyle = token => {
const {
optionHeight,
optionFontSize,
optionLineHeight,
optionPadding
} = token;
return {
position: 'relative',
display: 'block',
minHeight: optionHeight,
padding: optionPadding,
color: token.colorText,
fontWeight: 'normal',
fontSize: optionFontSize,
lineHeight: optionLineHeight,
boxSizing: 'border-box'
};
};
const genSingleStyle = token => {
const {
antCls,
componentCls
} = token;
const selectItemCls = `${componentCls}-item`;
const slideUpEnterActive = `&${antCls}-slide-up-enter${antCls}-slide-up-enter-active`;
const slideUpAppearActive = `&${antCls}-slide-up-appear${antCls}-slide-up-appear-active`;
const slideUpLeaveActive = `&${antCls}-slide-up-leave${antCls}-slide-up-leave-active`;
const dropdownPlacementCls = `${componentCls}-dropdown-placement-`;
const selectedItemCls = `${selectItemCls}-option-selected`;
return [{
[`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
position: 'absolute',
top: -9999,
zIndex: token.zIndexPopup,
boxSizing: 'border-box',
padding: token.paddingXXS,
overflow: 'hidden',
fontSize: token.fontSize,
// Fix select render lag of long text in chrome
// https://github.com/ant-design/ant-design/issues/11456
// https://github.com/ant-design/ant-design/issues/11843
fontVariant: 'initial',
backgroundColor: token.colorBgElevated,
borderRadius: token.borderRadiusLG,
outline: 'none',
boxShadow: token.boxShadowSecondary,
[`
${slideUpEnterActive}${dropdownPlacementCls}bottomLeft,
${slideUpAppearActive}${dropdownPlacementCls}bottomLeft
`]: {
animationName: slide.slideUpIn
},
[`
${slideUpEnterActive}${dropdownPlacementCls}topLeft,
${slideUpAppearActive}${dropdownPlacementCls}topLeft,
${slideUpEnterActive}${dropdownPlacementCls}topRight,
${slideUpAppearActive}${dropdownPlacementCls}topRight
`]: {
animationName: slide.slideDownIn
},
[`${slideUpLeaveActive}${dropdownPlacementCls}bottomLeft`]: {
animationName: slide.slideUpOut
},
[`
${slideUpLeaveActive}${dropdownPlacementCls}topLeft,
${slideUpLeaveActive}${dropdownPlacementCls}topRight
`]: {
animationName: slide.slideDownOut
},
'&-hidden': {
display: 'none'
},
[selectItemCls]: Object.assign(Object.assign({}, genItemStyle(token)), {
cursor: 'pointer',
transition: `background ${token.motionDurationSlow} ease`,
borderRadius: token.borderRadiusSM,
// =========== Group ============
'&-group': {
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
cursor: 'default'
},
// =========== Option ===========
'&-option': {
display: 'flex',
'&-content': Object.assign({
flex: 'auto'
}, style.textEllipsis),
'&-state': {
flex: 'none',
display: 'flex',
alignItems: 'center'
},
[`&-active:not(${selectItemCls}-option-disabled)`]: {
backgroundColor: token.optionActiveBg
},
[`&-selected:not(${selectItemCls}-option-disabled)`]: {
color: token.optionSelectedColor,
fontWeight: token.optionSelectedFontWeight,
backgroundColor: token.optionSelectedBg,
[`${selectItemCls}-option-state`]: {
color: token.colorPrimary
}
},
'&-disabled': {
[`&${selectItemCls}-option-selected`]: {
backgroundColor: token.colorBgContainerDisabled
},
color: token.colorTextDisabled,
cursor: 'not-allowed'
},
'&-grouped': {
paddingInlineStart: token.calc(token.controlPaddingHorizontal).mul(2).equal()
}
},
'&-empty': Object.assign(Object.assign({}, genItemStyle(token)), {
color: token.colorTextDisabled
})
}),
// https://github.com/ant-design/ant-design/pull/46646
[`${selectedItemCls}:has(+ ${selectedItemCls})`]: {
borderEndStartRadius: 0,
borderEndEndRadius: 0,
[`& + ${selectedItemCls}`]: {
borderStartStartRadius: 0,
borderStartEndRadius: 0
}
},
// =========================== RTL ===========================
'&-rtl': {
direction: 'rtl'
}
})
},
// Follow code may reuse in other components
(0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down'), (0,move.initMoveMotion)(token, 'move-up'), (0,move.initMoveMotion)(token, 'move-down')];
};
/* harmony default export */ var dropdown = (genSingleStyle);
// EXTERNAL MODULE: ./components/select/style/multiple.ts
var multiple = __webpack_require__("./components/select/style/multiple.ts");
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
;// ./components/select/style/single.ts
function genSizeStyle(token, suffix) {
const {
componentCls,
inputPaddingHorizontalBase,
borderRadius
} = token;
const selectHeightWithoutBorder = token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal();
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
return {
[`${componentCls}-single${suffixCls}`]: {
fontSize: token.fontSize,
height: token.controlHeight,
// ========================= Selector =========================
[`${componentCls}-selector`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token, true)), {
display: 'flex',
borderRadius,
flex: '1 1 auto',
[`${componentCls}-selection-wrap:after`]: {
lineHeight: (0,cssinjs.unit)(selectHeightWithoutBorder)
},
[`${componentCls}-selection-search`]: {
position: 'absolute',
inset: 0,
width: '100%',
'&-input': {
width: '100%',
WebkitAppearance: 'textfield'
}
},
[`
${componentCls}-selection-item,
${componentCls}-selection-placeholder
`]: {
display: 'block',
padding: 0,
lineHeight: (0,cssinjs.unit)(selectHeightWithoutBorder),
transition: `all ${token.motionDurationSlow}, visibility 0s`,
alignSelf: 'center'
},
[`${componentCls}-selection-placeholder`]: {
transition: 'none',
pointerEvents: 'none'
},
// For common baseline align
[['&:after', /* For '' value baseline align */
`${componentCls}-selection-item:empty:after`, /* For undefined value baseline align */
`${componentCls}-selection-placeholder:empty:after`].join(',')]: {
display: 'inline-block',
width: 0,
visibility: 'hidden',
content: '"\\a0"'
}
}),
[`
&${componentCls}-show-arrow ${componentCls}-selection-item,
&${componentCls}-show-arrow ${componentCls}-selection-search,
&${componentCls}-show-arrow ${componentCls}-selection-placeholder
`]: {
paddingInlineEnd: token.showArrowPaddingInlineEnd
},
// Opacity selection if open
[`&${componentCls}-open ${componentCls}-selection-item`]: {
color: token.colorTextPlaceholder
},
// ========================== Input ==========================
// We only change the style of non-customize input which is only support by `combobox` mode.
// Not customize
[`&:not(${componentCls}-customize-input)`]: {
[`${componentCls}-selector`]: {
width: '100%',
height: '100%',
alignItems: 'center',
padding: `0 ${(0,cssinjs.unit)(inputPaddingHorizontalBase)}`,
[`${componentCls}-selection-search-input`]: {
height: selectHeightWithoutBorder,
fontSize: token.fontSize
},
'&:after': {
lineHeight: (0,cssinjs.unit)(selectHeightWithoutBorder)
}
}
},
[`&${componentCls}-customize-input`]: {
[`${componentCls}-selector`]: {
'&:after': {
display: 'none'
},
[`${componentCls}-selection-search`]: {
position: 'static',
width: '100%'
},
[`${componentCls}-selection-placeholder`]: {
position: 'absolute',
insetInlineStart: 0,
insetInlineEnd: 0,
padding: `0 ${(0,cssinjs.unit)(inputPaddingHorizontalBase)}`,
'&:after': {
display: 'none'
}
}
}
}
}
};
}
function single_genSingleStyle(token) {
const {
componentCls
} = token;
const inputPaddingHorizontalSM = token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal();
return [genSizeStyle(token),
// ======================== Small ========================
// Shared
genSizeStyle((0,es.mergeToken)(token, {
controlHeight: token.controlHeightSM,
borderRadius: token.borderRadiusSM
}), 'sm'),
// padding
{
[`${componentCls}-single${componentCls}-sm`]: {
[`&:not(${componentCls}-customize-input)`]: {
[`${componentCls}-selector`]: {
padding: `0 ${(0,cssinjs.unit)(inputPaddingHorizontalSM)}`
},
// With arrow should provides `padding-right` to show the arrow
[`&${componentCls}-show-arrow ${componentCls}-selection-search`]: {
insetInlineEnd: token.calc(inputPaddingHorizontalSM).add(token.calc(token.fontSize).mul(1.5)).equal()
},
[`
&${componentCls}-show-arrow ${componentCls}-selection-item,
&${componentCls}-show-arrow ${componentCls}-selection-placeholder
`]: {
paddingInlineEnd: token.calc(token.fontSize).mul(1.5).equal()
}
}
}
},
// ======================== Large ========================
// Shared
genSizeStyle((0,es.mergeToken)(token, {
controlHeight: token.singleItemHeightLG,
fontSize: token.fontSizeLG,
borderRadius: token.borderRadiusLG
}), 'lg')];
}
;// ./components/select/style/token.ts
const prepareComponentToken = token => {
const {
fontSize,
lineHeight,
lineWidth,
controlHeight,
controlHeightSM,
controlHeightLG,
paddingXXS,
controlPaddingHorizontal,
zIndexPopupBase,
colorText,
fontWeightStrong,
controlItemBgActive,
controlItemBgHover,
colorBgContainer,
colorFillSecondary,
colorBgContainerDisabled,
colorTextDisabled,
colorPrimaryHover,
colorPrimary,
controlOutline
} = token;
// Item height default use `controlHeight - 2 * paddingXXS`,
// but some case `paddingXXS=0`.
// Let's fallback it.
const dblPaddingXXS = paddingXXS * 2;
const dblLineWidth = lineWidth * 2;
const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);
const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);
const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);
// FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding
const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);
return {
INTERNAL_FIXED_ITEM_MARGIN,
zIndexPopup: zIndexPopupBase + 50,
optionSelectedColor: colorText,
optionSelectedFontWeight: fontWeightStrong,
optionSelectedBg: controlItemBgActive,
optionActiveBg: controlItemBgHover,
optionPadding: `${(controlHeight - fontSize * lineHeight) / 2}px ${controlPaddingHorizontal}px`,
optionFontSize: fontSize,
optionLineHeight: lineHeight,
optionHeight: controlHeight,
selectorBg: colorBgContainer,
clearBg: colorBgContainer,
singleItemHeightLG: controlHeightLG,
multipleItemBg: colorFillSecondary,
multipleItemBorderColor: 'transparent',
multipleItemHeight,
multipleItemHeightSM,
multipleItemHeightLG,
multipleSelectorBgDisabled: colorBgContainerDisabled,
multipleItemColorDisabled: colorTextDisabled,
multipleItemBorderColorDisabled: 'transparent',
showArrowPaddingInlineEnd: Math.ceil(token.fontSize * 1.25),
hoverBorderColor: colorPrimaryHover,
activeBorderColor: colorPrimary,
activeOutlineColor: controlOutline,
selectAffixPadding: paddingXXS
};
};
;// ./components/select/style/variants.ts
// =====================================================
// == Outlined ==
// =====================================================
const genBaseOutlinedStyle = (token, options) => {
const {
componentCls,
antCls,
controlOutlineWidth
} = token;
return {
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${options.borderColor}`,
background: token.selectorBg
},
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`&:hover ${componentCls}-selector`]: {
borderColor: options.hoverBorderHover
},
[`${componentCls}-focused& ${componentCls}-selector`]: {
borderColor: options.activeBorderColor,
boxShadow: `0 0 0 ${(0,cssinjs.unit)(controlOutlineWidth)} ${options.activeOutlineColor}`,
outline: 0
},
[`${componentCls}-prefix`]: {
color: options.color
}
}
};
};
const genOutlinedStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseOutlinedStyle(token, options))
});
const genOutlinedStyle = token => ({
'&-outlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {
borderColor: token.colorBorder,
hoverBorderHover: token.hoverBorderColor,
activeBorderColor: token.activeBorderColor,
activeOutlineColor: token.activeOutlineColor,
color: token.colorText
})), genOutlinedStatusStyle(token, {
status: 'error',
borderColor: token.colorError,
hoverBorderHover: token.colorErrorHover,
activeBorderColor: token.colorError,
activeOutlineColor: token.colorErrorOutline,
color: token.colorError
})), genOutlinedStatusStyle(token, {
status: 'warning',
borderColor: token.colorWarning,
hoverBorderHover: token.colorWarningHover,
activeBorderColor: token.colorWarning,
activeOutlineColor: token.colorWarningOutline,
color: token.colorWarning
})), {
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
background: token.colorBgContainerDisabled,
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
})
});
// =====================================================
// == Filled ==
// =====================================================
const genBaseFilledStyle = (token, options) => {
const {
componentCls,
antCls
} = token;
return {
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
background: options.bg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
color: options.color
},
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`&:hover ${componentCls}-selector`]: {
background: options.hoverBg
},
[`${componentCls}-focused& ${componentCls}-selector`]: {
background: token.selectorBg,
borderColor: options.activeBorderColor,
outline: 0
}
}
};
};
const genFilledStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseFilledStyle(token, options))
});
const genFilledStyle = token => ({
'&-filled': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {
bg: token.colorFillTertiary,
hoverBg: token.colorFillSecondary,
activeBorderColor: token.activeBorderColor,
color: token.colorText
})), genFilledStatusStyle(token, {
status: 'error',
bg: token.colorErrorBg,
hoverBg: token.colorErrorBgHover,
activeBorderColor: token.colorError,
color: token.colorError
})), genFilledStatusStyle(token, {
status: 'warning',
bg: token.colorWarningBg,
hoverBg: token.colorWarningBgHover,
activeBorderColor: token.colorWarning,
color: token.colorWarning
})), {
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
borderColor: token.colorBorder,
background: token.colorBgContainerDisabled,
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.colorBgContainer,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
})
});
// =====================================================
// == Borderless ==
// =====================================================
const genBorderlessStyle = token => ({
'&-borderless': {
[`${token.componentCls}-selector`]: {
background: 'transparent',
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`
},
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
},
// Status
[`&${token.componentCls}-status-error`]: {
[`${token.componentCls}-prefix, ${token.componentCls}-selection-item`]: {
color: token.colorError
}
},
[`&${token.componentCls}-status-warning`]: {
[`${token.componentCls}-prefix, ${token.componentCls}-selection-item`]: {
color: token.colorWarning
}
}
}
});
// =====================================================
// == Underlined ==
// =====================================================
const genBaseUnderlinedStyle = (token, options) => {
const {
componentCls,
antCls
} = token;
return {
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
borderWidth: `0 0 ${(0,cssinjs.unit)(token.lineWidth)} 0`,
borderStyle: `none none ${token.lineType} none`,
borderColor: options.borderColor,
background: token.selectorBg,
borderRadius: 0
},
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`&:hover ${componentCls}-selector`]: {
borderColor: options.hoverBorderHover
},
[`${componentCls}-focused& ${componentCls}-selector`]: {
borderColor: options.activeBorderColor,
outline: 0
},
[`${componentCls}-prefix`]: {
color: options.color
}
}
};
};
const genUnderlinedStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseUnderlinedStyle(token, options))
});
const genUnderlinedStyle = token => ({
'&-underlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, {
borderColor: token.colorBorder,
hoverBorderHover: token.hoverBorderColor,
activeBorderColor: token.activeBorderColor,
activeOutlineColor: token.activeOutlineColor,
color: token.colorText
})), genUnderlinedStatusStyle(token, {
status: 'error',
borderColor: token.colorError,
hoverBorderHover: token.colorErrorHover,
activeBorderColor: token.colorError,
activeOutlineColor: token.colorErrorOutline,
color: token.colorError
})), genUnderlinedStatusStyle(token, {
status: 'warning',
borderColor: token.colorWarning,
hoverBorderHover: token.colorWarningHover,
activeBorderColor: token.colorWarning,
activeOutlineColor: token.colorWarningOutline,
color: token.colorWarning
})), {
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
})
});
const genVariantsStyle = token => ({
[token.componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedStyle(token)), genFilledStyle(token)), genBorderlessStyle(token)), genUnderlinedStyle(token))
});
/* harmony default export */ var variants = (genVariantsStyle);
;// ./components/select/style/index.ts
// ============================= Selector =============================
const genSelectorStyle = token => {
const {
componentCls
} = token;
return {
position: 'relative',
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
input: {
cursor: 'pointer'
},
[`${componentCls}-show-search&`]: {
cursor: 'text',
input: {
cursor: 'auto',
color: 'inherit',
height: '100%'
}
},
[`${componentCls}-disabled&`]: {
cursor: 'not-allowed',
input: {
cursor: 'not-allowed'
}
}
};
};
// ============================== Styles ==============================
// /* Reset search input style */
const getSearchInputWithoutBorderStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-selection-search-input`]: {
margin: 0,
padding: 0,
background: 'transparent',
border: 'none',
outline: 'none',
appearance: 'none',
fontFamily: 'inherit',
'&::-webkit-search-cancel-button': {
display: 'none',
'-webkit-appearance': 'none'
}
}
};
};
// =============================== Base ===============================
const genBaseStyle = token => {
const {
antCls,
componentCls,
inputPaddingHorizontalBase,
iconCls
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
position: 'relative',
display: 'inline-flex',
cursor: 'pointer',
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: Object.assign(Object.assign({}, genSelectorStyle(token)), getSearchInputWithoutBorderStyle(token)),
// ======================== Selection ========================
[`${componentCls}-selection-item`]: Object.assign(Object.assign({
flex: 1,
fontWeight: 'normal',
position: 'relative',
userSelect: 'none'
}, style.textEllipsis), {
// https://github.com/ant-design/ant-design/issues/40421
[`> ${antCls}-typography`]: {
display: 'inline'
}
}),
// ======================= Placeholder =======================
[`${componentCls}-selection-placeholder`]: Object.assign(Object.assign({}, style.textEllipsis), {
flex: 1,
color: token.colorTextPlaceholder,
pointerEvents: 'none'
}),
// ========================== Arrow ==========================
[`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0,style.resetIcon)()), {
position: 'absolute',
top: '50%',
insetInlineStart: 'auto',
insetInlineEnd: inputPaddingHorizontalBase,
height: token.fontSizeIcon,
marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
lineHeight: 1,
textAlign: 'center',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
transition: `opacity ${token.motionDurationSlow} ease`,
[iconCls]: {
verticalAlign: 'top',
transition: `transform ${token.motionDurationSlow}`,
'> svg': {
verticalAlign: 'top'
},
[`&:not(${componentCls}-suffix)`]: {
pointerEvents: 'auto'
}
},
[`${componentCls}-disabled &`]: {
cursor: 'not-allowed'
},
'> *:not(:last-child)': {
marginInlineEnd: 8 // FIXME: magic
}
}),
// ========================== Wrap ===========================
[`${componentCls}-selection-wrap`]: {
display: 'flex',
width: '100%',
position: 'relative',
minWidth: 0,
// https://github.com/ant-design/ant-design/issues/51669
'&:after': {
content: '"\\a0"',
width: 0,
overflow: 'hidden'
}
},
// ========================= Prefix ==========================
[`${componentCls}-prefix`]: {
flex: 'none',
marginInlineEnd: token.selectAffixPadding
},
// ========================== Clear ==========================
[`${componentCls}-clear`]: {
position: 'absolute',
top: '50%',
insetInlineStart: 'auto',
insetInlineEnd: inputPaddingHorizontalBase,
zIndex: 1,
display: 'inline-block',
width: token.fontSizeIcon,
height: token.fontSizeIcon,
marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
fontStyle: 'normal',
lineHeight: 1,
textAlign: 'center',
textTransform: 'none',
cursor: 'pointer',
opacity: 0,
transition: `color ${token.motionDurationMid} ease, opacity ${token.motionDurationSlow} ease`,
textRendering: 'auto',
'&:before': {
display: 'block'
},
'&:hover': {
color: token.colorTextTertiary
}
},
[`&:hover ${componentCls}-clear`]: {
opacity: 1,
background: token.colorBgBase,
borderRadius: '50%'
}
}),
// ========================= Feedback ==========================
[`${componentCls}-status`]: {
'&-error, &-warning, &-success, &-validating': {
[`&${componentCls}-has-feedback`]: {
[`${componentCls}-clear`]: {
insetInlineEnd: token.calc(inputPaddingHorizontalBase).add(token.fontSize).add(token.paddingXS).equal()
}
}
}
}
};
};
// ============================== Styles ==============================
const genSelectStyle = token => {
const {
componentCls
} = token;
return [{
[componentCls]: {
// ==================== In Form ====================
[`&${componentCls}-in-form-item`]: {
width: '100%'
}
}
},
// =====================================================
// == LTR ==
// =====================================================
// Base
genBaseStyle(token),
// Single
single_genSingleStyle(token),
// Multiple
(0,multiple["default"])(token),
// Dropdown
dropdown(token),
// =====================================================
// == RTL ==
// =====================================================
{
[`${componentCls}-rtl`]: {
direction: 'rtl'
}
},
// =====================================================
// == Space Compact ==
// =====================================================
(0,compact_item.genCompactItemStyle)(token, {
borderElCls: `${componentCls}-selector`,
focusElCls: `${componentCls}-focused`
})];
};
// ============================== Export ==============================
/* harmony default export */ var select_style = ((0,genStyleUtils.genStyleHooks)('Select', (token, _ref) => {
let {
rootPrefixCls
} = _ref;
const selectToken = (0,es.mergeToken)(token, {
rootPrefixCls,
inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),
multipleSelectItemHeight: token.multipleItemHeight,
selectHeight: token.controlHeight
});
return [genSelectStyle(selectToken), variants(selectToken)];
}, prepareComponentToken, {
unitless: {
optionLineHeight: true,
optionSelectedFontWeight: true
}
}));
/***/ }),
/***/ "./components/select/style/multiple.ts":
/*!*********************************************!*\
!*** ./components/select/style/multiple.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genOverflowStyle: function() { return /* binding */ genOverflowStyle; },
/* harmony export */ getMultipleSelectorUnit: function() { return /* binding */ getMultipleSelectorUnit; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/**
* Get multiple selector needed style. The calculation:
*
* ContainerPadding = BasePadding - ItemMargin
*
* Border: ╔═══════════════════════════╗ ┬
* ContainerPadding: ║ ║ │
* ╟───────────────────────────╢ ┬ │
* Item Margin: ║ ║ │ │
* ║ ┌──────────┐ ║ │ │
* Item(multipleItemHeight): ║ BasePadding │ Item │ ║ Overflow Container(ControlHeight)
* ║ └──────────┘ ║ │ │
* Item Margin: ║ ║ │ │
* ╟───────────────────────────╢ ┴ │
* ContainerPadding: ║ ║ │
* Border: ╚═══════════════════════════╝ ┴
*/
const getMultipleSelectorUnit = token => {
const {
multipleSelectItemHeight,
paddingXXS,
lineWidth,
INTERNAL_FIXED_ITEM_MARGIN
} = token;
const basePadding = token.max(token.calc(paddingXXS).sub(lineWidth).equal(), 0);
const containerPadding = token.max(token.calc(basePadding).sub(INTERNAL_FIXED_ITEM_MARGIN).equal(), 0);
return {
basePadding,
containerPadding,
itemHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(multipleSelectItemHeight),
itemLineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(multipleSelectItemHeight).sub(token.calc(token.lineWidth).mul(2)).equal())
};
};
const getSelectItemStyle = token => {
const {
multipleSelectItemHeight,
selectHeight,
lineWidth
} = token;
const selectItemDist = token.calc(selectHeight).sub(multipleSelectItemHeight).div(2).sub(lineWidth).equal();
return selectItemDist;
};
/**
* Get the `rc-overflow` needed style.
* It's a share style which means not affected by `size`.
*/
const genOverflowStyle = token => {
const {
componentCls,
iconCls,
borderRadiusSM,
motionDurationSlow,
paddingXS,
multipleItemColorDisabled,
multipleItemBorderColorDisabled,
colorIcon,
colorIconHover,
INTERNAL_FIXED_ITEM_MARGIN
} = token;
const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
return {
/**
* Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
* may update to redesign with its align logic.
*/
// =========================== Overflow ===========================
[selectOverflowPrefixCls]: {
position: 'relative',
display: 'flex',
flex: 'auto',
flexWrap: 'wrap',
maxWidth: '100%',
'&-item': {
flex: 'none',
alignSelf: 'center',
maxWidth: '100%',
display: 'inline-flex'
},
// ======================== Selections ==========================
[`${componentCls}-selection-item`]: {
display: 'flex',
alignSelf: 'center',
flex: 'none',
boxSizing: 'border-box',
maxWidth: '100%',
marginBlock: INTERNAL_FIXED_ITEM_MARGIN,
borderRadius: borderRadiusSM,
cursor: 'default',
transition: `font-size ${motionDurationSlow}, line-height ${motionDurationSlow}, height ${motionDurationSlow}`,
marginInlineEnd: token.calc(INTERNAL_FIXED_ITEM_MARGIN).mul(2).equal(),
paddingInlineStart: paddingXS,
paddingInlineEnd: token.calc(paddingXS).div(2).equal(),
[`${componentCls}-disabled&`]: {
color: multipleItemColorDisabled,
borderColor: multipleItemBorderColorDisabled,
cursor: 'not-allowed'
},
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
'&-content': {
display: 'inline-block',
marginInlineEnd: token.calc(paddingXS).div(2).equal(),
overflow: 'hidden',
whiteSpace: 'pre',
// fix whitespace wrapping. custom tags display all whitespace within.
textOverflow: 'ellipsis'
},
'&-remove': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetIcon)()), {
display: 'inline-flex',
alignItems: 'center',
color: colorIcon,
fontWeight: 'bold',
fontSize: 10,
lineHeight: 'inherit',
cursor: 'pointer',
[`> ${iconCls}`]: {
verticalAlign: '-0.2em'
},
'&:hover': {
color: colorIconHover
}
})
}
}
};
};
const genSelectionStyle = (token, suffix) => {
const {
componentCls,
INTERNAL_FIXED_ITEM_MARGIN
} = token;
const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
const selectItemHeight = token.multipleSelectItemHeight;
const selectItemDist = getSelectItemStyle(token);
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
const multipleSelectorUnit = getMultipleSelectorUnit(token);
return {
[`${componentCls}-multiple${suffixCls}`]: Object.assign(Object.assign({}, genOverflowStyle(token)), {
// ========================= Selector =========================
[`${componentCls}-selector`]: {
display: 'flex',
alignItems: 'center',
width: '100%',
height: '100%',
// Multiple is little different that horizontal is follow the vertical
paddingInline: multipleSelectorUnit.basePadding,
paddingBlock: multipleSelectorUnit.containerPadding,
borderRadius: token.borderRadius,
[`${componentCls}-disabled&`]: {
background: token.multipleSelectorBgDisabled,
cursor: 'not-allowed'
},
'&:after': {
display: 'inline-block',
width: 0,
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(INTERNAL_FIXED_ITEM_MARGIN)} 0`,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(selectItemHeight),
visibility: 'hidden',
content: '"\\a0"'
}
},
// ======================== Selections ========================
[`${componentCls}-selection-item`]: {
height: multipleSelectorUnit.itemHeight,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(multipleSelectorUnit.itemLineHeight)
},
// ========================== Wrap ===========================
[`${componentCls}-selection-wrap`]: {
alignSelf: 'flex-start',
'&:after': {
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(selectItemHeight),
marginBlock: INTERNAL_FIXED_ITEM_MARGIN
}
},
// ========================== Input ==========================
[`${componentCls}-prefix`]: {
marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(multipleSelectorUnit.basePadding).equal()
},
[`${selectOverflowPrefixCls}-item + ${selectOverflowPrefixCls}-item,
${componentCls}-prefix + ${componentCls}-selection-wrap
`]: {
[`${componentCls}-selection-search`]: {
marginInlineStart: 0
},
[`${componentCls}-selection-placeholder`]: {
insetInlineStart: 0
}
},
// https://github.com/ant-design/ant-design/issues/44754
// Same as `wrap:after`
[`${selectOverflowPrefixCls}-item-suffix`]: {
minHeight: multipleSelectorUnit.itemHeight,
marginBlock: INTERNAL_FIXED_ITEM_MARGIN
},
[`${componentCls}-selection-search`]: {
display: 'inline-flex',
position: 'relative',
maxWidth: '100%',
marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(selectItemDist).equal(),
[`
&-input,
&-mirror
`]: {
height: selectItemHeight,
fontFamily: token.fontFamily,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(selectItemHeight),
transition: `all ${token.motionDurationSlow}`
},
'&-input': {
width: '100%',
minWidth: 4.1 // fix search cursor missing
},
'&-mirror': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
insetInlineEnd: 'auto',
zIndex: 999,
whiteSpace: 'pre',
// fix whitespace wrapping caused width calculation bug
visibility: 'hidden'
}
},
// ======================= Placeholder =======================
[`${componentCls}-selection-placeholder`]: {
position: 'absolute',
top: '50%',
insetInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(multipleSelectorUnit.basePadding).equal(),
insetInlineEnd: token.inputPaddingHorizontalBase,
transform: 'translateY(-50%)',
transition: `all ${token.motionDurationSlow}`
}
})
};
};
function genSizeStyle(token, suffix) {
const {
componentCls
} = token;
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
const rawStyle = {
[`${componentCls}-multiple${suffixCls}`]: {
fontSize: token.fontSize,
// ========================= Selector =========================
[`${componentCls}-selector`]: {
[`${componentCls}-show-search&`]: {
cursor: 'text'
}
},
[`
&${componentCls}-show-arrow ${componentCls}-selector,
&${componentCls}-allow-clear ${componentCls}-selector
`]: {
paddingInlineEnd: token.calc(token.fontSizeIcon).add(token.controlPaddingHorizontal).equal()
}
}
};
return [genSelectionStyle(token, suffix), rawStyle];
}
const genMultipleStyle = token => {
const {
componentCls
} = token;
const smallToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
selectHeight: token.controlHeightSM,
multipleSelectItemHeight: token.multipleItemHeightSM,
borderRadius: token.borderRadiusSM,
borderRadiusSM: token.borderRadiusXS
});
const largeToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
fontSize: token.fontSizeLG,
selectHeight: token.controlHeightLG,
multipleSelectItemHeight: token.multipleItemHeightLG,
borderRadius: token.borderRadiusLG,
borderRadiusSM: token.borderRadius
});
return [genSizeStyle(token),
// ======================== Small ========================
genSizeStyle(smallToken, 'sm'),
// Padding
{
[`${componentCls}-multiple${componentCls}-sm`]: {
[`${componentCls}-selection-placeholder`]: {
insetInline: token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal()
},
// https://github.com/ant-design/ant-design/issues/29559
[`${componentCls}-selection-search`]: {
marginInlineStart: 2 // Magic Number
}
}
},
// ======================== Large ========================
genSizeStyle(largeToken, 'lg')];
};
/* harmony default export */ __webpack_exports__["default"] = (genMultipleStyle);
/***/ }),
/***/ "./components/skeleton/style/index.ts":
/*!********************************************!*\
!*** ./components/skeleton/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const skeletonClsLoading = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes(`ant-skeleton-loading`, {
'0%': {
backgroundPosition: '100% 50%'
},
'100%': {
backgroundPosition: '0 50%'
}
});
const genSkeletonElementCommonSize = size => ({
height: size,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(size)
});
const genSkeletonElementAvatarSize = size => Object.assign({
width: size
}, genSkeletonElementCommonSize(size));
const genSkeletonColor = token => ({
background: token.skeletonLoadingBackground,
backgroundSize: '400% 100%',
animationName: skeletonClsLoading,
animationDuration: token.skeletonLoadingMotionDuration,
animationTimingFunction: 'ease',
animationIterationCount: 'infinite'
});
const genSkeletonElementInputSize = (size, calc) => Object.assign({
width: calc(size).mul(5).equal(),
minWidth: calc(size).mul(5).equal()
}, genSkeletonElementCommonSize(size));
const genSkeletonElementAvatar = token => {
const {
skeletonAvatarCls,
gradientFromColor,
controlHeight,
controlHeightLG,
controlHeightSM
} = token;
return {
[skeletonAvatarCls]: Object.assign({
display: 'inline-block',
verticalAlign: 'top',
background: gradientFromColor
}, genSkeletonElementAvatarSize(controlHeight)),
[`${skeletonAvatarCls}${skeletonAvatarCls}-circle`]: {
borderRadius: '50%'
},
[`${skeletonAvatarCls}${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),
[`${skeletonAvatarCls}${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))
};
};
const genSkeletonElementInput = token => {
const {
controlHeight,
borderRadiusSM,
skeletonInputCls,
controlHeightLG,
controlHeightSM,
gradientFromColor,
calc
} = token;
return {
[skeletonInputCls]: Object.assign({
display: 'inline-block',
verticalAlign: 'top',
background: gradientFromColor,
borderRadius: borderRadiusSM
}, genSkeletonElementInputSize(controlHeight, calc)),
[`${skeletonInputCls}-lg`]: Object.assign({}, genSkeletonElementInputSize(controlHeightLG, calc)),
[`${skeletonInputCls}-sm`]: Object.assign({}, genSkeletonElementInputSize(controlHeightSM, calc))
};
};
const genSkeletonElementImageSize = size => Object.assign({
width: size
}, genSkeletonElementCommonSize(size));
const genSkeletonElementImage = token => {
const {
skeletonImageCls,
imageSizeBase,
gradientFromColor,
borderRadiusSM,
calc
} = token;
return {
[skeletonImageCls]: Object.assign(Object.assign({
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
verticalAlign: 'middle',
background: gradientFromColor,
borderRadius: borderRadiusSM
}, genSkeletonElementImageSize(calc(imageSizeBase).mul(2).equal())), {
[`${skeletonImageCls}-path`]: {
fill: '#bfbfbf'
},
[`${skeletonImageCls}-svg`]: Object.assign(Object.assign({}, genSkeletonElementImageSize(imageSizeBase)), {
maxWidth: calc(imageSizeBase).mul(4).equal(),
maxHeight: calc(imageSizeBase).mul(4).equal()
}),
[`${skeletonImageCls}-svg${skeletonImageCls}-svg-circle`]: {
borderRadius: '50%'
}
}),
[`${skeletonImageCls}${skeletonImageCls}-circle`]: {
borderRadius: '50%'
}
};
};
const genSkeletonElementButtonShape = (token, size, buttonCls) => {
const {
skeletonButtonCls
} = token;
return {
[`${buttonCls}${skeletonButtonCls}-circle`]: {
width: size,
minWidth: size,
borderRadius: '50%'
},
[`${buttonCls}${skeletonButtonCls}-round`]: {
borderRadius: size
}
};
};
const genSkeletonElementButtonSize = (size, calc) => Object.assign({
width: calc(size).mul(2).equal(),
minWidth: calc(size).mul(2).equal()
}, genSkeletonElementCommonSize(size));
const genSkeletonElementButton = token => {
const {
borderRadiusSM,
skeletonButtonCls,
controlHeight,
controlHeightLG,
controlHeightSM,
gradientFromColor,
calc
} = token;
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
[skeletonButtonCls]: Object.assign({
display: 'inline-block',
verticalAlign: 'top',
background: gradientFromColor,
borderRadius: borderRadiusSM,
width: calc(controlHeight).mul(2).equal(),
minWidth: calc(controlHeight).mul(2).equal()
}, genSkeletonElementButtonSize(controlHeight, calc))
}, genSkeletonElementButtonShape(token, controlHeight, skeletonButtonCls)), {
[`${skeletonButtonCls}-lg`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightLG, calc))
}), genSkeletonElementButtonShape(token, controlHeightLG, `${skeletonButtonCls}-lg`)), {
[`${skeletonButtonCls}-sm`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightSM, calc))
}), genSkeletonElementButtonShape(token, controlHeightSM, `${skeletonButtonCls}-sm`));
};
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
skeletonAvatarCls,
skeletonTitleCls,
skeletonParagraphCls,
skeletonButtonCls,
skeletonInputCls,
skeletonImageCls,
controlHeight,
controlHeightLG,
controlHeightSM,
gradientFromColor,
padding,
marginSM,
borderRadius,
titleHeight,
blockRadius,
paragraphLiHeight,
controlHeightXS,
paragraphMarginTop
} = token;
return {
[componentCls]: {
display: 'table',
width: '100%',
[`${componentCls}-header`]: {
display: 'table-cell',
paddingInlineEnd: padding,
verticalAlign: 'top',
// Avatar
[skeletonAvatarCls]: Object.assign({
display: 'inline-block',
verticalAlign: 'top',
background: gradientFromColor
}, genSkeletonElementAvatarSize(controlHeight)),
[`${skeletonAvatarCls}-circle`]: {
borderRadius: '50%'
},
[`${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),
[`${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))
},
[`${componentCls}-content`]: {
display: 'table-cell',
width: '100%',
verticalAlign: 'top',
// Title
[skeletonTitleCls]: {
width: '100%',
height: titleHeight,
background: gradientFromColor,
borderRadius: blockRadius,
[`+ ${skeletonParagraphCls}`]: {
marginBlockStart: controlHeightSM
}
},
// paragraph
[skeletonParagraphCls]: {
padding: 0,
'> li': {
width: '100%',
height: paragraphLiHeight,
listStyle: 'none',
background: gradientFromColor,
borderRadius: blockRadius,
'+ li': {
marginBlockStart: controlHeightXS
}
}
},
[`${skeletonParagraphCls}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
width: '61%'
}
},
[`&-round ${componentCls}-content`]: {
[`${skeletonTitleCls}, ${skeletonParagraphCls} > li`]: {
borderRadius
}
}
},
[`${componentCls}-with-avatar ${componentCls}-content`]: {
// Title
[skeletonTitleCls]: {
marginBlockStart: marginSM,
[`+ ${skeletonParagraphCls}`]: {
marginBlockStart: paragraphMarginTop
}
}
},
// Skeleton element
[`${componentCls}${componentCls}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
display: 'inline-block',
width: 'auto'
}, genSkeletonElementButton(token)), genSkeletonElementAvatar(token)), genSkeletonElementInput(token)), genSkeletonElementImage(token)),
// Skeleton Block Button, Input
[`${componentCls}${componentCls}-block`]: {
width: '100%',
[skeletonButtonCls]: {
width: '100%'
},
[skeletonInputCls]: {
width: '100%'
}
},
// With active animation
[`${componentCls}${componentCls}-active`]: {
[`
${skeletonTitleCls},
${skeletonParagraphCls} > li,
${skeletonAvatarCls},
${skeletonButtonCls},
${skeletonInputCls},
${skeletonImageCls}
`]: Object.assign({}, genSkeletonColor(token))
}
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
colorFillContent,
colorFill
} = token;
const gradientFromColor = colorFillContent;
const gradientToColor = colorFill;
return {
color: gradientFromColor,
colorGradientEnd: gradientToColor,
gradientFromColor,
gradientToColor,
titleHeight: token.controlHeight / 2,
blockRadius: token.borderRadiusSM,
paragraphMarginTop: token.marginLG + token.marginXXS,
paragraphLiHeight: token.controlHeight / 2
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Skeleton', token => {
const {
componentCls,
calc
} = token;
const skeletonToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
skeletonAvatarCls: `${componentCls}-avatar`,
skeletonTitleCls: `${componentCls}-title`,
skeletonParagraphCls: `${componentCls}-paragraph`,
skeletonButtonCls: `${componentCls}-button`,
skeletonInputCls: `${componentCls}-input`,
skeletonImageCls: `${componentCls}-image`,
imageSizeBase: calc(token.controlHeight).mul(1.5).equal(),
borderRadius: 100,
// Large number to make capsule shape
skeletonLoadingBackground: `linear-gradient(90deg, ${token.gradientFromColor} 25%, ${token.gradientToColor} 37%, ${token.gradientFromColor} 63%)`,
skeletonLoadingMotionDuration: '1.4s'
});
return [genBaseStyle(skeletonToken)];
}, prepareComponentToken, {
deprecatedTokens: [['color', 'gradientFromColor'], ['colorGradientEnd', 'gradientToColor']]
}));
/***/ }),
/***/ "./components/slider/style/index.ts":
/*!******************************************!*\
!*** ./components/slider/style/index.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
antCls,
controlSize,
dotSize,
marginFull,
marginPart,
colorFillContentHover,
handleColorDisabled,
calc,
handleSize,
handleSizeHover,
handleActiveColor,
handleActiveOutlineColor,
handleLineWidth,
handleLineWidthHover,
motionDurationMid
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'relative',
height: controlSize,
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(marginPart)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(marginFull)}`,
padding: 0,
cursor: 'pointer',
touchAction: 'none',
'&-vertical': {
margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(marginFull)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(marginPart)}`
},
[`${componentCls}-rail`]: {
position: 'absolute',
backgroundColor: token.railBg,
borderRadius: token.borderRadiusXS,
transition: `background-color ${motionDurationMid}`
},
[`${componentCls}-track,${componentCls}-tracks`]: {
position: 'absolute',
transition: `background-color ${motionDurationMid}`
},
[`${componentCls}-track`]: {
backgroundColor: token.trackBg,
borderRadius: token.borderRadiusXS
},
[`${componentCls}-track-draggable`]: {
boxSizing: 'content-box',
backgroundClip: 'content-box',
border: 'solid rgba(0,0,0,0)'
},
'&:hover': {
[`${componentCls}-rail`]: {
backgroundColor: token.railHoverBg
},
[`${componentCls}-track`]: {
backgroundColor: token.trackHoverBg
},
[`${componentCls}-dot`]: {
borderColor: colorFillContentHover
},
[`${componentCls}-handle::after`]: {
boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(handleLineWidth)} ${token.colorPrimaryBorderHover}`
},
[`${componentCls}-dot-active`]: {
borderColor: token.dotActiveBorderColor
}
},
[`${componentCls}-handle`]: {
position: 'absolute',
width: handleSize,
height: handleSize,
outline: 'none',
userSelect: 'none',
// Dragging status
'&-dragging-delete': {
opacity: 0
},
// 扩大选区
'&::before': {
content: '""',
position: 'absolute',
insetInlineStart: calc(handleLineWidth).mul(-1).equal(),
insetBlockStart: calc(handleLineWidth).mul(-1).equal(),
width: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),
height: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),
backgroundColor: 'transparent'
},
'&::after': {
content: '""',
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
width: handleSize,
height: handleSize,
backgroundColor: token.colorBgElevated,
boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(handleLineWidth)} ${token.handleColor}`,
outline: `0px solid transparent`,
borderRadius: '50%',
cursor: 'pointer',
transition: `
inset-inline-start ${motionDurationMid},
inset-block-start ${motionDurationMid},
width ${motionDurationMid},
height ${motionDurationMid},
box-shadow ${motionDurationMid},
outline ${motionDurationMid}
`
},
'&:hover, &:active, &:focus': {
'&::before': {
insetInlineStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),
insetBlockStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),
width: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal(),
height: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal()
},
'&::after': {
boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(handleLineWidthHover)} ${handleActiveColor}`,
outline: `6px solid ${handleActiveOutlineColor}`,
width: handleSizeHover,
height: handleSizeHover,
insetInlineStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal(),
insetBlockStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal()
}
}
},
[`&-lock ${componentCls}-handle`]: {
'&::before, &::after': {
transition: 'none'
}
},
[`${componentCls}-mark`]: {
position: 'absolute',
fontSize: token.fontSize
},
[`${componentCls}-mark-text`]: {
position: 'absolute',
display: 'inline-block',
color: token.colorTextDescription,
textAlign: 'center',
wordBreak: 'keep-all',
cursor: 'pointer',
userSelect: 'none',
'&-active': {
color: token.colorText
}
},
[`${componentCls}-step`]: {
position: 'absolute',
background: 'transparent',
pointerEvents: 'none'
},
[`${componentCls}-dot`]: {
position: 'absolute',
width: dotSize,
height: dotSize,
backgroundColor: token.colorBgElevated,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(handleLineWidth)} solid ${token.dotBorderColor}`,
borderRadius: '50%',
cursor: 'pointer',
transition: `border-color ${token.motionDurationSlow}`,
pointerEvents: 'auto',
'&-active': {
borderColor: token.dotActiveBorderColor
}
},
[`&${componentCls}-disabled`]: {
cursor: 'not-allowed',
[`${componentCls}-rail`]: {
backgroundColor: `${token.railBg} !important`
},
[`${componentCls}-track`]: {
backgroundColor: `${token.trackBgDisabled} !important`
},
[`
${componentCls}-dot
`]: {
backgroundColor: token.colorBgElevated,
borderColor: token.trackBgDisabled,
boxShadow: 'none',
cursor: 'not-allowed'
},
[`${componentCls}-handle::after`]: {
backgroundColor: token.colorBgElevated,
cursor: 'not-allowed',
width: handleSize,
height: handleSize,
boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(handleLineWidth)} ${handleColorDisabled}`,
insetInlineStart: 0,
insetBlockStart: 0
},
[`
${componentCls}-mark-text,
${componentCls}-dot
`]: {
cursor: `not-allowed !important`
}
},
[`&-tooltip ${antCls}-tooltip-inner`]: {
minWidth: 'unset'
}
})
};
};
// ============================ Horizontal ============================
const genDirectionStyle = (token, horizontal) => {
const {
componentCls,
railSize,
handleSize,
dotSize,
marginFull,
calc
} = token;
const railPadding = horizontal ? 'paddingBlock' : 'paddingInline';
const full = horizontal ? 'width' : 'height';
const part = horizontal ? 'height' : 'width';
const handlePos = horizontal ? 'insetBlockStart' : 'insetInlineStart';
const markInset = horizontal ? 'top' : 'insetInlineStart';
const handlePosSize = calc(railSize).mul(3).sub(handleSize).div(2).equal();
const draggableBorderSize = calc(handleSize).sub(railSize).div(2).equal();
const draggableBorder = horizontal ? {
borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(draggableBorderSize)} 0`,
transform: `translateY(${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(calc(draggableBorderSize).mul(-1).equal())})`
} : {
borderWidth: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(draggableBorderSize)}`,
transform: `translateX(${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.calc(draggableBorderSize).mul(-1).equal())})`
};
return {
[railPadding]: railSize,
[part]: calc(railSize).mul(3).equal(),
[`${componentCls}-rail`]: {
[full]: '100%',
[part]: railSize
},
[`${componentCls}-track,${componentCls}-tracks`]: {
[part]: railSize
},
[`${componentCls}-track-draggable`]: Object.assign({}, draggableBorder),
[`${componentCls}-handle`]: {
[handlePos]: handlePosSize
},
[`${componentCls}-mark`]: {
// Reset all
insetInlineStart: 0,
top: 0,
// https://github.com/ant-design/ant-design/issues/43731
[markInset]: calc(railSize).mul(3).add(horizontal ? 0 : marginFull).equal(),
[full]: '100%'
},
[`${componentCls}-step`]: {
// Reset all
insetInlineStart: 0,
top: 0,
[markInset]: railSize,
[full]: '100%',
[part]: railSize
},
[`${componentCls}-dot`]: {
position: 'absolute',
[handlePos]: calc(railSize).sub(dotSize).div(2).equal()
}
};
};
// ============================ Horizontal ============================
const genHorizontalStyle = token => {
const {
componentCls,
marginPartWithMark
} = token;
return {
[`${componentCls}-horizontal`]: Object.assign(Object.assign({}, genDirectionStyle(token, true)), {
[`&${componentCls}-with-marks`]: {
marginBottom: marginPartWithMark
}
})
};
};
// ============================= Vertical =============================
const genVerticalStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-vertical`]: Object.assign(Object.assign({}, genDirectionStyle(token, false)), {
height: '100%'
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
// Handle line width is always width-er 1px
const increaseHandleWidth = 1;
const controlSize = token.controlHeightLG / 4;
const controlSizeHover = token.controlHeightSM / 2;
const handleLineWidth = token.lineWidth + increaseHandleWidth;
const handleLineWidthHover = token.lineWidth + increaseHandleWidth * 1.5;
const handleActiveColor = token.colorPrimary;
const handleActiveOutlineColor = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(handleActiveColor).setA(0.2).toRgbString();
return {
controlSize,
railSize: 4,
handleSize: controlSize,
handleSizeHover: controlSizeHover,
dotSize: 8,
handleLineWidth,
handleLineWidthHover,
railBg: token.colorFillTertiary,
railHoverBg: token.colorFillSecondary,
trackBg: token.colorPrimaryBorder,
trackHoverBg: token.colorPrimaryBorderHover,
handleColor: token.colorPrimaryBorder,
handleActiveColor,
handleActiveOutlineColor,
handleColorDisabled: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorTextDisabled).onBackground(token.colorBgContainer).toHexString(),
dotBorderColor: token.colorBorderSecondary,
dotActiveBorderColor: token.colorPrimaryBorder,
trackBgDisabled: token.colorBgContainerDisabled
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Slider', token => {
const sliderToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.mergeToken)(token, {
marginPart: token.calc(token.controlHeight).sub(token.controlSize).div(2).equal(),
marginFull: token.calc(token.controlSize).div(2).equal(),
marginPartWithMark: token.calc(token.controlHeightLG).sub(token.controlSize).equal()
});
return [genBaseStyle(sliderToken), genHorizontalStyle(sliderToken), genVerticalStyle(sliderToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/space/style/index.ts":
/*!*****************************************************!*\
!*** ./components/space/style/index.ts + 1 modules ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/space/style/compact.ts
const genSpaceCompactStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
'&-block': {
display: 'flex',
width: '100%'
},
'&-vertical': {
flexDirection: 'column'
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var compact = (genSpaceCompactStyle);
;// ./components/space/style/index.ts
const genSpaceStyle = token => {
const {
componentCls,
antCls
} = token;
return {
[componentCls]: {
display: 'inline-flex',
'&-rtl': {
direction: 'rtl'
},
'&-vertical': {
flexDirection: 'column'
},
'&-align': {
flexDirection: 'column',
'&-center': {
alignItems: 'center'
},
'&-start': {
alignItems: 'flex-start'
},
'&-end': {
alignItems: 'flex-end'
},
'&-baseline': {
alignItems: 'baseline'
}
},
[`${componentCls}-item:empty`]: {
display: 'none'
},
// https://github.com/ant-design/ant-design/issues/47875
[`${componentCls}-item > ${antCls}-badge-not-a-wrapper:only-child`]: {
display: 'block'
}
}
};
};
const genSpaceGapStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
'&-gap-row-small': {
rowGap: token.spaceGapSmallSize
},
'&-gap-row-middle': {
rowGap: token.spaceGapMiddleSize
},
'&-gap-row-large': {
rowGap: token.spaceGapLargeSize
},
'&-gap-col-small': {
columnGap: token.spaceGapSmallSize
},
'&-gap-col-middle': {
columnGap: token.spaceGapMiddleSize
},
'&-gap-col-large': {
columnGap: token.spaceGapLargeSize
}
}
};
};
// ============================== Export ==============================
const prepareComponentToken = () => ({});
/* harmony default export */ var style = ((0,genStyleUtils.genStyleHooks)('Space', token => {
const spaceToken = (0,es.mergeToken)(token, {
spaceGapSmallSize: token.paddingXS,
spaceGapMiddleSize: token.padding,
spaceGapLargeSize: token.paddingLG
});
return [genSpaceStyle(spaceToken), genSpaceGapStyle(spaceToken), compact(spaceToken)];
}, () => ({}), {
// Space component don't apply extra font style
// https://github.com/ant-design/ant-design/issues/40315
resetStyle: false
}));
/***/ }),
/***/ "./components/spin/style/index.ts":
/*!****************************************!*\
!*** ./components/spin/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const antSpinMove = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSpinMove', {
to: {
opacity: 1
}
});
const antRotate = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antRotate', {
to: {
transform: 'rotate(405deg)'
}
});
const genSpinStyle = token => {
const {
componentCls,
calc
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'absolute',
display: 'none',
color: token.colorPrimary,
fontSize: 0,
textAlign: 'center',
verticalAlign: 'middle',
opacity: 0,
transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`,
'&-spinning': {
position: 'relative',
display: 'inline-block',
opacity: 1
},
[`${componentCls}-text`]: {
fontSize: token.fontSize,
paddingTop: calc(calc(token.dotSize).sub(token.fontSize)).div(2).add(2).equal()
},
'&-fullscreen': {
position: 'fixed',
width: '100vw',
height: '100vh',
backgroundColor: token.colorBgMask,
zIndex: token.zIndexPopupBase,
inset: 0,
display: 'flex',
alignItems: 'center',
flexDirection: 'column',
justifyContent: 'center',
opacity: 0,
visibility: 'hidden',
transition: `all ${token.motionDurationMid}`,
'&-show': {
opacity: 1,
visibility: 'visible'
},
[componentCls]: {
[`${componentCls}-dot-holder`]: {
color: token.colorWhite
},
[`${componentCls}-text`]: {
color: token.colorTextLightSolid
}
}
},
'&-nested-loading': {
position: 'relative',
[`> div > ${componentCls}`]: {
position: 'absolute',
top: 0,
insetInlineStart: 0,
zIndex: 4,
display: 'block',
width: '100%',
height: '100%',
maxHeight: token.contentHeight,
[`${componentCls}-dot`]: {
position: 'absolute',
top: '50%',
insetInlineStart: '50%',
margin: calc(token.dotSize).mul(-1).div(2).equal()
},
[`${componentCls}-text`]: {
position: 'absolute',
top: '50%',
width: '100%',
textShadow: `0 1px 2px ${token.colorBgContainer}` // FIXME: shadow
},
[`&${componentCls}-show-text ${componentCls}-dot`]: {
marginTop: calc(token.dotSize).div(2).mul(-1).sub(10).equal()
},
'&-sm': {
[`${componentCls}-dot`]: {
margin: calc(token.dotSizeSM).mul(-1).div(2).equal()
},
[`${componentCls}-text`]: {
paddingTop: calc(calc(token.dotSizeSM).sub(token.fontSize)).div(2).add(2).equal()
},
[`&${componentCls}-show-text ${componentCls}-dot`]: {
marginTop: calc(token.dotSizeSM).div(2).mul(-1).sub(10).equal()
}
},
'&-lg': {
[`${componentCls}-dot`]: {
margin: calc(token.dotSizeLG).mul(-1).div(2).equal()
},
[`${componentCls}-text`]: {
paddingTop: calc(calc(token.dotSizeLG).sub(token.fontSize)).div(2).add(2).equal()
},
[`&${componentCls}-show-text ${componentCls}-dot`]: {
marginTop: calc(token.dotSizeLG).div(2).mul(-1).sub(10).equal()
}
}
},
[`${componentCls}-container`]: {
position: 'relative',
transition: `opacity ${token.motionDurationSlow}`,
'&::after': {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
zIndex: 10,
width: '100%',
height: '100%',
background: token.colorBgContainer,
opacity: 0,
transition: `all ${token.motionDurationSlow}`,
content: '""',
pointerEvents: 'none'
}
},
[`${componentCls}-blur`]: {
clear: 'both',
opacity: 0.5,
userSelect: 'none',
pointerEvents: 'none',
'&::after': {
opacity: 0.4,
pointerEvents: 'auto'
}
}
},
// tip
// ------------------------------
'&-tip': {
color: token.spinDotDefault
},
// holder
// ------------------------------
[`${componentCls}-dot-holder`]: {
width: '1em',
height: '1em',
fontSize: token.dotSize,
display: 'inline-block',
transition: `transform ${token.motionDurationSlow} ease, opacity ${token.motionDurationSlow} ease`,
transformOrigin: '50% 50%',
lineHeight: 1,
color: token.colorPrimary,
'&-hidden': {
transform: 'scale(0.3)',
opacity: 0
}
},
// progress
// ------------------------------
[`${componentCls}-dot-progress`]: {
position: 'absolute',
inset: 0
},
// dots
// ------------------------------
[`${componentCls}-dot`]: {
position: 'relative',
display: 'inline-block',
fontSize: token.dotSize,
width: '1em',
height: '1em',
'&-item': {
position: 'absolute',
display: 'block',
width: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),
height: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),
background: 'currentColor',
borderRadius: '100%',
transform: 'scale(0.75)',
transformOrigin: '50% 50%',
opacity: 0.3,
animationName: antSpinMove,
animationDuration: '1s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear',
animationDirection: 'alternate',
'&:nth-child(1)': {
top: 0,
insetInlineStart: 0,
animationDelay: '0s'
},
'&:nth-child(2)': {
top: 0,
insetInlineEnd: 0,
animationDelay: '0.4s'
},
'&:nth-child(3)': {
insetInlineEnd: 0,
bottom: 0,
animationDelay: '0.8s'
},
'&:nth-child(4)': {
bottom: 0,
insetInlineStart: 0,
animationDelay: '1.2s'
}
},
'&-spin': {
transform: 'rotate(45deg)',
animationName: antRotate,
animationDuration: '1.2s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear'
},
'&-circle': {
strokeLinecap: 'round',
transition: ['stroke-dashoffset', 'stroke-dasharray', 'stroke', 'stroke-width', 'opacity'].map(item => `${item} ${token.motionDurationSlow} ease`).join(','),
fillOpacity: 0,
stroke: 'currentcolor'
},
'&-circle-bg': {
stroke: token.colorFillSecondary
}
},
// small
[`&-sm ${componentCls}-dot`]: {
'&, &-holder': {
fontSize: token.dotSizeSM
}
},
[`&-sm ${componentCls}-dot-holder`]: {
i: {
width: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal(),
height: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal()
}
},
// large
[`&-lg ${componentCls}-dot`]: {
'&, &-holder': {
fontSize: token.dotSizeLG
}
},
[`&-lg ${componentCls}-dot-holder`]: {
i: {
width: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal(),
height: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal()
}
},
[`&${componentCls}-show-text ${componentCls}-text`]: {
display: 'block'
}
})
};
};
const prepareComponentToken = token => {
const {
controlHeightLG,
controlHeight
} = token;
return {
contentHeight: 400,
dotSize: controlHeightLG / 2,
dotSizeSM: controlHeightLG * 0.35,
dotSizeLG: controlHeight
};
};
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Spin', token => {
const spinToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
spinDotDefault: token.colorTextDescription
});
return [genSpinStyle(spinToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/splitter/style/index.ts":
/*!********************************************!*\
!*** ./components/splitter/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const genRtlStyle = token => {
const {
componentCls
} = token;
return {
[`&-rtl${componentCls}-horizontal`]: {
[`> ${componentCls}-bar`]: {
[`${componentCls}-bar-collapse-previous`]: {
insetInlineEnd: 0,
insetInlineStart: 'unset'
},
[`${componentCls}-bar-collapse-next`]: {
insetInlineEnd: 'unset',
insetInlineStart: 0
}
}
},
[`&-rtl${componentCls}-vertical`]: {
[`> ${componentCls}-bar`]: {
[`${componentCls}-bar-collapse-previous`]: {
insetInlineEnd: '50%',
insetInlineStart: 'unset'
},
[`${componentCls}-bar-collapse-next`]: {
insetInlineEnd: '50%',
insetInlineStart: 'unset'
}
}
}
};
};
const centerStyle = {
position: 'absolute',
top: '50%',
left: {
_skip_check_: true,
value: '50%'
},
transform: 'translate(-50%, -50%)'
};
const genSplitterStyle = token => {
const {
componentCls,
colorFill,
splitBarDraggableSize,
splitBarSize,
splitTriggerSize,
controlItemBgHover,
controlItemBgActive,
controlItemBgActiveHover,
prefixCls
} = token;
const splitBarCls = `${componentCls}-bar`;
const splitMaskCls = `${componentCls}-mask`;
const splitPanelCls = `${componentCls}-panel`;
const halfTriggerSize = token.calc(splitTriggerSize).div(2).equal();
const splitterBarPreviewOffsetVar = `${prefixCls}-bar-preview-offset`;
const splitterBarPreviewStyle = {
position: 'absolute',
background: token.colorPrimary,
opacity: 0.2,
pointerEvents: 'none',
transition: 'none',
zIndex: 1,
display: 'none'
};
return {
[componentCls]: Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
display: 'flex',
width: '100%',
height: '100%',
alignItems: 'stretch',
// ======================== SplitBar ========================
// Use `>` to avoid conflict with mix layout
[`> ${splitBarCls}`]: {
flex: 'none',
position: 'relative',
userSelect: 'none',
// ======================= Dragger =======================
[`${splitBarCls}-dragger`]: Object.assign(Object.assign({}, centerStyle), {
zIndex: 1,
// Hover background
'&::before': Object.assign({
content: '""',
background: controlItemBgHover
}, centerStyle),
// Spinner
'&::after': Object.assign({
content: '""',
background: colorFill
}, centerStyle),
// Hover
[`&:hover:not(${splitBarCls}-dragger-active)`]: {
'&::before': {
background: controlItemBgActive
}
},
// Active
'&-active': {
zIndex: 2,
'&::before': {
background: controlItemBgActiveHover
}
},
// Disabled, not use `pointer-events: none` since still need trigger collapse
[`&-disabled${splitBarCls}-dragger`]: {
zIndex: 0,
'&, &:hover, &-active': {
cursor: 'default',
'&::before': {
background: controlItemBgHover
}
},
'&::after': {
display: 'none'
}
}
}),
// ======================= Collapse =======================
[`${splitBarCls}-collapse-bar`]: Object.assign(Object.assign({}, centerStyle), {
zIndex: token.zIndexPopupBase,
background: controlItemBgHover,
fontSize: token.fontSizeSM,
borderRadius: token.borderRadiusXS,
color: token.colorText,
cursor: 'pointer',
opacity: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
// Hover
'&:hover': {
background: controlItemBgActive
},
// Active
'&:active': {
background: controlItemBgActiveHover
}
}),
// ======================== Status ========================
// Hover
'&:hover, &:active': {
[`${splitBarCls}-collapse-bar`]: {
opacity: 1
}
}
},
// =========================== Mask =========================
// Util dom for handle cursor
[splitMaskCls]: {
position: 'fixed',
zIndex: token.zIndexPopupBase,
inset: 0,
'&-horizontal': {
cursor: 'col-resize'
},
'&-vertical': {
cursor: 'row-resize'
}
},
// ==========================================================
// == Layout ==
// ==========================================================
'&-horizontal': {
flexDirection: 'row',
[`> ${splitBarCls}`]: {
width: 0,
// ======================= Preview =======================
[`${splitBarCls}-preview`]: Object.assign(Object.assign({
height: '100%',
width: splitBarSize
}, splitterBarPreviewStyle), {
[`&${splitBarCls}-preview-active`]: {
display: 'block',
transform: `translateX(var(--${splitterBarPreviewOffsetVar}))`
}
}),
// ======================= Dragger =======================
[`${splitBarCls}-dragger`]: {
cursor: 'col-resize',
height: '100%',
width: splitTriggerSize,
'&::before': {
height: '100%',
width: splitBarSize
},
'&::after': {
height: splitBarDraggableSize,
width: splitBarSize
}
},
// ======================= Collapse =======================
[`${splitBarCls}-collapse-bar`]: {
width: token.fontSizeSM,
height: token.controlHeightSM,
'&-start': {
left: {
_skip_check_: true,
value: 'auto'
},
right: {
_skip_check_: true,
value: halfTriggerSize
},
transform: 'translateY(-50%)'
},
'&-end': {
left: {
_skip_check_: true,
value: halfTriggerSize
},
right: {
_skip_check_: true,
value: 'auto'
},
transform: 'translateY(-50%)'
}
}
}
},
'&-vertical': {
flexDirection: 'column',
[`> ${splitBarCls}`]: {
height: 0,
// ======================= Preview =======================
[`${splitBarCls}-preview`]: Object.assign(Object.assign({
height: splitBarSize,
width: '100%'
}, splitterBarPreviewStyle), {
[`&${splitBarCls}-preview-active`]: {
display: 'block',
transform: `translateY(var(--${splitterBarPreviewOffsetVar}))`
}
}),
// ======================= Dragger =======================
[`${splitBarCls}-dragger`]: {
cursor: 'row-resize',
width: '100%',
height: splitTriggerSize,
'&::before': {
width: '100%',
height: splitBarSize
},
'&::after': {
width: splitBarDraggableSize,
height: splitBarSize
}
},
// ======================= Collapse =======================
[`${splitBarCls}-collapse-bar`]: {
height: token.fontSizeSM,
width: token.controlHeightSM,
'&-start': {
top: 'auto',
bottom: halfTriggerSize,
transform: 'translateX(-50%)'
},
'&-end': {
top: halfTriggerSize,
bottom: 'auto',
transform: 'translateX(-50%)'
}
}
}
},
// ========================= Panels =========================
[splitPanelCls]: {
overflow: 'auto',
padding: '0 1px',
scrollbarWidth: 'thin',
boxSizing: 'border-box',
'&-hidden': {
padding: 0,
overflow: 'hidden'
},
[`&:has(${componentCls}:only-child)`]: {
overflow: 'hidden'
}
}
}), genRtlStyle(token))
};
};
const prepareComponentToken = token => {
var _a;
const splitBarSize = token.splitBarSize || 2;
const splitTriggerSize = token.splitTriggerSize || 6;
// https://github.com/ant-design/ant-design/pull/51223
const resizeSpinnerSize = token.resizeSpinnerSize || 20;
const splitBarDraggableSize = (_a = token.splitBarDraggableSize) !== null && _a !== void 0 ? _a : resizeSpinnerSize;
return {
splitBarSize,
splitTriggerSize,
splitBarDraggableSize,
resizeSpinnerSize
};
};
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Splitter', token => [genSplitterStyle(token)], prepareComponentToken));
/***/ }),
/***/ "./components/statistic/style/index.ts":
/*!*********************************************!*\
!*** ./components/statistic/style/index.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genStatisticStyle = token => {
const {
componentCls,
marginXXS,
padding,
colorTextDescription,
titleFontSize,
colorTextHeading,
contentFontSize,
fontFamily
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
[`${componentCls}-title`]: {
marginBottom: marginXXS,
color: colorTextDescription,
fontSize: titleFontSize
},
[`${componentCls}-skeleton`]: {
paddingTop: padding
},
[`${componentCls}-content`]: {
color: colorTextHeading,
fontSize: contentFontSize,
fontFamily,
[`${componentCls}-content-value`]: {
display: 'inline-block',
direction: 'ltr'
},
[`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
display: 'inline-block'
},
[`${componentCls}-content-prefix`]: {
marginInlineEnd: marginXXS
},
[`${componentCls}-content-suffix`]: {
marginInlineStart: marginXXS
}
}
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
fontSizeHeading3,
fontSize
} = token;
return {
titleFontSize: fontSize,
contentFontSize: fontSizeHeading3
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Statistic', token => {
const statisticToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {});
return [genStatisticStyle(statisticToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/steps/style/index.ts":
/*!******************************************************!*\
!*** ./components/steps/style/index.ts + 10 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ steps_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/steps/style/custom-icon.ts
const genStepsCustomIconStyle = token => {
const {
componentCls,
customIconTop,
customIconSize,
customIconFontSize
} = token;
return {
[`${componentCls}-item-custom`]: {
[`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
height: 'auto',
background: 'none',
border: 0,
[`> ${componentCls}-icon`]: {
top: customIconTop,
width: customIconSize,
height: customIconSize,
fontSize: customIconFontSize,
lineHeight: (0,cssinjs.unit)(customIconSize)
}
}
},
// Only adjust horizontal customize icon width
[`&:not(${componentCls}-vertical)`]: {
[`${componentCls}-item-custom`]: {
[`${componentCls}-item-icon`]: {
width: 'auto',
background: 'none'
}
}
}
};
};
/* harmony default export */ var custom_icon = (genStepsCustomIconStyle);
;// ./components/steps/style/horizontal.ts
const genHorizontalStyle = token => {
const {
componentCls
} = token;
const stepsItemCls = `${componentCls}-item`; // .ant-steps-item
return {
[`${componentCls}-horizontal`]: {
[`${stepsItemCls}-tail`]: {
transform: 'translateY(-50%)'
}
}
};
};
/* harmony default export */ var horizontal = (genHorizontalStyle);
;// ./components/steps/style/inline.ts
const genStepsInlineStyle = token => {
const {
componentCls,
inlineDotSize,
inlineTitleColor,
inlineTailColor
} = token;
const containerPaddingTop = token.calc(token.paddingXS).add(token.lineWidth).equal();
const titleStyle = {
[`${componentCls}-item-container ${componentCls}-item-content ${componentCls}-item-title`]: {
color: inlineTitleColor
}
};
return {
[`&${componentCls}-inline`]: {
width: 'auto',
display: 'inline-flex',
[`${componentCls}-item`]: {
flex: 'none',
'&-container': {
padding: `${(0,cssinjs.unit)(containerPaddingTop)} ${(0,cssinjs.unit)(token.paddingXXS)} 0`,
margin: `0 ${(0,cssinjs.unit)(token.calc(token.marginXXS).div(2).equal())}`,
borderRadius: token.borderRadiusSM,
cursor: 'pointer',
transition: `background-color ${token.motionDurationMid}`,
'&:hover': {
background: token.controlItemBgHover
},
"&[role='button']:hover": {
opacity: 1
}
},
'&-icon': {
width: inlineDotSize,
height: inlineDotSize,
marginInlineStart: `calc(50% - ${(0,cssinjs.unit)(token.calc(inlineDotSize).div(2).equal())})`,
[`> ${componentCls}-icon`]: {
top: 0
},
[`${componentCls}-icon-dot`]: {
borderRadius: token.calc(token.fontSizeSM).div(4).equal(),
'&::after': {
display: 'none'
}
}
},
'&-content': {
width: 'auto',
marginTop: token.calc(token.marginXS).sub(token.lineWidth).equal()
},
'&-title': {
color: inlineTitleColor,
fontSize: token.fontSizeSM,
lineHeight: token.lineHeightSM,
fontWeight: 'normal',
marginBottom: token.calc(token.marginXXS).div(2).equal()
},
'&-description': {
display: 'none'
},
'&-tail': {
marginInlineStart: 0,
top: token.calc(inlineDotSize).div(2).add(containerPaddingTop).equal(),
transform: `translateY(-50%)`,
'&:after': {
width: '100%',
height: token.lineWidth,
borderRadius: 0,
marginInlineStart: 0,
background: inlineTailColor
}
},
[`&:first-child ${componentCls}-item-tail`]: {
width: '50%',
marginInlineStart: '50%'
},
[`&:last-child ${componentCls}-item-tail`]: {
display: 'block',
width: '50%'
},
'&-wait': Object.assign({
[`${componentCls}-item-icon ${componentCls}-icon ${componentCls}-icon-dot`]: {
backgroundColor: token.colorBorderBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${inlineTailColor}`
}
}, titleStyle),
'&-finish': Object.assign({
[`${componentCls}-item-tail::after`]: {
backgroundColor: inlineTailColor
},
[`${componentCls}-item-icon ${componentCls}-icon ${componentCls}-icon-dot`]: {
backgroundColor: inlineTailColor,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${inlineTailColor}`
}
}, titleStyle),
'&-error': titleStyle,
'&-active, &-process': Object.assign({
[`${componentCls}-item-icon`]: {
width: inlineDotSize,
height: inlineDotSize,
marginInlineStart: `calc(50% - ${(0,cssinjs.unit)(token.calc(inlineDotSize).div(2).equal())})`,
top: 0
}
}, titleStyle),
[`&:not(${componentCls}-item-active) > ${componentCls}-item-container[role='button']:hover`]: {
[`${componentCls}-item-title`]: {
color: inlineTitleColor
}
}
}
}
};
};
/* harmony default export */ var inline = (genStepsInlineStyle);
;// ./components/steps/style/label-placement.ts
const genStepsLabelPlacementStyle = token => {
const {
componentCls,
iconSize,
lineHeight,
iconSizeSM
} = token;
return {
[`&${componentCls}-label-vertical`]: {
[`${componentCls}-item`]: {
overflow: 'visible',
'&-tail': {
marginInlineStart: token.calc(iconSize).div(2).add(token.controlHeightLG).equal(),
padding: `0 ${(0,cssinjs.unit)(token.paddingLG)}`
},
'&-content': {
display: 'block',
width: token.calc(iconSize).div(2).add(token.controlHeightLG).mul(2).equal(),
marginTop: token.marginSM,
textAlign: 'center'
},
'&-icon': {
display: 'inline-block',
marginInlineStart: token.controlHeightLG
},
'&-title': {
paddingInlineEnd: 0,
paddingInlineStart: 0,
'&::after': {
display: 'none'
}
},
'&-subtitle': {
display: 'block',
marginBottom: token.marginXXS,
marginInlineStart: 0,
lineHeight
}
},
[`&${componentCls}-small:not(${componentCls}-dot)`]: {
[`${componentCls}-item`]: {
'&-icon': {
marginInlineStart: token.calc(iconSize).sub(iconSizeSM).div(2).add(token.controlHeightLG).equal()
}
}
}
}
};
};
/* harmony default export */ var label_placement = (genStepsLabelPlacementStyle);
;// ./components/steps/style/nav.ts
const genStepsNavStyle = token => {
const {
componentCls,
navContentMaxWidth,
navArrowColor,
stepsNavActiveColor,
motionDurationSlow
} = token;
return {
[`&${componentCls}-navigation`]: {
paddingTop: token.paddingSM,
[`&${componentCls}-small`]: {
[`${componentCls}-item`]: {
'&-container': {
marginInlineStart: token.calc(token.marginSM).mul(-1).equal()
}
}
},
[`${componentCls}-item`]: {
overflow: 'visible',
textAlign: 'center',
'&-container': {
display: 'inline-block',
height: '100%',
marginInlineStart: token.calc(token.margin).mul(-1).equal(),
paddingBottom: token.paddingSM,
textAlign: 'start',
transition: `opacity ${motionDurationSlow}`,
[`${componentCls}-item-content`]: {
maxWidth: navContentMaxWidth
},
[`${componentCls}-item-title`]: Object.assign(Object.assign({
maxWidth: '100%',
paddingInlineEnd: 0
}, style.textEllipsis), {
'&::after': {
display: 'none'
}
})
},
[`&:not(${componentCls}-item-active)`]: {
[`${componentCls}-item-container[role='button']`]: {
cursor: 'pointer',
'&:hover': {
opacity: 0.85
}
}
},
'&:last-child': {
flex: 1,
'&::after': {
display: 'none'
}
},
'&::after': {
position: 'absolute',
top: `calc(50% - ${(0,cssinjs.unit)(token.calc(token.paddingSM).div(2).equal())})`,
insetInlineStart: '100%',
display: 'inline-block',
width: token.fontSizeIcon,
height: token.fontSizeIcon,
borderTop: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${navArrowColor}`,
borderBottom: 'none',
borderInlineStart: 'none',
borderInlineEnd: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${navArrowColor}`,
transform: 'translateY(-50%) translateX(-50%) rotate(45deg)',
content: '""'
},
'&::before': {
position: 'absolute',
bottom: 0,
insetInlineStart: '50%',
display: 'inline-block',
width: 0,
height: token.lineWidthBold,
backgroundColor: stepsNavActiveColor,
transition: `width ${motionDurationSlow}, inset-inline-start ${motionDurationSlow}`,
transitionTimingFunction: 'ease-out',
content: '""'
}
},
[`${componentCls}-item${componentCls}-item-active::before`]: {
insetInlineStart: 0,
width: '100%'
}
},
[`&${componentCls}-navigation${componentCls}-vertical`]: {
[`> ${componentCls}-item`]: {
marginInlineEnd: 0,
'&::before': {
display: 'none'
},
[`&${componentCls}-item-active::before`]: {
top: 0,
insetInlineEnd: 0,
insetInlineStart: 'unset',
display: 'block',
width: token.calc(token.lineWidth).mul(3).equal(),
height: `calc(100% - ${(0,cssinjs.unit)(token.marginLG)})`
},
'&::after': {
position: 'relative',
insetInlineStart: '50%',
display: 'block',
width: token.calc(token.controlHeight).mul(0.25).equal(),
height: token.calc(token.controlHeight).mul(0.25).equal(),
marginBottom: token.marginXS,
textAlign: 'center',
transform: 'translateY(-50%) translateX(-50%) rotate(135deg)'
},
'&:last-child': {
'&::after': {
display: 'none'
}
},
[`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {
visibility: 'hidden'
}
}
},
[`&${componentCls}-navigation${componentCls}-horizontal`]: {
[`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
visibility: 'hidden'
}
}
};
};
/* harmony default export */ var nav = (genStepsNavStyle);
;// ./components/steps/style/progress.ts
const genStepsProgressStyle = token => {
const {
antCls,
componentCls,
iconSize,
iconSizeSM,
processIconColor,
marginXXS,
lineWidthBold,
lineWidth,
paddingXXS
} = token;
const progressSize = token.calc(iconSize).add(token.calc(lineWidthBold).mul(4).equal()).equal();
const progressSizeSM = token.calc(iconSizeSM).add(token.calc(token.lineWidth).mul(4).equal()).equal();
return {
[`&${componentCls}-with-progress`]: {
[`${componentCls}-item`]: {
paddingTop: paddingXXS,
[`&-process ${componentCls}-item-container ${componentCls}-item-icon ${componentCls}-icon`]: {
color: processIconColor
}
},
[`&${componentCls}-vertical > ${componentCls}-item `]: {
paddingInlineStart: paddingXXS,
[`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {
top: marginXXS,
insetInlineStart: token.calc(iconSize).div(2).sub(lineWidth).add(paddingXXS).equal()
}
},
[`&, &${componentCls}-small`]: {
[`&${componentCls}-horizontal ${componentCls}-item:first-child`]: {
paddingBottom: paddingXXS,
paddingInlineStart: paddingXXS
}
},
[`&${componentCls}-small${componentCls}-vertical > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
insetInlineStart: token.calc(iconSizeSM).div(2).sub(lineWidth).add(paddingXXS).equal()
},
[`&${componentCls}-label-vertical ${componentCls}-item ${componentCls}-item-tail`]: {
top: token.calc(iconSize).div(2).add(paddingXXS).equal()
},
[`${componentCls}-item-icon`]: {
position: 'relative',
[`${antCls}-progress`]: {
position: 'absolute',
insetInlineStart: '50%',
top: '50%',
transform: 'translate(-50%, -50%)',
'&-inner': {
width: `${(0,cssinjs.unit)(progressSize)} !important`,
height: `${(0,cssinjs.unit)(progressSize)} !important`
}
}
},
// ============================== Small size ==============================
[`&${componentCls}-small`]: {
[`&${componentCls}-label-vertical ${componentCls}-item ${componentCls}-item-tail`]: {
top: token.calc(iconSizeSM).div(2).add(paddingXXS).equal()
},
[`${componentCls}-item-icon ${antCls}-progress-inner`]: {
width: `${(0,cssinjs.unit)(progressSizeSM)} !important`,
height: `${(0,cssinjs.unit)(progressSizeSM)} !important`
}
}
}
};
};
/* harmony default export */ var progress = (genStepsProgressStyle);
;// ./components/steps/style/progress-dot.ts
const genStepsProgressDotStyle = token => {
const {
componentCls,
descriptionMaxWidth,
lineHeight,
dotCurrentSize,
dotSize,
motionDurationSlow
} = token;
return {
[`&${componentCls}-dot, &${componentCls}-dot${componentCls}-small`]: {
[`${componentCls}-item`]: {
'&-title': {
lineHeight
},
'&-tail': {
// Math.floor((token.size - token.lineWidth * 3) / 2)
top: token.calc(token.dotSize).sub(token.calc(token.lineWidth).mul(3).equal()).div(2).equal(),
width: '100%',
marginTop: 0,
marginBottom: 0,
marginInline: `${(0,cssinjs.unit)(token.calc(descriptionMaxWidth).div(2).equal())} 0`,
padding: 0,
'&::after': {
width: `calc(100% - ${(0,cssinjs.unit)(token.calc(token.marginSM).mul(2).equal())})`,
height: token.calc(token.lineWidth).mul(3).equal(),
marginInlineStart: token.marginSM
}
},
'&-icon': {
width: dotSize,
height: dotSize,
marginInlineStart: token.calc(token.descriptionMaxWidth).sub(dotSize).div(2).equal(),
paddingInlineEnd: 0,
lineHeight: (0,cssinjs.unit)(dotSize),
background: 'transparent',
border: 0,
[`${componentCls}-icon-dot`]: {
position: 'relative',
float: 'left',
width: '100%',
height: '100%',
borderRadius: 100,
// very large number
transition: `all ${motionDurationSlow}`,
/* expand hover area */
'&::after': {
position: 'absolute',
top: token.calc(token.marginSM).mul(-1).equal(),
insetInlineStart: token.calc(dotSize).sub(token.calc(token.controlHeightLG).mul(1.5).equal()).div(2).equal(),
width: token.calc(token.controlHeightLG).mul(1.5).equal(),
height: token.controlHeight,
background: 'transparent',
content: '""'
}
}
},
'&-content': {
width: descriptionMaxWidth
},
[`&-process ${componentCls}-item-icon`]: {
position: 'relative',
top: token.calc(dotSize).sub(dotCurrentSize).div(2).equal(),
width: dotCurrentSize,
height: dotCurrentSize,
lineHeight: (0,cssinjs.unit)(dotCurrentSize),
background: 'none',
marginInlineStart: token.calc(token.descriptionMaxWidth).sub(dotCurrentSize).div(2).equal()
},
[`&-process ${componentCls}-icon`]: {
[`&:first-child ${componentCls}-icon-dot`]: {
insetInlineStart: 0
}
}
}
},
[`&${componentCls}-vertical${componentCls}-dot`]: {
[`${componentCls}-item-icon`]: {
marginTop: token.calc(token.controlHeight).sub(dotSize).div(2).equal(),
marginInlineStart: 0,
background: 'none'
},
[`${componentCls}-item-process ${componentCls}-item-icon`]: {
marginTop: token.calc(token.controlHeight).sub(dotCurrentSize).div(2).equal(),
top: 0,
insetInlineStart: token.calc(dotSize).sub(dotCurrentSize).div(2).equal(),
marginInlineStart: 0
},
// https://github.com/ant-design/ant-design/issues/18354
[`${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
top: token.calc(token.controlHeight).sub(dotSize).div(2).equal(),
insetInlineStart: 0,
margin: 0,
padding: `${(0,cssinjs.unit)(token.calc(dotSize).add(token.paddingXS).equal())} 0 ${(0,cssinjs.unit)(token.paddingXS)}`,
'&::after': {
marginInlineStart: token.calc(dotSize).sub(token.lineWidth).div(2).equal()
}
},
[`&${componentCls}-small`]: {
[`${componentCls}-item-icon`]: {
marginTop: token.calc(token.controlHeightSM).sub(dotSize).div(2).equal()
},
[`${componentCls}-item-process ${componentCls}-item-icon`]: {
marginTop: token.calc(token.controlHeightSM).sub(dotCurrentSize).div(2).equal()
},
[`${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
top: token.calc(token.controlHeightSM).sub(dotSize).div(2).equal()
}
},
[`${componentCls}-item:first-child ${componentCls}-icon-dot`]: {
insetInlineStart: 0
},
[`${componentCls}-item-content`]: {
width: 'inherit'
}
}
};
};
/* harmony default export */ var progress_dot = (genStepsProgressDotStyle);
;// ./components/steps/style/rtl.ts
const genStepsRTLStyle = token => {
const {
componentCls
} = token;
return {
[`&${componentCls}-rtl`]: {
direction: 'rtl',
[`${componentCls}-item`]: {
'&-subtitle': {
float: 'left'
}
},
// nav
[`&${componentCls}-navigation`]: {
[`${componentCls}-item::after`]: {
transform: 'rotate(-45deg)'
}
},
// vertical
[`&${componentCls}-vertical`]: {
[`> ${componentCls}-item`]: {
'&::after': {
transform: 'rotate(225deg)'
},
[`${componentCls}-item-icon`]: {
float: 'right'
}
}
},
// progress-dot
[`&${componentCls}-dot`]: {
[`${componentCls}-item-icon ${componentCls}-icon-dot, &${componentCls}-small ${componentCls}-item-icon ${componentCls}-icon-dot`]: {
float: 'right'
}
}
}
};
};
/* harmony default export */ var rtl = (genStepsRTLStyle);
;// ./components/steps/style/small.ts
const genStepsSmallStyle = token => {
const {
componentCls,
iconSizeSM,
// stepsSmallIconMargin,
fontSizeSM,
fontSize,
colorTextDescription
} = token;
return {
[`&${componentCls}-small`]: {
[`&${componentCls}-horizontal:not(${componentCls}-label-vertical) ${componentCls}-item`]: {
paddingInlineStart: token.paddingSM,
'&:first-child': {
paddingInlineStart: 0
}
},
[`${componentCls}-item-icon`]: {
width: iconSizeSM,
height: iconSizeSM,
// margin: stepsSmallIconMargin,
marginTop: 0,
marginBottom: 0,
marginInline: `0 ${(0,cssinjs.unit)(token.marginXS)}`,
fontSize: fontSizeSM,
lineHeight: (0,cssinjs.unit)(iconSizeSM),
textAlign: 'center',
borderRadius: iconSizeSM
},
[`${componentCls}-item-title`]: {
paddingInlineEnd: token.paddingSM,
fontSize,
lineHeight: (0,cssinjs.unit)(iconSizeSM),
'&::after': {
top: token.calc(iconSizeSM).div(2).equal()
}
},
[`${componentCls}-item-description`]: {
color: colorTextDescription,
fontSize
},
[`${componentCls}-item-tail`]: {
top: token.calc(iconSizeSM).div(2).sub(token.paddingXXS).equal()
},
[`${componentCls}-item-custom ${componentCls}-item-icon`]: {
width: 'inherit',
height: 'inherit',
lineHeight: 'inherit',
background: 'none',
border: 0,
borderRadius: 0,
[`> ${componentCls}-icon`]: {
fontSize: iconSizeSM,
lineHeight: (0,cssinjs.unit)(iconSizeSM),
transform: 'none'
}
}
}
};
};
/* harmony default export */ var small = (genStepsSmallStyle);
;// ./components/steps/style/vertical.ts
const genStepsVerticalStyle = token => {
const {
componentCls,
iconSizeSM,
iconSize
} = token;
return {
[`&${componentCls}-vertical`]: {
display: 'flex',
flexDirection: 'column',
[`> ${componentCls}-item`]: {
display: 'block',
flex: '1 0 auto',
paddingInlineStart: 0,
overflow: 'visible',
[`${componentCls}-item-icon`]: {
float: 'left',
marginInlineEnd: token.margin
},
[`${componentCls}-item-content`]: {
display: 'block',
minHeight: token.calc(token.controlHeight).mul(1.5).equal(),
overflow: 'hidden'
},
[`${componentCls}-item-title`]: {
lineHeight: (0,cssinjs.unit)(iconSize)
},
[`${componentCls}-item-description`]: {
paddingBottom: token.paddingSM
}
},
[`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
position: 'absolute',
top: 0,
insetInlineStart: token.calc(iconSize).div(2).sub(token.lineWidth).equal(),
width: token.lineWidth,
height: '100%',
padding: `${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).add(iconSize).equal())} 0 ${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).equal())}`,
'&::after': {
width: token.lineWidth,
height: '100%'
}
},
[`> ${componentCls}-item:not(:last-child) > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
display: 'block'
},
[` > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-content > ${componentCls}-item-title`]: {
'&::after': {
display: 'none'
}
},
[`&${componentCls}-small ${componentCls}-item-container`]: {
[`${componentCls}-item-tail`]: {
position: 'absolute',
top: 0,
insetInlineStart: token.calc(iconSizeSM).div(2).sub(token.lineWidth).equal(),
padding: `${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).add(iconSizeSM).equal())} 0 ${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).equal())}`
},
[`${componentCls}-item-title`]: {
lineHeight: (0,cssinjs.unit)(iconSizeSM)
}
}
}
};
};
/* harmony default export */ var vertical = (genStepsVerticalStyle);
;// ./components/steps/style/index.ts
const STEP_ITEM_STATUS_WAIT = 'wait';
const STEP_ITEM_STATUS_PROCESS = 'process';
const STEP_ITEM_STATUS_FINISH = 'finish';
const STEP_ITEM_STATUS_ERROR = 'error';
const genStepsItemStatusStyle = (status, token) => {
const prefix = `${token.componentCls}-item`;
const iconColorKey = `${status}IconColor`;
const titleColorKey = `${status}TitleColor`;
const descriptionColorKey = `${status}DescriptionColor`;
const tailColorKey = `${status}TailColor`;
const iconBgColorKey = `${status}IconBgColor`;
const iconBorderColorKey = `${status}IconBorderColor`;
const dotColorKey = `${status}DotColor`;
return {
[`${prefix}-${status} ${prefix}-icon`]: {
backgroundColor: token[iconBgColorKey],
borderColor: token[iconBorderColorKey],
[`> ${token.componentCls}-icon`]: {
color: token[iconColorKey],
[`${token.componentCls}-icon-dot`]: {
background: token[dotColorKey]
}
}
},
[`${prefix}-${status}${prefix}-custom ${prefix}-icon`]: {
[`> ${token.componentCls}-icon`]: {
color: token[dotColorKey]
}
},
[`${prefix}-${status} > ${prefix}-container > ${prefix}-content > ${prefix}-title`]: {
color: token[titleColorKey],
'&::after': {
backgroundColor: token[tailColorKey]
}
},
[`${prefix}-${status} > ${prefix}-container > ${prefix}-content > ${prefix}-description`]: {
color: token[descriptionColorKey]
},
[`${prefix}-${status} > ${prefix}-container > ${prefix}-tail::after`]: {
backgroundColor: token[tailColorKey]
}
};
};
const genStepsItemStyle = token => {
const {
componentCls,
motionDurationSlow
} = token;
const stepsItemCls = `${componentCls}-item`; // .ant-steps-item
const stepItemIconCls = `${stepsItemCls}-icon`;
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
[stepsItemCls]: {
position: 'relative',
display: 'inline-block',
flex: 1,
overflow: 'hidden',
verticalAlign: 'top',
'&:last-child': {
flex: 'none',
[`> ${stepsItemCls}-container > ${stepsItemCls}-tail, > ${stepsItemCls}-container > ${stepsItemCls}-content > ${stepsItemCls}-title::after`]: {
display: 'none'
}
}
},
[`${stepsItemCls}-container`]: {
outline: 'none',
'&:focus-visible': {
[stepItemIconCls]: Object.assign({}, (0,style.genFocusOutline)(token))
}
},
[`${stepItemIconCls}, ${stepsItemCls}-content`]: {
display: 'inline-block',
verticalAlign: 'top'
},
[stepItemIconCls]: {
width: token.iconSize,
height: token.iconSize,
marginTop: 0,
marginBottom: 0,
marginInlineStart: 0,
marginInlineEnd: token.marginXS,
fontSize: token.iconFontSize,
fontFamily: token.fontFamily,
lineHeight: (0,cssinjs.unit)(token.iconSize),
textAlign: 'center',
borderRadius: token.iconSize,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
transition: `background-color ${motionDurationSlow}, border-color ${motionDurationSlow}`,
[`${componentCls}-icon`]: {
position: 'relative',
top: token.iconTop,
color: token.colorPrimary,
lineHeight: 1
}
},
[`${stepsItemCls}-tail`]: {
position: 'absolute',
top: token.calc(token.iconSize).div(2).equal(),
insetInlineStart: 0,
width: '100%',
'&::after': {
display: 'inline-block',
width: '100%',
height: token.lineWidth,
background: token.colorSplit,
borderRadius: token.lineWidth,
transition: `background ${motionDurationSlow}`,
content: '""'
}
},
[`${stepsItemCls}-title`]: {
position: 'relative',
display: 'inline-block',
paddingInlineEnd: token.padding,
color: token.colorText,
fontSize: token.fontSizeLG,
lineHeight: (0,cssinjs.unit)(token.titleLineHeight),
'&::after': {
position: 'absolute',
top: token.calc(token.titleLineHeight).div(2).equal(),
insetInlineStart: '100%',
display: 'block',
width: 9999,
height: token.lineWidth,
background: token.processTailColor,
content: '""'
}
},
[`${stepsItemCls}-subtitle`]: {
display: 'inline',
marginInlineStart: token.marginXS,
color: token.colorTextDescription,
fontWeight: 'normal',
fontSize: token.fontSize
},
[`${stepsItemCls}-description`]: {
color: token.colorTextDescription,
fontSize: token.fontSize
}
}, genStepsItemStatusStyle(STEP_ITEM_STATUS_WAIT, token)), genStepsItemStatusStyle(STEP_ITEM_STATUS_PROCESS, token)), {
[`${stepsItemCls}-process > ${stepsItemCls}-container > ${stepsItemCls}-title`]: {
fontWeight: token.fontWeightStrong
}
}), genStepsItemStatusStyle(STEP_ITEM_STATUS_FINISH, token)), genStepsItemStatusStyle(STEP_ITEM_STATUS_ERROR, token)), {
[`${stepsItemCls}${componentCls}-next-error > ${componentCls}-item-title::after`]: {
background: token.colorError
},
[`${stepsItemCls}-disabled`]: {
cursor: 'not-allowed'
}
});
};
// ============================= Clickable ===========================
const genStepsClickableStyle = token => {
const {
componentCls,
motionDurationSlow
} = token;
return {
[`& ${componentCls}-item`]: {
[`&:not(${componentCls}-item-active)`]: {
[`& > ${componentCls}-item-container[role='button']`]: {
cursor: 'pointer',
[`${componentCls}-item`]: {
[`&-title, &-subtitle, &-description, &-icon ${componentCls}-icon`]: {
transition: `color ${motionDurationSlow}`
}
},
'&:hover': {
[`${componentCls}-item`]: {
'&-title, &-subtitle, &-description': {
color: token.colorPrimary
}
}
}
},
[`&:not(${componentCls}-item-process)`]: {
[`& > ${componentCls}-item-container[role='button']:hover`]: {
[`${componentCls}-item`]: {
'&-icon': {
borderColor: token.colorPrimary,
[`${componentCls}-icon`]: {
color: token.colorPrimary
}
}
}
}
}
}
},
[`&${componentCls}-horizontal:not(${componentCls}-label-vertical)`]: {
[`${componentCls}-item`]: {
paddingInlineStart: token.padding,
whiteSpace: 'nowrap',
'&:first-child': {
paddingInlineStart: 0
},
[`&:last-child ${componentCls}-item-title`]: {
paddingInlineEnd: 0
},
'&-tail': {
display: 'none'
},
'&-description': {
maxWidth: token.descriptionMaxWidth,
whiteSpace: 'normal'
}
}
}
};
};
const genStepsStyle = token => {
const {
componentCls
} = token; // .ant-steps
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
display: 'flex',
width: '100%',
fontSize: 0,
textAlign: 'initial'
}), genStepsItemStyle(token)), genStepsClickableStyle(token)), custom_icon(token)), small(token)), vertical(token)), horizontal(token)), label_placement(token)), progress_dot(token)), nav(token)), rtl(token)), progress(token)), inline(token))
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
titleLineHeight: token.controlHeight,
customIconSize: token.controlHeight,
customIconTop: 0,
customIconFontSize: token.controlHeightSM,
iconSize: token.controlHeight,
iconTop: -0.5,
// magic for ui experience
iconFontSize: token.fontSize,
iconSizeSM: token.fontSizeHeading3,
dotSize: token.controlHeight / 4,
dotCurrentSize: token.controlHeightLG / 4,
navArrowColor: token.colorTextDisabled,
navContentMaxWidth: 'auto',
descriptionMaxWidth: 140,
waitIconColor: token.wireframe ? token.colorTextDisabled : token.colorTextLabel,
waitIconBgColor: token.wireframe ? token.colorBgContainer : token.colorFillContent,
waitIconBorderColor: token.wireframe ? token.colorTextDisabled : 'transparent',
finishIconBgColor: token.wireframe ? token.colorBgContainer : token.controlItemBgActive,
finishIconBorderColor: token.wireframe ? token.colorPrimary : token.controlItemBgActive
});
/* harmony default export */ var steps_style = ((0,genStyleUtils.genStyleHooks)('Steps', token => {
const {
colorTextDisabled,
controlHeightLG,
colorTextLightSolid,
colorText,
colorPrimary,
colorTextDescription,
colorTextQuaternary,
colorError,
colorBorderSecondary,
colorSplit
} = token;
const stepsToken = (0,es.mergeToken)(token, {
// Steps component less variable
processIconColor: colorTextLightSolid,
processTitleColor: colorText,
processDescriptionColor: colorText,
processIconBgColor: colorPrimary,
processIconBorderColor: colorPrimary,
processDotColor: colorPrimary,
processTailColor: colorSplit,
waitTitleColor: colorTextDescription,
waitDescriptionColor: colorTextDescription,
waitTailColor: colorSplit,
waitDotColor: colorTextDisabled,
finishIconColor: colorPrimary,
finishTitleColor: colorText,
finishDescriptionColor: colorTextDescription,
finishTailColor: colorPrimary,
finishDotColor: colorPrimary,
errorIconColor: colorTextLightSolid,
errorTitleColor: colorError,
errorDescriptionColor: colorError,
errorTailColor: colorSplit,
errorIconBgColor: colorError,
errorIconBorderColor: colorError,
errorDotColor: colorError,
stepsNavActiveColor: colorPrimary,
stepsProgressSize: controlHeightLG,
// Steps inline variable
inlineDotSize: 6,
inlineTitleColor: colorTextQuaternary,
inlineTailColor: colorBorderSecondary
});
return [genStepsStyle(stepsToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/style/compact-item.ts":
/*!******************************************!*\
!*** ./components/style/compact-item.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genCompactItemStyle: function() { return /* binding */ genCompactItemStyle; }
/* harmony export */ });
// handle border collapse
function compactItemBorder(token, parentCls, options) {
const {
focusElCls,
focus,
borderElCls
} = options;
const childCombinator = borderElCls ? '> *' : '';
const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');
return {
[`&-item:not(${parentCls}-last-item)`]: {
marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()
},
'&-item': Object.assign(Object.assign({
[hoverEffects]: {
zIndex: 2
}
}, focusElCls ? {
[`&${focusElCls}`]: {
zIndex: 2
}
} : {}), {
[`&[disabled] ${childCombinator}`]: {
zIndex: 0
}
})
};
}
// handle border-radius
function compactItemBorderRadius(prefixCls, parentCls, options) {
const {
borderElCls
} = options;
const childCombinator = borderElCls ? `> ${borderElCls}` : '';
return {
[`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {
borderRadius: 0
},
[`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {
[`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {
[`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
}
};
}
function genCompactItemStyle(token) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
focus: true
};
const {
componentCls
} = token;
const compactCls = `${componentCls}-compact`;
return {
[compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))
};
}
/***/ }),
/***/ "./components/style/index.tsx":
/*!************************************!*\
!*** ./components/style/index.tsx ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ clearFix: function() { return /* binding */ clearFix; },
/* harmony export */ genCommonStyle: function() { return /* binding */ genCommonStyle; },
/* harmony export */ genFocusOutline: function() { return /* binding */ genFocusOutline; },
/* harmony export */ genFocusStyle: function() { return /* binding */ genFocusStyle; },
/* harmony export */ genIconStyle: function() { return /* binding */ genIconStyle; },
/* harmony export */ genLinkStyle: function() { return /* binding */ genLinkStyle; },
/* harmony export */ operationUnit: function() { return /* binding */ operationUnit; },
/* harmony export */ resetComponent: function() { return /* binding */ resetComponent; },
/* harmony export */ resetIcon: function() { return /* binding */ resetIcon; },
/* harmony export */ textEllipsis: function() { return /* binding */ textEllipsis; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
const textEllipsis = {
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis'
};
const resetComponent = function (token) {
let needInheritFontFamily = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return {
boxSizing: 'border-box',
margin: 0,
padding: 0,
color: token.colorText,
fontSize: token.fontSize,
// font-variant: @font-variant-base;
lineHeight: token.lineHeight,
listStyle: 'none',
// font-feature-settings: @font-feature-settings-base;
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
};
};
const resetIcon = () => ({
display: 'inline-flex',
alignItems: 'center',
color: 'inherit',
fontStyle: 'normal',
lineHeight: 0,
textAlign: 'center',
textTransform: 'none',
// for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
verticalAlign: '-0.125em',
textRendering: 'optimizeLegibility',
'-webkit-font-smoothing': 'antialiased',
'-moz-osx-font-smoothing': 'grayscale',
'> *': {
lineHeight: 1
},
svg: {
display: 'inline-block'
}
});
const clearFix = () => ({
// https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
'&::before': {
display: 'table',
content: '""'
},
'&::after': {
// https://github.com/ant-design/ant-design/issues/21864
display: 'table',
clear: 'both',
content: '""'
}
});
const genLinkStyle = token => ({
a: {
color: token.colorLink,
textDecoration: token.linkDecoration,
backgroundColor: 'transparent',
// remove the gray background on active links in IE 10.
outline: 'none',
cursor: 'pointer',
transition: `color ${token.motionDurationSlow}`,
'-webkit-text-decoration-skip': 'objects',
// remove gaps in links underline in iOS 8+ and Safari 8+.
'&:hover': {
color: token.colorLinkHover
},
'&:active': {
color: token.colorLinkActive
},
'&:active, &:hover': {
textDecoration: token.linkHoverDecoration,
outline: 0
},
// https://github.com/ant-design/ant-design/issues/22503
'&:focus': {
textDecoration: token.linkFocusDecoration,
outline: 0
},
'&[disabled]': {
color: token.colorTextDisabled,
cursor: 'not-allowed'
}
}
});
const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {
const prefixSelector = `[class^="${componentPrefixCls}"], [class*=" ${componentPrefixCls}"]`;
const rootPrefixSelector = rootCls ? `.${rootCls}` : prefixSelector;
const resetStyle = {
boxSizing: 'border-box',
'&::before, &::after': {
boxSizing: 'border-box'
}
};
let resetFontStyle = {};
if (resetFont !== false) {
resetFontStyle = {
fontFamily: token.fontFamily,
fontSize: token.fontSize
};
}
return {
[rootPrefixSelector]: Object.assign(Object.assign(Object.assign({}, resetFontStyle), resetStyle), {
[prefixSelector]: resetStyle
})
};
};
const genFocusOutline = (token, offset) => ({
outline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
outlineOffset: offset !== null && offset !== void 0 ? offset : 1,
transition: 'outline-offset 0s, outline 0s'
});
const genFocusStyle = (token, offset) => ({
'&:focus-visible': Object.assign({}, genFocusOutline(token, offset))
});
const genIconStyle = iconPrefixCls => ({
[`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), {
[`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {
display: 'block'
}
})
});
const operationUnit = token => Object.assign(Object.assign({
// FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
// And Typography use this to generate link style which should not do this.
color: token.colorLink,
textDecoration: token.linkDecoration,
outline: 'none',
cursor: 'pointer',
transition: `all ${token.motionDurationSlow}`,
border: 0,
padding: 0,
background: 'none',
userSelect: 'none'
}, genFocusStyle(token)), {
'&:focus, &:hover': {
color: token.colorLinkHover
},
'&:active': {
color: token.colorLinkActive
}
});
/***/ }),
/***/ "./components/style/motion/collapse.ts":
/*!*********************************************!*\
!*** ./components/style/motion/collapse.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
const genCollapseMotion = token => ({
[token.componentCls]: {
// For common/openAnimation
[`${token.antCls}-motion-collapse-legacy`]: {
overflow: 'hidden',
'&-active': {
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
}
},
[`${token.antCls}-motion-collapse`]: {
overflow: 'hidden',
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
}
}
});
/* harmony default export */ __webpack_exports__["default"] = (genCollapseMotion);
/***/ }),
/***/ "./components/style/motion/fade.ts":
/*!*****************************************!*\
!*** ./components/style/motion/fade.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initFadeMotion: function() { return /* binding */ initFadeMotion; }
/* harmony export */ });
/* unused harmony exports fadeIn, fadeOut */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
const fadeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antFadeIn', {
'0%': {
opacity: 0
},
'100%': {
opacity: 1
}
});
const fadeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antFadeOut', {
'0%': {
opacity: 1
},
'100%': {
opacity: 0
}
});
const initFadeMotion = function (token) {
let sameLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
const {
antCls
} = token;
const motionCls = `${antCls}-fade`;
const sameLevelPrefix = sameLevel ? '&' : '';
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel), {
[`
${sameLevelPrefix}${motionCls}-enter,
${sameLevelPrefix}${motionCls}-appear
`]: {
opacity: 0,
animationTimingFunction: 'linear'
},
[`${sameLevelPrefix}${motionCls}-leave`]: {
animationTimingFunction: 'linear'
}
}];
};
/***/ }),
/***/ "./components/style/motion/motion.ts":
/*!*******************************************!*\
!*** ./components/style/motion/motion.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initMotion: function() { return /* binding */ initMotion; }
/* harmony export */ });
const initMotionCommon = duration => ({
animationDuration: duration,
animationFillMode: 'both'
});
// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove
const initMotionCommonLeave = duration => ({
animationDuration: duration,
animationFillMode: 'both'
});
const initMotion = function (motionCls, inKeyframes, outKeyframes, duration) {
let sameLevel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
const sameLevelPrefix = sameLevel ? '&' : '';
return {
[`
${sameLevelPrefix}${motionCls}-enter,
${sameLevelPrefix}${motionCls}-appear
`]: Object.assign(Object.assign({}, initMotionCommon(duration)), {
animationPlayState: 'paused'
}),
[`${sameLevelPrefix}${motionCls}-leave`]: Object.assign(Object.assign({}, initMotionCommonLeave(duration)), {
animationPlayState: 'paused'
}),
[`
${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active,
${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active
`]: {
animationName: inKeyframes,
animationPlayState: 'running'
},
[`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: {
animationName: outKeyframes,
animationPlayState: 'running',
pointerEvents: 'none'
}
};
};
/***/ }),
/***/ "./components/style/motion/move.ts":
/*!*****************************************!*\
!*** ./components/style/motion/move.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initMoveMotion: function() { return /* binding */ initMoveMotion; }
/* harmony export */ });
/* unused harmony exports moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
const moveDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveDownIn', {
'0%': {
transform: 'translate3d(0, 100%, 0)',
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveDownOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: 'translate3d(0, 100%, 0)',
transformOrigin: '0 0',
opacity: 0
}
});
const moveLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveLeftIn', {
'0%': {
transform: 'translate3d(-100%, 0, 0)',
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveLeftOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: 'translate3d(-100%, 0, 0)',
transformOrigin: '0 0',
opacity: 0
}
});
const moveRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveRightIn', {
'0%': {
transform: 'translate3d(100%, 0, 0)',
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveRightOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: 'translate3d(100%, 0, 0)',
transformOrigin: '0 0',
opacity: 0
}
});
const moveUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveUpIn', {
'0%': {
transform: 'translate3d(0, -100%, 0)',
transformOrigin: '0 0',
opacity: 0
},
'100%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
}
});
const moveUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveUpOut', {
'0%': {
transform: 'translate3d(0, 0, 0)',
transformOrigin: '0 0',
opacity: 1
},
'100%': {
transform: 'translate3d(0, -100%, 0)',
transformOrigin: '0 0',
opacity: 0
}
});
const moveMotion = {
'move-up': {
inKeyframes: moveUpIn,
outKeyframes: moveUpOut
},
'move-down': {
inKeyframes: moveDownIn,
outKeyframes: moveDownOut
},
'move-left': {
inKeyframes: moveLeftIn,
outKeyframes: moveLeftOut
},
'move-right': {
inKeyframes: moveRightIn,
outKeyframes: moveRightOut
}
};
const initMoveMotion = (token, motionName) => {
const {
antCls
} = token;
const motionCls = `${antCls}-${motionName}`;
const {
inKeyframes,
outKeyframes
} = moveMotion[motionName];
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {
[`
${motionCls}-enter,
${motionCls}-appear
`]: {
opacity: 0,
animationTimingFunction: token.motionEaseOutCirc
},
[`${motionCls}-leave`]: {
animationTimingFunction: token.motionEaseInOutCirc
}
}];
};
/***/ }),
/***/ "./components/style/motion/slide.ts":
/*!******************************************!*\
!*** ./components/style/motion/slide.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initSlideMotion: function() { return /* binding */ initSlideMotion; },
/* harmony export */ slideDownIn: function() { return /* binding */ slideDownIn; },
/* harmony export */ slideDownOut: function() { return /* binding */ slideDownOut; },
/* harmony export */ slideUpIn: function() { return /* binding */ slideUpIn; },
/* harmony export */ slideUpOut: function() { return /* binding */ slideUpOut; }
/* harmony export */ });
/* unused harmony exports slideLeftIn, slideLeftOut, slideRightIn, slideRightOut */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
const slideUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideUpIn', {
'0%': {
transform: 'scaleY(0.8)',
transformOrigin: '0% 0%',
opacity: 0
},
'100%': {
transform: 'scaleY(1)',
transformOrigin: '0% 0%',
opacity: 1
}
});
const slideUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideUpOut', {
'0%': {
transform: 'scaleY(1)',
transformOrigin: '0% 0%',
opacity: 1
},
'100%': {
transform: 'scaleY(0.8)',
transformOrigin: '0% 0%',
opacity: 0
}
});
const slideDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideDownIn', {
'0%': {
transform: 'scaleY(0.8)',
transformOrigin: '100% 100%',
opacity: 0
},
'100%': {
transform: 'scaleY(1)',
transformOrigin: '100% 100%',
opacity: 1
}
});
const slideDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideDownOut', {
'0%': {
transform: 'scaleY(1)',
transformOrigin: '100% 100%',
opacity: 1
},
'100%': {
transform: 'scaleY(0.8)',
transformOrigin: '100% 100%',
opacity: 0
}
});
const slideLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideLeftIn', {
'0%': {
transform: 'scaleX(0.8)',
transformOrigin: '0% 0%',
opacity: 0
},
'100%': {
transform: 'scaleX(1)',
transformOrigin: '0% 0%',
opacity: 1
}
});
const slideLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideLeftOut', {
'0%': {
transform: 'scaleX(1)',
transformOrigin: '0% 0%',
opacity: 1
},
'100%': {
transform: 'scaleX(0.8)',
transformOrigin: '0% 0%',
opacity: 0
}
});
const slideRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideRightIn', {
'0%': {
transform: 'scaleX(0.8)',
transformOrigin: '100% 0%',
opacity: 0
},
'100%': {
transform: 'scaleX(1)',
transformOrigin: '100% 0%',
opacity: 1
}
});
const slideRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideRightOut', {
'0%': {
transform: 'scaleX(1)',
transformOrigin: '100% 0%',
opacity: 1
},
'100%': {
transform: 'scaleX(0.8)',
transformOrigin: '100% 0%',
opacity: 0
}
});
const slideMotion = {
'slide-up': {
inKeyframes: slideUpIn,
outKeyframes: slideUpOut
},
'slide-down': {
inKeyframes: slideDownIn,
outKeyframes: slideDownOut
},
'slide-left': {
inKeyframes: slideLeftIn,
outKeyframes: slideLeftOut
},
'slide-right': {
inKeyframes: slideRightIn,
outKeyframes: slideRightOut
}
};
const initSlideMotion = (token, motionName) => {
const {
antCls
} = token;
const motionCls = `${antCls}-${motionName}`;
const {
inKeyframes,
outKeyframes
} = slideMotion[motionName];
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {
[`
${motionCls}-enter,
${motionCls}-appear
`]: {
transform: 'scale(0)',
transformOrigin: '0% 0%',
opacity: 0,
animationTimingFunction: token.motionEaseOutQuint,
'&-prepare': {
transform: 'scale(1)'
}
},
[`${motionCls}-leave`]: {
animationTimingFunction: token.motionEaseInQuint
}
}];
};
/***/ }),
/***/ "./components/style/motion/zoom.ts":
/*!*****************************************!*\
!*** ./components/style/motion/zoom.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ initZoomMotion: function() { return /* binding */ initZoomMotion; },
/* harmony export */ zoomIn: function() { return /* binding */ zoomIn; }
/* harmony export */ });
/* unused harmony exports zoomOut, zoomBigIn, zoomBigOut, zoomUpIn, zoomUpOut, zoomLeftIn, zoomLeftOut, zoomRightIn, zoomRightOut, zoomDownIn, zoomDownOut */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
const zoomIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomIn', {
'0%': {
transform: 'scale(0.2)',
opacity: 0
},
'100%': {
transform: 'scale(1)',
opacity: 1
}
});
const zoomOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomOut', {
'0%': {
transform: 'scale(1)'
},
'100%': {
transform: 'scale(0.2)',
opacity: 0
}
});
const zoomBigIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBigIn', {
'0%': {
transform: 'scale(0.8)',
opacity: 0
},
'100%': {
transform: 'scale(1)',
opacity: 1
}
});
const zoomBigOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBigOut', {
'0%': {
transform: 'scale(1)'
},
'100%': {
transform: 'scale(0.8)',
opacity: 0
}
});
const zoomUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomUpIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '50% 0%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '50% 0%'
}
});
const zoomUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomUpOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '50% 0%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '50% 0%',
opacity: 0
}
});
const zoomLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomLeftIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '0% 50%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '0% 50%'
}
});
const zoomLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomLeftOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '0% 50%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '0% 50%',
opacity: 0
}
});
const zoomRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomRightIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '100% 50%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '100% 50%'
}
});
const zoomRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomRightOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '100% 50%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '100% 50%',
opacity: 0
}
});
const zoomDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomDownIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '50% 100%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '50% 100%'
}
});
const zoomDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomDownOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '50% 100%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '50% 100%',
opacity: 0
}
});
const zoomMotion = {
zoom: {
inKeyframes: zoomIn,
outKeyframes: zoomOut
},
'zoom-big': {
inKeyframes: zoomBigIn,
outKeyframes: zoomBigOut
},
'zoom-big-fast': {
inKeyframes: zoomBigIn,
outKeyframes: zoomBigOut
},
'zoom-left': {
inKeyframes: zoomLeftIn,
outKeyframes: zoomLeftOut
},
'zoom-right': {
inKeyframes: zoomRightIn,
outKeyframes: zoomRightOut
},
'zoom-up': {
inKeyframes: zoomUpIn,
outKeyframes: zoomUpOut
},
'zoom-down': {
inKeyframes: zoomDownIn,
outKeyframes: zoomDownOut
}
};
const initZoomMotion = (token, motionName) => {
const {
antCls
} = token;
const motionCls = `${antCls}-${motionName}`;
const {
inKeyframes,
outKeyframes
} = zoomMotion[motionName];
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, inKeyframes, outKeyframes, motionName === 'zoom-big-fast' ? token.motionDurationFast : token.motionDurationMid), {
[`
${motionCls}-enter,
${motionCls}-appear
`]: {
transform: 'scale(0)',
opacity: 0,
animationTimingFunction: token.motionEaseOutCirc,
'&-prepare': {
transform: 'none'
}
},
[`${motionCls}-leave`]: {
animationTimingFunction: token.motionEaseInOutCirc
}
}];
};
/***/ }),
/***/ "./components/style/placementArrow.ts":
/*!********************************************!*\
!*** ./components/style/placementArrow.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ MAX_VERTICAL_CONTENT_RADIUS: function() { return /* binding */ MAX_VERTICAL_CONTENT_RADIUS; },
/* harmony export */ "default": function() { return /* binding */ getArrowStyle; },
/* harmony export */ getArrowOffsetToken: function() { return /* binding */ getArrowOffsetToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _roundedArrow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./roundedArrow */ "./components/style/roundedArrow.ts");
const MAX_VERTICAL_CONTENT_RADIUS = 8;
function getArrowOffsetToken(options) {
const {
contentRadius,
limitVerticalRadius
} = options;
const arrowOffset = contentRadius > 12 ? contentRadius + 2 : 12;
const arrowOffsetVertical = limitVerticalRadius ? MAX_VERTICAL_CONTENT_RADIUS : arrowOffset;
return {
arrowOffsetHorizontal: arrowOffset,
arrowOffsetVertical
};
}
function isInject(valid, code) {
if (!valid) {
return {};
}
return code;
}
function getArrowStyle(token, colorBg, options) {
const {
componentCls,
boxShadowPopoverArrow,
arrowOffsetVertical,
arrowOffsetHorizontal
} = token;
const {
arrowDistance = 0,
arrowPlacement = {
left: true,
right: true,
top: true,
bottom: true
}
} = options || {};
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({
// ============================ Basic ============================
[`${componentCls}-arrow`]: [Object.assign(Object.assign({
position: 'absolute',
zIndex: 1,
display: 'block'
}, (0,_roundedArrow__WEBPACK_IMPORTED_MODULE_0__.genRoundedArrow)(token, colorBg, boxShadowPopoverArrow)), {
'&:before': {
background: colorBg
}
})]
}, isInject(!!arrowPlacement.top, {
[[`&-placement-top > ${componentCls}-arrow`, `&-placement-topLeft > ${componentCls}-arrow`, `&-placement-topRight > ${componentCls}-arrow`].join(',')]: {
bottom: arrowDistance,
transform: 'translateY(100%) rotate(180deg)'
},
[`&-placement-top > ${componentCls}-arrow`]: {
left: {
_skip_check_: true,
value: '50%'
},
transform: 'translateX(-50%) translateY(100%) rotate(180deg)'
},
'&-placement-topLeft': {
'--arrow-offset-horizontal': arrowOffsetHorizontal,
[`> ${componentCls}-arrow`]: {
left: {
_skip_check_: true,
value: arrowOffsetHorizontal
}
}
},
'&-placement-topRight': {
'--arrow-offset-horizontal': `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(arrowOffsetHorizontal)})`,
[`> ${componentCls}-arrow`]: {
right: {
_skip_check_: true,
value: arrowOffsetHorizontal
}
}
}
})), isInject(!!arrowPlacement.bottom, {
[[`&-placement-bottom > ${componentCls}-arrow`, `&-placement-bottomLeft > ${componentCls}-arrow`, `&-placement-bottomRight > ${componentCls}-arrow`].join(',')]: {
top: arrowDistance,
transform: `translateY(-100%)`
},
[`&-placement-bottom > ${componentCls}-arrow`]: {
left: {
_skip_check_: true,
value: '50%'
},
transform: `translateX(-50%) translateY(-100%)`
},
'&-placement-bottomLeft': {
'--arrow-offset-horizontal': arrowOffsetHorizontal,
[`> ${componentCls}-arrow`]: {
left: {
_skip_check_: true,
value: arrowOffsetHorizontal
}
}
},
'&-placement-bottomRight': {
'--arrow-offset-horizontal': `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(arrowOffsetHorizontal)})`,
[`> ${componentCls}-arrow`]: {
right: {
_skip_check_: true,
value: arrowOffsetHorizontal
}
}
}
})), isInject(!!arrowPlacement.left, {
[[`&-placement-left > ${componentCls}-arrow`, `&-placement-leftTop > ${componentCls}-arrow`, `&-placement-leftBottom > ${componentCls}-arrow`].join(',')]: {
right: {
_skip_check_: true,
value: arrowDistance
},
transform: 'translateX(100%) rotate(90deg)'
},
[`&-placement-left > ${componentCls}-arrow`]: {
top: {
_skip_check_: true,
value: '50%'
},
transform: 'translateY(-50%) translateX(100%) rotate(90deg)'
},
[`&-placement-leftTop > ${componentCls}-arrow`]: {
top: arrowOffsetVertical
},
[`&-placement-leftBottom > ${componentCls}-arrow`]: {
bottom: arrowOffsetVertical
}
})), isInject(!!arrowPlacement.right, {
[[`&-placement-right > ${componentCls}-arrow`, `&-placement-rightTop > ${componentCls}-arrow`, `&-placement-rightBottom > ${componentCls}-arrow`].join(',')]: {
left: {
_skip_check_: true,
value: arrowDistance
},
transform: 'translateX(-100%) rotate(-90deg)'
},
[`&-placement-right > ${componentCls}-arrow`]: {
top: {
_skip_check_: true,
value: '50%'
},
transform: 'translateY(-50%) translateX(-100%) rotate(-90deg)'
},
[`&-placement-rightTop > ${componentCls}-arrow`]: {
top: arrowOffsetVertical
},
[`&-placement-rightBottom > ${componentCls}-arrow`]: {
bottom: arrowOffsetVertical
}
}))
};
}
/***/ }),
/***/ "./components/style/roundedArrow.ts":
/*!******************************************!*\
!*** ./components/style/roundedArrow.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genRoundedArrow: function() { return /* binding */ genRoundedArrow; },
/* harmony export */ getArrowToken: function() { return /* binding */ getArrowToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
function getArrowToken(token) {
const {
sizePopupArrow,
borderRadiusXS,
borderRadiusOuter
} = token;
const unitWidth = sizePopupArrow / 2;
const ax = 0;
const ay = unitWidth;
const bx = borderRadiusOuter * 1 / Math.sqrt(2);
const by = unitWidth - borderRadiusOuter * (1 - 1 / Math.sqrt(2));
const cx = unitWidth - borderRadiusXS * (1 / Math.sqrt(2));
const cy = borderRadiusOuter * (Math.sqrt(2) - 1) + borderRadiusXS * (1 / Math.sqrt(2));
const dx = 2 * unitWidth - cx;
const dy = cy;
const ex = 2 * unitWidth - bx;
const ey = by;
const fx = 2 * unitWidth - ax;
const fy = ay;
const shadowWidth = unitWidth * Math.sqrt(2) + borderRadiusOuter * (Math.sqrt(2) - 2);
const polygonOffset = borderRadiusOuter * (Math.sqrt(2) - 1);
const arrowPolygon = `polygon(${polygonOffset}px 100%, 50% ${polygonOffset}px, ${2 * unitWidth - polygonOffset}px 100%, ${polygonOffset}px 100%)`;
const arrowPath = `path('M ${ax} ${ay} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${bx} ${by} L ${cx} ${cy} A ${borderRadiusXS} ${borderRadiusXS} 0 0 1 ${dx} ${dy} L ${ex} ${ey} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${fx} ${fy} Z')`;
return {
arrowShadowWidth: shadowWidth,
arrowPath,
arrowPolygon
};
}
const genRoundedArrow = (token, bgColor, boxShadow) => {
const {
sizePopupArrow,
arrowPolygon,
arrowPath,
arrowShadowWidth,
borderRadiusXS,
calc
} = token;
return {
pointerEvents: 'none',
width: sizePopupArrow,
height: sizePopupArrow,
overflow: 'hidden',
'&::before': {
position: 'absolute',
bottom: 0,
insetInlineStart: 0,
width: sizePopupArrow,
height: calc(sizePopupArrow).div(2).equal(),
background: bgColor,
clipPath: {
_multi_value_: true,
value: [arrowPolygon, arrowPath]
},
content: '""'
},
'&::after': {
content: '""',
position: 'absolute',
width: arrowShadowWidth,
height: arrowShadowWidth,
bottom: 0,
insetInline: 0,
margin: 'auto',
borderRadius: {
_skip_check_: true,
value: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusXS)} 0`
},
transform: 'translateY(50%) rotate(-135deg)',
boxShadow,
zIndex: 0,
background: 'transparent'
}
};
};
/***/ }),
/***/ "./components/switch/style/index.ts":
/*!******************************************!*\
!*** ./components/switch/style/index.ts ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genSwitchSmallStyle = token => {
const {
componentCls,
trackHeightSM,
trackPadding,
trackMinWidthSM,
innerMinMarginSM,
innerMaxMarginSM,
handleSizeSM,
calc
} = token;
const switchInnerCls = `${componentCls}-inner`;
const trackPaddingCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(handleSizeSM).add(calc(trackPadding).mul(2)).equal());
const innerMaxMarginCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(innerMaxMarginSM).mul(2).equal());
return {
[componentCls]: {
[`&${componentCls}-small`]: {
minWidth: trackMinWidthSM,
height: trackHeightSM,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(trackHeightSM),
[`${componentCls}-inner`]: {
paddingInlineStart: innerMaxMarginSM,
paddingInlineEnd: innerMinMarginSM,
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
minHeight: trackHeightSM
},
[`${switchInnerCls}-checked`]: {
marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`
},
[`${switchInnerCls}-unchecked`]: {
marginTop: calc(trackHeightSM).mul(-1).equal(),
marginInlineStart: 0,
marginInlineEnd: 0
}
},
[`${componentCls}-handle`]: {
width: handleSizeSM,
height: handleSizeSM
},
[`${componentCls}-loading-icon`]: {
top: calc(calc(handleSizeSM).sub(token.switchLoadingIconSize)).div(2).equal(),
fontSize: token.switchLoadingIconSize
},
[`&${componentCls}-checked`]: {
[`${componentCls}-inner`]: {
paddingInlineStart: innerMinMarginSM,
paddingInlineEnd: innerMaxMarginSM,
[`${switchInnerCls}-checked`]: {
marginInlineStart: 0,
marginInlineEnd: 0
},
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`
}
},
[`${componentCls}-handle`]: {
insetInlineStart: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(handleSizeSM).add(trackPadding).equal())})`
}
},
[`&:not(${componentCls}-disabled):active`]: {
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: calc(token.marginXXS).div(2).equal(),
marginInlineEnd: calc(token.marginXXS).mul(-1).div(2).equal()
}
},
[`&${componentCls}-checked ${switchInnerCls}`]: {
[`${switchInnerCls}-checked`]: {
marginInlineStart: calc(token.marginXXS).mul(-1).div(2).equal(),
marginInlineEnd: calc(token.marginXXS).div(2).equal()
}
}
}
}
}
};
};
const genSwitchLoadingStyle = token => {
const {
componentCls,
handleSize,
calc
} = token;
return {
[componentCls]: {
[`${componentCls}-loading-icon${token.iconCls}`]: {
position: 'relative',
top: calc(calc(handleSize).sub(token.fontSize)).div(2).equal(),
color: token.switchLoadingIconColor,
verticalAlign: 'top'
},
[`&${componentCls}-checked ${componentCls}-loading-icon`]: {
color: token.switchColor
}
}
};
};
const genSwitchHandleStyle = token => {
const {
componentCls,
trackPadding,
handleBg,
handleShadow,
handleSize,
calc
} = token;
const switchHandleCls = `${componentCls}-handle`;
return {
[componentCls]: {
[switchHandleCls]: {
position: 'absolute',
top: trackPadding,
insetInlineStart: trackPadding,
width: handleSize,
height: handleSize,
transition: `all ${token.switchDuration} ease-in-out`,
'&::before': {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
backgroundColor: handleBg,
borderRadius: calc(handleSize).div(2).equal(),
boxShadow: handleShadow,
transition: `all ${token.switchDuration} ease-in-out`,
content: '""'
}
},
[`&${componentCls}-checked ${switchHandleCls}`]: {
insetInlineStart: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(handleSize).add(trackPadding).equal())})`
},
[`&:not(${componentCls}-disabled):active`]: {
[`${switchHandleCls}::before`]: {
insetInlineEnd: token.switchHandleActiveInset,
insetInlineStart: 0
},
[`&${componentCls}-checked ${switchHandleCls}::before`]: {
insetInlineEnd: 0,
insetInlineStart: token.switchHandleActiveInset
}
}
}
};
};
const genSwitchInnerStyle = token => {
const {
componentCls,
trackHeight,
trackPadding,
innerMinMargin,
innerMaxMargin,
handleSize,
calc
} = token;
const switchInnerCls = `${componentCls}-inner`;
const trackPaddingCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(handleSize).add(calc(trackPadding).mul(2)).equal());
const innerMaxMarginCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(innerMaxMargin).mul(2).equal());
return {
[componentCls]: {
[switchInnerCls]: {
display: 'block',
overflow: 'hidden',
borderRadius: 100,
height: '100%',
paddingInlineStart: innerMaxMargin,
paddingInlineEnd: innerMinMargin,
transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
display: 'block',
color: token.colorTextLightSolid,
fontSize: token.fontSizeSM,
transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
pointerEvents: 'none',
minHeight: trackHeight
},
[`${switchInnerCls}-checked`]: {
marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`
},
[`${switchInnerCls}-unchecked`]: {
marginTop: calc(trackHeight).mul(-1).equal(),
marginInlineStart: 0,
marginInlineEnd: 0
}
},
[`&${componentCls}-checked ${switchInnerCls}`]: {
paddingInlineStart: innerMinMargin,
paddingInlineEnd: innerMaxMargin,
[`${switchInnerCls}-checked`]: {
marginInlineStart: 0,
marginInlineEnd: 0
},
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`
}
},
[`&:not(${componentCls}-disabled):active`]: {
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: calc(trackPadding).mul(2).equal(),
marginInlineEnd: calc(trackPadding).mul(-1).mul(2).equal()
}
},
[`&${componentCls}-checked ${switchInnerCls}`]: {
[`${switchInnerCls}-checked`]: {
marginInlineStart: calc(trackPadding).mul(-1).mul(2).equal(),
marginInlineEnd: calc(trackPadding).mul(2).equal()
}
}
}
}
};
};
const genSwitchStyle = token => {
const {
componentCls,
trackHeight,
trackMinWidth
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
position: 'relative',
display: 'inline-block',
boxSizing: 'border-box',
minWidth: trackMinWidth,
height: trackHeight,
lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(trackHeight),
verticalAlign: 'middle',
background: token.colorTextQuaternary,
border: '0',
borderRadius: 100,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`,
userSelect: 'none',
[`&:hover:not(${componentCls}-disabled)`]: {
background: token.colorTextTertiary
}
}), (0,_style__WEBPACK_IMPORTED_MODULE_2__.genFocusStyle)(token)), {
[`&${componentCls}-checked`]: {
background: token.switchColor,
[`&:hover:not(${componentCls}-disabled)`]: {
background: token.colorPrimaryHover
}
},
[`&${componentCls}-loading, &${componentCls}-disabled`]: {
cursor: 'not-allowed',
opacity: token.switchDisabledOpacity,
'*': {
boxShadow: 'none',
cursor: 'not-allowed'
}
},
// rtl style
[`&${componentCls}-rtl`]: {
direction: 'rtl'
}
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
fontSize,
lineHeight,
controlHeight,
colorWhite
} = token;
const height = fontSize * lineHeight;
const heightSM = controlHeight / 2;
const padding = 2; // Fixed value
const handleSize = height - padding * 2;
const handleSizeSM = heightSM - padding * 2;
return {
trackHeight: height,
trackHeightSM: heightSM,
trackMinWidth: handleSize * 2 + padding * 4,
trackMinWidthSM: handleSizeSM * 2 + padding * 2,
trackPadding: padding,
// Fixed value
handleBg: colorWhite,
handleSize,
handleSizeSM,
handleShadow: `0 2px 4px 0 ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('#00230b').setA(0.2).toRgbString()}`,
innerMinMargin: handleSize / 2,
innerMaxMargin: handleSize + padding + padding * 2,
innerMinMarginSM: handleSizeSM / 2,
innerMaxMarginSM: handleSizeSM + padding + padding * 2
};
};
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Switch', token => {
const switchToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.mergeToken)(token, {
switchDuration: token.motionDurationMid,
switchColor: token.colorPrimary,
switchDisabledOpacity: token.opacityLoading,
switchLoadingIconSize: token.calc(token.fontSizeIcon).mul(0.75).equal(),
switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
switchHandleActiveInset: '-30%'
});
return [genSwitchStyle(switchToken),
// inner style
genSwitchInnerStyle(switchToken),
// handle style
genSwitchHandleStyle(switchToken),
// loading style
genSwitchLoadingStyle(switchToken),
// small style
genSwitchSmallStyle(switchToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/table/style/index.ts":
/*!******************************************************!*\
!*** ./components/table/style/index.ts + 15 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ table_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var cssinjs_utils_es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
;// ./components/table/style/bordered.ts
const genBorderedStyle = token => {
const {
componentCls,
lineWidth,
lineType,
tableBorderColor,
tableHeaderBg,
tablePaddingVertical,
tablePaddingHorizontal,
calc
} = token;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
const getSizeBorderStyle = (size, paddingVertical, paddingHorizontal) => ({
[`&${componentCls}-${size}`]: {
[`> ${componentCls}-container`]: {
[`> ${componentCls}-content, > ${componentCls}-body`]: {
[`
> table > tbody > tr > th,
> table > tbody > tr > td
`]: {
[`> ${componentCls}-expanded-row-fixed`]: {
margin: `${(0,cssinjs.unit)(calc(paddingVertical).mul(-1).equal())}
${(0,cssinjs.unit)(calc(calc(paddingHorizontal).add(lineWidth)).mul(-1).equal())}`
}
}
}
}
}
});
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}${componentCls}-bordered`]: Object.assign(Object.assign(Object.assign({
// ============================ Title =============================
[`> ${componentCls}-title`]: {
border: tableBorder,
borderBottom: 0
},
// ============================ Content ============================
[`> ${componentCls}-container`]: {
borderInlineStart: tableBorder,
borderTop: tableBorder,
[`
> ${componentCls}-content,
> ${componentCls}-header,
> ${componentCls}-body,
> ${componentCls}-summary
`]: {
'> table': {
// ============================= Cell =============================
[`
> thead > tr > th,
> thead > tr > td,
> tbody > tr > th,
> tbody > tr > td,
> tfoot > tr > th,
> tfoot > tr > td
`]: {
borderInlineEnd: tableBorder
},
// ============================ Header ============================
'> thead': {
'> tr:not(:last-child) > th': {
borderBottom: tableBorder
},
'> tr > th::before': {
backgroundColor: 'transparent !important'
}
},
// Fixed right should provides additional border
[`
> thead > tr,
> tbody > tr,
> tfoot > tr
`]: {
[`> ${componentCls}-cell-fix-right-first::after`]: {
borderInlineEnd: tableBorder
}
},
// ========================== Expandable ==========================
[`
> tbody > tr > th,
> tbody > tr > td
`]: {
[`> ${componentCls}-expanded-row-fixed`]: {
margin: `${(0,cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0,cssinjs.unit)(calc(calc(tablePaddingHorizontal).add(lineWidth)).mul(-1).equal())}`,
'&::after': {
position: 'absolute',
top: 0,
insetInlineEnd: lineWidth,
bottom: 0,
borderInlineEnd: tableBorder,
content: '""'
}
}
}
}
}
},
// ============================ Scroll ============================
[`&${componentCls}-scroll-horizontal`]: {
[`> ${componentCls}-container > ${componentCls}-body`]: {
'> table > tbody': {
[`
> tr${componentCls}-expanded-row,
> tr${componentCls}-placeholder
`]: {
'> th, > td': {
borderInlineEnd: 0
}
}
}
}
}
}, getSizeBorderStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle)), getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall)), {
// ============================ Footer ============================
[`> ${componentCls}-footer`]: {
border: tableBorder,
borderTop: 0
}
}),
// ============================ Nested ============================
[`${componentCls}-cell`]: {
[`${componentCls}-container:first-child`]: {
// :first-child to avoid the case when bordered and title is set
borderTop: 0
},
// https://github.com/ant-design/ant-design/issues/35577
'&-scrollbar:not([rowspan])': {
boxShadow: `0 ${(0,cssinjs.unit)(lineWidth)} 0 ${(0,cssinjs.unit)(lineWidth)} ${tableHeaderBg}`
}
},
[`${componentCls}-bordered ${componentCls}-cell-scrollbar`]: {
borderInlineEnd: tableBorder
}
}
};
};
/* harmony default export */ var bordered = (genBorderedStyle);
;// ./components/table/style/ellipsis.ts
const genEllipsisStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-cell-ellipsis`]: Object.assign(Object.assign({}, style.textEllipsis), {
wordBreak: 'keep-all',
// Fixed first or last should special process
[`
&${componentCls}-cell-fix-left-last,
&${componentCls}-cell-fix-right-first
`]: {
overflow: 'visible',
[`${componentCls}-cell-content`]: {
display: 'block',
overflow: 'hidden',
textOverflow: 'ellipsis'
}
},
[`${componentCls}-column-title`]: {
overflow: 'hidden',
textOverflow: 'ellipsis',
wordBreak: 'keep-all'
}
})
}
};
};
/* harmony default export */ var ellipsis = (genEllipsisStyle);
;// ./components/table/style/empty.ts
// ========================= Placeholder ==========================
const genEmptyStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-tbody > tr${componentCls}-placeholder`]: {
textAlign: 'center',
color: token.colorTextDisabled,
[`
&:hover > th,
&:hover > td,
`]: {
background: token.colorBgContainer
}
}
}
};
};
/* harmony default export */ var empty = (genEmptyStyle);
;// ./components/table/style/expand.ts
const genExpandStyle = token => {
const {
componentCls,
antCls,
motionDurationSlow,
lineWidth,
paddingXS,
lineType,
tableBorderColor,
tableExpandIconBg,
tableExpandColumnWidth,
borderRadius,
tablePaddingVertical,
tablePaddingHorizontal,
tableExpandedRowBg,
paddingXXS,
expandIconMarginTop,
expandIconSize,
expandIconHalfInner,
expandIconScale,
calc
} = token;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
const expandIconLineOffset = calc(paddingXXS).sub(lineWidth).equal();
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-expand-icon-col`]: {
width: tableExpandColumnWidth
},
[`${componentCls}-row-expand-icon-cell`]: {
textAlign: 'center',
[`${componentCls}-row-expand-icon`]: {
display: 'inline-flex',
float: 'none',
verticalAlign: 'sub'
}
},
[`${componentCls}-row-indent`]: {
height: 1,
float: 'left'
},
[`${componentCls}-row-expand-icon`]: Object.assign(Object.assign({}, (0,style.operationUnit)(token)), {
position: 'relative',
float: 'left',
width: expandIconSize,
height: expandIconSize,
color: 'inherit',
lineHeight: (0,cssinjs.unit)(expandIconSize),
background: tableExpandIconBg,
border: tableBorder,
borderRadius,
transform: `scale(${expandIconScale})`,
'&:focus, &:hover, &:active': {
borderColor: 'currentcolor'
},
'&::before, &::after': {
position: 'absolute',
background: 'currentcolor',
transition: `transform ${motionDurationSlow} ease-out`,
content: '""'
},
'&::before': {
top: expandIconHalfInner,
insetInlineEnd: expandIconLineOffset,
insetInlineStart: expandIconLineOffset,
height: lineWidth
},
'&::after': {
top: expandIconLineOffset,
bottom: expandIconLineOffset,
insetInlineStart: expandIconHalfInner,
width: lineWidth,
transform: 'rotate(90deg)'
},
// Motion effect
'&-collapsed::before': {
transform: 'rotate(-180deg)'
},
'&-collapsed::after': {
transform: 'rotate(0deg)'
},
'&-spaced': {
'&::before, &::after': {
display: 'none',
content: 'none'
},
background: 'transparent',
border: 0,
visibility: 'hidden'
}
}),
[`${componentCls}-row-indent + ${componentCls}-row-expand-icon`]: {
marginTop: expandIconMarginTop,
marginInlineEnd: paddingXS
},
[`tr${componentCls}-expanded-row`]: {
'&, &:hover': {
'> th, > td': {
background: tableExpandedRowBg
}
},
// https://github.com/ant-design/ant-design/issues/25573
[`${antCls}-descriptions-view`]: {
display: 'flex',
table: {
flex: 'auto',
width: '100%'
}
}
},
// With fixed
[`${componentCls}-expanded-row-fixed`]: {
position: 'relative',
margin: `${(0,cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0,cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`,
padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`
}
}
};
};
/* harmony default export */ var expand = (genExpandStyle);
;// ./components/table/style/filter.ts
const genFilterStyle = token => {
const {
componentCls,
antCls,
iconCls,
tableFilterDropdownWidth,
tableFilterDropdownSearchWidth,
paddingXXS,
paddingXS,
colorText,
lineWidth,
lineType,
tableBorderColor,
headerIconColor,
fontSizeSM,
tablePaddingHorizontal,
borderRadius,
motionDurationSlow,
colorTextDescription,
colorPrimary,
tableHeaderFilterActiveBg,
colorTextDisabled,
tableFilterDropdownBg,
tableFilterDropdownHeight,
controlItemBgHover,
controlItemBgActive,
boxShadowSecondary,
filterDropdownMenuBg,
calc
} = token;
const dropdownPrefixCls = `${antCls}-dropdown`;
const tableFilterDropdownPrefixCls = `${componentCls}-filter-dropdown`;
const treePrefixCls = `${antCls}-tree`;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
return [{
[`${componentCls}-wrapper`]: {
[`${componentCls}-filter-column`]: {
display: 'flex',
justifyContent: 'space-between'
},
[`${componentCls}-filter-trigger`]: {
position: 'relative',
display: 'flex',
alignItems: 'center',
marginBlock: calc(paddingXXS).mul(-1).equal(),
marginInline: `${(0,cssinjs.unit)(paddingXXS)} ${(0,cssinjs.unit)(calc(tablePaddingHorizontal).div(2).mul(-1).equal())}`,
padding: `0 ${(0,cssinjs.unit)(paddingXXS)}`,
color: headerIconColor,
fontSize: fontSizeSM,
borderRadius,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
'&:hover': {
color: colorTextDescription,
background: tableHeaderFilterActiveBg
},
'&.active': {
color: colorPrimary
}
}
}
}, {
// Dropdown
[`${antCls}-dropdown`]: {
[tableFilterDropdownPrefixCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
minWidth: tableFilterDropdownWidth,
backgroundColor: tableFilterDropdownBg,
borderRadius,
boxShadow: boxShadowSecondary,
overflow: 'hidden',
// Reset menu
[`${dropdownPrefixCls}-menu`]: {
// https://github.com/ant-design/ant-design/issues/4916
// https://github.com/ant-design/ant-design/issues/19542
maxHeight: tableFilterDropdownHeight,
overflowX: 'hidden',
border: 0,
boxShadow: 'none',
borderRadius: 'unset',
backgroundColor: filterDropdownMenuBg,
'&:empty::after': {
display: 'block',
padding: `${(0,cssinjs.unit)(paddingXS)} 0`,
color: colorTextDisabled,
fontSize: fontSizeSM,
textAlign: 'center',
content: '"Not Found"'
}
},
[`${tableFilterDropdownPrefixCls}-tree`]: {
paddingBlock: `${(0,cssinjs.unit)(paddingXS)} 0`,
paddingInline: paddingXS,
[treePrefixCls]: {
padding: 0
},
[`${treePrefixCls}-treenode ${treePrefixCls}-node-content-wrapper:hover`]: {
backgroundColor: controlItemBgHover
},
[`${treePrefixCls}-treenode-checkbox-checked ${treePrefixCls}-node-content-wrapper`]: {
'&, &:hover': {
backgroundColor: controlItemBgActive
}
}
},
[`${tableFilterDropdownPrefixCls}-search`]: {
padding: paddingXS,
borderBottom: tableBorder,
'&-input': {
input: {
minWidth: tableFilterDropdownSearchWidth
},
[iconCls]: {
color: colorTextDisabled
}
}
},
[`${tableFilterDropdownPrefixCls}-checkall`]: {
width: '100%',
marginBottom: paddingXXS,
marginInlineStart: paddingXXS
},
// Operation
[`${tableFilterDropdownPrefixCls}-btns`]: {
display: 'flex',
justifyContent: 'space-between',
padding: `${(0,cssinjs.unit)(calc(paddingXS).sub(lineWidth).equal())} ${(0,cssinjs.unit)(paddingXS)}`,
overflow: 'hidden',
borderTop: tableBorder
}
})
}
},
// Dropdown Menu & SubMenu
{
// submenu of table filter dropdown
[`${antCls}-dropdown ${tableFilterDropdownPrefixCls}, ${tableFilterDropdownPrefixCls}-submenu`]: {
// Checkbox
[`${antCls}-checkbox-wrapper + span`]: {
paddingInlineStart: paddingXS,
color: colorText
},
'> ul': {
maxHeight: 'calc(100vh - 130px)',
overflowX: 'hidden',
overflowY: 'auto'
}
}
}];
};
/* harmony default export */ var filter = (genFilterStyle);
;// ./components/table/style/fixed.ts
const genFixedStyle = token => {
const {
componentCls,
lineWidth,
colorSplit,
motionDurationSlow,
zIndexTableFixed,
tableBg,
zIndexTableSticky,
calc
} = token;
const shadowColor = colorSplit;
// Follow style is magic of shadow which should not follow token:
return {
[`${componentCls}-wrapper`]: {
[`
${componentCls}-cell-fix-left,
${componentCls}-cell-fix-right
`]: {
position: 'sticky !important',
zIndex: zIndexTableFixed,
background: tableBg
},
[`
${componentCls}-cell-fix-left-first::after,
${componentCls}-cell-fix-left-last::after
`]: {
position: 'absolute',
top: 0,
right: {
_skip_check_: true,
value: 0
},
bottom: calc(lineWidth).mul(-1).equal(),
width: 30,
transform: 'translateX(100%)',
transition: `box-shadow ${motionDurationSlow}`,
content: '""',
pointerEvents: 'none'
},
[`${componentCls}-cell-fix-left-all::after`]: {
display: 'none'
},
[`
${componentCls}-cell-fix-right-first::after,
${componentCls}-cell-fix-right-last::after
`]: {
position: 'absolute',
top: 0,
bottom: calc(lineWidth).mul(-1).equal(),
left: {
_skip_check_: true,
value: 0
},
width: 30,
transform: 'translateX(-100%)',
transition: `box-shadow ${motionDurationSlow}`,
content: '""',
pointerEvents: 'none'
},
[`${componentCls}-container`]: {
position: 'relative',
'&::before, &::after': {
position: 'absolute',
top: 0,
bottom: 0,
zIndex: calc(zIndexTableSticky).add(1).equal({
unit: false
}),
width: 30,
transition: `box-shadow ${motionDurationSlow}`,
content: '""',
pointerEvents: 'none'
},
'&::before': {
insetInlineStart: 0
},
'&::after': {
insetInlineEnd: 0
}
},
[`${componentCls}-ping-left`]: {
[`&:not(${componentCls}-has-fix-left) ${componentCls}-container::before`]: {
boxShadow: `inset 10px 0 8px -8px ${shadowColor}`
},
[`
${componentCls}-cell-fix-left-first::after,
${componentCls}-cell-fix-left-last::after
`]: {
boxShadow: `inset 10px 0 8px -8px ${shadowColor}`
},
[`${componentCls}-cell-fix-left-last::before`]: {
backgroundColor: 'transparent !important'
}
},
[`${componentCls}-ping-right`]: {
[`&:not(${componentCls}-has-fix-right) ${componentCls}-container::after`]: {
boxShadow: `inset -10px 0 8px -8px ${shadowColor}`
},
[`
${componentCls}-cell-fix-right-first::after,
${componentCls}-cell-fix-right-last::after
`]: {
boxShadow: `inset -10px 0 8px -8px ${shadowColor}`
}
},
// Gapped fixed Columns do not show the shadow
[`${componentCls}-fixed-column-gapped`]: {
[`
${componentCls}-cell-fix-left-first::after,
${componentCls}-cell-fix-left-last::after,
${componentCls}-cell-fix-right-first::after,
${componentCls}-cell-fix-right-last::after
`]: {
boxShadow: 'none'
}
}
}
};
};
/* harmony default export */ var fixed = (genFixedStyle);
;// ./components/table/style/pagination.ts
const genPaginationStyle = token => {
const {
componentCls,
antCls,
margin
} = token;
return {
[`${componentCls}-wrapper`]: {
// ========================== Pagination ==========================
[`${componentCls}-pagination${antCls}-pagination`]: {
margin: `${(0,cssinjs.unit)(margin)} 0`
},
[`${componentCls}-pagination`]: {
display: 'flex',
flexWrap: 'wrap',
rowGap: token.paddingXS,
'> *': {
flex: 'none'
},
'&-left': {
justifyContent: 'flex-start'
},
'&-center': {
justifyContent: 'center'
},
'&-right': {
justifyContent: 'flex-end'
}
}
}
};
};
/* harmony default export */ var pagination = (genPaginationStyle);
;// ./components/table/style/radius.ts
const genRadiusStyle = token => {
const {
componentCls,
tableRadius
} = token;
return {
[`${componentCls}-wrapper`]: {
[componentCls]: {
// https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
[`${componentCls}-title, ${componentCls}-header`]: {
borderRadius: `${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)} 0 0`
},
[`${componentCls}-title + ${componentCls}-container`]: {
borderStartStartRadius: 0,
borderStartEndRadius: 0,
// https://github.com/ant-design/ant-design/issues/41975
[`${componentCls}-header, table`]: {
borderRadius: 0
},
'table > thead > tr:first-child': {
'th:first-child, th:last-child, td:first-child, td:last-child': {
borderRadius: 0
}
}
},
'&-container': {
borderStartStartRadius: tableRadius,
borderStartEndRadius: tableRadius,
'table > thead > tr:first-child': {
'> *:first-child': {
borderStartStartRadius: tableRadius
},
'> *:last-child': {
borderStartEndRadius: tableRadius
}
}
},
'&-footer': {
borderRadius: `0 0 ${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)}`
}
}
}
};
};
/* harmony default export */ var radius = (genRadiusStyle);
;// ./components/table/style/rtl.ts
const genStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-wrapper-rtl`]: {
direction: 'rtl',
table: {
direction: 'rtl'
},
[`${componentCls}-pagination-left`]: {
justifyContent: 'flex-end'
},
[`${componentCls}-pagination-right`]: {
justifyContent: 'flex-start'
},
[`${componentCls}-row-expand-icon`]: {
float: 'right',
'&::after': {
transform: 'rotate(-90deg)'
},
'&-collapsed::before': {
transform: 'rotate(180deg)'
},
'&-collapsed::after': {
transform: 'rotate(0deg)'
}
},
[`${componentCls}-container`]: {
'&::before': {
insetInlineStart: 'unset',
insetInlineEnd: 0
},
'&::after': {
insetInlineStart: 0,
insetInlineEnd: 'unset'
},
[`${componentCls}-row-indent`]: {
float: 'right'
}
}
}
};
};
/* harmony default export */ var rtl = (genStyle);
;// ./components/table/style/selection.ts
const genSelectionStyle = token => {
const {
componentCls,
antCls,
iconCls,
fontSizeIcon,
padding,
paddingXS,
headerIconColor,
headerIconHoverColor,
tableSelectionColumnWidth,
tableSelectedRowBg,
tableSelectedRowHoverBg,
tableRowHoverBg,
tablePaddingHorizontal,
calc
} = token;
return {
[`${componentCls}-wrapper`]: {
// ========================== Selections ==========================
[`${componentCls}-selection-col`]: {
width: tableSelectionColumnWidth,
[`&${componentCls}-selection-col-with-dropdown`]: {
width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).equal()
}
},
[`${componentCls}-bordered ${componentCls}-selection-col`]: {
width: calc(tableSelectionColumnWidth).add(calc(paddingXS).mul(2)).equal(),
[`&${componentCls}-selection-col-with-dropdown`]: {
width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).add(calc(paddingXS).mul(2)).equal()
}
},
[`
table tr th${componentCls}-selection-column,
table tr td${componentCls}-selection-column,
${componentCls}-selection-column
`]: {
paddingInlineEnd: token.paddingXS,
paddingInlineStart: token.paddingXS,
textAlign: 'center',
[`${antCls}-radio-wrapper`]: {
marginInlineEnd: 0
}
},
[`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: {
zIndex: calc(token.zIndexTableFixed).add(1).equal({
unit: false
})
},
[`table tr th${componentCls}-selection-column::after`]: {
backgroundColor: 'transparent !important'
},
[`${componentCls}-selection`]: {
position: 'relative',
display: 'inline-flex',
flexDirection: 'column'
},
[`${componentCls}-selection-extra`]: {
position: 'absolute',
top: 0,
zIndex: 1,
cursor: 'pointer',
transition: `all ${token.motionDurationSlow}`,
marginInlineStart: '100%',
paddingInlineStart: (0,cssinjs.unit)(calc(tablePaddingHorizontal).div(4).equal()),
[iconCls]: {
color: headerIconColor,
fontSize: fontSizeIcon,
verticalAlign: 'baseline',
'&:hover': {
color: headerIconHoverColor
}
}
},
// ============================= Rows =============================
[`${componentCls}-tbody`]: {
[`${componentCls}-row`]: {
[`&${componentCls}-row-selected`]: {
[`> ${componentCls}-cell`]: {
background: tableSelectedRowBg,
'&-row-hover': {
background: tableSelectedRowHoverBg
}
}
},
[`> ${componentCls}-cell-row-hover`]: {
background: tableRowHoverBg
}
}
}
}
};
};
/* harmony default export */ var selection = (genSelectionStyle);
;// ./components/table/style/size.ts
const genSizeStyle = token => {
const {
componentCls,
tableExpandColumnWidth,
calc
} = token;
const getSizeStyle = (size, paddingVertical, paddingHorizontal, fontSize) => ({
[`${componentCls}${componentCls}-${size}`]: {
fontSize,
[`
${componentCls}-title,
${componentCls}-footer,
${componentCls}-cell,
${componentCls}-thead > tr > th,
${componentCls}-tbody > tr > th,
${componentCls}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]: {
padding: `${(0,cssinjs.unit)(paddingVertical)} ${(0,cssinjs.unit)(paddingHorizontal)}`
},
[`${componentCls}-filter-trigger`]: {
marginInlineEnd: (0,cssinjs.unit)(calc(paddingHorizontal).div(2).mul(-1).equal())
},
[`${componentCls}-expanded-row-fixed`]: {
margin: `${(0,cssinjs.unit)(calc(paddingVertical).mul(-1).equal())} ${(0,cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}`
},
[`${componentCls}-tbody`]: {
// ========================= Nest Table ===========================
[`${componentCls}-wrapper:only-child ${componentCls}`]: {
marginBlock: (0,cssinjs.unit)(calc(paddingVertical).mul(-1).equal()),
marginInline: `${(0,cssinjs.unit)(calc(tableExpandColumnWidth).sub(paddingHorizontal).equal())} ${(0,cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}`
}
},
// https://github.com/ant-design/ant-design/issues/35167
[`${componentCls}-selection-extra`]: {
paddingInlineStart: (0,cssinjs.unit)(calc(paddingHorizontal).div(4).equal())
}
}
});
return {
[`${componentCls}-wrapper`]: Object.assign(Object.assign({}, getSizeStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle)), getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall))
};
};
/* harmony default export */ var size = (genSizeStyle);
;// ./components/table/style/sorter.ts
const genSorterStyle = token => {
const {
componentCls,
marginXXS,
fontSizeIcon,
headerIconColor,
headerIconHoverColor
} = token;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-thead th${componentCls}-column-has-sorters`]: {
outline: 'none',
cursor: 'pointer',
// why left 0s? Avoid column header move with transition when left is changed
// https://github.com/ant-design/ant-design/issues/50588
transition: `all ${token.motionDurationSlow}, left 0s`,
'&:hover': {
background: token.tableHeaderSortHoverBg,
'&::before': {
backgroundColor: 'transparent !important'
}
},
'&:focus-visible': {
color: token.colorPrimary
},
// https://github.com/ant-design/ant-design/issues/30969
[`
&${componentCls}-cell-fix-left:hover,
&${componentCls}-cell-fix-right:hover
`]: {
background: token.tableFixedHeaderSortActiveBg
}
},
[`${componentCls}-thead th${componentCls}-column-sort`]: {
background: token.tableHeaderSortBg,
'&::before': {
backgroundColor: 'transparent !important'
}
},
[`td${componentCls}-column-sort`]: {
background: token.tableBodySortBg
},
[`${componentCls}-column-title`]: {
position: 'relative',
zIndex: 1,
flex: 1,
minWidth: 0
},
[`${componentCls}-column-sorters`]: {
display: 'flex',
flex: 'auto',
alignItems: 'center',
justifyContent: 'space-between',
'&::after': {
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
content: '""'
}
},
[`${componentCls}-column-sorters-tooltip-target-sorter`]: {
'&::after': {
content: 'none'
}
},
[`${componentCls}-column-sorter`]: {
marginInlineStart: marginXXS,
color: headerIconColor,
fontSize: 0,
transition: `color ${token.motionDurationSlow}`,
'&-inner': {
display: 'inline-flex',
flexDirection: 'column',
alignItems: 'center'
},
'&-up, &-down': {
fontSize: fontSizeIcon,
'&.active': {
color: token.colorPrimary
}
},
[`${componentCls}-column-sorter-up + ${componentCls}-column-sorter-down`]: {
marginTop: '-0.3em'
}
},
[`${componentCls}-column-sorters:hover ${componentCls}-column-sorter`]: {
color: headerIconHoverColor
}
}
};
};
/* harmony default export */ var sorter = (genSorterStyle);
;// ./components/table/style/sticky.ts
const genStickyStyle = token => {
const {
componentCls,
opacityLoading,
tableScrollThumbBg,
tableScrollThumbBgHover,
tableScrollThumbSize,
tableScrollBg,
zIndexTableSticky,
stickyScrollBarBorderRadius,
lineWidth,
lineType,
tableBorderColor
} = token;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-sticky`]: {
'&-holder': {
position: 'sticky',
zIndex: zIndexTableSticky,
background: token.colorBgContainer
},
'&-scroll': {
position: 'sticky',
bottom: 0,
height: `${(0,cssinjs.unit)(tableScrollThumbSize)} !important`,
zIndex: zIndexTableSticky,
display: 'flex',
alignItems: 'center',
background: tableScrollBg,
borderTop: tableBorder,
opacity: opacityLoading,
'&:hover': {
transformOrigin: 'center bottom'
},
// fake scrollbar style of sticky
'&-bar': {
height: tableScrollThumbSize,
backgroundColor: tableScrollThumbBg,
borderRadius: stickyScrollBarBorderRadius,
transition: `all ${token.motionDurationSlow}, transform none`,
position: 'absolute',
bottom: 0,
'&:hover, &-active': {
backgroundColor: tableScrollThumbBgHover
}
}
}
}
}
};
};
/* harmony default export */ var sticky = (genStickyStyle);
;// ./components/table/style/summary.ts
const genSummaryStyle = token => {
const {
componentCls,
lineWidth,
tableBorderColor,
calc
} = token;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${token.lineType} ${tableBorderColor}`;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-summary`]: {
position: 'relative',
zIndex: token.zIndexTableFixed,
background: token.tableBg,
'> tr': {
'> th, > td': {
borderBottom: tableBorder
}
}
},
[`div${componentCls}-summary`]: {
boxShadow: `0 ${(0,cssinjs.unit)(calc(lineWidth).mul(-1).equal())} 0 ${tableBorderColor}`
}
}
};
};
/* harmony default export */ var summary = (genSummaryStyle);
;// ./components/table/style/virtual.ts
const genVirtualStyle = token => {
const {
componentCls,
motionDurationMid,
lineWidth,
lineType,
tableBorderColor,
calc
} = token;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
const rowCellCls = `${componentCls}-expanded-row-cell`;
return {
[`${componentCls}-wrapper`]: {
// ========================== Row ==========================
[`${componentCls}-tbody-virtual`]: {
[`${componentCls}-tbody-virtual-holder-inner`]: {
[`
& > ${componentCls}-row,
& > div:not(${componentCls}-row) > ${componentCls}-row
`]: {
display: 'flex',
boxSizing: 'border-box',
width: '100%'
}
},
[`${componentCls}-cell`]: {
borderBottom: tableBorder,
transition: `background ${motionDurationMid}`
},
[`${componentCls}-expanded-row`]: {
[`${rowCellCls}${rowCellCls}-fixed`]: {
position: 'sticky',
insetInlineStart: 0,
overflow: 'hidden',
width: `calc(var(--virtual-width) - ${(0,cssinjs.unit)(lineWidth)})`,
borderInlineEnd: 'none'
}
}
},
// ======================== Border =========================
[`${componentCls}-bordered`]: {
[`${componentCls}-tbody-virtual`]: {
'&:after': {
content: '""',
insetInline: 0,
bottom: 0,
borderBottom: tableBorder,
position: 'absolute'
},
[`${componentCls}-cell`]: {
borderInlineEnd: tableBorder,
[`&${componentCls}-cell-fix-right-first:before`]: {
content: '""',
position: 'absolute',
insetBlock: 0,
insetInlineStart: calc(lineWidth).mul(-1).equal(),
borderInlineStart: tableBorder
}
}
},
// Empty placeholder
[`&${componentCls}-virtual`]: {
[`${componentCls}-placeholder ${componentCls}-cell`]: {
borderInlineEnd: tableBorder,
borderBottom: tableBorder
}
}
}
}
};
};
/* harmony default export */ var virtual = (genVirtualStyle);
;// ./components/table/style/index.ts
const genTableStyle = token => {
const {
componentCls,
fontWeightStrong,
tablePaddingVertical,
tablePaddingHorizontal,
tableExpandColumnWidth,
lineWidth,
lineType,
tableBorderColor,
tableFontSize,
tableBg,
tableRadius,
tableHeaderTextColor,
motionDurationMid,
tableHeaderBg,
tableHeaderCellSplitColor,
tableFooterTextColor,
tableFooterBg,
calc
} = token;
const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
return {
[`${componentCls}-wrapper`]: Object.assign(Object.assign({
clear: 'both',
maxWidth: '100%'
}, (0,style.clearFix)()), {
[componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
fontSize: tableFontSize,
background: tableBg,
borderRadius: `${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)} 0 0`,
// https://github.com/ant-design/ant-design/issues/47486
scrollbarColor: `${token.tableScrollThumbBg} ${token.tableScrollBg}`
}),
// https://github.com/ant-design/ant-design/issues/17611
table: {
width: '100%',
textAlign: 'start',
borderRadius: `${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)} 0 0`,
borderCollapse: 'separate',
borderSpacing: 0
},
// ============================= Cell ==============================
[`
${componentCls}-cell,
${componentCls}-thead > tr > th,
${componentCls}-tbody > tr > th,
${componentCls}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]: {
position: 'relative',
padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`,
overflowWrap: 'break-word'
},
// ============================ Title =============================
[`${componentCls}-title`]: {
padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`
},
// ============================ Header ============================
[`${componentCls}-thead`]: {
[`
> tr > th,
> tr > td
`]: {
position: 'relative',
color: tableHeaderTextColor,
fontWeight: fontWeightStrong,
textAlign: 'start',
background: tableHeaderBg,
borderBottom: tableBorder,
transition: `background ${motionDurationMid} ease`,
"&[colspan]:not([colspan='1'])": {
textAlign: 'center'
},
[`&:not(:last-child):not(${componentCls}-selection-column):not(${componentCls}-row-expand-icon-cell):not([colspan])::before`]: {
position: 'absolute',
top: '50%',
insetInlineEnd: 0,
width: 1,
height: '1.6em',
backgroundColor: tableHeaderCellSplitColor,
transform: 'translateY(-50%)',
transition: `background-color ${motionDurationMid}`,
content: '""'
}
},
'> tr:not(:last-child) > th[colspan]': {
borderBottom: 0
}
},
// ============================ Body ============================
[`${componentCls}-tbody`]: {
'> tr': {
'> th, > td': {
transition: `background ${motionDurationMid}, border-color ${motionDurationMid}`,
borderBottom: tableBorder,
// ========================= Nest Table ===========================
[`
> ${componentCls}-wrapper:only-child,
> ${componentCls}-expanded-row-fixed > ${componentCls}-wrapper:only-child
`]: {
[componentCls]: {
marginBlock: (0,cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal()),
marginInline: `${(0,cssinjs.unit)(calc(tableExpandColumnWidth).sub(tablePaddingHorizontal).equal())}
${(0,cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`,
[`${componentCls}-tbody > tr:last-child > td`]: {
borderBottomWidth: 0,
'&:first-child, &:last-child': {
borderRadius: 0
}
}
}
}
},
'> th': {
position: 'relative',
color: tableHeaderTextColor,
fontWeight: fontWeightStrong,
textAlign: 'start',
background: tableHeaderBg,
borderBottom: tableBorder,
transition: `background ${motionDurationMid} ease`
}
}
},
// ============================ Footer ============================
[`${componentCls}-footer`]: {
padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`,
color: tableFooterTextColor,
background: tableFooterBg
}
})
};
};
const prepareComponentToken = token => {
const {
colorFillAlter,
colorBgContainer,
colorTextHeading,
colorFillSecondary,
colorFillContent,
controlItemBgActive,
controlItemBgActiveHover,
padding,
paddingSM,
paddingXS,
colorBorderSecondary,
borderRadiusLG,
controlHeight,
colorTextPlaceholder,
fontSize,
fontSizeSM,
lineHeight,
lineWidth,
colorIcon,
colorIconHover,
opacityLoading,
controlInteractiveSize
} = token;
const colorFillSecondarySolid = new es.FastColor(colorFillSecondary).onBackground(colorBgContainer).toHexString();
const colorFillContentSolid = new es.FastColor(colorFillContent).onBackground(colorBgContainer).toHexString();
const colorFillAlterSolid = new es.FastColor(colorFillAlter).onBackground(colorBgContainer).toHexString();
const baseColorAction = new es.FastColor(colorIcon);
const baseColorActionHover = new es.FastColor(colorIconHover);
const expandIconHalfInner = controlInteractiveSize / 2 - lineWidth;
const expandIconSize = expandIconHalfInner * 2 + lineWidth * 3;
return {
headerBg: colorFillAlterSolid,
headerColor: colorTextHeading,
headerSortActiveBg: colorFillSecondarySolid,
headerSortHoverBg: colorFillContentSolid,
bodySortBg: colorFillAlterSolid,
rowHoverBg: colorFillAlterSolid,
rowSelectedBg: controlItemBgActive,
rowSelectedHoverBg: controlItemBgActiveHover,
rowExpandedBg: colorFillAlter,
cellPaddingBlock: padding,
cellPaddingInline: padding,
cellPaddingBlockMD: paddingSM,
cellPaddingInlineMD: paddingXS,
cellPaddingBlockSM: paddingXS,
cellPaddingInlineSM: paddingXS,
borderColor: colorBorderSecondary,
headerBorderRadius: borderRadiusLG,
footerBg: colorFillAlterSolid,
footerColor: colorTextHeading,
cellFontSize: fontSize,
cellFontSizeMD: fontSize,
cellFontSizeSM: fontSize,
headerSplitColor: colorBorderSecondary,
fixedHeaderSortActiveBg: colorFillSecondarySolid,
headerFilterHoverBg: colorFillContent,
filterDropdownMenuBg: colorBgContainer,
filterDropdownBg: colorBgContainer,
expandIconBg: colorBgContainer,
selectionColumnWidth: controlHeight,
stickyScrollBarBg: colorTextPlaceholder,
stickyScrollBarBorderRadius: 100,
expandIconMarginTop: (fontSize * lineHeight - lineWidth * 3) / 2 - Math.ceil((fontSizeSM * 1.4 - lineWidth * 3) / 2),
headerIconColor: baseColorAction.clone().setA(baseColorAction.a * opacityLoading).toRgbString(),
headerIconHoverColor: baseColorActionHover.clone().setA(baseColorActionHover.a * opacityLoading).toRgbString(),
expandIconHalfInner,
expandIconSize,
expandIconScale: controlInteractiveSize / expandIconSize
};
};
const zIndexTableFixed = 2;
// ============================== Export ==============================
/* harmony default export */ var table_style = ((0,genStyleUtils.genStyleHooks)('Table', token => {
const {
colorTextHeading,
colorSplit,
colorBgContainer,
controlInteractiveSize: checkboxSize,
headerBg,
headerColor,
headerSortActiveBg,
headerSortHoverBg,
bodySortBg,
rowHoverBg,
rowSelectedBg,
rowSelectedHoverBg,
rowExpandedBg,
cellPaddingBlock,
cellPaddingInline,
cellPaddingBlockMD,
cellPaddingInlineMD,
cellPaddingBlockSM,
cellPaddingInlineSM,
borderColor,
footerBg,
footerColor,
headerBorderRadius,
cellFontSize,
cellFontSizeMD,
cellFontSizeSM,
headerSplitColor,
fixedHeaderSortActiveBg,
headerFilterHoverBg,
filterDropdownBg,
expandIconBg,
selectionColumnWidth,
stickyScrollBarBg,
calc
} = token;
const tableToken = (0,cssinjs_utils_es.mergeToken)(token, {
tableFontSize: cellFontSize,
tableBg: colorBgContainer,
tableRadius: headerBorderRadius,
tablePaddingVertical: cellPaddingBlock,
tablePaddingHorizontal: cellPaddingInline,
tablePaddingVerticalMiddle: cellPaddingBlockMD,
tablePaddingHorizontalMiddle: cellPaddingInlineMD,
tablePaddingVerticalSmall: cellPaddingBlockSM,
tablePaddingHorizontalSmall: cellPaddingInlineSM,
tableBorderColor: borderColor,
tableHeaderTextColor: headerColor,
tableHeaderBg: headerBg,
tableFooterTextColor: footerColor,
tableFooterBg: footerBg,
tableHeaderCellSplitColor: headerSplitColor,
tableHeaderSortBg: headerSortActiveBg,
tableHeaderSortHoverBg: headerSortHoverBg,
tableBodySortBg: bodySortBg,
tableFixedHeaderSortActiveBg: fixedHeaderSortActiveBg,
tableHeaderFilterActiveBg: headerFilterHoverBg,
tableFilterDropdownBg: filterDropdownBg,
tableRowHoverBg: rowHoverBg,
tableSelectedRowBg: rowSelectedBg,
tableSelectedRowHoverBg: rowSelectedHoverBg,
zIndexTableFixed,
zIndexTableSticky: calc(zIndexTableFixed).add(1).equal({
unit: false
}),
tableFontSizeMiddle: cellFontSizeMD,
tableFontSizeSmall: cellFontSizeSM,
tableSelectionColumnWidth: selectionColumnWidth,
tableExpandIconBg: expandIconBg,
tableExpandColumnWidth: calc(checkboxSize).add(calc(token.padding).mul(2)).equal(),
tableExpandedRowBg: rowExpandedBg,
// Dropdown
tableFilterDropdownWidth: 120,
tableFilterDropdownHeight: 264,
tableFilterDropdownSearchWidth: 140,
// Virtual Scroll Bar
tableScrollThumbSize: 8,
// Mac scroll bar size
tableScrollThumbBg: stickyScrollBarBg,
tableScrollThumbBgHover: colorTextHeading,
tableScrollBg: colorSplit
});
return [genTableStyle(tableToken), pagination(tableToken), summary(tableToken), sorter(tableToken), filter(tableToken), bordered(tableToken), radius(tableToken), expand(tableToken), summary(tableToken), empty(tableToken), selection(tableToken), fixed(tableToken), sticky(tableToken), ellipsis(tableToken), size(tableToken), rtl(tableToken), virtual(tableToken)];
}, prepareComponentToken, {
unitless: {
expandIconScale: true
}
}));
/***/ }),
/***/ "./components/tabs/style/index.ts":
/*!****************************************************!*\
!*** ./components/tabs/style/index.ts + 1 modules ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ tabs_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/style/motion/slide.ts
var slide = __webpack_require__("./components/style/motion/slide.ts");
;// ./components/tabs/style/motion.ts
const genMotionStyle = token => {
const {
componentCls,
motionDurationSlow
} = token;
return [{
[componentCls]: {
[`${componentCls}-switch`]: {
'&-appear, &-enter': {
transition: 'none',
'&-start': {
opacity: 0
},
'&-active': {
opacity: 1,
transition: `opacity ${motionDurationSlow}`
}
},
'&-leave': {
position: 'absolute',
transition: 'none',
inset: 0,
'&-start': {
opacity: 1
},
'&-active': {
opacity: 0,
transition: `opacity ${motionDurationSlow}`
}
}
}
}
},
// Follow code may reuse in other components
[(0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down')]];
};
/* harmony default export */ var motion = (genMotionStyle);
;// ./components/tabs/style/index.ts
const genCardStyle = token => {
const {
componentCls,
tabsCardPadding,
cardBg,
cardGutter,
colorBorderSecondary,
itemSelectedColor
} = token;
return {
[`${componentCls}-card`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
margin: 0,
padding: tabsCardPadding,
background: cardBg,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`
},
[`${componentCls}-tab-active`]: {
color: itemSelectedColor,
background: token.colorBgContainer
},
[`${componentCls}-tab-focus`]: Object.assign({}, (0,style.genFocusOutline)(token, -3)),
[`${componentCls}-ink-bar`]: {
visibility: 'hidden'
},
[`& ${componentCls}-tab${componentCls}-tab-focus ${componentCls}-tab-btn`]: {
outline: 'none'
}
},
// ========================== Top & Bottom ==========================
[`&${componentCls}-top, &${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab + ${componentCls}-tab`]: {
marginLeft: {
_skip_check_: true,
value: (0,cssinjs.unit)(cardGutter)
}
}
}
},
[`&${componentCls}-top`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: `${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)} 0 0`
},
[`${componentCls}-tab-active`]: {
borderBottomColor: token.colorBgContainer
}
}
},
[`&${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: `0 0 ${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)}`
},
[`${componentCls}-tab-active`]: {
borderTopColor: token.colorBgContainer
}
}
},
// ========================== Left & Right ==========================
[`&${componentCls}-left, &${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab + ${componentCls}-tab`]: {
marginTop: (0,cssinjs.unit)(cardGutter)
}
}
},
[`&${componentCls}-left`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `${(0,cssinjs.unit)(token.borderRadiusLG)} 0 0 ${(0,cssinjs.unit)(token.borderRadiusLG)}`
}
},
[`${componentCls}-tab-active`]: {
borderRightColor: {
_skip_check_: true,
value: token.colorBgContainer
}
}
}
},
[`&${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `0 ${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)} 0`
}
},
[`${componentCls}-tab-active`]: {
borderLeftColor: {
_skip_check_: true,
value: token.colorBgContainer
}
}
}
}
}
};
};
const genDropdownStyle = token => {
const {
componentCls,
itemHoverColor,
dropdownEdgeChildVerticalPadding
} = token;
return {
[`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
position: 'absolute',
top: -9999,
left: {
_skip_check_: true,
value: -9999
},
zIndex: token.zIndexPopup,
display: 'block',
'&-hidden': {
display: 'none'
},
[`${componentCls}-dropdown-menu`]: {
maxHeight: token.tabsDropdownHeight,
margin: 0,
padding: `${(0,cssinjs.unit)(dropdownEdgeChildVerticalPadding)} 0`,
overflowX: 'hidden',
overflowY: 'auto',
textAlign: {
_skip_check_: true,
value: 'left'
},
listStyleType: 'none',
backgroundColor: token.colorBgContainer,
backgroundClip: 'padding-box',
borderRadius: token.borderRadiusLG,
outline: 'none',
boxShadow: token.boxShadowSecondary,
'&-item': Object.assign(Object.assign({}, style.textEllipsis), {
display: 'flex',
alignItems: 'center',
minWidth: token.tabsDropdownWidth,
margin: 0,
padding: `${(0,cssinjs.unit)(token.paddingXXS)} ${(0,cssinjs.unit)(token.paddingSM)}`,
color: token.colorText,
fontWeight: 'normal',
fontSize: token.fontSize,
lineHeight: token.lineHeight,
cursor: 'pointer',
transition: `all ${token.motionDurationSlow}`,
'> span': {
flex: 1,
whiteSpace: 'nowrap'
},
'&-remove': {
flex: 'none',
marginLeft: {
_skip_check_: true,
value: token.marginSM
},
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
background: 'transparent',
border: 0,
cursor: 'pointer',
'&:hover': {
color: itemHoverColor
}
},
'&:hover': {
background: token.controlItemBgHover
},
'&-disabled': {
'&, &:hover': {
color: token.colorTextDisabled,
background: 'transparent',
cursor: 'not-allowed'
}
}
})
}
})
};
};
const genPositionStyle = token => {
const {
componentCls,
margin,
colorBorderSecondary,
horizontalMargin,
verticalItemPadding,
verticalItemMargin,
calc
} = token;
return {
// ========================== Top & Bottom ==========================
[`${componentCls}-top, ${componentCls}-bottom`]: {
flexDirection: 'column',
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
margin: horizontalMargin,
'&::before': {
position: 'absolute',
right: {
_skip_check_: true,
value: 0
},
left: {
_skip_check_: true,
value: 0
},
borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
content: "''"
},
[`${componentCls}-ink-bar`]: {
height: token.lineWidthBold,
'&-animated': {
transition: `width ${token.motionDurationSlow}, left ${token.motionDurationSlow},
right ${token.motionDurationSlow}`
}
},
[`${componentCls}-nav-wrap`]: {
'&::before, &::after': {
top: 0,
bottom: 0,
width: token.controlHeight
},
'&::before': {
left: {
_skip_check_: true,
value: 0
},
boxShadow: token.boxShadowTabsOverflowLeft
},
'&::after': {
right: {
_skip_check_: true,
value: 0
},
boxShadow: token.boxShadowTabsOverflowRight
},
[`&${componentCls}-nav-wrap-ping-left::before`]: {
opacity: 1
},
[`&${componentCls}-nav-wrap-ping-right::after`]: {
opacity: 1
}
}
}
},
[`${componentCls}-top`]: {
[`> ${componentCls}-nav,
> div > ${componentCls}-nav`]: {
'&::before': {
bottom: 0
},
[`${componentCls}-ink-bar`]: {
bottom: 0
}
}
},
[`${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
order: 1,
marginTop: margin,
marginBottom: 0,
'&::before': {
top: 0
},
[`${componentCls}-ink-bar`]: {
top: 0
}
},
[`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
order: 0
}
},
// ========================== Left & Right ==========================
[`${componentCls}-left, ${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
flexDirection: 'column',
minWidth: calc(token.controlHeight).mul(1.25).equal(),
// >>>>>>>>>>> Tab
[`${componentCls}-tab`]: {
padding: verticalItemPadding,
textAlign: 'center'
},
[`${componentCls}-tab + ${componentCls}-tab`]: {
margin: verticalItemMargin
},
// >>>>>>>>>>> Nav
[`${componentCls}-nav-wrap`]: {
flexDirection: 'column',
'&::before, &::after': {
right: {
_skip_check_: true,
value: 0
},
left: {
_skip_check_: true,
value: 0
},
height: token.controlHeight
},
'&::before': {
top: 0,
boxShadow: token.boxShadowTabsOverflowTop
},
'&::after': {
bottom: 0,
boxShadow: token.boxShadowTabsOverflowBottom
},
[`&${componentCls}-nav-wrap-ping-top::before`]: {
opacity: 1
},
[`&${componentCls}-nav-wrap-ping-bottom::after`]: {
opacity: 1
}
},
// >>>>>>>>>>> Ink Bar
[`${componentCls}-ink-bar`]: {
width: token.lineWidthBold,
'&-animated': {
transition: `height ${token.motionDurationSlow}, top ${token.motionDurationSlow}`
}
},
[`${componentCls}-nav-list, ${componentCls}-nav-operations`]: {
flex: '1 0 auto',
// fix safari scroll problem
flexDirection: 'column'
}
}
},
[`${componentCls}-left`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-ink-bar`]: {
right: {
_skip_check_: true,
value: 0
}
}
},
[`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
marginLeft: {
_skip_check_: true,
value: (0,cssinjs.unit)(calc(token.lineWidth).mul(-1).equal())
},
borderLeft: {
_skip_check_: true,
value: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
},
[`> ${componentCls}-content > ${componentCls}-tabpane`]: {
paddingLeft: {
_skip_check_: true,
value: token.paddingLG
}
}
}
},
[`${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
order: 1,
[`${componentCls}-ink-bar`]: {
left: {
_skip_check_: true,
value: 0
}
}
},
[`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
order: 0,
marginRight: {
_skip_check_: true,
value: calc(token.lineWidth).mul(-1).equal()
},
borderRight: {
_skip_check_: true,
value: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
},
[`> ${componentCls}-content > ${componentCls}-tabpane`]: {
paddingRight: {
_skip_check_: true,
value: token.paddingLG
}
}
}
}
};
};
const genSizeStyle = token => {
const {
componentCls,
cardPaddingSM,
cardPaddingLG,
horizontalItemPaddingSM,
horizontalItemPaddingLG
} = token;
return {
[componentCls]: {
'&-small': {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: horizontalItemPaddingSM,
fontSize: token.titleFontSizeSM
}
}
},
'&-large': {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: horizontalItemPaddingLG,
fontSize: token.titleFontSizeLG
}
}
}
},
[`${componentCls}-card`]: {
[`&${componentCls}-small`]: {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: cardPaddingSM
}
},
[`&${componentCls}-bottom`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: `0 0 ${(0,cssinjs.unit)(token.borderRadius)} ${(0,cssinjs.unit)(token.borderRadius)}`
}
},
[`&${componentCls}-top`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: `${(0,cssinjs.unit)(token.borderRadius)} ${(0,cssinjs.unit)(token.borderRadius)} 0 0`
}
},
[`&${componentCls}-right`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `0 ${(0,cssinjs.unit)(token.borderRadius)} ${(0,cssinjs.unit)(token.borderRadius)} 0`
}
}
},
[`&${componentCls}-left`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `${(0,cssinjs.unit)(token.borderRadius)} 0 0 ${(0,cssinjs.unit)(token.borderRadius)}`
}
}
}
},
[`&${componentCls}-large`]: {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: cardPaddingLG
}
}
}
}
};
};
const genTabStyle = token => {
const {
componentCls,
itemActiveColor,
itemHoverColor,
iconCls,
tabsHorizontalItemMargin,
horizontalItemPadding,
itemSelectedColor,
itemColor
} = token;
const tabCls = `${componentCls}-tab`;
return {
[tabCls]: {
position: 'relative',
WebkitTouchCallout: 'none',
WebkitTapHighlightColor: 'transparent',
display: 'inline-flex',
alignItems: 'center',
padding: horizontalItemPadding,
fontSize: token.titleFontSize,
background: 'transparent',
border: 0,
outline: 'none',
cursor: 'pointer',
color: itemColor,
'&-btn, &-remove': {
'&:focus:not(:focus-visible), &:active': {
color: itemActiveColor
}
},
'&-btn': {
outline: 'none',
transition: `all ${token.motionDurationSlow}`,
[`${tabCls}-icon:not(:last-child)`]: {
marginInlineEnd: token.marginSM
}
},
'&-remove': Object.assign({
flex: 'none',
marginRight: {
_skip_check_: true,
value: token.calc(token.marginXXS).mul(-1).equal()
},
marginLeft: {
_skip_check_: true,
value: token.marginXS
},
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
background: 'transparent',
border: 'none',
outline: 'none',
cursor: 'pointer',
transition: `all ${token.motionDurationSlow}`,
'&:hover': {
color: token.colorTextHeading
}
}, (0,style.genFocusStyle)(token)),
'&:hover': {
color: itemHoverColor
},
[`&${tabCls}-active ${tabCls}-btn`]: {
color: itemSelectedColor,
textShadow: token.tabsActiveTextShadow
},
[`&${tabCls}-focus ${tabCls}-btn`]: Object.assign({}, (0,style.genFocusOutline)(token)),
[`&${tabCls}-disabled`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed'
},
[`&${tabCls}-disabled ${tabCls}-btn, &${tabCls}-disabled ${componentCls}-remove`]: {
'&:focus, &:active': {
color: token.colorTextDisabled
}
},
[`& ${tabCls}-remove ${iconCls}`]: {
margin: 0
},
[`${iconCls}:not(:last-child)`]: {
marginRight: {
_skip_check_: true,
value: token.marginSM
}
}
},
[`${tabCls} + ${tabCls}`]: {
margin: {
_skip_check_: true,
value: tabsHorizontalItemMargin
}
}
};
};
const genRtlStyle = token => {
const {
componentCls,
tabsHorizontalItemMarginRTL,
iconCls,
cardGutter,
calc
} = token;
const rtlCls = `${componentCls}-rtl`;
return {
[rtlCls]: {
direction: 'rtl',
[`${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
margin: {
_skip_check_: true,
value: tabsHorizontalItemMarginRTL
},
[`${componentCls}-tab:last-of-type`]: {
marginLeft: {
_skip_check_: true,
value: 0
}
},
[iconCls]: {
marginRight: {
_skip_check_: true,
value: 0
},
marginLeft: {
_skip_check_: true,
value: (0,cssinjs.unit)(token.marginSM)
}
},
[`${componentCls}-tab-remove`]: {
marginRight: {
_skip_check_: true,
value: (0,cssinjs.unit)(token.marginXS)
},
marginLeft: {
_skip_check_: true,
value: (0,cssinjs.unit)(calc(token.marginXXS).mul(-1).equal())
},
[iconCls]: {
margin: 0
}
}
}
},
[`&${componentCls}-left`]: {
[`> ${componentCls}-nav`]: {
order: 1
},
[`> ${componentCls}-content-holder`]: {
order: 0
}
},
[`&${componentCls}-right`]: {
[`> ${componentCls}-nav`]: {
order: 0
},
[`> ${componentCls}-content-holder`]: {
order: 1
}
},
// ====================== Card ======================
[`&${componentCls}-card${componentCls}-top, &${componentCls}-card${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab + ${componentCls}-tab`]: {
marginRight: {
_skip_check_: true,
value: cardGutter
},
marginLeft: {
_skip_check_: true,
value: 0
}
}
}
}
},
[`${componentCls}-dropdown-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-menu-item`]: {
[`${componentCls}-dropdown-rtl`]: {
textAlign: {
_skip_check_: true,
value: 'right'
}
}
}
};
};
const genTabsStyle = token => {
const {
componentCls,
tabsCardPadding,
cardHeight,
cardGutter,
itemHoverColor,
itemActiveColor,
colorBorderSecondary
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
display: 'flex',
// ========================== Navigation ==========================
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
position: 'relative',
display: 'flex',
flex: 'none',
alignItems: 'center',
[`${componentCls}-nav-wrap`]: {
position: 'relative',
display: 'flex',
flex: 'auto',
alignSelf: 'stretch',
overflow: 'hidden',
whiteSpace: 'nowrap',
transform: 'translate(0)',
// Fix chrome render bug
// >>>>> Ping shadow
'&::before, &::after': {
position: 'absolute',
zIndex: 1,
opacity: 0,
transition: `opacity ${token.motionDurationSlow}`,
content: "''",
pointerEvents: 'none'
}
},
[`${componentCls}-nav-list`]: {
position: 'relative',
display: 'flex',
transition: `opacity ${token.motionDurationSlow}`
},
// >>>>>>>> Operations
[`${componentCls}-nav-operations`]: {
display: 'flex',
alignSelf: 'stretch'
},
[`${componentCls}-nav-operations-hidden`]: {
position: 'absolute',
visibility: 'hidden',
pointerEvents: 'none'
},
[`${componentCls}-nav-more`]: {
position: 'relative',
padding: tabsCardPadding,
background: 'transparent',
border: 0,
color: token.colorText,
'&::after': {
position: 'absolute',
right: {
_skip_check_: true,
value: 0
},
bottom: 0,
left: {
_skip_check_: true,
value: 0
},
height: token.calc(token.controlHeightLG).div(8).equal(),
transform: 'translateY(100%)',
content: "''"
}
},
[`${componentCls}-nav-add`]: Object.assign({
minWidth: cardHeight,
marginLeft: {
_skip_check_: true,
value: cardGutter
},
padding: (0,cssinjs.unit)(token.paddingXS),
background: 'transparent',
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
borderRadius: `${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)} 0 0`,
outline: 'none',
cursor: 'pointer',
color: token.colorText,
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
'&:hover': {
color: itemHoverColor
},
'&:active, &:focus:not(:focus-visible)': {
color: itemActiveColor
}
}, (0,style.genFocusStyle)(token, -3))
},
[`${componentCls}-extra-content`]: {
flex: 'none'
},
// ============================ InkBar ============================
[`${componentCls}-ink-bar`]: {
position: 'absolute',
background: token.inkBarColor,
pointerEvents: 'none'
}
}), genTabStyle(token)), {
// =========================== TabPanes ===========================
[`${componentCls}-content`]: {
position: 'relative',
width: '100%'
},
[`${componentCls}-content-holder`]: {
flex: 'auto',
minWidth: 0,
minHeight: 0
},
[`${componentCls}-tabpane`]: Object.assign(Object.assign({}, (0,style.genFocusStyle)(token)), {
'&-hidden': {
display: 'none'
}
})
}),
[`${componentCls}-centered`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-nav-wrap`]: {
[`&:not([class*='${componentCls}-nav-wrap-ping']) > ${componentCls}-nav-list`]: {
margin: 'auto'
}
}
}
}
};
};
const prepareComponentToken = token => {
const cardHeight = token.controlHeightLG;
return {
zIndexPopup: token.zIndexPopupBase + 50,
cardBg: token.colorFillAlter,
cardHeight,
// Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
cardPadding: `${(cardHeight - Math.round(token.fontSize * token.lineHeight)) / 2 - token.lineWidth}px ${token.padding}px`,
cardPaddingSM: `${token.paddingXXS * 1.5}px ${token.padding}px`,
cardPaddingLG: `${token.paddingXS}px ${token.padding}px ${token.paddingXXS * 1.5}px`,
titleFontSize: token.fontSize,
titleFontSizeLG: token.fontSizeLG,
titleFontSizeSM: token.fontSize,
inkBarColor: token.colorPrimary,
horizontalMargin: `0 0 ${token.margin}px 0`,
horizontalItemGutter: 32,
// Fixed Value
// Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.
horizontalItemMargin: ``,
horizontalItemMarginRTL: ``,
horizontalItemPadding: `${token.paddingSM}px 0`,
horizontalItemPaddingSM: `${token.paddingXS}px 0`,
horizontalItemPaddingLG: `${token.padding}px 0`,
verticalItemPadding: `${token.paddingXS}px ${token.paddingLG}px`,
verticalItemMargin: `${token.margin}px 0 0 0`,
itemColor: token.colorText,
itemSelectedColor: token.colorPrimary,
itemHoverColor: token.colorPrimaryHover,
itemActiveColor: token.colorPrimaryActive,
cardGutter: token.marginXXS / 2
};
};
// ============================== Export ==============================
/* harmony default export */ var tabs_style = ((0,genStyleUtils.genStyleHooks)('Tabs', token => {
const tabsToken = (0,es.mergeToken)(token, {
// `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
tabsCardPadding: token.cardPadding,
dropdownEdgeChildVerticalPadding: token.paddingXXS,
tabsActiveTextShadow: '0 0 0.25px currentcolor',
tabsDropdownHeight: 200,
tabsDropdownWidth: 120,
tabsHorizontalItemMargin: `0 0 0 ${(0,cssinjs.unit)(token.horizontalItemGutter)}`,
tabsHorizontalItemMarginRTL: `0 0 0 ${(0,cssinjs.unit)(token.horizontalItemGutter)}`
});
return [genSizeStyle(tabsToken), genRtlStyle(tabsToken), genPositionStyle(tabsToken), genDropdownStyle(tabsToken), genCardStyle(tabsToken), genTabsStyle(tabsToken), motion(tabsToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/tag/style/index.ts":
/*!***************************************!*\
!*** ./components/tag/style/index.ts ***!
\***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
/* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
// ============================== Styles ==============================
const genBaseStyle = token => {
const {
paddingXXS,
lineWidth,
tagPaddingHorizontal,
componentCls,
calc
} = token;
const paddingInline = calc(tagPaddingHorizontal).sub(lineWidth).equal();
const iconMarginInline = calc(paddingXXS).sub(lineWidth).equal();
return {
// Result
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
display: 'inline-block',
height: 'auto',
// https://github.com/ant-design/ant-design/pull/47504
marginInlineEnd: token.marginXS,
paddingInline,
fontSize: token.tagFontSize,
lineHeight: token.tagLineHeight,
whiteSpace: 'nowrap',
background: token.defaultBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadiusSM,
opacity: 1,
transition: `all ${token.motionDurationMid}`,
textAlign: 'start',
position: 'relative',
// RTL
[`&${componentCls}-rtl`]: {
direction: 'rtl'
},
'&, a, a:hover': {
color: token.defaultColor
},
[`${componentCls}-close-icon`]: {
marginInlineStart: iconMarginInline,
fontSize: token.tagIconSize,
color: token.colorTextDescription,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`,
'&:hover': {
color: token.colorTextHeading
}
},
[`&${componentCls}-has-color`]: {
borderColor: 'transparent',
[`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {
color: token.colorTextLightSolid
}
},
'&-checkable': {
backgroundColor: 'transparent',
borderColor: 'transparent',
cursor: 'pointer',
[`&:not(${componentCls}-checkable-checked):hover`]: {
color: token.colorPrimary,
backgroundColor: token.colorFillSecondary
},
'&:active, &-checked': {
color: token.colorTextLightSolid
},
'&-checked': {
backgroundColor: token.colorPrimary,
'&:hover': {
backgroundColor: token.colorPrimaryHover
}
},
'&:active': {
backgroundColor: token.colorPrimaryActive
}
},
'&-hidden': {
display: 'none'
},
// To ensure that a space will be placed between character and `Icon`.
[`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {
marginInlineStart: paddingInline
}
}),
[`${componentCls}-borderless`]: {
borderColor: 'transparent',
background: token.tagBorderlessBg
}
};
};
// ============================== Export ==============================
const prepareToken = token => {
const {
lineWidth,
fontSizeIcon,
calc
} = token;
const tagFontSize = token.fontSizeSM;
const tagToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
tagFontSize,
tagLineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(calc(token.lineHeightSM).mul(tagFontSize).equal()),
tagIconSize: calc(fontSizeIcon).sub(calc(lineWidth).mul(2)).equal(),
// Tag icon is much smaller
tagPaddingHorizontal: 8,
// Fixed padding.
tagBorderlessBg: token.defaultBg
});
return tagToken;
};
const prepareComponentToken = token => ({
defaultBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorFillQuaternary).onBackground(token.colorBgContainer).toHexString(),
defaultColor: token.colorText
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Tag', token => {
const tagToken = prepareToken(token);
return genBaseStyle(tagToken);
}, prepareComponentToken));
/***/ }),
/***/ "./components/theme/context.ts":
/*!*************************************!*\
!*** ./components/theme/context.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ DesignTokenContext: function() { return /* binding */ DesignTokenContext; },
/* harmony export */ defaultConfig: function() { return /* binding */ defaultConfig; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _themes_seed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./themes/seed */ "./components/theme/themes/seed.ts");
// ================================ Context =================================
// To ensure snapshot stable. We disable hashed in test env.
const defaultConfig = {
token: _themes_seed__WEBPACK_IMPORTED_MODULE_1__["default"],
override: {
override: _themes_seed__WEBPACK_IMPORTED_MODULE_1__["default"]
},
hashed: true
};
const DesignTokenContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(defaultConfig);
/***/ }),
/***/ "./components/theme/interface/presetColors.ts":
/*!****************************************************!*\
!*** ./components/theme/interface/presetColors.ts ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PresetColors: function() { return /* binding */ PresetColors; }
/* harmony export */ });
const PresetColors = ['blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'];
/***/ }),
/***/ "./components/theme/themes/default/index.ts":
/*!**************************************************************!*\
!*** ./components/theme/themes/default/index.ts + 5 modules ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ derivative; }
});
// EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 3 modules
var es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
// EXTERNAL MODULE: ./components/theme/themes/seed.ts
var seed = __webpack_require__("./components/theme/themes/seed.ts");
// EXTERNAL MODULE: ./components/theme/themes/shared/genColorMapToken.ts
var genColorMapToken = __webpack_require__("./components/theme/themes/shared/genColorMapToken.ts");
;// ./components/theme/themes/shared/genRadius.ts
const genRadius = radiusBase => {
let radiusLG = radiusBase;
let radiusSM = radiusBase;
let radiusXS = radiusBase;
let radiusOuter = radiusBase;
// radiusLG
if (radiusBase < 6 && radiusBase >= 5) {
radiusLG = radiusBase + 1;
} else if (radiusBase < 16 && radiusBase >= 6) {
radiusLG = radiusBase + 2;
} else if (radiusBase >= 16) {
radiusLG = 16;
}
// radiusSM
if (radiusBase < 7 && radiusBase >= 5) {
radiusSM = 4;
} else if (radiusBase < 8 && radiusBase >= 7) {
radiusSM = 5;
} else if (radiusBase < 14 && radiusBase >= 8) {
radiusSM = 6;
} else if (radiusBase < 16 && radiusBase >= 14) {
radiusSM = 7;
} else if (radiusBase >= 16) {
radiusSM = 8;
}
// radiusXS
if (radiusBase < 6 && radiusBase >= 2) {
radiusXS = 1;
} else if (radiusBase >= 6) {
radiusXS = 2;
}
// radiusOuter
if (radiusBase > 4 && radiusBase < 8) {
radiusOuter = 4;
} else if (radiusBase >= 8) {
radiusOuter = 6;
}
return {
borderRadius: radiusBase,
borderRadiusXS: radiusXS,
borderRadiusSM: radiusSM,
borderRadiusLG: radiusLG,
borderRadiusOuter: radiusOuter
};
};
/* harmony default export */ var shared_genRadius = (genRadius);
;// ./components/theme/themes/shared/genCommonMapToken.ts
function genCommonMapToken(token) {
const {
motionUnit,
motionBase,
borderRadius,
lineWidth
} = token;
return Object.assign({
// motion
motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,
motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,
motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
// line
lineWidthBold: lineWidth + 1
}, shared_genRadius(borderRadius));
}
// EXTERNAL MODULE: ./components/theme/themes/shared/genControlHeight.ts
var genControlHeight = __webpack_require__("./components/theme/themes/shared/genControlHeight.ts");
// EXTERNAL MODULE: ./components/theme/themes/shared/genFontMapToken.ts
var genFontMapToken = __webpack_require__("./components/theme/themes/shared/genFontMapToken.ts");
;// ./components/theme/themes/shared/genSizeMapToken.ts
function genSizeMapToken(token) {
const {
sizeUnit,
sizeStep
} = token;
return {
sizeXXL: sizeUnit * (sizeStep + 8),
// 48
sizeXL: sizeUnit * (sizeStep + 4),
// 32
sizeLG: sizeUnit * (sizeStep + 2),
// 24
sizeMD: sizeUnit * (sizeStep + 1),
// 20
sizeMS: sizeUnit * sizeStep,
// 16
size: sizeUnit * sizeStep,
// 16
sizeSM: sizeUnit * (sizeStep - 1),
// 12
sizeXS: sizeUnit * (sizeStep - 2),
// 8
sizeXXS: sizeUnit * (sizeStep - 3) // 4
};
}
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var fast_color_es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
;// ./components/theme/themes/default/colorAlgorithm.ts
const getAlphaColor = (baseColor, alpha) => new fast_color_es.FastColor(baseColor).setA(alpha).toRgbString();
const getSolidColor = (baseColor, brightness) => {
const instance = new fast_color_es.FastColor(baseColor);
return instance.darken(brightness).toHexString();
};
;// ./components/theme/themes/default/colors.ts
const generateColorPalettes = baseColor => {
const colors = (0,es.generate)(baseColor);
return {
1: colors[0],
2: colors[1],
3: colors[2],
4: colors[3],
5: colors[4],
6: colors[5],
7: colors[6],
8: colors[4],
9: colors[5],
10: colors[6]
// 8: colors[7],
// 9: colors[8],
// 10: colors[9],
};
};
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
const colorBgBase = bgBaseColor || '#fff';
const colorTextBase = textBaseColor || '#000';
return {
colorBgBase,
colorTextBase,
colorText: getAlphaColor(colorTextBase, 0.88),
colorTextSecondary: getAlphaColor(colorTextBase, 0.65),
colorTextTertiary: getAlphaColor(colorTextBase, 0.45),
colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),
colorFill: getAlphaColor(colorTextBase, 0.15),
colorFillSecondary: getAlphaColor(colorTextBase, 0.06),
colorFillTertiary: getAlphaColor(colorTextBase, 0.04),
colorFillQuaternary: getAlphaColor(colorTextBase, 0.02),
colorBgSolid: getAlphaColor(colorTextBase, 1),
colorBgSolidHover: getAlphaColor(colorTextBase, 0.75),
colorBgSolidActive: getAlphaColor(colorTextBase, 0.95),
colorBgLayout: getSolidColor(colorBgBase, 4),
colorBgContainer: getSolidColor(colorBgBase, 0),
colorBgElevated: getSolidColor(colorBgBase, 0),
colorBgSpotlight: getAlphaColor(colorTextBase, 0.85),
colorBgBlur: 'transparent',
colorBorder: getSolidColor(colorBgBase, 15),
colorBorderSecondary: getSolidColor(colorBgBase, 6)
};
};
;// ./components/theme/themes/default/index.ts
function derivative(token) {
// pink is deprecated name of magenta, keep this for backwards compatibility
es.presetPrimaryColors.pink = es.presetPrimaryColors.magenta;
es.presetPalettes.pink = es.presetPalettes.magenta;
const colorPalettes = Object.keys(seed.defaultPresetColors).map(colorKey => {
const colors = token[colorKey] === es.presetPrimaryColors[colorKey] ? es.presetPalettes[colorKey] : (0,es.generate)(token[colorKey]);
return Array.from({
length: 10
}, () => 1).reduce((prev, _, i) => {
prev[`${colorKey}-${i + 1}`] = colors[i];
prev[`${colorKey}${i + 1}`] = colors[i];
return prev;
}, {});
}).reduce((prev, cur) => {
// biome-ignore lint/style/noParameterAssign: it is a reduce
prev = Object.assign(Object.assign({}, prev), cur);
return prev;
}, {});
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), (0,genColorMapToken["default"])(token, {
generateColorPalettes: generateColorPalettes,
generateNeutralColorPalettes: generateNeutralColorPalettes
})), (0,genFontMapToken["default"])(token.fontSize)), genSizeMapToken(token)), (0,genControlHeight["default"])(token)), genCommonMapToken(token));
}
/***/ }),
/***/ "./components/theme/themes/default/theme.ts":
/*!**************************************************!*\
!*** ./components/theme/themes/default/theme.ts ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./components/theme/themes/default/index.ts");
const defaultTheme = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.createTheme)(_index__WEBPACK_IMPORTED_MODULE_1__["default"]);
/* harmony default export */ __webpack_exports__["default"] = (defaultTheme);
/***/ }),
/***/ "./components/theme/themes/seed.ts":
/*!*****************************************!*\
!*** ./components/theme/themes/seed.ts ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ defaultPresetColors: function() { return /* binding */ defaultPresetColors; }
/* harmony export */ });
const defaultPresetColors = {
blue: '#1677FF',
purple: '#722ED1',
cyan: '#13C2C2',
green: '#52C41A',
magenta: '#EB2F96',
/**
* @deprecated Use magenta instead
*/
pink: '#EB2F96',
red: '#F5222D',
orange: '#FA8C16',
yellow: '#FADB14',
volcano: '#FA541C',
geekblue: '#2F54EB',
gold: '#FAAD14',
lime: '#A0D911'
};
const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
// Color
colorPrimary: '#1677ff',
colorSuccess: '#52c41a',
colorWarning: '#faad14',
colorError: '#ff4d4f',
colorInfo: '#1677ff',
colorLink: '',
colorTextBase: '',
colorBgBase: '',
// Font
fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
fontFamilyCode: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,
fontSize: 14,
// Line
lineWidth: 1,
lineType: 'solid',
// Motion
motionUnit: 0.1,
motionBase: 0,
motionEaseOutCirc: 'cubic-bezier(0.08, 0.82, 0.17, 1)',
motionEaseInOutCirc: 'cubic-bezier(0.78, 0.14, 0.15, 0.86)',
motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
motionEaseInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
motionEaseOutBack: 'cubic-bezier(0.12, 0.4, 0.29, 1.46)',
motionEaseInBack: 'cubic-bezier(0.71, -0.46, 0.88, 0.6)',
motionEaseInQuint: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',
motionEaseOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',
// Radius
borderRadius: 6,
// Size
sizeUnit: 4,
sizeStep: 4,
sizePopupArrow: 16,
// Control Base
controlHeight: 32,
// zIndex
zIndexBase: 0,
zIndexPopupBase: 1000,
// Image
opacityImage: 1,
// Wireframe
wireframe: false,
// Motion
motion: true
});
/* harmony default export */ __webpack_exports__["default"] = (seedToken);
/***/ }),
/***/ "./components/theme/themes/shared/genColorMapToken.ts":
/*!************************************************************!*\
!*** ./components/theme/themes/shared/genColorMapToken.ts ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ genColorMapToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
function genColorMapToken(seed, _ref) {
let {
generateColorPalettes,
generateNeutralColorPalettes
} = _ref;
const {
colorSuccess: colorSuccessBase,
colorWarning: colorWarningBase,
colorError: colorErrorBase,
colorInfo: colorInfoBase,
colorPrimary: colorPrimaryBase,
colorBgBase,
colorTextBase
} = seed;
const primaryColors = generateColorPalettes(colorPrimaryBase);
const successColors = generateColorPalettes(colorSuccessBase);
const warningColors = generateColorPalettes(colorWarningBase);
const errorColors = generateColorPalettes(colorErrorBase);
const infoColors = generateColorPalettes(colorInfoBase);
const neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);
// Color Link
const colorLink = seed.colorLink || seed.colorInfo;
const linkColors = generateColorPalettes(colorLink);
const colorErrorBgFilledHover = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(errorColors[1]).mix(new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(errorColors[3]), 50).toHexString();
return Object.assign(Object.assign({}, neutralColors), {
colorPrimaryBg: primaryColors[1],
colorPrimaryBgHover: primaryColors[2],
colorPrimaryBorder: primaryColors[3],
colorPrimaryBorderHover: primaryColors[4],
colorPrimaryHover: primaryColors[5],
colorPrimary: primaryColors[6],
colorPrimaryActive: primaryColors[7],
colorPrimaryTextHover: primaryColors[8],
colorPrimaryText: primaryColors[9],
colorPrimaryTextActive: primaryColors[10],
colorSuccessBg: successColors[1],
colorSuccessBgHover: successColors[2],
colorSuccessBorder: successColors[3],
colorSuccessBorderHover: successColors[4],
colorSuccessHover: successColors[4],
colorSuccess: successColors[6],
colorSuccessActive: successColors[7],
colorSuccessTextHover: successColors[8],
colorSuccessText: successColors[9],
colorSuccessTextActive: successColors[10],
colorErrorBg: errorColors[1],
colorErrorBgHover: errorColors[2],
colorErrorBgFilledHover,
colorErrorBgActive: errorColors[3],
colorErrorBorder: errorColors[3],
colorErrorBorderHover: errorColors[4],
colorErrorHover: errorColors[5],
colorError: errorColors[6],
colorErrorActive: errorColors[7],
colorErrorTextHover: errorColors[8],
colorErrorText: errorColors[9],
colorErrorTextActive: errorColors[10],
colorWarningBg: warningColors[1],
colorWarningBgHover: warningColors[2],
colorWarningBorder: warningColors[3],
colorWarningBorderHover: warningColors[4],
colorWarningHover: warningColors[4],
colorWarning: warningColors[6],
colorWarningActive: warningColors[7],
colorWarningTextHover: warningColors[8],
colorWarningText: warningColors[9],
colorWarningTextActive: warningColors[10],
colorInfoBg: infoColors[1],
colorInfoBgHover: infoColors[2],
colorInfoBorder: infoColors[3],
colorInfoBorderHover: infoColors[4],
colorInfoHover: infoColors[4],
colorInfo: infoColors[6],
colorInfoActive: infoColors[7],
colorInfoTextHover: infoColors[8],
colorInfoText: infoColors[9],
colorInfoTextActive: infoColors[10],
colorLinkHover: linkColors[4],
colorLink: linkColors[6],
colorLinkActive: linkColors[7],
colorBgMask: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('#000').setA(0.45).toRgbString(),
colorWhite: '#fff'
});
}
/***/ }),
/***/ "./components/theme/themes/shared/genControlHeight.ts":
/*!************************************************************!*\
!*** ./components/theme/themes/shared/genControlHeight.ts ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
const genControlHeight = token => {
const {
controlHeight
} = token;
return {
controlHeightSM: controlHeight * 0.75,
controlHeightXS: controlHeight * 0.5,
controlHeightLG: controlHeight * 1.25
};
};
/* harmony default export */ __webpack_exports__["default"] = (genControlHeight);
/***/ }),
/***/ "./components/theme/themes/shared/genFontMapToken.ts":
/*!***********************************************************!*\
!*** ./components/theme/themes/shared/genFontMapToken.ts ***!
\***********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _genFontSizes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./genFontSizes */ "./components/theme/themes/shared/genFontSizes.ts");
const genFontMapToken = fontSize => {
const fontSizePairs = (0,_genFontSizes__WEBPACK_IMPORTED_MODULE_0__["default"])(fontSize);
const fontSizes = fontSizePairs.map(pair => pair.size);
const lineHeights = fontSizePairs.map(pair => pair.lineHeight);
const fontSizeMD = fontSizes[1];
const fontSizeSM = fontSizes[0];
const fontSizeLG = fontSizes[2];
const lineHeight = lineHeights[1];
const lineHeightSM = lineHeights[0];
const lineHeightLG = lineHeights[2];
return {
fontSizeSM,
fontSize: fontSizeMD,
fontSizeLG,
fontSizeXL: fontSizes[3],
fontSizeHeading1: fontSizes[6],
fontSizeHeading2: fontSizes[5],
fontSizeHeading3: fontSizes[4],
fontSizeHeading4: fontSizes[3],
fontSizeHeading5: fontSizes[2],
lineHeight,
lineHeightLG,
lineHeightSM,
fontHeight: Math.round(lineHeight * fontSizeMD),
fontHeightLG: Math.round(lineHeightLG * fontSizeLG),
fontHeightSM: Math.round(lineHeightSM * fontSizeSM),
lineHeightHeading1: lineHeights[6],
lineHeightHeading2: lineHeights[5],
lineHeightHeading3: lineHeights[4],
lineHeightHeading4: lineHeights[3],
lineHeightHeading5: lineHeights[2]
};
};
/* harmony default export */ __webpack_exports__["default"] = (genFontMapToken);
/***/ }),
/***/ "./components/theme/themes/shared/genFontSizes.ts":
/*!********************************************************!*\
!*** ./components/theme/themes/shared/genFontSizes.ts ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ getFontSizes; },
/* harmony export */ getLineHeight: function() { return /* binding */ getLineHeight; }
/* harmony export */ });
function getLineHeight(fontSize) {
return (fontSize + 8) / fontSize;
}
// https://zhuanlan.zhihu.com/p/32746810
function getFontSizes(base) {
const fontSizes = Array.from({
length: 10
}).map((_, index) => {
const i = index - 1;
const baseSize = base * Math.pow(Math.E, i / 5);
const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);
// Convert to even
return Math.floor(intSize / 2) * 2;
});
fontSizes[1] = base;
return fontSizes.map(size => ({
size,
lineHeight: getLineHeight(size)
}));
}
/***/ }),
/***/ "./components/theme/useToken.ts":
/*!**************************************!*\
!*** ./components/theme/useToken.ts ***!
\**************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ useToken; },
/* harmony export */ unitless: function() { return /* binding */ unitless; }
/* harmony export */ });
/* unused harmony exports ignore, getComputedToken */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../version */ "./components/version/index.tsx");
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./context */ "./components/theme/context.ts");
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./components/theme/themes/default/theme.ts");
/* harmony import */ var _themes_seed__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./themes/seed */ "./components/theme/themes/seed.ts");
/* harmony import */ var _util_alias__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/alias */ "./components/theme/util/alias.ts");
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;
};
const unitless = {
lineHeight: true,
lineHeightSM: true,
lineHeightLG: true,
lineHeightHeading1: true,
lineHeightHeading2: true,
lineHeightHeading3: true,
lineHeightHeading4: true,
lineHeightHeading5: true,
opacityLoading: true,
fontWeightStrong: true,
zIndexPopupBase: true,
zIndexBase: true,
opacityImage: true
};
const ignore = {
size: true,
sizeSM: true,
sizeLG: true,
sizeMD: true,
sizeXS: true,
sizeXXS: true,
sizeMS: true,
sizeXL: true,
sizeXXL: true,
sizeUnit: true,
sizeStep: true,
motionBase: true,
motionUnit: true
};
const preserve = {
screenXS: true,
screenXSMin: true,
screenXSMax: true,
screenSM: true,
screenSMMin: true,
screenSMMax: true,
screenMD: true,
screenMDMin: true,
screenMDMax: true,
screenLG: true,
screenLGMin: true,
screenLGMax: true,
screenXL: true,
screenXLMin: true,
screenXLMax: true,
screenXXL: true,
screenXXLMin: true
};
const getComputedToken = (originToken, overrideToken, theme) => {
const derivativeToken = theme.getDerivativeToken(originToken);
const {
override
} = overrideToken,
components = __rest(overrideToken, ["override"]);
// Merge with override
let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {
override
});
// Format if needed
mergedDerivativeToken = (0,_util_alias__WEBPACK_IMPORTED_MODULE_1__["default"])(mergedDerivativeToken);
if (components) {
Object.entries(components).forEach(_ref => {
let [key, value] = _ref;
const {
theme: componentTheme
} = value,
componentTokens = __rest(value, ["theme"]);
let mergedComponentToken = componentTokens;
if (componentTheme) {
mergedComponentToken = getComputedToken(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {
override: componentTokens
}, componentTheme);
}
mergedDerivativeToken[key] = mergedComponentToken;
});
}
return mergedDerivativeToken;
};
// ================================== Hook ==================================
function useToken() {
const {
token: rootDesignToken,
hashed,
theme,
override,
cssVar
} = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_context__WEBPACK_IMPORTED_MODULE_2__.DesignTokenContext);
const salt = `${_version__WEBPACK_IMPORTED_MODULE_3__["default"]}-${hashed || ''}`;
const mergedTheme = theme || _context__WEBPACK_IMPORTED_MODULE_4__["default"];
const [token, hashId, realToken] = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_5__.useCacheToken)(mergedTheme, [_themes_seed__WEBPACK_IMPORTED_MODULE_6__["default"], rootDesignToken], {
salt,
override,
getComputedToken,
// formatToken will not be consumed after 1.15.0 with getComputedToken.
// But token will break if @ant-design/cssinjs is under 1.15.0 without it
formatToken: _util_alias__WEBPACK_IMPORTED_MODULE_1__["default"],
cssVar: cssVar && {
prefix: cssVar.prefix,
key: cssVar.key,
unitless,
ignore,
preserve
}
});
return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];
}
/***/ }),
/***/ "./components/theme/util/alias.ts":
/*!****************************************!*\
!*** ./components/theme/util/alias.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ formatToken; }
/* harmony export */ });
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _themes_seed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../themes/seed */ "./components/theme/themes/seed.ts");
/* harmony import */ var _getAlphaColor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getAlphaColor */ "./components/theme/util/getAlphaColor.ts");
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;
};
/**
* Seed (designer) > Derivative (designer) > Alias (developer).
*
* Merge seed & derivative & override token and generate alias token for developer.
*/
function formatToken(derivativeToken) {
const {
override
} = derivativeToken,
restToken = __rest(derivativeToken, ["override"]);
const overrideTokens = Object.assign({}, override);
Object.keys(_themes_seed__WEBPACK_IMPORTED_MODULE_1__["default"]).forEach(token => {
delete overrideTokens[token];
});
const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);
const screenXS = 480;
const screenSM = 576;
const screenMD = 768;
const screenLG = 992;
const screenXL = 1200;
const screenXXL = 1600;
// Motion
if (mergedToken.motion === false) {
const fastDuration = '0s';
mergedToken.motionDurationFast = fastDuration;
mergedToken.motionDurationMid = fastDuration;
mergedToken.motionDurationSlow = fastDuration;
}
// Generate alias token
const aliasToken = Object.assign(Object.assign(Object.assign({}, mergedToken), {
// ============== Background ============== //
colorFillContent: mergedToken.colorFillSecondary,
colorFillContentHover: mergedToken.colorFill,
colorFillAlter: mergedToken.colorFillQuaternary,
colorBgContainerDisabled: mergedToken.colorFillTertiary,
// ============== Split ============== //
colorBorderBg: mergedToken.colorBgContainer,
colorSplit: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),
// ============== Text ============== //
colorTextPlaceholder: mergedToken.colorTextQuaternary,
colorTextDisabled: mergedToken.colorTextQuaternary,
colorTextHeading: mergedToken.colorText,
colorTextLabel: mergedToken.colorTextSecondary,
colorTextDescription: mergedToken.colorTextTertiary,
colorTextLightSolid: mergedToken.colorWhite,
colorHighlight: mergedToken.colorError,
colorBgTextHover: mergedToken.colorFillSecondary,
colorBgTextActive: mergedToken.colorFill,
colorIcon: mergedToken.colorTextTertiary,
colorIconHover: mergedToken.colorText,
colorErrorOutline: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorErrorBg, mergedToken.colorBgContainer),
colorWarningOutline: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorWarningBg, mergedToken.colorBgContainer),
// Font
fontSizeIcon: mergedToken.fontSizeSM,
// Line
lineWidthFocus: mergedToken.lineWidth * 3,
// Control
lineWidth: mergedToken.lineWidth,
controlOutlineWidth: mergedToken.lineWidth * 2,
// Checkbox size and expand icon size
controlInteractiveSize: mergedToken.controlHeight / 2,
controlItemBgHover: mergedToken.colorFillTertiary,
controlItemBgActive: mergedToken.colorPrimaryBg,
controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,
controlItemBgActiveDisabled: mergedToken.colorFill,
controlTmpOutline: mergedToken.colorFillQuaternary,
controlOutline: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),
lineType: mergedToken.lineType,
borderRadius: mergedToken.borderRadius,
borderRadiusXS: mergedToken.borderRadiusXS,
borderRadiusSM: mergedToken.borderRadiusSM,
borderRadiusLG: mergedToken.borderRadiusLG,
fontWeightStrong: 600,
opacityLoading: 0.65,
linkDecoration: 'none',
linkHoverDecoration: 'none',
linkFocusDecoration: 'none',
controlPaddingHorizontal: 12,
controlPaddingHorizontalSM: 8,
paddingXXS: mergedToken.sizeXXS,
paddingXS: mergedToken.sizeXS,
paddingSM: mergedToken.sizeSM,
padding: mergedToken.size,
paddingMD: mergedToken.sizeMD,
paddingLG: mergedToken.sizeLG,
paddingXL: mergedToken.sizeXL,
paddingContentHorizontalLG: mergedToken.sizeLG,
paddingContentVerticalLG: mergedToken.sizeMS,
paddingContentHorizontal: mergedToken.sizeMS,
paddingContentVertical: mergedToken.sizeSM,
paddingContentHorizontalSM: mergedToken.size,
paddingContentVerticalSM: mergedToken.sizeXS,
marginXXS: mergedToken.sizeXXS,
marginXS: mergedToken.sizeXS,
marginSM: mergedToken.sizeSM,
margin: mergedToken.size,
marginMD: mergedToken.sizeMD,
marginLG: mergedToken.sizeLG,
marginXL: mergedToken.sizeXL,
marginXXL: mergedToken.sizeXXL,
boxShadow: `
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowSecondary: `
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowTertiary: `
0 1px 2px 0 rgba(0, 0, 0, 0.03),
0 1px 6px -1px rgba(0, 0, 0, 0.02),
0 2px 4px 0 rgba(0, 0, 0, 0.02)
`,
screenXS,
screenXSMin: screenXS,
screenXSMax: screenSM - 1,
screenSM,
screenSMMin: screenSM,
screenSMMax: screenMD - 1,
screenMD,
screenMDMin: screenMD,
screenMDMax: screenLG - 1,
screenLG,
screenLGMin: screenLG,
screenLGMax: screenXL - 1,
screenXL,
screenXLMin: screenXL,
screenXLMax: screenXXL - 1,
screenXXL,
screenXXLMin: screenXXL,
boxShadowPopoverArrow: '2px 2px 5px rgba(0, 0, 0, 0.05)',
boxShadowCard: `
0 1px 2px -2px ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('rgba(0, 0, 0, 0.16)').toRgbString()},
0 3px 6px 0 ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('rgba(0, 0, 0, 0.12)').toRgbString()},
0 5px 12px 4px ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('rgba(0, 0, 0, 0.09)').toRgbString()}
`,
boxShadowDrawerRight: `
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowDrawerLeft: `
6px 0 16px 0 rgba(0, 0, 0, 0.08),
3px 0 6px -4px rgba(0, 0, 0, 0.12),
9px 0 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowDrawerUp: `
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowDrawerDown: `
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowTabsOverflowLeft: 'inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)',
boxShadowTabsOverflowRight: 'inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)',
boxShadowTabsOverflowTop: 'inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)',
boxShadowTabsOverflowBottom: 'inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)'
}), overrideTokens);
return aliasToken;
}
/***/ }),
/***/ "./components/theme/util/genPresetColor.ts":
/*!*************************************************!*\
!*** ./components/theme/util/genPresetColor.ts ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ genPresetColor; }
/* harmony export */ });
/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interface */ "./components/theme/interface/presetColors.ts");
function genPresetColor(token, genCss) {
return _interface__WEBPACK_IMPORTED_MODULE_0__.PresetColors.reduce((prev, colorKey) => {
const lightColor = token[`${colorKey}1`];
const lightBorderColor = token[`${colorKey}3`];
const darkColor = token[`${colorKey}6`];
const textColor = token[`${colorKey}7`];
return Object.assign(Object.assign({}, prev), genCss(colorKey, {
lightColor,
lightBorderColor,
darkColor,
textColor
}));
}, {});
}
/***/ }),
/***/ "./components/theme/util/genStyleUtils.ts":
/*!************************************************!*\
!*** ./components/theme/util/genStyleUtils.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ genComponentStyleHook: function() { return /* binding */ genComponentStyleHook; },
/* harmony export */ genStyleHooks: function() { return /* binding */ genStyleHooks; },
/* harmony export */ genSubStyleComponent: function() { return /* binding */ genSubStyleComponent; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ant_design_cssinjs_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs-utils */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _config_provider_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config-provider/context */ "./components/config-provider/context.ts");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _useToken__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../useToken */ "./components/theme/useToken.ts");
const {
genStyleHooks,
genComponentStyleHook,
genSubStyleComponent
} = (0,_ant_design_cssinjs_utils__WEBPACK_IMPORTED_MODULE_1__.genStyleUtils)({
usePrefix: () => {
const {
getPrefixCls,
iconPrefixCls
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_config_provider_context__WEBPACK_IMPORTED_MODULE_2__.ConfigContext);
const rootPrefixCls = getPrefixCls();
return {
rootPrefixCls,
iconPrefixCls
};
},
useToken: () => {
const [theme, realToken, hashId, token, cssVar] = (0,_useToken__WEBPACK_IMPORTED_MODULE_3__["default"])();
return {
theme,
realToken,
hashId,
token,
cssVar
};
},
useCSP: () => {
const {
csp
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_config_provider_context__WEBPACK_IMPORTED_MODULE_2__.ConfigContext);
return csp !== null && csp !== void 0 ? csp : {};
},
getResetStyles: (token, config) => {
var _a;
const linkStyle = (0,_style__WEBPACK_IMPORTED_MODULE_4__.genLinkStyle)(token);
return [linkStyle, {
'&': linkStyle
}, (0,_style__WEBPACK_IMPORTED_MODULE_4__.genIconStyle)((_a = config === null || config === void 0 ? void 0 : config.prefix.iconPrefixCls) !== null && _a !== void 0 ? _a : _config_provider_context__WEBPACK_IMPORTED_MODULE_2__.defaultIconPrefixCls)];
},
getCommonStyle: _style__WEBPACK_IMPORTED_MODULE_4__.genCommonStyle,
getCompUnitless: () => _useToken__WEBPACK_IMPORTED_MODULE_3__.unitless
});
/***/ }),
/***/ "./components/theme/util/getAlphaColor.ts":
/*!************************************************!*\
!*** ./components/theme/util/getAlphaColor.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
function isStableColor(color) {
return color >= 0 && color <= 255;
}
function getAlphaColor(frontColor, backgroundColor) {
const {
r: fR,
g: fG,
b: fB,
a: originAlpha
} = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(frontColor).toRgb();
if (originAlpha < 1) {
return frontColor;
}
const {
r: bR,
g: bG,
b: bB
} = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(backgroundColor).toRgb();
for (let fA = 0.01; fA <= 1; fA += 0.01) {
const r = Math.round((fR - bR * (1 - fA)) / fA);
const g = Math.round((fG - bG * (1 - fA)) / fA);
const b = Math.round((fB - bB * (1 - fA)) / fA);
if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {
return new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor({
r,
g,
b,
a: Math.round(fA * 100) / 100
}).toRgbString();
}
}
// fallback
/* istanbul ignore next */
return new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor({
r: fR,
g: fG,
b: fB,
a: 1
}).toRgbString();
}
/* harmony default export */ __webpack_exports__["default"] = (getAlphaColor);
/***/ }),
/***/ "./components/theme/util/useResetIconStyle.ts":
/*!****************************************************!*\
!*** ./components/theme/util/useResetIconStyle.ts ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _useToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../useToken */ "./components/theme/useToken.ts");
const useResetIconStyle = (iconPrefixCls, csp) => {
const [theme, token] = (0,_useToken__WEBPACK_IMPORTED_MODULE_0__["default"])();
// Generate style for icons
return (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.useStyleRegister)({
theme,
token,
hashId: '',
path: ['ant-design-icons', iconPrefixCls],
nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce,
layer: {
name: 'antd'
}
}, () => [(0,_style__WEBPACK_IMPORTED_MODULE_2__.genIconStyle)(iconPrefixCls)]);
};
/* harmony default export */ __webpack_exports__["default"] = (useResetIconStyle);
/***/ }),
/***/ "./components/time-picker/locale/en_US.ts":
/*!************************************************!*\
!*** ./components/time-picker/locale/en_US.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
const locale = {
placeholder: 'Select time',
rangePlaceholder: ['Start time', 'End time']
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./components/time-picker/locale/kmr_IQ.ts":
/*!*************************************************!*\
!*** ./components/time-picker/locale/kmr_IQ.ts ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
const locale = {
placeholder: 'Demê hilbijêre'
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./components/time-picker/locale/zh_TW.ts":
/*!************************************************!*\
!*** ./components/time-picker/locale/zh_TW.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
const locale = {
placeholder: '請選擇時間'
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./components/timeline/style/index.ts":
/*!********************************************!*\
!*** ./components/timeline/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genTimelineStyle = token => {
const {
componentCls,
calc
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
margin: 0,
padding: 0,
listStyle: 'none',
[`${componentCls}-item`]: {
position: 'relative',
margin: 0,
paddingBottom: token.itemPaddingBottom,
fontSize: token.fontSize,
listStyle: 'none',
'&-tail': {
position: 'absolute',
insetBlockStart: token.itemHeadSize,
insetInlineStart: calc(calc(token.itemHeadSize).sub(token.tailWidth)).div(2).equal(),
height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.itemHeadSize)})`,
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.tailWidth)} ${token.lineType} ${token.tailColor}`
},
'&-pending': {
[`${componentCls}-item-head`]: {
fontSize: token.fontSizeSM,
backgroundColor: 'transparent'
},
[`${componentCls}-item-tail`]: {
display: 'none'
}
},
'&-head': {
position: 'absolute',
width: token.itemHeadSize,
height: token.itemHeadSize,
backgroundColor: token.dotBg,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.dotBorderWidth)} ${token.lineType} transparent`,
borderRadius: '50%',
'&-blue': {
color: token.colorPrimary,
borderColor: token.colorPrimary
},
'&-red': {
color: token.colorError,
borderColor: token.colorError
},
'&-green': {
color: token.colorSuccess,
borderColor: token.colorSuccess
},
'&-gray': {
color: token.colorTextDisabled,
borderColor: token.colorTextDisabled
}
},
'&-head-custom': {
position: 'absolute',
insetBlockStart: calc(token.itemHeadSize).div(2).equal(),
insetInlineStart: calc(token.itemHeadSize).div(2).equal(),
width: 'auto',
height: 'auto',
marginBlockStart: 0,
paddingBlock: token.customHeadPaddingVertical,
lineHeight: 1,
textAlign: 'center',
border: 0,
borderRadius: 0,
transform: 'translate(-50%, -50%)'
},
'&-content': {
position: 'relative',
insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.lineWidth).equal(),
marginInlineStart: calc(token.margin).add(token.itemHeadSize).equal(),
marginInlineEnd: 0,
marginBlockStart: 0,
marginBlockEnd: 0,
wordBreak: 'break-word'
},
'&-last': {
[`> ${componentCls}-item-tail`]: {
display: 'none'
},
[`> ${componentCls}-item-content`]: {
minHeight: calc(token.controlHeightLG).mul(1.2).equal()
}
}
},
[`&${componentCls}-alternate,
&${componentCls}-right,
&${componentCls}-label`]: {
[`${componentCls}-item`]: {
'&-tail, &-head, &-head-custom': {
insetInlineStart: '50%'
},
'&-head': {
marginInlineStart: calc(token.marginXXS).mul(-1).equal(),
'&-custom': {
marginInlineStart: calc(token.tailWidth).div(2).equal()
}
},
'&-left': {
[`${componentCls}-item-content`]: {
insetInlineStart: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginXXS)})`,
width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginSM)})`,
textAlign: 'start'
}
},
'&-right': {
[`${componentCls}-item-content`]: {
width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginSM)})`,
margin: 0,
textAlign: 'end'
}
}
}
},
[`&${componentCls}-right`]: {
[`${componentCls}-item-right`]: {
[`${componentCls}-item-tail,
${componentCls}-item-head,
${componentCls}-item-head-custom`]: {
insetInlineStart: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(calc(token.itemHeadSize).add(token.tailWidth)).div(2).equal())})`
},
[`${componentCls}-item-content`]: {
width: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(calc(token.itemHeadSize).add(token.marginXS).equal())})`
}
}
},
[`&${componentCls}-pending
${componentCls}-item-last
${componentCls}-item-tail`]: {
display: 'block',
height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.margin)})`,
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.tailWidth)} dotted ${token.tailColor}`
},
[`&${componentCls}-reverse
${componentCls}-item-last
${componentCls}-item-tail`]: {
display: 'none'
},
[`&${componentCls}-reverse ${componentCls}-item-pending`]: {
[`${componentCls}-item-tail`]: {
insetBlockStart: token.margin,
display: 'block',
height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.margin)})`,
borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.tailWidth)} dotted ${token.tailColor}`
},
[`${componentCls}-item-content`]: {
minHeight: calc(token.controlHeightLG).mul(1.2).equal()
}
},
[`&${componentCls}-label`]: {
[`${componentCls}-item-label`]: {
position: 'absolute',
insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.tailWidth).equal(),
width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginSM)})`,
textAlign: 'end'
},
[`${componentCls}-item-right`]: {
[`${componentCls}-item-label`]: {
insetInlineStart: `calc(50% + ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginSM)})`,
width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginSM)})`,
textAlign: 'start'
}
}
},
// ====================== RTL =======================
'&-rtl': {
direction: 'rtl',
[`${componentCls}-item-head-custom`]: {
transform: `translate(50%, -50%)`
}
}
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
tailColor: token.colorSplit,
tailWidth: token.lineWidthBold,
dotBorderWidth: token.wireframe ? token.lineWidthBold : token.lineWidth * 3,
dotBg: token.colorBgContainer,
itemPaddingBottom: token.padding * 1.25
});
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Timeline', token => {
const timeLineToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
itemHeadSize: 10,
customHeadPaddingVertical: token.paddingXXS,
paddingInlineEnd: 2
});
return [genTimelineStyle(timeLineToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/tooltip/style/index.ts":
/*!*******************************************!*\
!*** ./components/tooltip/style/index.ts ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/placementArrow */ "./components/style/placementArrow.ts");
/* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genPresetColor.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
const genTooltipStyle = token => {
const {
calc,
componentCls,
// ant-tooltip
tooltipMaxWidth,
tooltipColor,
tooltipBg,
tooltipBorderRadius,
zIndexPopup,
controlHeight,
boxShadowSecondary,
paddingSM,
paddingXS,
arrowOffsetHorizontal,
sizePopupArrow
} = token;
// arrowOffsetHorizontal + arrowWidth + borderRadius
const edgeAlignMinWidth = calc(tooltipBorderRadius).add(sizePopupArrow).add(arrowOffsetHorizontal).equal();
// borderRadius * 2 + arrowWidth
const centerAlignMinWidth = calc(tooltipBorderRadius).mul(2).add(sizePopupArrow).equal();
return [{
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
position: 'absolute',
zIndex: zIndexPopup,
display: 'block',
width: 'max-content',
maxWidth: tooltipMaxWidth,
visibility: 'visible',
// When use `autoArrow`, origin will follow the arrow position
'--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',
transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),
'&-hidden': {
display: 'none'
},
'--antd-arrow-background-color': tooltipBg,
// Wrapper for the tooltip content
[`${componentCls}-inner`]: {
minWidth: centerAlignMinWidth,
minHeight: controlHeight,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(paddingSM).div(2).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(paddingXS)}`,
color: tooltipColor,
textAlign: 'start',
textDecoration: 'none',
wordWrap: 'break-word',
backgroundColor: tooltipBg,
borderRadius: tooltipBorderRadius,
boxShadow: boxShadowSecondary,
boxSizing: 'border-box'
},
// Align placement should have another min width
[[`&-placement-topLeft`, `&-placement-topRight`, `&-placement-bottomLeft`, `&-placement-bottomRight`].join(',')]: {
minWidth: edgeAlignMinWidth
},
// Limit left and right placement radius
[[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {
[`${componentCls}-inner`]: {
borderRadius: token.min(tooltipBorderRadius, _style_placementArrow__WEBPACK_IMPORTED_MODULE_2__.MAX_VERTICAL_CONTENT_RADIUS)
}
},
[`${componentCls}-content`]: {
position: 'relative'
}
}), (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__["default"])(token, (colorKey, _ref) => {
let {
darkColor
} = _ref;
return {
[`&${componentCls}-${colorKey}`]: {
[`${componentCls}-inner`]: {
backgroundColor: darkColor
},
[`${componentCls}-arrow`]: {
'--antd-arrow-background-color': darkColor
}
}
};
})), {
// RTL
'&-rtl': {
direction: 'rtl'
}
})
},
// Arrow Style
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_2__["default"])(token, 'var(--antd-arrow-background-color)'),
// Pure Render
{
[`${componentCls}-pure`]: {
position: 'relative',
maxWidth: 'none',
margin: token.sizePopupArrow
}
}];
};
// ============================== Export ==============================
const prepareComponentToken = token => Object.assign(Object.assign({
zIndexPopup: token.zIndexPopupBase + 70
}, (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_2__.getArrowOffsetToken)({
contentRadius: token.borderRadius,
limitVerticalRadius: true
})), (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__.getArrowToken)((0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)
})));
/* harmony default export */ __webpack_exports__["default"] = (function (prefixCls) {
let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
const useStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Tooltip', token => {
const {
borderRadius,
colorTextLightSolid,
colorBgSpotlight
} = token;
const TooltipToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
// default variables
tooltipMaxWidth: 250,
tooltipColor: colorTextLightSolid,
tooltipBorderRadius: borderRadius,
tooltipBg: colorBgSpotlight
});
return [genTooltipStyle(TooltipToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_7__.initZoomMotion)(token, 'zoom-big-fast')];
}, prepareComponentToken, {
resetStyle: false,
// Popover use Tooltip as internal component. We do not need to handle this.
injectStyle
});
return useStyle(prefixCls);
});
/***/ }),
/***/ "./components/tour/style/index.ts":
/*!****************************************!*\
!*** ./components/tour/style/index.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style/placementArrow */ "./components/style/placementArrow.ts");
/* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
padding,
paddingXS,
borderRadius,
borderRadiusXS,
colorPrimary,
colorFill,
indicatorHeight,
indicatorWidth,
boxShadowTertiary,
zIndexPopup,
colorBgElevated,
fontWeightStrong,
marginXS,
colorTextLightSolid,
tourBorderRadius,
colorWhite,
primaryNextBtnHoverBg,
closeBtnSize,
motionDurationSlow,
antCls,
primaryPrevBtnBg
} = token;
return [{
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'absolute',
zIndex: zIndexPopup,
maxWidth: 'fit-content',
visibility: 'visible',
width: 520,
'--antd-arrow-background-color': colorBgElevated,
'&-pure': {
maxWidth: '100%',
position: 'relative'
},
[`&${componentCls}-hidden`]: {
display: 'none'
},
// ============================= panel content ============================
[`${componentCls}-content`]: {
position: 'relative'
},
[`${componentCls}-inner`]: {
textAlign: 'start',
textDecoration: 'none',
borderRadius: tourBorderRadius,
boxShadow: boxShadowTertiary,
position: 'relative',
backgroundColor: colorBgElevated,
border: 'none',
backgroundClip: 'padding-box',
[`${componentCls}-close`]: Object.assign({
position: 'absolute',
top: padding,
insetInlineEnd: padding,
color: token.colorIcon,
background: 'none',
border: 'none',
width: closeBtnSize,
height: closeBtnSize,
borderRadius: token.borderRadiusSM,
transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
cursor: 'pointer',
'&:hover': {
color: token.colorIconHover,
backgroundColor: token.colorBgTextHover
},
'&:active': {
backgroundColor: token.colorBgTextActive
}
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusStyle)(token)),
[`${componentCls}-cover`]: {
textAlign: 'center',
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(token.calc(padding).add(closeBtnSize).add(paddingXS).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(padding)} 0`,
img: {
width: '100%'
}
},
[`${componentCls}-header`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(paddingXS)}`,
width: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(closeBtnSize)})`,
wordBreak: 'break-word',
[`${componentCls}-title`]: {
fontWeight: fontWeightStrong
}
},
[`${componentCls}-description`]: {
padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(padding)}`,
wordWrap: 'break-word'
},
[`${componentCls}-footer`]: {
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(padding)}`,
textAlign: 'end',
borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(borderRadiusXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_2__.unit)(borderRadiusXS)}`,
display: 'flex',
[`${componentCls}-indicators`]: {
display: 'inline-block',
[`${componentCls}-indicator`]: {
width: indicatorWidth,
height: indicatorHeight,
display: 'inline-block',
borderRadius: '50%',
background: colorFill,
'&:not(:last-child)': {
marginInlineEnd: indicatorHeight
},
'&-active': {
background: colorPrimary
}
}
},
[`${componentCls}-buttons`]: {
marginInlineStart: 'auto',
[`${antCls}-btn`]: {
marginInlineStart: marginXS
}
}
}
},
// ============================= primary type ===========================
// `$` for panel, `&$` for pure panel
[`${componentCls}-primary, &${componentCls}-primary`]: {
'--antd-arrow-background-color': colorPrimary,
[`${componentCls}-inner`]: {
color: colorTextLightSolid,
textAlign: 'start',
textDecoration: 'none',
backgroundColor: colorPrimary,
borderRadius,
boxShadow: boxShadowTertiary,
[`${componentCls}-close`]: {
color: colorTextLightSolid
},
[`${componentCls}-indicators`]: {
[`${componentCls}-indicator`]: {
background: primaryPrevBtnBg,
'&-active': {
background: colorTextLightSolid
}
}
},
[`${componentCls}-prev-btn`]: {
color: colorTextLightSolid,
borderColor: primaryPrevBtnBg,
backgroundColor: colorPrimary,
'&:hover': {
backgroundColor: primaryPrevBtnBg,
borderColor: 'transparent'
}
},
[`${componentCls}-next-btn`]: {
color: colorPrimary,
borderColor: 'transparent',
background: colorWhite,
'&:hover': {
background: primaryNextBtnHoverBg
}
}
}
}
}),
// ============================= mask ===========================
[`${componentCls}-mask`]: {
[`${componentCls}-placeholder-animated`]: {
transition: `all ${motionDurationSlow}`
}
},
// =========== Limit left and right placement radius ==============
[['&-placement-left', '&-placement-leftTop', '&-placement-leftBottom', '&-placement-right', '&-placement-rightTop', '&-placement-rightBottom'].join(',')]: {
[`${componentCls}-inner`]: {
borderRadius: token.min(tourBorderRadius, _style_placementArrow__WEBPACK_IMPORTED_MODULE_3__.MAX_VERTICAL_CONTENT_RADIUS)
}
}
},
// ============================= Arrow ===========================
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_3__["default"])(token, 'var(--antd-arrow-background-color)')];
};
// ============================== Export ==============================
const prepareComponentToken = token => Object.assign(Object.assign({
zIndexPopup: token.zIndexPopupBase + 70,
closeBtnSize: token.fontSize * token.lineHeight,
primaryPrevBtnBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorTextLightSolid).setA(0.15).toRgbString(),
primaryNextBtnHoverBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorBgTextHover).onBackground(token.colorWhite).toRgbString()
}, (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_3__.getArrowOffsetToken)({
contentRadius: token.borderRadiusLG,
limitVerticalRadius: true
})), (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__.getArrowToken)(token));
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.genStyleHooks)('Tour', token => {
const {
borderRadiusLG
} = token;
const TourToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(token, {
indicatorWidth: 6,
indicatorHeight: 6,
tourBorderRadius: borderRadiusLG
});
return [genBaseStyle(TourToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/transfer/style/index.ts":
/*!********************************************!*\
!*** ./components/transfer/style/index.ts ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
const genTransferCustomizeStyle = token => {
const {
antCls,
componentCls,
listHeight,
controlHeightLG
} = token;
const tableCls = `${antCls}-table`;
const inputCls = `${antCls}-input`;
return {
[`${componentCls}-customize-list`]: {
[`${componentCls}-list`]: {
flex: '1 1 50%',
width: 'auto',
height: 'auto',
minHeight: listHeight,
minWidth: 0
},
// =================== Hook Components ===================
[`${tableCls}-wrapper`]: {
[`${tableCls}-small`]: {
border: 0,
borderRadius: 0,
[`${tableCls}-selection-column`]: {
width: controlHeightLG,
minWidth: controlHeightLG
}
},
[`${tableCls}-pagination${tableCls}-pagination`]: {
margin: 0,
padding: token.paddingXS
}
},
[`${inputCls}[disabled]`]: {
backgroundColor: 'transparent'
}
}
};
};
const genTransferStatusColor = (token, color) => {
const {
componentCls,
colorBorder
} = token;
return {
[`${componentCls}-list`]: {
borderColor: color,
'&-search:not([disabled])': {
borderColor: colorBorder
}
}
};
};
const genTransferStatusStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-status-error`]: Object.assign({}, genTransferStatusColor(token, token.colorError)),
[`${componentCls}-status-warning`]: Object.assign({}, genTransferStatusColor(token, token.colorWarning))
};
};
const genTransferListStyle = token => {
const {
componentCls,
colorBorder,
colorSplit,
lineWidth,
itemHeight,
headerHeight,
transferHeaderVerticalPadding,
itemPaddingBlock,
controlItemBgActive,
colorTextDisabled,
colorTextSecondary,
listHeight,
listWidth,
listWidthLG,
fontSizeIcon,
marginXS,
paddingSM,
lineType,
antCls,
iconCls,
motionDurationSlow,
controlItemBgHover,
borderRadiusLG,
colorBgContainer,
colorText,
controlItemBgActiveHover
} = token;
const contentBorderRadius = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(borderRadiusLG).sub(lineWidth).equal());
return {
display: 'flex',
flexDirection: 'column',
width: listWidth,
height: listHeight,
border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorBorder}`,
borderRadius: token.borderRadiusLG,
'&-with-pagination': {
width: listWidthLG,
height: 'auto'
},
'&-search': {
[`${iconCls}-search`]: {
color: colorTextDisabled
}
},
'&-header': {
display: 'flex',
flex: 'none',
alignItems: 'center',
height: headerHeight,
// border-top is on the transfer dom. We should minus 1px for this
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(transferHeaderVerticalPadding).sub(lineWidth).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(transferHeaderVerticalPadding)}`,
color: colorText,
background: colorBgContainer,
borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusLG)} 0 0`,
'> *:not(:last-child)': {
marginInlineEnd: 4 // This is magic and fixed number, DO NOT use token since it may change.
},
'> *': {
flex: 'none'
},
'&-title': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
flex: 'auto',
textAlign: 'end'
}),
'&-dropdown': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetIcon)()), {
fontSize: fontSizeIcon,
transform: 'translateY(10%)',
cursor: 'pointer',
'&[disabled]': {
cursor: 'not-allowed'
}
})
},
'&-body': {
display: 'flex',
flex: 'auto',
flexDirection: 'column',
fontSize: token.fontSize,
// https://blog.csdn.net/qq449245884/article/details/107373672/
minHeight: 0,
'&-search-wrapper': {
position: 'relative',
flex: 'none',
padding: paddingSM
}
},
'&-content': {
flex: 'auto',
margin: 0,
padding: 0,
overflow: 'auto',
listStyle: 'none',
borderRadius: `0 0 ${contentBorderRadius} ${contentBorderRadius}`,
'&-item': {
display: 'flex',
alignItems: 'center',
minHeight: itemHeight,
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(itemPaddingBlock)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM)}`,
transition: `all ${motionDurationSlow}`,
'> *:not(:last-child)': {
marginInlineEnd: marginXS
},
'> *': {
flex: 'none'
},
'&-text': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
flex: 'auto'
}),
'&-remove': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.operationUnit)(token)), {
color: colorBorder,
'&:hover, &:focus': {
color: colorTextSecondary
}
}),
[`&:not(${componentCls}-list-content-item-disabled)`]: {
'&:hover': {
backgroundColor: controlItemBgHover,
cursor: 'pointer'
},
[`&${componentCls}-list-content-item-checked:hover`]: {
backgroundColor: controlItemBgActiveHover
}
},
'&-checked': {
backgroundColor: controlItemBgActive
},
'&-disabled': {
color: colorTextDisabled,
cursor: 'not-allowed'
}
},
// Do not change hover style when `oneWay` mode
[`&-show-remove ${componentCls}-list-content-item:not(${componentCls}-list-content-item-disabled):hover`]: {
background: 'transparent',
cursor: 'default'
}
},
'&-pagination': {
padding: token.paddingXS,
textAlign: 'end',
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
[`${antCls}-pagination-options`]: {
paddingInlineEnd: token.paddingXS
}
},
'&-body-not-found': {
flex: 'none',
width: '100%',
margin: 'auto 0',
color: colorTextDisabled,
textAlign: 'center'
},
'&-footer': {
borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`
},
// fix: https://github.com/ant-design/ant-design/issues/44489
'&-checkbox': {
lineHeight: 1
}
};
};
const genTransferStyle = token => {
const {
antCls,
iconCls,
componentCls,
marginXS,
marginXXS,
fontSizeIcon,
colorBgContainerDisabled
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
position: 'relative',
display: 'flex',
alignItems: 'stretch',
[`${componentCls}-disabled`]: {
[`${componentCls}-list`]: {
background: colorBgContainerDisabled
}
},
[`${componentCls}-list`]: genTransferListStyle(token),
[`${componentCls}-operation`]: {
display: 'flex',
flex: 'none',
flexDirection: 'column',
alignSelf: 'center',
margin: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginXS)}`,
verticalAlign: 'middle',
gap: marginXXS,
[`${antCls}-btn ${iconCls}`]: {
fontSize: fontSizeIcon
}
}
})
};
};
const genTransferRTLStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-rtl`]: {
direction: 'rtl'
}
};
};
const prepareComponentToken = token => {
const {
fontSize,
lineHeight,
controlHeight,
controlHeightLG,
lineWidth
} = token;
const fontHeight = Math.round(fontSize * lineHeight);
return {
listWidth: 180,
listHeight: 200,
listWidthLG: 250,
headerHeight: controlHeightLG,
itemHeight: controlHeight,
itemPaddingBlock: (controlHeight - fontHeight) / 2,
transferHeaderVerticalPadding: Math.ceil((controlHeightLG - lineWidth - fontHeight) / 2)
};
};
// ============================== Export ==============================
/* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Transfer', token => {
const transferToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token);
return [genTransferStyle(transferToken), genTransferCustomizeStyle(transferToken), genTransferStatusStyle(transferToken), genTransferRTLStyle(transferToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/tree-select/style/index.ts":
/*!***********************************************!*\
!*** ./components/tree-select/style/index.ts ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ useTreeSelectStyle; }
/* harmony export */ });
/* unused harmony export prepareComponentToken */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../checkbox/style */ "./components/checkbox/style/index.ts");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
/* harmony import */ var _tree_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tree/style */ "./components/tree/style/index.ts");
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
treePrefixCls,
colorBgElevated
} = token;
const treeCls = `.${treePrefixCls}`;
return [
// ======================================================
// == Dropdown ==
// ======================================================
{
[`${componentCls}-dropdown`]: [{
padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.paddingXS).div(2).equal())}`
},
// ====================== Tree ======================
(0,_tree_style__WEBPACK_IMPORTED_MODULE_1__.genTreeStyle)(treePrefixCls, (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
colorBgContainer: colorBgElevated
})), {
[treeCls]: {
borderRadius: 0,
[`${treeCls}-list-holder-inner`]: {
alignItems: 'stretch',
[`${treeCls}-treenode`]: {
[`${treeCls}-node-content-wrapper`]: {
flex: 'auto'
}
}
}
}
},
// ==================== Checkbox ====================
(0,_checkbox_style__WEBPACK_IMPORTED_MODULE_3__.getStyle)(`${treePrefixCls}-checkbox`, token),
// ====================== RTL =======================
{
'&-rtl': {
direction: 'rtl',
[`${treeCls}-switcher${treeCls}-switcher_close`]: {
[`${treeCls}-switcher-icon svg`]: {
transform: 'rotate(90deg)'
}
}
}
}]
}];
};
const prepareComponentToken = _tree_style__WEBPACK_IMPORTED_MODULE_1__.initComponentToken;
// ============================== Export ==============================
function useTreeSelectStyle(prefixCls, treePrefixCls, rootCls) {
return (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('TreeSelect', token => {
const treeSelectToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
treePrefixCls
});
return [genBaseStyle(treeSelectToken)];
}, _tree_style__WEBPACK_IMPORTED_MODULE_1__.initComponentToken)(prefixCls, rootCls);
}
/***/ }),
/***/ "./components/tree/style/index.ts":
/*!****************************************************!*\
!*** ./components/tree/style/index.ts + 1 modules ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ tree_style; },
genTreeStyle: function() { return /* binding */ genTreeStyle; },
initComponentToken: function() { return /* binding */ initComponentToken; }
});
// UNUSED EXPORTS: genBaseStyle, prepareComponentToken
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./components/checkbox/style/index.ts
var style = __webpack_require__("./components/checkbox/style/index.ts");
// EXTERNAL MODULE: ./components/style/index.tsx
var components_style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/motion/collapse.ts
var collapse = __webpack_require__("./components/style/motion/collapse.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
;// ./components/tree/style/directory.ts
// ============================ Directory =============================
const genDirectoryStyle = _ref => {
let {
treeCls,
treeNodeCls,
directoryNodeSelectedBg,
directoryNodeSelectedColor,
motionDurationMid,
borderRadius,
controlItemBgHover
} = _ref;
return {
[`${treeCls}${treeCls}-directory ${treeNodeCls}`]: {
// >>> Title
[`${treeCls}-node-content-wrapper`]: {
position: 'static',
[`> *:not(${treeCls}-drop-indicator)`]: {
position: 'relative'
},
'&:hover': {
background: 'transparent'
},
// Expand interactive area to whole line
'&:before': {
position: 'absolute',
inset: 0,
transition: `background-color ${motionDurationMid}`,
content: '""',
borderRadius
},
'&:hover:before': {
background: controlItemBgHover
}
},
[`${treeCls}-switcher, ${treeCls}-checkbox, ${treeCls}-draggable-icon`]: {
zIndex: 1
},
// ============= Selected =============
'&-selected': {
[`${treeCls}-switcher, ${treeCls}-draggable-icon`]: {
color: directoryNodeSelectedColor
},
// >>> Title
[`${treeCls}-node-content-wrapper`]: {
color: directoryNodeSelectedColor,
background: 'transparent',
'&:before, &:hover:before': {
background: directoryNodeSelectedBg
}
}
}
}
};
};
;// ./components/tree/style/index.ts
// ============================ Keyframes =============================
const treeNodeFX = new cssinjs.Keyframes('ant-tree-node-fx-do-not-use', {
'0%': {
opacity: 0
},
'100%': {
opacity: 1
}
});
// ============================== Switch ==============================
const getSwitchStyle = (prefixCls, token) => ({
[`.${prefixCls}-switcher-icon`]: {
display: 'inline-block',
fontSize: 10,
verticalAlign: 'baseline',
svg: {
transition: `transform ${token.motionDurationSlow}`
}
}
});
// =============================== Drop ===============================
const getDropIndicatorStyle = (prefixCls, token) => ({
[`.${prefixCls}-drop-indicator`]: {
position: 'absolute',
// it should displayed over the following node
zIndex: 1,
height: 2,
backgroundColor: token.colorPrimary,
borderRadius: 1,
pointerEvents: 'none',
'&:after': {
position: 'absolute',
top: -3,
insetInlineStart: -6,
width: 8,
height: 8,
backgroundColor: 'transparent',
border: `${(0,cssinjs.unit)(token.lineWidthBold)} solid ${token.colorPrimary}`,
borderRadius: '50%',
content: '""'
}
}
});
const genBaseStyle = (prefixCls, token) => {
const {
treeCls,
treeNodeCls,
treeNodePadding,
titleHeight,
indentSize,
nodeSelectedBg,
nodeHoverBg,
colorTextQuaternary,
controlItemBgActiveDisabled
} = token;
return {
[treeCls]: Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), {
background: token.colorBgContainer,
borderRadius: token.borderRadius,
transition: `background-color ${token.motionDurationSlow}`,
'&-rtl': {
direction: 'rtl'
},
[`&${treeCls}-rtl ${treeCls}-switcher_close ${treeCls}-switcher-icon svg`]: {
transform: 'rotate(90deg)'
},
[`&-focused:not(:hover):not(${treeCls}-active-focused)`]: Object.assign({}, (0,components_style.genFocusOutline)(token)),
// =================== Virtual List ===================
[`${treeCls}-list-holder-inner`]: {
alignItems: 'flex-start'
},
[`&${treeCls}-block-node`]: {
[`${treeCls}-list-holder-inner`]: {
alignItems: 'stretch',
// >>> Title
[`${treeCls}-node-content-wrapper`]: {
flex: 'auto'
},
// >>> Drag
[`${treeNodeCls}.dragging:after`]: {
position: 'absolute',
inset: 0,
border: `1px solid ${token.colorPrimary}`,
opacity: 0,
animationName: treeNodeFX,
animationDuration: token.motionDurationSlow,
animationPlayState: 'running',
animationFillMode: 'forwards',
content: '""',
pointerEvents: 'none',
borderRadius: token.borderRadius
}
}
},
// ===================== TreeNode =====================
[treeNodeCls]: {
display: 'flex',
alignItems: 'flex-start',
marginBottom: treeNodePadding,
lineHeight: (0,cssinjs.unit)(titleHeight),
position: 'relative',
// 非常重要,避免 drop-indicator 在拖拽过程中闪烁
'&:before': {
content: '""',
position: 'absolute',
zIndex: 1,
insetInlineStart: 0,
width: '100%',
top: '100%',
height: treeNodePadding
},
// Disabled
[`&-disabled ${treeCls}-node-content-wrapper`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed',
'&:hover': {
background: 'transparent'
}
},
[`${treeCls}-checkbox-disabled + ${treeCls}-node-selected,&${treeNodeCls}-disabled${treeNodeCls}-selected ${treeCls}-node-content-wrapper`]: {
backgroundColor: controlItemBgActiveDisabled
},
// we can not set pointer-events to none for checkbox in tree
// ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-2605234058
[`${treeCls}-checkbox-disabled`]: {
pointerEvents: 'unset'
},
// not disable
[`&:not(${treeNodeCls}-disabled)`]: {
// >>> Title
[`${treeCls}-node-content-wrapper`]: {
'&:hover': {
color: token.nodeHoverColor
}
}
},
[`&-active ${treeCls}-node-content-wrapper`]: {
background: token.controlItemBgHover
},
[`&:not(${treeNodeCls}-disabled).filter-node ${treeCls}-title`]: {
color: token.colorPrimary,
fontWeight: 500
},
'&-draggable': {
cursor: 'grab',
[`${treeCls}-draggable-icon`]: {
// https://github.com/ant-design/ant-design/issues/41915
flexShrink: 0,
width: titleHeight,
textAlign: 'center',
visibility: 'visible',
color: colorTextQuaternary
},
[`&${treeNodeCls}-disabled ${treeCls}-draggable-icon`]: {
visibility: 'hidden'
}
}
},
// >>> Indent
[`${treeCls}-indent`]: {
alignSelf: 'stretch',
whiteSpace: 'nowrap',
userSelect: 'none',
'&-unit': {
display: 'inline-block',
width: indentSize
}
},
// >>> Drag Handler
[`${treeCls}-draggable-icon`]: {
visibility: 'hidden'
},
// Switcher / Checkbox
[`${treeCls}-switcher, ${treeCls}-checkbox`]: {
marginInlineEnd: token.calc(token.calc(titleHeight).sub(token.controlInteractiveSize)).div(2).equal()
},
// >>> Switcher
[`${treeCls}-switcher`]: Object.assign(Object.assign({}, getSwitchStyle(prefixCls, token)), {
position: 'relative',
flex: 'none',
alignSelf: 'stretch',
width: titleHeight,
textAlign: 'center',
cursor: 'pointer',
userSelect: 'none',
transition: `all ${token.motionDurationSlow}`,
'&-noop': {
cursor: 'unset'
},
'&:before': {
pointerEvents: 'none',
content: '""',
width: titleHeight,
height: titleHeight,
position: 'absolute',
left: {
_skip_check_: true,
value: 0
},
top: 0,
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationSlow}`
},
[`&:not(${treeCls}-switcher-noop):hover:before`]: {
backgroundColor: token.colorBgTextHover
},
[`&_close ${treeCls}-switcher-icon svg`]: {
transform: 'rotate(-90deg)'
},
'&-loading-icon': {
color: token.colorPrimary
},
'&-leaf-line': {
position: 'relative',
zIndex: 1,
display: 'inline-block',
width: '100%',
height: '100%',
// https://github.com/ant-design/ant-design/issues/31884
'&:before': {
position: 'absolute',
top: 0,
insetInlineEnd: token.calc(titleHeight).div(2).equal(),
bottom: token.calc(treeNodePadding).mul(-1).equal(),
marginInlineStart: -1,
borderInlineEnd: `1px solid ${token.colorBorder}`,
content: '""'
},
'&:after': {
position: 'absolute',
width: token.calc(token.calc(titleHeight).div(2).equal()).mul(0.8).equal(),
height: token.calc(titleHeight).div(2).equal(),
borderBottom: `1px solid ${token.colorBorder}`,
content: '""'
}
}
}),
// >>> Title
// add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`
[`${treeCls}-node-content-wrapper`]: Object.assign(Object.assign({
position: 'relative',
minHeight: titleHeight,
paddingBlock: 0,
paddingInline: token.paddingXS,
background: 'transparent',
borderRadius: token.borderRadius,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`
}, getDropIndicatorStyle(prefixCls, token)), {
'&:hover': {
backgroundColor: nodeHoverBg
},
[`&${treeCls}-node-selected`]: {
color: token.nodeSelectedColor,
backgroundColor: nodeSelectedBg
},
// Icon
[`${treeCls}-iconEle`]: {
display: 'inline-block',
width: titleHeight,
height: titleHeight,
textAlign: 'center',
verticalAlign: 'top',
'&:empty': {
display: 'none'
}
}
}),
// https://github.com/ant-design/ant-design/issues/28217
[`${treeCls}-unselectable ${treeCls}-node-content-wrapper:hover`]: {
backgroundColor: 'transparent'
},
[`${treeNodeCls}.drop-container > [draggable]`]: {
boxShadow: `0 0 0 2px ${token.colorPrimary}`
},
// ==================== Show Line =====================
'&-show-line': {
// ================ Indent lines ================
[`${treeCls}-indent-unit`]: {
position: 'relative',
height: '100%',
'&:before': {
position: 'absolute',
top: 0,
insetInlineEnd: token.calc(titleHeight).div(2).equal(),
bottom: token.calc(treeNodePadding).mul(-1).equal(),
borderInlineEnd: `1px solid ${token.colorBorder}`,
content: '""'
},
'&-end:before': {
display: 'none'
}
},
// ============== Cover Background ==============
[`${treeCls}-switcher`]: {
background: 'transparent',
'&-line-icon': {
// https://github.com/ant-design/ant-design/issues/32813
verticalAlign: '-0.15em'
}
}
},
[`${treeNodeCls}-leaf-last ${treeCls}-switcher-leaf-line:before`]: {
top: 'auto !important',
bottom: 'auto !important',
height: `${(0,cssinjs.unit)(token.calc(titleHeight).div(2).equal())} !important`
}
})
};
};
// ============================== Merged ==============================
const genTreeStyle = (prefixCls, token) => {
const treeCls = `.${prefixCls}`;
const treeNodeCls = `${treeCls}-treenode`;
const treeNodePadding = token.calc(token.paddingXS).div(2).equal();
const treeToken = (0,es.mergeToken)(token, {
treeCls,
treeNodeCls,
treeNodePadding
});
return [
// Basic
genBaseStyle(prefixCls, treeToken),
// Directory
genDirectoryStyle(treeToken)];
};
const initComponentToken = token => {
const {
controlHeightSM,
controlItemBgHover,
controlItemBgActive
} = token;
const titleHeight = controlHeightSM;
return {
titleHeight,
indentSize: titleHeight,
nodeHoverBg: controlItemBgHover,
nodeHoverColor: token.colorText,
nodeSelectedBg: controlItemBgActive,
nodeSelectedColor: token.colorText
};
};
const prepareComponentToken = token => {
const {
colorTextLightSolid,
colorPrimary
} = token;
return Object.assign(Object.assign({}, initComponentToken(token)), {
directoryNodeSelectedColor: colorTextLightSolid,
directoryNodeSelectedBg: colorPrimary
});
};
/* harmony default export */ var tree_style = ((0,genStyleUtils.genStyleHooks)('Tree', (token, _ref) => {
let {
prefixCls
} = _ref;
return [{
[token.componentCls]: (0,style.getStyle)(`${prefixCls}-checkbox`, token)
}, genTreeStyle(prefixCls, token), (0,collapse["default"])(token)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/typography/style/index.ts":
/*!**********************************************************!*\
!*** ./components/typography/style/index.ts + 1 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ typography_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 3 modules
var es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
;// ./components/typography/style/mixins.ts
/*
.typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMarginBottom;) {
margin-bottom: @headingMarginBottom;
color: @headingColor;
font-weight: @fontWeight;
fontSize: @fontSize;
line-height: @lineHeight;
}
*/
const getTitleStyle = (fontSize, lineHeight, color, token) => {
const {
titleMarginBottom,
fontWeightStrong
} = token;
return {
marginBottom: titleMarginBottom,
color,
fontWeight: fontWeightStrong,
fontSize,
lineHeight
};
};
const getTitleStyles = token => {
const headings = [1, 2, 3, 4, 5];
const styles = {};
headings.forEach(headingLevel => {
styles[`
h${headingLevel}&,
div&-h${headingLevel},
div&-h${headingLevel} > textarea,
h${headingLevel}
`] = getTitleStyle(token[`fontSizeHeading${headingLevel}`], token[`lineHeightHeading${headingLevel}`], token.colorTextHeading, token);
});
return styles;
};
const getLinkStyles = token => {
const {
componentCls
} = token;
return {
'a&, a': Object.assign(Object.assign({}, (0,style.operationUnit)(token)), {
userSelect: 'text',
[`&[disabled], &${componentCls}-disabled`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed',
'&:active, &:hover': {
color: token.colorTextDisabled
},
'&:active': {
pointerEvents: 'none'
}
}
})
};
};
const getResetStyles = token => ({
code: {
margin: '0 0.2em',
paddingInline: '0.4em',
paddingBlock: '0.2em 0.1em',
fontSize: '85%',
fontFamily: token.fontFamilyCode,
background: 'rgba(150, 150, 150, 0.1)',
border: '1px solid rgba(100, 100, 100, 0.2)',
borderRadius: 3
},
kbd: {
margin: '0 0.2em',
paddingInline: '0.4em',
paddingBlock: '0.15em 0.1em',
fontSize: '90%',
fontFamily: token.fontFamilyCode,
background: 'rgba(150, 150, 150, 0.06)',
border: '1px solid rgba(100, 100, 100, 0.2)',
borderBottomWidth: 2,
borderRadius: 3
},
mark: {
padding: 0,
// FIXME hardcode in v4
backgroundColor: es.gold[2]
},
'u, ins': {
textDecoration: 'underline',
textDecorationSkipInk: 'auto'
},
's, del': {
textDecoration: 'line-through'
},
strong: {
fontWeight: 600
},
// list
'ul, ol': {
marginInline: 0,
marginBlock: '0 1em',
padding: 0,
li: {
marginInline: '20px 0',
marginBlock: 0,
paddingInline: '4px 0',
paddingBlock: 0
}
},
ul: {
listStyleType: 'circle',
ul: {
listStyleType: 'disc'
}
},
ol: {
listStyleType: 'decimal'
},
// pre & block
'pre, blockquote': {
margin: '1em 0'
},
pre: {
padding: '0.4em 0.6em',
whiteSpace: 'pre-wrap',
wordWrap: 'break-word',
background: 'rgba(150, 150, 150, 0.1)',
border: '1px solid rgba(100, 100, 100, 0.2)',
borderRadius: 3,
fontFamily: token.fontFamilyCode,
// Compatible for marked
code: {
display: 'inline',
margin: 0,
padding: 0,
fontSize: 'inherit',
fontFamily: 'inherit',
background: 'transparent',
border: 0
}
},
blockquote: {
paddingInline: '0.6em 0',
paddingBlock: 0,
borderInlineStart: '4px solid rgba(100, 100, 100, 0.2)',
opacity: 0.85
}
});
const getEditableStyles = token => {
const {
componentCls,
paddingSM
} = token;
const inputShift = paddingSM;
return {
'&-edit-content': {
position: 'relative',
'div&': {
insetInlineStart: token.calc(token.paddingSM).mul(-1).equal(),
marginTop: token.calc(inputShift).mul(-1).equal(),
marginBottom: `calc(1em - ${(0,cssinjs.unit)(inputShift)})`
},
[`${componentCls}-edit-content-confirm`]: {
position: 'absolute',
insetInlineEnd: token.calc(token.marginXS).add(2).equal(),
insetBlockEnd: token.marginXS,
color: token.colorTextDescription,
// default style
fontWeight: 'normal',
fontSize: token.fontSize,
fontStyle: 'normal',
pointerEvents: 'none'
},
textarea: {
margin: '0!important',
// Fix Editable Textarea flash in Firefox
MozTransition: 'none',
height: '1em'
}
}
};
};
const getCopyableStyles = token => ({
[`${token.componentCls}-copy-success`]: {
[`
&,
&:hover,
&:focus`]: {
color: token.colorSuccess
}
},
[`${token.componentCls}-copy-icon-only`]: {
marginInlineStart: 0
}
});
const getEllipsisStyles = () => ({
[`
a&-ellipsis,
span&-ellipsis
`]: {
display: 'inline-block',
maxWidth: '100%'
},
'&-ellipsis-single-line': {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
// https://blog.csdn.net/iefreer/article/details/50421025
'a&, span&': {
verticalAlign: 'bottom'
},
'> code': {
paddingBlock: 0,
maxWidth: 'calc(100% - 1.2em)',
display: 'inline-block',
overflow: 'hidden',
textOverflow: 'ellipsis',
verticalAlign: 'bottom',
// https://github.com/ant-design/ant-design/issues/45953
boxSizing: 'content-box'
}
},
'&-ellipsis-multiple-line': {
display: '-webkit-box',
overflow: 'hidden',
WebkitLineClamp: 3,
WebkitBoxOrient: 'vertical'
}
});
;// ./components/typography/style/index.ts
const genTypographyStyle = token => {
const {
componentCls,
titleMarginTop
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
color: token.colorText,
wordBreak: 'break-word',
lineHeight: token.lineHeight,
[`&${componentCls}-secondary`]: {
color: token.colorTextDescription
},
[`&${componentCls}-success`]: {
color: token.colorSuccessText
},
[`&${componentCls}-warning`]: {
color: token.colorWarningText
},
[`&${componentCls}-danger`]: {
color: token.colorErrorText,
'a&:active, a&:focus': {
color: token.colorErrorTextActive
},
'a&:hover': {
color: token.colorErrorTextHover
}
},
[`&${componentCls}-disabled`]: {
color: token.colorTextDisabled,
cursor: 'not-allowed',
userSelect: 'none'
},
[`
div&,
p
`]: {
marginBottom: '1em'
}
}, getTitleStyles(token)), {
[`
& + h1${componentCls},
& + h2${componentCls},
& + h3${componentCls},
& + h4${componentCls},
& + h5${componentCls}
`]: {
marginTop: titleMarginTop
},
[`
div,
ul,
li,
p,
h1,
h2,
h3,
h4,
h5`]: {
[`
+ h1,
+ h2,
+ h3,
+ h4,
+ h5
`]: {
marginTop: titleMarginTop
}
}
}), getResetStyles(token)), getLinkStyles(token)), {
// Operation
[`
${componentCls}-expand,
${componentCls}-collapse,
${componentCls}-edit,
${componentCls}-copy
`]: Object.assign(Object.assign({}, (0,style.operationUnit)(token)), {
marginInlineStart: token.marginXXS
})
}), getEditableStyles(token)), getCopyableStyles(token)), getEllipsisStyles()), {
'&-rtl': {
direction: 'rtl'
}
})
};
};
const prepareComponentToken = () => ({
titleMarginTop: '1.2em',
titleMarginBottom: '0.5em'
});
// ============================== Export ==============================
/* harmony default export */ var typography_style = ((0,genStyleUtils.genStyleHooks)('Typography', token => [genTypographyStyle(token)], prepareComponentToken));
/***/ }),
/***/ "./components/upload/style/index.ts":
/*!******************************************************!*\
!*** ./components/upload/style/index.ts + 5 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ upload_style; }
});
// UNUSED EXPORTS: prepareComponentToken
// EXTERNAL MODULE: ./components/style/index.tsx
var style = __webpack_require__("./components/style/index.tsx");
// EXTERNAL MODULE: ./components/style/motion/collapse.ts
var collapse = __webpack_require__("./components/style/motion/collapse.ts");
// EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
;// ./components/upload/style/dragger.ts
const genDraggerStyle = token => {
const {
componentCls,
iconCls
} = token;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-drag`]: {
position: 'relative',
width: '100%',
height: '100%',
textAlign: 'center',
background: token.colorFillAlter,
border: `${(0,cssinjs.unit)(token.lineWidth)} dashed ${token.colorBorder}`,
borderRadius: token.borderRadiusLG,
cursor: 'pointer',
transition: `border-color ${token.motionDurationSlow}`,
[componentCls]: {
padding: token.padding
},
[`${componentCls}-btn`]: {
display: 'table',
width: '100%',
height: '100%',
outline: 'none',
borderRadius: token.borderRadiusLG,
'&:focus-visible': {
outline: `${(0,cssinjs.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`
}
},
[`${componentCls}-drag-container`]: {
display: 'table-cell',
verticalAlign: 'middle'
},
[`
&:not(${componentCls}-disabled):hover,
&-hover:not(${componentCls}-disabled)
`]: {
borderColor: token.colorPrimaryHover
},
[`p${componentCls}-drag-icon`]: {
marginBottom: token.margin,
[iconCls]: {
color: token.colorPrimary,
fontSize: token.uploadThumbnailSize
}
},
[`p${componentCls}-text`]: {
margin: `0 0 ${(0,cssinjs.unit)(token.marginXXS)}`,
color: token.colorTextHeading,
fontSize: token.fontSizeLG
},
[`p${componentCls}-hint`]: {
color: token.colorTextDescription,
fontSize: token.fontSize
},
// ===================== Disabled =====================
[`&${componentCls}-disabled`]: {
[`p${componentCls}-drag-icon ${iconCls},
p${componentCls}-text,
p${componentCls}-hint
`]: {
color: token.colorTextDisabled
}
}
}
}
};
};
/* harmony default export */ var dragger = (genDraggerStyle);
;// ./components/upload/style/list.ts
const genListStyle = token => {
const {
componentCls,
iconCls,
fontSize,
lineHeight,
calc
} = token;
const itemCls = `${componentCls}-list-item`;
const actionsCls = `${itemCls}-actions`;
const actionCls = `${itemCls}-action`;
return {
[`${componentCls}-wrapper`]: {
[`${componentCls}-list`]: Object.assign(Object.assign({}, (0,style.clearFix)()), {
lineHeight: token.lineHeight,
[itemCls]: {
position: 'relative',
height: calc(token.lineHeight).mul(fontSize).equal(),
marginTop: token.marginXS,
fontSize,
display: 'flex',
alignItems: 'center',
transition: `background-color ${token.motionDurationSlow}`,
borderRadius: token.borderRadiusSM,
'&:hover': {
backgroundColor: token.controlItemBgHover
},
[`${itemCls}-name`]: Object.assign(Object.assign({}, style.textEllipsis), {
padding: `0 ${(0,cssinjs.unit)(token.paddingXS)}`,
lineHeight,
flex: 'auto',
transition: `all ${token.motionDurationSlow}`
}),
[actionsCls]: {
whiteSpace: 'nowrap',
[actionCls]: {
opacity: 0
},
[iconCls]: {
color: token.actionsColor,
transition: `all ${token.motionDurationSlow}`
},
[`
${actionCls}:focus-visible,
&.picture ${actionCls}
`]: {
opacity: 1
}
},
[`${componentCls}-icon ${iconCls}`]: {
color: token.colorTextDescription,
fontSize
},
[`${itemCls}-progress`]: {
position: 'absolute',
bottom: token.calc(token.uploadProgressOffset).mul(-1).equal(),
width: '100%',
paddingInlineStart: calc(fontSize).add(token.paddingXS).equal(),
fontSize,
lineHeight: 0,
pointerEvents: 'none',
'> div': {
margin: 0
}
}
},
[`${itemCls}:hover ${actionCls}`]: {
opacity: 1
},
[`${itemCls}-error`]: {
color: token.colorError,
[`${itemCls}-name, ${componentCls}-icon ${iconCls}`]: {
color: token.colorError
},
[actionsCls]: {
[`${iconCls}, ${iconCls}:hover`]: {
color: token.colorError
},
[actionCls]: {
opacity: 1
}
}
},
[`${componentCls}-list-item-container`]: {
transition: `opacity ${token.motionDurationSlow}, height ${token.motionDurationSlow}`,
// For smooth removing animation
'&::before': {
display: 'table',
width: 0,
height: 0,
content: '""'
}
}
})
}
};
};
/* harmony default export */ var list = (genListStyle);
// EXTERNAL MODULE: ./components/style/motion/fade.ts
var fade = __webpack_require__("./components/style/motion/fade.ts");
;// ./components/upload/style/motion.ts
// =========================== Motion ===========================
const genMotionStyle = token => {
const {
componentCls
} = token;
const uploadAnimateInlineIn = new cssinjs.Keyframes('uploadAnimateInlineIn', {
from: {
width: 0,
height: 0,
padding: 0,
opacity: 0,
margin: token.calc(token.marginXS).div(-2).equal()
}
});
const uploadAnimateInlineOut = new cssinjs.Keyframes('uploadAnimateInlineOut', {
to: {
width: 0,
height: 0,
padding: 0,
opacity: 0,
margin: token.calc(token.marginXS).div(-2).equal()
}
});
const inlineCls = `${componentCls}-animate-inline`;
return [{
[`${componentCls}-wrapper`]: {
[`${inlineCls}-appear, ${inlineCls}-enter, ${inlineCls}-leave`]: {
animationDuration: token.motionDurationSlow,
animationTimingFunction: token.motionEaseInOutCirc,
animationFillMode: 'forwards'
},
[`${inlineCls}-appear, ${inlineCls}-enter`]: {
animationName: uploadAnimateInlineIn
},
[`${inlineCls}-leave`]: {
animationName: uploadAnimateInlineOut
}
}
}, {
[`${componentCls}-wrapper`]: (0,fade.initFadeMotion)(token)
}, uploadAnimateInlineIn, uploadAnimateInlineOut];
};
/* harmony default export */ var motion = (genMotionStyle);
// EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 3 modules
var colors_es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
;// ./components/upload/style/picture.ts
const genPictureStyle = token => {
const {
componentCls,
iconCls,
uploadThumbnailSize,
uploadProgressOffset,
calc
} = token;
const listCls = `${componentCls}-list`;
const itemCls = `${listCls}-item`;
return {
[`${componentCls}-wrapper`]: {
// ${listCls} 增加优先级
[`
${listCls}${listCls}-picture,
${listCls}${listCls}-picture-card,
${listCls}${listCls}-picture-circle
`]: {
[itemCls]: {
position: 'relative',
height: calc(uploadThumbnailSize).add(calc(token.lineWidth).mul(2)).add(calc(token.paddingXS).mul(2)).equal(),
padding: token.paddingXS,
border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadiusLG,
'&:hover': {
background: 'transparent'
},
[`${itemCls}-thumbnail`]: Object.assign(Object.assign({}, style.textEllipsis), {
width: uploadThumbnailSize,
height: uploadThumbnailSize,
lineHeight: (0,cssinjs.unit)(calc(uploadThumbnailSize).add(token.paddingSM).equal()),
textAlign: 'center',
flex: 'none',
[iconCls]: {
fontSize: token.fontSizeHeading2,
color: token.colorPrimary
},
img: {
display: 'block',
width: '100%',
height: '100%',
overflow: 'hidden'
}
}),
[`${itemCls}-progress`]: {
bottom: uploadProgressOffset,
width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingSM).mul(2).equal())})`,
marginTop: 0,
paddingInlineStart: calc(uploadThumbnailSize).add(token.paddingXS).equal()
}
},
[`${itemCls}-error`]: {
borderColor: token.colorError,
// Adjust the color of the error icon : https://github.com/ant-design/ant-design/pull/24160
[`${itemCls}-thumbnail ${iconCls}`]: {
[`svg path[fill='${colors_es.blue[0]}']`]: {
fill: token.colorErrorBg
},
[`svg path[fill='${colors_es.blue.primary}']`]: {
fill: token.colorError
}
}
},
[`${itemCls}-uploading`]: {
borderStyle: 'dashed',
[`${itemCls}-name`]: {
marginBottom: uploadProgressOffset
}
}
},
[`${listCls}${listCls}-picture-circle ${itemCls}`]: {
[`&, &::before, ${itemCls}-thumbnail`]: {
borderRadius: '50%'
}
}
}
};
};
const genPictureCardStyle = token => {
const {
componentCls,
iconCls,
fontSizeLG,
colorTextLightSolid,
calc
} = token;
const listCls = `${componentCls}-list`;
const itemCls = `${listCls}-item`;
const uploadPictureCardSize = token.uploadPicCardSize;
return {
[`
${componentCls}-wrapper${componentCls}-picture-card-wrapper,
${componentCls}-wrapper${componentCls}-picture-circle-wrapper
`]: Object.assign(Object.assign({}, (0,style.clearFix)()), {
display: 'block',
[`${componentCls}${componentCls}-select`]: {
width: uploadPictureCardSize,
height: uploadPictureCardSize,
textAlign: 'center',
verticalAlign: 'top',
backgroundColor: token.colorFillAlter,
border: `${(0,cssinjs.unit)(token.lineWidth)} dashed ${token.colorBorder}`,
borderRadius: token.borderRadiusLG,
cursor: 'pointer',
transition: `border-color ${token.motionDurationSlow}`,
[`> ${componentCls}`]: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
textAlign: 'center'
},
[`&:not(${componentCls}-disabled):hover`]: {
borderColor: token.colorPrimary
}
},
// list
[`${listCls}${listCls}-picture-card, ${listCls}${listCls}-picture-circle`]: {
display: 'flex',
flexWrap: 'wrap',
'@supports not (gap: 1px)': {
'& > *': {
marginBlockEnd: token.marginXS,
marginInlineEnd: token.marginXS
}
},
'@supports (gap: 1px)': {
gap: token.marginXS
},
[`${listCls}-item-container`]: {
display: 'inline-block',
width: uploadPictureCardSize,
height: uploadPictureCardSize,
verticalAlign: 'top'
},
'&::after': {
display: 'none'
},
'&::before': {
display: 'none'
},
[itemCls]: {
height: '100%',
margin: 0,
'&::before': {
position: 'absolute',
zIndex: 1,
width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,
height: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,
backgroundColor: token.colorBgMask,
opacity: 0,
transition: `all ${token.motionDurationSlow}`,
content: '" "'
}
},
[`${itemCls}:hover`]: {
[`&::before, ${itemCls}-actions`]: {
opacity: 1
}
},
[`${itemCls}-actions`]: {
position: 'absolute',
insetInlineStart: 0,
zIndex: 10,
width: '100%',
whiteSpace: 'nowrap',
textAlign: 'center',
opacity: 0,
transition: `all ${token.motionDurationSlow}`,
[`
${iconCls}-eye,
${iconCls}-download,
${iconCls}-delete
`]: {
zIndex: 10,
width: fontSizeLG,
margin: `0 ${(0,cssinjs.unit)(token.marginXXS)}`,
fontSize: fontSizeLG,
cursor: 'pointer',
transition: `all ${token.motionDurationSlow}`,
color: colorTextLightSolid,
'&:hover': {
color: colorTextLightSolid
},
svg: {
verticalAlign: 'baseline'
}
}
},
[`${itemCls}-thumbnail, ${itemCls}-thumbnail img`]: {
position: 'static',
display: 'block',
width: '100%',
height: '100%',
objectFit: 'contain'
},
[`${itemCls}-name`]: {
display: 'none',
textAlign: 'center'
},
[`${itemCls}-file + ${itemCls}-name`]: {
position: 'absolute',
bottom: token.margin,
display: 'block',
width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`
},
[`${itemCls}-uploading`]: {
[`&${itemCls}`]: {
backgroundColor: token.colorFillAlter
},
[`&::before, ${iconCls}-eye, ${iconCls}-download, ${iconCls}-delete`]: {
display: 'none'
}
},
[`${itemCls}-progress`]: {
bottom: token.marginXL,
width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,
paddingInlineStart: 0
}
}
}),
[`${componentCls}-wrapper${componentCls}-picture-circle-wrapper`]: {
[`${componentCls}${componentCls}-select`]: {
borderRadius: '50%'
}
}
};
};
;// ./components/upload/style/rtl.ts
// =========================== Motion ===========================
const genRtlStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-rtl`]: {
direction: 'rtl'
}
};
};
/* harmony default export */ var rtl = (genRtlStyle);
;// ./components/upload/style/index.ts
const genBaseStyle = token => {
const {
componentCls,
colorTextDisabled
} = token;
return {
[`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
[componentCls]: {
outline: 0,
"input[type='file']": {
cursor: 'pointer'
}
},
[`${componentCls}-select`]: {
display: 'inline-block'
},
[`${componentCls}-hidden`]: {
display: 'none'
},
[`${componentCls}-disabled`]: {
color: colorTextDisabled,
cursor: 'not-allowed'
}
})
};
};
const prepareComponentToken = token => ({
actionsColor: token.colorTextDescription
});
// ============================== Export ==============================
/* harmony default export */ var upload_style = ((0,genStyleUtils.genStyleHooks)('Upload', token => {
const {
fontSizeHeading3,
fontHeight,
lineWidth,
controlHeightLG,
calc
} = token;
const uploadToken = (0,es.mergeToken)(token, {
uploadThumbnailSize: calc(fontSizeHeading3).mul(2).equal(),
uploadProgressOffset: calc(calc(fontHeight).div(2)).add(lineWidth).equal(),
uploadPicCardSize: calc(controlHeightLG).mul(2.55).equal()
});
return [genBaseStyle(uploadToken), dragger(uploadToken), genPictureStyle(uploadToken), genPictureCardStyle(uploadToken), list(uploadToken), motion(uploadToken), rtl(uploadToken), (0,collapse["default"])(uploadToken)];
}, prepareComponentToken));
/***/ }),
/***/ "./components/version/index.tsx":
/*!**************************************************!*\
!*** ./components/version/index.tsx + 1 modules ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ components_version; }
});
;// ./components/version/version.ts
/* harmony default export */ var version = ('5.24.4');
;// ./components/version/index.tsx
/* eslint import/no-unresolved: 0 */
// @ts-ignore
/* harmony default export */ var components_version = (version);
/***/ }),
/***/ "./index-with-locales.js":
/*!*******************************!*\
!*** ./index-with-locales.js ***!
\*******************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
const antd = __webpack_require__(/*! ./components */ "./components/index.ts");
const req = __webpack_require__("./components sync recursive ^\\.\\/locale\\/[A-Za-z]+_[A-Za-z]+\\.tsx?$");
antd.locales = {};
req.keys().forEach(mod => {
const matches = mod.match(/\/([^/]+).tsx?$/);
antd.locales[matches[1]] = req(mod).default;
});
module.exports = antd;
/***/ }),
/***/ "./node_modules/@ant-design/colors/es/index.js":
/*!*****************************************************************!*\
!*** ./node_modules/@ant-design/colors/es/index.js + 3 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
blue: function() { return /* reexport */ blue; },
generate: function() { return /* reexport */ generate; },
gold: function() { return /* reexport */ gold; },
presetPalettes: function() { return /* reexport */ presetPalettes; },
presetPrimaryColors: function() { return /* reexport */ presetPrimaryColors; }
});
// UNUSED EXPORTS: blueDark, cyan, cyanDark, geekblue, geekblueDark, goldDark, gray, green, greenDark, grey, greyDark, lime, limeDark, magenta, magentaDark, orange, orangeDark, presetDarkPalettes, purple, purpleDark, red, redDark, volcano, volcanoDark, yellow, yellowDark
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
;// ./node_modules/@ant-design/colors/es/generate.js
var hueStep = 2; // 色相阶梯
var saturationStep = 0.16; // 饱和度阶梯,浅色部分
var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
var lightColorCount = 5; // 浅色数量,主色上
var darkColorCount = 4; // 深色数量,主色下
// 暗色主题颜色映射关系表
var darkColorMap = [{
index: 7,
amount: 15
}, {
index: 6,
amount: 25
}, {
index: 5,
amount: 30
}, {
index: 5,
amount: 45
}, {
index: 5,
amount: 65
}, {
index: 5,
amount: 85
}, {
index: 4,
amount: 90
}, {
index: 3,
amount: 95
}, {
index: 2,
amount: 97
}, {
index: 1,
amount: 98
}];
function getHue(hsv, i, light) {
var hue;
// 根据色相不同,色相转向不同
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
} else {
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
}
if (hue < 0) {
hue += 360;
} else if (hue >= 360) {
hue -= 360;
}
return hue;
}
function getSaturation(hsv, i, light) {
// grey color don't change saturation
if (hsv.h === 0 && hsv.s === 0) {
return hsv.s;
}
var saturation;
if (light) {
saturation = hsv.s - saturationStep * i;
} else if (i === darkColorCount) {
saturation = hsv.s + saturationStep;
} else {
saturation = hsv.s + saturationStep2 * i;
}
// 边界值修正
if (saturation > 1) {
saturation = 1;
}
// 第一格的 s 限制在 0.06-0.1 之间
if (light && i === lightColorCount && saturation > 0.1) {
saturation = 0.1;
}
if (saturation < 0.06) {
saturation = 0.06;
}
return Math.round(saturation * 100) / 100;
}
function getValue(hsv, i, light) {
var value;
if (light) {
value = hsv.v + brightnessStep1 * i;
} else {
value = hsv.v - brightnessStep2 * i;
}
// Clamp value between 0 and 1
value = Math.max(0, Math.min(1, value));
return Math.round(value * 100) / 100;
}
function generate(color) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var patterns = [];
var pColor = new es.FastColor(color);
var hsv = pColor.toHsv();
for (var i = lightColorCount; i > 0; i -= 1) {
var c = new es.FastColor({
h: getHue(hsv, i, true),
s: getSaturation(hsv, i, true),
v: getValue(hsv, i, true)
});
patterns.push(c);
}
patterns.push(pColor);
for (var _i = 1; _i <= darkColorCount; _i += 1) {
var _c = new es.FastColor({
h: getHue(hsv, _i),
s: getSaturation(hsv, _i),
v: getValue(hsv, _i)
});
patterns.push(_c);
}
// dark theme patterns
if (opts.theme === 'dark') {
return darkColorMap.map(function (_ref) {
var index = _ref.index,
amount = _ref.amount;
return new es.FastColor(opts.backgroundColor || '#141414').mix(patterns[index], amount).toHexString();
});
}
return patterns.map(function (c) {
return c.toHexString();
});
}
;// ./node_modules/@ant-design/colors/es/presets.js
// Generated by script. Do NOT modify!
var presetPrimaryColors = {
"red": "#F5222D",
"volcano": "#FA541C",
"orange": "#FA8C16",
"gold": "#FAAD14",
"yellow": "#FADB14",
"lime": "#A0D911",
"green": "#52C41A",
"cyan": "#13C2C2",
"blue": "#1677FF",
"geekblue": "#2F54EB",
"purple": "#722ED1",
"magenta": "#EB2F96",
"grey": "#666666"
};
var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
red.primary = red[5];
var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
volcano.primary = volcano[5];
var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
orange.primary = orange[5];
var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
gold.primary = gold[5];
var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
yellow.primary = yellow[5];
var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
lime.primary = lime[5];
var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
green.primary = green[5];
var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
cyan.primary = cyan[5];
var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
blue.primary = blue[5];
var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
geekblue.primary = geekblue[5];
var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
purple.primary = purple[5];
var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
magenta.primary = magenta[5];
var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
grey.primary = grey[5];
var gray = grey;
var presetPalettes = {
red: red,
volcano: volcano,
orange: orange,
gold: gold,
yellow: yellow,
lime: lime,
green: green,
cyan: cyan,
blue: blue,
geekblue: geekblue,
purple: purple,
magenta: magenta,
grey: grey
};
var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
redDark.primary = redDark[5];
var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
volcanoDark.primary = volcanoDark[5];
var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
orangeDark.primary = orangeDark[5];
var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
goldDark.primary = goldDark[5];
var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
yellowDark.primary = yellowDark[5];
var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
limeDark.primary = limeDark[5];
var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
greenDark.primary = greenDark[5];
var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
cyanDark.primary = cyanDark[5];
var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
blueDark.primary = blueDark[5];
var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
geekblueDark.primary = geekblueDark[5];
var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
purpleDark.primary = purpleDark[5];
var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
magentaDark.primary = magentaDark[5];
var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
greyDark.primary = greyDark[5];
var presetDarkPalettes = {
red: redDark,
volcano: volcanoDark,
orange: orangeDark,
gold: goldDark,
yellow: yellowDark,
lime: limeDark,
green: greenDark,
cyan: cyanDark,
blue: blueDark,
geekblue: geekblueDark,
purple: purpleDark,
magenta: magentaDark,
grey: greyDark
};
;// ./node_modules/@ant-design/colors/es/types.js
;// ./node_modules/@ant-design/colors/es/index.js
/***/ }),
/***/ "./node_modules/@ant-design/cssinjs-utils/es/index.js":
/*!*************************************************************************!*\
!*** ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules ***!
\*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
genStyleUtils: function() { return /* reexport */ util_genStyleUtils; },
mergeToken: function() { return /* reexport */ merge; }
});
// UNUSED EXPORTS: genCalc, statistic, statisticToken
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
// EXTERNAL MODULE: ./alias/cssinjs.js
var cssinjs = __webpack_require__("./alias/cssinjs.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/calculator.js
var AbstractCalculator = /*#__PURE__*/(0,createClass["default"])(function AbstractCalculator() {
(0,classCallCheck["default"])(this, AbstractCalculator);
});
/* harmony default export */ var calculator = (AbstractCalculator);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/CSSCalculator.js
var CALC_UNIT = 'CALC_UNIT';
var regexp = new RegExp(CALC_UNIT, 'g');
function unit(value) {
if (typeof value === 'number') {
return "".concat(value).concat(CALC_UNIT);
}
return value;
}
var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) {
(0,inherits["default"])(CSSCalculator, _AbstractCalculator);
var _super = (0,createSuper["default"])(CSSCalculator);
function CSSCalculator(num, unitlessCssVar) {
var _this;
(0,classCallCheck["default"])(this, CSSCalculator);
_this = _super.call(this);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", '');
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "unitlessCssVar", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "lowPriority", void 0);
var numType = (0,esm_typeof["default"])(num);
_this.unitlessCssVar = unitlessCssVar;
if (num instanceof CSSCalculator) {
_this.result = "(".concat(num.result, ")");
} else if (numType === 'number') {
_this.result = unit(num);
} else if (numType === 'string') {
_this.result = num;
}
return _this;
}
(0,createClass["default"])(CSSCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " + ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " + ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " - ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " - ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " * ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " * ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "div",
value: function div(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " / ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " / ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "getResult",
value: function getResult(force) {
return this.lowPriority || force ? "(".concat(this.result, ")") : this.result;
}
}, {
key: "equal",
value: function equal(options) {
var _this2 = this;
var _ref = options || {},
cssUnit = _ref.unit;
var mergedUnit = true;
if (typeof cssUnit === 'boolean') {
mergedUnit = cssUnit;
} else if (Array.from(this.unitlessCssVar).some(function (cssVar) {
return _this2.result.includes(cssVar);
})) {
mergedUnit = false;
}
this.result = this.result.replace(regexp, mergedUnit ? 'px' : '');
if (typeof this.lowPriority !== 'undefined') {
return "calc(".concat(this.result, ")");
}
return this.result;
}
}]);
return CSSCalculator;
}(calculator);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/NumCalculator.js
var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) {
(0,inherits["default"])(NumCalculator, _AbstractCalculator);
var _super = (0,createSuper["default"])(NumCalculator);
function NumCalculator(num) {
var _this;
(0,classCallCheck["default"])(this, NumCalculator);
_this = _super.call(this);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", 0);
if (num instanceof NumCalculator) {
_this.result = num.result;
} else if (typeof num === 'number') {
_this.result = num;
}
return _this;
}
(0,createClass["default"])(NumCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof NumCalculator) {
this.result += num.result;
} else if (typeof num === 'number') {
this.result += num;
}
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof NumCalculator) {
this.result -= num.result;
} else if (typeof num === 'number') {
this.result -= num;
}
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (num instanceof NumCalculator) {
this.result *= num.result;
} else if (typeof num === 'number') {
this.result *= num;
}
return this;
}
}, {
key: "div",
value: function div(num) {
if (num instanceof NumCalculator) {
this.result /= num.result;
} else if (typeof num === 'number') {
this.result /= num;
}
return this;
}
}, {
key: "equal",
value: function equal() {
return this.result;
}
}]);
return NumCalculator;
}(calculator);
/* harmony default export */ var calc_NumCalculator = (NumCalculator);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/index.js
var genCalc = function genCalc(type, unitlessCssVar) {
var Calculator = type === 'css' ? CSSCalculator : calc_NumCalculator;
return function (num) {
return new Calculator(num, unitlessCssVar);
};
};
/* harmony default export */ var util_calc = (genCalc);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/getCompVarPrefix.js
var getCompVarPrefix = function getCompVarPrefix(component, prefix) {
return "".concat([prefix, component.replace(/([A-Z]+)([A-Z][a-z]+)/g, '$1-$2').replace(/([a-z])([A-Z])/g, '$1-$2')].filter(Boolean).join('-'));
};
/* harmony default export */ var util_getCompVarPrefix = (getCompVarPrefix);
// EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
var es = __webpack_require__("./node_modules/rc-util/es/index.js");
;// ./node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js
function getComponentToken(component, token, defaultToken, options) {
var customToken = (0,objectSpread2["default"])({}, token[component]);
if (options !== null && options !== void 0 && options.deprecatedTokens) {
var deprecatedTokens = options.deprecatedTokens;
deprecatedTokens.forEach(function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 2),
oldTokenKey = _ref2[0],
newTokenKey = _ref2[1];
if (true) {
(0,es.warning)(!(customToken !== null && customToken !== void 0 && customToken[oldTokenKey]), "Component Token `".concat(String(oldTokenKey), "` of ").concat(String(component), " is deprecated. Please use `").concat(String(newTokenKey), "` instead."));
}
// Should wrap with `if` clause, or there will be `undefined` in object.
if (customToken !== null && customToken !== void 0 && customToken[oldTokenKey] || customToken !== null && customToken !== void 0 && customToken[newTokenKey]) {
var _customToken$newToken;
(_customToken$newToken = customToken[newTokenKey]) !== null && _customToken$newToken !== void 0 ? _customToken$newToken : customToken[newTokenKey] = customToken === null || customToken === void 0 ? void 0 : customToken[oldTokenKey];
}
});
}
var mergedToken = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, defaultToken), customToken);
// Remove same value as global token to minimize size
Object.keys(mergedToken).forEach(function (key) {
if (mergedToken[key] === token[key]) {
delete mergedToken[key];
}
});
return mergedToken;
}
/* harmony default export */ var util_getComponentToken = (getComponentToken);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/statistic.js
var enableStatistic = true || 0;
var recording = true;
/**
* This function will do as `Object.assign` in production. But will use Object.defineProperty:get to
* pass all value access in development. To support statistic field usage with alias token.
*/
function merge() {
for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {
objs[_key] = arguments[_key];
}
/* istanbul ignore next */
if (!enableStatistic) {
return Object.assign.apply(Object, [{}].concat(objs));
}
recording = false;
var ret = {};
objs.forEach(function (obj) {
if ((0,esm_typeof["default"])(obj) !== 'object') {
return;
}
var keys = Object.keys(obj);
keys.forEach(function (key) {
Object.defineProperty(ret, key, {
configurable: true,
enumerable: true,
get: function get() {
return obj[key];
}
});
});
});
recording = true;
return ret;
}
/** @internal Internal Usage. Not use in your production. */
var statistic = {};
/** @internal Internal Usage. Not use in your production. */
var _statistic_build_ = {};
/* istanbul ignore next */
function noop() {}
/** Statistic token usage case. Should use `merge` function if you do not want spread record. */
var statisticToken = function statisticToken(token) {
var tokenKeys;
var proxy = token;
var flush = noop;
if (enableStatistic && typeof Proxy !== 'undefined') {
tokenKeys = new Set();
proxy = new Proxy(token, {
get: function get(obj, prop) {
if (recording) {
var _tokenKeys;
(_tokenKeys = tokenKeys) === null || _tokenKeys === void 0 || _tokenKeys.add(prop);
}
return obj[prop];
}
});
flush = function flush(componentName, componentToken) {
var _statistic$componentN;
statistic[componentName] = {
global: Array.from(tokenKeys),
component: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, (_statistic$componentN = statistic[componentName]) === null || _statistic$componentN === void 0 ? void 0 : _statistic$componentN.component), componentToken)
};
};
}
return {
token: proxy,
keys: tokenKeys,
flush: flush
};
};
/* harmony default export */ var util_statistic = (statisticToken);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/getDefaultComponentToken.js
function getDefaultComponentToken(component, token, getDefaultToken) {
if (typeof getDefaultToken === 'function') {
var _token$component;
return getDefaultToken(merge(token, (_token$component = token[component]) !== null && _token$component !== void 0 ? _token$component : {}));
}
return getDefaultToken !== null && getDefaultToken !== void 0 ? getDefaultToken : {};
}
/* harmony default export */ var util_getDefaultComponentToken = (getDefaultComponentToken);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/maxmin.js
function genMaxMin(type) {
if (type === 'js') {
return {
max: Math.max,
min: Math.min
};
}
return {
max: function max() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return "max(".concat(args.map(function (value) {
return (0,cssinjs.unit)(value);
}).join(','), ")");
},
min: function min() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return "min(".concat(args.map(function (value) {
return (0,cssinjs.unit)(value);
}).join(','), ")");
}
};
}
/* harmony default export */ var maxmin = (genMaxMin);
;// ./node_modules/@ant-design/cssinjs-utils/es/_util/hooks/useUniqueMemo.js
var BEAT_LIMIT = 1000 * 60 * 10;
/**
* A helper class to map keys to values.
* It supports both primitive keys and object keys.
*/
var ArrayKeyMap = /*#__PURE__*/function () {
function ArrayKeyMap() {
(0,classCallCheck["default"])(this, ArrayKeyMap);
(0,defineProperty["default"])(this, "map", new Map());
// Use WeakMap to avoid memory leak
(0,defineProperty["default"])(this, "objectIDMap", new WeakMap());
(0,defineProperty["default"])(this, "nextID", 0);
(0,defineProperty["default"])(this, "lastAccessBeat", new Map());
// We will clean up the cache when reach the limit
(0,defineProperty["default"])(this, "accessBeat", 0);
}
(0,createClass["default"])(ArrayKeyMap, [{
key: "set",
value: function set(keys, value) {
// New set will trigger clear
this.clear();
// Set logic
var compositeKey = this.getCompositeKey(keys);
this.map.set(compositeKey, value);
this.lastAccessBeat.set(compositeKey, Date.now());
}
}, {
key: "get",
value: function get(keys) {
var compositeKey = this.getCompositeKey(keys);
var cache = this.map.get(compositeKey);
this.lastAccessBeat.set(compositeKey, Date.now());
this.accessBeat += 1;
return cache;
}
}, {
key: "getCompositeKey",
value: function getCompositeKey(keys) {
var _this = this;
var ids = keys.map(function (key) {
if (key && (0,esm_typeof["default"])(key) === 'object') {
return "obj_".concat(_this.getObjectID(key));
}
return "".concat((0,esm_typeof["default"])(key), "_").concat(key);
});
return ids.join('|');
}
}, {
key: "getObjectID",
value: function getObjectID(obj) {
if (this.objectIDMap.has(obj)) {
return this.objectIDMap.get(obj);
}
var id = this.nextID;
this.objectIDMap.set(obj, id);
this.nextID += 1;
return id;
}
}, {
key: "clear",
value: function clear() {
var _this2 = this;
if (this.accessBeat > 10000) {
var now = Date.now();
this.lastAccessBeat.forEach(function (beat, key) {
if (now - beat > BEAT_LIMIT) {
_this2.map.delete(key);
_this2.lastAccessBeat.delete(key);
}
});
this.accessBeat = 0;
}
}
}]);
return ArrayKeyMap;
}();
var uniqueMap = new ArrayKeyMap();
/**
* Like `useMemo`, but this hook result will be shared across all instances.
*/
function useUniqueMemo(memoFn, deps) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
var cachedValue = uniqueMap.get(deps);
if (cachedValue) {
return cachedValue;
}
var newValue = memoFn();
uniqueMap.set(deps, newValue);
return newValue;
}, deps);
}
/* harmony default export */ var hooks_useUniqueMemo = (useUniqueMemo);
;// ./node_modules/@ant-design/cssinjs-utils/es/hooks/useCSP.js
/**
* Provide a default hook since not everyone needs to config this.
*/
var useDefaultCSP = function useDefaultCSP() {
return {};
};
/* harmony default export */ var hooks_useCSP = (useDefaultCSP);
;// ./node_modules/@ant-design/cssinjs-utils/es/util/genStyleUtils.js
function genStyleUtils(config) {
// Dependency inversion for preparing basic config.
var _config$useCSP = config.useCSP,
useCSP = _config$useCSP === void 0 ? hooks_useCSP : _config$useCSP,
useToken = config.useToken,
usePrefix = config.usePrefix,
getResetStyles = config.getResetStyles,
getCommonStyle = config.getCommonStyle,
getCompUnitless = config.getCompUnitless;
function genStyleHooks(component, styleFn, getDefaultToken, options) {
var componentName = Array.isArray(component) ? component[0] : component;
function prefixToken(key) {
return "".concat(String(componentName)).concat(key.slice(0, 1).toUpperCase()).concat(key.slice(1));
}
// Fill unitless
var originUnitless = (options === null || options === void 0 ? void 0 : options.unitless) || {};
var originCompUnitless = typeof getCompUnitless === 'function' ? getCompUnitless(component) : {};
var compUnitless = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originCompUnitless), {}, (0,defineProperty["default"])({}, prefixToken('zIndexPopup'), true));
Object.keys(originUnitless).forEach(function (key) {
compUnitless[prefixToken(key)] = originUnitless[key];
});
// Options
var mergedOptions = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, options), {}, {
unitless: compUnitless,
prefixToken: prefixToken
});
// Hooks
var useStyle = genComponentStyleHook(component, styleFn, getDefaultToken, mergedOptions);
var useCSSVar = genCSSVarRegister(componentName, getDefaultToken, mergedOptions);
return function (prefixCls) {
var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
var _useStyle = useStyle(prefixCls, rootCls),
_useStyle2 = (0,slicedToArray["default"])(_useStyle, 2),
hashId = _useStyle2[1];
var _useCSSVar = useCSSVar(rootCls),
_useCSSVar2 = (0,slicedToArray["default"])(_useCSSVar, 2),
wrapCSSVar = _useCSSVar2[0],
cssVarCls = _useCSSVar2[1];
return [wrapCSSVar, hashId, cssVarCls];
};
}
function genCSSVarRegister(component, getDefaultToken, options) {
var compUnitless = options.unitless,
_options$injectStyle = options.injectStyle,
injectStyle = _options$injectStyle === void 0 ? true : _options$injectStyle,
prefixToken = options.prefixToken,
ignore = options.ignore;
var CSSVarRegister = function CSSVarRegister(_ref) {
var rootCls = _ref.rootCls,
_ref$cssVar = _ref.cssVar,
cssVar = _ref$cssVar === void 0 ? {} : _ref$cssVar;
var _useToken = useToken(),
realToken = _useToken.realToken;
(0,cssinjs.useCSSVarRegister)({
path: [component],
prefix: cssVar.prefix,
key: cssVar.key,
unitless: compUnitless,
ignore: ignore,
token: realToken,
scope: rootCls
}, function () {
var defaultToken = util_getDefaultComponentToken(component, realToken, getDefaultToken);
var componentToken = util_getComponentToken(component, realToken, defaultToken, {
deprecatedTokens: options === null || options === void 0 ? void 0 : options.deprecatedTokens
});
Object.keys(defaultToken).forEach(function (key) {
componentToken[prefixToken(key)] = componentToken[key];
delete componentToken[key];
});
return componentToken;
});
return null;
};
var useCSSVar = function useCSSVar(rootCls) {
var _useToken2 = useToken(),
cssVar = _useToken2.cssVar;
return [function (node) {
return injectStyle && cssVar ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CSSVarRegister, {
rootCls: rootCls,
cssVar: cssVar,
component: component
}), node) : node;
}, cssVar === null || cssVar === void 0 ? void 0 : cssVar.key];
};
return useCSSVar;
}
function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var cells = Array.isArray(componentName) ? componentName : [componentName, componentName];
var _cells = (0,slicedToArray["default"])(cells, 1),
component = _cells[0];
var concatComponent = cells.join('-');
var mergedLayer = config.layer || {
name: 'antd'
};
// Return new style hook
return function (prefixCls) {
var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
var _useToken3 = useToken(),
theme = _useToken3.theme,
realToken = _useToken3.realToken,
hashId = _useToken3.hashId,
token = _useToken3.token,
cssVar = _useToken3.cssVar;
var _usePrefix = usePrefix(),
rootPrefixCls = _usePrefix.rootPrefixCls,
iconPrefixCls = _usePrefix.iconPrefixCls;
var csp = useCSP();
var type = cssVar ? 'css' : 'js';
// Use unique memo to share the result across all instances
var calc = hooks_useUniqueMemo(function () {
var unitlessCssVar = new Set();
if (cssVar) {
Object.keys(options.unitless || {}).forEach(function (key) {
// Some component proxy the AliasToken (e.g. Image) and some not (e.g. Modal)
// We should both pass in `unitlessCssVar` to make sure the CSSVar can be unitless.
unitlessCssVar.add((0,cssinjs.token2CSSVar)(key, cssVar.prefix));
unitlessCssVar.add((0,cssinjs.token2CSSVar)(key, util_getCompVarPrefix(component, cssVar.prefix)));
});
}
return util_calc(type, unitlessCssVar);
}, [type, component, cssVar === null || cssVar === void 0 ? void 0 : cssVar.prefix]);
var _genMaxMin = maxmin(type),
max = _genMaxMin.max,
min = _genMaxMin.min;
// Shared config
var sharedConfig = {
theme: theme,
token: token,
hashId: hashId,
nonce: function nonce() {
return csp.nonce;
},
clientOnly: options.clientOnly,
layer: mergedLayer,
// antd is always at top of styles
order: options.order || -999
};
// This if statement is safe, as it will only be used if the generator has the function. It's not dynamic.
if (typeof getResetStyles === 'function') {
// Generate style for all need reset tags.
(0,cssinjs.useStyleRegister)((0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedConfig), {}, {
clientOnly: false,
path: ['Shared', rootPrefixCls]
}), function () {
return getResetStyles(token, {
prefix: {
rootPrefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls
},
csp: csp
});
});
}
var wrapSSR = (0,cssinjs.useStyleRegister)((0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedConfig), {}, {
path: [concatComponent, prefixCls, iconPrefixCls]
}), function () {
if (options.injectStyle === false) {
return [];
}
var _statisticToken = util_statistic(token),
proxyToken = _statisticToken.token,
flush = _statisticToken.flush;
var defaultComponentToken = util_getDefaultComponentToken(component, realToken, getDefaultToken);
var componentCls = ".".concat(prefixCls);
var componentToken = util_getComponentToken(component, realToken, defaultComponentToken, {
deprecatedTokens: options.deprecatedTokens
});
if (cssVar && defaultComponentToken && (0,esm_typeof["default"])(defaultComponentToken) === 'object') {
Object.keys(defaultComponentToken).forEach(function (key) {
defaultComponentToken[key] = "var(".concat((0,cssinjs.token2CSSVar)(key, util_getCompVarPrefix(component, cssVar.prefix)), ")");
});
}
var mergedToken = merge(proxyToken, {
componentCls: componentCls,
prefixCls: prefixCls,
iconCls: ".".concat(iconPrefixCls),
antCls: ".".concat(rootPrefixCls),
calc: calc,
// @ts-ignore
max: max,
// @ts-ignore
min: min
}, cssVar ? defaultComponentToken : componentToken);
var styleInterpolation = styleFn(mergedToken, {
hashId: hashId,
prefixCls: prefixCls,
rootPrefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls
});
flush(component, componentToken);
var commonStyle = typeof getCommonStyle === 'function' ? getCommonStyle(mergedToken, prefixCls, rootCls, options.resetFont) : null;
return [options.resetStyle === false ? null : commonStyle, styleInterpolation];
});
return [wrapSSR, hashId];
};
}
function genSubStyleComponent(componentName, styleFn, getDefaultToken) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var useStyle = genComponentStyleHook(componentName, styleFn, getDefaultToken, (0,objectSpread2["default"])({
resetStyle: false,
// Sub Style should default after root one
order: -998
}, options));
var StyledComponent = function StyledComponent(_ref2) {
var prefixCls = _ref2.prefixCls,
_ref2$rootCls = _ref2.rootCls,
rootCls = _ref2$rootCls === void 0 ? prefixCls : _ref2$rootCls;
useStyle(prefixCls, rootCls);
return null;
};
if (true) {
StyledComponent.displayName = "SubStyle_".concat(String(Array.isArray(componentName) ? componentName.join('.') : componentName));
}
return StyledComponent;
}
return {
genStyleHooks: genStyleHooks,
genSubStyleComponent: genSubStyleComponent,
genComponentStyleHook: genComponentStyleHook
};
}
/* harmony default export */ var util_genStyleUtils = (genStyleUtils);
;// ./node_modules/@ant-design/cssinjs-utils/es/index.js
/***/ }),
/***/ "./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js":
/*!*************************************************************!*\
!*** ./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js ***!
\*************************************************************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* module decorator */ module = __webpack_require__.hmd(module);
function useProdHMR() {
return false;
}
var webpackHMR = false;
function useDevHMR() {
return webpackHMR;
}
/* harmony default export */ __webpack_exports__["default"] = ( false ? 0 : useDevHMR);
// Webpack `module.hot.accept` do not support any deps update trigger
// We have to hack handler to force mark as HRM
if ( true && module && module.hot && 0) { var originWebpackHotUpdate, win; }
/***/ }),
/***/ "./node_modules/@ant-design/cssinjs/es/index.js":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/cssinjs/es/index.js + 38 modules ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Keyframes: function() { return /* reexport */ Keyframes; },
NaNLinter: function() { return /* reexport */ NaNLinter; },
StyleContext: function() { return /* reexport */ es_StyleContext; },
StyleProvider: function() { return /* reexport */ StyleProvider; },
Theme: function() { return /* reexport */ Theme; },
_experimental: function() { return /* binding */ _experimental; },
createCache: function() { return /* reexport */ createCache; },
createTheme: function() { return /* reexport */ createTheme; },
extractStyle: function() { return /* reexport */ extractStyle; },
genCalc: function() { return /* reexport */ calc; },
getComputedToken: function() { return /* reexport */ getComputedToken; },
legacyLogicalPropertiesTransformer: function() { return /* reexport */ legacyLogicalProperties; },
legacyNotSelectorLinter: function() { return /* reexport */ legacyNotSelectorLinter; },
logicalPropertiesLinter: function() { return /* reexport */ logicalPropertiesLinter; },
parentSelectorLinter: function() { return /* reexport */ parentSelectorLinter; },
px2remTransformer: function() { return /* reexport */ px2rem; },
token2CSSVar: function() { return /* reexport */ token2CSSVar; },
unit: function() { return /* reexport */ util_unit; },
useCSSVarRegister: function() { return /* reexport */ hooks_useCSSVarRegister; },
useCacheToken: function() { return /* reexport */ useCacheToken; },
useStyleRegister: function() { return /* reexport */ useStyleRegister; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
;// ./node_modules/@emotion/hash/dist/hash.browser.esm.js
/* eslint-disable */
// Inspired by https://github.com/garycourt/murmurhash-js
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
function murmur2(str) {
// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
// const m = 0x5bd1e995;
// const r = 24;
// Initialize the hash
var h = 0; // Mix 4 bytes at a time into the hash
var k,
i = 0,
len = str.length;
for (; len >= 4; ++i, len -= 4) {
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
k =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
k ^=
/* k >>> r: */
k >>> 24;
h =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
} // Handle the last few bytes of the input array
switch (len) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
case 1:
h ^= str.charCodeAt(i) & 0xff;
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
} // Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
h ^= h >>> 13;
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
return ((h ^ h >>> 15) >>> 0).toString(36);
}
/* harmony default export */ var hash_browser_esm = (murmur2);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js
var useMemo = __webpack_require__("./node_modules/rc-util/es/hooks/useMemo.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/isEqual.js
var isEqual = __webpack_require__("./node_modules/rc-util/es/isEqual.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
;// ./node_modules/@ant-design/cssinjs/es/Cache.js
// [times, realValue]
var SPLIT = '%';
/** Connect key with `SPLIT` */
function pathKey(keys) {
return keys.join(SPLIT);
}
var Entity = /*#__PURE__*/function () {
function Entity(instanceId) {
(0,classCallCheck["default"])(this, Entity);
(0,defineProperty["default"])(this, "instanceId", void 0);
/** @private Internal cache map. Do not access this directly */
(0,defineProperty["default"])(this, "cache", new Map());
this.instanceId = instanceId;
}
(0,createClass["default"])(Entity, [{
key: "get",
value: function get(keys) {
return this.opGet(pathKey(keys));
}
/** A fast get cache with `get` concat. */
}, {
key: "opGet",
value: function opGet(keyPathStr) {
return this.cache.get(keyPathStr) || null;
}
}, {
key: "update",
value: function update(keys, valueFn) {
return this.opUpdate(pathKey(keys), valueFn);
}
/** A fast get cache with `get` concat. */
}, {
key: "opUpdate",
value: function opUpdate(keyPathStr, valueFn) {
var prevValue = this.cache.get(keyPathStr);
var nextValue = valueFn(prevValue);
if (nextValue === null) {
this.cache.delete(keyPathStr);
} else {
this.cache.set(keyPathStr, nextValue);
}
}
}]);
return Entity;
}();
/* harmony default export */ var Cache = (Entity);
;// ./node_modules/@ant-design/cssinjs/es/StyleContext.js
var _excluded = ["children"];
var ATTR_TOKEN = 'data-token-hash';
var ATTR_MARK = 'data-css-hash';
var ATTR_CACHE_PATH = 'data-cache-path';
// Mark css-in-js instance in style element
var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';
function createCache() {
var cssinjsInstanceId = Math.random().toString(12).slice(2);
// Tricky SSR: Move all inline style to the head.
// PS: We do not recommend tricky mode.
if (typeof document !== 'undefined' && document.head && document.body) {
var styles = document.body.querySelectorAll("style[".concat(ATTR_MARK, "]")) || [];
var firstChild = document.head.firstChild;
Array.from(styles).forEach(function (style) {
style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;
// Not force move if no head
if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
document.head.insertBefore(style, firstChild);
}
});
// Deduplicate of moved styles
var styleHash = {};
Array.from(document.querySelectorAll("style[".concat(ATTR_MARK, "]"))).forEach(function (style) {
var hash = style.getAttribute(ATTR_MARK);
if (styleHash[hash]) {
if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
var _style$parentNode;
(_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);
}
} else {
styleHash[hash] = true;
}
});
}
return new Cache(cssinjsInstanceId);
}
var StyleContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
hashPriority: 'low',
cache: createCache(),
defaultCache: true
});
var StyleProvider = function StyleProvider(props) {
var children = props.children,
restProps = (0,objectWithoutProperties["default"])(props, _excluded);
var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(StyleContext);
var context = (0,useMemo["default"])(function () {
var mergedContext = (0,objectSpread2["default"])({}, parentContext);
Object.keys(restProps).forEach(function (key) {
var value = restProps[key];
if (restProps[key] !== undefined) {
mergedContext[key] = value;
}
});
var cache = restProps.cache;
mergedContext.cache = mergedContext.cache || createCache();
mergedContext.defaultCache = !cache && parentContext.defaultCache;
return mergedContext;
}, [parentContext, restProps], function (prev, next) {
return !(0,isEqual["default"])(prev[0], next[0], true) || !(0,isEqual["default"])(prev[1], next[1], true);
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StyleContext.Provider, {
value: context
}, children);
};
/* harmony default export */ var es_StyleContext = (StyleContext);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
;// ./node_modules/@ant-design/cssinjs/es/theme/calc/calculator.js
var AbstractCalculator = /*#__PURE__*/(0,createClass["default"])(function AbstractCalculator() {
(0,classCallCheck["default"])(this, AbstractCalculator);
});
/* harmony default export */ var calculator = (AbstractCalculator);
;// ./node_modules/@ant-design/cssinjs/es/theme/calc/CSSCalculator.js
var CALC_UNIT = 'CALC_UNIT';
var regexp = new RegExp(CALC_UNIT, 'g');
function unit(value) {
if (typeof value === 'number') {
return "".concat(value).concat(CALC_UNIT);
}
return value;
}
var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) {
(0,inherits["default"])(CSSCalculator, _AbstractCalculator);
var _super = (0,createSuper["default"])(CSSCalculator);
function CSSCalculator(num, unitlessCssVar) {
var _this;
(0,classCallCheck["default"])(this, CSSCalculator);
_this = _super.call(this);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", '');
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "unitlessCssVar", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "lowPriority", void 0);
var numType = (0,esm_typeof["default"])(num);
_this.unitlessCssVar = unitlessCssVar;
if (num instanceof CSSCalculator) {
_this.result = "(".concat(num.result, ")");
} else if (numType === 'number') {
_this.result = unit(num);
} else if (numType === 'string') {
_this.result = num;
}
return _this;
}
(0,createClass["default"])(CSSCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " + ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " + ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " - ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " - ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " * ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " * ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "div",
value: function div(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " / ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " / ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "getResult",
value: function getResult(force) {
return this.lowPriority || force ? "(".concat(this.result, ")") : this.result;
}
}, {
key: "equal",
value: function equal(options) {
var _this2 = this;
var _ref = options || {},
cssUnit = _ref.unit;
var mergedUnit = true;
if (typeof cssUnit === 'boolean') {
mergedUnit = cssUnit;
} else if (Array.from(this.unitlessCssVar).some(function (cssVar) {
return _this2.result.includes(cssVar);
})) {
mergedUnit = false;
}
this.result = this.result.replace(regexp, mergedUnit ? 'px' : '');
if (typeof this.lowPriority !== 'undefined') {
return "calc(".concat(this.result, ")");
}
return this.result;
}
}]);
return CSSCalculator;
}(calculator);
;// ./node_modules/@ant-design/cssinjs/es/theme/calc/NumCalculator.js
var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) {
(0,inherits["default"])(NumCalculator, _AbstractCalculator);
var _super = (0,createSuper["default"])(NumCalculator);
function NumCalculator(num) {
var _this;
(0,classCallCheck["default"])(this, NumCalculator);
_this = _super.call(this);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", 0);
if (num instanceof NumCalculator) {
_this.result = num.result;
} else if (typeof num === 'number') {
_this.result = num;
}
return _this;
}
(0,createClass["default"])(NumCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof NumCalculator) {
this.result += num.result;
} else if (typeof num === 'number') {
this.result += num;
}
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof NumCalculator) {
this.result -= num.result;
} else if (typeof num === 'number') {
this.result -= num;
}
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (num instanceof NumCalculator) {
this.result *= num.result;
} else if (typeof num === 'number') {
this.result *= num;
}
return this;
}
}, {
key: "div",
value: function div(num) {
if (num instanceof NumCalculator) {
this.result /= num.result;
} else if (typeof num === 'number') {
this.result /= num;
}
return this;
}
}, {
key: "equal",
value: function equal() {
return this.result;
}
}]);
return NumCalculator;
}(calculator);
;// ./node_modules/@ant-design/cssinjs/es/theme/calc/index.js
var genCalc = function genCalc(type, unitlessCssVar) {
var Calculator = type === 'css' ? CSSCalculator : NumCalculator;
return function (num) {
return new Calculator(num, unitlessCssVar);
};
};
/* harmony default export */ var calc = (genCalc);
;// ./node_modules/@ant-design/cssinjs/es/theme/ThemeCache.js
// ================================== Cache ==================================
function sameDerivativeOption(left, right) {
if (left.length !== right.length) {
return false;
}
for (var i = 0; i < left.length; i++) {
if (left[i] !== right[i]) {
return false;
}
}
return true;
}
var ThemeCache = /*#__PURE__*/function () {
function ThemeCache() {
(0,classCallCheck["default"])(this, ThemeCache);
(0,defineProperty["default"])(this, "cache", void 0);
(0,defineProperty["default"])(this, "keys", void 0);
(0,defineProperty["default"])(this, "cacheCallTimes", void 0);
this.cache = new Map();
this.keys = [];
this.cacheCallTimes = 0;
}
(0,createClass["default"])(ThemeCache, [{
key: "size",
value: function size() {
return this.keys.length;
}
}, {
key: "internalGet",
value: function internalGet(derivativeOption) {
var _cache2, _cache3;
var updateCallTimes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var cache = {
map: this.cache
};
derivativeOption.forEach(function (derivative) {
if (!cache) {
cache = undefined;
} else {
var _cache;
cache = (_cache = cache) === null || _cache === void 0 || (_cache = _cache.map) === null || _cache === void 0 ? void 0 : _cache.get(derivative);
}
});
if ((_cache2 = cache) !== null && _cache2 !== void 0 && _cache2.value && updateCallTimes) {
cache.value[1] = this.cacheCallTimes++;
}
return (_cache3 = cache) === null || _cache3 === void 0 ? void 0 : _cache3.value;
}
}, {
key: "get",
value: function get(derivativeOption) {
var _this$internalGet;
return (_this$internalGet = this.internalGet(derivativeOption, true)) === null || _this$internalGet === void 0 ? void 0 : _this$internalGet[0];
}
}, {
key: "has",
value: function has(derivativeOption) {
return !!this.internalGet(derivativeOption);
}
}, {
key: "set",
value: function set(derivativeOption, value) {
var _this = this;
// New cache
if (!this.has(derivativeOption)) {
if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {
var _this$keys$reduce = this.keys.reduce(function (result, key) {
var _result = (0,slicedToArray["default"])(result, 2),
callTimes = _result[1];
if (_this.internalGet(key)[1] < callTimes) {
return [key, _this.internalGet(key)[1]];
}
return result;
}, [this.keys[0], this.cacheCallTimes]),
_this$keys$reduce2 = (0,slicedToArray["default"])(_this$keys$reduce, 1),
targetKey = _this$keys$reduce2[0];
this.delete(targetKey);
}
this.keys.push(derivativeOption);
}
var cache = this.cache;
derivativeOption.forEach(function (derivative, index) {
if (index === derivativeOption.length - 1) {
cache.set(derivative, {
value: [value, _this.cacheCallTimes++]
});
} else {
var cacheValue = cache.get(derivative);
if (!cacheValue) {
cache.set(derivative, {
map: new Map()
});
} else if (!cacheValue.map) {
cacheValue.map = new Map();
}
cache = cache.get(derivative).map;
}
});
}
}, {
key: "deleteByPath",
value: function deleteByPath(currentCache, derivatives) {
var cache = currentCache.get(derivatives[0]);
if (derivatives.length === 1) {
var _cache$value;
if (!cache.map) {
currentCache.delete(derivatives[0]);
} else {
currentCache.set(derivatives[0], {
map: cache.map
});
}
return (_cache$value = cache.value) === null || _cache$value === void 0 ? void 0 : _cache$value[0];
}
var result = this.deleteByPath(cache.map, derivatives.slice(1));
if ((!cache.map || cache.map.size === 0) && !cache.value) {
currentCache.delete(derivatives[0]);
}
return result;
}
}, {
key: "delete",
value: function _delete(derivativeOption) {
// If cache exists
if (this.has(derivativeOption)) {
this.keys = this.keys.filter(function (item) {
return !sameDerivativeOption(item, derivativeOption);
});
return this.deleteByPath(this.cache, derivativeOption);
}
return undefined;
}
}]);
return ThemeCache;
}();
(0,defineProperty["default"])(ThemeCache, "MAX_CACHE_SIZE", 20);
(0,defineProperty["default"])(ThemeCache, "MAX_CACHE_OFFSET", 5);
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
;// ./node_modules/@ant-design/cssinjs/es/theme/Theme.js
var uuid = 0;
/**
* Theme with algorithms to derive tokens from design tokens.
* Use `createTheme` first which will help to manage the theme instance cache.
*/
var Theme = /*#__PURE__*/function () {
function Theme(derivatives) {
(0,classCallCheck["default"])(this, Theme);
(0,defineProperty["default"])(this, "derivatives", void 0);
(0,defineProperty["default"])(this, "id", void 0);
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
this.id = uuid;
if (derivatives.length === 0) {
(0,warning.warning)(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
}
uuid += 1;
}
(0,createClass["default"])(Theme, [{
key: "getDerivativeToken",
value: function getDerivativeToken(token) {
return this.derivatives.reduce(function (result, derivative) {
return derivative(token, result);
}, undefined);
}
}]);
return Theme;
}();
;// ./node_modules/@ant-design/cssinjs/es/theme/createTheme.js
var cacheThemes = new ThemeCache();
/**
* Same as new Theme, but will always return same one if `derivative` not changed.
*/
function createTheme(derivatives) {
var derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];
// Create new theme if not exist
if (!cacheThemes.has(derivativeArr)) {
cacheThemes.set(derivativeArr, new Theme(derivativeArr));
}
// Get theme from cache and return
return cacheThemes.get(derivativeArr);
}
;// ./node_modules/@ant-design/cssinjs/es/theme/index.js
;// ./node_modules/@ant-design/cssinjs/es/util/index.js
// Create a cache for memo concat
var resultCache = new WeakMap();
var RESULT_VALUE = {};
function memoResult(callback, deps) {
var current = resultCache;
for (var i = 0; i < deps.length; i += 1) {
var dep = deps[i];
if (!current.has(dep)) {
current.set(dep, new WeakMap());
}
current = current.get(dep);
}
if (!current.has(RESULT_VALUE)) {
current.set(RESULT_VALUE, callback());
}
return current.get(RESULT_VALUE);
}
// Create a cache here to avoid always loop generate
var flattenTokenCache = new WeakMap();
/**
* Flatten token to string, this will auto cache the result when token not change
*/
function flattenToken(token) {
var str = flattenTokenCache.get(token) || '';
if (!str) {
Object.keys(token).forEach(function (key) {
var value = token[key];
str += key;
if (value instanceof Theme) {
str += value.id;
} else if (value && (0,esm_typeof["default"])(value) === 'object') {
str += flattenToken(value);
} else {
str += value;
}
});
// https://github.com/ant-design/ant-design/issues/48386
// Should hash the string to avoid style tag name too long
str = hash_browser_esm(str);
// Put in cache
flattenTokenCache.set(token, str);
}
return str;
}
/**
* Convert derivative token to key string
*/
function token2key(token, salt) {
return hash_browser_esm("".concat(salt, "_").concat(flattenToken(token)));
}
var randomSelectorKey = "random-".concat(Date.now(), "-").concat(Math.random()).replace(/\./g, '');
// Magic `content` for detect selector support
var checkContent = '_bAmBoO_';
function supportSelector(styleStr, handleElement, supportCheck) {
if ((0,canUseDom["default"])()) {
var _getComputedStyle$con, _ele$parentNode;
(0,dynamicCSS.updateCSS)(styleStr, randomSelectorKey);
var _ele = document.createElement('div');
_ele.style.position = 'fixed';
_ele.style.left = '0';
_ele.style.top = '0';
handleElement === null || handleElement === void 0 || handleElement(_ele);
document.body.appendChild(_ele);
if (true) {
_ele.innerHTML = 'Test';
_ele.style.zIndex = '9999999';
}
var support = supportCheck ? supportCheck(_ele) : (_getComputedStyle$con = getComputedStyle(_ele).content) === null || _getComputedStyle$con === void 0 ? void 0 : _getComputedStyle$con.includes(checkContent);
(_ele$parentNode = _ele.parentNode) === null || _ele$parentNode === void 0 || _ele$parentNode.removeChild(_ele);
(0,dynamicCSS.removeCSS)(randomSelectorKey);
return support;
}
return false;
}
var canLayer = undefined;
function supportLayer() {
if (canLayer === undefined) {
canLayer = supportSelector("@layer ".concat(randomSelectorKey, " { .").concat(randomSelectorKey, " { content: \"").concat(checkContent, "\"!important; } }"), function (ele) {
ele.className = randomSelectorKey;
});
}
return canLayer;
}
var canWhere = undefined;
function supportWhere() {
if (canWhere === undefined) {
canWhere = supportSelector(":where(.".concat(randomSelectorKey, ") { content: \"").concat(checkContent, "\"!important; }"), function (ele) {
ele.className = randomSelectorKey;
});
}
return canWhere;
}
var canLogic = undefined;
function supportLogicProps() {
if (canLogic === undefined) {
canLogic = supportSelector(".".concat(randomSelectorKey, " { inset-block: 93px !important; }"), function (ele) {
ele.className = randomSelectorKey;
}, function (ele) {
return getComputedStyle(ele).bottom === '93px';
});
}
return canLogic;
}
var isClientSide = (0,canUseDom["default"])();
function util_unit(num) {
if (typeof num === 'number') {
return "".concat(num, "px");
}
return num;
}
function toStyleStr(style, tokenKey, styleId) {
var _objectSpread2;
var customizeAttrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var plain = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
if (plain) {
return style;
}
var attrs = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, customizeAttrs), {}, (_objectSpread2 = {}, (0,defineProperty["default"])(_objectSpread2, ATTR_TOKEN, tokenKey), (0,defineProperty["default"])(_objectSpread2, ATTR_MARK, styleId), _objectSpread2));
var attrStr = Object.keys(attrs).map(function (attr) {
var val = attrs[attr];
return val ? "".concat(attr, "=\"").concat(val, "\"") : null;
}).filter(function (v) {
return v;
}).join(' ');
return "<style ".concat(attrStr, ">").concat(style, "</style>");
}
;// ./node_modules/@ant-design/cssinjs/es/util/css-variables.js
var token2CSSVar = function token2CSSVar(token) {
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
return "--".concat(prefix ? "".concat(prefix, "-") : '').concat(token).replace(/([a-z0-9])([A-Z])/g, '$1-$2').replace(/([A-Z]+)([A-Z][a-z0-9]+)/g, '$1-$2').replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase();
};
var serializeCSSVar = function serializeCSSVar(cssVars, hashId, options) {
if (!Object.keys(cssVars).length) {
return '';
}
return ".".concat(hashId).concat(options !== null && options !== void 0 && options.scope ? ".".concat(options.scope) : '', "{").concat(Object.entries(cssVars).map(function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 2),
key = _ref2[0],
value = _ref2[1];
return "".concat(key, ":").concat(value, ";");
}).join(''), "}");
};
var transformToken = function transformToken(token, themeKey, config) {
var cssVars = {};
var result = {};
Object.entries(token).forEach(function (_ref3) {
var _config$preserve, _config$ignore;
var _ref4 = (0,slicedToArray["default"])(_ref3, 2),
key = _ref4[0],
value = _ref4[1];
if (config !== null && config !== void 0 && (_config$preserve = config.preserve) !== null && _config$preserve !== void 0 && _config$preserve[key]) {
result[key] = value;
} else if ((typeof value === 'string' || typeof value === 'number') && !(config !== null && config !== void 0 && (_config$ignore = config.ignore) !== null && _config$ignore !== void 0 && _config$ignore[key])) {
var _config$unitless;
var cssVar = token2CSSVar(key, config === null || config === void 0 ? void 0 : config.prefix);
cssVars[cssVar] = typeof value === 'number' && !(config !== null && config !== void 0 && (_config$unitless = config.unitless) !== null && _config$unitless !== void 0 && _config$unitless[key]) ? "".concat(value, "px") : String(value);
result[key] = "var(".concat(cssVar, ")");
}
});
return [result, serializeCSSVar(cssVars, themeKey, {
scope: config === null || config === void 0 ? void 0 : config.scope
})];
};
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
var useLayoutEffect = __webpack_require__("./node_modules/rc-util/es/hooks/useLayoutEffect.js");
;// ./node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.js
// import canUseDom from 'rc-util/lib/Dom/canUseDom';
// We need fully clone React function here
// to avoid webpack warning React 17 do not export `useId`
var fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
var useInsertionEffect = fullClone.useInsertionEffect;
/**
* Polyfill `useInsertionEffect` for React < 18
* @param renderEffect will be executed in `useMemo`, and do not have callback
* @param effect will be executed in `useLayoutEffect`
* @param deps
*/
var useInsertionEffectPolyfill = function useInsertionEffectPolyfill(renderEffect, effect, deps) {
external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(renderEffect, deps);
(0,useLayoutEffect["default"])(function () {
return effect(true);
}, deps);
};
/**
* Compatible `useInsertionEffect`
* will use `useInsertionEffect` if React version >= 18,
* otherwise use `useInsertionEffectPolyfill`.
*/
var useCompatibleInsertionEffect = useInsertionEffect ? function (renderEffect, effect, deps) {
return useInsertionEffect(function () {
renderEffect();
return effect();
}, deps);
} : useInsertionEffectPolyfill;
/* harmony default export */ var hooks_useCompatibleInsertionEffect = (useCompatibleInsertionEffect);
;// ./node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.js
var useEffectCleanupRegister_fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
var useEffectCleanupRegister_useInsertionEffect = useEffectCleanupRegister_fullClone.useInsertionEffect;
// DO NOT register functions in useEffect cleanup function, or functions that registered will never be called.
var useCleanupRegister = function useCleanupRegister(deps) {
var effectCleanups = [];
var cleanupFlag = false;
function register(fn) {
if (cleanupFlag) {
if (true) {
(0,warning.warning)(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
}
return;
}
effectCleanups.push(fn);
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
// Compatible with strict mode
cleanupFlag = false;
return function () {
cleanupFlag = true;
if (effectCleanups.length) {
effectCleanups.forEach(function (fn) {
return fn();
});
}
};
}, deps);
return register;
};
var useRun = function useRun() {
return function (fn) {
fn();
};
};
// Only enable register in React 18
var useEffectCleanupRegister = typeof useEffectCleanupRegister_useInsertionEffect !== 'undefined' ? useCleanupRegister : useRun;
/* harmony default export */ var hooks_useEffectCleanupRegister = (useEffectCleanupRegister);
// EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js
var useHMR = __webpack_require__("./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js");
;// ./node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js
function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove,
// Add additional effect trigger by `useInsertionEffect`
onCacheEffect) {
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_StyleContext),
globalCache = _React$useContext.cache;
var fullPath = [prefix].concat((0,toConsumableArray["default"])(keyPath));
var fullPathStr = pathKey(fullPath);
var register = hooks_useEffectCleanupRegister([fullPathStr]);
var HMRUpdate = (0,useHMR["default"])();
var buildCache = function buildCache(updater) {
globalCache.opUpdate(fullPathStr, function (prevCache) {
var _ref = prevCache || [undefined, undefined],
_ref2 = (0,slicedToArray["default"])(_ref, 2),
_ref2$ = _ref2[0],
times = _ref2$ === void 0 ? 0 : _ref2$,
cache = _ref2[1];
// HMR should always ignore cache since developer may change it
var tmpCache = cache;
if ( true && cache && HMRUpdate) {
onCacheRemove === null || onCacheRemove === void 0 || onCacheRemove(tmpCache, HMRUpdate);
tmpCache = null;
}
var mergedCache = tmpCache || cacheFn();
var data = [times, mergedCache];
// Call updater if need additional logic
return updater ? updater(data) : data;
});
};
// Create cache
external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
buildCache();
}, /* eslint-disable react-hooks/exhaustive-deps */
[fullPathStr]
/* eslint-enable */);
var cacheEntity = globalCache.opGet(fullPathStr);
// HMR clean the cache but not trigger `useMemo` again
// Let's fallback of this
// ref https://github.com/ant-design/cssinjs/issues/127
if ( true && !cacheEntity) {
buildCache();
cacheEntity = globalCache.opGet(fullPathStr);
}
var cacheContent = cacheEntity[1];
// Remove if no need anymore
hooks_useCompatibleInsertionEffect(function () {
onCacheEffect === null || onCacheEffect === void 0 || onCacheEffect(cacheContent);
}, function (polyfill) {
// It's bad to call build again in effect.
// But we have to do this since StrictMode will call effect twice
// which will clear cache on the first time.
buildCache(function (_ref3) {
var _ref4 = (0,slicedToArray["default"])(_ref3, 2),
times = _ref4[0],
cache = _ref4[1];
if (polyfill && times === 0) {
onCacheEffect === null || onCacheEffect === void 0 || onCacheEffect(cacheContent);
}
return [times + 1, cache];
});
return function () {
globalCache.opUpdate(fullPathStr, function (prevCache) {
var _ref5 = prevCache || [],
_ref6 = (0,slicedToArray["default"])(_ref5, 2),
_ref6$ = _ref6[0],
times = _ref6$ === void 0 ? 0 : _ref6$,
cache = _ref6[1];
var nextCount = times - 1;
if (nextCount === 0) {
// Always remove styles in useEffect callback
register(function () {
// With polyfill, registered callback will always be called synchronously
// But without polyfill, it will be called in effect clean up,
// And by that time this cache is cleaned up.
if (polyfill || !globalCache.opGet(fullPathStr)) {
onCacheRemove === null || onCacheRemove === void 0 || onCacheRemove(cache, false);
}
});
return null;
}
return [times - 1, cache];
});
};
}, [fullPathStr]);
return cacheContent;
}
;// ./node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js
var EMPTY_OVERRIDE = {};
// Generate different prefix to make user selector break in production env.
// This helps developer not to do style override directly on the hash id.
var hashPrefix = true ? 'css-dev-only-do-not-override' : 0;
var tokenKeys = new Map();
function recordCleanToken(tokenKey) {
tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);
}
function removeStyleTags(key, instanceId) {
if (typeof document !== 'undefined') {
var styles = document.querySelectorAll("style[".concat(ATTR_TOKEN, "=\"").concat(key, "\"]"));
styles.forEach(function (style) {
if (style[CSS_IN_JS_INSTANCE] === instanceId) {
var _style$parentNode;
(_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);
}
});
}
}
var TOKEN_THRESHOLD = 0;
// Remove will check current keys first
function cleanTokenStyle(tokenKey, instanceId) {
tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
var tokenKeyList = Array.from(tokenKeys.keys());
var cleanableKeyList = tokenKeyList.filter(function (key) {
var count = tokenKeys.get(key) || 0;
return count <= 0;
});
// Should keep tokens under threshold for not to insert style too often
if (tokenKeyList.length - cleanableKeyList.length > TOKEN_THRESHOLD) {
cleanableKeyList.forEach(function (key) {
removeStyleTags(key, instanceId);
tokenKeys.delete(key);
});
}
}
var getComputedToken = function getComputedToken(originToken, overrideToken, theme, format) {
var derivativeToken = theme.getDerivativeToken(originToken);
// Merge with override
var mergedDerivativeToken = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, derivativeToken), overrideToken);
// Format if needed
if (format) {
mergedDerivativeToken = format(mergedDerivativeToken);
}
return mergedDerivativeToken;
};
var TOKEN_PREFIX = 'token';
/**
* Cache theme derivative token as global shared one
* @param theme Theme entity
* @param tokens List of tokens, used for cache. Please do not dynamic generate object directly
* @param option Additional config
* @returns Call Theme.getDerivativeToken(tokenObject) to get token
*/
function useCacheToken(theme, tokens) {
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(es_StyleContext),
instanceId = _useContext.cache.instanceId,
container = _useContext.container;
var _option$salt = option.salt,
salt = _option$salt === void 0 ? '' : _option$salt,
_option$override = option.override,
override = _option$override === void 0 ? EMPTY_OVERRIDE : _option$override,
formatToken = option.formatToken,
compute = option.getComputedToken,
cssVar = option.cssVar;
// Basic - We do basic cache here
var mergedToken = memoResult(function () {
return Object.assign.apply(Object, [{}].concat((0,toConsumableArray["default"])(tokens)));
}, tokens);
var tokenStr = flattenToken(mergedToken);
var overrideTokenStr = flattenToken(override);
var cssVarStr = cssVar ? flattenToken(cssVar) : '';
var cachedToken = useGlobalCache(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], function () {
var _cssVar$key;
var mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);
// Replace token value with css variables
var actualToken = (0,objectSpread2["default"])({}, mergedDerivativeToken);
var cssVarsStr = '';
if (!!cssVar) {
var _transformToken = transformToken(mergedDerivativeToken, cssVar.key, {
prefix: cssVar.prefix,
ignore: cssVar.ignore,
unitless: cssVar.unitless,
preserve: cssVar.preserve
});
var _transformToken2 = (0,slicedToArray["default"])(_transformToken, 2);
mergedDerivativeToken = _transformToken2[0];
cssVarsStr = _transformToken2[1];
}
// Optimize for `useStyleRegister` performance
var tokenKey = token2key(mergedDerivativeToken, salt);
mergedDerivativeToken._tokenKey = tokenKey;
actualToken._tokenKey = token2key(actualToken, salt);
var themeKey = (_cssVar$key = cssVar === null || cssVar === void 0 ? void 0 : cssVar.key) !== null && _cssVar$key !== void 0 ? _cssVar$key : tokenKey;
mergedDerivativeToken._themeKey = themeKey;
recordCleanToken(themeKey);
var hashId = "".concat(hashPrefix, "-").concat(hash_browser_esm(tokenKey));
mergedDerivativeToken._hashId = hashId; // Not used
return [mergedDerivativeToken, hashId, actualToken, cssVarsStr, (cssVar === null || cssVar === void 0 ? void 0 : cssVar.key) || ''];
}, function (cache) {
// Remove token will remove all related style
cleanTokenStyle(cache[0]._themeKey, instanceId);
}, function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 4),
token = _ref2[0],
cssVarsStr = _ref2[3];
if (cssVar && cssVarsStr) {
var style = (0,dynamicCSS.updateCSS)(cssVarsStr, hash_browser_esm("css-variables-".concat(token._themeKey)), {
mark: ATTR_MARK,
prepend: 'queue',
attachTo: container,
priority: -999
});
style[CSS_IN_JS_INSTANCE] = instanceId;
// Used for `useCacheToken` to remove on batch when token removed
style.setAttribute(ATTR_TOKEN, token._themeKey);
}
});
return cachedToken;
}
var extract = function extract(cache, effectStyles, options) {
var _cache = (0,slicedToArray["default"])(cache, 5),
realToken = _cache[2],
styleStr = _cache[3],
cssVarKey = _cache[4];
var _ref3 = options || {},
plain = _ref3.plain;
if (!styleStr) {
return null;
}
var styleId = realToken._tokenKey;
var order = -999;
// ====================== Style ======================
// Used for rc-util
var sharedAttrs = {
'data-rc-order': 'prependQueue',
'data-rc-priority': "".concat(order)
};
var styleText = toStyleStr(styleStr, cssVarKey, styleId, sharedAttrs, plain);
return [order, styleId, styleText];
};
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
;// ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js
var unitlessKeys = {
animationIterationCount: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
};
/* harmony default export */ var unitless_browser_esm = (unitlessKeys);
;// ./node_modules/stylis/src/Enum.js
var MS = '-ms-'
var MOZ = '-moz-'
var WEBKIT = '-webkit-'
var COMMENT = 'comm'
var RULESET = 'rule'
var DECLARATION = 'decl'
var PAGE = '@page'
var MEDIA = '@media'
var IMPORT = '@import'
var CHARSET = '@charset'
var VIEWPORT = '@viewport'
var SUPPORTS = '@supports'
var DOCUMENT = '@document'
var NAMESPACE = '@namespace'
var KEYFRAMES = '@keyframes'
var FONT_FACE = '@font-face'
var COUNTER_STYLE = '@counter-style'
var FONT_FEATURE_VALUES = '@font-feature-values'
var LAYER = '@layer'
var SCOPE = '@scope'
;// ./node_modules/stylis/src/Utility.js
/**
* @param {number}
* @return {number}
*/
var abs = Math.abs
/**
* @param {number}
* @return {string}
*/
var from = String.fromCharCode
/**
* @param {object}
* @return {object}
*/
var Utility_assign = Object.assign
/**
* @param {string} value
* @param {number} length
* @return {number}
*/
function hash (value, length) {
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
}
/**
* @param {string} value
* @return {string}
*/
function trim (value) {
return value.trim()
}
/**
* @param {string} value
* @param {RegExp} pattern
* @return {string?}
*/
function match (value, pattern) {
return (value = pattern.exec(value)) ? value[0] : value
}
/**
* @param {string} value
* @param {(string|RegExp)} pattern
* @param {string} replacement
* @return {string}
*/
function replace (value, pattern, replacement) {
return value.replace(pattern, replacement)
}
/**
* @param {string} value
* @param {string} search
* @param {number} position
* @return {number}
*/
function indexof (value, search, position) {
return value.indexOf(search, position)
}
/**
* @param {string} value
* @param {number} index
* @return {number}
*/
function charat (value, index) {
return value.charCodeAt(index) | 0
}
/**
* @param {string} value
* @param {number} begin
* @param {number} end
* @return {string}
*/
function substr (value, begin, end) {
return value.slice(begin, end)
}
/**
* @param {string} value
* @return {number}
*/
function strlen (value) {
return value.length
}
/**
* @param {any[]} value
* @return {number}
*/
function sizeof (value) {
return value.length
}
/**
* @param {any} value
* @param {any[]} array
* @return {any}
*/
function append (value, array) {
return array.push(value), value
}
/**
* @param {string[]} array
* @param {function} callback
* @return {string}
*/
function combine (array, callback) {
return array.map(callback).join('')
}
/**
* @param {string[]} array
* @param {RegExp} pattern
* @return {string[]}
*/
function filter (array, pattern) {
return array.filter(function (value) { return !match(value, pattern) })
}
;// ./node_modules/stylis/src/Serializer.js
/**
* @param {object[]} children
* @param {function} callback
* @return {string}
*/
function serialize (children, callback) {
var output = ''
for (var i = 0; i < children.length; i++)
output += callback(children[i], i, children, callback) || ''
return output
}
/**
* @param {object} element
* @param {number} index
* @param {object[]} children
* @param {function} callback
* @return {string}
*/
function stringify (element, index, children, callback) {
switch (element.type) {
case LAYER: if (element.children.length) break
case IMPORT: case NAMESPACE: case DECLARATION: return element.return = element.return || element.value
case COMMENT: return ''
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
case RULESET: if (!strlen(element.value = element.props.join(','))) return ''
}
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
}
;// ./node_modules/stylis/src/Tokenizer.js
var line = 1
var column = 1
var Tokenizer_length = 0
var position = 0
var character = 0
var characters = ''
/**
* @param {string} value
* @param {object | null} root
* @param {object | null} parent
* @param {string} type
* @param {string[] | string} props
* @param {object[] | string} children
* @param {object[]} siblings
* @param {number} length
*/
function node (value, root, parent, type, props, children, length, siblings) {
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}
}
/**
* @param {object} root
* @param {object} props
* @return {object}
*/
function copy (root, props) {
return Utility_assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)
}
/**
* @param {object} root
*/
function lift (root) {
while (root.root)
root = copy(root.root, {children: [root]})
append(root, root.siblings)
}
/**
* @return {number}
*/
function Tokenizer_char () {
return character
}
/**
* @return {number}
*/
function prev () {
character = position > 0 ? charat(characters, --position) : 0
if (column--, character === 10)
column = 1, line--
return character
}
/**
* @return {number}
*/
function next () {
character = position < Tokenizer_length ? charat(characters, position++) : 0
if (column++, character === 10)
column = 1, line++
return character
}
/**
* @return {number}
*/
function peek () {
return charat(characters, position)
}
/**
* @return {number}
*/
function caret () {
return position
}
/**
* @param {number} begin
* @param {number} end
* @return {string}
*/
function slice (begin, end) {
return substr(characters, begin, end)
}
/**
* @param {number} type
* @return {number}
*/
function token (type) {
switch (type) {
// \0 \t \n \r \s whitespace token
case 0: case 9: case 10: case 13: case 32:
return 5
// ! + , / > @ ~ isolate token
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
// ; { } breakpoint token
case 59: case 123: case 125:
return 4
// : accompanied token
case 58:
return 3
// " ' ( [ opening delimit token
case 34: case 39: case 40: case 91:
return 2
// ) ] closing delimit token
case 41: case 93:
return 1
}
return 0
}
/**
* @param {string} value
* @return {any[]}
*/
function alloc (value) {
return line = column = 1, Tokenizer_length = strlen(characters = value), position = 0, []
}
/**
* @param {any} value
* @return {any}
*/
function dealloc (value) {
return characters = '', value
}
/**
* @param {number} type
* @return {string}
*/
function delimit (type) {
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
}
/**
* @param {string} value
* @return {string[]}
*/
function tokenize (value) {
return dealloc(tokenizer(alloc(value)))
}
/**
* @param {number} type
* @return {string}
*/
function whitespace (type) {
while (character = peek())
if (character < 33)
next()
else
break
return token(type) > 2 || token(character) > 3 ? '' : ' '
}
/**
* @param {string[]} children
* @return {string[]}
*/
function tokenizer (children) {
while (next())
switch (token(character)) {
case 0: append(identifier(position - 1), children)
break
case 2: append(delimit(character), children)
break
default: append(from(character), children)
}
return children
}
/**
* @param {number} index
* @param {number} count
* @return {string}
*/
function escaping (index, count) {
while (--count && next())
// not 0-9 A-F a-f
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
break
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
}
/**
* @param {number} type
* @return {number}
*/
function delimiter (type) {
while (next())
switch (character) {
// ] ) " '
case type:
return position
// " '
case 34: case 39:
if (type !== 34 && type !== 39)
delimiter(character)
break
// (
case 40:
if (type === 41)
delimiter(type)
break
// \
case 92:
next()
break
}
return position
}
/**
* @param {number} type
* @param {number} index
* @return {number}
*/
function commenter (type, index) {
while (next())
// //
if (type + character === 47 + 10)
break
// /*
else if (type + character === 42 + 42 && peek() === 47)
break
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
}
/**
* @param {number} index
* @return {string}
*/
function identifier (index) {
while (!token(peek()))
next()
return slice(index, position)
}
;// ./node_modules/stylis/src/Parser.js
/**
* @param {string} value
* @return {object[]}
*/
function compile (value) {
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
}
/**
* @param {string} value
* @param {object} root
* @param {object?} parent
* @param {string[]} rule
* @param {string[]} rules
* @param {string[]} rulesets
* @param {number[]} pseudo
* @param {number[]} points
* @param {string[]} declarations
* @return {object}
*/
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
var index = 0
var offset = 0
var length = pseudo
var atrule = 0
var property = 0
var previous = 0
var variable = 1
var scanning = 1
var ampersand = 1
var character = 0
var type = ''
var props = rules
var children = rulesets
var reference = rule
var characters = type
while (scanning)
switch (previous = character, character = next()) {
// (
case 40:
if (previous != 108 && charat(characters, length - 1) == 58) {
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f', abs(index ? points[index - 1] : 0)) != -1)
ampersand = -1
break
}
// " ' [
case 34: case 39: case 91:
characters += delimit(character)
break
// \t \n \r \s
case 9: case 10: case 13: case 32:
characters += whitespace(previous)
break
// \
case 92:
characters += escaping(caret() - 1, 7)
continue
// /
case 47:
switch (peek()) {
case 42: case 47:
append(comment(commenter(next(), caret()), root, parent, declarations), declarations)
if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' '
break
default:
characters += '/'
}
break
// {
case 123 * variable:
points[index++] = strlen(characters) * ampersand
// } ; \0
case 125 * variable: case 59: case 0:
switch (character) {
// \0 }
case 0: case 125: scanning = 0
// ;
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '')
if (property > 0 && (strlen(characters) - length || (variable === 0 && previous === 47)))
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)
break
// @ ;
case 59: characters += ';'
// { rule/at-rule
default:
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)
if (character === 123)
if (offset === 0)
parse(characters, root, reference, reference, props, rulesets, length, points, children)
else {
switch (atrule) {
// c(ontainer)
case 99:
if (charat(characters, 3) === 110) break
// l(ayer)
case 108:
if (charat(characters, 2) === 97) break
default:
offset = 0
// d(ocument) m(edia) s(upports)
case 100: case 109: case 115:
}
if (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)
else parse(characters, reference, reference, reference, [''], children, 0, points, children)
}
}
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo
break
// :
case 58:
length = 1 + strlen(characters), property = previous
default:
if (variable < 1)
if (character == 123)
--variable
else if (character == 125 && variable++ == 0 && prev() == 125)
continue
switch (characters += from(character), character * variable) {
// &
case 38:
ampersand = offset > 0 ? 1 : (characters += '\f', -1)
break
// ,
case 44:
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1
break
// @
case 64:
// -
if (peek() === 45)
characters += delimit(next())
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++
break
// -
case 45:
if (previous === 45 && strlen(characters) == 2)
variable = 0
}
}
return rulesets
}
/**
* @param {string} value
* @param {object} root
* @param {object?} parent
* @param {number} index
* @param {number} offset
* @param {string[]} rules
* @param {number[]} points
* @param {string} type
* @param {string[]} props
* @param {string[]} children
* @param {number} length
* @param {object[]} siblings
* @return {object}
*/
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {
var post = offset - 1
var rule = offset === 0 ? rules : ['']
var size = sizeof(rule)
for (var i = 0, j = 0, k = 0; i < index; ++i)
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
props[k++] = z
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)
}
/**
* @param {number} value
* @param {object} root
* @param {object?} parent
* @param {object[]} siblings
* @return {object}
*/
function comment (value, root, parent, siblings) {
return node(value, root, parent, COMMENT, from(Tokenizer_char()), substr(value, 2, -2), 0, siblings)
}
/**
* @param {string} value
* @param {object} root
* @param {object?} parent
* @param {number} length
* @param {object[]} siblings
* @return {object}
*/
function declaration (value, root, parent, length, siblings) {
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)
}
;// ./node_modules/@ant-design/cssinjs/es/linters/utils.js
function lintWarning(message, info) {
var path = info.path,
parentSelectors = info.parentSelectors;
(0,warning["default"])(false, "[Ant Design CSS-in-JS] ".concat(path ? "Error in ".concat(path, ": ") : '').concat(message).concat(parentSelectors.length ? " Selector: ".concat(parentSelectors.join(' | ')) : ''));
}
;// ./node_modules/@ant-design/cssinjs/es/linters/contentQuotesLinter.js
var linter = function linter(key, value, info) {
if (key === 'content') {
// From emotion: https://github.com/emotion-js/emotion/blob/main/packages/serialize/src/index.js#L63
var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
lintWarning("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(value, "\"'`."), info);
}
}
};
/* harmony default export */ var contentQuotesLinter = (linter);
;// ./node_modules/@ant-design/cssinjs/es/linters/hashedAnimationLinter.js
var hashedAnimationLinter_linter = function linter(key, value, info) {
if (key === 'animation') {
if (info.hashId && value !== 'none') {
lintWarning("You seem to be using hashed animation '".concat(value, "', in which case 'animationName' with Keyframe as value is recommended."), info);
}
}
};
/* harmony default export */ var hashedAnimationLinter = (hashedAnimationLinter_linter);
;// ./node_modules/@ant-design/cssinjs/es/linters/legacyNotSelectorLinter.js
function isConcatSelector(selector) {
var _selector$match;
var notContent = ((_selector$match = selector.match(/:not\(([^)]*)\)/)) === null || _selector$match === void 0 ? void 0 : _selector$match[1]) || '';
// split selector. e.g.
// `h1#a.b` => ['h1', #a', '.b']
var splitCells = notContent.split(/(\[[^[]*])|(?=[.#])/).filter(function (str) {
return str;
});
return splitCells.length > 1;
}
function parsePath(info) {
return info.parentSelectors.reduce(function (prev, cur) {
if (!prev) {
return cur;
}
return cur.includes('&') ? cur.replace(/&/g, prev) : "".concat(prev, " ").concat(cur);
}, '');
}
var legacyNotSelectorLinter_linter = function linter(key, value, info) {
var parentSelectorPath = parsePath(info);
var notList = parentSelectorPath.match(/:not\([^)]*\)/g) || [];
if (notList.length > 0 && notList.some(isConcatSelector)) {
lintWarning("Concat ':not' selector not support in legacy browsers.", info);
}
};
/* harmony default export */ var legacyNotSelectorLinter = (legacyNotSelectorLinter_linter);
;// ./node_modules/@ant-design/cssinjs/es/linters/logicalPropertiesLinter.js
var logicalPropertiesLinter_linter = function linter(key, value, info) {
switch (key) {
case 'marginLeft':
case 'marginRight':
case 'paddingLeft':
case 'paddingRight':
case 'left':
case 'right':
case 'borderLeft':
case 'borderLeftWidth':
case 'borderLeftStyle':
case 'borderLeftColor':
case 'borderRight':
case 'borderRightWidth':
case 'borderRightStyle':
case 'borderRightColor':
case 'borderTopLeftRadius':
case 'borderTopRightRadius':
case 'borderBottomLeftRadius':
case 'borderBottomRightRadius':
lintWarning("You seem to be using non-logical property '".concat(key, "' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
return;
case 'margin':
case 'padding':
case 'borderWidth':
case 'borderStyle':
// case 'borderColor':
if (typeof value === 'string') {
var valueArr = value.split(' ').map(function (item) {
return item.trim();
});
if (valueArr.length === 4 && valueArr[1] !== valueArr[3]) {
lintWarning("You seem to be using '".concat(key, "' property with different left ").concat(key, " and right ").concat(key, ", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
}
}
return;
case 'clear':
case 'textAlign':
if (value === 'left' || value === 'right') {
lintWarning("You seem to be using non-logical value '".concat(value, "' of ").concat(key, ", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
}
return;
case 'borderRadius':
if (typeof value === 'string') {
var radiusGroups = value.split('/').map(function (item) {
return item.trim();
});
var invalid = radiusGroups.reduce(function (result, group) {
if (result) {
return result;
}
var radiusArr = group.split(' ').map(function (item) {
return item.trim();
});
// borderRadius: '2px 4px'
if (radiusArr.length >= 2 && radiusArr[0] !== radiusArr[1]) {
return true;
}
// borderRadius: '4px 4px 2px'
if (radiusArr.length === 3 && radiusArr[1] !== radiusArr[2]) {
return true;
}
// borderRadius: '4px 4px 2px 4px'
if (radiusArr.length === 4 && radiusArr[2] !== radiusArr[3]) {
return true;
}
return result;
}, false);
if (invalid) {
lintWarning("You seem to be using non-logical value '".concat(value, "' of ").concat(key, ", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
}
}
return;
default:
}
};
/* harmony default export */ var logicalPropertiesLinter = (logicalPropertiesLinter_linter);
;// ./node_modules/@ant-design/cssinjs/es/linters/NaNLinter.js
var NaNLinter_linter = function linter(key, value, info) {
if (typeof value === 'string' && /NaN/g.test(value) || Number.isNaN(value)) {
lintWarning("Unexpected 'NaN' in property '".concat(key, ": ").concat(value, "'."), info);
}
};
/* harmony default export */ var NaNLinter = (NaNLinter_linter);
;// ./node_modules/@ant-design/cssinjs/es/linters/parentSelectorLinter.js
var parentSelectorLinter_linter = function linter(key, value, info) {
if (info.parentSelectors.some(function (selector) {
var selectors = selector.split(',');
return selectors.some(function (item) {
return item.split('&').length > 2;
});
})) {
lintWarning('Should not use more than one `&` in a selector.', info);
}
};
/* harmony default export */ var parentSelectorLinter = (parentSelectorLinter_linter);
;// ./node_modules/@ant-design/cssinjs/es/linters/index.js
;// ./node_modules/@ant-design/cssinjs/es/util/cacheMapUtil.js
var ATTR_CACHE_MAP = 'data-ant-cssinjs-cache-path';
/**
* This marks style from the css file.
* Which means not exist in `<style />` tag.
*/
var CSS_FILE_STYLE = '_FILE_STYLE__';
function cacheMapUtil_serialize(cachePathMap) {
return Object.keys(cachePathMap).map(function (path) {
var hash = cachePathMap[path];
return "".concat(path, ":").concat(hash);
}).join(';');
}
var cachePathMap;
var fromCSSFile = true;
/**
* @private Test usage only. Can save remove if no need.
*/
function cacheMapUtil_reset(mockCache) {
var fromFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
cachePathMap = mockCache;
fromCSSFile = fromFile;
}
function prepare() {
if (!cachePathMap) {
cachePathMap = {};
if ((0,canUseDom["default"])()) {
var div = document.createElement('div');
div.className = ATTR_CACHE_MAP;
div.style.position = 'fixed';
div.style.visibility = 'hidden';
div.style.top = '-9999px';
document.body.appendChild(div);
var content = getComputedStyle(div).content || '';
content = content.replace(/^"/, '').replace(/"$/, '');
// Fill data
content.split(';').forEach(function (item) {
var _item$split = item.split(':'),
_item$split2 = (0,slicedToArray["default"])(_item$split, 2),
path = _item$split2[0],
hash = _item$split2[1];
cachePathMap[path] = hash;
});
// Remove inline record style
var inlineMapStyle = document.querySelector("style[".concat(ATTR_CACHE_MAP, "]"));
if (inlineMapStyle) {
var _inlineMapStyle$paren;
fromCSSFile = false;
(_inlineMapStyle$paren = inlineMapStyle.parentNode) === null || _inlineMapStyle$paren === void 0 || _inlineMapStyle$paren.removeChild(inlineMapStyle);
}
document.body.removeChild(div);
}
}
}
function existPath(path) {
prepare();
return !!cachePathMap[path];
}
function getStyleAndHash(path) {
var hash = cachePathMap[path];
var styleStr = null;
if (hash && (0,canUseDom["default"])()) {
if (fromCSSFile) {
styleStr = CSS_FILE_STYLE;
} else {
var _style = document.querySelector("style[".concat(ATTR_MARK, "=\"").concat(cachePathMap[path], "\"]"));
if (_style) {
styleStr = _style.innerHTML;
} else {
// Clean up since not exist anymore
delete cachePathMap[path];
}
}
}
return [styleStr, hash];
}
;// ./node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js
// @ts-ignore
var SKIP_CHECK = '_skip_check_';
var MULTI_VALUE = '_multi_value_';
// ============================================================================
// == Parser ==
// ============================================================================
// Preprocessor style content to browser support one
function normalizeStyle(styleStr) {
var serialized = serialize(compile(styleStr), stringify);
return serialized.replace(/\{%%%\:[^;];}/g, ';');
}
function isCompoundCSSProperty(value) {
return (0,esm_typeof["default"])(value) === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);
}
// 注入 hash 值
function injectSelectorHash(key, hashId, hashPriority) {
if (!hashId) {
return key;
}
var hashClassName = ".".concat(hashId);
var hashSelector = hashPriority === 'low' ? ":where(".concat(hashClassName, ")") : hashClassName;
// 注入 hashId
var keys = key.split(',').map(function (k) {
var _firstPath$match;
var fullPath = k.trim().split(/\s+/);
// 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。
var firstPath = fullPath[0] || '';
var htmlElement = ((_firstPath$match = firstPath.match(/^\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';
firstPath = "".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));
return [firstPath].concat((0,toConsumableArray["default"])(fullPath.slice(1))).join(' ');
});
return keys.join(',');
}
// Parse CSSObject to style content
var parseStyle = function parseStyle(interpolation) {
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
root: true,
parentSelectors: []
},
root = _ref.root,
injectHash = _ref.injectHash,
parentSelectors = _ref.parentSelectors;
var hashId = config.hashId,
layer = config.layer,
path = config.path,
hashPriority = config.hashPriority,
_config$transformers = config.transformers,
transformers = _config$transformers === void 0 ? [] : _config$transformers,
_config$linters = config.linters,
linters = _config$linters === void 0 ? [] : _config$linters;
var styleStr = '';
var effectStyle = {};
function parseKeyframes(keyframes) {
var animationName = keyframes.getName(hashId);
if (!effectStyle[animationName]) {
var _parseStyle = parseStyle(keyframes.style, config, {
root: false,
parentSelectors: parentSelectors
}),
_parseStyle2 = (0,slicedToArray["default"])(_parseStyle, 1),
_parsedStr = _parseStyle2[0];
effectStyle[animationName] = "@keyframes ".concat(keyframes.getName(hashId)).concat(_parsedStr);
}
}
function flattenList(list) {
var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
list.forEach(function (item) {
if (Array.isArray(item)) {
flattenList(item, fullList);
} else if (item) {
fullList.push(item);
}
});
return fullList;
}
var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);
flattenStyleList.forEach(function (originStyle) {
// Only root level can use raw string
var style = typeof originStyle === 'string' && !root ? {} : originStyle;
if (typeof style === 'string') {
styleStr += "".concat(style, "\n");
} else if (style._keyframe) {
// Keyframe
parseKeyframes(style);
} else {
var mergedStyle = transformers.reduce(function (prev, trans) {
var _trans$visit;
return (trans === null || trans === void 0 || (_trans$visit = trans.visit) === null || _trans$visit === void 0 ? void 0 : _trans$visit.call(trans, prev)) || prev;
}, style);
// Normal CSSObject
Object.keys(mergedStyle).forEach(function (key) {
var value = mergedStyle[key];
if ((0,esm_typeof["default"])(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {
var subInjectHash = false;
// 当成嵌套对象来处理
var mergedKey = key.trim();
// Whether treat child as root. In most case it is false.
var nextRoot = false;
// 拆分多个选择器
if ((root || injectHash) && hashId) {
if (mergedKey.startsWith('@')) {
// 略过媒体查询,交给子节点继续插入 hashId
subInjectHash = true;
} else if (mergedKey === '&') {
// 抹掉 root selector 上的单个 &
mergedKey = injectSelectorHash('', hashId, hashPriority);
} else {
// 注入 hashId
mergedKey = injectSelectorHash(key, hashId, hashPriority);
}
} else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {
// In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,
// we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.
// But it does not conform to stylis syntax,
// and finally we will get `{color:red;}` as css, which is wrong.
// So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.
mergedKey = '';
nextRoot = true;
}
var _parseStyle3 = parseStyle(value, config, {
root: nextRoot,
injectHash: subInjectHash,
parentSelectors: [].concat((0,toConsumableArray["default"])(parentSelectors), [mergedKey])
}),
_parseStyle4 = (0,slicedToArray["default"])(_parseStyle3, 2),
_parsedStr2 = _parseStyle4[0],
childEffectStyle = _parseStyle4[1];
effectStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, effectStyle), childEffectStyle);
styleStr += "".concat(mergedKey).concat(_parsedStr2);
} else {
var _value;
function appendStyle(cssKey, cssValue) {
if ( true && ((0,esm_typeof["default"])(value) !== 'object' || !(value !== null && value !== void 0 && value[SKIP_CHECK]))) {
[contentQuotesLinter, hashedAnimationLinter].concat((0,toConsumableArray["default"])(linters)).forEach(function (linter) {
return linter(cssKey, cssValue, {
path: path,
hashId: hashId,
parentSelectors: parentSelectors
});
});
}
// 如果是样式则直接插入
var styleName = cssKey.replace(/[A-Z]/g, function (match) {
return "-".concat(match.toLowerCase());
});
// Auto suffix with px
var formatValue = cssValue;
if (!unitless_browser_esm[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {
formatValue = "".concat(formatValue, "px");
}
// handle animationName & Keyframe value
if (cssKey === 'animationName' && cssValue !== null && cssValue !== void 0 && cssValue._keyframe) {
parseKeyframes(cssValue);
formatValue = cssValue.getName(hashId);
}
styleStr += "".concat(styleName, ":").concat(formatValue, ";");
}
var actualValue = (_value = value === null || value === void 0 ? void 0 : value.value) !== null && _value !== void 0 ? _value : value;
if ((0,esm_typeof["default"])(value) === 'object' && value !== null && value !== void 0 && value[MULTI_VALUE] && Array.isArray(actualValue)) {
actualValue.forEach(function (item) {
appendStyle(key, item);
});
} else {
appendStyle(key, actualValue);
}
}
});
}
});
if (!root) {
styleStr = "{".concat(styleStr, "}");
} else if (layer) {
// fixme: https://github.com/thysultan/stylis/pull/339
if (styleStr) {
styleStr = "@layer ".concat(layer.name, " {").concat(styleStr, "}");
}
if (layer.dependencies) {
effectStyle["@layer ".concat(layer.name)] = layer.dependencies.map(function (deps) {
return "@layer ".concat(deps, ", ").concat(layer.name, ";");
}).join('\n');
}
}
return [styleStr, effectStyle];
};
// ============================================================================
// == Register ==
// ============================================================================
function uniqueHash(path, styleStr) {
return hash_browser_esm("".concat(path.join('%')).concat(styleStr));
}
function Empty() {
return null;
}
var STYLE_PREFIX = 'style';
/**
* Register a style to the global style sheet.
*/
function useStyleRegister(info, styleFn) {
var token = info.token,
path = info.path,
hashId = info.hashId,
layer = info.layer,
nonce = info.nonce,
clientOnly = info.clientOnly,
_info$order = info.order,
order = _info$order === void 0 ? 0 : _info$order;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_StyleContext),
autoClear = _React$useContext.autoClear,
mock = _React$useContext.mock,
defaultCache = _React$useContext.defaultCache,
hashPriority = _React$useContext.hashPriority,
container = _React$useContext.container,
ssrInline = _React$useContext.ssrInline,
transformers = _React$useContext.transformers,
linters = _React$useContext.linters,
cache = _React$useContext.cache,
enableLayer = _React$useContext.layer;
var tokenKey = token._tokenKey;
var fullPath = [tokenKey];
if (enableLayer) {
fullPath.push('layer');
}
fullPath.push.apply(fullPath, (0,toConsumableArray["default"])(path));
// Check if need insert style
var isMergedClientSide = isClientSide;
if ( true && mock !== undefined) {
isMergedClientSide = mock === 'client';
}
var _useGlobalCache = useGlobalCache(STYLE_PREFIX, fullPath,
// Create cache if needed
function () {
var cachePath = fullPath.join('|');
// Get style from SSR inline style directly
if (existPath(cachePath)) {
var _getStyleAndHash = getStyleAndHash(cachePath),
_getStyleAndHash2 = (0,slicedToArray["default"])(_getStyleAndHash, 2),
inlineCacheStyleStr = _getStyleAndHash2[0],
styleHash = _getStyleAndHash2[1];
if (inlineCacheStyleStr) {
return [inlineCacheStyleStr, tokenKey, styleHash, {}, clientOnly, order];
}
}
// Generate style
var styleObj = styleFn();
var _parseStyle5 = parseStyle(styleObj, {
hashId: hashId,
hashPriority: hashPriority,
layer: enableLayer ? layer : undefined,
path: path.join('-'),
transformers: transformers,
linters: linters
}),
_parseStyle6 = (0,slicedToArray["default"])(_parseStyle5, 2),
parsedStyle = _parseStyle6[0],
effectStyle = _parseStyle6[1];
var styleStr = normalizeStyle(parsedStyle);
var styleId = uniqueHash(fullPath, styleStr);
return [styleStr, tokenKey, styleId, effectStyle, clientOnly, order];
},
// Remove cache if no need
function (_ref2, fromHMR) {
var _ref3 = (0,slicedToArray["default"])(_ref2, 3),
styleId = _ref3[2];
if ((fromHMR || autoClear) && isClientSide) {
(0,dynamicCSS.removeCSS)(styleId, {
mark: ATTR_MARK
});
}
},
// Effect: Inject style here
function (_ref4) {
var _ref5 = (0,slicedToArray["default"])(_ref4, 4),
styleStr = _ref5[0],
_ = _ref5[1],
styleId = _ref5[2],
effectStyle = _ref5[3];
if (isMergedClientSide && styleStr !== CSS_FILE_STYLE) {
var mergedCSSConfig = {
mark: ATTR_MARK,
prepend: enableLayer ? false : 'queue',
attachTo: container,
priority: order
};
var nonceStr = typeof nonce === 'function' ? nonce() : nonce;
if (nonceStr) {
mergedCSSConfig.csp = {
nonce: nonceStr
};
}
// ================= Split Effect Style =================
// We will split effectStyle here since @layer should be at the top level
var effectLayerKeys = [];
var effectRestKeys = [];
Object.keys(effectStyle).forEach(function (key) {
if (key.startsWith('@layer')) {
effectLayerKeys.push(key);
} else {
effectRestKeys.push(key);
}
});
// ================= Inject Layer Style =================
// Inject layer style
effectLayerKeys.forEach(function (effectKey) {
(0,dynamicCSS.updateCSS)(normalizeStyle(effectStyle[effectKey]), "_layer-".concat(effectKey), (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedCSSConfig), {}, {
prepend: true
}));
});
// ==================== Inject Style ====================
// Inject style
var style = (0,dynamicCSS.updateCSS)(styleStr, styleId, mergedCSSConfig);
style[CSS_IN_JS_INSTANCE] = cache.instanceId;
// Used for `useCacheToken` to remove on batch when token removed
style.setAttribute(ATTR_TOKEN, tokenKey);
// Debug usage. Dev only
if (true) {
style.setAttribute(ATTR_CACHE_PATH, fullPath.join('|'));
}
// ================ Inject Effect Style =================
// Inject client side effect style
effectRestKeys.forEach(function (effectKey) {
(0,dynamicCSS.updateCSS)(normalizeStyle(effectStyle[effectKey]), "_effect-".concat(effectKey), mergedCSSConfig);
});
}
}),
_useGlobalCache2 = (0,slicedToArray["default"])(_useGlobalCache, 3),
cachedStyleStr = _useGlobalCache2[0],
cachedTokenKey = _useGlobalCache2[1],
cachedStyleId = _useGlobalCache2[2];
return function (node) {
var styleNode;
if (!ssrInline || isMergedClientSide || !defaultCache) {
styleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Empty, null);
} else {
var _ref6;
styleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("style", (0,esm_extends["default"])({}, (_ref6 = {}, (0,defineProperty["default"])(_ref6, ATTR_TOKEN, cachedTokenKey), (0,defineProperty["default"])(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
dangerouslySetInnerHTML: {
__html: cachedStyleStr
}
}));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, styleNode, node);
};
}
var useStyleRegister_extract = function extract(cache, effectStyles, options) {
var _cache = (0,slicedToArray["default"])(cache, 6),
styleStr = _cache[0],
tokenKey = _cache[1],
styleId = _cache[2],
effectStyle = _cache[3],
clientOnly = _cache[4],
order = _cache[5];
var _ref7 = options || {},
plain = _ref7.plain;
// Skip client only style
if (clientOnly) {
return null;
}
var keyStyleText = styleStr;
// ====================== Share ======================
// Used for rc-util
var sharedAttrs = {
'data-rc-order': 'prependQueue',
'data-rc-priority': "".concat(order)
};
// ====================== Style ======================
keyStyleText = toStyleStr(styleStr, tokenKey, styleId, sharedAttrs, plain);
// =============== Create effect style ===============
if (effectStyle) {
Object.keys(effectStyle).forEach(function (effectKey) {
// Effect style can be reused
if (!effectStyles[effectKey]) {
effectStyles[effectKey] = true;
var effectStyleStr = normalizeStyle(effectStyle[effectKey]);
var effectStyleHTML = toStyleStr(effectStyleStr, tokenKey, "_effect-".concat(effectKey), sharedAttrs, plain);
if (effectKey.startsWith('@layer')) {
keyStyleText = effectStyleHTML + keyStyleText;
} else {
keyStyleText += effectStyleHTML;
}
}
});
}
return [order, styleId, keyStyleText];
};
;// ./node_modules/@ant-design/cssinjs/es/hooks/useCSSVarRegister.js
var CSS_VAR_PREFIX = 'cssVar';
var useCSSVarRegister = function useCSSVarRegister(config, fn) {
var key = config.key,
prefix = config.prefix,
unitless = config.unitless,
ignore = config.ignore,
token = config.token,
_config$scope = config.scope,
scope = _config$scope === void 0 ? '' : _config$scope;
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(es_StyleContext),
instanceId = _useContext.cache.instanceId,
container = _useContext.container;
var tokenKey = token._tokenKey;
var stylePath = [].concat((0,toConsumableArray["default"])(config.path), [key, scope, tokenKey]);
var cache = useGlobalCache(CSS_VAR_PREFIX, stylePath, function () {
var originToken = fn();
var _transformToken = transformToken(originToken, key, {
prefix: prefix,
unitless: unitless,
ignore: ignore,
scope: scope
}),
_transformToken2 = (0,slicedToArray["default"])(_transformToken, 2),
mergedToken = _transformToken2[0],
cssVarsStr = _transformToken2[1];
var styleId = uniqueHash(stylePath, cssVarsStr);
return [mergedToken, cssVarsStr, styleId, key];
}, function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 3),
styleId = _ref2[2];
if (isClientSide) {
(0,dynamicCSS.removeCSS)(styleId, {
mark: ATTR_MARK
});
}
}, function (_ref3) {
var _ref4 = (0,slicedToArray["default"])(_ref3, 3),
cssVarsStr = _ref4[1],
styleId = _ref4[2];
if (!cssVarsStr) {
return;
}
var style = (0,dynamicCSS.updateCSS)(cssVarsStr, styleId, {
mark: ATTR_MARK,
prepend: 'queue',
attachTo: container,
priority: -999
});
style[CSS_IN_JS_INSTANCE] = instanceId;
// Used for `useCacheToken` to remove on batch when token removed
style.setAttribute(ATTR_TOKEN, key);
});
return cache;
};
var useCSSVarRegister_extract = function extract(cache, effectStyles, options) {
var _cache = (0,slicedToArray["default"])(cache, 4),
styleStr = _cache[1],
styleId = _cache[2],
cssVarKey = _cache[3];
var _ref5 = options || {},
plain = _ref5.plain;
if (!styleStr) {
return null;
}
var order = -999;
// ====================== Style ======================
// Used for rc-util
var sharedAttrs = {
'data-rc-order': 'prependQueue',
'data-rc-priority': "".concat(order)
};
var styleText = toStyleStr(styleStr, cssVarKey, styleId, sharedAttrs, plain);
return [order, styleId, styleText];
};
/* harmony default export */ var hooks_useCSSVarRegister = (useCSSVarRegister);
;// ./node_modules/@ant-design/cssinjs/es/extractStyle.js
var _ExtractStyleFns;
var ExtractStyleFns = (_ExtractStyleFns = {}, (0,defineProperty["default"])(_ExtractStyleFns, STYLE_PREFIX, useStyleRegister_extract), (0,defineProperty["default"])(_ExtractStyleFns, TOKEN_PREFIX, extract), (0,defineProperty["default"])(_ExtractStyleFns, CSS_VAR_PREFIX, useCSSVarRegister_extract), _ExtractStyleFns);
function isNotNull(value) {
return value !== null;
}
function extractStyle(cache, options) {
var _ref = typeof options === 'boolean' ? {
plain: options
} : options || {},
_ref$plain = _ref.plain,
plain = _ref$plain === void 0 ? false : _ref$plain,
_ref$types = _ref.types,
types = _ref$types === void 0 ? ['style', 'token', 'cssVar'] : _ref$types;
var matchPrefixRegexp = new RegExp("^(".concat((typeof types === 'string' ? [types] : types).join('|'), ")%"));
// prefix with `style` is used for `useStyleRegister` to cache style context
var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {
return matchPrefixRegexp.test(key);
});
// Common effect styles like animation
var effectStyles = {};
// Mapping of cachePath to style hash
var cachePathMap = {};
var styleText = '';
styleKeys.map(function (key) {
var cachePath = key.replace(matchPrefixRegexp, '').replace(/%/g, '|');
var _key$split = key.split('%'),
_key$split2 = (0,slicedToArray["default"])(_key$split, 1),
prefix = _key$split2[0];
var extractFn = ExtractStyleFns[prefix];
var extractedStyle = extractFn(cache.cache.get(key)[1], effectStyles, {
plain: plain
});
if (!extractedStyle) {
return null;
}
var _extractedStyle = (0,slicedToArray["default"])(extractedStyle, 3),
order = _extractedStyle[0],
styleId = _extractedStyle[1],
styleStr = _extractedStyle[2];
if (key.startsWith('style')) {
cachePathMap[cachePath] = styleId;
}
return [order, styleStr];
}).filter(isNotNull).sort(function (_ref2, _ref3) {
var _ref4 = (0,slicedToArray["default"])(_ref2, 1),
o1 = _ref4[0];
var _ref5 = (0,slicedToArray["default"])(_ref3, 1),
o2 = _ref5[0];
return o1 - o2;
}).forEach(function (_ref6) {
var _ref7 = (0,slicedToArray["default"])(_ref6, 2),
style = _ref7[1];
styleText += style;
});
// ==================== Fill Cache Path ====================
styleText += toStyleStr(".".concat(ATTR_CACHE_MAP, "{content:\"").concat(cacheMapUtil_serialize(cachePathMap), "\";}"), undefined, undefined, (0,defineProperty["default"])({}, ATTR_CACHE_MAP, ATTR_CACHE_MAP), plain);
return styleText;
}
;// ./node_modules/@ant-design/cssinjs/es/Keyframes.js
var Keyframe = /*#__PURE__*/function () {
function Keyframe(name, style) {
(0,classCallCheck["default"])(this, Keyframe);
(0,defineProperty["default"])(this, "name", void 0);
(0,defineProperty["default"])(this, "style", void 0);
(0,defineProperty["default"])(this, "_keyframe", true);
this.name = name;
this.style = style;
}
(0,createClass["default"])(Keyframe, [{
key: "getName",
value: function getName() {
var hashId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
return hashId ? "".concat(hashId, "-").concat(this.name) : this.name;
}
}]);
return Keyframe;
}();
/* harmony default export */ var Keyframes = (Keyframe);
;// ./node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.js
function splitValues(value) {
if (typeof value === 'number') {
return [[value], false];
}
var rawStyle = String(value).trim();
var importantCells = rawStyle.match(/(.*)(!important)/);
var splitStyle = (importantCells ? importantCells[1] : rawStyle).trim().split(/\s+/);
// Combine styles split in brackets, like `calc(1px + 2px)`
var temp = [];
var brackets = 0;
return [splitStyle.reduce(function (list, item) {
if (item.includes('(') || item.includes(')')) {
var left = item.split('(').length - 1;
var right = item.split(')').length - 1;
brackets += left - right;
}
if (brackets >= 0) temp.push(item);
if (brackets === 0) {
list.push(temp.join(' '));
temp = [];
}
return list;
}, []), !!importantCells];
}
function noSplit(list) {
list.notSplit = true;
return list;
}
var keyMap = {
// Inset
inset: ['top', 'right', 'bottom', 'left'],
insetBlock: ['top', 'bottom'],
insetBlockStart: ['top'],
insetBlockEnd: ['bottom'],
insetInline: ['left', 'right'],
insetInlineStart: ['left'],
insetInlineEnd: ['right'],
// Margin
marginBlock: ['marginTop', 'marginBottom'],
marginBlockStart: ['marginTop'],
marginBlockEnd: ['marginBottom'],
marginInline: ['marginLeft', 'marginRight'],
marginInlineStart: ['marginLeft'],
marginInlineEnd: ['marginRight'],
// Padding
paddingBlock: ['paddingTop', 'paddingBottom'],
paddingBlockStart: ['paddingTop'],
paddingBlockEnd: ['paddingBottom'],
paddingInline: ['paddingLeft', 'paddingRight'],
paddingInlineStart: ['paddingLeft'],
paddingInlineEnd: ['paddingRight'],
// Border
borderBlock: noSplit(['borderTop', 'borderBottom']),
borderBlockStart: noSplit(['borderTop']),
borderBlockEnd: noSplit(['borderBottom']),
borderInline: noSplit(['borderLeft', 'borderRight']),
borderInlineStart: noSplit(['borderLeft']),
borderInlineEnd: noSplit(['borderRight']),
// Border width
borderBlockWidth: ['borderTopWidth', 'borderBottomWidth'],
borderBlockStartWidth: ['borderTopWidth'],
borderBlockEndWidth: ['borderBottomWidth'],
borderInlineWidth: ['borderLeftWidth', 'borderRightWidth'],
borderInlineStartWidth: ['borderLeftWidth'],
borderInlineEndWidth: ['borderRightWidth'],
// Border style
borderBlockStyle: ['borderTopStyle', 'borderBottomStyle'],
borderBlockStartStyle: ['borderTopStyle'],
borderBlockEndStyle: ['borderBottomStyle'],
borderInlineStyle: ['borderLeftStyle', 'borderRightStyle'],
borderInlineStartStyle: ['borderLeftStyle'],
borderInlineEndStyle: ['borderRightStyle'],
// Border color
borderBlockColor: ['borderTopColor', 'borderBottomColor'],
borderBlockStartColor: ['borderTopColor'],
borderBlockEndColor: ['borderBottomColor'],
borderInlineColor: ['borderLeftColor', 'borderRightColor'],
borderInlineStartColor: ['borderLeftColor'],
borderInlineEndColor: ['borderRightColor'],
// Border radius
borderStartStartRadius: ['borderTopLeftRadius'],
borderStartEndRadius: ['borderTopRightRadius'],
borderEndStartRadius: ['borderBottomLeftRadius'],
borderEndEndRadius: ['borderBottomRightRadius']
};
function wrapImportantAndSkipCheck(value, important) {
var parsedValue = value;
if (important) {
parsedValue = "".concat(parsedValue, " !important");
}
return {
_skip_check_: true,
value: parsedValue
};
}
/**
* Convert css logical properties to legacy properties.
* Such as: `margin-block-start` to `margin-top`.
* Transform list:
* - inset
* - margin
* - padding
* - border
*/
var transform = {
visit: function visit(cssObj) {
var clone = {};
Object.keys(cssObj).forEach(function (key) {
var value = cssObj[key];
var matchValue = keyMap[key];
if (matchValue && (typeof value === 'number' || typeof value === 'string')) {
var _splitValues = splitValues(value),
_splitValues2 = (0,slicedToArray["default"])(_splitValues, 2),
_values = _splitValues2[0],
_important = _splitValues2[1];
if (matchValue.length && matchValue.notSplit) {
// not split means always give same value like border
matchValue.forEach(function (matchKey) {
clone[matchKey] = wrapImportantAndSkipCheck(value, _important);
});
} else if (matchValue.length === 1) {
// Handle like `marginBlockStart` => `marginTop`
clone[matchValue[0]] = wrapImportantAndSkipCheck(_values[0], _important);
} else if (matchValue.length === 2) {
// Handle like `marginBlock` => `marginTop` & `marginBottom`
matchValue.forEach(function (matchKey, index) {
var _values$index;
clone[matchKey] = wrapImportantAndSkipCheck((_values$index = _values[index]) !== null && _values$index !== void 0 ? _values$index : _values[0], _important);
});
} else if (matchValue.length === 4) {
// Handle like `inset` => `top` & `right` & `bottom` & `left`
matchValue.forEach(function (matchKey, index) {
var _ref, _values$index2;
clone[matchKey] = wrapImportantAndSkipCheck((_ref = (_values$index2 = _values[index]) !== null && _values$index2 !== void 0 ? _values$index2 : _values[index - 2]) !== null && _ref !== void 0 ? _ref : _values[0], _important);
});
} else {
clone[key] = value;
}
} else {
clone[key] = value;
}
});
return clone;
}
};
/* harmony default export */ var legacyLogicalProperties = (transform);
;// ./node_modules/@ant-design/cssinjs/es/transformers/px2rem.js
/**
* respect https://github.com/cuth/postcss-pxtorem
*/
// @ts-ignore
var pxRegex = /url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;
function toFixed(number, precision) {
var multiplier = Math.pow(10, precision + 1),
wholeNumber = Math.floor(number * multiplier);
return Math.round(wholeNumber / 10) * 10 / multiplier;
}
var px2rem_transform = function transform() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _options$rootValue = options.rootValue,
rootValue = _options$rootValue === void 0 ? 16 : _options$rootValue,
_options$precision = options.precision,
precision = _options$precision === void 0 ? 5 : _options$precision,
_options$mediaQuery = options.mediaQuery,
mediaQuery = _options$mediaQuery === void 0 ? false : _options$mediaQuery;
var pxReplace = function pxReplace(m, $1) {
if (!$1) return m;
var pixels = parseFloat($1);
// covenant: pixels <= 1, not transform to rem @zombieJ
if (pixels <= 1) return m;
var fixedVal = toFixed(pixels / rootValue, precision);
return "".concat(fixedVal, "rem");
};
var visit = function visit(cssObj) {
var clone = (0,objectSpread2["default"])({}, cssObj);
Object.entries(cssObj).forEach(function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 2),
key = _ref2[0],
value = _ref2[1];
if (typeof value === 'string' && value.includes('px')) {
var newValue = value.replace(pxRegex, pxReplace);
clone[key] = newValue;
}
// no unit
if (!unitless_browser_esm[key] && typeof value === 'number' && value !== 0) {
clone[key] = "".concat(value, "px").replace(pxRegex, pxReplace);
}
// Media queries
var mergedKey = key.trim();
if (mergedKey.startsWith('@') && mergedKey.includes('px') && mediaQuery) {
var newKey = key.replace(pxRegex, pxReplace);
clone[newKey] = clone[key];
delete clone[key];
}
});
return clone;
};
return {
visit: visit
};
};
/* harmony default export */ var px2rem = (px2rem_transform);
;// ./node_modules/@ant-design/cssinjs/es/index.js
var _experimental = {
supportModernCSS: function supportModernCSS() {
return supportWhere() && supportLogicProps();
}
};
/***/ }),
/***/ "./node_modules/@ant-design/fast-color/es/index.js":
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/fast-color/es/index.js + 2 modules ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
FastColor: function() { return /* reexport */ FastColor; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
;// ./node_modules/@ant-design/fast-color/es/FastColor.js
const round = Math.round;
/**
* Support format, alpha unit will check the % mark:
* - rgba(102, 204, 255, .5) -> [102, 204, 255, 0.5]
* - rgb(102 204 255 / .5) -> [102, 204, 255, 0.5]
* - rgb(100%, 50%, 0% / 50%) -> [255, 128, 0, 0.5]
* - hsl(270, 60, 40, .5) -> [270, 60, 40, 0.5]
* - hsl(270deg 60% 40% / 50%) -> [270, 60, 40, 0.5]
*
* When `base` is provided, the percentage value will be divided by `base`.
*/
function splitColorStr(str, parseNum) {
const match = str
// Remove str before `(`
.replace(/^[^(]*\((.*)/, '$1')
// Remove str after `)`
.replace(/\).*/, '').match(/\d*\.?\d+%?/g) || [];
const numList = match.map(item => parseFloat(item));
for (let i = 0; i < 3; i += 1) {
numList[i] = parseNum(numList[i] || 0, match[i] || '', i);
}
// For alpha. 50% should be 0.5
if (match[3]) {
numList[3] = match[3].includes('%') ? numList[3] / 100 : numList[3];
} else {
// By default, alpha is 1
numList[3] = 1;
}
return numList;
}
const parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;
/** round and limit number to integer between 0-255 */
function limitRange(value, max) {
const mergedMax = max || 255;
if (value > mergedMax) {
return mergedMax;
}
if (value < 0) {
return 0;
}
return value;
}
class FastColor {
constructor(input) {
/**
* All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
*/
(0,defineProperty["default"])(this, "isValid", true);
/**
* Red, R in RGB
*/
(0,defineProperty["default"])(this, "r", 0);
/**
* Green, G in RGB
*/
(0,defineProperty["default"])(this, "g", 0);
/**
* Blue, B in RGB
*/
(0,defineProperty["default"])(this, "b", 0);
/**
* Alpha/Opacity, A in RGBA/HSLA
*/
(0,defineProperty["default"])(this, "a", 1);
// HSV privates
(0,defineProperty["default"])(this, "_h", void 0);
(0,defineProperty["default"])(this, "_s", void 0);
(0,defineProperty["default"])(this, "_l", void 0);
(0,defineProperty["default"])(this, "_v", void 0);
// intermediate variables to calculate HSL/HSV
(0,defineProperty["default"])(this, "_max", void 0);
(0,defineProperty["default"])(this, "_min", void 0);
(0,defineProperty["default"])(this, "_brightness", void 0);
/**
* Always check 3 char in the object to determine the format.
* We not use function in check to save bundle size.
* e.g. 'rgb' -> { r: 0, g: 0, b: 0 }.
*/
function matchFormat(str) {
return str[0] in input && str[1] in input && str[2] in input;
}
if (!input) {
// Do nothing since already initialized
} else if (typeof input === 'string') {
const trimStr = input.trim();
function matchPrefix(prefix) {
return trimStr.startsWith(prefix);
}
if (/^#?[A-F\d]{3,8}$/i.test(trimStr)) {
this.fromHexString(trimStr);
} else if (matchPrefix('rgb')) {
this.fromRgbString(trimStr);
} else if (matchPrefix('hsl')) {
this.fromHslString(trimStr);
} else if (matchPrefix('hsv') || matchPrefix('hsb')) {
this.fromHsvString(trimStr);
}
} else if (input instanceof FastColor) {
this.r = input.r;
this.g = input.g;
this.b = input.b;
this.a = input.a;
this._h = input._h;
this._s = input._s;
this._l = input._l;
this._v = input._v;
} else if (matchFormat('rgb')) {
this.r = limitRange(input.r);
this.g = limitRange(input.g);
this.b = limitRange(input.b);
this.a = typeof input.a === 'number' ? limitRange(input.a, 1) : 1;
} else if (matchFormat('hsl')) {
this.fromHsl(input);
} else if (matchFormat('hsv')) {
this.fromHsv(input);
} else {
throw new Error('@ant-design/fast-color: unsupported input ' + JSON.stringify(input));
}
}
// ======================= Setter =======================
setR(value) {
return this._sc('r', value);
}
setG(value) {
return this._sc('g', value);
}
setB(value) {
return this._sc('b', value);
}
setA(value) {
return this._sc('a', value, 1);
}
setHue(value) {
const hsv = this.toHsv();
hsv.h = value;
return this._c(hsv);
}
// ======================= Getter =======================
/**
* Returns the perceived luminance of a color, from 0-1.
* @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
*/
getLuminance() {
function adjustGamma(raw) {
const val = raw / 255;
return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
}
const R = adjustGamma(this.r);
const G = adjustGamma(this.g);
const B = adjustGamma(this.b);
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
}
getHue() {
if (typeof this._h === 'undefined') {
const delta = this.getMax() - this.getMin();
if (delta === 0) {
this._h = 0;
} else {
this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));
}
}
return this._h;
}
getSaturation() {
if (typeof this._s === 'undefined') {
const delta = this.getMax() - this.getMin();
if (delta === 0) {
this._s = 0;
} else {
this._s = delta / this.getMax();
}
}
return this._s;
}
getLightness() {
if (typeof this._l === 'undefined') {
this._l = (this.getMax() + this.getMin()) / 510;
}
return this._l;
}
getValue() {
if (typeof this._v === 'undefined') {
this._v = this.getMax() / 255;
}
return this._v;
}
/**
* Returns the perceived brightness of the color, from 0-255.
* Note: this is not the b of HSB
* @see http://www.w3.org/TR/AERT#color-contrast
*/
getBrightness() {
if (typeof this._brightness === 'undefined') {
this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1000;
}
return this._brightness;
}
// ======================== Func ========================
darken(amount = 10) {
const h = this.getHue();
const s = this.getSaturation();
let l = this.getLightness() - amount / 100;
if (l < 0) {
l = 0;
}
return this._c({
h,
s,
l,
a: this.a
});
}
lighten(amount = 10) {
const h = this.getHue();
const s = this.getSaturation();
let l = this.getLightness() + amount / 100;
if (l > 1) {
l = 1;
}
return this._c({
h,
s,
l,
a: this.a
});
}
/**
* Mix the current color a given amount with another color, from 0 to 100.
* 0 means no mixing (return current color).
*/
mix(input, amount = 50) {
const color = this._c(input);
const p = amount / 100;
const calc = key => (color[key] - this[key]) * p + this[key];
const rgba = {
r: round(calc('r')),
g: round(calc('g')),
b: round(calc('b')),
a: round(calc('a') * 100) / 100
};
return this._c(rgba);
}
/**
* Mix the color with pure white, from 0 to 100.
* Providing 0 will do nothing, providing 100 will always return white.
*/
tint(amount = 10) {
return this.mix({
r: 255,
g: 255,
b: 255,
a: 1
}, amount);
}
/**
* Mix the color with pure black, from 0 to 100.
* Providing 0 will do nothing, providing 100 will always return black.
*/
shade(amount = 10) {
return this.mix({
r: 0,
g: 0,
b: 0,
a: 1
}, amount);
}
onBackground(background) {
const bg = this._c(background);
const alpha = this.a + bg.a * (1 - this.a);
const calc = key => {
return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);
};
return this._c({
r: calc('r'),
g: calc('g'),
b: calc('b'),
a: alpha
});
}
// ======================= Status =======================
isDark() {
return this.getBrightness() < 128;
}
isLight() {
return this.getBrightness() >= 128;
}
// ======================== MISC ========================
equals(other) {
return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
}
clone() {
return this._c(this);
}
// ======================= Format =======================
toHexString() {
let hex = '#';
const rHex = (this.r || 0).toString(16);
hex += rHex.length === 2 ? rHex : '0' + rHex;
const gHex = (this.g || 0).toString(16);
hex += gHex.length === 2 ? gHex : '0' + gHex;
const bHex = (this.b || 0).toString(16);
hex += bHex.length === 2 ? bHex : '0' + bHex;
if (typeof this.a === 'number' && this.a >= 0 && this.a < 1) {
const aHex = round(this.a * 255).toString(16);
hex += aHex.length === 2 ? aHex : '0' + aHex;
}
return hex;
}
/** CSS support color pattern */
toHsl() {
return {
h: this.getHue(),
s: this.getSaturation(),
l: this.getLightness(),
a: this.a
};
}
/** CSS support color pattern */
toHslString() {
const h = this.getHue();
const s = round(this.getSaturation() * 100);
const l = round(this.getLightness() * 100);
return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;
}
/** Same as toHsb */
toHsv() {
return {
h: this.getHue(),
s: this.getSaturation(),
v: this.getValue(),
a: this.a
};
}
toRgb() {
return {
r: this.r,
g: this.g,
b: this.b,
a: this.a
};
}
toRgbString() {
return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;
}
toString() {
return this.toRgbString();
}
// ====================== Privates ======================
/** Return a new FastColor object with one channel changed */
_sc(rgb, value, max) {
const clone = this.clone();
clone[rgb] = limitRange(value, max);
return clone;
}
_c(input) {
return new this.constructor(input);
}
getMax() {
if (typeof this._max === 'undefined') {
this._max = Math.max(this.r, this.g, this.b);
}
return this._max;
}
getMin() {
if (typeof this._min === 'undefined') {
this._min = Math.min(this.r, this.g, this.b);
}
return this._min;
}
fromHexString(trimStr) {
const withoutPrefix = trimStr.replace('#', '');
function connectNum(index1, index2) {
return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);
}
if (withoutPrefix.length < 6) {
// #rgb or #rgba
this.r = connectNum(0);
this.g = connectNum(1);
this.b = connectNum(2);
this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;
} else {
// #rrggbb or #rrggbbaa
this.r = connectNum(0, 1);
this.g = connectNum(2, 3);
this.b = connectNum(4, 5);
this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;
}
}
fromHsl({
h,
s,
l,
a
}) {
this._h = h % 360;
this._s = s;
this._l = l;
this.a = typeof a === 'number' ? a : 1;
if (s <= 0) {
const rgb = round(l * 255);
this.r = rgb;
this.g = rgb;
this.b = rgb;
}
let r = 0,
g = 0,
b = 0;
const huePrime = h / 60;
const chroma = (1 - Math.abs(2 * l - 1)) * s;
const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
if (huePrime >= 0 && huePrime < 1) {
r = chroma;
g = secondComponent;
} else if (huePrime >= 1 && huePrime < 2) {
r = secondComponent;
g = chroma;
} else if (huePrime >= 2 && huePrime < 3) {
g = chroma;
b = secondComponent;
} else if (huePrime >= 3 && huePrime < 4) {
g = secondComponent;
b = chroma;
} else if (huePrime >= 4 && huePrime < 5) {
r = secondComponent;
b = chroma;
} else if (huePrime >= 5 && huePrime < 6) {
r = chroma;
b = secondComponent;
}
const lightnessModification = l - chroma / 2;
this.r = round((r + lightnessModification) * 255);
this.g = round((g + lightnessModification) * 255);
this.b = round((b + lightnessModification) * 255);
}
fromHsv({
h,
s,
v,
a
}) {
this._h = h % 360;
this._s = s;
this._v = v;
this.a = typeof a === 'number' ? a : 1;
const vv = round(v * 255);
this.r = vv;
this.g = vv;
this.b = vv;
if (s <= 0) {
return;
}
const hh = h / 60;
const i = Math.floor(hh);
const ff = hh - i;
const p = round(v * (1.0 - s) * 255);
const q = round(v * (1.0 - s * ff) * 255);
const t = round(v * (1.0 - s * (1.0 - ff)) * 255);
switch (i) {
case 0:
this.g = t;
this.b = p;
break;
case 1:
this.r = q;
this.b = p;
break;
case 2:
this.r = p;
this.b = t;
break;
case 3:
this.r = p;
this.g = q;
break;
case 4:
this.r = t;
this.g = p;
break;
case 5:
default:
this.g = p;
this.b = q;
break;
}
}
fromHsvString(trimStr) {
const cells = splitColorStr(trimStr, parseHSVorHSL);
this.fromHsv({
h: cells[0],
s: cells[1],
v: cells[2],
a: cells[3]
});
}
fromHslString(trimStr) {
const cells = splitColorStr(trimStr, parseHSVorHSL);
this.fromHsl({
h: cells[0],
s: cells[1],
l: cells[2],
a: cells[3]
});
}
fromRgbString(trimStr) {
const cells = splitColorStr(trimStr, (num, txt) =>
// Convert percentage to number. e.g. 50% -> 128
txt.includes('%') ? round(num / 100 * 255) : num);
this.r = cells[0];
this.g = cells[1];
this.b = cells[2];
this.a = cells[3];
}
}
;// ./node_modules/@ant-design/fast-color/es/types.js
;// ./node_modules/@ant-design/fast-color/es/index.js
/***/ }),
/***/ "./node_modules/@ant-design/icons/es/components/AntdIcon.js":
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ AntdIcon; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("./node_modules/classnames/index.js");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 3 modules
var es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/Context.js
var Context = __webpack_require__("./node_modules/@ant-design/icons/es/components/Context.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/shadow.js
var shadow = __webpack_require__("./node_modules/rc-util/es/Dom/shadow.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
;// ./node_modules/@ant-design/icons/es/utils.js
function camelCase(input) {
return input.replace(/-(.)/g, function (match, g) {
return g.toUpperCase();
});
}
function utils_warning(valid, message) {
(0,warning["default"])(valid, "[@ant-design/icons] ".concat(message));
}
function isIconDefinition(target) {
return (0,esm_typeof["default"])(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && ((0,esm_typeof["default"])(target.icon) === 'object' || typeof target.icon === 'function');
}
function normalizeAttrs() {
var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return Object.keys(attrs).reduce(function (acc, key) {
var val = attrs[key];
switch (key) {
case 'class':
acc.className = val;
delete acc.class;
break;
default:
delete acc[key];
acc[camelCase(key)] = val;
}
return acc;
}, {});
}
function generate(node, key, rootProps) {
if (!rootProps) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(node.tag, (0,objectSpread2["default"])({
key: key
}, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
}));
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(node.tag, (0,objectSpread2["default"])((0,objectSpread2["default"])({
key: key
}, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
}));
}
function getSecondaryColor(primaryColor) {
// choose the second color
return (0,es.generate)(primaryColor)[0];
}
function normalizeTwoToneColors(twoToneColor) {
if (!twoToneColor) {
return [];
}
return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
}
// These props make sure that the SVG behaviours like general text.
// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
var svgBaseProps = {
width: '1em',
height: '1em',
fill: 'currentColor',
'aria-hidden': 'true',
focusable: 'false'
};
var iconStyles = "\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
var useInsertStyles = function useInsertStyles(eleRef) {
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(Context["default"]),
csp = _useContext.csp,
prefixCls = _useContext.prefixCls,
layer = _useContext.layer;
var mergedStyleStr = iconStyles;
if (prefixCls) {
mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
}
if (layer) {
mergedStyleStr = "@layer ".concat(layer, " {\n").concat(mergedStyleStr, "\n}");
}
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
var ele = eleRef.current;
var shadowRoot = (0,shadow.getShadowRoot)(ele);
(0,dynamicCSS.updateCSS)(mergedStyleStr, '@ant-design-icons', {
prepend: !layer,
csp: csp,
attachTo: shadowRoot
});
}, []);
};
;// ./node_modules/@ant-design/icons/es/components/IconBase.js
var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"];
var twoToneColorPalette = {
primaryColor: '#333',
secondaryColor: '#E6E6E6',
calculated: false
};
function setTwoToneColors(_ref) {
var primaryColor = _ref.primaryColor,
secondaryColor = _ref.secondaryColor;
twoToneColorPalette.primaryColor = primaryColor;
twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
twoToneColorPalette.calculated = !!secondaryColor;
}
function getTwoToneColors() {
return (0,objectSpread2["default"])({}, twoToneColorPalette);
}
var IconBase = function IconBase(props) {
var icon = props.icon,
className = props.className,
onClick = props.onClick,
style = props.style,
primaryColor = props.primaryColor,
secondaryColor = props.secondaryColor,
restProps = (0,objectWithoutProperties["default"])(props, _excluded);
var svgRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
var colors = twoToneColorPalette;
if (primaryColor) {
colors = {
primaryColor: primaryColor,
secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
};
}
useInsertStyles(svgRef);
utils_warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
if (!isIconDefinition(icon)) {
return null;
}
var target = icon;
if (target && typeof target.icon === 'function') {
target = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, target), {}, {
icon: target.icon(colors.primaryColor, colors.secondaryColor)
});
}
return generate(target.icon, "svg-".concat(target.name), (0,objectSpread2["default"])((0,objectSpread2["default"])({
className: className,
onClick: onClick,
style: style,
'data-icon': target.name,
width: '1em',
height: '1em',
fill: 'currentColor',
'aria-hidden': 'true'
}, restProps), {}, {
ref: svgRef
}));
};
IconBase.displayName = 'IconReact';
IconBase.getTwoToneColors = getTwoToneColors;
IconBase.setTwoToneColors = setTwoToneColors;
/* harmony default export */ var components_IconBase = (IconBase);
;// ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js
function setTwoToneColor(twoToneColor) {
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
_normalizeTwoToneColo2 = (0,slicedToArray["default"])(_normalizeTwoToneColo, 2),
primaryColor = _normalizeTwoToneColo2[0],
secondaryColor = _normalizeTwoToneColo2[1];
return components_IconBase.setTwoToneColors({
primaryColor: primaryColor,
secondaryColor: secondaryColor
});
}
function getTwoToneColor() {
var colors = components_IconBase.getTwoToneColors();
if (!colors.calculated) {
return colors.primaryColor;
}
return [colors.primaryColor, colors.secondaryColor];
}
;// ./node_modules/@ant-design/icons/es/components/AntdIcon.js
'use client';
var AntdIcon_excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
// Initial setting
// should move it to antd main repo?
setTwoToneColor(es.blue.primary);
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757#issuecomment-488848720
var Icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var className = props.className,
icon = props.icon,
spin = props.spin,
rotate = props.rotate,
tabIndex = props.tabIndex,
onClick = props.onClick,
twoToneColor = props.twoToneColor,
restProps = (0,objectWithoutProperties["default"])(props, AntdIcon_excluded);
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(Context["default"]),
_React$useContext$pre = _React$useContext.prefixCls,
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
rootClassName = _React$useContext.rootClassName;
var classString = classnames_default()(rootClassName, prefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), className);
var iconTabIndex = tabIndex;
if (iconTabIndex === undefined && onClick) {
iconTabIndex = -1;
}
var svgStyle = rotate ? {
msTransform: "rotate(".concat(rotate, "deg)"),
transform: "rotate(".concat(rotate, "deg)")
} : undefined;
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
_normalizeTwoToneColo2 = (0,slicedToArray["default"])(_normalizeTwoToneColo, 2),
primaryColor = _normalizeTwoToneColo2[0],
secondaryColor = _normalizeTwoToneColo2[1];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({
role: "img",
"aria-label": icon.name
}, restProps, {
ref: ref,
tabIndex: iconTabIndex,
onClick: onClick,
className: classString
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_IconBase, {
icon: icon,
primaryColor: primaryColor,
secondaryColor: secondaryColor,
style: svgStyle
}));
});
Icon.displayName = 'AntdIcon';
Icon.getTwoToneColor = getTwoToneColor;
Icon.setTwoToneColor = setTwoToneColor;
/* harmony default export */ var AntdIcon = (Icon);
/***/ }),
/***/ "./node_modules/@ant-design/icons/es/components/Context.js":
/*!*****************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/components/Context.js ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var IconContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
/* harmony default export */ __webpack_exports__["default"] = (IconContext);
/***/ }),
/***/ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js":
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ icons_RightOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
;// ./node_modules/@ant-design/icons-svg/es/asn/RightOutlined.js
// This icon file is generated automatically.
var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
/* harmony default export */ var asn_RightOutlined = (RightOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__("./node_modules/@ant-design/icons/es/components/AntdIcon.js");
;// ./node_modules/@ant-design/icons/es/icons/RightOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RightOutlined_RightOutlined = function RightOutlined(props, ref) {
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
ref: ref,
icon: asn_RightOutlined
}));
};
/** */
var RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RightOutlined_RightOutlined);
if (true) {
RefIcon.displayName = 'RightOutlined';
}
/* harmony default export */ var icons_RightOutlined = (RefIcon);
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
/*!*********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _arrayLikeToArray; }
/* harmony export */ });
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _arrayWithHoles; }
/* harmony export */ });
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
/*!**************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
\**************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _assertThisInitialized; }
/* harmony export */ });
function _assertThisInitialized(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _classCallCheck; }
/* harmony export */ });
function _classCallCheck(a, n) {
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
/*!****************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
\****************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _createClass; }
/* harmony export */ });
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
function _defineProperties(e, r) {
for (var t = 0; t < r.length; t++) {
var o = r[t];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o.key), o);
}
}
function _createClass(e, r, t) {
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/createSuper.js":
/*!****************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/createSuper.js ***!
\****************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _createSuper; }
/* harmony export */ });
/* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
/* harmony import */ var _isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js");
/* harmony import */ var _possibleConstructorReturn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./possibleConstructorReturn.js */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
function _createSuper(t) {
var r = (0,_isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__["default"])();
return function () {
var e,
o = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t);
if (r) {
var s = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this).constructor;
e = Reflect.construct(o, arguments, s);
} else e = o.apply(this, arguments);
return (0,_possibleConstructorReturn_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this, e);
};
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _defineProperty; }
/* harmony export */ });
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
function _defineProperty(e, r, t) {
return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[r] = t, e;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
\************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _extends; }
/* harmony export */ });
function _extends() {
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, _extends.apply(null, arguments);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _getPrototypeOf; }
/* harmony export */ });
function _getPrototypeOf(t) {
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, _getPrototypeOf(t);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
/*!*************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
\*************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _inherits; }
/* harmony export */ });
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
function _inherits(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
writable: !0,
configurable: !0
}
}), Object.defineProperty(t, "prototype", {
writable: !1
}), e && (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t, e);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***!
\*****************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _isNativeReflectConstruct; }
/* harmony export */ });
function _isNativeReflectConstruct() {
try {
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
} catch (t) {}
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
return !!t;
})();
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
/*!********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
\********************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _iterableToArray; }
/* harmony export */ });
function _iterableToArray(r) {
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
/*!********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
\********************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _nonIterableRest; }
/* harmony export */ });
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
/*!******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
\******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _objectSpread2; }
/* harmony export */ });
/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
(0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules ***!
\****************************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ _objectWithoutProperties; }
});
;// ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
;// ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
function _objectWithoutProperties(e, t) {
if (null == e) return {};
var o,
r,
i = _objectWithoutPropertiesLoose(e, t);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
}
return i;
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
\******************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _possibleConstructorReturn; }
/* harmony export */ });
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
function _possibleConstructorReturn(t, e) {
if (e && ("object" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e) || "function" == typeof e)) return e;
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _setPrototypeOf; }
/* harmony export */ });
function _setPrototypeOf(t, e) {
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
return t.__proto__ = e, t;
}, _setPrototypeOf(t, e);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ _slicedToArray; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
;// ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
;// ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray(r, e) {
return (0,arrayWithHoles["default"])(r) || _iterableToArrayLimit(r, e) || (0,unsupportedIterableToArray["default"])(r, e) || (0,nonIterableRest["default"])();
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/toArray.js":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/toArray.js ***!
\************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _toArray; }
/* harmony export */ });
/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
function _toArray(r) {
return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(r) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(r) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ _toConsumableArray; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
;// ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return (0,arrayLikeToArray["default"])(r);
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
;// ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
;// ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray(r) {
return _arrayWithoutHoles(r) || (0,iterableToArray["default"])(r) || (0,unsupportedIterableToArray["default"])(r) || _nonIterableSpread();
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ toPropertyKey; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
;// ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function toPrimitive(t, r) {
if ("object" != (0,esm_typeof["default"])(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != (0,esm_typeof["default"])(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
;// ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function toPropertyKey(t) {
var i = toPrimitive(t, "string");
return "symbol" == (0,esm_typeof["default"])(i) ? i : i + "";
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
/*!***********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
\***********************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _typeof; }
/* harmony export */ });
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
\*******************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _unsupportedIterableToArray; }
/* harmony export */ });
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a) : void 0;
}
}
/***/ }),
/***/ "./node_modules/@rc-component/color-picker/es/index.js":
/*!**************************************************************************!*\
!*** ./node_modules/@rc-component/color-picker/es/index.js + 14 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Color: function() { return /* reexport */ Color; },
ColorBlock: function() { return /* reexport */ components_ColorBlock; },
"default": function() { return /* binding */ color_picker_es; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
;// ./node_modules/@rc-component/color-picker/es/color.js
var _excluded = ["b"],
_excluded2 = ["v"];
var getRoundNumber = function getRoundNumber(value) {
return Math.round(Number(value || 0));
};
var convertHsb2Hsv = function convertHsb2Hsv(color) {
if (color instanceof es.FastColor) {
return color;
}
if (color && (0,esm_typeof["default"])(color) === 'object' && 'h' in color && 'b' in color) {
var _ref = color,
b = _ref.b,
resets = (0,objectWithoutProperties["default"])(_ref, _excluded);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, resets), {}, {
v: b
});
}
if (typeof color === 'string' && /hsb/.test(color)) {
return color.replace(/hsb/, 'hsv');
}
return color;
};
var Color = /*#__PURE__*/function (_FastColor) {
(0,inherits["default"])(Color, _FastColor);
var _super = (0,createSuper["default"])(Color);
function Color(color) {
(0,classCallCheck["default"])(this, Color);
return _super.call(this, convertHsb2Hsv(color));
}
(0,createClass["default"])(Color, [{
key: "toHsbString",
value: function toHsbString() {
var hsb = this.toHsb();
var saturation = getRoundNumber(hsb.s * 100);
var lightness = getRoundNumber(hsb.b * 100);
var hue = getRoundNumber(hsb.h);
var alpha = hsb.a;
var hsbString = "hsb(".concat(hue, ", ").concat(saturation, "%, ").concat(lightness, "%)");
var hsbaString = "hsba(".concat(hue, ", ").concat(saturation, "%, ").concat(lightness, "%, ").concat(alpha.toFixed(alpha === 0 ? 0 : 2), ")");
return alpha === 1 ? hsbString : hsbaString;
}
}, {
key: "toHsb",
value: function toHsb() {
var _this$toHsv = this.toHsv(),
v = _this$toHsv.v,
resets = (0,objectWithoutProperties["default"])(_this$toHsv, _excluded2);
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, resets), {}, {
b: v,
a: this.a
});
}
}]);
return Color;
}(es.FastColor);
;// ./node_modules/@rc-component/color-picker/es/util.js
var ColorPickerPrefixCls = 'rc-color-picker';
var generateColor = function generateColor(color) {
if (color instanceof Color) {
return color;
}
return new Color(color);
};
var defaultColor = generateColor('#1677ff');
var calculateColor = function calculateColor(props) {
var offset = props.offset,
targetRef = props.targetRef,
containerRef = props.containerRef,
color = props.color,
type = props.type;
var _containerRef$current = containerRef.current.getBoundingClientRect(),
width = _containerRef$current.width,
height = _containerRef$current.height;
var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
targetWidth = _targetRef$current$ge.width,
targetHeight = _targetRef$current$ge.height;
var centerOffsetX = targetWidth / 2;
var centerOffsetY = targetHeight / 2;
var saturation = (offset.x + centerOffsetX) / width;
var bright = 1 - (offset.y + centerOffsetY) / height;
var hsb = color.toHsb();
var alphaOffset = saturation;
var hueOffset = (offset.x + centerOffsetX) / width * 360;
if (type) {
switch (type) {
case 'hue':
return generateColor((0,objectSpread2["default"])((0,objectSpread2["default"])({}, hsb), {}, {
h: hueOffset <= 0 ? 0 : hueOffset
}));
case 'alpha':
return generateColor((0,objectSpread2["default"])((0,objectSpread2["default"])({}, hsb), {}, {
a: alphaOffset <= 0 ? 0 : alphaOffset
}));
}
}
return generateColor({
h: hsb.h,
s: saturation <= 0 ? 0 : saturation,
b: bright >= 1 ? 1 : bright,
a: hsb.a
});
};
var calcOffset = function calcOffset(color, type) {
var hsb = color.toHsb();
switch (type) {
case 'hue':
return {
x: hsb.h / 360 * 100,
y: 50
};
case 'alpha':
return {
x: color.a * 100,
y: 50
};
// Picker panel
default:
return {
x: hsb.s * 100,
y: (1 - hsb.b) * 100
};
}
};
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("./node_modules/classnames/index.js");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
;// ./node_modules/@rc-component/color-picker/es/components/ColorBlock.js
var ColorBlock = function ColorBlock(_ref) {
var color = _ref.color,
prefixCls = _ref.prefixCls,
className = _ref.className,
style = _ref.style,
onClick = _ref.onClick;
var colorBlockCls = "".concat(prefixCls, "-color-block");
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()(colorBlockCls, className),
style: style,
onClick: onClick
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(colorBlockCls, "-inner"),
style: {
background: color
}
}));
};
/* harmony default export */ var components_ColorBlock = (ColorBlock);
;// ./node_modules/@rc-component/color-picker/es/hooks/useColorDrag.js
function getPosition(e) {
var obj = 'touches' in e ? e.touches[0] : e;
var scrollXOffset = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset;
var scrollYOffset = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
return {
pageX: obj.pageX - scrollXOffset,
pageY: obj.pageY - scrollYOffset
};
}
function useColorDrag(props) {
var targetRef = props.targetRef,
containerRef = props.containerRef,
direction = props.direction,
onDragChange = props.onDragChange,
onDragChangeComplete = props.onDragChangeComplete,
calculate = props.calculate,
color = props.color,
disabledDrag = props.disabledDrag;
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
x: 0,
y: 0
}),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
offsetValue = _useState2[0],
setOffsetValue = _useState2[1];
var mouseMoveRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
var mouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// Always get position from `color`
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
setOffsetValue(calculate());
}, [color]);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return function () {
document.removeEventListener('mousemove', mouseMoveRef.current);
document.removeEventListener('mouseup', mouseUpRef.current);
document.removeEventListener('touchmove', mouseMoveRef.current);
document.removeEventListener('touchend', mouseUpRef.current);
mouseMoveRef.current = null;
mouseUpRef.current = null;
};
}, []);
var updateOffset = function updateOffset(e) {
var _getPosition = getPosition(e),
pageX = _getPosition.pageX,
pageY = _getPosition.pageY;
var _containerRef$current = containerRef.current.getBoundingClientRect(),
rectX = _containerRef$current.x,
rectY = _containerRef$current.y,
width = _containerRef$current.width,
height = _containerRef$current.height;
var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
targetWidth = _targetRef$current$ge.width,
targetHeight = _targetRef$current$ge.height;
var centerOffsetX = targetWidth / 2;
var centerOffsetY = targetHeight / 2;
var offsetX = Math.max(0, Math.min(pageX - rectX, width)) - centerOffsetX;
var offsetY = Math.max(0, Math.min(pageY - rectY, height)) - centerOffsetY;
var calcOffset = {
x: offsetX,
y: direction === 'x' ? offsetValue.y : offsetY
};
// Exclusion of boundary cases
if (targetWidth === 0 && targetHeight === 0 || targetWidth !== targetHeight) {
return false;
}
onDragChange === null || onDragChange === void 0 || onDragChange(calcOffset);
};
var onDragMove = function onDragMove(e) {
e.preventDefault();
updateOffset(e);
};
var onDragStop = function onDragStop(e) {
e.preventDefault();
document.removeEventListener('mousemove', mouseMoveRef.current);
document.removeEventListener('mouseup', mouseUpRef.current);
document.removeEventListener('touchmove', mouseMoveRef.current);
document.removeEventListener('touchend', mouseUpRef.current);
mouseMoveRef.current = null;
mouseUpRef.current = null;
onDragChangeComplete === null || onDragChangeComplete === void 0 || onDragChangeComplete();
};
var onDragStart = function onDragStart(e) {
// https://github.com/ant-design/ant-design/issues/43529
document.removeEventListener('mousemove', mouseMoveRef.current);
document.removeEventListener('mouseup', mouseUpRef.current);
if (disabledDrag) {
return;
}
updateOffset(e);
document.addEventListener('mousemove', onDragMove);
document.addEventListener('mouseup', onDragStop);
document.addEventListener('touchmove', onDragMove);
document.addEventListener('touchend', onDragStop);
mouseMoveRef.current = onDragMove;
mouseUpRef.current = onDragStop;
};
return [offsetValue, onDragStart];
}
/* harmony default export */ var hooks_useColorDrag = (useColorDrag);
// EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
var rc_util_es = __webpack_require__("./node_modules/rc-util/es/index.js");
;// ./node_modules/@rc-component/color-picker/es/components/Handler.js
var Handler = function Handler(_ref) {
var _ref$size = _ref.size,
size = _ref$size === void 0 ? 'default' : _ref$size,
color = _ref.color,
prefixCls = _ref.prefixCls;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-handler"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-handler-sm"), size === 'small')),
style: {
backgroundColor: color
}
});
};
/* harmony default export */ var components_Handler = (Handler);
;// ./node_modules/@rc-component/color-picker/es/components/Palette.js
var Palette = function Palette(_ref) {
var children = _ref.children,
style = _ref.style,
prefixCls = _ref.prefixCls;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-palette"),
style: (0,objectSpread2["default"])({
position: 'relative'
}, style)
}, children);
};
/* harmony default export */ var components_Palette = (Palette);
;// ./node_modules/@rc-component/color-picker/es/components/Transform.js
var Transform = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
var children = props.children,
x = props.x,
y = props.y;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: ref,
style: {
position: 'absolute',
left: "".concat(x, "%"),
top: "".concat(y, "%"),
zIndex: 1,
transform: 'translate(-50%, -50%)'
}
}, children);
});
/* harmony default export */ var components_Transform = (Transform);
;// ./node_modules/@rc-component/color-picker/es/components/Picker.js
var Picker = function Picker(_ref) {
var color = _ref.color,
onChange = _ref.onChange,
prefixCls = _ref.prefixCls,
onChangeComplete = _ref.onChangeComplete,
disabled = _ref.disabled;
var pickerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var transformRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var colorRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(color);
var onDragChange = (0,rc_util_es.useEvent)(function (offsetValue) {
var calcColor = calculateColor({
offset: offsetValue,
targetRef: transformRef,
containerRef: pickerRef,
color: color
});
colorRef.current = calcColor;
onChange(calcColor);
});
var _useColorDrag = hooks_useColorDrag({
color: color,
containerRef: pickerRef,
targetRef: transformRef,
calculate: function calculate() {
return calcOffset(color);
},
onDragChange: onDragChange,
onDragChangeComplete: function onDragChangeComplete() {
return onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(colorRef.current);
},
disabledDrag: disabled
}),
_useColorDrag2 = (0,slicedToArray["default"])(_useColorDrag, 2),
offset = _useColorDrag2[0],
dragStartHandle = _useColorDrag2[1];
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: pickerRef,
className: "".concat(prefixCls, "-select"),
onMouseDown: dragStartHandle,
onTouchStart: dragStartHandle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Palette, {
prefixCls: prefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Transform, {
x: offset.x,
y: offset.y,
ref: transformRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Handler, {
color: color.toRgbString(),
prefixCls: prefixCls
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-saturation"),
style: {
backgroundColor: "hsl(".concat(color.toHsb().h, ",100%, 50%)"),
backgroundImage: 'linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))'
}
})));
};
/* harmony default export */ var components_Picker = (Picker);
;// ./node_modules/@rc-component/color-picker/es/hooks/useColorState.js
var useColorState = function useColorState(defaultValue, value) {
var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
value: value
}),
_useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
mergedValue = _useMergedState2[0],
setValue = _useMergedState2[1];
var color = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return generateColor(mergedValue);
}, [mergedValue]);
return [color, setValue];
};
/* harmony default export */ var hooks_useColorState = (useColorState);
;// ./node_modules/@rc-component/color-picker/es/components/Gradient.js
var Gradient = function Gradient(_ref) {
var colors = _ref.colors,
children = _ref.children,
_ref$direction = _ref.direction,
direction = _ref$direction === void 0 ? 'to right' : _ref$direction,
type = _ref.type,
prefixCls = _ref.prefixCls;
var gradientColors = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return colors.map(function (color, idx) {
var result = generateColor(color);
if (type === 'alpha' && idx === colors.length - 1) {
result = new Color(result.setA(1));
}
return result.toRgbString();
}).join(',');
}, [colors, type]);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-gradient"),
style: {
position: 'absolute',
inset: 0,
background: "linear-gradient(".concat(direction, ", ").concat(gradientColors, ")")
}
}, children);
};
/* harmony default export */ var components_Gradient = (Gradient);
;// ./node_modules/@rc-component/color-picker/es/components/Slider.js
var Slider = function Slider(props) {
var prefixCls = props.prefixCls,
colors = props.colors,
disabled = props.disabled,
onChange = props.onChange,
onChangeComplete = props.onChangeComplete,
color = props.color,
type = props.type;
var sliderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var transformRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
var colorRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(color);
var getValue = function getValue(c) {
return type === 'hue' ? c.getHue() : c.a * 100;
};
var onDragChange = (0,rc_util_es.useEvent)(function (offsetValue) {
var calcColor = calculateColor({
offset: offsetValue,
targetRef: transformRef,
containerRef: sliderRef,
color: color,
type: type
});
colorRef.current = calcColor;
onChange(getValue(calcColor));
});
var _useColorDrag = hooks_useColorDrag({
color: color,
targetRef: transformRef,
containerRef: sliderRef,
calculate: function calculate() {
return calcOffset(color, type);
},
onDragChange: onDragChange,
onDragChangeComplete: function onDragChangeComplete() {
onChangeComplete(getValue(colorRef.current));
},
direction: 'x',
disabledDrag: disabled
}),
_useColorDrag2 = (0,slicedToArray["default"])(_useColorDrag, 2),
offset = _useColorDrag2[0],
dragStartHandle = _useColorDrag2[1];
var handleColor = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
if (type === 'hue') {
var hsb = color.toHsb();
hsb.s = 1;
hsb.b = 1;
hsb.a = 1;
var lightColor = new Color(hsb);
return lightColor;
}
return color;
}, [color, type]);
// ========================= Gradient =========================
var gradientList = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
return colors.map(function (info) {
return "".concat(info.color, " ").concat(info.percent, "%");
});
}, [colors]);
// ========================== Render ==========================
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
ref: sliderRef,
className: classnames_default()("".concat(prefixCls, "-slider"), "".concat(prefixCls, "-slider-").concat(type)),
onMouseDown: dragStartHandle,
onTouchStart: dragStartHandle
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Palette, {
prefixCls: prefixCls
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Transform, {
x: offset.x,
y: offset.y,
ref: transformRef
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Handler, {
size: "small",
color: handleColor.toHexString(),
prefixCls: prefixCls
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Gradient, {
colors: gradientList,
type: type,
prefixCls: prefixCls
})));
};
/* harmony default export */ var components_Slider = (Slider);
;// ./node_modules/@rc-component/color-picker/es/hooks/useComponent.js
function useComponent(components) {
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
var _ref = components || {},
slider = _ref.slider;
return [slider || components_Slider];
}, [components]);
}
;// ./node_modules/@rc-component/color-picker/es/ColorPicker.js
var HUE_COLORS = [{
color: 'rgb(255, 0, 0)',
percent: 0
}, {
color: 'rgb(255, 255, 0)',
percent: 17
}, {
color: 'rgb(0, 255, 0)',
percent: 33
}, {
color: 'rgb(0, 255, 255)',
percent: 50
}, {
color: 'rgb(0, 0, 255)',
percent: 67
}, {
color: 'rgb(255, 0, 255)',
percent: 83
}, {
color: 'rgb(255, 0, 0)',
percent: 100
}];
var ColorPicker = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
var value = props.value,
defaultValue = props.defaultValue,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? ColorPickerPrefixCls : _props$prefixCls,
onChange = props.onChange,
onChangeComplete = props.onChangeComplete,
className = props.className,
style = props.style,
panelRender = props.panelRender,
_props$disabledAlpha = props.disabledAlpha,
disabledAlpha = _props$disabledAlpha === void 0 ? false : _props$disabledAlpha,
_props$disabled = props.disabled,
disabled = _props$disabled === void 0 ? false : _props$disabled,
components = props.components;
// ========================== Components ==========================
var _useComponent = useComponent(components),
_useComponent2 = (0,slicedToArray["default"])(_useComponent, 1),
Slider = _useComponent2[0];
// ============================ Color =============================
var _useColorState = hooks_useColorState(defaultValue || defaultColor, value),
_useColorState2 = (0,slicedToArray["default"])(_useColorState, 2),
colorValue = _useColorState2[0],
setColorValue = _useColorState2[1];
var alphaColor = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
return colorValue.setA(1).toRgbString();
}, [colorValue]);
// ============================ Events ============================
var handleChange = function handleChange(data, type) {
if (!value) {
setColorValue(data);
}
onChange === null || onChange === void 0 || onChange(data, type);
};
// Convert
var getHueColor = function getHueColor(hue) {
return new Color(colorValue.setHue(hue));
};
var getAlphaColor = function getAlphaColor(alpha) {
return new Color(colorValue.setA(alpha / 100));
};
// Slider change
var onHueChange = function onHueChange(hue) {
handleChange(getHueColor(hue), {
type: 'hue',
value: hue
});
};
var onAlphaChange = function onAlphaChange(alpha) {
handleChange(getAlphaColor(alpha), {
type: 'alpha',
value: alpha
});
};
// Complete
var onHueChangeComplete = function onHueChangeComplete(hue) {
if (onChangeComplete) {
onChangeComplete(getHueColor(hue));
}
};
var onAlphaChangeComplete = function onAlphaChangeComplete(alpha) {
if (onChangeComplete) {
onChangeComplete(getAlphaColor(alpha));
}
};
// ============================ Render ============================
var mergeCls = classnames_default()("".concat(prefixCls, "-panel"), className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-panel-disabled"), disabled));
var sharedSliderProps = {
prefixCls: prefixCls,
disabled: disabled,
color: colorValue
};
var defaultPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Picker, (0,esm_extends["default"])({
onChange: handleChange
}, sharedSliderProps, {
onChangeComplete: onChangeComplete
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: "".concat(prefixCls, "-slider-container")
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: classnames_default()("".concat(prefixCls, "-slider-group"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-slider-group-disabled-alpha"), disabledAlpha))
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Slider, (0,esm_extends["default"])({}, sharedSliderProps, {
type: "hue",
colors: HUE_COLORS,
min: 0,
max: 359,
value: colorValue.getHue(),
onChange: onHueChange,
onChangeComplete: onHueChangeComplete
})), !disabledAlpha && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Slider, (0,esm_extends["default"])({}, sharedSliderProps, {
type: "alpha",
colors: [{
percent: 0,
color: 'rgba(255, 0, 4, 0)'
}, {
percent: 100,
color: alphaColor
}],
min: 0,
max: 100,
value: colorValue.a * 100,
onChange: onAlphaChange,
onChangeComplete: onAlphaChangeComplete
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorBlock, {
color: colorValue.toRgbString(),
prefixCls: prefixCls
})));
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
className: mergeCls,
style: style,
ref: ref
}, typeof panelRender === 'function' ? panelRender(defaultPanel) : defaultPanel);
});
if (true) {
ColorPicker.displayName = 'ColorPicker';
}
/* harmony default export */ var es_ColorPicker = (ColorPicker);
;// ./node_modules/@rc-component/color-picker/es/interface.js
;// ./node_modules/@rc-component/color-picker/es/index.js
/* harmony default export */ var color_picker_es = (es_ColorPicker);
/***/ }),
/***/ "./node_modules/classnames/index.js":
/*!******************************************!*\
!*** ./node_modules/classnames/index.js ***!
\******************************************/
/***/ (function(module, exports) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
'use strict';
var hasOwn = {}.hasOwnProperty;
function classNames () {
var classes = '';
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (arg) {
classes = appendClass(classes, parseValue(arg));
}
}
return classes;
}
function parseValue (arg) {
if (typeof arg === 'string' || typeof arg === 'number') {
return arg;
}
if (typeof arg !== 'object') {
return '';
}
if (Array.isArray(arg)) {
return classNames.apply(null, arg);
}
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
return arg.toString();
}
var classes = '';
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes = appendClass(classes, key);
}
}
return classes;
}
function appendClass (value, newClass) {
if (!newClass) {
return value;
}
if (value) {
return value + ' ' + newClass;
}
return value + newClass;
}
if ( true && module.exports) {
classNames.default = classNames;
module.exports = classNames;
} else if (true) {
// register as 'classnames', consistent with npm package name
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
return classNames;
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {}
}());
/***/ }),
/***/ "./node_modules/copy-to-clipboard/index.js":
/*!*************************************************!*\
!*** ./node_modules/copy-to-clipboard/index.js ***!
\*************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var deselectCurrent = __webpack_require__(/*! toggle-selection */ "./node_modules/toggle-selection/index.js");
var clipboardToIE11Formatting = {
"text/plain": "Text",
"text/html": "Url",
"default": "Text"
}
var defaultMessage = "Copy to clipboard: #{key}, Enter";
function format(message) {
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
return message.replace(/#{\s*key\s*}/g, copyKey);
}
function copy(text, options) {
var debug,
message,
reselectPrevious,
range,
selection,
mark,
success = false;
if (!options) {
options = {};
}
debug = options.debug || false;
try {
reselectPrevious = deselectCurrent();
range = document.createRange();
selection = document.getSelection();
mark = document.createElement("span");
mark.textContent = text;
// avoid screen readers from reading out loud the text
mark.ariaHidden = "true"
// reset user styles for span element
mark.style.all = "unset";
// prevents scrolling to the end of the page
mark.style.position = "fixed";
mark.style.top = 0;
mark.style.clip = "rect(0, 0, 0, 0)";
// used to preserve spaces and line breaks
mark.style.whiteSpace = "pre";
// do not inherit user-select (it may be `none`)
mark.style.webkitUserSelect = "text";
mark.style.MozUserSelect = "text";
mark.style.msUserSelect = "text";
mark.style.userSelect = "text";
mark.addEventListener("copy", function(e) {
e.stopPropagation();
if (options.format) {
e.preventDefault();
if (typeof e.clipboardData === "undefined") { // IE 11
debug && console.warn("unable to use e.clipboardData");
debug && console.warn("trying IE specific stuff");
window.clipboardData.clearData();
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
window.clipboardData.setData(format, text);
} else { // all other browsers
e.clipboardData.clearData();
e.clipboardData.setData(options.format, text);
}
}
if (options.onCopy) {
e.preventDefault();
options.onCopy(e.clipboardData);
}
});
document.body.appendChild(mark);
range.selectNodeContents(mark);
selection.addRange(range);
var successful = document.execCommand("copy");
if (!successful) {
throw new Error("copy command was unsuccessful");
}
success = true;
} catch (err) {
debug && console.error("unable to copy using execCommand: ", err);
debug && console.warn("trying IE specific stuff");
try {
window.clipboardData.setData(options.format || "text", text);
options.onCopy && options.onCopy(window.clipboardData);
success = true;
} catch (err) {
debug && console.error("unable to copy using clipboardData: ", err);
debug && console.error("falling back to prompt");
message = format("message" in options ? options.message : defaultMessage);
window.prompt(message, text);
}
} finally {
if (selection) {
if (typeof selection.removeRange == "function") {
selection.removeRange(range);
} else {
selection.removeAllRanges();
}
}
if (mark) {
document.body.removeChild(mark);
}
reselectPrevious();
}
return success;
}
module.exports = copy;
/***/ }),
/***/ "./node_modules/dayjs/plugin/advancedFormat.js":
/*!*****************************************************!*\
!*** ./node_modules/dayjs/plugin/advancedFormat.js ***!
\*****************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}}));
/***/ }),
/***/ "./node_modules/dayjs/plugin/customParseFormat.js":
/*!********************************************************!*\
!*** ./node_modules/dayjs/plugin/customParseFormat.js ***!
\********************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else{var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""))}else i.call(this,e)}}}));
/***/ }),
/***/ "./node_modules/dayjs/plugin/localeData.js":
/*!*************************************************!*\
!*** ./node_modules/dayjs/plugin/localeData.js ***!
\*************************************************/
/***/ (function(module) {
!function(n,e){ true?module.exports=e():0}(this,(function(){"use strict";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format("MMMM"):u(n,"months")},monthsShort:function(e){return e?e.format("MMM"):u(n,"monthsShort","months",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):u(n,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):u(n,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):u(n,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),"months")},t.monthsShort=function(){return u(i(),"monthsShort","months",3)},t.weekdays=function(n){return u(i(),"weekdays",null,null,n)},t.weekdaysShort=function(n){return u(i(),"weekdaysShort","weekdays",3,n)},t.weekdaysMin=function(n){return u(i(),"weekdaysMin","weekdays",2,n)}}}));
/***/ }),
/***/ "./node_modules/dayjs/plugin/weekOfYear.js":
/*!*************************************************!*\
!*** ./node_modules/dayjs/plugin/weekOfYear.js ***!
\*************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));
/***/ }),
/***/ "./node_modules/dayjs/plugin/weekYear.js":
/*!***********************************************!*\
!*** ./node_modules/dayjs/plugin/weekYear.js ***!
\***********************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));
/***/ }),
/***/ "./node_modules/dayjs/plugin/weekday.js":
/*!**********************************************!*\
!*** ./node_modules/dayjs/plugin/weekday.js ***!
\**********************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,i=this.$W,n=(i<t?i+7:i)-t;return this.$utils().u(e)?n:this.subtract(n,"day").add(e,"day")}}}));
/***/ }),
/***/ "./node_modules/json2mq/index.js":
/*!***************************************!*\
!*** ./node_modules/json2mq/index.js ***!
\***************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var camel2hyphen = __webpack_require__(/*! string-convert/camel2hyphen */ "./node_modules/string-convert/camel2hyphen.js");
var isDimension = function (feature) {
var re = /[height|width]$/;
return re.test(feature);
};
var obj2mq = function (obj) {
var mq = '';
var features = Object.keys(obj);
features.forEach(function (feature, index) {
var value = obj[feature];
feature = camel2hyphen(feature);
// Add px to dimension features
if (isDimension(feature) && typeof value === 'number') {
value = value + 'px';
}
if (value === true) {
mq += feature;
} else if (value === false) {
mq += 'not ' + feature;
} else {
mq += '(' + feature + ': ' + value + ')';
}
if (index < features.length-1) {
mq += ' and '
}
});
return mq;
};
var json2mq = function (query) {
var mq = '';
if (typeof query === 'string') {
return query;
}
// Handling array of media queries
if (query instanceof Array) {
query.forEach(function (q, index) {
mq += obj2mq(q);
if (index < query.length-1) {
mq += ', '
}
});
return mq;
}
// Handling single media query
return obj2mq(query);
};
module.exports = json2mq;
/***/ }),
/***/ "./node_modules/rc-motion/es/index.js":
/*!*********************************************************!*\
!*** ./node_modules/rc-motion/es/index.js + 13 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
CSSMotionList: function() { return /* reexport */ CSSMotionList; },
Provider: function() { return /* reexport */ MotionProvider; },
"default": function() { return /* binding */ rc_motion_es; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("./node_modules/classnames/index.js");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
var findDOMNode = __webpack_require__("./node_modules/rc-util/es/Dom/findDOMNode.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__("./node_modules/rc-util/es/ref.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
;// ./node_modules/rc-motion/es/context.js
var _excluded = ["children"];
var Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
function MotionProvider(_ref) {
var children = _ref.children,
props = (0,objectWithoutProperties["default"])(_ref, _excluded);
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Context.Provider, {
value: props
}, children);
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
;// ./node_modules/rc-motion/es/DomWrapper.js
var DomWrapper = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(DomWrapper, _React$Component);
var _super = (0,createSuper["default"])(DomWrapper);
function DomWrapper() {
(0,classCallCheck["default"])(this, DomWrapper);
return _super.apply(this, arguments);
}
(0,createClass["default"])(DomWrapper, [{
key: "render",
value: function render() {
return this.props.children;
}
}]);
return DomWrapper;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
/* harmony default export */ var es_DomWrapper = (DomWrapper);
// EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
var es = __webpack_require__("./node_modules/rc-util/es/index.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useState.js
var useState = __webpack_require__("./node_modules/rc-util/es/hooks/useState.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useEvent.js
var useEvent = __webpack_require__("./node_modules/rc-util/es/hooks/useEvent.js");
;// ./node_modules/rc-util/es/hooks/useSyncState.js
/**
* Same as React.useState but will always get latest state.
* This is useful when React merge multiple state updates into one.
* e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.
*/
function useSyncState(defaultValue) {
var _React$useReducer = external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer(function (x) {
return x + 1;
}, 0),
_React$useReducer2 = (0,slicedToArray["default"])(_React$useReducer, 2),
forceUpdate = _React$useReducer2[1];
var currentValueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(defaultValue);
var getValue = (0,useEvent["default"])(function () {
return currentValueRef.current;
});
var setValue = (0,useEvent["default"])(function (updater) {
currentValueRef.current = typeof updater === 'function' ? updater(currentValueRef.current) : updater;
forceUpdate();
});
return [getValue, setValue];
}
;// ./node_modules/rc-motion/es/interface.js
var STATUS_NONE = 'none';
var STATUS_APPEAR = 'appear';
var STATUS_ENTER = 'enter';
var STATUS_LEAVE = 'leave';
var STEP_NONE = 'none';
var STEP_PREPARE = 'prepare';
var STEP_START = 'start';
var STEP_ACTIVE = 'active';
var STEP_ACTIVATED = 'end';
/**
* Used for disabled motion case.
* Prepare stage will still work but start & active will be skipped.
*/
var STEP_PREPARED = 'prepared';
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
;// ./node_modules/rc-motion/es/util/motion.js
// ================= Transition =================
// Event wrapper. Copy from react source code
function makePrefixMap(styleProp, eventName) {
var prefixes = {};
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName);
prefixes["Moz".concat(styleProp)] = "moz".concat(eventName);
prefixes["ms".concat(styleProp)] = "MS".concat(eventName);
prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase());
return prefixes;
}
function getVendorPrefixes(domSupport, win) {
var prefixes = {
animationend: makePrefixMap('Animation', 'AnimationEnd'),
transitionend: makePrefixMap('Transition', 'TransitionEnd')
};
if (domSupport) {
if (!('AnimationEvent' in win)) {
delete prefixes.animationend.animation;
}
if (!('TransitionEvent' in win)) {
delete prefixes.transitionend.transition;
}
}
return prefixes;
}
var vendorPrefixes = getVendorPrefixes((0,canUseDom["default"])(), typeof window !== 'undefined' ? window : {});
var style = {};
if ((0,canUseDom["default"])()) {
var _document$createEleme = document.createElement('div');
style = _document$createEleme.style;
}
var prefixedEventNames = {};
function getVendorPrefixedEventName(eventName) {
if (prefixedEventNames[eventName]) {
return prefixedEventNames[eventName];
}
var prefixMap = vendorPrefixes[eventName];
if (prefixMap) {
var stylePropList = Object.keys(prefixMap);
var len = stylePropList.length;
for (var i = 0; i < len; i += 1) {
var styleProp = stylePropList[i];
if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {
prefixedEventNames[eventName] = prefixMap[styleProp];
return prefixedEventNames[eventName];
}
}
}
return '';
}
var internalAnimationEndName = getVendorPrefixedEventName('animationend');
var internalTransitionEndName = getVendorPrefixedEventName('transitionend');
var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);
var animationEndName = internalAnimationEndName || 'animationend';
var transitionEndName = internalTransitionEndName || 'transitionend';
function getTransitionName(transitionName, transitionType) {
if (!transitionName) return null;
if ((0,esm_typeof["default"])(transitionName) === 'object') {
var type = transitionType.replace(/-\w/g, function (match) {
return match[1].toUpperCase();
});
return transitionName[type];
}
return "".concat(transitionName, "-").concat(transitionType);
}
;// ./node_modules/rc-motion/es/hooks/useDomMotionEvents.js
/* harmony default export */ var useDomMotionEvents = (function (onInternalMotionEnd) {
var cacheElementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
// Remove events
function removeMotionEvents(element) {
if (element) {
element.removeEventListener(transitionEndName, onInternalMotionEnd);
element.removeEventListener(animationEndName, onInternalMotionEnd);
}
}
// Patch events
function patchMotionEvents(element) {
if (cacheElementRef.current && cacheElementRef.current !== element) {
removeMotionEvents(cacheElementRef.current);
}
if (element && element !== cacheElementRef.current) {
element.addEventListener(transitionEndName, onInternalMotionEnd);
element.addEventListener(animationEndName, onInternalMotionEnd);
// Save as cache in case dom removed trigger by `motionDeadline`
cacheElementRef.current = element;
}
}
// Clean up when removed
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
removeMotionEvents(cacheElementRef.current);
};
}, []);
return [patchMotionEvents, removeMotionEvents];
});
;// ./node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js
// It's safe to use `useLayoutEffect` but the warning is annoying
var useIsomorphicLayoutEffect = (0,canUseDom["default"])() ? external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect : external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect;
/* harmony default export */ var hooks_useIsomorphicLayoutEffect = (useIsomorphicLayoutEffect);
// EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js
var raf = __webpack_require__("./node_modules/rc-util/es/raf.js");
;// ./node_modules/rc-motion/es/hooks/useNextFrame.js
/* harmony default export */ var useNextFrame = (function () {
var nextFrameRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
function cancelNextFrame() {
raf["default"].cancel(nextFrameRef.current);
}
function nextFrame(callback) {
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
cancelNextFrame();
var nextFrameId = (0,raf["default"])(function () {
if (delay <= 1) {
callback({
isCanceled: function isCanceled() {
return nextFrameId !== nextFrameRef.current;
}
});
} else {
nextFrame(callback, delay - 1);
}
});
nextFrameRef.current = nextFrameId;
}
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
cancelNextFrame();
};
}, []);
return [nextFrame, cancelNextFrame];
});
;// ./node_modules/rc-motion/es/hooks/useStepQueue.js
var FULL_STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED];
var SIMPLE_STEP_QUEUE = [STEP_PREPARE, STEP_PREPARED];
/** Skip current step */
var SkipStep = false;
/** Current step should be update in */
var DoStep = true;
function isActive(step) {
return step === STEP_ACTIVE || step === STEP_ACTIVATED;
}
/* harmony default export */ var useStepQueue = (function (status, prepareOnly, callback) {
var _useState = (0,useState["default"])(STEP_NONE),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
step = _useState2[0],
setStep = _useState2[1];
var _useNextFrame = useNextFrame(),
_useNextFrame2 = (0,slicedToArray["default"])(_useNextFrame, 2),
nextFrame = _useNextFrame2[0],
cancelNextFrame = _useNextFrame2[1];
function startQueue() {
setStep(STEP_PREPARE, true);
}
var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;
hooks_useIsomorphicLayoutEffect(function () {
if (step !== STEP_NONE && step !== STEP_ACTIVATED) {
var index = STEP_QUEUE.indexOf(step);
var nextStep = STEP_QUEUE[index + 1];
var result = callback(step);
if (result === SkipStep) {
// Skip when no needed
setStep(nextStep, true);
} else if (nextStep) {
// Do as frame for step update
nextFrame(function (info) {
function doNext() {
// Skip since current queue is ood
if (info.isCanceled()) return;
setStep(nextStep, true);
}
if (result === true) {
doNext();
} else {
// Only promise should be async
Promise.resolve(result).then(doNext);
}
});
}
}
}, [status, step]);
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
return function () {
cancelNextFrame();
};
}, []);
return [startQueue, step];
});
;// ./node_modules/rc-motion/es/hooks/useStatus.js
function useStatus(supportMotion, visible, getElement, _ref) {
var _ref$motionEnter = _ref.motionEnter,
motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,
_ref$motionAppear = _ref.motionAppear,
motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,
_ref$motionLeave = _ref.motionLeave,
motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,
motionDeadline = _ref.motionDeadline,
motionLeaveImmediately = _ref.motionLeaveImmediately,
onAppearPrepare = _ref.onAppearPrepare,
onEnterPrepare = _ref.onEnterPrepare,
onLeavePrepare = _ref.onLeavePrepare,
onAppearStart = _ref.onAppearStart,
onEnterStart = _ref.onEnterStart,
onLeaveStart = _ref.onLeaveStart,
onAppearActive = _ref.onAppearActive,
onEnterActive = _ref.onEnterActive,
onLeaveActive = _ref.onLeaveActive,
onAppearEnd = _ref.onAppearEnd,
onEnterEnd = _ref.onEnterEnd,
onLeaveEnd = _ref.onLeaveEnd,
onVisibleChanged = _ref.onVisibleChanged;
// Used for outer render usage to avoid `visible: false & status: none` to render nothing
var _useState = (0,useState["default"])(),
_useState2 = (0,slicedToArray["default"])(_useState, 2),
asyncVisible = _useState2[0],
setAsyncVisible = _useState2[1];
var _useSyncState = useSyncState(STATUS_NONE),
_useSyncState2 = (0,slicedToArray["default"])(_useSyncState, 2),
getStatus = _useSyncState2[0],
setStatus = _useSyncState2[1];
var _useState3 = (0,useState["default"])(null),
_useState4 = (0,slicedToArray["default"])(_useState3, 2),
style = _useState4[0],
setStyle = _useState4[1];
var currentStatus = getStatus();
var mountedRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
var deadlineRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// =========================== Dom Node ===========================
function getDomElement() {
return getElement();
}
// ========================== Motion End ==========================
var activeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
/**
* Clean up status & style
*/
function updateMotionEndStatus() {
setStatus(STATUS_NONE);
setStyle(null, true);
}
var onInternalMotionEnd = (0,es.useEvent)(function (event) {
var status = getStatus();
// Do nothing since not in any transition status.
// This may happen when `motionDeadline` trigger.
if (status === STATUS_NONE) {
return;
}
var element = getDomElement();
if (event && !event.deadline && event.target !== element) {
// event exists
// not initiated by deadline
// transitionEnd not fired by inner elements
return;
}
var currentActive = activeRef.current;
var canEnd;
if (status === STATUS_APPEAR && currentActive) {
canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);
} else if (status === STATUS_ENTER && currentActive) {
canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);
} else if (status === STATUS_LEAVE && currentActive) {
canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);
}
// Only update status when `canEnd` and not destroyed
if (currentActive && canEnd !== false) {
updateMotionEndStatus();
}
});
var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),
_useDomMotionEvents2 = (0,slicedToArray["default"])(_useDomMotionEvents, 1),
patchMotionEvents = _useDomMotionEvents2[0];
// ============================= Step =============================
var getEventHandlers = function getEventHandlers(targetStatus) {
switch (targetStatus) {
case STATUS_APPEAR:
return (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);
case STATUS_ENTER:
return (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);
case STATUS_LEAVE:
return (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);
default:
return {};
}
};
var eventHandlers = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
return getEventHandlers(currentStatus);
}, [currentStatus]);
var _useStepQueue = useStepQueue(currentStatus, !supportMotion, function (newStep) {
// Only prepare step can be skip
if (newStep === STEP_PREPARE) {
var onPrepare = eventHandlers[STEP_PREPARE];
if (!onPrepare) {
return SkipStep;
}
return onPrepare(getDomElement());
}
// Rest step is sync update
if (step in eventHandlers) {
var _eventHandlers$step;
setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);
}
if (step === STEP_ACTIVE && currentStatus !== STATUS_NONE) {
// Patch events when motion needed
patchMotionEvents(getDomElement());
if (motionDeadline > 0) {
clearTimeout(deadlineRef.current);
deadlineRef.current = setTimeout(function () {
onInternalMotionEnd({
deadline: true
});
}, motionDeadline);
}
}
if (step === STEP_PREPARED) {
updateMotionEndStatus();
}
return DoStep;
}),
_useStepQueue2 = (0,slicedToArray["default"])(_useStepQueue, 2),
startStep = _useStepQueue2[0],
step = _useStepQueue2[1];
var active = isActive(step);
activeRef.current = active;
// ============================ Status ============================
var visibleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
// Update with new status
hooks_useIsomorphicLayoutEffect(function () {
// When use Suspense, the `visible` will repeat trigger,
// But not real change of the `visible`, we need to skip it.
// https://github.com/ant-design/ant-design/issues/44379
if (mountedRef.current && visibleRef.current === visible) {
return;
}
setAsyncVisible(visible);
var isMounted = mountedRef.current;
mountedRef.current = true;
// if (!supportMotion) {
// return;
// }
var nextStatus;
// Appear
if (!isMounted && visible && motionAppear) {
nextStatus = STATUS_APPEAR;
}
// Enter
if (isMounted && visible && motionEnter) {
nextStatus = STATUS_ENTER;
}
// Leave
if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {
nextStatus = STATUS_LEAVE;
}
var nextEventHandlers = getEventHandlers(nextStatus);
// Update to next status
if (nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE])) {
setStatus(nextStatus);
startStep();
} else {
// Set back in case no motion but prev status has prepare step
setStatus(STATUS_NONE);
}
visibleRef.current = visible;
}, [visible]);
// ============================ Effect ============================
// Reset when motion changed
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
if (
// Cancel appear
currentStatus === STATUS_APPEAR && !motionAppear ||
// Cancel enter
currentStatus === STATUS_ENTER && !motionEnter ||
// Cancel leave
currentStatus === STATUS_LEAVE && !motionLeave) {
setStatus(STATUS_NONE);
}
}, [motionAppear, motionEnter, motionLeave]);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
return function () {
mountedRef.current = false;
clearTimeout(deadlineRef.current);
};
}, []);
// Trigger `onVisibleChanged`
var firstMountChangeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
// [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged
if (asyncVisible) {
firstMountChangeRef.current = true;
}
if (asyncVisible !== undefined && currentStatus === STATUS_NONE) {
// Skip first render is invisible since it's nothing changed
if (firstMountChangeRef.current || asyncVisible) {
onVisibleChanged === null || onVisibleChanged === void 0 || onVisibleChanged(asyncVisible);
}
firstMountChangeRef.current = true;
}
}, [asyncVisible, currentStatus]);
// ============================ Styles ============================
var mergedStyle = style;
if (eventHandlers[STEP_PREPARE] && step === STEP_START) {
mergedStyle = (0,objectSpread2["default"])({
transition: 'none'
}, mergedStyle);
}
return [currentStatus, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];
}
;// ./node_modules/rc-motion/es/CSSMotion.js
/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */
/**
* `transitionSupport` is used for none transition test case.
* Default we use browser transition event support check.
*/
function genCSSMotion(config) {
var transitionSupport = config;
if ((0,esm_typeof["default"])(config) === 'object') {
transitionSupport = config.transitionSupport;
}
function isSupportTransition(props, contextMotion) {
return !!(props.motionName && transitionSupport && contextMotion !== false);
}
var CSSMotion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
var _props$visible = props.visible,
visible = _props$visible === void 0 ? true : _props$visible,
_props$removeOnLeave = props.removeOnLeave,
removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,
forceRender = props.forceRender,
children = props.children,
motionName = props.motionName,
leavedClassName = props.leavedClassName,
eventProps = props.eventProps;
var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(Context),
contextMotion = _React$useContext.motion;
var supportMotion = isSupportTransition(props, contextMotion);
// Ref to the react node, it may be a HTMLElement
var nodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
// Ref to the dom wrapper in case ref can not pass to HTMLElement
var wrapperNodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
function getDomElement() {
try {
// Here we're avoiding call for findDOMNode since it's deprecated
// in strict mode. We're calling it only when node ref is not
// an instance of DOM HTMLElement. Otherwise use
// findDOMNode as a final resort
return nodeRef.current instanceof HTMLElement ? nodeRef.current : (0,findDOMNode["default"])(wrapperNodeRef.current);
} catch (e) {
// Only happen when `motionDeadline` trigger but element removed.
return null;
}
}
var _useStatus = useStatus(supportMotion, visible, getDomElement, props),
_useStatus2 = (0,slicedToArray["default"])(_useStatus, 4),
status = _useStatus2[0],
statusStep = _useStatus2[1],
statusStyle = _useStatus2[2],
mergedVisible = _useStatus2[3];
// Record whether content has rendered
// Will return null for un-rendered even when `removeOnLeave={false}`
var renderedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mergedVisible);
if (mergedVisible) {
renderedRef.current = true;
}
// ====================== Refs ======================
var setNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (node) {
nodeRef.current = node;
(0,es_ref.fillRef)(ref, node);
}, [ref]);
// ===================== Render =====================
var motionChildren;
var mergedProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, eventProps), {}, {
visible: visible
});
if (!children) {
// No children
motionChildren = null;
} else if (status === STATUS_NONE) {
// Stable children
if (mergedVisible) {
motionChildren = children((0,objectSpread2["default"])({}, mergedProps), setNodeRef);
} else if (!removeOnLeave && renderedRef.current && leavedClassName) {
motionChildren = children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedProps), {}, {
className: leavedClassName
}), setNodeRef);
} else if (forceRender || !removeOnLeave && !leavedClassName) {
motionChildren = children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedProps), {}, {
style: {
display: 'none'
}
}), setNodeRef);
} else {
motionChildren = null;
}
} else {
// In motion
var statusSuffix;
if (statusStep === STEP_PREPARE) {
statusSuffix = 'prepare';
} else if (isActive(statusStep)) {
statusSuffix = 'active';
} else if (statusStep === STEP_START) {
statusSuffix = 'start';
}
var motionCls = getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix));
motionChildren = children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedProps), {}, {
className: classnames_default()(getTransitionName(motionName, status), (0,defineProperty["default"])((0,defineProperty["default"])({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName === 'string')),
style: statusStyle
}), setNodeRef);
}
// Auto inject ref if child node not have `ref` props
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(motionChildren) && (0,es_ref.supportRef)(motionChildren)) {
var originNodeRef = (0,es_ref.getNodeRef)(motionChildren);
if (!originNodeRef) {
motionChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(motionChildren, {
ref: setNodeRef
});
}
}
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DomWrapper, {
ref: wrapperNodeRef
}, motionChildren);
});
CSSMotion.displayName = 'CSSMotion';
return CSSMotion;
}
/* harmony default export */ var es_CSSMotion = (genCSSMotion(supportTransition));
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
;// ./node_modules/rc-motion/es/util/diff.js
var STATUS_ADD = 'add';
var STATUS_KEEP = 'keep';
var STATUS_REMOVE = 'remove';
var STATUS_REMOVED = 'removed';
function wrapKeyToObject(key) {
var keyObj;
if (key && (0,esm_typeof["default"])(key) === 'object' && 'key' in key) {
keyObj = key;
} else {
keyObj = {
key: key
};
}
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, keyObj), {}, {
key: String(keyObj.key)
});
}
function parseKeys() {
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return keys.map(wrapKeyToObject);
}
function diffKeys() {
var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var list = [];
var currentIndex = 0;
var currentLen = currentKeys.length;
var prevKeyObjects = parseKeys(prevKeys);
var currentKeyObjects = parseKeys(currentKeys);
// Check prev keys to insert or keep
prevKeyObjects.forEach(function (keyObj) {
var hit = false;
for (var i = currentIndex; i < currentLen; i += 1) {
var currentKeyObj = currentKeyObjects[i];
if (currentKeyObj.key === keyObj.key) {
// New added keys should add before current key
if (currentIndex < i) {
list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, obj), {}, {
status: STATUS_ADD
});
}));
currentIndex = i;
}
list.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, currentKeyObj), {}, {
status: STATUS_KEEP
}));
currentIndex += 1;
hit = true;
break;
}
}
// If not hit, it means key is removed
if (!hit) {
list.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, keyObj), {}, {
status: STATUS_REMOVE
}));
}
});
// Add rest to the list
if (currentIndex < currentLen) {
list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, obj), {}, {
status: STATUS_ADD
});
}));
}
/**
* Merge same key when it remove and add again:
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
*/
var keys = {};
list.forEach(function (_ref) {
var key = _ref.key;
keys[key] = (keys[key] || 0) + 1;
});
var duplicatedKeys = Object.keys(keys).filter(function (key) {
return keys[key] > 1;
});
duplicatedKeys.forEach(function (matchKey) {
// Remove `STATUS_REMOVE` node.
list = list.filter(function (_ref2) {
var key = _ref2.key,
status = _ref2.status;
return key !== matchKey || status !== STATUS_REMOVE;
});
// Update `STATUS_ADD` to `STATUS_KEEP`
list.forEach(function (node) {
if (node.key === matchKey) {
// eslint-disable-next-line no-param-reassign
node.status = STATUS_KEEP;
}
});
});
return list;
}
;// ./node_modules/rc-motion/es/CSSMotionList.js
var CSSMotionList_excluded = ["component", "children", "onVisibleChanged", "onAllRemoved"],
_excluded2 = ["status"];
/* eslint react/prop-types: 0 */
var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearPrepare', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];
/**
* Generate a CSSMotionList component with config
* @param transitionSupport No need since CSSMotionList no longer depends on transition support
* @param CSSMotion CSSMotion component
*/
function genCSSMotionList(transitionSupport) {
var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : es_CSSMotion;
var CSSMotionList = /*#__PURE__*/function (_React$Component) {
(0,inherits["default"])(CSSMotionList, _React$Component);
var _super = (0,createSuper["default"])(CSSMotionList);
function CSSMotionList() {
var _this;
(0,classCallCheck["default"])(this, CSSMotionList);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
keyEntities: []
});
// ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "removeKey", function (removeKey) {
_this.setState(function (prevState) {
var nextKeyEntities = prevState.keyEntities.map(function (entity) {
if (entity.key !== removeKey) return entity;
return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, entity), {}, {
status: STATUS_REMOVED
});
});
return {
keyEntities: nextKeyEntities
};
}, function () {
var keyEntities = _this.state.keyEntities;
var restKeysCount = keyEntities.filter(function (_ref) {
var status = _ref.status;
return status !== STATUS_REMOVED;
}).length;
if (restKeysCount === 0 && _this.props.onAllRemoved) {
_this.props.onAllRemoved();
}
});
});
return _this;
}
(0,createClass["default"])(CSSMotionList, [{
key: "render",
value: function render() {
var _this2 = this;
var keyEntities = this.state.keyEntities;
var _this$props = this.props,
component = _this$props.component,
children = _this$props.children,
_onVisibleChanged = _this$props.onVisibleChanged,
onAllRemoved = _this$props.onAllRemoved,
restProps = (0,objectWithoutProperties["default"])(_this$props, CSSMotionList_excluded);
var Component = component || external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment;
var motionProps = {};
MOTION_PROP_NAMES.forEach(function (prop) {
motionProps[prop] = restProps[prop];
delete restProps[prop];
});
delete restProps.keys;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {
var status = _ref2.status,
eventProps = (0,objectWithoutProperties["default"])(_ref2, _excluded2);
var visible = status === STATUS_ADD || status === STATUS_KEEP;
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CSSMotion, (0,esm_extends["default"])({}, motionProps, {
key: eventProps.key,
visible: visible,
eventProps: eventProps,
onVisibleChanged: function onVisibleChanged(changedVisible) {
_onVisibleChanged === null || _onVisibleChanged === void 0 || _onVisibleChanged(changedVisible, {
key: eventProps.key
});
if (!changedVisible) {
_this2.removeKey(eventProps.key);
}
}
}), function (props, ref) {
return children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
index: index
}), ref);
});
}));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(_ref3, _ref4) {
var keys = _ref3.keys;
var keyEntities = _ref4.keyEntities;
var parsedKeyObjects = parseKeys(keys);
var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
return {
keyEntities: mixedKeyEntities.filter(function (entity) {
var prevEntity = keyEntities.find(function (_ref5) {
var key = _ref5.key;
return entity.key === key;
});
// Remove if already mark as removed
if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {
return false;
}
return true;
})
};
}
}]);
return CSSMotionList;
}(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
(0,defineProperty["default"])(CSSMotionList, "defaultProps", {
component: 'div'
});
return CSSMotionList;
}
/* harmony default export */ var CSSMotionList = (genCSSMotionList(supportTransition));
;// ./node_modules/rc-motion/es/index.js
/* harmony default export */ var rc_motion_es = (es_CSSMotion);
/***/ }),
/***/ "./node_modules/rc-pagination/es/locale/en_US.js":
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/en_US.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
var locale = {
// Options
items_per_page: '/ page',
jump_to: 'Go to',
jump_to_confirm: 'confirm',
page: 'Page',
// Pagination
prev_page: 'Previous Page',
next_page: 'Next Page',
prev_5: 'Previous 5 Pages',
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages',
page_size: 'Page Size'
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./node_modules/rc-pagination/es/locale/kmr_IQ.js":
/*!********************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/kmr_IQ.js ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
var locale = {
// Options
items_per_page: '/ rûpel',
jump_to: 'Biçe',
jump_to_confirm: 'piştrast bike',
page: '',
// Pagination
prev_page: 'Rûpelê Pêş',
next_page: 'Rûpelê Paş',
prev_5: '5 Rûpelên Pêş',
next_5: '5 Rûpelên Paş',
prev_3: '3 Rûpelên Pêş',
next_3: '3 Rûpelên Paş',
page_size: 'Page Size'
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./node_modules/rc-pagination/es/locale/zh_CN.js":
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/zh_CN.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
var locale = {
// Options
items_per_page: '条/页',
jump_to: '跳至',
jump_to_confirm: '确定',
page: '页',
// Pagination
prev_page: '上一页',
next_page: '下一页',
prev_5: '向前 5 页',
next_5: '向后 5 页',
prev_3: '向前 3 页',
next_3: '向后 3 页',
page_size: '页码'
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./node_modules/rc-pagination/es/locale/zh_TW.js":
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/zh_TW.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
var locale = {
// Options
items_per_page: '條/頁',
jump_to: '跳至',
jump_to_confirm: '確定',
page: '頁',
// Pagination
prev_page: '上一頁',
next_page: '下一頁',
prev_5: '向前 5 頁',
next_5: '向後 5 頁',
prev_3: '向前 3 頁',
next_3: '向後 3 頁',
page_size: '頁碼'
};
/* harmony default export */ __webpack_exports__["default"] = (locale);
/***/ }),
/***/ "./node_modules/rc-picker/es/locale/common.js":
/*!****************************************************!*\
!*** ./node_modules/rc-picker/es/locale/common.js ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ commonLocale: function() { return /* binding */ commonLocale; }
/* harmony export */ });
var commonLocale = {
yearFormat: 'YYYY',
dayFormat: 'D',
cellMeridiemFormat: 'A',
monthBeforeYear: true
};
/***/ }),
/***/ "./node_modules/rc-util/es/Children/toArray.js":
/*!*****************************************************!*\
!*** ./node_modules/rc-util/es/Children/toArray.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ toArray; }
/* harmony export */ });
/* harmony import */ var _React_isFragment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../React/isFragment */ "./node_modules/rc-util/es/React/isFragment.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
function toArray(children) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var ret = [];
react__WEBPACK_IMPORTED_MODULE_1___default().Children.forEach(children, function (child) {
if ((child === undefined || child === null) && !option.keepEmpty) {
return;
}
if (Array.isArray(child)) {
ret = ret.concat(toArray(child));
} else if ((0,_React_isFragment__WEBPACK_IMPORTED_MODULE_0__["default"])(child) && child.props) {
ret = ret.concat(toArray(child.props.children, option));
} else {
ret.push(child);
}
});
return ret;
}
/***/ }),
/***/ "./node_modules/rc-util/es/Dom/canUseDom.js":
/*!**************************************************!*\
!*** ./node_modules/rc-util/es/Dom/canUseDom.js ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ canUseDom; }
/* harmony export */ });
function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}
/***/ }),
/***/ "./node_modules/rc-util/es/Dom/contains.js":
/*!*************************************************!*\
!*** ./node_modules/rc-util/es/Dom/contains.js ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ contains; }
/* harmony export */ });
function contains(root, n) {
if (!root) {
return false;
}
// Use native if support
if (root.contains) {
return root.contains(n);
}
// `document.contains` not support with IE11
var node = n;
while (node) {
if (node === root) {
return true;
}
node = node.parentNode;
}
return false;
}
/***/ }),
/***/ "./node_modules/rc-util/es/Dom/dynamicCSS.js":
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ removeCSS: function() { return /* binding */ removeCSS; },
/* harmony export */ updateCSS: function() { return /* binding */ updateCSS; }
/* harmony export */ });
/* unused harmony exports injectCSS, clearContainerCache */
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
/* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./canUseDom */ "./node_modules/rc-util/es/Dom/canUseDom.js");
/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contains */ "./node_modules/rc-util/es/Dom/contains.js");
var APPEND_ORDER = 'data-rc-order';
var APPEND_PRIORITY = 'data-rc-priority';
var MARK_KEY = "rc-util-key";
var containerCache = new Map();
function getMark() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
mark = _ref.mark;
if (mark) {
return mark.startsWith('data-') ? mark : "data-".concat(mark);
}
return MARK_KEY;
}
function getContainer(option) {
if (option.attachTo) {
return option.attachTo;
}
var head = document.querySelector('head');
return head || document.body;
}
function getOrder(prepend) {
if (prepend === 'queue') {
return 'prependQueue';
}
return prepend ? 'prepend' : 'append';
}
/**
* Find style which inject by rc-util
*/
function findStyles(container) {
return Array.from((containerCache.get(container) || container).children).filter(function (node) {
return node.tagName === 'STYLE';
});
}
function injectCSS(css) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!(0,_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])()) {
return null;
}
var csp = option.csp,
prepend = option.prepend,
_option$priority = option.priority,
priority = _option$priority === void 0 ? 0 : _option$priority;
var mergedOrder = getOrder(prepend);
var isPrependQueue = mergedOrder === 'prependQueue';
var styleNode = document.createElement('style');
styleNode.setAttribute(APPEND_ORDER, mergedOrder);
if (isPrependQueue && priority) {
styleNode.setAttribute(APPEND_PRIORITY, "".concat(priority));
}
if (csp !== null && csp !== void 0 && csp.nonce) {
styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;
}
styleNode.innerHTML = css;
var container = getContainer(option);
var firstChild = container.firstChild;
if (prepend) {
// If is queue `prepend`, it will prepend first style and then append rest style
if (isPrependQueue) {
var existStyle = (option.styles || findStyles(container)).filter(function (node) {
// Ignore style which not injected by rc-util with prepend
if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) {
return false;
}
// Ignore style which priority less then new style
var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);
return priority >= nodePriority;
});
if (existStyle.length) {
container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
return styleNode;
}
}
// Use `insertBefore` as `prepend`
container.insertBefore(styleNode, firstChild);
} else {
container.appendChild(styleNode);
}
return styleNode;
}
function findExistNode(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var container = getContainer(option);
return (option.styles || findStyles(container)).find(function (node) {
return node.getAttribute(getMark(option)) === key;
});
}
function removeCSS(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var existNode = findExistNode(key, option);
if (existNode) {
var container = getContainer(option);
container.removeChild(existNode);
}
}
/**
* qiankun will inject `appendChild` to insert into other
*/
function syncRealContainer(container, option) {
var cachedRealContainer = containerCache.get(container);
// Find real container when not cached or cached container removed
if (!cachedRealContainer || !(0,_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(document, cachedRealContainer)) {
var placeholderStyle = injectCSS('', option);
var parentNode = placeholderStyle.parentNode;
containerCache.set(container, parentNode);
container.removeChild(placeholderStyle);
}
}
/**
* manually clear container cache to avoid global cache in unit testes
*/
function clearContainerCache() {
containerCache.clear();
}
function updateCSS(css, key) {
var originOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var container = getContainer(originOption);
var styles = findStyles(container);
var option = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, originOption), {}, {
styles: styles
});
// Sync real parent
syncRealContainer(container, option);
var existNode = findExistNode(key, option);
if (existNode) {
var _option$csp, _option$csp2;
if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {
var _option$csp3;
existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;
}
if (existNode.innerHTML !== css) {
existNode.innerHTML = css;
}
return existNode;
}
var newNode = injectCSS(css, option);
newNode.setAttribute(getMark(option), key);
return newNode;
}
/***/ }),
/***/ "./node_modules/rc-util/es/Dom/findDOMNode.js":
/*!****************************************************!*\
!*** ./node_modules/rc-util/es/Dom/findDOMNode.js ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ findDOMNode; },
/* harmony export */ getDOM: function() { return /* binding */ getDOM; },
/* harmony export */ isDOM: function() { return /* binding */ isDOM; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
function isDOM(node) {
// https://developer.mozilla.org/en-US/docs/Web/API/Element
// Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement
return node instanceof HTMLElement || node instanceof SVGElement;
}
/**
* Retrieves a DOM node via a ref, and does not invoke `findDOMNode`.
*/
function getDOM(node) {
if (node && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(node) === 'object' && isDOM(node.nativeElement)) {
return node.nativeElement;
}
if (isDOM(node)) {
return node;
}
return null;
}
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
function findDOMNode(node) {
var domNode = getDOM(node);
if (domNode) {
return domNode;
}
if (node instanceof (react__WEBPACK_IMPORTED_MODULE_1___default().Component)) {
var _ReactDOM$findDOMNode;
return (_ReactDOM$findDOMNode = (react_dom__WEBPACK_IMPORTED_MODULE_2___default().findDOMNode)) === null || _ReactDOM$findDOMNode === void 0 ? void 0 : _ReactDOM$findDOMNode.call((react_dom__WEBPACK_IMPORTED_MODULE_2___default()), node);
}
return null;
}
/***/ }),
/***/ "./node_modules/rc-util/es/Dom/shadow.js":
/*!***********************************************!*\
!*** ./node_modules/rc-util/es/Dom/shadow.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ getShadowRoot: function() { return /* binding */ getShadowRoot; }
/* harmony export */ });
/* unused harmony export inShadow */
function getRoot(ele) {
var _ele$getRootNode;
return ele === null || ele === void 0 || (_ele$getRootNode = ele.getRootNode) === null || _ele$getRootNode === void 0 ? void 0 : _ele$getRootNode.call(ele);
}
/**
* Check if is in shadowRoot
*/
function inShadow(ele) {
return getRoot(ele) instanceof ShadowRoot;
}
/**
* Return shadowRoot if possible
*/
function getShadowRoot(ele) {
return inShadow(ele) ? getRoot(ele) : null;
}
/***/ }),
/***/ "./node_modules/rc-util/es/KeyCode.js":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/KeyCode.js ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
var KeyCode = {
/**
* MAC_ENTER
*/
MAC_ENTER: 3,
/**
* BACKSPACE
*/
BACKSPACE: 8,
/**
* TAB
*/
TAB: 9,
/**
* NUMLOCK on FF/Safari Mac
*/
NUM_CENTER: 12,
// NUMLOCK on FF/Safari Mac
/**
* ENTER
*/
ENTER: 13,
/**
* SHIFT
*/
SHIFT: 16,
/**
* CTRL
*/
CTRL: 17,
/**
* ALT
*/
ALT: 18,
/**
* PAUSE
*/
PAUSE: 19,
/**
* CAPS_LOCK
*/
CAPS_LOCK: 20,
/**
* ESC
*/
ESC: 27,
/**
* SPACE
*/
SPACE: 32,
/**
* PAGE_UP
*/
PAGE_UP: 33,
// also NUM_NORTH_EAST
/**
* PAGE_DOWN
*/
PAGE_DOWN: 34,
// also NUM_SOUTH_EAST
/**
* END
*/
END: 35,
// also NUM_SOUTH_WEST
/**
* HOME
*/
HOME: 36,
// also NUM_NORTH_WEST
/**
* LEFT
*/
LEFT: 37,
// also NUM_WEST
/**
* UP
*/
UP: 38,
// also NUM_NORTH
/**
* RIGHT
*/
RIGHT: 39,
// also NUM_EAST
/**
* DOWN
*/
DOWN: 40,
// also NUM_SOUTH
/**
* PRINT_SCREEN
*/
PRINT_SCREEN: 44,
/**
* INSERT
*/
INSERT: 45,
// also NUM_INSERT
/**
* DELETE
*/
DELETE: 46,
// also NUM_DELETE
/**
* ZERO
*/
ZERO: 48,
/**
* ONE
*/
ONE: 49,
/**
* TWO
*/
TWO: 50,
/**
* THREE
*/
THREE: 51,
/**
* FOUR
*/
FOUR: 52,
/**
* FIVE
*/
FIVE: 53,
/**
* SIX
*/
SIX: 54,
/**
* SEVEN
*/
SEVEN: 55,
/**
* EIGHT
*/
EIGHT: 56,
/**
* NINE
*/
NINE: 57,
/**
* QUESTION_MARK
*/
QUESTION_MARK: 63,
// needs localization
/**
* A
*/
A: 65,
/**
* B
*/
B: 66,
/**
* C
*/
C: 67,
/**
* D
*/
D: 68,
/**
* E
*/
E: 69,
/**
* F
*/
F: 70,
/**
* G
*/
G: 71,
/**
* H
*/
H: 72,
/**
* I
*/
I: 73,
/**
* J
*/
J: 74,
/**
* K
*/
K: 75,
/**
* L
*/
L: 76,
/**
* M
*/
M: 77,
/**
* N
*/
N: 78,
/**
* O
*/
O: 79,
/**
* P
*/
P: 80,
/**
* Q
*/
Q: 81,
/**
* R
*/
R: 82,
/**
* S
*/
S: 83,
/**
* T
*/
T: 84,
/**
* U
*/
U: 85,
/**
* V
*/
V: 86,
/**
* W
*/
W: 87,
/**
* X
*/
X: 88,
/**
* Y
*/
Y: 89,
/**
* Z
*/
Z: 90,
/**
* META
*/
META: 91,
// WIN_KEY_LEFT
/**
* WIN_KEY_RIGHT
*/
WIN_KEY_RIGHT: 92,
/**
* CONTEXT_MENU
*/
CONTEXT_MENU: 93,
/**
* NUM_ZERO
*/
NUM_ZERO: 96,
/**
* NUM_ONE
*/
NUM_ONE: 97,
/**
* NUM_TWO
*/
NUM_TWO: 98,
/**
* NUM_THREE
*/
NUM_THREE: 99,
/**
* NUM_FOUR
*/
NUM_FOUR: 100,
/**
* NUM_FIVE
*/
NUM_FIVE: 101,
/**
* NUM_SIX
*/
NUM_SIX: 102,
/**
* NUM_SEVEN
*/
NUM_SEVEN: 103,
/**
* NUM_EIGHT
*/
NUM_EIGHT: 104,
/**
* NUM_NINE
*/
NUM_NINE: 105,
/**
* NUM_MULTIPLY
*/
NUM_MULTIPLY: 106,
/**
* NUM_PLUS
*/
NUM_PLUS: 107,
/**
* NUM_MINUS
*/
NUM_MINUS: 109,
/**
* NUM_PERIOD
*/
NUM_PERIOD: 110,
/**
* NUM_DIVISION
*/
NUM_DIVISION: 111,
/**
* F1
*/
F1: 112,
/**
* F2
*/
F2: 113,
/**
* F3
*/
F3: 114,
/**
* F4
*/
F4: 115,
/**
* F5
*/
F5: 116,
/**
* F6
*/
F6: 117,
/**
* F7
*/
F7: 118,
/**
* F8
*/
F8: 119,
/**
* F9
*/
F9: 120,
/**
* F10
*/
F10: 121,
/**
* F11
*/
F11: 122,
/**
* F12
*/
F12: 123,
/**
* NUMLOCK
*/
NUMLOCK: 144,
/**
* SEMICOLON
*/
SEMICOLON: 186,
// needs localization
/**
* DASH
*/
DASH: 189,
// needs localization
/**
* EQUALS
*/
EQUALS: 187,
// needs localization
/**
* COMMA
*/
COMMA: 188,
// needs localization
/**
* PERIOD
*/
PERIOD: 190,
// needs localization
/**
* SLASH
*/
SLASH: 191,
// needs localization
/**
* APOSTROPHE
*/
APOSTROPHE: 192,
// needs localization
/**
* SINGLE_QUOTE
*/
SINGLE_QUOTE: 222,
// needs localization
/**
* OPEN_SQUARE_BRACKET
*/
OPEN_SQUARE_BRACKET: 219,
// needs localization
/**
* BACKSLASH
*/
BACKSLASH: 220,
// needs localization
/**
* CLOSE_SQUARE_BRACKET
*/
CLOSE_SQUARE_BRACKET: 221,
// needs localization
/**
* WIN_KEY
*/
WIN_KEY: 224,
/**
* MAC_FF_META
*/
MAC_FF_META: 224,
// Firefox (Gecko) fires this for the meta key instead of 91
/**
* WIN_IME
*/
WIN_IME: 229,
// ======================== Function ========================
/**
* whether text and modified key is entered at the same time.
*/
isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {
var keyCode = e.keyCode;
if (e.altKey && !e.ctrlKey || e.metaKey ||
// Function keys don't generate text
keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
return false;
}
// The following keys are quite harmless, even in combination with
// CTRL, ALT or SHIFT.
switch (keyCode) {
case KeyCode.ALT:
case KeyCode.CAPS_LOCK:
case KeyCode.CONTEXT_MENU:
case KeyCode.CTRL:
case KeyCode.DOWN:
case KeyCode.END:
case KeyCode.ESC:
case KeyCode.HOME:
case KeyCode.INSERT:
case KeyCode.LEFT:
case KeyCode.MAC_FF_META:
case KeyCode.META:
case KeyCode.NUMLOCK:
case KeyCode.NUM_CENTER:
case KeyCode.PAGE_DOWN:
case KeyCode.PAGE_UP:
case KeyCode.PAUSE:
case KeyCode.PRINT_SCREEN:
case KeyCode.RIGHT:
case KeyCode.SHIFT:
case KeyCode.UP:
case KeyCode.WIN_KEY:
case KeyCode.WIN_KEY_RIGHT:
return false;
default:
return true;
}
},
/**
* whether character is entered.
*/
isCharacterKey: function isCharacterKey(keyCode) {
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
return true;
}
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
return true;
}
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
return true;
}
// Safari sends zero key code for non-latin characters.
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
return true;
}
switch (keyCode) {
case KeyCode.SPACE:
case KeyCode.QUESTION_MARK:
case KeyCode.NUM_PLUS:
case KeyCode.NUM_MINUS:
case KeyCode.NUM_PERIOD:
case KeyCode.NUM_DIVISION:
case KeyCode.SEMICOLON:
case KeyCode.DASH:
case KeyCode.EQUALS:
case KeyCode.COMMA:
case KeyCode.PERIOD:
case KeyCode.SLASH:
case KeyCode.APOSTROPHE:
case KeyCode.SINGLE_QUOTE:
case KeyCode.OPEN_SQUARE_BRACKET:
case KeyCode.BACKSLASH:
case KeyCode.CLOSE_SQUARE_BRACKET:
return true;
default:
return false;
}
}
};
/* harmony default export */ __webpack_exports__["default"] = (KeyCode);
/***/ }),
/***/ "./node_modules/rc-util/es/React/isFragment.js":
/*!*****************************************************!*\
!*** ./node_modules/rc-util/es/React/isFragment.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ isFragment; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
var REACT_ELEMENT_TYPE_18 = Symbol.for('react.element');
var REACT_ELEMENT_TYPE_19 = Symbol.for('react.transitional.element');
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
/**
* Compatible with React 18 or 19 to check if node is a Fragment.
*/
function isFragment(object) {
return (
// Base object type
object && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(object) === 'object' && (
// React Element type
object.$$typeof === REACT_ELEMENT_TYPE_18 || object.$$typeof === REACT_ELEMENT_TYPE_19) &&
// React Fragment type
object.type === REACT_FRAGMENT_TYPE
);
}
/***/ }),
/***/ "./node_modules/rc-util/es/hooks/useEvent.js":
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useEvent.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ useEvent; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function useEvent(callback) {
var fnRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();
fnRef.current = callback;
var memoFn = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function () {
var _fnRef$current;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
}, []);
return memoFn;
}
/***/ }),
/***/ "./node_modules/rc-util/es/hooks/useLayoutEffect.js":
/*!**********************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useLayoutEffect.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ useLayoutUpdateEffect: function() { return /* binding */ useLayoutUpdateEffect; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dom/canUseDom */ "./node_modules/rc-util/es/Dom/canUseDom.js");
/**
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
*/
var useInternalLayoutEffect = true && (0,_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])() ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
var useLayoutEffect = function useLayoutEffect(callback, deps) {
var firstMountRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true);
useInternalLayoutEffect(function () {
return callback(firstMountRef.current);
}, deps);
// We tell react that first mount has passed
useInternalLayoutEffect(function () {
firstMountRef.current = false;
return function () {
firstMountRef.current = true;
};
}, []);
};
var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
useLayoutEffect(function (firstMount) {
if (!firstMount) {
return callback();
}
}, deps);
};
/* harmony default export */ __webpack_exports__["default"] = (useLayoutEffect);
/***/ }),
/***/ "./node_modules/rc-util/es/hooks/useMemo.js":
/*!**************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useMemo.js ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ useMemo; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function useMemo(getValue, condition, shouldUpdate) {
var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef({});
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
cacheRef.current.value = getValue();
cacheRef.current.condition = condition;
}
return cacheRef.current.value;
}
/***/ }),
/***/ "./node_modules/rc-util/es/hooks/useMergedState.js":
/*!*********************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useMergedState.js ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ useMergedState; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
/* harmony import */ var _useEvent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useEvent */ "./node_modules/rc-util/es/hooks/useEvent.js");
/* harmony import */ var _useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useLayoutEffect */ "./node_modules/rc-util/es/hooks/useLayoutEffect.js");
/* harmony import */ var _useState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useState */ "./node_modules/rc-util/es/hooks/useState.js");
/** We only think `undefined` is empty */
function hasValue(value) {
return value !== undefined;
}
/**
* Similar to `useState` but will use props value if provided.
* Note that internal use rc-util `useState` hook.
*/
function useMergedState(defaultStateValue, option) {
var _ref = option || {},
defaultValue = _ref.defaultValue,
value = _ref.value,
onChange = _ref.onChange,
postState = _ref.postState;
// ======================= Init =======================
var _useState = (0,_useState__WEBPACK_IMPORTED_MODULE_3__["default"])(function () {
if (hasValue(value)) {
return value;
} else if (hasValue(defaultValue)) {
return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
} else {
return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
}
}),
_useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2),
innerValue = _useState2[0],
setInnerValue = _useState2[1];
var mergedValue = value !== undefined ? value : innerValue;
var postMergedValue = postState ? postState(mergedValue) : mergedValue;
// ====================== Change ======================
var onChangeFn = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__["default"])(onChange);
var _useState3 = (0,_useState__WEBPACK_IMPORTED_MODULE_3__["default"])([mergedValue]),
_useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState3, 2),
prevValue = _useState4[0],
setPrevValue = _useState4[1];
(0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {
var prev = prevValue[0];
if (innerValue !== prev) {
onChangeFn(innerValue, prev);
}
}, [prevValue]);
// Sync value back to `undefined` when it from control to un-control
(0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {
if (!hasValue(value)) {
setInnerValue(value);
}
}, [value]);
// ====================== Update ======================
var triggerChange = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__["default"])(function (updater, ignoreDestroy) {
setInnerValue(updater, ignoreDestroy);
setPrevValue([mergedValue], ignoreDestroy);
});
return [postMergedValue, triggerChange];
}
/***/ }),
/***/ "./node_modules/rc-util/es/hooks/useState.js":
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useState.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ useSafeState; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/**
* Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.
* We do not make this auto is to avoid real memory leak.
* Developer should confirm it's safe to ignore themselves.
*/
function useSafeState(defaultValue) {
var destroyRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(false);
var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__.useState(defaultValue),
_React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_React$useState, 2),
value = _React$useState2[0],
setValue = _React$useState2[1];
react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () {
destroyRef.current = false;
return function () {
destroyRef.current = true;
};
}, []);
function safeSetState(updater, ignoreDestroy) {
if (ignoreDestroy && destroyRef.current) {
return;
}
setValue(updater);
}
return [value, safeSetState];
}
/***/ }),
/***/ "./node_modules/rc-util/es/index.js":
/*!******************************************!*\
!*** ./node_modules/rc-util/es/index.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ get: function() { return /* reexport safe */ _utils_get__WEBPACK_IMPORTED_MODULE_3__["default"]; },
/* harmony export */ set: function() { return /* reexport safe */ _utils_set__WEBPACK_IMPORTED_MODULE_4__["default"]; },
/* harmony export */ useEvent: function() { return /* reexport safe */ _hooks_useEvent__WEBPACK_IMPORTED_MODULE_0__["default"]; },
/* harmony export */ useMergedState: function() { return /* reexport safe */ _hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__["default"]; },
/* harmony export */ warning: function() { return /* reexport safe */ _warning__WEBPACK_IMPORTED_MODULE_5__["default"]; }
/* harmony export */ });
/* harmony import */ var _hooks_useEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hooks/useEvent */ "./node_modules/rc-util/es/hooks/useEvent.js");
/* harmony import */ var _hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js");
/* harmony import */ var _ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ref */ "./node_modules/rc-util/es/ref.js");
/* harmony import */ var _utils_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/get */ "./node_modules/rc-util/es/utils/get.js");
/* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/set */ "./node_modules/rc-util/es/utils/set.js");
/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./warning */ "./node_modules/rc-util/es/warning.js");
/***/ }),
/***/ "./node_modules/rc-util/es/isEqual.js":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/isEqual.js ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warning */ "./node_modules/rc-util/es/warning.js");
/**
* Deeply compares two object literals.
* @param obj1 object 1
* @param obj2 object 2
* @param shallow shallow compare
* @returns
*/
function isEqual(obj1, obj2) {
var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
// https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f
var refSet = new Set();
function deepEqual(a, b) {
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var circular = refSet.has(a);
(0,_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(!circular, 'Warning: There may be circular references');
if (circular) {
return false;
}
if (a === b) {
return true;
}
if (shallow && level > 1) {
return false;
}
refSet.add(a);
var newLevel = level + 1;
if (Array.isArray(a)) {
if (!Array.isArray(b) || a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length; i++) {
if (!deepEqual(a[i], b[i], newLevel)) {
return false;
}
}
return true;
}
if (a && b && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(a) === 'object' && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(b) === 'object') {
var keys = Object.keys(a);
if (keys.length !== Object.keys(b).length) {
return false;
}
return keys.every(function (key) {
return deepEqual(a[key], b[key], newLevel);
});
}
// other
return false;
}
return deepEqual(obj1, obj2);
}
/* harmony default export */ __webpack_exports__["default"] = (isEqual);
/***/ }),
/***/ "./node_modules/rc-util/es/omit.js":
/*!*****************************************!*\
!*** ./node_modules/rc-util/es/omit.js ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ omit; }
/* harmony export */ });
function omit(obj, fields) {
var clone = Object.assign({}, obj);
if (Array.isArray(fields)) {
fields.forEach(function (key) {
delete clone[key];
});
}
return clone;
}
/***/ }),
/***/ "./node_modules/rc-util/es/pickAttrs.js":
/*!**********************************************!*\
!*** ./node_modules/rc-util/es/pickAttrs.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ pickAttrs; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
var propList = "".concat(attributes, " ").concat(eventsName).split(/[\s\n]+/);
/* eslint-enable max-len */
var ariaPrefix = 'aria-';
var dataPrefix = 'data-';
function match(key, prefix) {
return key.indexOf(prefix) === 0;
}
/**
* Picker props from exist props with filter
* @param props Passed props
* @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
*/
function pickAttrs(props) {
var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var mergedConfig;
if (ariaOnly === false) {
mergedConfig = {
aria: true,
data: true,
attr: true
};
} else if (ariaOnly === true) {
mergedConfig = {
aria: true
};
} else {
mergedConfig = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ariaOnly);
}
var attrs = {};
Object.keys(props).forEach(function (key) {
if (
// Aria
mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||
// Data
mergedConfig.data && match(key, dataPrefix) ||
// Attr
mergedConfig.attr && propList.includes(key)) {
attrs[key] = props[key];
}
});
return attrs;
}
/***/ }),
/***/ "./node_modules/rc-util/es/raf.js":
/*!****************************************!*\
!*** ./node_modules/rc-util/es/raf.js ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
var raf = function raf(callback) {
return +setTimeout(callback, 16);
};
var caf = function caf(num) {
return clearTimeout(num);
};
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
raf = function raf(callback) {
return window.requestAnimationFrame(callback);
};
caf = function caf(handle) {
return window.cancelAnimationFrame(handle);
};
}
var rafUUID = 0;
var rafIds = new Map();
function cleanup(id) {
rafIds.delete(id);
}
var wrapperRaf = function wrapperRaf(callback) {
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
rafUUID += 1;
var id = rafUUID;
function callRef(leftTimes) {
if (leftTimes === 0) {
// Clean up
cleanup(id);
// Trigger
callback();
} else {
// Next raf
var realId = raf(function () {
callRef(leftTimes - 1);
});
// Bind real raf id
rafIds.set(id, realId);
}
}
callRef(times);
return id;
};
wrapperRaf.cancel = function (id) {
var realId = rafIds.get(id);
cleanup(id);
return caf(realId);
};
if (true) {
wrapperRaf.ids = function () {
return rafIds;
};
}
/* harmony default export */ __webpack_exports__["default"] = (wrapperRaf);
/***/ }),
/***/ "./node_modules/rc-util/es/ref.js":
/*!****************************************!*\
!*** ./node_modules/rc-util/es/ref.js ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ composeRef: function() { return /* binding */ composeRef; },
/* harmony export */ fillRef: function() { return /* binding */ fillRef; },
/* harmony export */ getNodeRef: function() { return /* binding */ getNodeRef; },
/* harmony export */ supportNodeRef: function() { return /* binding */ supportNodeRef; },
/* harmony export */ supportRef: function() { return /* binding */ supportRef; },
/* harmony export */ useComposeRef: function() { return /* binding */ useComposeRef; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-is */ "./node_modules/rc-util/node_modules/react-is/index.js");
/* harmony import */ var _hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMemo */ "./node_modules/rc-util/es/hooks/useMemo.js");
/* harmony import */ var _React_isFragment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/isFragment */ "./node_modules/rc-util/es/React/isFragment.js");
var ReactMajorVersion = Number(react__WEBPACK_IMPORTED_MODULE_1__.version.split('.')[0]);
var fillRef = function fillRef(ref, node) {
if (typeof ref === 'function') {
ref(node);
} else if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(ref) === 'object' && ref && 'current' in ref) {
ref.current = node;
}
};
/**
* Merge refs into one ref function to support ref passing.
*/
var composeRef = function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
var refList = refs.filter(Boolean);
if (refList.length <= 1) {
return refList[0];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
};
var useComposeRef = function useComposeRef() {
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
refs[_key2] = arguments[_key2];
}
return (0,_hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__["default"])(function () {
return composeRef.apply(void 0, refs);
}, refs, function (prev, next) {
return prev.length !== next.length || prev.every(function (ref, i) {
return ref !== next[i];
});
});
};
var supportRef = function supportRef(nodeOrComponent) {
var _type$prototype, _nodeOrComponent$prot;
if (!nodeOrComponent) {
return false;
}
// React 19 no need `forwardRef` anymore. So just pass if is a React element.
if (isReactElement(nodeOrComponent) && ReactMajorVersion >= 19) {
return true;
}
var type = (0,react_is__WEBPACK_IMPORTED_MODULE_2__.isMemo)(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
// Function component node
if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {
return false;
}
// Class component
if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {
return false;
}
return true;
};
function isReactElement(node) {
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(node) && !(0,_React_isFragment__WEBPACK_IMPORTED_MODULE_4__["default"])(node);
}
var supportNodeRef = function supportNodeRef(node) {
return isReactElement(node) && supportRef(node);
};
/**
* In React 19. `ref` is not a property from node.
* But a property from `props.ref`.
* To check if `props.ref` exist or fallback to `ref`.
*/
var getNodeRef = function getNodeRef(node) {
if (node && isReactElement(node)) {
var ele = node;
// Source from:
// https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/getReactNodeRef/getReactNodeRef.ts
return ele.props.propertyIsEnumerable('ref') ? ele.props.ref : ele.ref;
}
return null;
};
/***/ }),
/***/ "./node_modules/rc-util/es/utils/get.js":
/*!**********************************************!*\
!*** ./node_modules/rc-util/es/utils/get.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ get; }
/* harmony export */ });
function get(entity, path) {
var current = entity;
for (var i = 0; i < path.length; i += 1) {
if (current === null || current === undefined) {
return undefined;
}
current = current[path[i]];
}
return current;
}
/***/ }),
/***/ "./node_modules/rc-util/es/utils/set.js":
/*!**********************************************!*\
!*** ./node_modules/rc-util/es/utils/set.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ set; },
/* harmony export */ merge: function() { return /* binding */ merge; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ "./node_modules/@babel/runtime/helpers/esm/toArray.js");
/* harmony import */ var _get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get */ "./node_modules/rc-util/es/utils/get.js");
function internalSet(entity, paths, value, removeIfUndefined) {
if (!paths.length) {
return value;
}
var _paths = (0,_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__["default"])(paths),
path = _paths[0],
restPath = _paths.slice(1);
var clone;
if (!entity && typeof path === 'number') {
clone = [];
} else if (Array.isArray(entity)) {
clone = (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(entity);
} else {
clone = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["default"])({}, entity);
}
// Delete prop if `removeIfUndefined` and value is undefined
if (removeIfUndefined && value === undefined && restPath.length === 1) {
delete clone[path][restPath[0]];
} else {
clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);
}
return clone;
}
function set(entity, paths, value) {
var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
// Do nothing if `removeIfUndefined` and parent object not exist
if (paths.length && removeIfUndefined && value === undefined && !(0,_get__WEBPACK_IMPORTED_MODULE_4__["default"])(entity, paths.slice(0, -1))) {
return entity;
}
return internalSet(entity, paths, value, removeIfUndefined);
}
function isObject(obj) {
return (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
}
function createEmpty(source) {
return Array.isArray(source) ? [] : {};
}
var keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;
/**
* Merge objects which will create
*/
function merge() {
for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
sources[_key] = arguments[_key];
}
var clone = createEmpty(sources[0]);
sources.forEach(function (src) {
function internalMerge(path, parentLoopSet) {
var loopSet = new Set(parentLoopSet);
var value = (0,_get__WEBPACK_IMPORTED_MODULE_4__["default"])(src, path);
var isArr = Array.isArray(value);
if (isArr || isObject(value)) {
// Only add not loop obj
if (!loopSet.has(value)) {
loopSet.add(value);
var originValue = (0,_get__WEBPACK_IMPORTED_MODULE_4__["default"])(clone, path);
if (isArr) {
// Array will always be override
clone = set(clone, path, []);
} else if (!originValue || (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(originValue) !== 'object') {
// Init container if not exist
clone = set(clone, path, createEmpty(value));
}
keys(value).forEach(function (key) {
internalMerge([].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(path), [key]), loopSet);
});
}
} else {
clone = set(clone, path, value);
}
}
internalMerge([]);
});
return clone;
}
/***/ }),
/***/ "./node_modules/rc-util/es/warning.js":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/warning.js ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ noteOnce: function() { return /* binding */ noteOnce; },
/* harmony export */ resetWarned: function() { return /* binding */ resetWarned; },
/* harmony export */ warning: function() { return /* binding */ warning; }
/* harmony export */ });
/* unused harmony exports preMessage, note, call, warningOnce */
/* eslint-disable no-console */
var warned = {};
var preWarningFns = [];
/**
* Pre warning enable you to parse content before console.error.
* Modify to null will prevent warning.
*/
var preMessage = function preMessage(fn) {
preWarningFns.push(fn);
};
/**
* Warning if condition not match.
* @param valid Condition
* @param message Warning message
* @example
* ```js
* warning(false, 'some error'); // print some error
* warning(true, 'some error'); // print nothing
* warning(1 === 2, 'some error'); // print some error
* ```
*/
function warning(valid, message) {
if ( true && !valid && console !== undefined) {
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');
}, message);
if (finalMessage) {
console.error("Warning: ".concat(finalMessage));
}
}
}
/** @see Similar to {@link warning} */
function note(valid, message) {
if ( true && !valid && console !== undefined) {
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');
}, message);
if (finalMessage) {
console.warn("Note: ".concat(finalMessage));
}
}
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
/** @see Same as {@link warning}, but only warn once for the same message */
function warningOnce(valid, message) {
call(warning, valid, message);
}
/** @see Same as {@link warning}, but only warn once for the same message */
function noteOnce(valid, message) {
call(note, valid, message);
}
warningOnce.preMessage = preMessage;
warningOnce.resetWarned = resetWarned;
warningOnce.noteOnce = noteOnce;
/* harmony default export */ __webpack_exports__["default"] = (warningOnce);
/***/ }),
/***/ "./node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js":
/*!********************************************************************************!*\
!*** ./node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js ***!
\********************************************************************************/
/***/ (function(__unused_webpack_module, exports) {
"use strict";
var __webpack_unused_export__;
/**
* @license React
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (true) {
(function() {
'use strict';
// ATTENTION
// When adding new symbols to this file,
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types.
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
var REACT_MEMO_TYPE = Symbol.for('react.memo');
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
// -----------------------------------------------------------------------------
var enableScopeAPI = false; // Experimental Create Event Handle API.
var enableCacheElement = false;
var enableTransitionTracing = false; // No known bugs, but needs performance testing
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
// stuff. Intended to enable React core members to more easily debug scheduling
// issues in DEV builds.
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
}
function isValidElementType(type) {
if (typeof type === 'string' || typeof type === 'function') {
return true;
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
return true;
}
if (typeof type === 'object' && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
return true;
}
}
return false;
}
function typeOf(object) {
if (typeof object === 'object' && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_SERVER_CONTEXT_TYPE:
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return undefined;
}
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
}
}
return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
}
}
return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
function isSuspenseList(object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
}
__webpack_unused_export__ = ContextConsumer;
__webpack_unused_export__ = ContextProvider;
__webpack_unused_export__ = Element;
exports.ForwardRef = ForwardRef;
__webpack_unused_export__ = Fragment;
__webpack_unused_export__ = Lazy;
__webpack_unused_export__ = Memo;
__webpack_unused_export__ = Portal;
__webpack_unused_export__ = Profiler;
__webpack_unused_export__ = StrictMode;
__webpack_unused_export__ = Suspense;
__webpack_unused_export__ = SuspenseList;
__webpack_unused_export__ = isAsyncMode;
__webpack_unused_export__ = isConcurrentMode;
__webpack_unused_export__ = isContextConsumer;
__webpack_unused_export__ = isContextProvider;
__webpack_unused_export__ = isElement;
__webpack_unused_export__ = isForwardRef;
__webpack_unused_export__ = isFragment;
__webpack_unused_export__ = isLazy;
exports.isMemo = isMemo;
__webpack_unused_export__ = isPortal;
__webpack_unused_export__ = isProfiler;
__webpack_unused_export__ = isStrictMode;
__webpack_unused_export__ = isSuspense;
__webpack_unused_export__ = isSuspenseList;
__webpack_unused_export__ = isValidElementType;
__webpack_unused_export__ = typeOf;
})();
}
/***/ }),
/***/ "./node_modules/rc-util/node_modules/react-is/index.js":
/*!*************************************************************!*\
!*** ./node_modules/rc-util/node_modules/react-is/index.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
if (false) {} else {
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js");
}
/***/ }),
/***/ "./node_modules/string-convert/camel2hyphen.js":
/*!*****************************************************!*\
!*** ./node_modules/string-convert/camel2hyphen.js ***!
\*****************************************************/
/***/ (function(module) {
var camel2hyphen = function (str) {
return str
.replace(/[A-Z]/g, function (match) {
return '-' + match.toLowerCase();
})
.toLowerCase();
};
module.exports = camel2hyphen;
/***/ }),
/***/ "./node_modules/toggle-selection/index.js":
/*!************************************************!*\
!*** ./node_modules/toggle-selection/index.js ***!
\************************************************/
/***/ (function(module) {
module.exports = function () {
var selection = document.getSelection();
if (!selection.rangeCount) {
return function () {};
}
var active = document.activeElement;
var ranges = [];
for (var i = 0; i < selection.rangeCount; i++) {
ranges.push(selection.getRangeAt(i));
}
switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML
case 'INPUT':
case 'TEXTAREA':
active.blur();
break;
default:
active = null;
break;
}
selection.removeAllRanges();
return function () {
selection.type === 'Caret' &&
selection.removeAllRanges();
if (!selection.rangeCount) {
ranges.forEach(function(range) {
selection.addRange(range);
});
}
active &&
active.focus();
};
};
/***/ }),
/***/ "dayjs":
/*!**************************************************************************************!*\
!*** external {"root":"dayjs","commonjs2":"dayjs","commonjs":"dayjs","amd":"dayjs"} ***!
\**************************************************************************************/
/***/ (function(module) {
"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE_dayjs__;
/***/ }),
/***/ "react":
/*!**************************************************************************************!*\
!*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
\**************************************************************************************/
/***/ (function(module) {
"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
/***/ }),
/***/ "react-dom":
/*!*****************************************************************************************************!*\
!*** external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} ***!
\*****************************************************************************************************/
/***/ (function(module) {
"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ loaded: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/global */
/******/ !function() {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ }();
/******/
/******/ /* webpack/runtime/harmony module decorator */
/******/ !function() {
/******/ __webpack_require__.hmd = function(module) {
/******/ module = Object.create(module);
/******/ if (!module.children) module.children = [];
/******/ Object.defineProperty(module, 'exports', {
/******/ enumerable: true,
/******/ set: function() {
/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
/******/ }
/******/ });
/******/ return module;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __webpack_require__("./index-with-locales.js");
/******/
/******/ return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=antd-with-locales.js.map