(self["webpackChunk"] = self["webpackChunk"] || []).push([[77460,4977,11436,59741,30935],{ /***/ 61731: /*!******************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CopyOutlined.js + 1 modules ***! \******************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_CopyOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(61796); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/CopyOutlined.js // This icon file is generated automatically. var CopyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, "name": "copy", "theme": "outlined" }; /* harmony default export */ var asn_CopyOutlined = (CopyOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CopyOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CopyOutlined_CopyOutlined = function CopyOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_CopyOutlined })); }; if (false) {} /* harmony default export */ var icons_CopyOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(CopyOutlined_CopyOutlined)); /***/ }), /***/ 66549: /*!**********************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules ***! \**********************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_DownloadOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(61796); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/DownloadOutlined.js // This icon file is generated automatically. var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" }; /* harmony default export */ var asn_DownloadOutlined = (DownloadOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DownloadOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var DownloadOutlined_DownloadOutlined = function DownloadOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_DownloadOutlined })); }; if (false) {} /* harmony default export */ var icons_DownloadOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(DownloadOutlined_DownloadOutlined)); /***/ }), /***/ 80045: /*!*******************************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@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@7.23.5@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(61796); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@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@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@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_17_0_2_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_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined)); /***/ }), /***/ 84922: /*!******************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FormOutlined.js + 1 modules ***! \******************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_FormOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(61796); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/FormOutlined.js // This icon file is generated automatically. var FormOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z" } }] }, "name": "form", "theme": "outlined" }; /* harmony default export */ var asn_FormOutlined = (FormOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FormOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var FormOutlined_FormOutlined = function FormOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_FormOutlined })); }; if (false) {} /* harmony default export */ var icons_FormOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(FormOutlined_FormOutlined)); /***/ }), /***/ 22321: /*!**********************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules ***! \**********************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_PoweroffOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(61796); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/PoweroffOutlined.js // This icon file is generated automatically. var PoweroffOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z" } }] }, "name": "poweroff", "theme": "outlined" }; /* harmony default export */ var asn_PoweroffOutlined = (PoweroffOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PoweroffOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var PoweroffOutlined_PoweroffOutlined = function PoweroffOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_PoweroffOutlined })); }; if (false) {} /* harmony default export */ var icons_PoweroffOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(PoweroffOutlined_PoweroffOutlined)); /***/ }), /***/ 91671: /*!********************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***! \********************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_ReloadOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(61796); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/ReloadOutlined.js // This icon file is generated automatically. var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" }; /* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ReloadOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_ReloadOutlined })); }; if (false) {} /* harmony default export */ var icons_ReloadOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ReloadOutlined_ReloadOutlined)); /***/ }), /***/ 80330: /*!*********************************!*\ !*** ./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 */ 78130); 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"] */ .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'; /***/ }), /***/ 73863: /*!************************************************************!*\ !*** ./src/components/ChunkedUpload/index.tsx + 1 modules ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ components_ChunkedUpload; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js var regeneratorRuntime = __webpack_require__(10574); var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(26801); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js var asyncToGenerator = __webpack_require__(39343); var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(11006); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(91506); // EXTERNAL MODULE: ./node_modules/_uuid@8.3.0@uuid/dist/esm-browser/v4.js + 4 modules var v4 = __webpack_require__(1012); // EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js var _classnames_2_3_2_classnames = __webpack_require__(12124); var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); ;// CONCATENATED MODULE: ./src/components/ChunkedUpload/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var ChunkedUploadmodules = ({"upload":"upload___jpwPD"}); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js var jsx_runtime = __webpack_require__(37712); ;// CONCATENATED MODULE: ./src/components/ChunkedUpload/index.tsx var ChunkedUpload = function ChunkedUpload(_ref, ref) { var _ref$chunkSize = _ref.chunkSize, chunkSize = _ref$chunkSize === void 0 ? 1024 * 1024 * 2 : _ref$chunkSize, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options, onCancel = _ref.onCancel, onComplete = _ref.onComplete, onError = _ref.onError, onProgress = _ref.onProgress, onBefore = _ref.onBefore, onBeginInitFile = _ref.onBeginInitFile, children = _ref.children, accept = _ref.accept, className = _ref.className, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, _ref$concurrency = _ref.concurrency, concurrency = _ref$concurrency === void 0 ? 4 : _ref$concurrency; var _useState = (0,_react_17_0_2_react.useState)('ready'), _useState2 = slicedToArray_default()(_useState, 2), uploadStatus = _useState2[0], setUploadStatus = _useState2[1]; //组件内调试 var _useState3 = (0,_react_17_0_2_react.useState)(0), _useState4 = slicedToArray_default()(_useState3, 2), progress = _useState4[0], setProgress = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(''), _useState6 = slicedToArray_default()(_useState5, 2), uploadStatusMessage = _useState6[0], setUploadStatusMessage = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)(null), _useState8 = slicedToArray_default()(_useState7, 2), file = _useState8[0], setFile = _useState8[1]; var abortControllerRef = (0,_react_17_0_2_react.useRef)(null); var domId = (0,_react_17_0_2_react.useRef)((0,v4/* default */.Z)()); var cancelStatus = (0,_react_17_0_2_react.useRef)(false); (0,_react_17_0_2_react.useImperativeHandle)(ref, function () { return { cancel: cancel, file: file, uploadStatus: uploadStatus }; }); var clearInput = function clearInput() { var input = document.getElementById(domId.current); if (input) { input.value = ''; } }; var handleUpload = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(file) { var fileSize, totalChunks, res, uploadId, promises, percent, _loop, i, completed, step, _promises$slice, subTasks, p, uploadRes; return regeneratorRuntime_default()().wrap(function _callee$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: if (!(uploadStatus === 'uploading')) { _context2.next = 2; break; } return _context2.abrupt("return"); case 2: if (onBeginInitFile) { onBeginInitFile(file); } fileSize = file.size; totalChunks = Math.ceil(fileSize / chunkSize); cancelStatus.current = false; setUploadStatus('uploading'); setProgress(0); setUploadStatusMessage(''); _context2.prev = 9; _context2.next = 12; return (0,fetch/* default */.ZP)("/api/attachments/multipart_upload_start", { method: 'POST', body: objectSpread2_default()({ fileName: file.name, chunkCount: totalChunks }, options) }); case 12: res = _context2.sent; if (!(cancelStatus.current || (res === null || res === void 0 ? void 0 : res.status) !== 0)) { _context2.next = 15; break; } throw new Error(); case 15: uploadId = res.upload_id; abortControllerRef.current = new AbortController(); promises = []; percent = 0; _loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop() { var start, end, chunk, formData, key; return regeneratorRuntime_default()().wrap(function _loop$(_context) { while (1) switch (_context.prev = _context.next) { case 0: start = i * chunkSize; end = Math.min(start + chunkSize, fileSize); chunk = file.slice(start, end); formData = new FormData(); formData.append('chunk', chunk); formData.append('fileName', file.name); formData.append('chunkIndex', (i + 1).toString()); formData.append('uploadId', uploadId); for (key in options) { if (Object.prototype.hasOwnProperty.call(options, key)) { formData.append(key, options[key]); } } promises.push(function () { return (0,fetch/* default */.ZP)("/api/attachments/multipart_upload", { method: 'POST', body: formData, signal: abortControllerRef.current.signal }, true).then(function (res) { console.log(res, 444); percent++; var currentProgress = Math.round(percent / totalChunks * 100); setProgress(currentProgress); if (onProgress) { onProgress(objectSpread2_default()(objectSpread2_default()({}, res), {}, { file: file, percent: currentProgress })); } }); }); case 10: case "end": return _context.stop(); } }, _loop); }); i = 0; case 21: if (!(i < totalChunks)) { _context2.next = 26; break; } return _context2.delegateYield(_loop(), "t0", 23); case 23: i++; _context2.next = 21; break; case 26: completed = 0; step = concurrency; console.log(promises, 'promises'); case 29: if (!(completed < promises.length)) { _context2.next = 38; break; } subTasks = (_promises$slice = promises.slice(completed, completed + step)) === null || _promises$slice === void 0 ? void 0 : _promises$slice.map(function (t) { return t(); }); if (!(subTasks.length > 0)) { _context2.next = 36; break; } _context2.next = 34; return Promise.all(subTasks); case 34: p = _context2.sent; completed += step; case 36: _context2.next = 29; break; case 38: _context2.next = 40; return (0,fetch/* default */.ZP)("/api/attachments/multipart_upload_end", { method: 'POST', body: objectSpread2_default()({ fileName: file.name, chunkCount: totalChunks, uploadId: uploadId }, options) }); case 40: uploadRes = _context2.sent; if (!!uploadRes.object) { setUploadStatus('success'); clearInput(); if (onComplete) { onComplete(objectSpread2_default()(objectSpread2_default()({}, uploadRes), {}, { file: file, percent: 100 })); } } else { setUploadStatus('error'); setUploadStatusMessage('上传失败,请稍后重试'); clearInput(); if (onError) { onError(file.name); } } _context2.next = 50; break; case 44: _context2.prev = 44; _context2.t1 = _context2["catch"](9); setUploadStatus('error'); setUploadStatusMessage('上传失败,请稍后重试'); clearInput(); if (onError) { onError(file.name); } case 50: case "end": return _context2.stop(); } }, _callee, null, [[9, 44]]); })); return function handleUpload(_x) { return _ref2.apply(this, arguments); }; }(); var cancel = (0,_react_17_0_2_react.useCallback)(function () { cancelStatus.current = true; if (abortControllerRef.current) { abortControllerRef.current.abort(); if (onCancel) { onCancel(); } } }, [onCancel]); var handleChangeUpload = function handleChangeUpload(e) { var _e$target; var file = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target = _e$target.files) === null || _e$target === void 0 ? void 0 : _e$target[0]; setFile(file); uploadStatus = 'ready'; if (!file) { return; } if (onBefore) { var bool = onBefore(file); if (!bool) { handleUpload(file); } clearInput(); return; } handleUpload(file); }; return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", { type: "file", id: domId.current, style: { display: 'none' }, onChange: handleChangeUpload, accept: accept }), /*#__PURE__*/(0,jsx_runtime.jsx)("label", { className: _classnames_2_3_2_classnames_default()(ChunkedUploadmodules.upload, className), htmlFor: domId.current, style: style, children: children })] }); }; /* harmony default export */ var components_ChunkedUpload = (/*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(ChunkedUpload)); /***/ }), /***/ 73208: /*!*****************************************!*\ !*** ./src/components/NoData/index.tsx ***! \*****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801); /* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301); /* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314); /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712); var noData = function noData(_ref) { var img = _ref.img, _ref$buttonProps = _ref.buttonProps, buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps, _ref$styles = _ref.styles, styles = _ref$styles === void 0 ? {} : _ref$styles, customText = _ref.customText, ButtonText = _ref.ButtonText, ButtonClick = _ref.ButtonClick, Buttonclass = _ref.Buttonclass, ButtonTwo = _ref.ButtonTwo, imgStyles = _ref.imgStyles, _ref$loading = _ref.loading, loading = _ref$loading === void 0 ? false : _ref$loading; return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", { className: "tc animated fadeIn", style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, { color: '#999', margin: '100px auto', visibility: loading ? 'hidden' : 'visible' }), styles), children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", { src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__, style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { className: "mt20 font14", children: customText || '暂时还没有相关数据哦!' }), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({ className: Buttonclass, onClick: ButtonClick }, buttonProps), {}, { children: ButtonText })), ButtonTwo && ButtonTwo] }); }; /* harmony default export */ __webpack_exports__.Z = (noData); /***/ }), /***/ 19480: /*!*********************************************************!*\ !*** ./src/components/PreviewAll/index.tsx + 1 modules ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ PreviewAll; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(26801); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js var regeneratorRuntime = __webpack_require__(10574); var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js var asyncToGenerator = __webpack_require__(39343); var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(11006); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"}); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js var es_button = __webpack_require__(3113); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules var ArrowDownOutlined = __webpack_require__(98915); // EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules var monaco_editor = __webpack_require__(76329); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules var tooltip = __webpack_require__(6848); // EXTERNAL MODULE: ./src/utils/util.tsx var util = __webpack_require__(22739); // EXTERNAL MODULE: ./src/service/exercise.ts var exercise = __webpack_require__(35367); // EXTERNAL MODULE: ./src/components/NoData/index.tsx var NoData = __webpack_require__(73208); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(78130); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js var jsx_runtime = __webpack_require__(37712); ;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx /* harmony default export */ var PreviewAll = (function (_ref) { var _data, _data2, _data3, _data4, _data5, _data6, _data7; var _ref$editOffice = _ref.editOffice, editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice, data = _ref.data, theme = _ref.theme, type = _ref.type, filename = _ref.filename, monacoEditor = _ref.monacoEditor, className = _ref.className, style = _ref.style, close = _ref.close, onClose = _ref.onClose, hasMask = _ref.hasMask, disabledDownload = _ref.disabledDownload, onImgDimensions = _ref.onImgDimensions, showNodata = _ref.showNodata; var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'), _useState2 = slicedToArray_default()(_useState, 2), src = _useState2[0], setSrc = _useState2[1]; var _useState3 = (0,_react_17_0_2_react.useState)(""), _useState4 = slicedToArray_default()(_useState3, 2), token = _useState4[0], setToken = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(), _useState6 = slicedToArray_default()(_useState5, 2), officeData = _useState6[0], setOfficeData = _useState6[1]; var officePath = window.ENV === "build" ? "/react/build" : ""; var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER; // let size; console.log("disabledDownload---", disabledDownload); var unit = 1024 * 1024; var maxSize = 10 * unit; var closeRef = (0,_react_17_0_2_react.useRef)(); if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") { data = env/* default */.Z.API_SERVER + data; } // if (type === "office") { // size = parseUrl(data).filesize // if (size > maxSize) { // type = "other" // } // } if (filename) monacoEditor.filename = filename; (0,_react_17_0_2_react.useEffect)(function () { var _document$cookie; var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";"); cookies === null || cookies === void 0 || cookies.map(function (item) { var i = item.split("="); if (i[0] === '_educoder_session') { setToken(i[1]); } }); }, []); (0,_react_17_0_2_react.useEffect)(function () { if (type === "office") getData(); }, [type, data]); var getData = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { var _url, _id, res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: console.log("data:", data); _url = data; if (!data.startsWith("http")) { _url = location.origin + _url; } _id = new URL(_url).pathname.split("/").pop(); _context.next = 6; return (0,exercise/* setEcsAttachment */.gJ)({ attachment_id: _id }); case 6: res = _context.sent; setOfficeData(res); case 8: case "end": return _context.stop(); } }, _callee); })); return function getData() { return _ref2.apply(this, arguments); }; }(); var handleClick = function handleClick() { if (data.startsWith("http") || data.startsWith('blob:')) { handleDown(); return; } (0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename); }; var handleDown = function handleDown() { (0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data)); }; console.log(data, 'data'); return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { style: objectSpread2_default()({}, style || {}), className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"), children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: PreviewAllmodules.close, ref: closeRef, children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8", getPopupContainer: function getPopupContainer() { return closeRef.current; }, children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { onClick: function onClick() { onClose(); onImgDimensions(); }, children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "icon-yulanpizhu" }) }) }), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6", getPopupContainer: function getPopupContainer() { return closeRef.current; }, children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { onClick: handleDown, children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "icon-quxiaozhiding" }) }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { title: "\u5173\u95ED", getPopupContainer: function getPopupContainer() { return closeRef.current; }, children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "", onClick: onClose, children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "icon-guanbi1" }) }) })] }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"), children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor)) }), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", { src: ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http")) > -1 || (_data3 = data) !== null && _data3 !== void 0 && _data3.startsWith("/api") ? data : "data:image/png;base64,".concat(data), autoPlay: true }), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 || (_data5 = data) !== null && _data5 !== void 0 && _data5.startsWith("/api") ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", { controls: true, src: "".concat(data), autoPlay: true }) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", { controls: true, src: "data:video/mp4;base64,".concat(data), autoPlay: true }) }), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload) }), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { src: data + '&disposition=inline' }), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload) }) // , type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", { src: ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("http")) > -1 || (_data7 = data) !== null && _data7 !== void 0 && _data7.startsWith("/api") ? data : "data:image/png;base64,".concat(data) }), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, { customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B", ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-xiazai4 font14" }), type: "primary", size: 'middle', onClick: handleClick, children: "\u4E0B\u8F7D" }) }) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, { type: "primary", size: 'middle', onClick: handleClick, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"] }) })] }); }); /***/ }), /***/ 11436: /*!*********************************************************!*\ !*** ./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@7.23.2@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(26801); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js var toConsumableArray = __webpack_require__(93923); var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js var createForOfIteratorHelper = __webpack_require__(98190); var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(11006); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.min.css var katex_min = __webpack_require__(16622); // EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/lib/marked.js var marked = __webpack_require__(32834); var marked_default = /*#__PURE__*/__webpack_require__.n(marked); // EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/src/helpers.js var helpers = __webpack_require__(11690); ;// 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 = ["