You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Shixuns__Edit__body__Lev...

3076 lines
136 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[49205],{
/***/ 77171:
/*!**********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_ArrowDownOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowDownOutlined.js
// This icon file is generated automatically.
var ArrowDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z" } }] }, "name": "arrow-down", "theme": "outlined" };
/* harmony default export */ var asn_ArrowDownOutlined = (ArrowDownOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
var AntdIcon = __webpack_require__(74643);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowDownOutlined_ArrowDownOutlined = function ArrowDownOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ArrowDownOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ArrowDownOutlined = (/*#__PURE__*/react.forwardRef(ArrowDownOutlined_ArrowDownOutlined));
/***/ }),
/***/ 18073:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_RightOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./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 + 8 modules
var AntdIcon = __webpack_require__(74643);
;// CONCATENATED MODULE: ./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__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_RightOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_RightOutlined = (/*#__PURE__*/react.forwardRef(RightOutlined_RightOutlined));
/***/ }),
/***/ 36845:
/*!**********************************************************!*\
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"t": function() { return /* binding */ FixedButton; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
var FixedButton = function FixedButton(_ref) {
var _ref$cancelText = _ref.cancelText,
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
_ref$okText = _ref.okText,
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading,
_ref$hasOkBtn = _ref.hasOkBtn,
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
_ref$hasCancelBtn = _ref.hasCancelBtn,
hasCancelBtn = _ref$hasCancelBtn === void 0 ? true : _ref$hasCancelBtn,
_ref$okButtonProps = _ref.okButtonProps,
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
_ref$onCancel = _ref.onCancel,
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
_ref$onOk = _ref.onOk,
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: classnames_default()(FixedButtonmodules.buttonFixed, className),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FixedButtonmodules.buttonWrap,
children: [hasCancelBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: "middle",
className: "".concat(FixedButtonmodules.button, " mr20")
// 点击取消的返回
,
onClick: onCancel,
children: cancelText
}), hasOkBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, objectSpread2_default()(objectSpread2_default()({
size: 'middle',
type: "primary",
className: "".concat(FixedButtonmodules.button, " mr20"),
loading: loading,
onClick: onOk
}, okButtonProps), {}, {
children: okText
}))]
})
});
};
/***/ }),
/***/ 97976:
/*!************************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeSetting/index.tsx + 3 modules ***!
\************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"PracticeFileType": function() { return /* binding */ PracticeFileType; },
"default": function() { return /* binding */ Challenges_EditPracticeSetting; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(861);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__(38416);
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
var _umi_production_exports = __webpack_require__(89214);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js + 1 modules
var QuestionCircleOutlined = __webpack_require__(25035);
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js + 42 modules
var es_select = __webpack_require__(79035);
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
var input = __webpack_require__(79531);
// EXTERNAL MODULE: ./node_modules/antd/es/collapse/index.js + 8 modules
var collapse = __webpack_require__(47221);
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
var es_form = __webpack_require__(25159);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 39 modules
var modal = __webpack_require__(72423);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 4 modules
var message = __webpack_require__(2453);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(84567);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(78045);
// EXTERNAL MODULE: ./node_modules/antd/es/popover/index.js
var popover = __webpack_require__(55241);
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 21 modules
var input_number = __webpack_require__(31795);
// EXTERNAL MODULE: ./node_modules/antd/es/space/index.js + 2 modules
var space = __webpack_require__(42075);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(83062);
// EXTERNAL MODULE: ./src/service/shixuns.ts
var shixuns = __webpack_require__(56088);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeSetting/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var EditPracticeSettingmodules = ({"flex_box_center":"flex_box_center___MjMLk","flex_space_between":"flex_space_between___PcWTa","flex_box_vertical_center":"flex_box_vertical_center___Cq7f3","flex_box_center_end":"flex_box_center_end___sMsFo","flex_box_column":"flex_box_column___n6Hxq","bg":"bg____Ic4Q","radioStyle":"radioStyle___kewjX","formWrap":"formWrap___jcehV","onePart":"onePart___ECsrp","twoPart":"twoPart___WVIpx","title":"title___RpX2E","threePart":"threePart___Tzme_","flexRowCenter":"flexRowCenter___M7zUK","fourPart":"fourPart___HgBFj","testJi":"testJi___s6Skh","upBtn":"upBtn___eKx0D","checkboxs":"checkboxs___B4uNe","averageWarp":"averageWarp___yXrlD","averageCustom":"averageCustom___t5o4x","groupWrap":"groupWrap___eT0sR","customInput":"customInput___pywUD"});
// EXTERNAL MODULE: ./src/components/FixedButton/index.tsx + 1 modules
var FixedButton = __webpack_require__(36845);
// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 3 modules
var empty = __webpack_require__(32983);
// EXTERNAL MODULE: ./node_modules/antd/es/tabs/index.js + 28 modules
var tabs = __webpack_require__(34755);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(57953);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeSetting/components/SelectFilePathModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var SelectFilePathModalmodules = ({"flex_box_center":"flex_box_center___vvciu","flex_space_between":"flex_space_between___WPxvw","flex_box_vertical_center":"flex_box_vertical_center___YY9Br","flex_box_center_end":"flex_box_center_end___FiVhK","flex_box_column":"flex_box_column___FWnfq","wrap":"wrap___AEhcV","content":"content___NDdD8","mainPathWrap":"mainPathWrap___BNeQ2","colorBlue":"colorBlue___UwyKz","empty":"empty___aaM_9"});
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeSetting/components/SelectFilePathModal/index.tsx
// 排除 ”根目录“,将选中的路径连接,去掉第一个字符串 “/”,获取绝对路径
var formatPath = function formatPath(data) {
return data !== null && data !== void 0 && data.length ? data.filter(function (_, key) {
return key !== 0;
}).map(function (item) {
return item.val;
}).join('').substr(1) : '';
};
var SelectFilePathModal = function SelectFilePathModal(_ref) {
var shixunsDetail = _ref.shixunsDetail,
globalSetting = _ref.globalSetting,
dispatch = _ref.dispatch,
fileType = _ref.fileType,
propsPath = _ref.path,
_ref$onFinish = _ref.onFinish,
onFinish = _ref$onFinish === void 0 ? function () {} : _ref$onFinish;
var params = (0,_umi_production_exports.useParams)();
var _useState = (0,react.useState)(''),
_useState2 = slicedToArray_default()(_useState, 2),
selectPath = _useState2[0],
setSelectPath = _useState2[1];
var _useState3 = (0,react.useState)('1'),
_useState4 = slicedToArray_default()(_useState3, 2),
activeKey = _useState4[0],
setActiveKey = _useState4[1];
var _useState5 = (0,react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
mainPathList = _useState6[0],
setMainPathList = _useState6[1];
var _useState7 = (0,react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
loading = _useState8[0],
setLoading = _useState8[1];
var _useState9 = (0,react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
treeList = _useState10[0],
setTreeList = _useState10[1];
var selectPathTypes = [PracticeFileType.OriginalPicturePath, PracticeFileType.ExpectPicturePath, PracticeFileType.PicturePath];
var isSelectPathType = selectPathTypes.includes(fileType);
(0,react.useEffect)(function () {
if (shixunsDetail.actionTabs.key !== 'EditPracticeSetting-SelectFilePath') {
return;
}
setSelectPath(propsPath || '');
handleGetPathData();
}, [shixunsDetail.actionTabs.key, propsPath, activeKey]);
var handleGetPathData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var path,
res,
trees,
_args = arguments;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
path = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
setLoading(true);
_context.next = 4;
return dispatch({
type: "shixunsDetail/".concat(activeKey === '1' ? 'getRepository' : 'getSecretRepository'),
payload: {
id: params.id,
path: path
}
});
case 4:
res = _context.sent;
if (res !== null && res !== void 0 && res.trees) {
trees = res.trees.map(function (item) {
return objectSpread2_default()(objectSpread2_default()({}, item), {
name: item.name,
val: item.name
});
});
setTreeList(trees || []);
} else {
setTreeList([]);
}
setLoading(false);
case 7:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleGetPathData() {
return _ref2.apply(this, arguments);
};
}();
var handleClickFile = function handleClickFile(name) {
var currentPath = formatPath(mainPathList);
var selectName = "".concat(currentPath ? "".concat(currentPath, "/") : currentPath).concat(name);
if (activeKey === '2') {
selectName = "secret/".concat(selectName);
}
if (fileType === PracticeFileType.Path) {
!(selectPath !== null && selectPath !== void 0 && selectPath.includes("".concat(selectName, "\uFF1B"))) && setSelectPath("".concat(selectPath).concat(selectName, "\uFF1B"));
} else if (fileType === PracticeFileType.ExecPath) {
setSelectPath(selectName);
}
};
var handleClickTree = function handleClickTree(item) {
if (item.type === "tree") {
mainPathList.length ? mainPathList.push({
val: "/".concat(item.val),
path: item.val
}) : mainPathList.push({
val: "根目录",
path: ""
}, {
val: "/".concat(item.val),
path: item.val
});
setMainPathList(mainPathList);
var _currentPath = formatPath(mainPathList);
isSelectPathType && setSelectPath(_currentPath);
handleGetPathData(_currentPath);
}
};
var handleClickMainPath = function handleClickMainPath(item, index) {
var currentPathList = mainPathList.filter(function (_, key) {
return key <= index;
});
setMainPathList(currentPathList);
var currentPath = formatPath(currentPathList);
isSelectPathType && setSelectPath(currentPath);
handleGetPathData(currentPath);
};
var handleOk = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
onFinish(selectPath);
handleCancel();
case 2:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleOk() {
return _ref3.apply(this, arguments);
};
}();
var handleCancel = function handleCancel() {
setSelectPath('');
setMainPathList([]);
setTreeList([]);
setActiveKey('1');
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {}
});
};
var renderEmpty = function renderEmpty() {
return /*#__PURE__*/(0,jsx_runtime.jsx)(empty/* default */.Z, {
style: {
margin: '0 0'
},
image: empty/* default.PRESENTED_IMAGE_SIMPLE */.Z.PRESENTED_IMAGE_SIMPLE,
imageStyle: {
height: 60
},
description: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
color: '#888',
marginBottom: 0
},
children: "\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u6682\u65E0\u6587\u4EF6\u3002\u8BF7\u5148\u5F00\u542F\u5E76\u4E0A\u4F20\u4EE3\u7801\u6587"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#888'
},
children: "\u4EF6\u3001\u6807\u51C6\u56FE\u7247\u7B49\u6587\u4EF6\u5230\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"
})]
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
handleCancel();
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
tabsActive: 'warehouse'
}
});
_umi_production_exports.history.push("/shixuns/".concat(params.id, "/edit?tabId=warehouse"));
},
children: "\u53BB\u4E0A\u4F20"
})
});
};
var currentPath = formatPath(mainPathList);
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
title: "\u6587\u4EF6\u8DEF\u5F84",
closable: false,
keyboard: false,
open: shixunsDetail.actionTabs.key === 'EditPracticeSetting-SelectFilePath',
onOk: handleOk,
onCancel: handleCancel,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: SelectFilePathModalmodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(tabs/* default */.Z, {
activeKey: activeKey,
onChange: function onChange(e) {
setMainPathList([]);
setActiveKey(e);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default.TabPane */.Z.TabPane, {
tab: "\u4EE3\u7801\u4ED3\u5E93"
}, "1"), fileType === 'exec_path' && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default.TabPane */.Z.TabPane, {
tab: "\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"
}, "2")]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
style: {
backgroundColor: '#f5f5f5',
height: 200
},
spinning: loading,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: SelectFilePathModalmodules.content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: !!(mainPathList !== null && mainPathList !== void 0 && mainPathList.length) && mainPathList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
style: {
whiteSpace: index === 0 ? 'nowrap' : ''
},
onClick: function onClick() {
return handleClickMainPath(item, index);
},
children: item.val
}, index);
})
}), !!(treeList !== null && treeList !== void 0 && treeList.length) ? treeList.map(function (item, index) {
return item.type === "tree" ? /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
onClick: function onClick() {
return handleClickTree(item);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-wenjianjia ".concat(SelectFilePathModalmodules.colorBlue)
}), currentPath ? "".concat(currentPath, "/") : currentPath, item.name]
}, index) : /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
onClick: function onClick() {
return handleClickFile("".concat(item.name));
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-zuoye ".concat(SelectFilePathModalmodules.colorBlue)
}), currentPath ? "".concat(currentPath, "/") : currentPath, item.name]
}, index);
}) : renderEmpty()]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
className: "mt5",
children: "\u5DF2\u9009\u4E2D\u7684\u6587\u4EF6:"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09",
value: selectPath,
onChange: function onChange(e) {
return setSelectPath(e.target.value);
}
})]
})
});
};
/* harmony default export */ var components_SelectFilePathModal = ((0,_umi_production_exports.connect)(function (_ref4) {
var shixunsDetail = _ref4.shixunsDetail,
globalSetting = _ref4.globalSetting;
return {
shixunsDetail: shixunsDetail,
globalSetting: globalSetting
};
})(SelectFilePathModal));
// EXTERNAL MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.tsx + 2 modules
var UploadFile = __webpack_require__(29201);
// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
var lodash = __webpack_require__(96486);
// EXTERNAL MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/components/Loading/index.tsx + 1 modules
var Loading = __webpack_require__(58194);
// EXTERNAL MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/challenge-nav.tsx + 1 modules
var challenge_nav = __webpack_require__(73080);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeSetting/index.tsx
var Option = es_select/* default.Option */.Z.Option;
var TextArea = input/* default.TextArea */.Z.TextArea;
var Panel = collapse/* default.Panel */.Z.Panel;
var PracticeFileType = /*#__PURE__*/function (PracticeFileType) {
PracticeFileType["Path"] = "path";
PracticeFileType["ExecPath"] = "exec_path";
PracticeFileType["OriginalPicturePath"] = "original_picture_path";
PracticeFileType["ExpectPicturePath"] = "expect_picture_path";
PracticeFileType["PicturePath"] = "picture_path";
return PracticeFileType;
}({});
var EditPracticeSetting = function EditPracticeSetting(_ref) {
var _shixunsDetail$detail, _shixunsDetail$detail2, _shixunsDetail$detail3, _shixunsDetail$detail4, _shixunsDetail$detail5, _shixunsDetail$detail6;
var shixunsDetail = _ref.shixunsDetail,
dispatch = _ref.dispatch,
practiceSetting = _ref.practiceSetting;
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
formValue = _useState2[0],
setFormValue = _useState2[1];
var _useState3 = (0,react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
uploadData = _useState4[0],
setUploadData = _useState4[1];
var _useState5 = (0,react.useState)({}),
_useState6 = slicedToArray_default()(_useState5, 2),
settingData = _useState6[0],
setSettingData = _useState6[1];
var _useState7 = (0,react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
testSetList = _useState8[0],
setTestSetList = _useState8[1];
var _useState9 = (0,react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
selectFilePathType = _useState10[0],
setSelectFilePathType = _useState10[1];
var changeData = (0,react.useRef)({
formValue: {},
testSetList: [],
uploadData: []
});
var _useState11 = (0,react.useState)(true),
_useState12 = slicedToArray_default()(_useState11, 2),
loading = _useState12[0],
setLoading = _useState12[1];
var _useState13 = (0,react.useState)(true),
_useState14 = slicedToArray_default()(_useState13, 2),
isTreeNull = _useState14[0],
setIsTreeNull = _useState14[1];
var timer = (0,react.useRef)(null);
var _useState15 = (0,react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
showUploadFile = _useState16[0],
setShowUploadFile = _useState16[1];
var _useState17 = (0,react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
isshows = _useState18[0],
setisshows = _useState18[1];
var params = (0,_umi_production_exports.useParams)();
var changeKeys = ["test_set_rules", "go_back_url", "next_challenge", "position", "name", "chooses", "st", "id", "path", "exec_path", "show_type", "original_picture_path", "expect_picture_path", "picture_path", "test_set_rules_expression", "web_route", "test_set_score", "test_set_average", "exec_time", "ignore_space", "with_code_file", "unity_3d", "unity_3d_routes", "unity_3d_result", "has_web_route", "test_sets", 'is_file', 'proxy_port'];
(0,react.useEffect)(function () {
getPracticeData();
}, []);
(0,react.useEffect)(function () {
if (JSON.stringify(changeData.current.formValue) !== '{}' && changeData.current.testSetList.length) {
setConfirmValue();
}
return function () {
clearTimeout(timer.current);
};
}, [formValue, testSetList]);
var getPracticeData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var treeData, res, _res$test_sets, _res$test_sets$, is_file, new_res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setLoading(true);
_context.next = 3;
return dispatch({
type: 'shixunsDetail/getRepository',
payload: {
id: params.id,
path: ''
}
});
case 3:
treeData = _context.sent;
setIsTreeNull((treeData === null || treeData === void 0 ? void 0 : treeData.trees) === null);
_context.next = 7;
return (0,shixuns/* getChallengePractice */.ii)({
id: params.id,
challengeId: params.challengesId,
tab: 1
});
case 7:
res = _context.sent;
if (res) {
setLoading(false);
is_file = ((_res$test_sets = res.test_sets) === null || _res$test_sets === void 0 ? void 0 : (_res$test_sets$ = _res$test_sets[0]) === null || _res$test_sets$ === void 0 ? void 0 : _res$test_sets$.is_file) || false;
new_res = objectSpread2_default()(objectSpread2_default()({}, res), {}, {
is_file: is_file
});
setSettingData(new_res);
if (parseInt(res === null || res === void 0 ? void 0 : res.code_compile_score) > 0) {
setisshows(true);
}
initData(new_res);
}
case 9:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getPracticeData() {
return _ref2.apply(this, arguments);
};
}();
var setConfirmValue = function setConfirmValue() {
clearTimeout(timer.current);
timer.current = setTimeout(updateValue, 500);
};
var updateValue = function updateValue() {
var formBool = changeKeys.some(function (key) {
var a = (0,lodash.isNumber)(formValue[key]) ? String(formValue[key]) : formValue[key];
var b = (0,lodash.isNumber)(changeData.current.formValue[key]) ? String(changeData.current.formValue[key]) : changeData.current.formValue[key];
// console.log(a, '=====', b, a === b ? '相等' : '不相等', key)
return !(0,lodash.isEqual)(a, b);
});
if (formBool || !(0,lodash.isEqual)(changeData.current.testSetList, testSetList) || !(0,lodash.isEqual)(changeData.current.uploadData, uploadData)) {
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: true
}
});
} else {
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
}
};
var initData = function initData(originData) {
// 端口号无值时设置为8080
originData.proxy_port = (originData === null || originData === void 0 ? void 0 : originData.proxy_port) || 8080;
form.setFieldsValue(objectSpread2_default()({}, originData));
setFormValue(objectSpread2_default()({}, originData));
if (originData !== null && originData !== void 0 && originData.is_file) {
var upData = originData.test_sets || [];
setUploadData(upData);
var testSetData = [{
hidden: 0,
input: "",
output: "",
score: 100
}];
changeData.current = {
formValue: objectSpread2_default()({}, originData),
testSetList: testSetData,
uploadData: upData
};
setTestSetList(testSetData);
} else {
var _originData$test_sets;
var _testSetData = (_originData$test_sets = originData.test_sets) !== null && _originData$test_sets !== void 0 && _originData$test_sets.length ? originData.test_sets : [{
hidden: 0,
input: "",
output: "",
score: 100
}];
changeData.current = {
formValue: objectSpread2_default()({}, originData),
testSetList: _testSetData,
uploadData: []
};
setTestSetList(_testSetData);
}
};
var handleChangeFilePathModal = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(type) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!isTreeNull) {
_context2.next = 3;
break;
}
modal/* default.confirm */.Z.confirm({
centered: true,
title: '提示',
content: '请先上传本关任务的所有代码文件、标准图片等所有必要的文件到代码仓库',
okText: '去上传',
onOk: function onOk() {
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
tabsActive: 'warehouse'
}
});
_umi_production_exports.history.push("/shixuns/".concat(params.id, "/edit?tabId=warehouse"));
},
cancelText: '取消'
});
return _context2.abrupt("return");
case 3:
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {
key: 'EditPracticeSetting-SelectFilePath'
}
});
setSelectFilePathType(type);
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleChangeFilePathModal(_x) {
return _ref3.apply(this, arguments);
};
}();
var handleFinishSelectFilePath = function handleFinishSelectFilePath(value) {
var s = defineProperty_default()({}, selectFilePathType, value);
form.setFieldsValue(s);
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), s));
};
var handleValuesChange = function handleValuesChange(changedValues) {
var values = form.getFieldValue();
setFormValue(objectSpread2_default()({}, values));
if ('test_set_score' in changedValues) {
if (changedValues.test_set_score) {
form.setFieldsValue({
test_set_average: true
});
if (formValue.is_file) {
handleUploadRatio(uploadData);
} else {
handleShareRatio(testSetList);
}
}
}
if ('test_set_average' in changedValues) {
if (changedValues.test_set_average) {
if (formValue.is_file) {
handleUploadRatio(uploadData);
} else {
handleShareRatio(testSetList);
}
}
}
if ('unity_3d' in changedValues) {
if (!changedValues.unity_3d) {
form.setFieldsValue({
with_code_file: true
});
setFormValue(objectSpread2_default()(objectSpread2_default()({}, values), {}, {
with_code_file: true
}));
}
}
};
var handleShareRatio = function handleShareRatio(testSetData) {
// console.log('----',form.getFieldValue('code_compile_score'));
var code_compile_score = parseInt(form.getFieldValue('code_compile_score') || 0);
var score = Math.floor((100 - code_compile_score) / testSetData.length);
var lastScore = score + (100 - code_compile_score) % testSetData.length;
testSetData = testSetData.map(function (item, index) {
if (index === testSetData.length - 1) {
return objectSpread2_default()(objectSpread2_default()({}, item), {}, {
score: lastScore
});
}
return objectSpread2_default()(objectSpread2_default()({}, item), {}, {
score: score
});
});
changeData.current.testSetList = (0,lodash.clone)(testSetData);
setTestSetList(testSetData);
};
var handleUploadRatio = function handleUploadRatio(testSetData) {
// const score = Math.floor(100 / testSetData.length)
// const lastScore = score + 100 % testSetData.length
var code_compile_score = parseInt(form.getFieldValue('code_compile_score') || 0);
var score = Math.floor((100 - code_compile_score) / testSetData.length);
var lastScore = score + (100 - code_compile_score) % testSetData.length;
testSetData = testSetData.map(function (item, index) {
if (index === testSetData.length - 1) {
return objectSpread2_default()(objectSpread2_default()({}, item), {}, {
score: lastScore
});
}
return objectSpread2_default()(objectSpread2_default()({}, item), {}, {
score: score
});
});
changeData.current.uploadData = (0,lodash.clone)(testSetData);
setUploadData(testSetData);
};
var handleAddTestSet = function handleAddTestSet() {
var testSetData = [].concat(toConsumableArray_default()(testSetList), [{
hidden: 0,
input: "",
output: "",
score: 0
}]);
if (form.getFieldValue('test_set_average')) {
handleShareRatio(testSetData);
} else {
setTestSetList(testSetData);
}
};
var handleFinish = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(values) {
var newTestSetList, code_compile_score, scoreList, sumScore, _scoreList, _sumScore, res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
newTestSetList = [];
code_compile_score = parseInt(form.getFieldValue('code_compile_score') || 0);
if (!values.is_file) {
_context3.next = 12;
break;
}
if (uploadData !== null && uploadData !== void 0 && uploadData.length) {
_context3.next = 6;
break;
}
message/* default.error */.ZP.error('测试集不能为空');
return _context3.abrupt("return");
case 6:
scoreList = uploadData.map(function (item) {
return item.score;
});
sumScore = scoreList.reduce(function (current, next) {
return current + next;
}, 0) + code_compile_score;
if (!(values.test_set_score && sumScore !== 100 && testSetList !== null && testSetList !== void 0 && testSetList.length)) {
_context3.next = 11;
break;
}
message/* default.error */.ZP.error('测试集的评分占比之和必须等于100');
return _context3.abrupt("return");
case 11:
newTestSetList = uploadData;
case 12:
if (values.is_file) {
_context3.next = 19;
break;
}
_scoreList = testSetList.map(function (item) {
return item.score;
});
_sumScore = _scoreList.reduce(function (current, next) {
return current + next;
}, 0) + code_compile_score;
if (!(values.test_set_score && _sumScore !== 100 && testSetList !== null && testSetList !== void 0 && testSetList.length)) {
_context3.next = 18;
break;
}
message/* default.error */.ZP.error('测试集的评分占比之和必须等于100');
return _context3.abrupt("return");
case 18:
newTestSetList = testSetList.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
is_file: false
});
});
case 19:
if (!values.test_set_score) {
// console.log(testSetList.map((e: any) => ({ ...e, is_target:false, target_name:'',hidden:1})));
newTestSetList = newTestSetList.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
is_target: false,
target_name: ''
});
});
}
_context3.next = 22;
return (0,shixuns/* updateChallengesNew */.Rs)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
tab: 1,
challenge: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, values), {
test_set_rules_expression: values.test_set_rules === 0 ? null : values.test_set_rules_expression
}), {}, {
shixunfileexpectpicturepath: values.original_picture_path,
shixunfilestandardpicturepath: values.expect_picture_path
}),
test_set: newTestSetList
}));
case 22:
res = _context3.sent;
if (res.status >= 0) {
_umi_production_exports.history.replace("/shixuns/".concat(params.id, "/edit/").concat(params.challengesId, "/tab=3"));
}
case 24:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function handleFinish(_x2) {
return _ref4.apply(this, arguments);
};
}();
var handleRemove = function handleRemove(item, key) {
var newList = toConsumableArray_default()(uploadData);
newList.splice(key, 1);
if (formValue.test_set_average) {
handleUploadRatio(newList);
} else {
setUploadData(newList);
}
};
var handleInputChange = function handleInputChange(e, key) {
console.log(e, key);
var testData = uploadData.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
score: e.target.value ? Number(e.target.value) : 0
});
}
return test;
});
setUploadData(testData);
};
var handleEvaluatingChange = function handleEvaluatingChange(e, key, type) {
console.log(e, key);
var testData = uploadData.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, defineProperty_default()({}, type, e));
}
return test;
});
setUploadData(testData);
};
var addUploadData = function addUploadData(files) {
if (!(files !== null && files !== void 0 && files.length)) return;
form.setFieldsValue({
is_file: files === null || files === void 0 ? void 0 : files[0].is_file
});
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {}, {
is_file: files === null || files === void 0 ? void 0 : files[0].is_file
}));
//文件
if (files !== null && files !== void 0 && files[0].is_file) {
var newList = uploadData.concat(files.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
hidden: 0,
is_invisible: false,
last_match_rule: false
});
}));
if (formValue.test_set_average) {
handleUploadRatio(newList);
} else {
setUploadData(newList);
}
}
//文本
if (!(files !== null && files !== void 0 && files[0].is_file)) {
var _newList = testSetList === null || testSetList === void 0 ? void 0 : testSetList.filter(function (e) {
return e.input || e.output;
}).concat(files);
if (formValue.test_set_average) {
handleShareRatio(_newList);
} else {
setTestSetList(_newList);
}
}
};
var toExit = function toExit() {
var _practiceSetting$side;
var toNext = function toNext() {
_umi_production_exports.history.push("/shixuns/".concat(params.id, "/challenges"));
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
};
if (practiceSetting !== null && practiceSetting !== void 0 && (_practiceSetting$side = practiceSetting.sideBar) !== null && _practiceSetting$side !== void 0 && _practiceSetting$side.confirmLeave) {
modal/* default.confirm */.Z.confirm({
title: "离开此页提示",
content: "系统可能不会保存您所做的更改。",
okText: "离开",
cancelText: "取消",
onOk: function onOk() {
toNext();
}
});
} else {
toNext();
}
};
console.log(uploadData, 444);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: EditPracticeSettingmodules.bg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form,
className: EditPracticeSettingmodules.formWrap,
scrollToFirstError: true,
layout: "vertical",
onValuesChange: handleValuesChange,
onFinish: handleFinish,
initialValues: {
test_set_rules: 0
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(challenge_nav/* default */.Z, {
activeIndex: 1
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: EditPracticeSettingmodules.onePart,
children: [((_shixunsDetail$detail = shixunsDetail.detail) === null || _shixunsDetail$detail === void 0 ? void 0 : _shixunsDetail$detail.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default.Item */.Z.Item, {
label: "\u5D4C\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0:",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "unity_3d",
noStyle: true,
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
disabled: ((_shixunsDetail$detail2 = shixunsDetail.detail) === null || _shixunsDetail$detail2 === void 0 ? void 0 : _shixunsDetail$detail2.shixun_status) === 2
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 c-light-black",
children: "\uFF08\u53EF\u4EE5\u5728\u5B66\u5458\u9875\u9762\u76F4\u63A5\u5D4C\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0\uFF09"
})]
}), formValue.unity_3d && ((_shixunsDetail$detail3 = shixunsDetail.detail) === null || _shixunsDetail$detail3 === void 0 ? void 0 : _shixunsDetail$detail3.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "unity_3d_routes",
label: "\u8DEF\u5F84:",
rules: [{
required: true,
message: "必填项:不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
disabled: ((_shixunsDetail$detail4 = shixunsDetail.detail) === null || _shixunsDetail$detail4 === void 0 ? void 0 : _shixunsDetail$detail4.shixun_status) === 2,
placeholder: "\u8BF7\u9009\u62E9\u7248\u672C\u5E93\u4E2D\u7684\u4EE3\u7801\u6587\u4EF6\u3002\u4F8B\uFF1A src/step1/HelloWorld.java"
})
})]
}), formValue.unity_3d && ((_shixunsDetail$detail5 = shixunsDetail.detail) === null || _shixunsDetail$detail5 === void 0 ? void 0 : _shixunsDetail$detail5.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "with_code_file",
label: "\u662F\u5426\u9700\u8981\u4EE3\u7801\u8BC4\u6D4B:",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: true,
children: "\u662F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: false,
children: "\u5426"
})]
})
}), formValue.with_code_file ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "unity_3d_result",
label: "\u8BC4\u6D4B\u7ED3\u679C\u662F\u5426\u7531 Unity3D \u51B3\u5B9A:",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: true,
children: "\u662F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: false,
children: "\u5426"
})]
})
}) : null]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.twoPart,
children: formValue.with_code_file && /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.title,
children: "\u8BC4\u6D4B\u6587\u4EF6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "exec_time",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u8BC4\u6D4B\u65F6\u957F\u9650\u5236 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u7A0B\u5E8F\u7F16\u8BD1\u3001\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F\uFF0C\u5355\u4F4D\uFF1A\u79D2\uFF09"
})]
}),
rules: [{
required: true,
message: "必填项:不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F",
className: EditPracticeSettingmodules.width300
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default.Item */.Z.Item, {
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u8BC4\u6D4B\u7ED3\u679C\u5C55\u793A\u65B9\u5F0F ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u5B66\u5458\u8BC4\u6D4B\u672C\u5173\u4EFB\u52A1\u65F6\uFF0C\u67E5\u770B\u6548\u679C\u9875\u4E0A\u9700\u8981\u5C55\u73B0\u7684\u6587\u4EF6\u7C7B\u578B\uFF09"
})]
}),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "show_type",
noStyle: true,
rules: [{
required: true,
message: "必填项:不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select/* default */.Z, {
bordered: false,
size: "large",
style: {
width: 600
},
getPopupContainer: function getPopupContainer(trigger) {
return trigger.parentNode;
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: -1,
children: "\u6D4B\u8BD5\u96C6\u5BF9\u6BD4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 1,
children: "\u56FE\u7247"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 2,
children: "apk/exe"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 3,
children: "txt"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 4,
children: "html"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 5,
children: "mp3"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 6,
children: "mp4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 7,
children: "LaTeX"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 8,
children: "office"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: 9,
children: "Verilog"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
overlayClassName: EditPracticeSettingmodules.popover,
placement: "bottomLeft",
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: "font12",
children: ["\u56FE\u7247\uFF1A\u5904\u7406\u6216\u8F93\u51FA\u56FE\u7247\u7C7B\u578B\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u586B\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53EF\u4EE5\u901A\u8FC7\u8BBE\u7F6E\u56FE\u7247\u8DEF\u5F84\u548C\u5B66\u5458\u7B54\u6848\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5C55\u793A\u4EE3\u7801\u5BF9\u5E94\u7684\u56FE\u7247\u6548\u679C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "apk/exe\uFF1A\u5199\u53EF\u6267\u884C\u6587\u4EF6\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u586B\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53EF\u4EE5\u901A\u8FC7\u8BBE\u7F6E\u5B66\u5458\u7B54\u6848\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5C55\u793A\u4E8C\u7EF4\u7801\u4EE5\u4F9B\u626B\u7801\u4E0B\u8F7D", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "txt\uFF1A\u8F93\u51FAtxt\u6587\u6863\u7C7B\u578B\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u586B\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53EF\u4EE5\u901A\u8FC7\u5B66\u5458\u7B54\u6848\u6587\u4EF6\u8DEF\u5F84\u8BBE\u7F6E\uFF0C\u5C55\u793Atxt\u6587\u4EF6\u5185\u5BB9", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "html\uFF1Aweb\u7C7B\u578B\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u586B\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53EF\u4EE5\u901A\u8FC7Web\u8DEF\u7531\u8BBE\u7F6E\uFF0C\u5C55\u793Ahtml\u6548\u679C\u9884\u89C8\u9875", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "mp3/mp4\uFF1Amp3/mp4\u6587\u4EF6\u7C7B\u578B\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u586B\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53EF\u4EE5\u901A\u8FC7\u5B66\u5458\u7B54\u6848\u6587\u4EF6\u8DEF\u5F84\u8BBE\u7F6E\uFF0C\u5C55\u793Amp3/mp4\u6587\u4EF6\u5185\u5BB9", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "LaTeX\uFF1ALaTeX\u5B9E\u9A8C\u62A5\u544A\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u62E9\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5B66\u5458\u53EF\u4EE5\u4F7F\u7528LaTeX\u7CFB\u7EDF\u64B0\u5199\u5B9E\u9A8C\u62A5\u544A\uFF0C\u6700\u7EC8\u4EE5PDF\u683C\u5F0F\u5C55\u793A", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-red",
children: "\u6CE8\u610F\uFF1A\u9009\u62E9\u4E86LaTeX\u7684\u5173\u5361\uFF0C\u9700\u8981\u6559\u5E08\u624B\u52A8\u5BF9\u8BE5\u5173\u5361\u8FDB\u884C\u5224\u5206"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "Office\uFF1AMicrosoftOffice\u76F8\u5173\u6587\u4EF6\u7684\u4EFB\u52A1\uFF0C\u8BF7\u9009\u586B\u6B64\u9879", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u6CE8\u610F\uFF1A\u5B66\u751F\u4E0A\u4F20\u7684office\u6587\u4EF6\u76EE\u5F55\u662F\u5728/data/bigfiles\u76EE\u5F55\u4E0B\uFF0C\u5982\u679C\u8981\u505A\u8BC4\u6D4B\uFF0C\u8BF7\u8BFB\u53D6\u6B64\u76EE\u5F55\u7684\u6587\u4EF6", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
}),
trigger: "click",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
className: "ml5 font24 c-light-black"
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "path",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u8BE5\u6587\u4EF6\u5C06\u76F4\u63A5\u663E\u793A\u7ED9\u5B66\u751F\uFF0C\u9700\u8981\u5B66\u751F\u5728\u5176\u4E2D\u586B\u5199\u4EE3\u7801\uFF09"
})]
}),
rules: [{
required: true,
message: "必填项:不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u70B9\u51FB\u9009\u62E9\u4EE3\u7801\u6587\u4EF6\uFF0C\u53EF\u540C\u65F6\u9009\u62E9\u591A\u4E2A\u6587\u4EF6",
onClick: function onClick() {
return handleChangeFilePathModal(PracticeFileType.Path);
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "exec_path",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u8BC4\u6D4B\u6267\u884C\u6587\u4EF6 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u70B9\u51FB\u8BC4\u6D4B\u6309\u94AE\u65F6\u8C03\u7528\u7684\u6587\u4EF6\uFF0C\u7528\u4E8E\u68C0\u6D4B\u5B66\u5458\u7ED3\u679C\u662F\u5426\u6B63\u786E\uFF0C\u53EF\u4EE5\u4E0E\u201C\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u201D\u4E00\u81F4\uFF09"
})]
}),
rules: [{
required: true,
message: "必填项:不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u70B9\u51FB\u9009\u62E9\u4EE3\u7801\u6587\u4EF6",
onClick: function onClick() {
return handleChangeFilePathModal(PracticeFileType.ExecPath);
}
})
}), formValue.show_type === 4 && (formValue.web_route || (settingData === null || settingData === void 0 ? void 0 : settingData.has_web_route)) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "proxy_port",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u7AEF\u53E3\u53F7 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u8BF7\u6CE8\u610F\u5C06\u670D\u52A1\u5668\u7A0B\u5E8F\u7684\u7AEF\u53E3\u53F7\u6620\u5C04\u5230\u4EE5\u4E0B\u7AEF\u53E3\uFF0C\u9ED8\u8BA48080\uFF09"
})]
}),
rules: [{
required: true,
message: "请输入端口号"
}, {
validator: function validator(_, value) {
return /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/.test(value) || !value ? Promise.resolve() : Promise.reject(new Error('端口输入范围(0-65535)'));
}
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u8BF7\u8F93\u51650-65535\u7684\u503C"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "web_route",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["Web\u8DEF\u7531 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: " \uFF08\u7F51\u7AD9\u7C7B\u578B\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u8BF7\u586B\u5199Web\u8DEF\u7531\u5730\u5740\uFF09"
})]
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u7F51\u7AD9\u7C7B\u578B\u5B9E\u8BAD\uFF0C\u8BF7\u586B\u5199Web\u8DEF\u7531\u5730\u5740\u3002\u4F8B\uFF1Ajava/mypage"
})
})]
}), (formValue.show_type === 1 || formValue.show_type === 5 || formValue.show_type === 6) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "original_picture_path",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6E90\u6587\u4EF6\u76EE\u5F55 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u8BE5\u76EE\u5F55\u7528\u4E8E\u5B58\u653E\u9700\u8981\u5904\u7406\u7684\u56FE\u7247/MP3/MP4\u7B49\u6587\u4EF6\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u5355\u72EC\u7684\u6587\u4EF6\u5939\uFF09"
})]
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u70B9\u51FB\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\uFF0C\u4F8B\uFF1Asrc/step1/sourcefiles",
onClick: function onClick() {
return handleChangeFilePathModal(PracticeFileType.OriginalPicturePath);
}
})
}), formValue.show_type !== -1 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "picture_path",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5B66\u5458\u7B54\u6848\u6587\u4EF6\u76EE\u5F55 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u8BE5\u76EE\u5F55\u7528\u4E8E\u5B58\u653E\u5B66\u5458\u4EE3\u7801\u6267\u884C\u540E\u751F\u6210\u7684\u6587\u4EF6\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u5355\u72EC\u7684\u6587\u4EF6\u5939\uFF09"
})]
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u70B9\u51FB\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\uFF0C\u4F8B\uFF1Asrc/step1/outputfiles",
onClick: function onClick() {
return handleChangeFilePathModal(PracticeFileType.PicturePath);
}
})
}), (formValue.show_type === 1 || formValue.show_type === 5 || formValue.show_type === 6) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "expect_picture_path",
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6807\u51C6\u7B54\u6848\u6587\u4EF6\u76EE\u5F55 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u8BE5\u76EE\u5F55\u7528\u4E8E\u5B58\u653E\u6700\u7EC8\u4F5C\u4E3A\u53C2\u8003\u7684\u6587\u4EF6\uFF0C\u5728\u8BC4\u6D4B\u901A\u8FC7\u540E\u4F1A\u5C55\u793A\u7ED9\u5B66\u5458\u67E5\u770B\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u5355\u72EC\u7684\u6587\u4EF6\u5939\uFF09"
})]
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
bordered: false,
placeholder: "\u70B9\u51FB\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\uFF0C\u4F8B\uFF1Asrc/step1/expectedfiles",
onClick: function onClick() {
return handleChangeFilePathModal(PracticeFileType.ExpectPicturePath);
}
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.threePart,
children: formValue.with_code_file && /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.title,
children: "\u8BC4\u6D4B\u89C4\u5219"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: EditPracticeSettingmodules.flexRowCenter,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: EditPracticeSettingmodules.formCustom,
name: "test_set_rules",
label: "\u901A\u5173\u5224\u5B9A:",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
className: "ml25",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
className: EditPracticeSettingmodules.radioStyle,
value: 0,
children: "\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u5BF9\u6BD4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
className: EditPracticeSettingmodules.radioStyle,
value: 1,
children: "\u5B9E\u9645\u8F93\u51FA\u6EE1\u8DB3\u89C4\u5219"
})]
})
}), formValue.test_set_rules === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "test_set_rules_expression",
style: {
marginTop: 50,
position: "relative",
top: 40
},
rules: [{
required: true,
message: "必填项:不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
width: 400,
marginLeft: -40
},
bordered: false,
placeholder: "\u9002\u7528\u4E8E\u8F93\u51FA\u7ED3\u679C\u52A8\u6001\u53D8\u5316\u7684\u7A0B\u5E8F"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
overlayClassName: EditPracticeSettingmodules.popover,
placement: "bottomLeft",
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: "font12",
children: ["\u4F7F\u7528\u793A\u4F8B1\uFF1A\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u7684\u76F8\u5BF9\u8BEF\u5DEE\u57280.01\u4EE5\u5185\uFF0C\u53EF\u4F7F\u7528\u4EE5\u4E0B\u8868\u8FBE\u5F0F\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "(actual-expect)/expect <= 0.01", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u4F7F\u7528\u793A\u4F8B2\uFF1A\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\u5305\u542B\u67D0\u6BB5\u5B57\u7B26\u4E32hello\uFF0C\u53EF\u4F7F\u7528\u4EE5\u4E0B\u8868\u8FBE\u5F0F\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "string.contains(actual, \"hello\")", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u82E5\u9700\u8981\u5BF9\u8F93\u51FA\u7ED3\u679C\u4E2D\u6BCF\u4E2A\u5143\u7D20\u8FDB\u884C\u64CD\u4F5C\uFF0C\u53EF\u4F7F\u7528list\u96C6\u5408", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u793A\u4F8B\u53C2\u8003\uFF1A\u5047\u8BBE\u7A0B\u5E8F\u5B9E\u9645\u8F93\u51FA\u4E3A\uFF1A100 1000 10000\uFF1B\u9884\u671F\u8F93\u51FA\u4E3A\uFF1A100.01 1000.02 10000.05", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BC4\u6D4B\u8981\u6C42\uFF1A\u5B9E\u9645\u8F93\u51FA\u5217\u8868\u4E2D\u5143\u7D20\u4E0E\u9884\u671F\u8F93\u51FA\u5217\u8868\u4E2D\u5BF9\u5E94\u5143\u7D20\u76F8\u5BF9\u8BEF\u5DEE\u57280.01 \u4E4B\u5185\uFF0C\u53EF\u4F7F\u4EE5\u4E0B\u8868\u8FBE\u5F0F\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "list.forEach( 'math.abs( (actualElem-expectElem)/expectElem ) <= 0.01 ' )", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
href: "https://www.educoder.net/forums/4346",
target: "_blank",
style: {
background: '#0152d9',
color: '#fff'
},
children: "\u70B9\u51FB\u67E5\u770B\u8BE6\u60C5\u8BF4\u660E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
}),
trigger: "click",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
style: {
padding: '114px 0 0 9px'
},
className: "font24 c-light-black"
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: EditPracticeSettingmodules.formCustom,
name: "ignore_space",
label: "\u7A7A\u683C\u5904\u7406:",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
className: "ml25",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
className: EditPracticeSettingmodules.radioStyle,
value: 0,
children: "\u4E0D\u5FFD\u7565\u7A7A\u683C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
className: EditPracticeSettingmodules.radioStyle,
value: 1,
children: "\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default */.ZP, {
className: EditPracticeSettingmodules.radioStyle,
value: 2,
children: ["\u5FFD\u7565\u6240\u6709\u7A7A\u683C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "(\u8BC4\u6D4B\u8FC7\u7A0B\u4E2D\u81EA\u52A8\u53BB\u6389\u6240\u6709\u7A7A\u683C\u8FDB\u884C\u5BF9\u6BD4)"
})]
})]
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.fourPart,
children: formValue.with_code_file && /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.title,
children: "\u6D4B\u8BD5\u96C6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: EditPracticeSettingmodules.testJi,
name: "test_set_score",
label: "\u5F97\u5206\u89C4\u8303:",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
className: "ml25",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default */.ZP, {
value: false,
className: EditPracticeSettingmodules.radioStyle,
children: ["\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u80FD\u83B7\u5F97\u91D1\u5E01\uFF09"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default */.ZP, {
value: true,
className: EditPracticeSettingmodules.radioStyle,
children: ["\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u90E8\u5206\u6D4B\u8BD5\u96C6\u6B63\u786E\u65F6\uFF0C\u6309\u914D\u7F6E\u7684\u6BD4\u4F8B\u83B7\u5F97\u91D1\u5E01\uFF09"
})]
})]
})
}), formValue.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: EditPracticeSettingmodules.averageWarp,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: EditPracticeSettingmodules.averageCustom,
name: "test_set_average",
label: "",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
style: {
margin: '0 40px 0 20px'
},
value: true,
children: "\u5747\u5206\u6BD4\u4F8B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: false,
children: "\u81EA\u5B9A\u4E49\u6BD4\u4F8B"
})]
})
})
}), formValue.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
height: '30px',
marginBottom: '10px',
paddingLeft: '93px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: isshows,
style: {
display: 'flex',
alignItems: 'center'
},
className: EditPracticeSettingmodules.checkboxs,
onChange: function onChange(e) {
setisshows(e.target.checked);
form.setFieldsValue({
code_compile_score: 0
});
if (formValue.test_set_average) {
if (formValue.is_file) {
handleUploadRatio(uploadData);
} else {
handleShareRatio(testSetList);
}
}
// onAddTestCases();
},
children: "\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"
}), isshows && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
rules: [{
required: true,
message: '请输入编译得分'
}],
name: 'code_compile_score',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
onChange: function onChange() {
// onAddTestCases();
if (formValue.test_set_average) {
if (formValue.is_file) {
handleUploadRatio(uploadData);
} else {
handleShareRatio(testSetList);
}
}
},
parser: function parser(e) {
return isNaN(parseInt(e)) ? '' : parseInt(e);
},
min: 0,
max: 100,
style: {
width: '85px',
margin: '5px 0px',
fontSize: "14px"
}
})
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
display: 'flex',
alignItems: 'center',
marginLeft: '5px'
},
children: "%"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
paddingLeft: '85px',
color: '#999',
fontSize: '12px',
marginBottom: '20px'
},
children: "\uFF08\u8BF7\u6CE8\u610F\u8BE5\u5B9E\u8BAD\u9898\u662F\u5426\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u82E5\u6CA1\u6709\u5219\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: EditPracticeSettingmodules.testJi,
name: "is_file",
label: "\u7528\u4F8B\u7C7B\u578B:",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
className: "ml25",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(space/* default */.Z, {
direction: "horizontal",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: false,
className: EditPracticeSettingmodules.radioStyle,
children: "\u6587\u672C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: true,
className: EditPracticeSettingmodules.radioStyle,
children: "\u6587\u4EF6"
})]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginTop: '20px'
},
className: EditPracticeSettingmodules.upBtn,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
ghost: true,
type: "primary",
className: "mb20",
onClick: function onClick() {
return setShowUploadFile(true);
},
children: "\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"
}), formValue.is_file && /*#__PURE__*/(0,jsx_runtime.jsx)(UploadFile/* UploadTable */.Y2, {
showEvaluatingSetting: true,
onEvaluatingChange: handleEvaluatingChange,
disabled: formValue === null || formValue === void 0 ? void 0 : formValue.test_set_average,
inputChange: handleInputChange,
showScore: formValue === null || formValue === void 0 ? void 0 : formValue.test_set_score,
data: uploadData,
onRemove: handleRemove
})]
}), !formValue.is_file && testSetList.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: EditPracticeSettingmodules.groupWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "font16",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "mr10",
children: ["\u7EC4", key + 1, " : "]
}), formValue.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
marginRight: 100
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
width: 85
}
// bordered={false}
// className={styles.customInput}
,
value: item.score,
type: "number",
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
score: e.target.value ? Number(e.target.value) : 0
});
}
return test;
});
var data = {
test_set_average: false
};
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), data));
form.setFieldsValue(data);
setTestSetList(testData);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 mr10",
children: "%"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
className: "font14 ml5",
checked: item.hidden === 1,
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
hidden: e.target.checked ? 1 : 0
});
}
return test;
});
setTestSetList(testData);
},
children: ["\u9690\u85CF ", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: '隐藏测试集可以防止学生通过"print"等手段直接通关',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
className: "ml5 font12 c-light-black"
})
}), " "]
}), formValue.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
className: "font14 ml5",
checked: item.is_target,
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
is_target: e.target.checked
});
}
return test;
});
setTestSetList(testData);
},
children: ["\u6307\u6807\u6D4B\u8BD5\u96C6", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: '如需要输出指标,可以勾选指标测测试集,并对指标进行命名。教师可在实训作业的实训报告页面查看学生的指标是否合格。指标得分计入最终成绩',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
className: "ml5 font12 c-light-black"
})
}), " "]
}), item.is_target && formValue.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
value: item.target_name,
maxLength: 30,
style: {
width: '50%'
},
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
target_name: e.target.value
});
}
return test;
});
setTestSetList(testData);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tr flex1",
style: {
"float": 'right'
},
children: key !== 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottom",
title: "删除",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font16 c-red current",
onClick: function onClick() {
var testData = testSetList.filter(function (_, testIndex) {
return testIndex !== key;
});
handleShareRatio(testData);
},
children: "\u5220\xA0\u9664"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
bordered: false,
className: "mt10",
rows: 5,
placeholder: "\u8F93\u5165",
value: item.input,
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
input: e.target.value
});
}
return test;
});
setTestSetList(testData);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
bordered: false,
className: "mt10",
rows: 5,
placeholder: "\u9884\u671F\u8F93\u51FA",
value: item.output,
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
output: e.target.value
});
}
return test;
});
setTestSetList(testData);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr20",
children: "\u9884\u671F\u8F93\u51FA:"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: item.is_invisible,
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
is_invisible: e.target.checked
});
}
return test;
});
setTestSetList(testData);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font14",
children: ["\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1\uFF09"
})]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr20",
children: "\u7279\u6B8A\u5224\u5B9A:"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: item.last_match_rule,
onChange: function onChange(e) {
var testData = testSetList.map(function (test, testIndex) {
if (testIndex === key) {
return objectSpread2_default()(objectSpread2_default()({}, test), {}, {
last_match_rule: e.target.checked
});
}
return test;
});
setTestSetList(testData);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font14",
children: ["\u672B\u5C3E\u5339\u914D", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font12 c-light-black",
children: "\uFF08\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173\uFF09"
})]
})
})]
})]
}, key);
}), !formValue.is_file && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
ghost: true,
className: "mt10",
onClick: handleAddTestSet,
children: "\u65B0\u589E\u6D4B\u8BD5\u96C6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " ml20 mt10 font12 c-light-black",
children: "\u6E29\u99A8\u63D0\u793A\uFF1A\u516C\u5F00\u6D4B\u8BD5\u96C6\u548C\u9690\u85CF\u6D4B\u8BD5\u96C6\u7ED3\u5408\u4F7F\u7528\uFF0C\u53EF\u4EE5\u964D\u4F4E\u4F5C\u5F0A\u7684\u673A\u7387\uFF1B\u9690\u85CF\u6D4B\u8BD5\u96C6\uFF0C\u5728\u201C\u63D0\u4EA4\u8BC4\u6D4B\u201D\u65F6\u4E5F\u5C06\u88AB\u7CFB\u7EDF\u81EA\u52A8\u68C0\u6D4B"
})]
})]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_SelectFilePathModal, {
fileType: selectFilePathType,
path: formValue === null || formValue === void 0 ? void 0 : formValue[selectFilePathType],
onFinish: function onFinish(path) {
return handleFinishSelectFilePath(path);
}
})]
}, 1), /*#__PURE__*/(0,jsx_runtime.jsx)(FixedButton/* FixedButton */.t, {
onOk: function onOk() {
return form.submit();
},
className: "customFixedButton",
onCancel: toExit
// onCancel={() => getPracticeData()}
}, 2), /*#__PURE__*/(0,jsx_runtime.jsx)(Loading/* default */.Z, {
loading: loading
}), /*#__PURE__*/(0,jsx_runtime.jsx)(UploadFile/* default */.ZP, {
rootIdentifier: shixunsDetail === null || shixunsDetail === void 0 ? void 0 : (_shixunsDetail$detail6 = shixunsDetail.detail) === null || _shixunsDetail$detail6 === void 0 ? void 0 : _shixunsDetail$detail6.root_identifier,
visible: showUploadFile,
onClose: function onClose() {
return setShowUploadFile(false);
},
onOK: addUploadData,
multiple: true,
defaultMultipleValue: formValue === null || formValue === void 0 ? void 0 : formValue.is_file
})]
});
};
/* harmony default export */ var Challenges_EditPracticeSetting = ((0,_umi_production_exports.connect)(function (_ref5) {
var shixunsDetail = _ref5.shixunsDetail,
newCourse = _ref5.newCourse,
globalSetting = _ref5.globalSetting,
practiceSetting = _ref5.practiceSetting;
return {
shixunsDetail: shixunsDetail,
newCourse: newCourse,
globalSetting: globalSetting,
practiceSetting: practiceSetting
};
})(EditPracticeSetting));
/***/ }),
/***/ 73080:
/*!***************************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/challenge-nav.tsx + 1 modules ***!
\***************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ challenge_nav; }
});
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 39 modules
var modal = __webpack_require__(72423);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
var _umi_production_exports = __webpack_require__(89214);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/challenge-nav.less
// extracted by mini-css-extract-plugin
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/challenge-nav.tsx
var ChallengeNav = function ChallengeNav(_ref) {
var activeIndex = _ref.activeIndex,
_ref$isEdit = _ref.isEdit,
isEdit = _ref$isEdit === void 0 ? true : _ref$isEdit,
dispatch = _ref.dispatch,
practiceSetting = _ref.practiceSetting;
var params = (0,_umi_production_exports.useParams)();
var id = params.id,
challengesId = params.challengesId;
var navs = (0,react.useMemo)(function () {
return [{
name: '本关任务',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/editcheckpoint")
}, {
name: '评测设置',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/tab=2")
}, {
name: '参考答案',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/tab=3")
}, {
name: '关卡排行榜',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/tab=4")
}];
}, [id, challengesId]);
var handleClick = function handleClick(url) {
var _practiceSetting$side;
var toNext = function toNext() {
_umi_production_exports.history.push(url);
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
};
if (practiceSetting !== null && practiceSetting !== void 0 && (_practiceSetting$side = practiceSetting.sideBar) !== null && _practiceSetting$side !== void 0 && _practiceSetting$side.confirmLeave) {
modal/* default.confirm */.Z.confirm({
title: "离开此页提示",
content: "系统可能不会保存您所做的更改。",
okText: "离开",
cancelText: "取消",
onOk: function onOk() {
toNext();
}
});
} else {
toNext();
}
};
return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
className: "challenge-nav",
children: isEdit ? navs.map(function (item, index) {
if (activeIndex === index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
className: "active",
children: item.name
}), " "]
}, item.url);
} else {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
onClick: function onClick() {
return handleClick(item.url);
},
children: item.name
}), " "]
}, item.url);
}
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
className: "active",
children: navs[0].name
}), " "]
}, navs[0].url)
});
};
/* harmony default export */ var challenge_nav = ((0,_umi_production_exports.connect)(function (_ref2) {
var globalSetting = _ref2.globalSetting,
practiceSetting = _ref2.practiceSetting;
return {
globalSetting: globalSetting,
practiceSetting: practiceSetting
};
})(ChallengeNav));
/***/ }),
/***/ 58194:
/*!***********************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/Loading/index.tsx + 1 modules ***!
\***********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ components_Loading; }
});
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(57953);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/components/Loading/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Loadingmodules = ({"loading":"loading___lueiN"});
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/components/Loading/index.tsx
var Loading = function Loading(_ref) {
var loading = _ref.loading;
return loading ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Loadingmodules.loading,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {});
};
/* harmony default export */ var components_Loading = (Loading);
/***/ }),
/***/ 81643:
/*!**********************************************************!*\
!*** ./node_modules/antd/es/_util/getRenderPropValue.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ getRenderPropValue; }
/* harmony export */ });
const getRenderPropValue = propValue => {
if (!propValue) {
return null;
}
if (typeof propValue === 'function') {
return propValue();
}
return propValue;
};
/***/ }),
/***/ 57838:
/*!************************************************************!*\
!*** ./node_modules/antd/es/_util/hooks/useForceUpdate.js ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ useForceUpdate; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
function useForceUpdate() {
const [, forceUpdate] = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(x => x + 1, 0);
return forceUpdate;
}
/***/ }),
/***/ 84567:
/*!************************************************************!*\
!*** ./node_modules/antd/es/checkbox/index.js + 3 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ es_checkbox; }
});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js + 5 modules
var es = __webpack_require__(95860);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
var config_provider_context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(98866);
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
var context = __webpack_require__(65223);
;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/GroupContext.js
const GroupContext = /*#__PURE__*/react.createContext(null);
/* harmony default export */ var checkbox_GroupContext = (GroupContext);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js
var checkbox_style = __webpack_require__(63185);
;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Checkbox.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const InternalCheckbox = (props, ref) => {
var _a;
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
children,
indeterminate = false,
style,
onMouseEnter,
onMouseLeave,
skipGroup = false,
disabled
} = props,
restProps = __rest(props, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]);
const {
getPrefixCls,
direction,
checkbox
} = react.useContext(config_provider_context/* ConfigContext */.E_);
const checkboxGroup = react.useContext(checkbox_GroupContext);
const {
isFormItemInput
} = react.useContext(context/* FormItemInputContext */.aM);
const contextDisabled = react.useContext(DisabledContext/* default */.Z);
const mergedDisabled = (_a = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _a !== void 0 ? _a : contextDisabled;
const prevValue = react.useRef(restProps.value);
react.useEffect(() => {
checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);
false ? 0 : void 0;
}, []);
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]);
const prefixCls = getPrefixCls('checkbox', customizePrefixCls);
const [wrapSSR, hashId] = (0,checkbox_style/* default */.ZP)(prefixCls);
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, hashId);
const checkboxClass = classnames_default()({
[`${prefixCls}-indeterminate`]: indeterminate
}, hashId);
const ariaChecked = indeterminate ? 'mixed' : undefined;
return wrapSSR(
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/label-has-associated-control
react.createElement("label", {
className: classString,
style: Object.assign(Object.assign({}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.style), style),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave
}, /*#__PURE__*/react.createElement(es/* default */.Z, Object.assign({
"aria-checked": ariaChecked
}, checkboxProps, {
prefixCls: prefixCls,
className: checkboxClass,
disabled: mergedDisabled,
ref: ref
})), children !== undefined && /*#__PURE__*/react.createElement("span", null, children)));
};
const Checkbox = /*#__PURE__*/react.forwardRef(InternalCheckbox);
if (false) {}
/* harmony default export */ var checkbox_Checkbox = (Checkbox);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(74902);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js
var omit = __webpack_require__(10366);
;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Group.js
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 InternalGroup = (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
} = react.useContext(config_provider_context/* ConfigContext */.E_);
const [value, setValue] = react.useState(restProps.value || defaultValue || []);
const [registeredValues, setRegisteredValues] = react.useState([]);
react.useEffect(() => {
if ('value' in restProps) {
setValue(restProps.value || []);
}
}, [restProps.value]);
const memoOptions = 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 */.Z)(prevValues), [val]));
};
const toggleOption = option => {
const optionIndex = value.indexOf(option.value);
const newValue = (0,toConsumableArray/* default */.Z)(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 = memoOptions.findIndex(opt => opt.value === a);
const indexB = memoOptions.findIndex(opt => opt.value === b);
return indexA - indexB;
}));
};
const prefixCls = getPrefixCls('checkbox', customizePrefixCls);
const groupPrefixCls = `${prefixCls}-group`;
const [wrapSSR, hashId] = (0,checkbox_style/* default */.ZP)(prefixCls);
const domProps = (0,omit/* default */.Z)(restProps, ['value', 'disabled']);
const childrenNode = options.length ? memoOptions.map(option => /*#__PURE__*/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
}, option.label)) : children;
// eslint-disable-next-line react/jsx-no-constructed-context-values
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, hashId);
return wrapSSR( /*#__PURE__*/react.createElement("div", Object.assign({
className: classString,
style: style
}, domProps, {
ref: ref
}), /*#__PURE__*/react.createElement(checkbox_GroupContext.Provider, {
value: context
}, childrenNode)));
};
const CheckboxGroup = /*#__PURE__*/react.forwardRef(InternalGroup);
/* harmony default export */ var Group = (/*#__PURE__*/react.memo(CheckboxGroup));
;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/index.js
'use client';
const es_checkbox_Checkbox = checkbox_Checkbox;
es_checkbox_Checkbox.Group = Group;
es_checkbox_Checkbox.__ANT_CHECKBOX = true;
if (false) {}
/* harmony default export */ var es_checkbox = (es_checkbox_Checkbox);
/***/ }),
/***/ 63185:
/*!******************************************************!*\
!*** ./node_modules/antd/es/checkbox/style/index.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "C2": function() { return /* binding */ getStyle; }
/* harmony export */ });
/* unused harmony export genCheckboxStyle */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ 73559);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ 14747);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 45503);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 67968);
// ============================== Motion ==============================
const antCheckboxEffect = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antCheckboxEffect', {
'0%': {
transform: 'scale(1)',
opacity: 0.5
},
'100%': {
transform: 'scale(1.6)',
opacity: 0
}
});
// ============================== 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_1__/* .resetComponent */ .Wf)(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_1__/* .resetComponent */ .Wf)(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,
height: 14 // FIXME: magic
}
}
}),
// Wrapper > Checkbox
[checkboxCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .resetComponent */ .Wf)(token)), {
position: 'relative',
whiteSpace: 'nowrap',
lineHeight: 1,
cursor: 'pointer',
// 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_1__/* .genFocusOutline */ .oN)(token))
},
// Wrapper > Checkbox > inner
[`${checkboxCls}-inner`]: {
boxSizing: 'border-box',
position: 'relative',
top: 0,
insetInlineStart: 0,
display: 'block',
width: token.checkboxSize,
height: token.checkboxSize,
direction: 'ltr',
backgroundColor: token.colorBgContainer,
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadiusSM,
borderCollapse: 'separate',
transition: `all ${token.motionDurationSlow}`,
'&:after': {
boxSizing: 'border-box',
position: 'absolute',
top: '50%',
insetInlineStart: '21.5%',
display: 'table',
width: token.checkboxSize / 14 * 5,
height: token.checkboxSize / 14 * 8,
border: `${token.lineWidthBold}px 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
[`${wrapperCls}:hover ${checkboxCls}:after`]: {
visibility: 'visible'
},
// 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}`
}
},
// Checked Effect
'&:after': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: '100%',
height: '100%',
borderRadius: token.borderRadiusSM,
visibility: 'hidden',
border: `${token.lineWidthBold}px solid ${token.colorPrimary}`,
animationName: antCheckboxEffect,
animationDuration: token.motionDurationSlow,
animationTimingFunction: 'ease-in-out',
animationFillMode: 'backwards',
content: '""',
transition: `all ${token.motionDurationSlow}`
}
},
[`
${wrapperCls}-checked:not(${wrapperCls}-disabled),
${checkboxCls}-checked:not(${checkboxCls}-disabled)
`]: {
[`&:hover ${checkboxCls}-inner`]: {
backgroundColor: token.colorPrimaryHover,
borderColor: 'transparent'
},
[`&:hover ${checkboxCls}:after`]: {
borderColor: token.colorPrimaryHover
}
}
},
// ================= Indeterminate =================
{
[checkboxCls]: {
'&-indeterminate': {
// Wrapper > Checkbox > inner
[`${checkboxCls}-inner`]: {
backgroundColor: token.colorBgContainer,
borderColor: token.colorBorder,
'&:after': {
top: '50%',
insetInlineStart: '50%',
width: token.fontSizeLG / 2,
height: token.fontSizeLG / 2,
backgroundColor: token.colorPrimary,
border: 0,
transform: 'translate(-50%, -50%) scale(1)',
opacity: 1,
content: '""'
}
}
}
}
},
// ==================== 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__/* .merge */ .TS)(token, {
checkboxCls: `.${prefixCls}`,
checkboxSize: token.controlInteractiveSize
});
return [genCheckboxStyle(checkboxToken)];
}
/* harmony default export */ __webpack_exports__["ZP"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Checkbox', (token, _ref) => {
let {
prefixCls
} = _ref;
return [getStyle(prefixCls, token)];
}));
/***/ }),
/***/ 66330:
/*!***************************************************!*\
!*** ./node_modules/antd/es/popover/PurePanel.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* unused harmony exports getOverlay, RawPurePanel */
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tooltip */ 92419);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ 53124);
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 81643);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 20136);
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 getOverlay = (prefixCls, title, content) => {
if (!title && !content) return undefined;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
className: `${prefixCls}-title`
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
className: `${prefixCls}-inner-content`
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(content)));
};
const RawPurePanel = props => {
const {
hashId,
prefixCls,
className,
style,
placement = 'top',
title,
content,
children
} = props;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className),
style: style
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
className: `${prefixCls}-arrow`
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_tooltip__WEBPACK_IMPORTED_MODULE_1__/* .Popup */ .G, Object.assign({}, props, {
className: hashId,
prefixCls: prefixCls
}), children || getOverlay(prefixCls, title, content)));
};
const PurePanel = props => {
const {
prefixCls: customizePrefixCls
} = props,
restProps = __rest(props, ["prefixCls"]);
const {
getPrefixCls
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_4__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls('popover', customizePrefixCls);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(RawPurePanel, Object.assign({}, restProps, {
prefixCls: prefixCls,
hashId: hashId
})));
};
/* harmony default export */ __webpack_exports__["ZP"] = (PurePanel);
/***/ }),
/***/ 55241:
/*!***********************************************!*\
!*** ./node_modules/antd/es/popover/index.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 81643);
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/motion */ 33603);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 53124);
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tooltip */ 83062);
/* harmony import */ var _PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PurePanel */ 66330);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 20136);
'use client';
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;
};
// CSSINJS
const Overlay = _ref => {
let {
title,
content,
prefixCls
} = _ref;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
className: `${prefixCls}-title`
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
className: `${prefixCls}-inner-content`
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(content)));
};
const Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
title,
content,
overlayClassName,
placement = 'top',
trigger = 'hover',
mouseEnterDelay = 0.1,
mouseLeaveDelay = 0.1,
overlayStyle = {}
} = props,
otherProps = __rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle"]);
const {
getPrefixCls
} = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls('popover', customizePrefixCls);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(prefixCls);
const rootPrefixCls = getPrefixCls();
const overlayCls = classnames__WEBPACK_IMPORTED_MODULE_0___default()(overlayClassName, hashId);
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, Object.assign({
placement: placement,
trigger: trigger,
mouseEnterDelay: mouseEnterDelay,
mouseLeaveDelay: mouseLeaveDelay,
overlayStyle: overlayStyle
}, otherProps, {
prefixCls: prefixCls,
overlayClassName: overlayCls,
ref: ref,
overlay: title || content ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Overlay, {
prefixCls: prefixCls,
title: title,
content: content
}) : null,
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_6__/* .getTransitionName */ .mL)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
"data-popover-inject": true
})));
});
if (false) {}
Popover._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP;
/* harmony default export */ __webpack_exports__["Z"] = (Popover);
/***/ }),
/***/ 20136:
/*!*****************************************************!*\
!*** ./node_modules/antd/es/popover/style/index.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 14747);
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ 50438);
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/placementArrow */ 97414);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 8796);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 67968);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ 45503);
const genBaseStyle = token => {
const {
componentCls,
popoverColor,
minWidth,
fontWeightStrong,
popoverPadding,
boxShadowSecondary,
colorTextHeading,
borderRadiusLG: borderRadius,
zIndexPopup,
marginXS,
colorBgElevated,
popoverBg
} = token;
return [{
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(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',
transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,
'--antd-arrow-background-color': colorBgElevated,
'&-rtl': {
direction: 'rtl'
},
'&-hidden': {
display: 'none'
},
[`${componentCls}-content`]: {
position: 'relative'
},
[`${componentCls}-inner`]: {
backgroundColor: popoverBg,
backgroundClip: 'padding-box',
borderRadius,
boxShadow: boxShadowSecondary,
padding: popoverPadding
},
[`${componentCls}-title`]: {
minWidth,
marginBottom: marginXS,
color: colorTextHeading,
fontWeight: fontWeightStrong
},
[`${componentCls}-inner-content`]: {
color: popoverColor
}
})
},
// Arrow Style
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(token, {
colorBg: '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 */ .i.map(colorKey => {
const lightColor = token[`${colorKey}6`];
return {
[`&${componentCls}-${colorKey}`]: {
'--antd-arrow-background-color': lightColor,
[`${componentCls}-inner`]: {
backgroundColor: lightColor
},
[`${componentCls}-arrow`]: {
background: 'transparent'
}
}
};
})
};
};
const genWireframeStyle = token => {
const {
componentCls,
lineWidth,
lineType,
colorSplit,
paddingSM,
controlHeight,
fontSize,
lineHeight,
padding
} = token;
const titlePaddingBlockDist = controlHeight - Math.round(fontSize * lineHeight);
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
const popoverPaddingHorizontal = padding;
return {
[componentCls]: {
[`${componentCls}-inner`]: {
padding: 0
},
[`${componentCls}-title`]: {
margin: 0,
padding: `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px`,
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`
},
[`${componentCls}-inner-content`]: {
padding: `${paddingSM}px ${popoverPaddingHorizontal}px`
}
}
};
};
/* harmony default export */ __webpack_exports__["Z"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Popover', token => {
const {
colorBgElevated,
colorText,
wireframe
} = token;
const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__/* .merge */ .TS)(token, {
popoverPadding: 12,
popoverBg: colorBgElevated,
popoverColor: colorText
});
return [genBaseStyle(popoverToken), genColorStyle(popoverToken), wireframe && genWireframeStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__/* .initZoomMotion */ ._y)(popoverToken, 'zoom-big')];
}, token => ({
width: 177,
minWidth: 177,
zIndexPopup: token.zIndexPopupBase + 30
}), {
deprecatedTokens: [['width', 'minWidth']]
}));
/***/ }),
/***/ 33507:
/*!*******************************************************!*\
!*** ./node_modules/antd/es/style/motion/collapse.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
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__["Z"] = (genCollapseMotion);
/***/ }),
/***/ 25934:
/*!**************************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ esm_browser_v4; }
});
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
// find the complete implementation of crypto (msCrypto) on IE11.
var getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
var rnds8 = new Uint8Array(16);
function rng() {
if (!getRandomValues) {
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
}
return getRandomValues(rnds8);
}
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js
/* harmony default export */ var regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js
function validate(uuid) {
return typeof uuid === 'string' && regex.test(uuid);
}
/* harmony default export */ var esm_browser_validate = (validate);
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
byteToHex.push((i + 0x100).toString(16).substr(1));
}
function stringify(arr) {
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
if (!esm_browser_validate(uuid)) {
throw TypeError('Stringified UUID is invalid');
}
return uuid;
}
/* harmony default export */ var esm_browser_stringify = (stringify);
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js
function v4(options, buf, offset) {
options = options || {};
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = rnds[6] & 0x0f | 0x40;
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
if (buf) {
offset = offset || 0;
for (var i = 0; i < 16; ++i) {
buf[offset + i] = rnds[i];
}
return buf;
}
return esm_browser_stringify(rnds);
}
/* harmony default export */ var esm_browser_v4 = (v4);
/***/ })
}]);