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__Problems__OjForm__NewEdi...

7332 lines
309 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self["webpackChunk"] = self["webpackChunk"] || []).push([[34741,4977,66390],{
/***/ 11475:
/*!******************************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
\******************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_ExclamationCircleOutlined; }
});
// 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/ExclamationCircleOutlined.js
// This icon file is generated automatically.
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
// 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/ExclamationCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ExclamationCircleOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined));
/***/ }),
/***/ 99611:
/*!****************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
\****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_EyeOutlined; }
});
// 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/EyeOutlined.js
// This icon file is generated automatically.
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
// 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/EyeOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_EyeOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/react.forwardRef(EyeOutlined_EyeOutlined));
/***/ }),
/***/ 3089:
/*!************************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules ***!
\************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_MinusCircleOutlined; }
});
// 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/MinusCircleOutlined.js
// This icon file is generated automatically.
var MinusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "minus-circle", "theme": "outlined" };
/* harmony default export */ var asn_MinusCircleOutlined = (MinusCircleOutlined);
// 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/MinusCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var MinusCircleOutlined_MinusCircleOutlined = function MinusCircleOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_MinusCircleOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_MinusCircleOutlined = (/*#__PURE__*/react.forwardRef(MinusCircleOutlined_MinusCircleOutlined));
/***/ }),
/***/ 64789:
/*!***********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules ***!
\***********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_PlusCircleOutlined; }
});
// 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/PlusCircleOutlined.js
// This icon file is generated automatically.
var PlusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "plus-circle", "theme": "outlined" };
/* harmony default export */ var asn_PlusCircleOutlined = (PlusCircleOutlined);
// 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/PlusCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusCircleOutlined_PlusCircleOutlined = function PlusCircleOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_PlusCircleOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_PlusCircleOutlined = (/*#__PURE__*/react.forwardRef(PlusCircleOutlined_PlusCircleOutlined));
/***/ }),
/***/ 96403:
/*!*********************************!*\
!*** ./src/pages/tasks/util.js ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Ax": function() { return /* binding */ processTreeData; },
/* harmony export */ "Ds": function() { return /* binding */ debounce; },
/* harmony export */ "KI": function() { return /* binding */ apiPref; },
/* harmony export */ "SI": function() { return /* binding */ getTreeData; },
/* harmony export */ "f1": function() { return /* binding */ isCompileOk; }
/* harmony export */ });
/* unused harmony export isProd */
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/env */ 59758);
function isCompileOk(rs) {
var flag = true;
if (rs.length > 0) {
for (var i = 0; i < rs.length; i++) {
if (rs[i].compile_success == 0 || !rs[i].compile_success) {
flag = false;
break;
}
}
} else {
flag = false;
}
return flag;
}
function getTreeData(data) {
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var result = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
var key = parentKey ? "".concat(parentKey, "/").concat(item.name) : "".concat(item.name);
result.push({
title: item.name,
isLeaf: item.type === 'tree' ? false : true,
key: key
});
}
return result;
}
function processTreeData(repos, key, newData) {
for (var i = 0; i < repos.length; i++) {
var item = repos[i];
if (item.key === key) {
item.children = newData;
break;
}
if (item.children) {
processTreeData(item.children, key, newData);
}
}
return repos;
}
function debounce(func, wait, immediate) {
var timeout;
return function () {
var context = this,
args = arguments;
var later = function later() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
}
var isProd = true;
var apiPref = _utils_env__WEBPACK_IMPORTED_MODULE_0__/* ["default"].API_SERVER */ .Z.API_SERVER;
// export const isProd =
// window.location.href.indexOf('test-') > 0 ||
// window.location.href.indexOf('localhost') > 0
// ? false
// : true;
// export const apiPref = isProd
// ? 'https://www.educoder.net'
// : 'https://test-newweb.educoder.net';
/***/ }),
/***/ 19424:
/*!*********************************************************!*\
!*** ./src/components/FolderTree/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ FolderTree; }
});
// 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/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// 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: ./node_modules/antd/es/tree/index.js + 35 modules
var tree = __webpack_require__(282);
;// CONCATENATED MODULE: ./src/components/FolderTree/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var FolderTreemodules = ({"folderWrapper":"folderWrapper___G__0a","folderIcon":"folderIcon___oTG6c"});
// EXTERNAL MODULE: ./src/assets/images/problemset/folder-closed.png
var folder_closed = __webpack_require__(73631);
// EXTERNAL MODULE: ./src/assets/images/problemset/folder-opened.png
var folder_opened = __webpack_require__(5623);
// EXTERNAL MODULE: ./src/service/problemset.ts
var problemset = __webpack_require__(75968);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/FolderTree/index.tsx
var NewFolder = function NewFolder(_ref) {
var value = _ref.value,
onChange = _ref.onChange,
scrollId = _ref.scrollId;
var _useState = (0,react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
treeData = _useState2[0],
setTreeData = _useState2[1];
(0,react.useEffect)(function () {
getData();
}, []);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, item;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,problemset/* getPaperList */.NZ)({});
case 2:
res = _context.sent;
if (res !== null && res !== void 0 && res.data) {
item = [{
title: '根目录',
value: 0,
key: 0,
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: folder_closed,
className: FolderTreemodules.folderIcon
}),
isLeaf: false,
children: generateChildren(res.data || [])
}];
setTreeData(item);
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var generateChildren = function generateChildren(data) {
return data.map(function (item) {
return {
title: item.name,
key: item.group_id,
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: folder_closed,
className: FolderTreemodules.folderIcon
}),
isLeaf: item.children.length === 0,
children: generateChildren(item.children)
};
});
};
var updateTreeData = function updateTreeData(list, key, changePart) {
return list.map(function (node) {
if (node.key === key) {
return objectSpread2_default()(objectSpread2_default()({}, node), changePart);
}
if (node.children) {
return objectSpread2_default()(objectSpread2_default()({}, node), {}, {
children: updateTreeData(node.children, key, changePart)
});
}
return node;
});
};
var changeNodeIcon = function changeNodeIcon(list, key, open) {
return list.map(function (node) {
if (node.key === key) {
return objectSpread2_default()(objectSpread2_default()({}, node), {}, {
icon: open ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: folder_opened,
className: FolderTreemodules.folderIcon
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: folder_closed,
className: FolderTreemodules.folderIcon
})
});
}
if (node.children) {
return objectSpread2_default()(objectSpread2_default()({}, node), {}, {
children: changeNodeIcon(node.children, key, open)
});
}
});
};
var onExpand = function onExpand(expandedKeys, info) {
setTreeData(function (originData) {
return changeNodeIcon(originData, info.node.key, info.expanded);
});
};
var params = value ? {
selectedKeys: value,
defaultExpandedKeys: value
} : {};
return treeData.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
id: scrollId || '',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree/* default */.Z, objectSpread2_default()({
showLine: {
showLeafIcon: false
},
showIcon: true,
treeData: treeData,
className: FolderTreemodules.folderWrapper,
onSelect: onChange,
onExpand: onExpand
}, params))
});
};
/* harmony default export */ var FolderTree = (NewFolder);
/***/ }),
/***/ 73221:
/*!********************************************************!*\
!*** ./src/components/Knowledge/index.tsx + 1 modules ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"N": function() { return /* binding */ Knowledge; }
});
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// 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/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: ./node_modules/antd/es/select/index.js + 42 modules
var es_select = __webpack_require__(79035);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 39 modules
var modal = __webpack_require__(72423);
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
var row = __webpack_require__(71230);
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
var col = __webpack_require__(15746);
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
var input = __webpack_require__(79531);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 4 modules
var message = __webpack_require__(2453);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(84519);
;// CONCATENATED MODULE: ./src/components/Knowledge/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Knowledgemodules = ({"wrap":"wrap___F7E3F","selectWrapper":"selectWrapper____kESB","tips":"tips___aHjQY","linkBtn":"linkBtn___uggVr","mainText":"mainText____S1I0"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
var ExclamationCircleOutlined = __webpack_require__(11475);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/Knowledge/index.tsx
var Option = es_select/* default.Option */.Z.Option;
var Knowledge = function Knowledge(_ref) {
var subId = _ref.subId,
value = _ref.value,
selectvalues = _ref.selectvalues,
disabled = _ref.disabled,
_ref$knowledgeOptions = _ref.knowledgeOptions,
knowledgeOptions = _ref$knowledgeOptions === void 0 ? [] : _ref$knowledgeOptions,
_ref$onChange = _ref.onChange,
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
_ref$onAddKnowledgeFi = _ref.onAddKnowledgeFinish,
onAddKnowledgeFinish = _ref$onAddKnowledgeFi === void 0 ? function () {} : _ref$onAddKnowledgeFi;
var addValue = (0,react.useRef)();
var _useState = (0,react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
values = _useState2[0],
setValues = _useState2[1];
value = value || [];
var handleChange = function handleChange(e, valuesmap) {
if (e) {
//获取选中的数据
setValues([valuesmap.key]);
onChange([valuesmap.key]);
} else {
//获取选中的数据
setValues([]);
onChange([]);
}
};
(0,react.useEffect)(function () {
if ((selectvalues === null || selectvalues === void 0 ? void 0 : selectvalues.length) > 0) {
setValues(toConsumableArray_default()(selectvalues));
onChange(toConsumableArray_default()(selectvalues));
}
}, [knowledgeOptions]);
(0,react.useEffect)(function () {
var _value;
if (((_value = value) === null || _value === void 0 ? void 0 : _value.length) > 0) {
onChange(toConsumableArray_default()(value));
}
}, [knowledgeOptions]);
var handleAdd = function handleAdd(e) {
e.preventDefault();
addValue.current = '';
modal/* default.confirm */.Z.confirm({
centered: true,
width: 640,
okText: '确定',
cancelText: '取消',
icon: null,
title: '新建知识点',
className: 'custom-modal-divider',
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "font14",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
style: {
color: '#FF8C29'
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: "ml10 ".concat(Knowledgemodules.mainText),
children: ["\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
maxLength: 20,
size: 'middle',
showCount: true,
placeholder: "\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0",
defaultValue: addValue.current,
onChange: function onChange(e) {
addValue.current = e.target.value;
}
})]
}),
onOk: function onOk() {
return new Promise( /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(resolve, reject) {
var res, _value2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (addValue.current) {
_context.next = 3;
break;
}
message/* default.warning */.ZP.warning("请输入知识点名称");
return _context.abrupt("return", reject());
case 3:
if (!(addValue.current.length > 20)) {
_context.next = 6;
break;
}
message/* default.warning */.ZP.warning("请输入不超过20字的知识点名称");
return _context.abrupt("return", reject());
case 6:
_context.next = 8;
return (0,fetch/* default */.ZP)("/api/tag_disciplines.json", {
method: 'post',
body: {
name: addValue.current,
sub_discipline_id: subId
}
});
case 8:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
onAddKnowledgeFinish({
id: res.tag_discipline_id,
name: addValue.current,
type: 'personal'
});
// values.push(res.tag_discipline_id)
// value.push(res.tag_discipline_id)
_value2 = [];
_value2.push(res.tag_discipline_id);
onChange([].concat(_value2));
setValues([res.tag_discipline_id]);
onChange([].concat(_value2));
}
return _context.abrupt("return", resolve());
case 11:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x, _x2) {
return _ref2.apply(this, arguments);
};
}());
}
});
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
wrap: false,
align: "middle",
className: Knowledgemodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default */.Z, {
disabled: !subId || disabled,
className: Knowledgemodules.selectWrapper,
placeholder: "\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9",
onChange: handleChange,
style: {
width: 490
},
showSearch: true,
allowClear: true,
value: knowledgeOptions === null || knowledgeOptions === void 0 ? void 0 : knowledgeOptions.filter(function (item) {
return (values === null || values === void 0 ? void 0 : values.includes(item === null || item === void 0 ? void 0 : item.id)) || (values === null || values === void 0 ? void 0 : values.includes((item === null || item === void 0 ? void 0 : item.id) + ''));
}).map(function (item) {
return item.name;
}),
children: knowledgeOptions === null || knowledgeOptions === void 0 ? void 0 : knowledgeOptions.map(function (item) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: item.name,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis"
},
children: item.name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: item.type === 'personal' ? '(自用)' : ''
})]
})
}, item.id);
})
})
}), subId && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: "ml20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Knowledgemodules.tips,
children: "\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Knowledgemodules.linkBtn,
onClick: handleAdd,
children: "\u65B0\u5EFA\u77E5\u8BC6\u70B9"
})]
})]
});
};
/***/ }),
/***/ 95293:
/*!**********************************************************!*\
!*** ./src/components/QuestionEditor/MdEditorInForm.tsx ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "h": function() { return /* binding */ MdEditorInForm; },
/* harmony export */ "x": function() { return /* binding */ RegularInput; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js */ 70215);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_markdown_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/markdown-editor */ 55373);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less?modules */ 52654);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/RenderHtml */ 12768);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
var _excluded = ["value", "onChange", "scrollId"];
var MdEditorInForm = function MdEditorInForm(_ref) {
var value = _ref.value,
_onChange = _ref.onChange,
scrollId = _ref.scrollId,
props = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1___default()(_ref, _excluded);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
id: scrollId || '',
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_markdown_editor__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
defaultValue: value,
onChange: function onChange(a, b) {
console.log("a:", a, b);
if (!!(b !== null && b !== void 0 && b.length)) _onChange(a, b);else _onChange(a);
}
}))
});
};
var RegularInput = function RegularInput(_ref2) {
var value = _ref2.value,
onChange = _ref2.onChange,
placeholder = _ref2.placeholder,
_ref2$height = _ref2.height,
height = _ref2$height === void 0 ? 140 : _ref2$height,
isEdit = _ref2.isEdit;
return isEdit ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_markdown_editor__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
watch: true,
isFocus: true,
height: height,
placeholder: placeholder,
defaultValue: value,
onChange: onChange
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
style: {
cursor: 'pointer'
},
children: value ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"].inputBorder */ .Z.inputBorder,
value: value
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"].inputBorder */ .Z.inputBorder, " ").concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"].placeholder */ .Z.placeholder),
children: placeholder
})
});
};
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// 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/toConsumableArray.js
var toConsumableArray = __webpack_require__(861);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
var createForOfIteratorHelper = __webpack_require__(74704);
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
// 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: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules
var v4 = __webpack_require__(25934);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var ADD_MULTI = '@▁▁@';
var ADD_SINGLE = '@▁@';
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev,
highlightKeywords = _ref.highlightKeywords,
showProgramFill = _ref.showProgramFill,
isProgramFill = _ref.isProgramFill,
_ref$disabledFill = _ref.disabledFill,
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
programFillValue = _ref.programFillValue,
_ref$onFillChange = _ref.onFillChange,
onFillChange = _ref$onFillChange === void 0 ? function (value) {} : _ref$onFillChange,
_ref$onFillBlur = _ref.onFillBlur,
onFillBlur = _ref$onFillBlur === void 0 ? function () {} : _ref$onFillBlur;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var _useState5 = (0,react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
projectValue = _useState6[0],
setProjectValue = _useState6[1];
var classNamesRef = (0,react.useRef)("a" + (0,v4/* default */.Z)());
var formObj = {};
var createInput = function createInput(a, num) {
// const wrap = document.createElement("span")
// wrap.className =
var input = document.createElement(a === ADD_SINGLE ? "input" : "textarea");
input.style.width = "100%";
input.style.height = a === ADD_SINGLE ? "40px" : "151px";
input.rows = 5;
input.spellcheck = false;
input.name = "edu-program-fill";
input.placeholder = "请输入";
input.dataset.id = num;
var key = Object.keys(formObj).length;
formObj[key] = input;
return "<span class=\"edu-program-fill-wrap ".concat(a === ADD_SINGLE ? "" : "show", "\" style=\"width:").concat(a === ADD_SINGLE ? "200px" : "100%", "\"><span>").concat(input.outerHTML, "<span class=\"edu-program-fill-score\"></span></span></span>");
};
var formatMD = function formatMD(rs) {
return rs.replace(/<style.*?>([\s\S]+?)<\/style>/gim, function (_, css) {
var _css = css.replace(/(\n|\r)/g, "").split("}");
var arr = [];
_css.map(function (item) {
if (item != '') {
arr.push(".".concat(classNamesRef.current, " ").concat(item));
}
});
return "<style>".concat(arr.join("}"), "</style>");
});
};
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
if (showProgramFill) {
var num = -1;
str = str.replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
++num;
return createInput(a, num);
});
return "<pre style=\"background:#fff;padding:4px\">".concat(formatMD(str || ""), "</pre>");
}
var rs = utils_marked(str);
rs = formatMD(rs);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
var dom = document.createElement('div');
dom.innerHTML = rs;
if (highlightKeywords) {
var escapedKeywords = highlightKeywords.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
findKeyword(dom, escapedKeywords);
return dom.innerHTML;
}
if (showTextOnly) {
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
console.log("dom.innerHTML:", dom.innerHTML);
return dom.innerHTML;
}, [str, highlightKeywords]);
(0,react.useEffect)(function () {
if (el.current) {
var inputs = el.current.querySelectorAll(["input", "textarea"]);
inputs.forEach(function (input) {
input.oninput = onInput;
input.onblur = onBlur;
});
}
}, [projectValue]);
(0,react.useEffect)(function () {
if (!!(programFillValue !== null && programFillValue !== void 0 && programFillValue.length)) {
var scoreDom = el.current.querySelectorAll(".edu-program-fill-score");
var dom = el.current.querySelectorAll('[name="edu-program-fill"]');
var _iterator = createForOfIteratorHelper_default()(dom.entries()),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var _programFillValue$k;
var _step$value = slicedToArray_default()(_step.value, 2),
k = _step$value[0],
i = _step$value[1];
i.value = (_programFillValue$k = programFillValue[k]) === null || _programFillValue$k === void 0 ? void 0 : _programFillValue$k.value;
if (programFillValue[k].type === "warning") {
i.className = "program-fill-warning";
} else if (programFillValue[k].type === "success") {
i.className = "program-fill-success";
} else {
i.className = "";
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
var _iterator2 = createForOfIteratorHelper_default()(scoreDom.entries()),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var _programFillValue$_k, _programFillValue$_k2;
var _step2$value = slicedToArray_default()(_step2.value, 2),
_k = _step2$value[0],
_i = _step2$value[1];
_i.innerHTML = (_programFillValue$_k = programFillValue[_k]) !== null && _programFillValue$_k !== void 0 && _programFillValue$_k.score ? "".concat((_programFillValue$_k2 = programFillValue[_k]) === null || _programFillValue$_k2 === void 0 ? void 0 : _programFillValue$_k2.score, "\u5206") : "";
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
setProjectValue(programFillValue);
}
}, [programFillValue]);
var onInput = function onInput(e) {
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
projectValue[e.target.dataset.id]["value"] = e.target.value;
setProjectValue(toConsumableArray_default()(projectValue));
onFillChange(projectValue, e.target.dataset.id);
};
var onBlur = function onBlur(e) {
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
projectValue[e.target.dataset.id]["value"] = e.target.value;
setProjectValue(toConsumableArray_default()(projectValue));
onFillBlur(projectValue, e.target.dataset.id);
};
function findKeyword(node, keyword) {
return node.childNodes.forEach(function (childNode) {
if (childNode.childNodes.length > 0) {
findKeyword(childNode, keyword);
} else if (childNode.nodeName !== "IMG") {
if (childNode.innerHTML) {
var _childNode$innerHTML;
childNode.innerHTML = (_childNode$innerHTML = childNode.innerHTML) === null || _childNode$innerHTML === void 0 ? void 0 : _childNode$innerHTML.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
} else {
var dom = document.createElement("span");
dom.innerHTML = childNode.textContent.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
childNode.replaceWith(dom);
}
}
});
// return dom.childNodes.forEach((node:any) => {
// console.log("nodeLen:",node.childNodes.length)
// if(node.childNodes.length > 0){
// debugger
// // findKeyword(dom.childNodes,keyword)
// }else{
// if(node.nodeName !== "#text"){
// node.innerHTML = node.innerHTML.replaceAll(keyword,`<span class="c-blue">${keyword}</span>`)
// console.log("node:",node,dom,node.nodeName,node.innerHTML,node.childNodes.length)
// debugger
// }
// }
// return node
// });
}
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
children: html
}), !showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " ").concat(disabledFill ? "disabled-fill" : "", " markdown-body ").concat(classNamesRef.current),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 97501:
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "h": function() { return /* binding */ MyCodeMirror; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 79035);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 25159);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 71577);
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! codemirror */ 4631);
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(codemirror__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ 71749);
/* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! codemirror/theme/blackboard.css */ 30483);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
var Option = antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"].Option */ .Z.Option;
//https://github.com/codemirror/CodeMirror/issues/4838
var formItemLayout = {
labelCol: {
span: 4
},
wrapperCol: {
span: 20
}
};
var LanguageDesc = {
asp: ['ASP', 'vbscript'],
actionscript: ['ActionScript(3.0)/Flash/Flex', 'clike'],
bash: ['Bash/Bat', 'shell'],
css: ['CSS', 'css'],
c: ['C', 'clike'],
cpp: ['C++', 'clike'],
csharp: ['C#', 'clike'],
coffeescript: ['CoffeeScript', 'coffeescript'],
d: ['D', 'd'],
dart: ['Dart', 'dart'],
delphi: ['Delphi/Pascal', 'pascal'],
erlang: ['Erlang', 'erlang'],
go: ['Golang', 'go'],
groovy: ['Groovy', 'groovy'],
html: ['HTML', 'text/html'],
java: ['Java', 'clike'],
json: ['JSON', 'text/json'],
javascript: ['Javascript', 'javascript'],
lua: ['Lua', 'lua'],
less: ['LESS', 'css'],
markdown: ['Markdown', 'gfm'],
'objective-c': ['Objective-C', 'clike'],
php: ['PHP', 'php'],
perl: ['Perl', 'perl'],
python: ['Python', 'python'],
r: ['R', 'r'],
rst: ['reStructedText', 'rst'],
ruby: ['Ruby', 'ruby'],
sql: ['SQL', 'sql'],
sass: ['SASS/SCSS', 'sass'],
shell: ['Shell', 'shell'],
scala: ['Scala', 'clike'],
swift: ['Swift', 'clike'],
vb: ['VB/VBScript', 'vb'],
xml: ['XML', 'text/xml'],
yaml: ['YAML', 'yaml']
};
/* harmony default export */ __webpack_exports__["Z"] = (function (_ref) {
var callback = _ref.callback,
onCancel = _ref.onCancel;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)('python'),
_useState2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
mode = _useState2[0],
setMode = _useState2[1];
function onSetMode(value) {
setMode(LanguageDesc[value][1]);
}
function onSubmit(values) {
callback(values);
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, formItemLayout), {}, {
className: "code-block-panel",
initialValues: {
language: 'python',
content: ''
},
onFinish: onSubmit,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"].Item */ .Z.Item, {
label: "\u4EE3\u7801\u8BED\u8A00",
name: "language",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
getPopupContainer: function getPopupContainer(trigger) {
return trigger.parentNode;
},
onChange: onSetMode,
children: Object.keys(LanguageDesc).map(function (item) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Option, {
value: item,
children: LanguageDesc[item][0]
}, item);
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"].Item */ .Z.Item, {
label: "\u4EE3\u7801\u5185\u5BB9",
name: "content",
rules: [{
required: true,
message: '请输入代码内容'
}],
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(MyCodeMirror, {
mode: mode
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", {
className: "flex-container flex-end",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
type: "primary",
htmlType: "submit",
style: {
marginRight: 10
},
children: "\u786E\u5B9A"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
type: "ghost",
onClick: onCancel,
children: "\u53D6\u6D88"
})]
})]
}));
});
function MyCodeMirror(_ref2) {
var value = _ref2.value,
onChange = _ref2.onChange,
mode = _ref2.mode,
_ref2$options = _ref2.options,
options = _ref2$options === void 0 ? {} : _ref2$options;
var el = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),
_useState4 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),
cm = _useState4[0],
setCm = _useState4[1];
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
if (cm) {
var onChangeHandler = function onChangeHandler(cm) {
var content = cm.getValue();
onChange && onChange(content);
};
cm.on('change', onChangeHandler);
return function () {
cm.off('change', onChangeHandler);
};
}
}, [cm, onChange]);
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
if (cm) {
cm.setOption('mode', mode);
}
}, [cm, mode]);
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
if (cm) {
if (value !== cm.getValue() || value === '') {
setTimeout(function () {
cm.setValue(value || '');
}, 300);
}
}
}, [cm, value]);
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
if (el.current && !cm) {
var instance = codemirror__WEBPACK_IMPORTED_MODULE_3___default().fromTextArea(el.current, _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
mode: mode,
lineNumbers: true,
lineWrapping: true,
autoCloseBrackets: true,
tabSize: 4,
autofocus: true,
autoCloseTags: true,
matchBrackets: true,
styleActiveLine: true
}, options));
setCm(instance);
}
}, [el.current, cm]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
className: "my-codemirror-container",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("textarea", {
ref: el
})
});
}
/***/ }),
/***/ 55373:
/*!***************************************************************!*\
!*** ./src/components/markdown-editor/index.tsx + 10 modules ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ markdown_editor; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
var createForOfIteratorHelper = __webpack_require__(74704);
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
// 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/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/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__(38416);
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/codemirror/lib/codemirror.js
var codemirror = __webpack_require__(4631);
var codemirror_default = /*#__PURE__*/__webpack_require__.n(codemirror);
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
var ResizeObserver_es = __webpack_require__(91033);
// EXTERNAL MODULE: ./node_modules/codemirror/lib/codemirror.css
var lib_codemirror = __webpack_require__(71749);
// EXTERNAL MODULE: ./node_modules/codemirror/addon/edit/closetag.js
var closetag = __webpack_require__(57341);
// EXTERNAL MODULE: ./node_modules/codemirror/addon/edit/closebrackets.js
var closebrackets = __webpack_require__(82801);
// EXTERNAL MODULE: ./node_modules/codemirror/addon/display/placeholder.js
var placeholder = __webpack_require__(88386);
// EXTERNAL MODULE: ./node_modules/codemirror/mode/markdown/markdown.js
var markdown = __webpack_require__(49047);
// EXTERNAL MODULE: ./node_modules/codemirror/mode/stex/stex.js
var stex = __webpack_require__(80785);
;// CONCATENATED MODULE: ./src/components/markdown-editor/index.less
// extracted by mini-css-extract-plugin
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
var RenderHtml = __webpack_require__(12768);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/stex.tsx
// const latexjs = require('latex-l.js/dist/latex.js');
// import "latex-l.js/dist/css/base.css"
/* harmony default export */ var RenderHtml_stex = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style;
var html = (0,react.useMemo)(function () {
// try {
// const latex = value || 'This is some text';
// let generator = new latexjs.default.HtmlGenerator({ hyphenate: true })
// let doc = latexjs.default.parse(latex, { generator: generator }).htmlDocument()
// return doc.body.innerHTML
// }catch(e){
// console.log("e:",e)
// return "错误的latex语法请检查"
// }
return "";
}, [value]);
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
dangerouslySetInnerHTML: {
__html: html
}
})
});
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
;// CONCATENATED MODULE: ./src/components/markdown-editor/toolbar/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./src/components/markdown-editor/css/iconfont.css
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./src/components/markdown-editor/toolbar/index.tsx
var DEFAULTICONS = [{
title: '粗体',
icon: 'icon-bold',
actionName: 'bold'
}, {
title: '斜体',
icon: 'icon-italic',
actionName: 'italic'
}, '|', {
title: '无序列表',
icon: 'icon-unorder-list',
actionName: 'list-ul'
}, {
title: '有序列表',
icon: 'icon-order-list',
actionName: 'list-ol'
}, '|', {
title: '行内代码',
icon: 'icon-code',
actionName: 'code'
}, {
title: '代码块(多语言风格)',
icon: 'icon-file-code',
actionName: 'code-block'
}, {
title: '链接',
icon: 'icon-link',
actionName: 'link'
}, '|', {
title: '行内公式',
icon: 'icon-sum',
actionName: 'inline-latex'
}, {
title: '多行公式',
icon: 'icon-formula',
actionName: 'latex'
}, '|', {
title: '添加图片',
icon: 'icon-picture',
actionName: 'upload-image'
}, {
title: '表格',
icon: 'icon-table',
actionName: 'add-table'
}, '|', {
title: '换行',
icon: 'icon-minus',
actionName: 'line-break'
}, {
title: '清空',
icon: 'icon-eraser',
actionName: 'eraser'
}];
function AButton(_ref) {
var onActionCallback = _ref.onActionCallback,
title = _ref.title,
icon = _ref.icon,
actionName = _ref.actionName,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className,
children = _ref.children;
function onAction() {
onActionCallback(actionName);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
title: title,
className: className,
onClick: onAction,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "md-iconfont ".concat(icon)
}), children]
});
}
/* harmony default export */ var toolbar = (function (_ref2) {
var watch = _ref2.watch,
showNullButton = _ref2.showNullButton,
showNullProgramButton = _ref2.showNullProgramButton,
onActionCallback = _ref2.onActionCallback,
fullScreen = _ref2.fullScreen,
insertTemp = _ref2.insertTemp,
hidetoolBar = _ref2.hidetoolBar;
var icons = [].concat(DEFAULTICONS, [{
title: "".concat(watch ? '关闭实时预览' : '开启实时预览'),
icon: "".concat(watch ? 'icon-eye-slash' : 'icon-eye'),
actionName: 'trigger-watch'
}]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
className: "markdown-toolbar-container",
children: [!hidetoolBar && icons.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
children: item.actionName ? /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, objectSpread2_default()(objectSpread2_default()({}, item), {}, {
onActionCallback: onActionCallback
})) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "v-line"
})
}, index);
}), showNullButton ? /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
icon: "icon-edit insert-blank",
className: "btn-null",
title: "\u589E\u52A0\u586B\u7A7A",
actionName: "add-null-ch",
onActionCallback: onActionCallback,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "fill-tip",
children: "\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"
})
})
}) : null, showNullProgramButton ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
icon: "icon-edit insert-blank",
className: "btn-null",
title: "\u589E\u52A0\u586B\u7A7A",
actionName: "add-signal",
onActionCallback: onActionCallback,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "fill-tip",
children: "\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
icon: "icon-uniE900 insert-blank",
className: "btn-null",
title: "\u589E\u52A0\u586B\u7A7A",
actionName: "add-multiple",
onActionCallback: onActionCallback,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "fill-tip",
children: "\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879"
})
})
})]
}) : null, insertTemp && /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
icon: "icon-edit",
className: "btn-null",
title: "\u63D2\u5165\u6A21\u677F",
actionName: "inster-template-".concat(insertTemp),
onActionCallback: onActionCallback,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "fill-tip",
children: "\u63D2\u5165\u6A21\u677F"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
className: "btn-full-screen",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
icon: "".concat(fullScreen ? 'icon-shrink' : 'icon-enlarge'),
title: fullScreen ? '关闭全屏' : '开启全屏',
actionName: "trigger-full-screen",
onActionCallback: onActionCallback
})
})]
});
});
// EXTERNAL MODULE: ./src/components/modal.tsx
var modal = __webpack_require__(12264);
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
var es_form = __webpack_require__(25159);
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
var input = __webpack_require__(79531);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
;// CONCATENATED MODULE: ./src/components/markdown-editor/link/index.tsx
var formItemLayout = {
labelCol: {
span: 4
},
wrapperCol: {
span: 20
}
};
/* harmony default export */ var markdown_editor_link = (function (_ref) {
var callback = _ref.callback,
onCancel = _ref.onCancel;
function onSubmit(values) {
callback(values);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, formItemLayout), {}, {
initialValues: {
link: 'http://',
title: ''
},
className: "link-panel",
onFinish: onSubmit,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u94FE\u63A5\u5730\u5740",
name: "link",
rules: [{
required: true,
message: '请输入链接地址'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u94FE\u63A5\u6807\u9898",
name: "title",
rules: [{
required: true,
message: '请输入链接标题'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "flex-container flex-end",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
htmlType: "submit",
style: {
marginRight: 10
},
children: "\u786E\u5B9A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "ghost",
onClick: onCancel,
children: "\u53D6\u6D88"
})]
})]
}));
});
// EXTERNAL MODULE: ./src/components/markdown-editor/code-block/index.tsx
var code_block = __webpack_require__(97501);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 4 modules
var message = __webpack_require__(2453);
;// CONCATENATED MODULE: ./src/components/markdown-editor/upload-image/index.less
// extracted by mini-css-extract-plugin
// EXTERNAL MODULE: ./src/pages/tasks/util.js
var util = __webpack_require__(96403);
;// CONCATENATED MODULE: ./src/components/markdown-editor/upload-image/index.tsx
var useForm = es_form/* default.useForm */.Z.useForm;
var style = {
width: 280,
marginRight: 10
};
var upload_image_formItemLayout = {
labelCol: {
span: 5
},
wrapperCol: {
span: 19
}
};
/* harmony default export */ var upload_image = (function (_ref) {
var callback = _ref.callback,
onCancel = _ref.onCancel;
var _useForm = useForm(),
_useForm2 = slicedToArray_default()(_useForm, 1),
form = _useForm2[0];
var nameRef = (0,react.useRef)();
function onSubmit(values) {
callback(objectSpread2_default()(objectSpread2_default()({}, values), {}, {
name: nameRef.current
}));
}
function onAddUrl(data, file) {
if (data.status === -1) {
message/* default.error */.ZP.error(data.message);
return;
}
form.setFieldsValue({
src: "/api/attachments/".concat(data.id),
type: file.type
});
}
function onFileChange(e) {
var file = e.target.files[0];
nameRef.current = file.name;
uploadImage(file, onAddUrl);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, objectSpread2_default()(objectSpread2_default()({
form: form
}, upload_image_formItemLayout), {}, {
className: "upload-image-panel",
onFinish: onSubmit,
style: {
width: 470,
overflow: "hidden"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u56FE\u7247\u5730\u5740",
required: true,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "flex-container",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
noStyle: true,
name: "src",
rules: [{
required: true,
message: '请输入文件地址'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: style
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton, {
onFileChange: onFileChange
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u56FE\u7247\u63CF\u8FF0",
name: "alt"
// rules={[{ required: true, message: '请输入图片描述' }]}
,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
width: 264
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default.Item */.Z.Item, {
style: {
textAlign: "right"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
htmlType: "submit",
style: {
marginRight: 10
},
children: "\u786E\u5B9A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "default",
onClick: onCancel,
children: "\u53D6\u6D88"
})]
})]
}));
});
function UploadButton(_ref2) {
var onFileChange = _ref2.onFileChange;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("label", {
className: "upload-button",
style: {
cursor: "pointer"
},
children: ["\u672C\u5730\u4E0A\u4F20", /*#__PURE__*/(0,jsx_runtime.jsx)("input", {
type: "file",
onChange: onFileChange
})]
});
}
function uploadImage(file, callback) {
if (!file) {
throw new String('没有文件');
return;
}
var formData = new FormData();
formData.append('editormd-image-file', file);
formData.append('file_param_name', 'editormd-image-file');
formData.append('byxhr', 'true');
var xhr = new window.XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('load', function (response) {
callback(JSON.parse(response.target.responseText), file);
}, false);
xhr.addEventListener('error', function (error) {
console.error(error);
}, false);
xhr.open('POST', "".concat(util/* apiPref */.KI, "/api/attachments.json"));
xhr.send(formData);
}
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(78045);
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 21 modules
var input_number = __webpack_require__(31795);
;// CONCATENATED MODULE: ./src/components/markdown-editor/add-table-panel/index.tsx
var RadioGroup = es_radio/* default.Group */.ZP.Group;
var add_table_panel_style = {
margin: '0 8px'
};
/* harmony default export */ var add_table_panel = (function (_ref) {
var callback = _ref.callback,
onCancel = _ref.onCancel;
function onSubmit(values) {
callback(values);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: "add-table-panel",
initialValues: {
row: 3,
col: 2,
align: 'default'
},
onFinish: onSubmit,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "flex-container",
style: {
alignItems: "baseline"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: add_table_panel_style,
children: "\u5355\u5143\u683C\u6570\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: add_table_panel_style,
children: "\u884C\u6570"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "row",
rules: [{
required: true,
message: '请输入行数'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: add_table_panel_style,
children: "\u5217\u6570"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "col",
rules: [{
required: true,
message: '请输入列数'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "flex-container",
style: {
marginTop: 12,
alignItems: "baseline"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: add_table_panel_style,
children: "\u5BF9\u9F50\u65B9\u5F0F\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "align",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(RadioGroup, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "default",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "fa fa-align-justify"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "left",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "fa fa-align-left"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "center",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "fa fa-align-center"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "right",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "fa fa-align-right"
})
})]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "flex-container flex-end",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
htmlType: "submit",
style: {
marginRight: 10
},
children: "\u786E\u5B9A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "ghost",
onClick: onCancel,
children: "\u53D6\u6D88"
})]
})]
});
});
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(84519);
// EXTERNAL MODULE: ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules
var v4 = __webpack_require__(25934);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 39 modules
var es_modal = __webpack_require__(72423);
;// CONCATENATED MODULE: ./src/components/markdown-editor/constant.ts
var LINK = 'link';
var UPLOAD_IMAGE = 'upload-image';
var CODE_BLOCK = 'code-block';
var ADD_TABLE = 'add-table';
var HRLINE = '------------';
var ALIGNSIGN = {
"default": HRLINE,
left: ":".concat(HRLINE),
center: ":".concat(HRLINE, ":"),
right: "".concat(HRLINE, ":")
};
// EXTERNAL MODULE: ./src/components/useInterval.tsx
var useInterval = __webpack_require__(61891);
;// CONCATENATED MODULE: ./src/components/markdown-editor/index.tsx
var _DEFAULTKEYMAP, _TitleDesc;
function noop() {}
var pending = 0;
var StorageTimeTicket = 10000;
var NULL_CH = '▁';
var ADD_MULTI = '@▁▁@';
var ADD_SINGLE = '@▁@';
var TEMP1 = '\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作'; //课程须知模板
function processSize(size) {
return !/^\d+$/.test(size) ? size : "".concat(size, "px");
}
var isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
var key = isMac ? 'Cmd' : 'Ctrl';
var officeSix = ["pptm", "pptx", "ppt", "pot", "pps", "ppa", "potx", "ppsx", "ppam", "pptm", "potm", "ppsm", "doc", "docx", "dot", "dotx", "docm", "dotm", "xls", "xlsx", "csv", "xlt", "xla", "xltx", "xlsm", "xltm", "xlam", "xlsb"];
var DEFAULTKEYMAP = (_DEFAULTKEYMAP = {}, defineProperty_default()(_DEFAULTKEYMAP, key + '-B', 'bold'), defineProperty_default()(_DEFAULTKEYMAP, key + '-I', 'italic'), _DEFAULTKEYMAP);
var TitleDesc = (_TitleDesc = {}, defineProperty_default()(_TitleDesc, LINK, '添加链接'), defineProperty_default()(_TitleDesc, CODE_BLOCK, '添加代码块'), defineProperty_default()(_TitleDesc, UPLOAD_IMAGE, '添加文件'), defineProperty_default()(_TitleDesc, ADD_TABLE, '添加表格'), _TitleDesc);
//https://codemirror.net/demo
//The height can be set through CSS (by giving the .CodeMirror class a height property), or by calling the cm's setSize method.
/* harmony default export */ var markdown_editor = (function (_ref) {
var _ref$defaultValue = _ref.defaultValue,
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
onChange = _ref.onChange,
_ref$width = _ref.width,
width = _ref$width === void 0 ? '100%' : _ref$width,
_ref$height = _ref.height,
height = _ref$height === void 0 ? 400 : _ref$height,
_ref$miniToolbar = _ref.miniToolbar,
miniToolbar = _ref$miniToolbar === void 0 ? false : _ref$miniToolbar,
_ref$isFocus = _ref.isFocus,
isFocus = _ref$isFocus === void 0 ? false : _ref$isFocus,
watch = _ref.watch,
insertTemp = _ref.insertTemp,
_ref$mode = _ref.mode,
mode = _ref$mode === void 0 ? "markdown" : _ref$mode,
_ref$id = _ref.id,
id = _ref$id === void 0 ? 'markdown-editor-id' : _ref$id,
_ref$showResizeBar = _ref.showResizeBar,
showResizeBar = _ref$showResizeBar === void 0 ? false : _ref$showResizeBar,
_ref$noStorage = _ref.noStorage,
noStorage = _ref$noStorage === void 0 ? false : _ref$noStorage,
_ref$showNullButton = _ref.showNullButton,
showNullButton = _ref$showNullButton === void 0 ? false : _ref$showNullButton,
_ref$showNullProgramB = _ref.showNullProgramButton,
showNullProgramButton = _ref$showNullProgramB === void 0 ? false : _ref$showNullProgramB,
_ref$hidetoolBar = _ref.hidetoolBar,
hidetoolBar = _ref$hidetoolBar === void 0 ? false : _ref$hidetoolBar,
_ref$fullScreen = _ref.fullScreen,
fullScreen = _ref$fullScreen === void 0 ? false : _ref$fullScreen,
onBlur = _ref.onBlur,
onCMBeforeChange = _ref.onCMBeforeChange,
onFullScreen = _ref.onFullScreen,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className,
_ref$disablePaste = _ref.disablePaste,
disablePaste = _ref$disablePaste === void 0 ? false : _ref$disablePaste,
_ref$disabled = _ref.disabled,
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
_ref$disabledFill = _ref.disabledFill,
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
_ref$placeholder = _ref.placeholder,
placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
_ref$values = _ref.values,
values = _ref$values === void 0 ? '' : _ref$values;
var _useState = (0,react.useState)(null),
_useState2 = slicedToArray_default()(_useState, 2),
cm = _useState2[0],
setCm = _useState2[1];
var _useState3 = (0,react.useState)(defaultValue),
_useState4 = slicedToArray_default()(_useState3, 2),
value = _useState4[0],
setValue = _useState4[1];
var _useState5 = (0,react.useState)(watch),
_useState6 = slicedToArray_default()(_useState5, 2),
preview = _useState6[0],
setPreview = _useState6[1];
var _useState7 = (0,react.useState)(fullScreen),
_useState8 = slicedToArray_default()(_useState7, 2),
isFull = _useState8[0],
setIsFull = _useState8[1];
var _useState9 = (0,react.useState)(''),
_useState10 = slicedToArray_default()(_useState9, 2),
action = _useState10[0],
setAction = _useState10[1];
var _useState11 = (0,react.useState)(0),
_useState12 = slicedToArray_default()(_useState11, 2),
lastedUpdateTime = _useState12[0],
setLastedUpdateTime = _useState12[1];
var _useState13 = (0,react.useState)(height),
_useState14 = slicedToArray_default()(_useState13, 2),
h = _useState14[0],
setH = _useState14[1];
var _useState15 = (0,react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
tip = _useState16[0],
setTip = _useState16[1];
var uuidRef = (0,react.useRef)((0,v4/* default */.Z)());
var openPhoneRef = (0,react.useRef)(false);
var timer = (0,react.useRef)();
var cmEl = (0,react.useRef)();
var containerEl = (0,react.useRef)();
var resizeBarEl = (0,react.useRef)();
var previewEl = (0,react.useRef)();
var checkFiles = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _res$attachments;
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,fetch/* default */.ZP)("/api/attachments/distinct_hash_val.json", {
method: "post",
body: {
hash_val: uuidRef.current
}
});
case 2:
res = _context.sent;
if (!!(res !== null && res !== void 0 && (_res$attachments = res.attachments) !== null && _res$attachments !== void 0 && _res$attachments.length)) {
console.log("cm:", cm, cmEl);
res.attachments.map(function (item) {
if (item.content_type.indexOf("image") > -1) {
cm.replaceSelection("![,](/api/attachments/".concat(item.id, "?type=").concat(item.content_type, ")"));
} else if (item.content_type.indexOf("video") > -1) {
cm.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
} else if (item.content_type.indexOf("pdf") > -1) {
cm.replaceSelection("<a href=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(item.id, "?type=").concat(item.content_type, "&disposition=inline\" target=\"_blank\">").concat(item.name, "</a>"));
} else {
cm.replaceSelection("[".concat(item.name, "](").concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(item.id, "?type=").concat(item.content_type, ")"));
}
});
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function checkFiles() {
return _ref2.apply(this, arguments);
};
}();
// useEffect(() => {
// setValue(defaultValue)
// cm?.setValue(defaultValue)
// },[])
(0,react.useEffect)(function () {
var scrollTop = window.scrollY || window.pageYOffset;
setValue(values);
cm === null || cm === void 0 ? void 0 : cm.setValue(values);
window.scrollTo(0, scrollTop);
}, [values]);
(0,react.useEffect)(function () {
onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(isFull);
}, [isFull]);
(0,react.useEffect)(function () {
if (cmEl.current) {
var onPaste = function onPaste(_, e) {
if (disablePaste) {
e.preventDefault();
return;
}
var clipboardData = e.clipboardData;
if (clipboardData) {
var types = clipboardData.types.toString();
var items = clipboardData.items;
if (types === 'Files' || clipboardData.types.indexOf("Files") > -1) {
e.preventDefault();
if (mode == "stex") return;
try {
var _items$;
var item = items[1];
if (((_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.kind) === 'file') {
item = items[0];
}
var file = item.getAsFile();
var fileSix = file.name.split(".").pop();
// console.log("item:", item, file, item?.type?.match(/^video\//i))
uploadImage(file, function (data) {
if (data.id) {
var _file$type, _file$type2, _file$type3;
if ((file === null || file === void 0 ? void 0 : (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.indexOf("image")) > -1) {
instance.replaceSelection("![,](/api/attachments/".concat(data.id, "?type=").concat(data.content_type, ")"));
} else if ((file === null || file === void 0 ? void 0 : (_file$type2 = file.type) === null || _file$type2 === void 0 ? void 0 : _file$type2.indexOf("video")) > -1) {
instance.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
} else if ((file === null || file === void 0 ? void 0 : (_file$type3 = file.type) === null || _file$type3 === void 0 ? void 0 : _file$type3.indexOf("pdf")) > -1) {
instance.replaceSelection("<a href=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(file.type, "&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
} else if (officeSix.includes(fileSix)) {
instance.replaceSelection("<a href=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=office&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
} else {
instance.replaceSelection("[".concat(file.name, "](").concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(data.content_type, ")"));
}
} else {
if ((data === null || data === void 0 ? void 0 : data.status) === 401) document.location.href = '/user/login';
}
});
} catch (e) {
message/* default.warning */.ZP.warning("请使用chrome浏览器粘贴");
}
return true;
} else {
//toMarkdown ?
// let html = clipboardData.getData('text/html')
return true;
}
}
return true;
};
var instance = codemirror_default().fromTextArea(cmEl.current, {
mode: mode,
// inputStyle: 'contenteditable',
lineNumbers: miniToolbar ? false : true,
lineWrapping: true,
value: defaultValue,
autoCloseTags: true,
autoCloseBrackets: true
});
instance.on("keyup", function (cm, event) {
if (event.keyCode === 8) {
if (cm.getValue() == "") {
instance.setOption("placeholder", placeholder);
} else {
instance.setOption("placeholder", null);
}
}
});
instance.on("keydown", function (cm, event) {
if (event.keyCode === 8) {
var pos = deleteAtSymbol(cm);
if (pos) {
event.preventDefault();
}
}
});
isFocus && instance.focus();
instance.on('paste', onPaste);
instance.on('dragleave', function (data, e) {
containerEl.current.classList.remove("mouse-hover-md");
});
instance.on('dragover', function (data, e) {
containerEl.current.classList.add("mouse-hover-md");
});
instance.on('drop', function (data, e) {
containerEl.current.classList.add("mouse-hover-md");
// var file;
var files;
// Check if files were dropped
files = e.dataTransfer.files;
if (files.length > 0) {
e.preventDefault();
e.stopPropagation();
// file = files[0];
// alert('File: ' + file.name);
// return false;
var _loop = function _loop() {
var file = files[i];
var fileSix = file.name.split(".").pop();
uploadImage(file, function (data) {
if (data.id) {
var _file$type4, _file$type5, _file$type6;
if ((file === null || file === void 0 ? void 0 : (_file$type4 = file.type) === null || _file$type4 === void 0 ? void 0 : _file$type4.indexOf("image")) > -1) {
instance.replaceSelection("![,](/api/attachments/".concat(data.id, "?type=").concat(data.content_type, ")"));
} else if ((file === null || file === void 0 ? void 0 : (_file$type5 = file.type) === null || _file$type5 === void 0 ? void 0 : _file$type5.indexOf("video")) > -1) {
instance.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
} else if ((file === null || file === void 0 ? void 0 : (_file$type6 = file.type) === null || _file$type6 === void 0 ? void 0 : _file$type6.indexOf("pdf")) > -1) {
instance.replaceSelection("<a href=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(file.type, "&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
} else if (officeSix.includes(fileSix)) {
instance.replaceSelection("<a href=\"".concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=office&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
} else {
instance.replaceSelection("[".concat(file.name, "](").concat(env/* default.API_SERVER */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(data.content_type, ")"));
}
} else {
if ((data === null || data === void 0 ? void 0 : data.status) === 401) document.location.href = '/user/login';
}
});
};
for (var i = 0; i < files.length; i++) {
_loop();
}
// files.map((file:any) => {
// })
}
});
if (disabled) {
instance.on("beforeChange", function (instances, change) {
if (change.origin === "paste" || change.origin === "+input") {
change.cancel();
}
});
}
setCm(instance);
return function () {
instance.off('paste', onPaste);
};
}
}, []);
var resizeEditorBodyHeight = (0,react.useCallback)(function () {
if (containerEl.current) {
try {
// let toolH = containerEl.current.getElementsByClassName('markdown-toolbar-container')[0].offsetHeight
// let mdBody = containerEl.current.getElementsByClassName('markdown-editor-body')[0]
// if (!isFull) {
// mdBody.style.height = `${h - toolH}px`
// } else {
// mdBody.style.height = `calc(100vh - ${toolH}px)`
// }
} catch (error) {
console.log(error, '---- to set md editor body height');
}
}
}, [h, containerEl, isFull]);
(0,react.useEffect)(function () {
function onLayout() {
var ro = new ResizeObserver_es/* default */.Z(function (entries) {
var _iterator = createForOfIteratorHelper_default()(entries),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var entry = _step.value;
if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) {
resizeEditorBodyHeight();
cm.setSize('100%', '100%');
cm.refresh();
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
});
ro.observe(cmEl.current.parentElement);
return ro;
}
if (cm) {
var ro = onLayout();
return function () {
var _cmEl$current, _cmEl$current2;
if ((_cmEl$current = cmEl.current) !== null && _cmEl$current !== void 0 && _cmEl$current.parentElement) ro.unobserve((_cmEl$current2 = cmEl.current) === null || _cmEl$current2 === void 0 ? void 0 : _cmEl$current2.parentElement);
};
}
}, [cm, resizeEditorBodyHeight]);
//keymap
(0,react.useEffect)(function () {
if (cm) {
var keymap = [];
var _loop2 = function _loop2() {
var _Object$entries$_i = slicedToArray_default()(_Object$entries[_i], 2),
k = _Object$entries$_i[0],
value = _Object$entries$_i[1];
var map = defineProperty_default()({}, k, function () {
onActionCallback(value);
});
keymap.push(map);
cm.addKeyMap(map);
};
for (var _i = 0, _Object$entries = Object.entries(DEFAULTKEYMAP); _i < _Object$entries.length; _i++) {
_loop2();
}
timer.current = setInterval(function () {
if (openPhoneRef.current) {
checkFiles();
}
}, 4000);
return function () {
clearInterval(timer.current);
for (var _i2 = 0, _keymap = keymap; _i2 < _keymap.length; _i2++) {
var m = _keymap[_i2];
cm.removeKeyMap(m);
}
};
}
}, [cm]);
(0,react.useEffect)(function () {
if (fullScreen !== isFull) {
setIsFull(fullScreen);
}
}, [fullScreen]);
(0,useInterval/* default */.Z)(function () {
if (!noStorage && lastedUpdateTime > 0) {
var currentTime = new Date().getTime();
var lastedValue = window.sessionStorage.getItem(id);
if (currentTime >= lastedUpdateTime + StorageTimeTicket && (!lastedValue || lastedValue !== value)) {
window.sessionStorage.setItem(id, value);
setTip(true);
}
}
}, StorageTimeTicket);
(0,react.useEffect)(function () {
setPreview(watch);
}, [cm, watch]);
(0,react.useEffect)(function () {
if (cm) {
isFocus && cm.focus();
}
}, [cm, isFocus]);
(0,react.useEffect)(function () {
if (preview && cm) {
var syncScroll = function syncScroll(e) {
var target = e.target;
if (previewEl.current) {
var ratio = target.scrollTop / target.scrollHeight;
previewEl.current.scrollTop = previewEl.current.scrollHeight * ratio;
}
};
var scrollEl = cm.getScrollerElement();
scrollEl.addEventListener('scroll', syncScroll);
return function () {
scrollEl.removeEventListener('scroll', syncScroll);
};
}
}, [cm, preview]);
(0,react.useEffect)(function () {
if (cm && onCMBeforeChange) {
var onChangeHandler = function onChangeHandler(cm, change) {
onCMBeforeChange(cm, change);
};
cm.on('beforeChange', onChangeHandler);
return function () {
cm.off('beforeChange', onChangeHandler);
};
}
}, [cm, onCMBeforeChange]);
(0,react.useEffect)(function () {
if (cm && onBlur) {
var onBlurHandler = function onBlurHandler() {
onBlur(cm.getValue());
};
cm.on('blur', onBlurHandler);
return function () {
cm.off('blur', onBlurHandler);
};
}
}, [cm, onBlur]);
function deleteAtSymbol(cm, change) {
var doc = cm.getDoc();
var cursor = doc.getCursor();
var line = doc.getLine(cursor.line);
var ch = line.charAt(cursor.ch - 1);
var p1 = line.lastIndexOf("@▁@", cursor.ch);
var p2 = line.lastIndexOf("@▁▁@", cursor.ch);
var posStart = p1 > p2 ? p1 : p2;
var n = p1 > p2 ? 3 : 4;
if (ADD_MULTI.indexOf(ch) === -1) return null;
console.log("change1:", change, cm, line, cursor, posStart, p1, p2, ch);
if (posStart >= 0 && cursor.ch - posStart < 5) {
var posEnd = posStart + n;
doc.replaceRange("", {
line: cursor.line,
ch: posStart
}, {
line: cursor.line,
ch: posEnd
});
return {
line: cursor.line,
ch: posEnd
};
}
return null;
}
(0,react.useEffect)(function () {
if (cm) {
var onChangeHandler = function onChangeHandler(cm, change) {
var content = cm.getValue();
setValue(content);
setLastedUpdateTime(new Date().getTime());
cm.getScrollerElement().dispatchEvent(new CustomEvent('scroll'));
if (onChange) {
if (showNullProgramButton) {
onChange(content, formatProgramFill(content));
} else {
onChange(content);
}
}
};
cm.on('change', onChangeHandler);
return function () {
cm.off('change', onChangeHandler);
};
}
}, [cm, onChange]);
(0,react.useEffect)(function () {
if (cm) {
// isFocus && cm.focus()
if (defaultValue === null || defaultValue === undefined) {
cm.setValue('');
setValue('');
} else {
var scrollTop = window.scrollY || window.pageYOffset;
if (defaultValue !== cm.getValue()) {
cm.setValue(defaultValue);
setValue(defaultValue);
cm.setCursor(disabled ? 1 : cm.lineCount(), 0);
window.scrollTo(0, scrollTop);
}
}
}
}, [cm, defaultValue]);
var onActionCallback = (0,react.useCallback)(function (actionName) {
var cursor = cm.getCursor();
var selection = cm.getSelection();
var selectionText = selection.split('\n');
switch (actionName) {
case 'bold':
cm.replaceSelection('**' + selection + '**');
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch + 2);
}
return cm.focus();
case 'italic':
cm.replaceSelection('*' + selection + '*');
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch + 1);
}
return cm.focus();
case 'code':
cm.replaceSelection('`' + selection + '`');
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch + 1);
}
return cm.focus();
case 'inline-latex':
cm.replaceSelection('`$$' + selection + '$$`');
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch + 3);
}
return cm.focus();
case 'latex':
cm.replaceSelection("```latex\n" + selection + "\n```");
cm.setCursor(cursor.line + 1, selection.length + 1);
return cm.focus();
case 'line-break':
cm.replaceSelection('<br/>\n');
return cm.focus();
case 'list-ul':
if (selection === '') {
cm.replaceSelection('- ' + selection);
} else {
cm.replaceSelection(selectionText.map(function (item) {
return item === '' ? '' : "- ".concat(item);
}).join('\n'));
}
return cm.focus();
case 'list-ol':
if (selection === '') {
cm.replaceSelection('1. ' + selection);
} else {
cm.replaceSelection(selectionText.map(function (item, index) {
return item === '' ? '' : "".concat(index + 1, ". ").concat(item);
}).join('\n'));
}
return cm.focus();
case 'add-null-ch':
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch);
}
cm.replaceSelection(NULL_CH);
return cm.focus();
case 'add-signal':
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch);
}
cm.replaceSelection(ADD_SINGLE);
return cm.focus();
case 'add-multiple':
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch);
}
cm.replaceSelection(ADD_MULTI);
return cm.focus();
case 'inster-template-1':
if (selection === '') {
cm.setCursor(cursor.line, cursor.ch);
}
cm.replaceSelection(TEMP1);
return cm.focus();
case 'eraser':
cm.setValue('');
return cm.focus();
case 'trigger-watch':
setPreview(!preview);
return cm.focus();
case 'trigger-full-screen':
setIsFull(!isFull);
return cm.focus();
case LINK:
setAction(LINK);
return;
case CODE_BLOCK:
setAction(CODE_BLOCK);
return;
case UPLOAD_IMAGE:
setAction(UPLOAD_IMAGE);
return;
case ADD_TABLE:
setAction(ADD_TABLE);
return;
default:
throw new Error();
}
}, [cm, preview, isFull]);
var ExecutePluginAction = (0,react.useCallback)(function (values) {
setAction('');
switch (action) {
case LINK:
var title = values.title,
link = values.link;
cm.replaceSelection("[".concat(title, "](").concat(link, ")"));
return cm.focus();
case CODE_BLOCK:
var language = values.language,
content = values.content;
cm.replaceSelection(['```' + language, content, '```'].join('\n'));
return cm.focus();
case UPLOAD_IMAGE:
var src = values.src,
alt = values.alt;
if (alt) {
cm.replaceSelection("![ ".concat(alt, " ]( ").concat(src, " \"").concat(alt, "\" )"));
} else {
cm.replaceSelection("![,](".concat(src, ")"));
}
return cm.focus();
case ADD_TABLE:
var row = values.row,
col = values.col,
align = values.align;
var table = '\n';
for (var r = 0; r < row; r++) {
var rows = [];
var heads = [];
for (var c = 0; c < col; c++) {
if (r === 1) {
heads.push(ALIGNSIGN[align]);
}
rows.push(' ');
}
if (r === 1) {
table += "| ".concat(heads.join(' | '), " |\n");
}
table += "| ".concat(rows.join(col === 1 ? '' : ' | '), " |\n");
}
cm.replaceSelection(table + '\n');
return cm.focus();
default:
throw new Error();
}
}, [cm, action]);
var PluginEl = (0,react.useMemo)(function () {
switch (action) {
case LINK:
return /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor_link, {
callback: ExecutePluginAction,
onCancel: onCancel
});
case CODE_BLOCK:
return /*#__PURE__*/(0,jsx_runtime.jsx)(code_block/* default */.Z, {
callback: ExecutePluginAction,
onCancel: onCancel
});
case UPLOAD_IMAGE:
return /*#__PURE__*/(0,jsx_runtime.jsx)(upload_image, {
callback: ExecutePluginAction,
onCancel: onCancel
});
case ADD_TABLE:
return /*#__PURE__*/(0,jsx_runtime.jsx)(add_table_panel, {
callback: ExecutePluginAction,
onCancel: onCancel
});
default:
return null;
}
}, [action]);
function onCancel() {
setAction('');
}
(0,react.useEffect)(function () {
if (resizeBarEl.current) {
var onMouseDown = function onMouseDown(e) {
dragging = true;
startY = e.pageY;
};
var onMouseUp = function onMouseUp() {
dragging = false;
};
var onMouseMove = function onMouseMove(e) {
if (dragging) {
var delta = e.pageY - startY;
if (delta < 0) {
delta = 0;
}
if (delta > 300) {
delta = 300;
}
var resizeH = height + delta + 'px';
setH(resizeH);
}
};
var resizeBar = resizeBarEl.current;
var dragging = false;
var startY = 0;
resizeBar.addEventListener('mousedown', onMouseDown);
document.addEventListener('mousemove', onMouseMove);
document.addEventListener('mouseup', onMouseUp);
return function () {
resizeBar.removeEventListener('mousedown', onMouseDown);
document.removeEventListener('mousemove', onMouseMove);
document.removeEventListener('mouseup', onMouseUp);
};
}
}, [cm, resizeBarEl]);
(0,react.useEffect)(function () {
setH(height);
}, [height]);
var fixedWidth = processSize(width);
var fixedHeight = processSize(h);
var style = {
width: fixedWidth,
height: fixedHeight
};
var saveTime = (0,react.useMemo)(function () {
if (lastedUpdateTime) {
var d = new Date(lastedUpdateTime);
var _h = d.getHours();
var m = d.getMinutes();
var s = d.getSeconds();
_h = _h < 10 ? '0' + _h : _h;
m = m < 10 ? '0' + m : m;
s = s < 10 ? '0' + s : s;
return "".concat(_h, ":").concat(m, ":").concat(s);
}
return 0;
}, [lastedUpdateTime]);
var formatProgramFill = function formatProgramFill(str) {
var arr = [];
if (showNullProgramButton) {
var num = -1;
str = str.replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
arr.push({
multiLine: !(a === ADD_SINGLE)
});
});
}
return arr;
};
function onCancelStorage() {
window.sessionStorage.removeItem(id);
setTip(false);
setLastedUpdateTime(0);
}
function onReset() {
setTip(false);
setLastedUpdateTime(0);
cm.setValue(window.sessionStorage.getItem(id));
}
function setValues(a, b) {
var content = cm.getValue();
content = content.replace(a, b);
setValue(content);
cm === null || cm === void 0 ? void 0 : cm.setValue(content);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "markdown-editor-wrapper",
ref: containerEl,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "markdown-editor-container ".concat(className, " ").concat(preview ? 'on-preview' : '', " ").concat(miniToolbar ? 'mini' : '', " ").concat(isFull ? 'full-screen' : ''),
style: style,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(toolbar, {
insertTemp: insertTemp,
watch: preview,
fullScreen: isFull,
showNullButton: showNullButton,
showNullProgramButton: showNullProgramButton,
onActionCallback: onActionCallback,
hidetoolBar: hidetoolBar,
uuid: uuidRef.current,
setOpenPhones: function setOpenPhones() {
openPhoneRef.current = true;
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "markdown-editor-body",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "codemirror-container",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("textarea", {
ref: cmEl,
placeholder: placeholder
})
}), preview ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
ref: previewEl,
className: "preview-container",
children: [mode === "stex" && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml_stex, {
value: value
}), mode !== "stex" && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
disabledFill: disabledFill,
showProgramFill: showNullProgramButton,
value: value
})]
}) : null]
})]
})
}), showResizeBar ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
ref: resizeBarEl,
className: "editor-resize"
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
children: TitleDesc[action] ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
centered: true,
title: TitleDesc[action],
open: true,
onCancel: onCancel,
footer: null,
className: "markdown-popup-form",
children: PluginEl
}) : null
})]
});
});
/***/ }),
/***/ 12264:
/*!**********************************!*\
!*** ./src/components/modal.tsx ***!
\**********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ Dialog; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/classCallCheck.js */ 56690);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/createClass.js */ 89728);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/inherits.js */ 61655);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/createSuper.js */ 26389);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ 73935);
var Dialog = /*#__PURE__*/function (_React$Component) {
_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default()(Dialog, _React$Component);
var _super = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default()(Dialog);
function Dialog(props) {
var _this;
_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default()(this, Dialog);
_this = _super.call(this, props);
var doc = window.document;
_this.node = doc.createElement('div');
doc.body.appendChild(_this.node);
return _this;
}
_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default()(Dialog, [{
key: "render",
value: function render() {
var children = this.props.children;
return /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_5__.createPortal)(children, this.node);
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
window.document.body.removeChild(this.node);
}
}]);
return Dialog;
}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
/***/ }),
/***/ 77696:
/*!*********************************************************!*\
!*** ./src/components/tpi-code-setting/CodeSetting.tsx ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ 12867);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 79035);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 47897);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
var Option = antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"].Option */ .Z.Option;
/* harmony default export */ __webpack_exports__["Z"] = (function (_ref) {
var isTheoretical = _ref.isTheoretical,
onFontSizeChange = _ref.onFontSizeChange,
cmFontSize = _ref.cmFontSize,
cmCodeMode = _ref.cmCodeMode,
autoFormat = _ref.autoFormat,
onCodeModeChange = _ref.onCodeModeChange,
onTabToSpace = _ref.onTabToSpace,
onAutoFormat = _ref.onAutoFormat,
formatDocument = _ref.formatDocument,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className,
tabToSpace = _ref.tabToSpace,
children = _ref.children;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "tpi-code-setting ".concat(className),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3", {
children: "\u4EE3\u7801\u683C\u5F0F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("section", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u663E\u793A\u6A21\u5F0F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
bordered: false,
size: "small",
value: cmCodeMode,
onChange: onCodeModeChange,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 'vs',
children: "\u767D\u8272\u80CC\u666F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 'vs-dark',
children: "\u9ED1\u8272\u80CC\u666F"
})]
})]
}), !isTheoretical && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u5B57\u4F53\u5927\u5C0F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
bordered: false,
size: "small",
value: cmFontSize,
onChange: onFontSizeChange,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 12,
children: "12px"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 14,
children: "14px"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 16,
children: "16px"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 18,
children: "18px"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 20,
children: "20px"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Option, {
value: 22,
children: "22px"
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "Tab\u8F6C\u6362"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
checked: tabToSpace,
onChange: onTabToSpace
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
className: "file-item",
onClick: formatDocument,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
style: {
cursor: "pointer"
},
children: "\u683C\u5F0F\u5316\u4EE3\u7801"
})
})]
})]
}), !isTheoretical && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3", {
children: "\u5FEB\u6377\u952E"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("section", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u4FDD\u5B58\u4EE3\u7801"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
children: "Ctrl + S"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
children: "F1 / Alt + F1"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u5DE6\u53F3\u7F29\u8FDB"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
children: "Ctrl + ]/["
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
children: "Ctrl + Shift + \\"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u8F6C\u5230\u884C\u9996"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
children: "Home"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "file-item",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b", {
children: "\u8F6C\u5230\u884C\u5C3E"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
children: "End"
})]
})]
}), children]
})]
});
});
/***/ }),
/***/ 61891:
/*!****************************************!*\
!*** ./src/components/useInterval.tsx ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ useInterval; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
function useInterval(callback, delay) {
var savedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
// 保存新回调
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
savedCallback.current = callback;
});
// 建立 interval
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
function tick() {
savedCallback.current();
}
if (delay !== null) {
var id = setInterval(tick, delay);
return function () {
return clearInterval(id);
};
}
}, [delay]);
}
/***/ }),
/***/ 20654:
/*!*******************************************************************!*\
!*** ./src/pages/Problems/OjForm/CodePanel/index.tsx + 1 modules ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ CodePanel; }
});
// 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/@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/drawer/index.js + 16 modules
var drawer = __webpack_require__(35479);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/components/tpi-code-setting/CodeSetting.tsx
var CodeSetting = __webpack_require__(77696);
// EXTERNAL MODULE: ./src/components/modal.tsx
var modal = __webpack_require__(12264);
// EXTERNAL MODULE: ./src/utils/urlTool.ts
var urlTool = __webpack_require__(63778);
;// CONCATENATED MODULE: ./src/pages/Problems/OjForm/CodePanel/index.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/Problems/OjForm/CodePanel/index.tsx
//@ts-ignore
var initialState = {
theme: (0,urlTool/* fromStore */.G)('cmCodeMode', 'vs-dark'),
fontSize: (0,urlTool/* fromStore */.G)('cmFontSize', 14),
showEditorSetting: false,
tabToSpace: (0,urlTool/* fromStore */.G)('cmTabToSpace', true)
};
var Types = /*#__PURE__*/function (Types) {
Types[Types["set_font_size"] = 0] = "set_font_size";
Types[Types["set_theme"] = 1] = "set_theme";
Types[Types["on_tab_to_space"] = 2] = "on_tab_to_space";
Types[Types["set_show_editor_setting"] = 3] = "set_show_editor_setting";
return Types;
}(Types || {});
function reducer(state, action) {
switch (action.type) {
case Types.set_show_editor_setting:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
showEditorSetting: action.payload
});
case Types.set_theme:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
theme: action.payload
});
case Types.set_font_size:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
fontSize: action.payload
});
case Types.on_tab_to_space:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
tabToSpace: action.payload
});
default:
throw new Error();
}
}
/* harmony default export */ var CodePanel = (function (_ref) {
var isLoading = _ref.isLoading,
value = _ref.value,
_onChange = _ref.onChange,
language = _ref.language,
onUpdateCode = _ref.onUpdateCode,
_ref$ActionBarRender = _ref.ActionBarRender,
ActionBarRender = _ref$ActionBarRender === void 0 ? function (onShowCodeSetting) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(DefaultActionBar, {
onShowCodeSetting: onShowCodeSetting
});
} : _ref$ActionBarRender;
var _useReducer = (0,react.useReducer)(reducer, initialState),
_useReducer2 = slicedToArray_default()(_useReducer, 2),
state = _useReducer2[0],
dispatch = _useReducer2[1];
var theme = state.theme,
fontSize = state.fontSize,
showEditorSetting = state.showEditorSetting,
tabToSpace = state.tabToSpace;
var timeRef = (0,react.useRef)();
var valueRef = (0,react.useRef)();
var codeSettingOption = {
onFontSizeChange: function onFontSizeChange(val) {
dispatch({
type: Types.set_font_size,
payload: val
});
(0,urlTool/* toStore */.t)('cmFontSize', val);
},
tabToSpace: tabToSpace,
cmFontSize: fontSize,
className: 'oj',
cmCodeMode: theme,
onTabToSpace: function onTabToSpace(checked) {
dispatch({
type: Types.on_tab_to_space,
payload: checked
});
(0,urlTool/* toStore */.t)('cmTabToSpace', checked);
},
onCodeModeChange: function onCodeModeChange(val) {
dispatch({
type: Types.set_theme,
payload: val
});
(0,urlTool/* toStore */.t)('cmCodeMode', val);
}
};
function onHideCodeSetting() {
dispatch({
type: Types.set_show_editor_setting,
payload: false
});
}
function onShowCodeSetting() {
dispatch({
type: Types.set_show_editor_setting,
payload: true
});
}
var editorOption = {
value: value,
language: language,
// onChange,
theme: theme,
height: 'calc(100% - 56px)',
options: {
fontSize: fontSize,
insertSpaces: tabToSpace
},
onChange: function onChange(value) {
_onChange(value);
valueRef.current = value;
clearTimeout(timeRef.current);
timeRef.current = setTimeout(function () {
onUpdateCode(valueRef.current);
}, 10000);
},
onEditBlur: function onEditBlur(value) {
if (!!valueRef.current) onUpdateCode(valueRef.current);
}
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "code-panel-container",
children: [ActionBarRender(onShowCodeSetting), !isLoading && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, editorOption))]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(drawer/* default */.Z, {
rootClassName: "oj",
title: null,
placement: "right",
closable: false,
open: showEditorSetting,
onClose: onHideCodeSetting,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(CodeSetting/* default */.Z, objectSpread2_default()({}, codeSettingOption))
})
})]
});
});
function DefaultActionBar(_ref2) {
var onShowCodeSetting = _ref2.onShowCodeSetting;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "action-bar",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
onClick: onShowCodeSetting,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shezhi"
})
})]
});
}
/***/ }),
/***/ 46533:
/*!**************************************************************************!*\
!*** ./src/pages/Problems/OjForm/CodeProgramPanel/index.tsx + 1 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ CodeProgramPanel; }
});
// 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/@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/drawer/index.js + 16 modules
var drawer = __webpack_require__(35479);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/components/tpi-code-setting/CodeSetting.tsx
var CodeSetting = __webpack_require__(77696);
// EXTERNAL MODULE: ./src/components/modal.tsx
var modal = __webpack_require__(12264);
// EXTERNAL MODULE: ./src/utils/urlTool.ts
var urlTool = __webpack_require__(63778);
;// CONCATENATED MODULE: ./src/pages/Problems/OjForm/CodeProgramPanel/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var CodeProgramPanelmodules = ({"code-panel-container":"code-panel-container___RFtv_","action-oj-bar":"action-oj-bar___ByFmZ","active":"active___s9gT5"});
// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
var lodash = __webpack_require__(96486);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Problems/OjForm/CodeProgramPanel/index.tsx
//@ts-ignore
var initialState = {
theme: (0,urlTool/* fromStore */.G)('cmCodeMode', 'vs-dark'),
fontSize: (0,urlTool/* fromStore */.G)('cmFontSize', 14),
showEditorSetting: false,
tabToSpace: (0,urlTool/* fromStore */.G)('cmTabToSpace', true)
};
var Types = /*#__PURE__*/function (Types) {
Types[Types["set_font_size"] = 0] = "set_font_size";
Types[Types["set_theme"] = 1] = "set_theme";
Types[Types["on_tab_to_space"] = 2] = "on_tab_to_space";
Types[Types["set_show_editor_setting"] = 3] = "set_show_editor_setting";
return Types;
}(Types || {});
function reducer(state, action) {
switch (action.type) {
case Types.set_show_editor_setting:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
showEditorSetting: action.payload
});
case Types.set_theme:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
theme: action.payload
});
case Types.set_font_size:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
fontSize: action.payload
});
case Types.on_tab_to_space:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
tabToSpace: action.payload
});
default:
throw new Error();
}
}
/* harmony default export */ var CodeProgramPanel = (function (_ref) {
var _value$find;
var isLoading = _ref.isLoading,
_ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
onChange = _ref.onChange;
var _useReducer = (0,react.useReducer)(reducer, initialState),
_useReducer2 = slicedToArray_default()(_useReducer, 2),
state = _useReducer2[0],
dispatch = _useReducer2[1];
var theme = state.theme,
fontSize = state.fontSize,
showEditorSetting = state.showEditorSetting,
tabToSpace = state.tabToSpace;
var _useState = (0,react.useState)('c'),
_useState2 = slicedToArray_default()(_useState, 2),
language = _useState2[0],
setLanguage = _useState2[1];
var saveLanguageItems = (0,react.useRef)([]);
(0,react.useEffect)(function () {
if (!!(value !== null && value !== void 0 && value.length)) {
saveLanguageItems.current = (0,lodash.cloneDeep)(value);
}
}, [value]);
var codeSettingOption = {
onFontSizeChange: function onFontSizeChange(val) {
dispatch({
type: Types.set_font_size,
payload: val
});
(0,urlTool/* toStore */.t)('cmFontSize', val);
},
tabToSpace: tabToSpace,
cmFontSize: fontSize,
className: 'oj',
cmCodeMode: theme,
onTabToSpace: function onTabToSpace(checked) {
dispatch({
type: Types.on_tab_to_space,
payload: checked
});
(0,urlTool/* toStore */.t)('cmTabToSpace', checked);
},
onCodeModeChange: function onCodeModeChange(val) {
dispatch({
type: Types.set_theme,
payload: val
});
(0,urlTool/* toStore */.t)('cmCodeMode', val);
}
};
function onHideCodeSetting() {
dispatch({
type: Types.set_show_editor_setting,
payload: false
});
}
function onShowCodeSetting() {
dispatch({
type: Types.set_show_editor_setting,
payload: true
});
}
function onCodeChange(v) {
var _saveLanguageItems$cu;
var item = (_saveLanguageItems$cu = saveLanguageItems.current) === null || _saveLanguageItems$cu === void 0 ? void 0 : _saveLanguageItems$cu.map(function (e) {
if (e.language === language) {
e.code = v;
return e;
}
return e;
});
saveLanguageItems.current = (0,lodash.cloneDeep)(item);
onChange(item);
}
var editorOption = {
key: language,
value: value === null || value === void 0 ? void 0 : (_value$find = value.find(function (e) {
return e.language === language;
})) === null || _value$find === void 0 ? void 0 : _value$find.code,
language: language,
onChange: onCodeChange,
theme: theme,
height: 'calc(100% - 56px)',
options: {
fontSize: fontSize,
insertSpaces: tabToSpace
}
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CodeProgramPanelmodules["code-panel-container"],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DefaultActionBar, {
languageItems: value,
onLanguage: function onLanguage(v) {
return setLanguage(v);
},
language: language,
onShowCodeSetting: onShowCodeSetting
}), !isLoading && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, editorOption))]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(drawer/* default */.Z, {
rootClassName: "oj",
title: null,
placement: "right",
closable: false,
open: showEditorSetting,
onClose: onHideCodeSetting,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(CodeSetting/* default */.Z, objectSpread2_default()({}, codeSettingOption))
})
})]
});
});
function DefaultActionBar(_ref2) {
var languageItems = _ref2.languageItems,
language = _ref2.language,
onShowCodeSetting = _ref2.onShowCodeSetting,
onLanguage = _ref2.onLanguage;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CodeProgramPanelmodules["action-oj-bar"],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"
}), languageItems === null || languageItems === void 0 ? void 0 : languageItems.map(function (e) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: language === (e === null || e === void 0 ? void 0 : e.language) ? CodeProgramPanelmodules.active : '',
onClick: function onClick() {
return onLanguage(e === null || e === void 0 ? void 0 : e.language);
},
children: e === null || e === void 0 ? void 0 : e.language
}, e === null || e === void 0 ? void 0 : e.language);
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
onClick: onShowCodeSetting,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shezhi"
})
})]
});
}
/***/ }),
/***/ 6981:
/*!*****************************************************************!*\
!*** ./src/pages/Problems/OjForm/NewEdit/index.tsx + 2 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Types": function() { return /* binding */ Types; },
"default": function() { return /* binding */ NewEdit; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
var createForOfIteratorHelper = __webpack_require__(74704);
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
// 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/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// 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/@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);
;// CONCATENATED MODULE: ./src/pages/Problems/OjForm/NewEdit/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var NewEditmodules = ({"bg":"bg___HduZ7","header":"header___KbUo2","avatar":"avatar___UDYJ4","title":"title___OP1JL","exitBtn":"exitBtn___E3w1m","contentWrapper":"contentWrapper___IeO8M","tabWrapper":"tabWrapper___qc2MC","buttonFixed":"buttonFixed___jzejH","cancelBtn":"cancelBtn___c5OpP","saveBtn":"saveBtn___UhxvN","challengeBtn":"challengeBtn___h9r2O","baseInfoWrapper":"baseInfoWrapper___jei0F","baseLineHeight":"baseLineHeight___v1JXM","folderLineHeight":"folderLineHeight___tF8xb","uploadBtnWrapper":"uploadBtnWrapper___ICJS3","baseFormItem":"baseFormItem___sca4N","radioBtnWrapper":"radioBtnWrapper___VIxZD","difficultyRadio":"difficultyRadio___isD54","easy":"easy___gparw","medium":"medium___wRzjL","hard":"hard___sWxqC","testCaseTypeRadio":"testCaseTypeRadio___oiSFl","cascaderPopup":"cascaderPopup___OADQu","collapseWrapper":"collapseWrapper___saVIT","panelHeader":"panelHeader___hRptX","rateInput":"rateInput____HzUM","operationWrapper":"operationWrapper___YJRMc","open":"open___zkYQ_","close":"close___q9p81","add":"add___NB0_y","remove":"remove___xa9jD","codePanelWrapper":"codePanelWrapper___oacDD","uploadTableWrapper":"uploadTableWrapper___iMDly","unfold":"unfold___TdtCA"});
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
var es_form = __webpack_require__(25159);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 4 modules
var message = __webpack_require__(2453);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 39 modules
var modal = __webpack_require__(72423);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(57953);
// EXTERNAL MODULE: ./node_modules/antd/es/tabs/index.js + 28 modules
var tabs = __webpack_require__(34755);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./src/pages/Problems/OjForm/util.tsx
var util = __webpack_require__(52238);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(88275);
// EXTERNAL MODULE: ./node_modules/js-base64/base64.js
var base64 = __webpack_require__(19575);
// EXTERNAL MODULE: ./src/pages/Problems/OjForm/service.ts
var service = __webpack_require__(38005);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/pages/Problems/OjForm/CodePanel/index.tsx + 1 modules
var CodePanel = __webpack_require__(20654);
// EXTERNAL MODULE: ./src/pages/Problems/OjForm/CodeProgramPanel/index.tsx + 1 modules
var CodeProgramPanel = __webpack_require__(46533);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(84519);
// EXTERNAL MODULE: ./src/utils/util.tsx
var utils_util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./src/service/paperlibrary.ts
var paperlibrary = __webpack_require__(24410);
// EXTERNAL MODULE: ./src/utils/enum.ts
var utils_enum = __webpack_require__(70960);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js
var objectDestructuringEmpty = __webpack_require__(13012);
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty);
// 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/input-number/index.js + 21 modules
var input_number = __webpack_require__(31795);
// EXTERNAL MODULE: ./node_modules/antd/es/cascader/index.js + 63 modules
var cascader = __webpack_require__(80316);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(84567);
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js + 42 modules
var es_select = __webpack_require__(79035);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(78045);
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
var row = __webpack_require__(71230);
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
var col = __webpack_require__(15746);
// EXTERNAL MODULE: ./node_modules/antd/es/switch/index.js + 27 modules
var es_switch = __webpack_require__(47897);
// EXTERNAL MODULE: ./node_modules/antd/es/popconfirm/index.js + 2 modules
var popconfirm = __webpack_require__(86738);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules
var PlusCircleOutlined = __webpack_require__(64789);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules
var MinusCircleOutlined = __webpack_require__(3089);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(55373);
// EXTERNAL MODULE: ./src/components/FolderTree/index.tsx + 1 modules
var FolderTree = __webpack_require__(19424);
// EXTERNAL MODULE: ./src/components/Knowledge/index.tsx + 1 modules
var Knowledge = __webpack_require__(73221);
// EXTERNAL MODULE: ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.tsx + 2 modules
var UploadFile = __webpack_require__(29201);
// EXTERNAL MODULE: ./src/components/QuestionEditor/MdEditorInForm.tsx
var MdEditorInForm = __webpack_require__(95293);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Problems/OjForm/NewEdit/BaseInfo.tsx
var TextArea = input/* default.TextArea */.Z.TextArea;
var Panel = collapse/* default.Panel */.Z.Panel;
function BaseInfo(_ref) {
var _location, _location$search, _formValue$hack, _formValue$hack$sub_d;
var form = _ref.form,
onAddTestCases = _ref.onAddTestCases,
handleAddKnowledgeFinish = _ref.handleAddKnowledgeFinish,
formValue = _ref.formValue,
knowledgeOptions = _ref.knowledgeOptions,
categorys = _ref.categorys,
hack = _ref.hack,
callback_url = _ref.callback_url,
onChangeAverage = _ref.onChangeAverage,
onChangeScore = _ref.onChangeScore,
onChangeFile = _ref.onChangeFile,
onAddTestCase = _ref.onAddTestCase,
onRemoveTestCase = _ref.onRemoveTestCase,
onChangeSubDiscipline = _ref.onChangeSubDiscipline,
onChangeLanguage = _ref.onChangeLanguage,
uploadData = _ref.uploadData,
setUploadData = _ref.setUploadData,
handleUploadRatio = _ref.handleUploadRatio,
isshows = _ref.isshows,
isProgram = _ref.isProgram,
addUploadFnc = _ref.addUploadFnc,
activeKey = _ref.activeKey,
setActiveKey = _ref.setActiveKey;
var _useState = (0,react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
editAnalysis = _useState2[0],
setEditAnalysis = _useState2[1];
var is_random = ((_location = location) === null || _location === void 0 ? void 0 : (_location$search = _location.search) === null || _location$search === void 0 ? void 0 : _location$search.includes('select')) || false;
var _useState3 = (0,react.useState)(isshows),
_useState4 = slicedToArray_default()(_useState3, 2),
isshow = _useState4[0],
setisshow = _useState4[1];
var test_set_average = hack.test_set_average,
test_set_score = hack.test_set_score;
var _useState5 = (0,react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
unfold = _useState6[0],
setUnfold = _useState6[1];
var _useState7 = (0,react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
showUploadFile = _useState8[0],
setShowUploadFile = _useState8[1];
var handleRemove = function handleRemove(item, key) {
var newList = toConsumableArray_default()(uploadData);
newList.splice(key, 1);
if (test_set_average) {
handleUploadRatio(newList);
} else {
setUploadData(newList);
}
};
var handleInputChange = function handleInputChange(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 addUploadData = function addUploadData(files) {
if (!(files !== null && files !== void 0 && files.length)) return;
//文件
if (files !== null && files !== void 0 && files[0].is_file) {
addUploadFnc(files, true)();
var newList = uploadData.concat(files);
if (hack.test_set_average) {
handleUploadRatio(newList);
} else {
setUploadData(newList);
}
}
//文本
if (!(files !== null && files !== void 0 && files[0].is_file)) {
addUploadFnc(files);
}
};
function onStopPropagation(e) {
e.stopPropagation();
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NewEditmodules.baseInfoWrapper,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8BD5\u9898\u540D\u79F0",
name: ['hack', 'name'],
rules: [{
required: true,
message: '请输入试题名称'
}],
className: "".concat(NewEditmodules.baseLineHeight),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
className: NewEditmodules.baseFormItem,
maxLength: 60,
placeholder: "\u8BF7\u8F93\u5165\u8BD5\u9898\u540D\u79F0"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8BD5\u9898\u63CF\u8FF0",
name: ['hack', "description"],
valuePropName: "defaultValue",
rules: [{
required: true,
message: '请输入描述内容'
}],
className: "".concat(NewEditmodules.baseLineHeight),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
miniToolbar: true,
id: "moop_cases_content",
noStorage: true,
height: 200
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u53C2\u8003\u7B54\u6848",
name: ['hack', "answer_text"],
valuePropName: "defaultValue",
className: "".concat(NewEditmodules.baseLineHeight),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
miniToolbar: true,
noStorage: true,
height: 200
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
onClick: function onClick() {
return setEditAnalysis(true);
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u9898\u76EE\u89E3\u6790",
name: ["hack", 'analysis'],
className: "".concat(NewEditmodules.baseLineHeight),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MdEditorInForm/* RegularInput */.x, {
placeholder: "\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",
isEdit: editAnalysis
})
})
}), callback_url && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default.Item */.Z.Item, {
label: "\u5206\u503C",
className: "".concat(NewEditmodules.baseLineHeight),
required: true,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: ['hack', 'score'],
rules: [{
required: true,
message: '请输入分数'
}],
noStyle: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
disabled: is_random,
min: 1,
max: 100,
className: NewEditmodules.baseFormItem,
style: {
width: 176
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 font14",
children: "\u5206"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u65B9\u5411&\u8BFE\u7A0B",
name: ['hack', 'sub_discipline_id'],
rules: [{
required: true,
message: '请选择课程'
}],
className: "".concat(NewEditmodules.baseLineHeight),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cascader/* default */.Z, {
className: NewEditmodules.baseFormItem,
disabled: is_random,
allowClear: false,
options: categorys,
placeholder: "\u8BF7\u9009\u62E9",
onChange: onChangeSubDiscipline,
popupClassName: NewEditmodules.cascaderPopup,
dropdownMenuColumnStyle: {
padding: '8px 12px',
fontSize: 14
}
})
}), isProgram ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u7F16\u7A0B\u8BED\u8A00",
style: {
paddingBottom: 16
},
name: ['hack', 'languages'],
rules: [{
required: true,
message: '请选择编程语言'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default.Group */.Z.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: 'C',
children: "C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: 'C++',
children: "C++"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: 'Java',
children: "Java"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: 'Python',
children: "Python"
})]
})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u7F16\u7A0B\u8BED\u8A00",
name: ['hack_codes', 'language'],
rules: [{
required: true,
message: '请选择编程语言'
}],
className: NewEditmodules.baseLineHeight,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default */.Z, {
className: NewEditmodules.baseFormItem,
onChange: onChangeLanguage,
children: (0,util/* getSelectOptions */.jw)(util/* Keys.language */.R8.language)
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default.Item */.Z.Item, {
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
lineHeight: '22px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5355\u4E2A\u6D4B\u8BD5\u96C6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u6700\u5927\u8BC4\u6D4B\u65F6\u957F"
})]
}),
required: true,
className: NewEditmodules.baseLineHeight,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: ['hack', 'time_limit'],
rules: [{
required: true,
message: '请输入单个测试集评测时长限制'
}, {
type: 'number',
min: 3,
message: '最小限制时间是3秒'
}],
noStyle: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
max: 10,
min: 3,
className: NewEditmodules.baseFormItem,
style: {
width: 316
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 font14",
children: "\u79D2"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8BC4\u6D4B\u5F97\u5206\u89C4\u8303",
name: ['hack', 'test_set_score'],
rules: [{
required: true
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
onChange: onChangeScore,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: true,
children: "\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6\u624D\u80FD\u83B7\u5F97\u5956\u52B1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: false,
children: "\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5956\u52B1"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mb30",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
marginLeft: 200
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: ['hack', "hide_actual_output"],
valuePropName: "checked",
noStyle: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_switch/* default */.Z, {})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "ml10",
children: "\u9690\u85CF\u5B66\u5458\u8BC4\u6D4B\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7"
})]
}), !hack.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: ['hack', 'test_set_average'],
label: "\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4",
rules: [{
required: true
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
onChange: onChangeAverage,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: true,
children: "\u5747\u5206\u6BD4\u4F8B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: false,
children: "\u81EA\u5B9A\u4E49\u6BD4\u4F8B"
})]
})
}), !hack.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
marginLeft: 200
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_switch/* default */.Z, {
onChange: function onChange(e) {
setisshow(e);
form.setFieldsValue({
hack: {
code_compile_score: 0
}
});
if (hack.test_set_average) {
if (hack.is_file) {
handleUploadRatio(uploadData);
} else {
onAddTestCases();
}
}
},
checked: isshow
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: "ml10",
children: ["\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#E99237'
},
children: "\uFF08\u82E5\u6CA1\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u5C06\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09"
})]
})]
}), isshow && !hack.test_set_score && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mb30",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
marginLeft: 200
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
rules: [{
required: true,
message: '请输入编译得分'
}],
name: ['hack', 'code_compile_score'],
style: {
marginBottom: 0
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
className: NewEditmodules.baseFormItem,
onChange: function onChange() {
if (hack.test_set_average) {
if (hack.is_file) {
handleUploadRatio(uploadData);
} else {
onAddTestCases();
}
}
},
parser: function parser(e) {
return isNaN(parseInt(e)) ? '' : parseInt(e);
},
min: 0,
max: 100
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "ml10",
children: "%"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: NewEditmodules.radioBtnWrapper,
name: ['hack', 'is_file'],
label: "\u7528\u4F8B\u7C7B\u578B",
rules: [{
required: true
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
onChange: onChangeFile,
optionType: "button",
className: NewEditmodules.testCaseTypeRadio,
options: [{
label: '文本',
value: false
}, {
label: '文件',
value: true
}]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u6D4B\u8BD5\u7528\u4F8B",
required: true,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NewEditmodules.uploadBtnWrapper,
children: [!hack.is_file && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: onAddTestCase,
children: "\u6DFB\u52A0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "ml20",
type: "primary",
onClick: function onClick() {
return setShowUploadFile(true);
},
children: "\u6279\u91CF\u4E0A\u4F20"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.upBtn,
children: (hack === null || hack === void 0 ? void 0 : hack.is_file) && /*#__PURE__*/(0,jsx_runtime.jsx)(UploadFile/* UploadTable */.Y2, {
className: NewEditmodules.uploadTableWrapper,
disabled: hack === null || hack === void 0 ? void 0 : hack.test_set_average,
inputChange: handleInputChange,
showScore: !hack.test_set_score,
data: uploadData,
onRemove: handleRemove
})
}), !hack.is_file && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.List */.Z.List, {
name: "hack_sets",
children: function children(fields, _ref2) {
objectDestructuringEmpty_default()(_ref2);
return /*#__PURE__*/(0,jsx_runtime.jsx)(collapse/* default */.Z, {
accordion: true,
bordered: false,
activeKey: activeKey,
onChange: setActiveKey,
className: NewEditmodules.collapseWrapper,
expandIcon: function expandIcon(_ref3) {
var isActive = _ref3.isActive;
return /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-weizhankai ".concat(isActive ? NewEditmodules.open : NewEditmodules.close),
style: {
fontSize: 14,
transition: 'all .2s'
}
});
},
children: fields.map(function (field, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(Panel, {
id: "scroll-key-".concat(field.key),
header: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
justify: "space-between",
wrap: false,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: NewEditmodules.panelHeader,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u6D4B\u8BD5\u7528\u4F8B", index + 1]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: 1,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
justify: "end",
wrap: false,
children: [!test_set_score && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: NewEditmodules.rateInput,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "mr20",
children: "\u8BC4\u5206\u5360\u6BD4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
onClick: onStopPropagation,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: [field.name, 'score'],
rules: [{
required: true,
message: "\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(index + 1, "\u8BC4\u5206")
}],
noStyle: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
className: NewEditmodules.baseFormItem,
min: 0,
max: 100,
disabled: test_set_average
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: "%"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: '78px',
className: NewEditmodules.operationWrapper,
children: index > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PlusCircleOutlined/* default */.Z, {
className: NewEditmodules.add,
onClick: function onClick(e) {
onStopPropagation(e);
onAddTestCase();
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(popconfirm/* default */.Z, {
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
title: '确定删除测试集' + (index + 1),
onCancel: onStopPropagation,
onConfirm: function onConfirm(e) {
onStopPropagation(e);
onRemoveTestCase(index);
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MinusCircleOutlined/* default */.Z, {
className: "".concat(NewEditmodules.remove, " ml20"),
onClick: onStopPropagation
})
})]
})
})]
})
})]
}),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8F93\u5165",
labelCol: {
span: 24
},
name: [field.name, 'input'],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
rows: 4
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8F93\u51FA",
labelCol: {
span: 24
},
name: [field.name, 'output'],
rules: [{
required: true,
message: '请输入输出内容'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
rows: 4
})
})]
}, field.key);
})
});
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.unfold,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
return setUnfold(!unfold);
},
children: ["\u66F4\u591A\u8BBE\u7F6E", unfold ? /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xialajiantou1"
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xialajiantoubeifen"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: unfold ? 'block' : 'none'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u96BE\u5EA6",
name: ['hack', 'difficult'],
className: NewEditmodules.radioBtnWrapper,
rules: [{
required: true,
message: '请选择难度'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
optionType: "button",
className: NewEditmodules.difficultyRadio,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Button */.ZP.Button, {
value: 1,
className: NewEditmodules.easy,
children: "\u7B80\u5355"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Button */.ZP.Button, {
value: 2,
className: NewEditmodules.medium,
children: "\u9002\u4E2D"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Button */.ZP.Button, {
value: 3,
className: NewEditmodules.hard,
children: "\u56F0\u96BE"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u77E5\u8BC6\u70B9",
name: ['hack', 'tag_discipline_ids'],
className: NewEditmodules.baseLineHeight,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Knowledge/* Knowledge */.N, {
selectvalues: (hack === null || hack === void 0 ? void 0 : hack.tag_discipline_id) || (hack === null || hack === void 0 ? void 0 : hack.tag_discipline_ids),
disabled: is_random,
subId: formValue === null || formValue === void 0 ? void 0 : (_formValue$hack = formValue.hack) === null || _formValue$hack === void 0 ? void 0 : (_formValue$hack$sub_d = _formValue$hack.sub_discipline_id) === null || _formValue$hack$sub_d === void 0 ? void 0 : _formValue$hack$sub_d[1],
knowledgeOptions: knowledgeOptions,
onAddKnowledgeFinish: handleAddKnowledgeFinish
})
}), !is_random && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
className: NewEditmodules.folderLineHeight,
label: '放入文件夹',
name: ['hack', 'item_banks_group_ids'],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FolderTree/* default */.Z, {
scrollId: "item_banks_group_ids"
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(UploadFile/* default */.ZP, {
rootIdentifier: null,
visible: showUploadFile,
onClose: function onClose() {
return setShowUploadFile(false);
},
onOK: addUploadData,
multiple: true,
defaultMultipleValue: hack === null || hack === void 0 ? void 0 : hack.is_file
})]
});
}
/* harmony default export */ var NewEdit_BaseInfo = (BaseInfo);
// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
var lodash = __webpack_require__(96486);
;// CONCATENATED MODULE: ./src/pages/Problems/OjForm/NewEdit/index.tsx
function getTimeStamp() {
return new Date().getTime();
}
var initialState = {
loading: true,
user: null,
disciplines: [],
dicts: null,
status: 0,
data: undefined,
lastedUpdateTime: 0
};
var Types = /*#__PURE__*/function (Types) {
Types[Types["SET_INITAL_DATA"] = 0] = "SET_INITAL_DATA";
Types[Types["SET_LOADING"] = 1] = "SET_LOADING";
Types[Types["SET_STATUS"] = 2] = "SET_STATUS";
return Types;
}({});
function reducer(state, action) {
switch (action.type) {
case Types.SET_INITAL_DATA:
return objectSpread2_default()(objectSpread2_default()({}, state), action.payload);
case Types.SET_LOADING:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
loading: action.payload
});
case Types.SET_STATUS:
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
status: action.payload
});
default:
throw new Error();
}
}
//problems/new?difficult=3&sub_discipline_id=95&tag_discipline_id=105&newoj=1&pages=1
///problems/p2mblri6/edit
//* 从课堂试卷编辑入口进来 http://localhost:8000/problems/i4b5wuhn/edit?type=exercises&express_id=2510&callback_url=/classrooms/1309/exercise/2510/edit
/* harmony default export */ var NewEdit = (function () {
var _data$hack, _data$hack4;
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
searchParams = _useSearchParams2[0];
var _useParams = (0,_umi_production_exports.useParams)(),
id = _useParams.id;
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),
knowledgeOptions = _useState4[0],
setKnowledgeOptions = _useState4[1];
var _useState5 = (0,react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
uploadData = _useState6[0],
setUploadData = _useState6[1];
var _useReducer = (0,react.useReducer)(reducer, initialState),
_useReducer2 = slicedToArray_default()(_useReducer, 2),
state = _useReducer2[0],
dispatch = _useReducer2[1];
var loading = state.loading,
data = state.data,
user = state.user,
disciplines = state.disciplines,
dicts = state.dicts,
status = state.status;
var hack_sets = data === null || data === void 0 ? void 0 : data.hack_sets;
var test_set_average = data === null || data === void 0 ? void 0 : (_data$hack = data.hack) === null || _data$hack === void 0 ? void 0 : _data$hack.test_set_average;
var _getJsonFromUrl = (0,utils_util/* getJsonFromUrl */.oP)(),
callback_url = _getJsonFromUrl.callback_url,
express_id = _getJsonFromUrl.express_id,
score = _getJsonFromUrl.score,
question_id = _getJsonFromUrl.question_id,
type = _getJsonFromUrl.type;
var _useState7 = (0,react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
MyGroup = _useState8[0],
setMyGroup = _useState8[1];
var _useState9 = (0,react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
isshows = _useState10[0],
setisshows = _useState10[1];
var isProgram = type === '1';
var categorys = (0,react.useMemo)(function () {
var rs = [];
if (disciplines) {
(0,util/* getDisciplineOptions */.D0)(disciplines, rs);
}
return rs;
}, [disciplines]);
var initData = (0,react.useCallback)( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var timeStamp,
discips,
response,
rs,
res,
category,
_user,
code,
language,
_hack_sets,
description,
difficult,
name,
open_or_not,
sub_discipline_id,
tag_discipline_id,
analysis,
time_limit,
_test_set_average,
test_set_score,
_status,
tag_discipline_ids,
item_banks_group_id,
_res$is_file,
is_file,
hide_actual_output,
code_compile_score,
languages,
is_my,
codes,
answer_text,
_getDisciplineIds,
_getDisciplineIds2,
ids,
dictData,
new_hack_sets,
_getJsonFromUrl2,
lastedUpdateTime,
newCodes,
_tagIds$split,
_tagIds$split2,
_yield$getUser,
_user2,
_getJsonFromUrl3,
_sub_discipline_id,
_tag_discipline_id,
tagIds,
banksIds,
_difficult,
_getDisciplineIds3,
_getDisciplineIds4,
_ids,
_dictData,
bankstime,
_args = arguments;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
timeStamp = _args.length > 0 && _args[0] !== undefined ? _args[0] : 0;
discips = disciplines;
if (!(discips.length === 0)) {
_context.next = 7;
break;
}
_context.next = 5;
return (0,service/* getDisciplines */.d1)('new_question');
case 5:
response = _context.sent;
discips = response.disciplines;
case 7:
if (!id) {
_context.next = 15;
break;
}
rs = {
disciplines: discips
};
_context.next = 11;
return (0,service/* getProgrammingTopic */.fu)(id);
case 11:
res = _context.sent;
if (res.message) {
if (res.status === '401') {
// history.push('/user/login')
document.location.href = '/user/login';
}
} else {
// console.log(res.hack_sets, 'response1')
category = res.category, _user = res.user, code = res.code, language = res.language, _hack_sets = res.hack_sets, description = res.description, difficult = res.difficult, name = res.name, open_or_not = res.open_or_not, sub_discipline_id = res.sub_discipline_id, tag_discipline_id = res.tag_discipline_id, analysis = res.analysis, time_limit = res.time_limit, _test_set_average = res.test_set_average, test_set_score = res.test_set_score, _status = res.status, tag_discipline_ids = res.tag_discipline_ids, item_banks_group_id = res.item_banks_group_id, _res$is_file = res.is_file, is_file = _res$is_file === void 0 ? false : _res$is_file, hide_actual_output = res.hide_actual_output, code_compile_score = res.code_compile_score, languages = res.languages, is_my = res.is_my, codes = res.codes, answer_text = res.answer_text; //
_getDisciplineIds = (0,util/* getDisciplineIds */.y3)(discips, sub_discipline_id), _getDisciplineIds2 = slicedToArray_default()(_getDisciplineIds, 2), ids = _getDisciplineIds2[0], dictData = _getDisciplineIds2[1]; // console.log('----',hack_sets);
new_hack_sets = is_file ? [{
input: '',
output: '',
score: 100,
position: 1
}] : _hack_sets;
if (is_file) {
setUploadData(_hack_sets);
form.setFieldsValue({
'hack_sets': new_hack_sets
});
} else {
setUploadData([]);
}
_getJsonFromUrl2 = (0,utils_util/* getJsonFromUrl */.oP)(), lastedUpdateTime = _getJsonFromUrl2.lastedUpdateTime;
newCodes = codes === null || codes === void 0 ? void 0 : codes.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
code: base64.Base64.decode(e === null || e === void 0 ? void 0 : e.code)
});
});
rs = objectSpread2_default()(objectSpread2_default()({}, rs), {}, {
loading: false,
user: _user,
dicts: dictData,
status: _status,
lastedUpdateTime: timeStamp ? timeStamp : lastedUpdateTime ? lastedUpdateTime : 0,
data: {
hack_codes: {
language: language,
code: base64.Base64.decode(code)
},
hack: {
category: category,
difficult: difficult,
name: name,
description: description,
open_or_not: open_or_not,
time_limit: time_limit,
test_set_average: _test_set_average,
test_set_score: test_set_score,
sub_discipline_id: ids,
tag_discipline_ids: tag_discipline_ids,
languages: languages,
score: score || 1,
item_banks_group_ids: item_banks_group_id,
is_file: is_file,
is_my: is_my,
code_compile_score: code_compile_score,
hide_actual_output: hide_actual_output,
analysis: analysis,
answer_text: answer_text
},
hack_sets: new_hack_sets,
tags: tag_discipline_ids,
codes: newCodes
}
});
if (parseInt(code_compile_score) > 0) {
setisshows(true);
}
dispatch({
type: Types.SET_INITAL_DATA,
payload: rs
});
setFormValue({
hack: {
category: category,
difficult: difficult,
name: name,
description: description,
open_or_not: open_or_not,
time_limit: time_limit,
test_set_average: _test_set_average,
test_set_score: test_set_score,
sub_discipline_id: ids,
tag_discipline_ids: tag_discipline_ids,
score: score || 1,
item_banks_group_ids: item_banks_group_id,
is_file: is_file,
analysis: analysis,
answer_text: answer_text
},
codes: newCodes
});
handleSetKnowledge(ids === null || ids === void 0 ? void 0 : ids[0], ids === null || ids === void 0 ? void 0 : ids[1], discips);
}
_context.next = 26;
break;
case 15:
_context.next = 17;
return (0,service/* getUser */.PR)();
case 17:
_yield$getUser = _context.sent;
_user2 = _yield$getUser.user;
_getJsonFromUrl3 = (0,utils_util/* getJsonFromUrl */.oP)(), _sub_discipline_id = _getJsonFromUrl3.sub_discipline_id, _tag_discipline_id = _getJsonFromUrl3.tag_discipline_id, tagIds = _getJsonFromUrl3.tagIds, banksIds = _getJsonFromUrl3.banksIds;
_difficult = 2; //默认适中难度不再通过url里的difficult参数设置默认值
_getDisciplineIds3 = (0,util/* getDisciplineIds */.y3)(discips, parseInt(_sub_discipline_id, 10)), _getDisciplineIds4 = slicedToArray_default()(_getDisciplineIds3, 2), _ids = _getDisciplineIds4[0], _dictData = _getDisciplineIds4[1];
bankstime = [Number(banksIds)];
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
loading: false,
user: _user2,
disciplines: discips,
status: 0,
dicts: _dictData,
data: {
hack_codes: {
language: 'C',
code: ''
},
hack: {
category: null,
difficult: _difficult,
time_limit: 3,
description: '',
test_set_score: true,
test_set_average: true,
open_or_not: true,
sub_discipline_id: _ids,
tag_discipline_id: tagIds && (tagIds === null || tagIds === void 0 ? void 0 : (_tagIds$split = tagIds.split(',')) === null || _tagIds$split === void 0 ? void 0 : _tagIds$split.map(function (x) {
return Number(x);
})),
name: '',
item_banks_group_ids: bankstime,
is_file: false,
answer_text: ''
},
tags: _tag_discipline_id ? _tag_discipline_id === null || _tag_discipline_id === void 0 ? void 0 : _tag_discipline_id.split(',').map(function (t) {
return parseInt(t, 10);
}) : [],
hack_sets: [{
input: '',
output: '',
score: 100,
position: 1
}]
}
}
});
setFormValue({
hack: {
category: null,
difficult: _difficult,
time_limit: 3,
description: '',
test_set_average: true,
open_or_not: true,
sub_discipline_id: _ids,
tag_discipline_id: tagIds && (tagIds === null || tagIds === void 0 ? void 0 : (_tagIds$split2 = tagIds.split(',')) === null || _tagIds$split2 === void 0 ? void 0 : _tagIds$split2.map(function (x) {
return Number(x);
})),
name: '',
item_banks_group_id: bankstime,
is_file: false,
answer_text: ''
}
});
handleSetKnowledge(_ids === null || _ids === void 0 ? void 0 : _ids[0], _ids === null || _ids === void 0 ? void 0 : _ids[1], discips);
case 26:
case "end":
return _context.stop();
}
}, _callee);
})), [id, disciplines]);
(0,react.useEffect)(function () {
try {
initData();
} catch (error) {
console.log(error, '----');
// history.replace('/user/login', { from: location.pathname })
}
}, []);
(0,react.useEffect)(function () {
//获取我的分组信息
function init() {
return _init.apply(this, arguments);
}
function _init() {
_init = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var data;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0,fetch/* get */.U2)('item_banks_groups/mine.json');
case 2:
data = _context2.sent;
setMyGroup(data);
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _init.apply(this, arguments);
}
init();
}, []);
var handleSetKnowledge = function handleSetKnowledge(id, subId, discips) {
var _discips$find, _discips$find$sub_dis, _discips$find$sub_dis2;
var options = discips === null || discips === void 0 ? void 0 : (_discips$find = discips.find(function (item) {
return item.id === id;
})) === null || _discips$find === void 0 ? void 0 : (_discips$find$sub_dis = _discips$find.sub_disciplines) === null || _discips$find$sub_dis === void 0 ? void 0 : (_discips$find$sub_dis2 = _discips$find$sub_dis.find(function (subItem) {
return subItem.id === subId;
})) === null || _discips$find$sub_dis2 === void 0 ? void 0 : _discips$find$sub_dis2.tag_disciplines;
// setKnowledgeOptions(options || []);
};
function onSubmit(_x, _x2, _x3) {
return _onSubmit.apply(this, arguments);
}
function _onSubmit() {
_onSubmit = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(values, saveType, is_cover) {
var _values, hack_sets, hack_codes, hack, tags, codes, update_hack_sets, new_hack_sets, sumScore, new_list, _iterator, _step, item, newCodes, res, _yield$updateExercise, _status2, _yield$addProgramming, identifier, exam_identifier, _res, _yield$addExerciseQue, _status3;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_values = objectSpread2_default()({}, values), hack_sets = _values.hack_sets, hack_codes = _values.hack_codes, hack = _values.hack, tags = _values.tags, codes = _values.codes;
update_hack_sets = [];
new_hack_sets = [];
sumScore = 0;
new_list = hack !== null && hack !== void 0 && hack.is_file ? uploadData.map(function (e, i) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
position: i + 1
});
}) : hack_sets.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
is_file: false
});
});
_iterator = createForOfIteratorHelper_default()(new_list);
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
item = _step.value;
sumScore += item.score;
if (item.id && item.id >= 0) {
update_hack_sets.push(item);
} else {
new_hack_sets.push(item);
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (new_list !== null && new_list !== void 0 && new_list.length) {
_context6.next = 10;
break;
}
message/* default.error */.ZP.error('测试集不能为空');
return _context6.abrupt("return");
case 10:
sumScore += parseInt(hack.code_compile_score || 0);
if (!(sumScore !== 100 && !hack.test_set_score)) {
_context6.next = 14;
break;
}
message/* default.error */.ZP.error('测试集的评分占比之和必须等于100');
return _context6.abrupt("return");
case 14:
if (!(new_list !== null && new_list !== void 0 && new_list.some(function (e) {
return !e.output;
}))) {
_context6.next = 17;
break;
}
message/* default.error */.ZP.error('测试集输出不能为空');
return _context6.abrupt("return");
case 17:
newCodes = {};
if (isProgram) {
codes === null || codes === void 0 ? void 0 : codes.forEach(function (e) {
newCodes[e.language] = e !== null && e !== void 0 && e.code ? base64.Base64.encode(e === null || e === void 0 ? void 0 : e.code) : '';
});
} else {
hack_codes.code = base64.Base64.encode(hack_codes === null || hack_codes === void 0 ? void 0 : hack_codes.code);
}
hack.sub_discipline_id = hack.sub_discipline_id[1];
dispatch({
type: Types.SET_LOADING,
payload: true
});
if (!callback_url) {
hack.score = hack.difficult * 100;
}
//编辑
if (!id) {
_context6.next = 50;
break;
}
_context6.next = 25;
return (0,service/* updateProgrammingTopic */.l_)(id, {
hack: hack,
hack_codes: hack_codes,
hack_sets: new_hack_sets,
update_hack_sets: update_hack_sets,
tags: tags,
is_cover: is_cover,
languages: hack.languages,
codes: newCodes
});
case 25:
if (!callback_url) {
_context6.next = 44;
break;
}
_context6.next = 28;
return (0,service/* publishProgrammingTopic */.j2)(id);
case 28:
if (!callback_url.includes('paperlibrary')) {
_context6.next = 34;
break;
}
_context6.next = 31;
return (0,paperlibrary/* createOrModifyQuestion */.oF)({
id: express_id,
question_id: question_id,
item_type: utils_enum/* QuestionType.Program */.c.Program,
name: hack.name,
question_score: hack.score,
difficulty: hack.difficult,
sub_discipline_id: hack.sub_discipline_id,
tag_discipline_ids: hack.tag_discipline_ids,
item_banks_group_ids: hack.item_banks_group_ids,
analysis: hack.analysis
// identifier: id
});
case 31:
res = _context6.sent;
if (res.status === 0) {
_umi_production_exports.history.replace(searchParams.get('callback_url'));
}
return _context6.abrupt("return");
case 34:
_context6.next = 36;
return (0,service/* updateExerciseQuestion */.GM)(question_id, {
question_type: 6,
question_score: hack.score,
question_title: hack.name,
description: hack.description,
sub_discipline_id: hack.sub_discipline_id,
tag_discipline_ids: hack.tag_discipline_ids,
item_banks_group_ids: hack.item_banks_group_ids,
identifier: id,
analysis: hack.analysis
});
case 36:
_yield$updateExercise = _context6.sent;
_status2 = _yield$updateExercise.status;
if (!(_status2 === 0)) {
_context6.next = 42;
break;
}
if (!(saveType === 'start')) {
_context6.next = 41;
break;
}
return _context6.abrupt("return");
case 41:
_umi_production_exports.history.replace(searchParams.get('callback_url'));
case 42:
_context6.next = 47;
break;
case 44:
// window.location.reload()
message/* default.success */.ZP.success('保存成功');
_umi_production_exports.history.replace('/problemset');
initData(getTimeStamp());
case 47:
dispatch({
type: Types.SET_LOADING,
payload: false
});
_context6.next = 80;
break;
case 50:
_context6.next = 52;
return (0,service/* addProgrammingTopic */.zQ)({
hack: hack,
hack_codes: hack_codes,
hack_sets: new_list,
tags: tags,
examination_bank_id: express_id || null
});
case 52:
_yield$addProgramming = _context6.sent;
identifier = _yield$addProgramming.identifier;
exam_identifier = _yield$addProgramming.exam_identifier;
dispatch({
type: Types.SET_LOADING,
payload: false
});
if (!(saveType === 'start')) {
_context6.next = 58;
break;
}
return _context6.abrupt("return");
case 58:
if (!identifier) {
_context6.next = 80;
break;
}
if (callback_url) {
_context6.next = 63;
break;
}
modal/* default.confirm */.Z.confirm({
icon: null,
title: '提示',
width: 452,
centered: true,
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u7F16\u7A0B\u9898\u5DF2\u4FDD\u5B58!\u76EE\u524D\u5916\u4E8E\u672A\u53D1\u5E03\u72B6\u6001\uFF0C\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802\uFF0C\u662F\u5426\u7ACB\u5373\u53D1\u5E03?"
}),
cancelText: '稍后再说',
okText: '立即发布',
onCancel: function onCancel() {
_umi_production_exports.history.replace('/problemset');
},
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return onPublish(identifier);
case 2:
_umi_production_exports.history.replace('/problemset');
case 3:
case "end":
return _context5.stop();
}
}, _callee5);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
// history.replace(`/problems/${identifier}/edit?lastedUpdateTime=${getTimeStamp()}`)
_context6.next = 80;
break;
case 63:
_context6.next = 65;
return (0,service/* publishProgrammingTopic */.j2)(identifier);
case 65:
if (id) {
_context6.next = 79;
break;
}
if (!callback_url.includes('paperlibrary')) {
_context6.next = 72;
break;
}
_context6.next = 69;
return (0,paperlibrary/* createOrModifyQuestion */.oF)({
id: express_id,
item_type: utils_enum/* QuestionType.Program */.c.Program,
name: hack.name,
question_score: hack.score,
difficulty: hack.difficult,
sub_discipline_id: hack.sub_discipline_id,
tag_discipline_ids: hack.tag_discipline_ids,
identifier: exam_identifier,
analysis: hack.analysis
});
case 69:
_res = _context6.sent;
if (_res.status === 0) {
_umi_production_exports.history.replace(searchParams.get('callback_url'));
}
return _context6.abrupt("return");
case 72:
_context6.next = 74;
return (0,service/* addExerciseQuestion */.MK)(parseInt(express_id, 10), {
question_type: 6,
question_score: hack.score,
question_title: hack.name,
identifier: identifier,
tag_discipline_ids: hack.tag_discipline_ids,
analysis: hack.analysis
});
case 74:
_yield$addExerciseQue = _context6.sent;
_status3 = _yield$addExerciseQue.status;
if (_status3 === 0) {
_umi_production_exports.history.replace(searchParams.get('callback_url'));
}
_context6.next = 80;
break;
case 79:
_umi_production_exports.history.replace(searchParams.get('callback_url'));
case 80:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _onSubmit.apply(this, arguments);
}
function onPublish(_x4) {
return _onPublish.apply(this, arguments);
}
function _onPublish() {
_onPublish = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(identifier) {
var response;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return (0,service/* publishProgrammingTopic */.j2)(identifier);
case 2:
response = _context7.sent;
if (response.status === 0) {
message/* default.success */.ZP.success('发布成功');
dispatch({
type: Types.SET_STATUS,
payload: 1
});
} else {
message/* default.info */.ZP.info(response.message);
}
case 4:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _onPublish.apply(this, arguments);
}
function onCancelPublish() {
return _onCancelPublish.apply(this, arguments);
}
function _onCancelPublish() {
_onCancelPublish = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
var response;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return (0,service/* cancelPublishProgrammingTopic */.ZS)(id);
case 2:
response = _context8.sent;
if (response.status === 0) {
message/* default.success */.ZP.success('撤销发布成功');
dispatch({
type: Types.SET_STATUS,
payload: 0
});
} else {
message/* default.info */.ZP.info(response.message);
}
case 4:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _onCancelPublish.apply(this, arguments);
}
function onChallenge() {
return _onChallenge.apply(this, arguments);
}
function _onChallenge() {
_onChallenge = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
var formValues;
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
formValues = form.getFieldsValue();
onSubmit(formValues, 'start');
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var _yield$startChallenge, identifier;
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return (0,service/* startChallenge */.uE)(id);
case 2:
_yield$startChallenge = _context9.sent;
identifier = _yield$startChallenge.identifier;
if (isProgram) {
window.location.href = "/myproblems/".concat(identifier, "?type=1");
} else {
window.location.href = "/myproblems/".concat(identifier);
}
case 5:
case "end":
return _context9.stop();
}
}, _callee9);
})), 400);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _onChallenge.apply(this, arguments);
}
function onBack() {
if (callback_url) {
console.log('---', searchParams.get('callback_url'));
_umi_production_exports.history.replace(searchParams.get('callback_url'));
} else {
if (isProgram) {
var _localStorage$getItem;
var item = (_localStorage$getItem = localStorage.getItem('program_homework')) === null || _localStorage$getItem === void 0 ? void 0 : _localStorage$getItem.split(',');
_umi_production_exports.history.push("/classrooms/".concat(item === null || item === void 0 ? void 0 : item[0], "/program_homework/").concat(item === null || item === void 0 ? void 0 : item[1], "/detail"));
} else {
_umi_production_exports.history.replace("/problemset");
}
}
}
var handleUploadRatio = function handleUploadRatio(testSetData) {
var code_compile_score = parseInt(form.getFieldValue('hack').code_compile_score) || 0;
var score = Math.floor((100 - code_compile_score) / testSetData.length);
var lastScore = score + (100 - code_compile_score) % testSetData.length;
var newTestSetData = 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
});
});
setUploadData(newTestSetData);
};
function onChangeScore(e) {
if (!e.target.value) {
handleUploadRatio(uploadData);
}
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack: objectSpread2_default()(objectSpread2_default()({}, data.hack), {}, {
test_set_score: e.target.value
})
})
}
});
}
function onChangeFile(e) {
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack: objectSpread2_default()(objectSpread2_default()({}, data.hack), {}, {
is_file: e.target.value
})
})
}
});
}
function onChangeAverage(e) {
var value = e.target.value;
if (value) {
handleUploadRatio(uploadData);
}
var currentHackSets = form.getFieldValue('hack_sets');
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_sets: currentHackSets,
hack: objectSpread2_default()(objectSpread2_default()({}, data.hack), {}, {
test_set_average: value
})
})
}
});
}
function onAddTestCase() {
var rs = form.getFieldValue('hack_sets');
var by = parseInt(form.getFieldValue('hack').code_compile_score) || 0;
var len = rs.length + 1;
var averageMark = Math.floor((100 - by) / len);
var remainder = (100 - by) % len;
rs.map(function (item, index) {
if (test_set_average) {
item.score = averageMark;
}
item.position = index + 1;
return item;
});
rs.push({
input: '',
output: '',
position: len,
score: test_set_average ? averageMark + remainder : 0
});
form.setFieldsValue({
'hack_sets': rs
});
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_sets: rs
})
}
});
setActiveKey(rs.length - 1);
setScrollFlag(true);
}
function onAddTestCases() {
var rs = form.getFieldValue('hack_sets');
var by = parseInt(form.getFieldValue('hack').code_compile_score) || 0;
var len = rs.length;
var averageMark = Math.floor((100 - by) / len);
var remainder = (100 - by) % len;
rs.map(function (item, index) {
if (test_set_average) {
item.score = averageMark;
if (index === rs.length - 1) {
item.score = averageMark + remainder;
}
}
item.position = index + 1;
return item;
});
form.setFieldsValue({
'hack_sets': rs
});
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_sets: rs
})
}
});
}
(0,react.useEffect)(function () {
if (test_set_average) {
var by = parseInt(form.getFieldValue('hack').code_compile_score) || 0;
var len = hack_sets === null || hack_sets === void 0 ? void 0 : hack_sets.length;
var averageMark = Math.floor((100 - by) / len);
var remainder = (100 - by) % len;
hack_sets === null || hack_sets === void 0 ? void 0 : hack_sets.map(function (item, index) {
item.score = averageMark;
item.position = index + 1;
if (index === len - 1) {
item.score = averageMark + remainder;
}
return item;
});
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_sets: hack_sets
})
}
});
form.setFieldsValue({
'hack_sets': hack_sets
});
}
}, [test_set_average]);
function onRemoveTestCase(index) {
var sets = form.getFieldValue('hack_sets');
var by = parseInt(form.getFieldValue('hack').code_compile_score) || 0;
var len = (sets === null || sets === void 0 ? void 0 : sets.length) - 1;
var averageMark = Math.floor((100 - by) / len);
var remainder = (100 - by) % len;
sets.splice(index, 1);
sets === null || sets === void 0 ? void 0 : sets.map(function (item, index) {
if (test_set_average) {
item.score = averageMark;
if (index === len - 1) {
item.score = averageMark + remainder;
}
}
item.position = index + 1;
return item;
});
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_sets: sets
})
}
});
form.setFieldsValue({
'hack_sets': sets
});
}
function onChangeLanguage(language) {
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_codes: objectSpread2_default()(objectSpread2_default()({}, data.hack_codes), {}, {
language: language
})
})
}
});
}
var handleValuesChange = function handleValuesChange(changedValues) {
var _changedValues$hack;
if (changedValues !== null && changedValues !== void 0 && (_changedValues$hack = changedValues.hack) !== null && _changedValues$hack !== void 0 && _changedValues$hack.sub_discipline_id) {
var _changedValues$hack2, _disciplines$find, _disciplines$find$sub, _disciplines$find$sub2, _form$getFieldsValue;
var _changedValues$hack$s = changedValues === null || changedValues === void 0 ? void 0 : (_changedValues$hack2 = changedValues.hack) === null || _changedValues$hack2 === void 0 ? void 0 : _changedValues$hack2.sub_discipline_id,
_changedValues$hack$s2 = slicedToArray_default()(_changedValues$hack$s, 2),
_id = _changedValues$hack$s2[0],
subId = _changedValues$hack$s2[1];
var options = disciplines === null || disciplines === void 0 ? void 0 : (_disciplines$find = disciplines.find(function (item) {
return item.id === _id;
})) === null || _disciplines$find === void 0 ? void 0 : (_disciplines$find$sub = _disciplines$find.sub_disciplines) === null || _disciplines$find$sub === void 0 ? void 0 : (_disciplines$find$sub2 = _disciplines$find$sub.find(function (subItem) {
return subItem.id === subId;
})) === null || _disciplines$find$sub2 === void 0 ? void 0 : _disciplines$find$sub2.tag_disciplines;
// setKnowledgeOptions(options);
var fieldData = objectSpread2_default()(objectSpread2_default()({}, form.getFieldsValue()), {}, {
hack: objectSpread2_default()(objectSpread2_default()({}, (_form$getFieldsValue = form.getFieldsValue()) === null || _form$getFieldsValue === void 0 ? void 0 : _form$getFieldsValue.hack), {}, {
tag_discipline_ids: []
})
});
form.setFieldsValue(fieldData);
setFormValue(fieldData);
} else {
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
}
};
var handleAddKnowledgeFinish = function handleAddKnowledgeFinish(item) {
setKnowledgeOptions([].concat(toConsumableArray_default()(knowledgeOptions), [objectSpread2_default()({}, item)]));
};
(0,react.useEffect)(function () {
var _data$hack2, _data$hack2$sub_disci;
if (data !== null && data !== void 0 && (_data$hack2 = data.hack) !== null && _data$hack2 !== void 0 && (_data$hack2$sub_disci = _data$hack2.sub_discipline_id) !== null && _data$hack2$sub_disci !== void 0 && _data$hack2$sub_disci[1]) {
var _data$hack3, _data$hack3$sub_disci;
getTagData(data === null || data === void 0 ? void 0 : (_data$hack3 = data.hack) === null || _data$hack3 === void 0 ? void 0 : (_data$hack3$sub_disci = _data$hack3.sub_discipline_id) === null || _data$hack3$sub_disci === void 0 ? void 0 : _data$hack3$sub_disci[1]);
}
}, [data === null || data === void 0 ? void 0 : (_data$hack4 = data.hack) === null || _data$hack4 === void 0 ? void 0 : _data$hack4.sub_discipline_id]);
//进来的时候 取一次值
var getTagData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(id) {
var res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0,exercise/* getTagDiscipline */.YY)({
sub_discipline_id: id
});
case 2:
res = _context3.sent;
setKnowledgeOptions(res.tag_disciplines);
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function getTagData(_x5) {
return _ref2.apply(this, arguments);
};
}();
//调用接口 获取knowledgeOptions
function onChangeSubDiscipline(values) {
// getTagData(values?.[1])
var subId = values[1];
var _getDisciplineIds5 = (0,util/* getDisciplineIds */.y3)(disciplines, subId),
_getDisciplineIds6 = slicedToArray_default()(_getDisciplineIds5, 2),
dictData = _getDisciplineIds6[1];
form.setFieldsValue({
tags: []
});
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
dicts: dictData,
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack: objectSpread2_default()(objectSpread2_default()({}, data.hack), {}, {
sub_discipline_id: values
}),
tags: []
})
}
});
}
var addUploadFnc = function addUploadFnc(files) {
var _form$getFieldValue, _form$getFieldValue$f;
var isFuc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (isFuc) {
return function () {
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack: objectSpread2_default()(objectSpread2_default()({}, data.hack), {}, {
is_file: true
})
})
}
});
form.setFieldsValue({
hack: {
is_file: true
}
});
};
}
var newFiles = files === null || files === void 0 ? void 0 : files.map(function (e) {
return {
input: e.input,
output: e.output,
score: 0,
position: 1
};
});
var sets = (_form$getFieldValue = form.getFieldValue('hack_sets')) === null || _form$getFieldValue === void 0 ? void 0 : (_form$getFieldValue$f = _form$getFieldValue.filter(function (e) {
return e.input || e.output;
})) === null || _form$getFieldValue$f === void 0 ? void 0 : _form$getFieldValue$f.concat(newFiles);
var by = parseInt(form.getFieldValue('hack').code_compile_score) || 0;
var len = sets === null || sets === void 0 ? void 0 : sets.length;
var averageMark = Math.floor((100 - by) / len);
var remainder = (100 - by) % len;
sets === null || sets === void 0 ? void 0 : sets.map(function (item, index) {
if (test_set_average) {
item.score = averageMark;
if (index === len - 1) {
item.score = averageMark + remainder;
}
}
item.position = index + 1;
return item;
});
dispatch({
type: Types.SET_INITAL_DATA,
payload: {
data: objectSpread2_default()(objectSpread2_default()({}, data), {}, {
hack_sets: sets,
hack: objectSpread2_default()(objectSpread2_default()({}, data.hack), {}, {
is_file: false
})
})
}
});
form.setFieldsValue({
'hack_sets': sets,
hack: {
is_file: false
}
});
};
var handleFinish = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var formValues, _errorInfo$errorField, _errorInfo$errorField2, _errorInfo$errorField3, _errorInfo$errorField4, _errorInfo$errorField5, firstErrorMessage;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.prev = 0;
_context4.next = 3;
return form.validateFields();
case 3:
formValues = form.getFieldsValue();
if (!(searchParams.get("exercise") && !callback_url.includes('paperlibrary'))) {
_context4.next = 7;
break;
}
modal/* default.confirm */.Z.confirm({
title: '保存提示',
content: '此题目已存在试题库中,是否将修改后的试题覆盖试题库的原题?',
okText: '覆盖原题',
cancelText: '不覆盖',
onOk: function onOk() {
return onSubmit(formValues, '', 1);
},
onCancel: function onCancel() {
return onSubmit(formValues, '', 0);
}
});
return _context4.abrupt("return");
case 7:
onSubmit(formValues, '', 1);
_context4.next = 15;
break;
case 10:
_context4.prev = 10;
_context4.t0 = _context4["catch"](0);
form.scrollToField(_context4.t0 === null || _context4.t0 === void 0 ? void 0 : (_errorInfo$errorField = _context4.t0.errorFields) === null || _errorInfo$errorField === void 0 ? void 0 : (_errorInfo$errorField2 = _errorInfo$errorField[0]) === null || _errorInfo$errorField2 === void 0 ? void 0 : _errorInfo$errorField2.name, {
behavior: 'smooth',
block: 'start'
});
firstErrorMessage = _context4.t0 === null || _context4.t0 === void 0 ? void 0 : (_errorInfo$errorField3 = _context4.t0.errorFields) === null || _errorInfo$errorField3 === void 0 ? void 0 : (_errorInfo$errorField4 = _errorInfo$errorField3[0]) === null || _errorInfo$errorField4 === void 0 ? void 0 : (_errorInfo$errorField5 = _errorInfo$errorField4.errors) === null || _errorInfo$errorField5 === void 0 ? void 0 : _errorInfo$errorField5[0];
message/* default.error */.ZP.error(firstErrorMessage);
case 15:
case "end":
return _context4.stop();
}
}, _callee4, null, [[0, 10]]);
}));
return function handleFinish() {
return _ref3.apply(this, arguments);
};
}();
var _useState11 = (0,react.useState)(),
_useState12 = slicedToArray_default()(_useState11, 2),
activeKey = _useState12[0],
setActiveKey = _useState12[1];
var _useState13 = (0,react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
scrollFlag = _useState14[0],
setScrollFlag = _useState14[1]; //标识activeKey的变动是不是由于添加测试用例如果是则需要滚动到相应位置
(0,react.useEffect)(function () {
if (scrollFlag) {
var newCaseDom = document.getElementById("scroll-key-".concat(activeKey));
newCaseDom === null || newCaseDom === void 0 ? void 0 : newCaseDom.scrollIntoView({
behavior: "smooth"
});
setScrollFlag(false);
}
}, [activeKey, scrollFlag]);
return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading,
delay: 500,
children: !data ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "vh100"
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NewEditmodules.bg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("header", {
className: NewEditmodules.header,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NewEditmodules.avatar,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(user === null || user === void 0 ? void 0 : user.image_url),
alt: "user"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: user === null || user === void 0 ? void 0 : user.name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NewEditmodules.title,
children: [" ", (data === null || data === void 0 ? void 0 : data.hack.name) || '编程题', " "]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NewEditmodules.exitBtn,
onClick: onBack,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon iconfont icon-tuichu1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u9000\u51FA"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
colon: false,
form: form,
initialValues: data,
onValuesChange: handleValuesChange,
labelCol: {
flex: '200px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.contentWrapper,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
className: NewEditmodules.tabWrapper,
tabBarGutter: 180,
centered: true,
items: [{
label: '基础信息',
key: '1',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(NewEdit_BaseInfo, {
onAddTestCases: onAddTestCases,
form: form,
handleAddKnowledgeFinish: handleAddKnowledgeFinish,
MyGroup: MyGroup,
formValue: formValue,
knowledgeOptions: knowledgeOptions,
onChangeLanguage: onChangeLanguage,
onChangeSubDiscipline: onChangeSubDiscipline,
onRemoveTestCase: onRemoveTestCase,
onAddTestCase: onAddTestCase,
dicts: dicts,
categorys: categorys,
callback_url: callback_url,
hack: data.hack,
onChangeScore: onChangeScore,
onChangeAverage: onChangeAverage,
onChangeFile: onChangeFile,
uploadData: uploadData,
setUploadData: setUploadData,
handleUploadRatio: handleUploadRatio,
isshows: isshows,
isProgram: isProgram,
addUploadFnc: addUploadFnc,
activeKey: activeKey,
setActiveKey: setActiveKey
})
}, {
label: '学员初始代码',
key: '2',
forceRender: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.codePanelWrapper,
children: isProgram ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: "codes",
noStyle: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(CodeProgramPanel/* default */.Z, {})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
name: ['hack_codes', 'code'],
noStyle: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(CodePanel/* default */.Z, {
language: data.hack_codes.language
})
})
})
}]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.buttonFixed,
children: !id ? /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.cancelBtn,
onClick: onBack,
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "".concat(NewEditmodules.saveBtn, " ml20"),
loading: loading,
type: "primary",
onClick: (0,lodash.throttle)(handleFinish, 1000),
children: "\u4FDD\u5B58"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: NewEditmodules.cancelBtn,
onClick: onBack,
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "".concat(NewEditmodules.saveBtn, " ml20"),
loading: loading,
type: "primary",
onClick: (0,lodash.throttle)(handleFinish, 1000),
children: "\u4FDD\u5B58"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
className: "".concat(NewEditmodules.challengeBtn, " ml20"),
onClick: (0,lodash.throttle)(onChallenge, 1000),
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon iconfont icon-kaishitiaozhan1 mr5 font14"
}),
children: status ? '开始挑战' : '模拟挑战'
})]
})
})]
})
});
});
/***/ }),
/***/ 38005:
/*!**********************************************!*\
!*** ./src/pages/Problems/OjForm/service.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "GM": function() { return /* binding */ updateExerciseQuestion; },
/* harmony export */ "MK": function() { return /* binding */ addExerciseQuestion; },
/* harmony export */ "PR": function() { return /* binding */ getUser; },
/* harmony export */ "ZS": function() { return /* binding */ cancelPublishProgrammingTopic; },
/* harmony export */ "d1": function() { return /* binding */ getDisciplines; },
/* harmony export */ "fu": function() { return /* binding */ getProgrammingTopic; },
/* harmony export */ "j2": function() { return /* binding */ publishProgrammingTopic; },
/* harmony export */ "l_": function() { return /* binding */ updateProgrammingTopic; },
/* harmony export */ "uE": function() { return /* binding */ startChallenge; },
/* harmony export */ "zQ": function() { return /* binding */ addProgrammingTopic; }
/* harmony export */ });
/* unused harmony export addTag */
/* harmony import */ var _utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch.ts */ 84519);
function getUser() {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)('problems/new.json');
}
function getDisciplines() {
var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'question';
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)("disciplines.json", {
source: source
});
}
function getProgrammingTopic(id) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)("problems/".concat(id, "/edit.json"));
}
function updateProgrammingTopic(id, params) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .put */ .gz)("problems/".concat(id, ".json"), params);
}
function addProgrammingTopic(params) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)("problems.json", params);
}
function addExerciseQuestion(exerciseId, params) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)("exercises/".concat(exerciseId, "/exercise_questions.json"), params);
}
function updateExerciseQuestion(id, params) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .put */ .gz)("exercise_questions/".concat(id, ".json"), params);
}
function publishProgrammingTopic(id) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)("problems/".concat(id, "/publish.json"));
}
function cancelPublishProgrammingTopic(id) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)("problems/".concat(id, "/cancel_publish.json"));
}
function startChallenge(id) {
return (0,_utils_fetch_ts__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)("problems/".concat(id, "/start.json"));
}
function addTag(sub_discipline_id, name) {
return post("tag_disciplines.json", {
name: name,
sub_discipline_id: sub_discipline_id
});
}
/***/ }),
/***/ 52238:
/*!********************************************!*\
!*** ./src/pages/Problems/OjForm/util.tsx ***!
\********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "D0": function() { return /* binding */ getDisciplineOptions; },
/* harmony export */ "R8": function() { return /* binding */ Keys; },
/* harmony export */ "jw": function() { return /* binding */ getSelectOptions; },
/* harmony export */ "y3": function() { return /* binding */ getDisciplineIds; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/defineProperty.js */ 38416);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 79035);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
var _Options;
var Option = antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"].Option */ .Z.Option;
var Keys = /*#__PURE__*/function (Keys) {
Keys[Keys["language"] = 0] = "language";
Keys[Keys["difficult"] = 1] = "difficult";
Keys[Keys["category"] = 2] = "category";
Keys[Keys["openOrNot"] = 3] = "openOrNot";
return Keys;
}({});
var Options = (_Options = {}, _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0___default()(_Options, Keys.language, [{
title: 'C',
key: 'C'
}, {
title: 'C++',
key: 'C++'
}, {
title: 'Python',
key: 'Python'
}, {
title: 'Java',
key: 'Java'
}, {
title: 'JavaScript',
key: 'JavaScript'
}, {
title: 'Ruby',
key: 'Ruby'
}]), _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0___default()(_Options, Keys.difficult, [{
title: '简单',
key: 1
}, {
title: '中等',
key: 2
}, {
title: '困难',
key: 3
}]), _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0___default()(_Options, Keys.category, [{
title: '程序设计',
key: 1
}, {
title: '算法',
key: 2
}]), _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_0___default()(_Options, Keys.openOrNot, [{
title: '公开',
key: 1
}, {
title: '私有',
key: 0
}]), _Options);
function getSelectOptions(name) {
return Options[name].map(function (item) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(Option, {
value: item.key,
children: [" ", item.title, " "]
}, item.title);
});
}
function getDisciplineOptions(data, result) {
data.map(function (value) {
var id = value.id,
name = value.name,
sub_disciplines = value.sub_disciplines;
var item = {
value: id,
label: name
};
result.push(item);
if (sub_disciplines && sub_disciplines.length > 0) {
item.children = [];
getDisciplineOptions(sub_disciplines, item.children);
}
});
}
function getDisciplineIds(data, sub_disciplines_id) {
var rs = [];
for (var index = 0; index < data.length; index++) {
var _value$sub_discipline;
var value = data[index];
if (((_value$sub_discipline = value.sub_disciplines) === null || _value$sub_discipline === void 0 ? void 0 : _value$sub_discipline.length) > 0) {
rs[0] = value.id;
for (var j = 0; j < value.sub_disciplines.length; j++) {
var item = value.sub_disciplines[j];
if (item.id === sub_disciplines_id) {
rs[1] = item.id;
return [rs, item.tag_disciplines || item.sub_disciplines || []];
}
}
}
}
return [rs, []];
}
/***/ }),
/***/ 70960:
/*!***************************!*\
!*** ./src/utils/enum.ts ***!
\***************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "c": function() { return /* binding */ QuestionType; }
/* harmony export */ });
/* unused harmony export PageType */
var PageType = /*#__PURE__*/function (PageType) {
PageType["FirstPage"] = "firstPage";
PageType["PrevPage"] = "prevPage";
PageType["NextPage"] = "nextPage";
return PageType;
}({});
var QuestionType = /*#__PURE__*/function (QuestionType) {
QuestionType[QuestionType["Single"] = 0] = "Single";
QuestionType[QuestionType["Multiple"] = 1] = "Multiple";
QuestionType[QuestionType["Judge"] = 2] = "Judge";
QuestionType[QuestionType["Fill"] = 3] = "Fill";
QuestionType[QuestionType["Subjective"] = 4] = "Subjective";
QuestionType[QuestionType["Shixun"] = 5] = "Shixun";
QuestionType[QuestionType["Program"] = 6] = "Program";
QuestionType[QuestionType["Combine"] = 7] = "Combine";
return QuestionType;
}({});
/***/ }),
/***/ 63778:
/*!******************************!*\
!*** ./src/utils/urlTool.ts ***!
\******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "G": function() { return /* binding */ fromStore; },
/* harmony export */ "t": function() { return /* binding */ toStore; }
/* harmony export */ });
/* harmony import */ var store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! store */ 58971);
/* harmony import */ var store__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(store__WEBPACK_IMPORTED_MODULE_0__);
var isDev = (/* unused pure expression or super */ null && ("production" === 'development'));
function toStore(key, val) {
var _config = store__WEBPACK_IMPORTED_MODULE_0___default().get('__ec');
if (!_config) _config = {};
_config[key] = val;
store__WEBPACK_IMPORTED_MODULE_0___default().set('__ec', _config);
}
function fromStore(key, defaultVal) {
var _config = store__WEBPACK_IMPORTED_MODULE_0___default().get('__ec');
if (!_config) return defaultVal;
return _config[key] === undefined ? defaultVal : _config[key];
}
/***/ }),
/***/ 52654:
/*!**********************************************************!*\
!*** ./src/components/QuestionEditor/index.less?modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
// extracted by mini-css-extract-plugin
/* harmony default export */ __webpack_exports__["Z"] = ({"wrap":"wrap___ilWvf","deleteIcon":"deleteIcon___JBDG8","keywordTag":"keywordTag___iieCb","questionTitleEditorWrap":"questionTitleEditorWrap___MHB5s","choiceWrap":"choiceWrap___QFkTc","choiceIndex":"choiceIndex___Mr2YO","judgementIndex":"judgementIndex___fUVWK","setAnswerBtn":"setAnswerBtn___Whox5","activeAnswer":"activeAnswer___fGU6Y","activeJudgementAnswer":"activeJudgementAnswer___wJv8P","actionWrapper":"actionWrapper___ERQ7k","addIcon":"addIcon___L9TE0","inputBorder":"inputBorder___Q5tRE","placeholder":"placeholder___p9sFY","blankWrapper":"blankWrapper___nC45e","blankInput":"blankInput___pEHsx","blankInputNumberWrapper":"blankInputNumberWrapper___uEHb0","addBtn":"addBtn___WR5ZI","blankIndex":"blankIndex___x9Pny","baseInputWrapper":"baseInputWrapper___eVsG7","collapseWrapper":"collapseWrapper___ZTysU","panelHeader":"panelHeader___QSN9g","open":"open___B6FU9","close":"close___QX19r","hide":"hide___mn25n"});
/***/ }),
/***/ 12867:
/*!****************************************************!*\
!*** ./src/components/tpi-code-setting/index.less ***!
\****************************************************/
/***/ (function() {
"use strict";
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 81643:
/*!**********************************************************!*\
!*** ./node_modules/antd/es/_util/getRenderPropValue.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* 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;
};
/***/ }),
/***/ 84567:
/*!************************************************************!*\
!*** ./node_modules/antd/es/checkbox/index.js + 3 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// 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);
/***/ }),
/***/ 79531:
/*!*********************************************************!*\
!*** ./node_modules/antd/es/input/index.js + 5 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ input; }
});
// 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/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
var context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
var form_context = __webpack_require__(65223);
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
var style = __webpack_require__(47673);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Group.js
const Group = props => {
const {
getPrefixCls,
direction
} = (0,react.useContext)(context/* ConfigContext */.E_);
const {
prefixCls: customizePrefixCls,
className
} = props;
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
const inputPrefixCls = getPrefixCls('input');
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
const cls = classnames_default()(prefixCls, {
[`${prefixCls}-lg`]: props.size === 'large',
[`${prefixCls}-sm`]: props.size === 'small',
[`${prefixCls}-compact`]: props.compact,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, hashId, className);
const formItemContext = (0,react.useContext)(form_context/* FormItemInputContext */.aM);
const groupFormItemContext = (0,react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
isFormItemInput: false
}), [formItemContext]);
if (false) {}
return wrapSSR( /*#__PURE__*/react.createElement("span", {
className: cls,
style: props.style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
onFocus: props.onFocus,
onBlur: props.onBlur
}, /*#__PURE__*/react.createElement(form_context/* FormItemInputContext.Provider */.aM.Provider, {
value: groupFormItemContext
}, props.children)));
};
/* harmony default export */ var input_Group = (Group);
// EXTERNAL MODULE: ./node_modules/antd/es/input/Input.js + 1 modules
var Input = __webpack_require__(82586);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
// This icon file is generated automatically.
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
// 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/EyeInvisibleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_EyeInvisibleOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
var EyeOutlined = __webpack_require__(99611);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js
var omit = __webpack_require__(10366);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__(17799);
// EXTERNAL MODULE: ./node_modules/antd/es/input/hooks/useRemovePasswordTimeout.js
var useRemovePasswordTimeout = __webpack_require__(72922);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Password.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 defaultIconRender = visible => visible ? /*#__PURE__*/react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/react.createElement(icons_EyeInvisibleOutlined, null);
const ActionMap = {
click: 'onClick',
hover: 'onMouseOver'
};
const Password = /*#__PURE__*/react.forwardRef((props, ref) => {
const {
visibilityToggle = true
} = props;
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
const [visible, setVisible] = (0,react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
const inputRef = (0,react.useRef)(null);
react.useEffect(() => {
if (visibilityControlled) {
setVisible(visibilityToggle.visible);
}
}, [visibilityControlled, visibilityToggle]);
// Remove Password value
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
const onVisibleChange = () => {
const {
disabled
} = props;
if (disabled) {
return;
}
if (visible) {
removePasswordTimeout();
}
setVisible(prevState => {
var _a;
const newState = !prevState;
if (typeof visibilityToggle === 'object') {
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
}
return newState;
});
};
const getIcon = prefixCls => {
const {
action = 'click',
iconRender = defaultIconRender
} = props;
const iconTrigger = ActionMap[action] || '';
const icon = iconRender(visible);
const iconProps = {
[iconTrigger]: onVisibleChange,
className: `${prefixCls}-icon`,
key: 'passwordIcon',
onMouseDown: e => {
// Prevent focused state lost
// https://github.com/ant-design/ant-design/issues/15173
e.preventDefault();
},
onMouseUp: e => {
// Prevent caret position change
// https://github.com/ant-design/ant-design/issues/23524
e.preventDefault();
}
};
return /*#__PURE__*/react.cloneElement( /*#__PURE__*/react.isValidElement(icon) ? icon : /*#__PURE__*/react.createElement("span", null, icon), iconProps);
};
const {
className,
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
size
} = props,
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
const {
getPrefixCls
} = react.useContext(context/* ConfigContext */.E_);
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
const suffixIcon = visibilityToggle && getIcon(prefixCls);
const inputClassName = classnames_default()(prefixCls, className, {
[`${prefixCls}-${size}`]: !!size
});
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
type: visible ? 'text' : 'password',
className: inputClassName,
prefixCls: inputPrefixCls,
suffix: suffixIcon
});
if (size) {
omittedProps.size = size;
}
return /*#__PURE__*/react.createElement(Input/* default */.Z, Object.assign({
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
}, omittedProps));
});
if (false) {}
/* harmony default export */ var input_Password = (Password);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
var SearchOutlined = __webpack_require__(68795);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__(96159);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
var useSize = __webpack_require__(98675);
// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js
var Compact = __webpack_require__(4173);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Search.js
var Search_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const Search = /*#__PURE__*/react.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
className,
size: customizeSize,
suffix,
enterButton = false,
addonAfter,
loading,
disabled,
onSearch: customOnSearch,
onChange: customOnChange,
onCompositionStart,
onCompositionEnd
} = props,
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
const {
getPrefixCls,
direction
} = react.useContext(context/* ConfigContext */.E_);
const composedRef = react.useRef(false);
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
const {
compactSize
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
const size = (0,useSize/* default */.Z)(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
const inputRef = react.useRef(null);
const onChange = e => {
if (e && e.target && e.type === 'click' && customOnSearch) {
customOnSearch(e.target.value, e);
}
if (customOnChange) {
customOnChange(e);
}
};
const onMouseDown = e => {
var _a;
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
e.preventDefault();
}
};
const onSearch = e => {
var _a, _b;
if (customOnSearch) {
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e);
}
};
const onPressEnter = e => {
if (composedRef.current || loading) {
return;
}
onSearch(e);
};
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/react.createElement(SearchOutlined/* default */.Z, null) : null;
const btnClassName = `${prefixCls}-button`;
let button;
const enterButtonAsElement = enterButton || {};
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
if (isAntdButton || enterButtonAsElement.type === 'button') {
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
onMouseDown,
onClick: e => {
var _a, _b;
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
onSearch(e);
},
key: 'enterButton'
}, isAntdButton ? {
className: btnClassName,
size
} : {}));
} else {
button = /*#__PURE__*/react.createElement(es_button/* default */.ZP, {
className: btnClassName,
type: enterButton ? 'primary' : undefined,
size: size,
disabled: disabled,
key: "enterButton",
onMouseDown: onMouseDown,
onClick: onSearch,
loading: loading,
icon: searchIcon
}, enterButton);
}
if (addonAfter) {
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
key: 'addonAfter'
})];
}
const cls = classnames_default()(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${size}`]: !!size,
[`${prefixCls}-with-button`]: !!enterButton
}, className);
const handleOnCompositionStart = e => {
composedRef.current = true;
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
};
const handleOnCompositionEnd = e => {
composedRef.current = false;
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
};
return /*#__PURE__*/react.createElement(Input/* default */.Z, Object.assign({
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
onPressEnter: onPressEnter
}, restProps, {
size: size,
onCompositionStart: handleOnCompositionStart,
onCompositionEnd: handleOnCompositionEnd,
prefixCls: inputPrefixCls,
addonAfter: button,
suffix: suffix,
onChange: onChange,
className: cls,
disabled: disabled
}));
});
if (false) {}
/* harmony default export */ var input_Search = (Search);
// EXTERNAL MODULE: ./node_modules/antd/es/input/TextArea.js
var TextArea = __webpack_require__(96330);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/index.js
'use client';
const input_Input = Input/* default */.Z;
if (false) {}
input_Input.Group = input_Group;
input_Input.Search = input_Search;
input_Input.TextArea = TextArea/* default */.Z;
input_Input.Password = input_Password;
/* harmony default export */ var input = (input_Input);
/***/ }),
/***/ 66330:
/*!***************************************************!*\
!*** ./node_modules/antd/es/popover/PurePanel.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* 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__) {
"use strict";
/* 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__) {
"use strict";
/* 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']]
}));
/***/ }),
/***/ 19575:
/*!******************************************!*\
!*** ./node_modules/js-base64/base64.js ***!
\******************************************/
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
* base64.js
*
* Licensed under the BSD 3-Clause License.
* http://opensource.org/licenses/BSD-3-Clause
*
* References:
* http://en.wikipedia.org/wiki/Base64
*/
;(function (global, factory) {
true
? module.exports = factory(global)
: 0
}((
typeof self !== 'undefined' ? self
: typeof window !== 'undefined' ? window
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
: this
), function(global) {
'use strict';
// existing version for noConflict()
global = global || {};
var _Base64 = global.Base64;
var version = "2.6.4";
// constants
var b64chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var b64tab = function(bin) {
var t = {};
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
return t;
}(b64chars);
var fromCharCode = String.fromCharCode;
// encoder stuff
var cb_utob = function(c) {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
+ fromCharCode(0x80 | (cc & 0x3f)))
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
} else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
}
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = function(u) {
return u.replace(re_utob, cb_utob);
};
var cb_encode = function(ccc) {
var padlen = [0, 2, 1][ccc.length % 3],
ord = ccc.charCodeAt(0) << 16
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
chars = [
b64chars.charAt( ord >>> 18),
b64chars.charAt((ord >>> 12) & 63),
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
];
return chars.join('');
};
var btoa = global.btoa && typeof global.btoa == 'function'
? function(b){ return global.btoa(b) } : function(b) {
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
'The string contains invalid characters.'
);
return b.replace(/[\s\S]{1,3}/g, cb_encode);
};
var _encode = function(u) {
return btoa(utob(String(u)));
};
var mkUriSafe = function (b64) {
return b64.replace(/[+\/]/g, function(m0) {
return m0 == '+' ? '-' : '_';
}).replace(/=/g, '');
};
var encode = function(u, urisafe) {
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
};
var encodeURI = function(u) { return encode(u, true) };
var fromUint8Array;
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
// return btoa(fromCharCode.apply(null, a));
var b64 = '';
for (var i = 0, l = a.length; i < l; i += 3) {
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
var ord = a0 << 16 | a1 << 8 | a2;
b64 += b64chars.charAt( ord >>> 18)
+ b64chars.charAt((ord >>> 12) & 63)
+ ( typeof a1 != 'undefined'
? b64chars.charAt((ord >>> 6) & 63) : '=')
+ ( typeof a2 != 'undefined'
? b64chars.charAt( ord & 63) : '=');
}
return urisafe ? mkUriSafe(b64) : b64;
};
// decoder stuff
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
var cb_btou = function(cccc) {
switch(cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)),
offset = cp - 0x10000;
return (fromCharCode((offset >>> 10) + 0xD800)
+ fromCharCode((offset & 0x3FF) + 0xDC00));
case 3:
return fromCharCode(
((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2))
);
default:
return fromCharCode(
((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1))
);
}
};
var btou = function(b) {
return b.replace(re_btou, cb_btou);
};
var cb_decode = function(cccc) {
var len = cccc.length,
padlen = len % 4,
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
chars = [
fromCharCode( n >>> 16),
fromCharCode((n >>> 8) & 0xff),
fromCharCode( n & 0xff)
];
chars.length -= [0, 0, 2, 1][padlen];
return chars.join('');
};
var _atob = global.atob && typeof global.atob == 'function'
? function(a){ return global.atob(a) } : function(a){
return a.replace(/\S{1,4}/g, cb_decode);
};
var atob = function(a) {
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
};
var _decode = function(a) { return btou(_atob(a)) };
var _fromURI = function(a) {
return String(a).replace(/[-_]/g, function(m0) {
return m0 == '-' ? '+' : '/'
}).replace(/[^A-Za-z0-9\+\/]/g, '');
};
var decode = function(a){
return _decode(_fromURI(a));
};
var toUint8Array;
if (global.Uint8Array) toUint8Array = function(a) {
return Uint8Array.from(atob(_fromURI(a)), function(c) {
return c.charCodeAt(0);
});
};
var noConflict = function() {
var Base64 = global.Base64;
global.Base64 = _Base64;
return Base64;
};
// export Base64
global.Base64 = {
VERSION: version,
atob: atob,
btoa: btoa,
fromBase64: decode,
toBase64: encode,
utob: utob,
encode: encode,
encodeURI: encodeURI,
btou: btou,
decode: decode,
noConflict: noConflict,
fromUint8Array: fromUint8Array,
toUint8Array: toUint8Array
};
// if ES5 is available, make Base64.extendString() available
if (typeof Object.defineProperty === 'function') {
var noEnum = function(v){
return {value:v,enumerable:false,writable:true,configurable:true};
};
global.Base64.extendString = function () {
Object.defineProperty(
String.prototype, 'fromBase64', noEnum(function () {
return decode(this)
}));
Object.defineProperty(
String.prototype, 'toBase64', noEnum(function (urisafe) {
return encode(this, urisafe)
}));
Object.defineProperty(
String.prototype, 'toBase64URI', noEnum(function () {
return encode(this, true)
}));
};
}
//
// export Base64 to the namespace
//
if (global['Meteor']) { // Meteor.js
Base64 = global.Base64;
}
// module.exports and AMD are mutually exclusive.
// module.exports has precedence.
if ( true && module.exports) {
module.exports.Base64 = global.Base64;
}
else if (true) {
// AMD. Register as an anonymous module.
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
// that's it!
return {Base64: global.Base64}
}));
/***/ }),
/***/ 4977:
/*!********************************************!*\
!*** ./src/assets/images/icons/nodata.png ***!
\********************************************/
/***/ (function(module) {
"use strict";
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5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pUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg==";
/***/ }),
/***/ 73631:
/*!********************************************************!*\
!*** ./src/assets/images/problemset/folder-closed.png ***!
\********************************************************/
/***/ (function(module) {
"use strict";
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII=";
/***/ }),
/***/ 5623:
/*!********************************************************!*\
!*** ./src/assets/images/problemset/folder-opened.png ***!
\********************************************************/
/***/ (function(module) {
"use strict";
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAedJREFUOBGtVDtLA0EQ/jY5z7dgEBVJLHyAitpYWQqKjVZa5BfEKpWlWPgrLG0UEdTexkILRUQiSBBBCAhGUINFHia53Dm7ufXcvfgIOHA3O69vvtnbPeY4ThD/KIF/xBJQhg/wbmkZtj0KMKbEGNIweg4xuPmq+DWDKSOfz2/AqaxpOVWzip8HC2xTsydfjoMHhMd2VMDjkSswTPqSucOhh3PmupaIediBOnL52UTLENC7QCV1bC9vkjkF3i4WVUDeORIF2sf5ymOk7mY1pr87hoHEhekHDLYQOfck8c6c6OeYfPHN3LyOxEB2KwQru0LrBvTPdaGRipj7ISUzqUWJ/moiRyc1tUXAQP42Tsa6sEIRCtwDRXqESDYS8RuG5iyRMEWFAat4CbvsAmgFmukmeYofJYeSAimab0L4DfQNHiF1laFAyMv840o2zN3Q1FMuIOIWStF9OtAxH4xkIC8NZyN9SnIOsNISkLRd3EWlFBP0lQJtDzVTyc8mBKB3U65nUnBYmDaFAr98BFGqvYKtwOMZHRsp1vsedVxV8bQRJXu5BbKWa6sAmK1lj2FiOoLcS5LYNX/N+3ktp+GapFJMeoDccdI9gEJ2nW5HhJjKuXmktih7yjJoC8VVwNpldXnr+KX8DfcD09mnwzz7SXEAAAAASUVORK5CYII=";
/***/ })
}]);