From fc757b392d6097c9a02cea41c82b9e28303531df Mon Sep 17 00:00:00 2001 From: autosubmit Date: Thu, 28 Sep 2023 16:52:49 +0800 Subject: [PATCH] Auto Submit --- 10240.async.js | 1 - 11354.async.js | 3514 +++++ ...Export__index.chunk.css => 11354.chunk.css | 2019 +-- 11470.async.js | 2 +- 12034.async.js | 46 + 12768.async.js | 1 - 36095.async.js => 13093.async.js | 164 +- 14536.async.js | 2 +- 79266.async.js => 15017.async.js | 165 +- 15804.async.js | 162 - 15980.async.js | 2 +- 17311.async.js | 2 +- 97543.async.js => 18860.async.js | 88 +- 19774.async.js | 617 + 53874.async.js => 20546.async.js | 164 +- 22424.async.js | 787 -- 88964.async.js => 22805.async.js | 164 +- 22905.async.js | 1886 +++ 55820.async.js => 27686.async.js | 44 +- 23778.async.js => 28188.async.js | 164 +- 3219.async.js | 2 +- 26042.async.js => 34172.async.js | 248 +- 35574.async.js | 1 - 39000.async.js | 2 +- 42167.async.js | 1064 ++ 98452.async.js => 42187.async.js | 45 +- 40084.async.js => 43270.async.js | 86 +- 5521.async.js => 44016.async.js | 164 +- 44354.async.js | 2 +- 44838.async.js | 616 +- 45117.async.js | 961 -- 37098.async.js => 45344.async.js | 251 +- 23792.async.js => 46353.async.js | 45 +- 46463.async.js | 2 +- 4670.async.js | 2 +- 49774.async.js => 48262.async.js | 164 +- 51821.async.js | 1 - 86484.async.js => 52236.async.js | 164 +- 21273.async.js => 52552.async.js | 640 +- 53405.async.js | 2 +- 97420.async.js => 5357.async.js | 164 +- 78254.async.js => 54335.async.js | 165 +- 83570.async.js => 54909.async.js | 47 +- 98855.async.js => 58412.async.js | 164 +- 59627.async.js | 1 - 59337.async.js => 6039.async.js | 164 +- 47230.async.js => 63774.async.js | 164 +- 64490.async.js | 953 -- 73453.async.js => 66357.async.js | 720 +- 66431.async.js | 73 +- 4094.async.js => 67408.async.js | 164 +- 86291.async.js => 69998.async.js | 164 +- 70736.async.js | 3860 ++++++ 72226.async.js | 2 +- 73105.async.js | 2 +- 75574.async.js | 2 +- 78830.async.js | 2698 ++++ 34069.async.js => 85882.async.js | 45 +- 86068.async.js | 2 +- 8914.async.js | 865 ++ 89194.async.js | 2 +- 79169.async.js => 90688.async.js | 164 +- 55254.async.js => 90966.async.js | 165 +- 3157.async.js => 91622.async.js | 6037 ++++----- 92716.async.js | 258 +- 92716.chunk.css | 166 +- 97588.async.js | 1159 -- 9888.async.js | 2752 ++++ 23207.async.js => 99267.async.js | 164 +- 99551.async.js | 8793 ------------ act/heartSaveProcess/finish.png | Bin 0 -> 1959 bytes act/heartSaveProcess/iconfont/demo.css | 539 + act/heartSaveProcess/iconfont/demo_index.html | 372 + act/heartSaveProcess/iconfont/iconfont.css | 47 + act/heartSaveProcess/iconfont/iconfont.js | 1 + act/heartSaveProcess/iconfont/iconfont.json | 65 + act/heartSaveProcess/iconfont/iconfont.ttf | Bin 0 -> 4188 bytes act/heartSaveProcess/iconfont/iconfont.woff | Bin 0 -> 2656 bytes act/heartSaveProcess/iconfont/iconfont.woff2 | Bin 0 -> 2188 bytes act/heartSaveProcess/index.html | 331 + p__Account__Certification__index.async.js | 428 - ...inistration__Student__Edit__index.async.js | 162 + p__Administration__Student__index.async.js | 119 +- p__Classrooms__ExamList__index.async.js | 162 + ...rooms__Lists__Announcement__index.async.js | 73 +- ...ssrooms__Lists__Attachment__index.async.js | 4 +- ...ssrooms__Lists__Attendance__index.async.js | 806 +- p__Classrooms__Lists__Board__index.async.js | 3 +- ...s__CommonHomework__Comment__index.async.js | 1 - ...ts__CommonHomework__Detail__index.async.js | 47 +- ...ts__CommonHomework__Review__index.async.js | 115 +- ...ooms__Lists__Exercise__Add__index.async.js | 109 +- ...s__Lists__Exercise__Answer__index.async.js | 1 - ...sts__Exercise__CodeDetails__index.async.js | 162 - ...s__Lists__Exercise__Detail__index.async.js | 65 +- ...__Lists__Exercise__Detail__index.chunk.css | 15 + ...s__Lists__Exercise__Export__index.async.js | 4064 +----- ...s__Exercise__ImitateAnswer__index.async.js | 1 - ...s__Lists__Exercise__Review__index.async.js | 5635 ++------ ...__Lists__Exercise__Review__index.chunk.css | 2204 --- ...__Lists__Graduation__Tasks__index.async.js | 6 +- ...sts__GroupHomework__Detail__index.async.js | 47 +- ...sts__GroupHomework__Review__index.async.js | 633 +- ...ooms__Lists__Polls__Detail__index.async.js | 275 +- ...__ProgramHomework__Comment__index.async.js | 1 - ...s__ProgramHomework__Detail__index.async.js | 52 +- ...__ShixunHomeworks__Comment__index.async.js | 1 - ...s__ShixunHomeworks__Detail__index.async.js | 47 +- ...tistics__StatisticsQuality__index.async.js | 162 + ...ssrooms__Lists__Statistics__index.async.js | 725 +- ...lassrooms__Lists__Students__index.async.js | 159 +- ...s__Lists__Template__detail__index.async.js | 162 - ...lassrooms__Lists__Template__index.async.js | 162 + ...ooms__Lists__Video__Upload__index.async.js | 2 +- p__Classrooms__Lists__Video__index.async.js | 1303 +- ...lassrooms__New__StartClass__index.async.js | 273 +- p__Classrooms__New__index.async.js | 387 +- p__Competitions__Detail__index.async.js | 17 +- p__Competitions__Edit__index.async.js | 1 - p__Competitions__Index__index.async.js | 46 + p__Competitions__Update__index.async.js | 162 - p__Demo__index.async.js | 1 - ...ering__Lists__CurseSetting__index.async.js | 1 - ...gineering__Lists__Document__index.async.js | 1 - ...ng__Lists__GraduationIndex__index.async.js | 162 + ..._Lists__TrainingObjectives__index.async.js | 162 + ...ng__Lists__TrainingProgram__index.async.js | 1 - ...ineering__Navigation__Home__index.async.js | 162 + p__Engineering__index.async.js | 162 - p__Forums__Detail__id.async.js | 84 +- ...aduations__Lists__Settings__index.async.js | 162 + p__Graduations__Lists__Topics__index.async.js | 1 - p__Graduations__Review__index.async.js | 1 - p__HttpStatus__HpcCourse.async.js | 162 + p__HttpStatus__SixActivities.async.js | 162 - p__HttpStatus__UserAgents.async.js | 162 + p__Innovation__Detail__index.async.js | 1 - p__Innovation__index.async.js | 162 - p__Messages__Detail__index.async.js | 73 +- p__Messages__Tidings__index.async.js | 18 +- p__MoopCases__index.async.js | 162 + p__MyProblem__RecordDetail__index.async.js | 2 +- p__MyProblem__RecordDetail__index.chunk.css | 5 +- p__MyProblem__index.async.js | 935 +- p__MyProblem__index.chunk.css | 5 +- p__Paperlibrary__Add__index.async.js | 105 +- p__Paperlibrary__See__index.async.js | 130 +- p__Paperlibrary__See__index.chunk.css | 35 + p__Paths__Detail__id.async.js | 11237 ++++++++-------- p__Paths__Detail__id.chunk.css | 23 +- p__Paths__New__index.async.js | 6770 ++++++++-- p__Paths__New__index.chunk.css | 1248 ++ p__Problems__OjForm__index.async.js | 165 +- p__Problems__OjForm__index.chunk.css | 5 +- p__Problemset__NewItem__index.async.js | 1 - p__Problemset__Preview__index.async.js | 162 - p__Problemset__index.async.js | 47 +- ...n__OjProblem__RecordDetail__index.async.js | 2 +- ...__OjProblem__RecordDetail__index.chunk.css | 5 +- p__Question__OjProblem__index.async.js | 658 +- p__Question__OjProblem__index.chunk.css | 5 +- p__RestFul__Edit__index.async.js | 162 + ...ns__Detail__AuditSituation__index.async.js | 162 + ...hixuns__Detail__Challenges__index.async.js | 652 +- p__Shixuns__Detail__Discuss__index.async.js | 513 +- ...etail__Repository__AddFile__index.async.js | 162 + ...hixuns__Detail__Repository__index.async.js | 1 - ...l__Challenges__NewPractice__index.async.js | 162 + ...uns__Edit__body__Warehouse__index.async.js | 1 - p__Shixuns__Edit__index.async.js | 4 +- p__Shixuns__New__CreateImg__index.async.js | 162 + p__User__BindAccount__index.async.js | 2 +- ...__Detail__Videos__Protocol__index.async.js | 162 - ...r__Detail__Videos__Success__index.async.js | 162 - ...er__Detail__Videos__Upload__index.async.js | 162 - p__Video__Detail__id.async.js | 1 - p__tasks__Jupyter__index.async.js | 22 +- p__tasks__Jupyter__index.chunk.css | 2 + p__tasks__index.async.js | 107 +- ...alSpaces__Lists__Knowledge__index.async.js | 1106 +- ...lSpaces__Lists__Knowledge__index.chunk.css | 19 +- ...ualSpaces__Lists__Material__index.async.js | 162 - ...paces__Lists__Plan__Detail__index.async.js | 1 - ...__Lists__Resources__Detail__index.async.js | 1 - ...ces__Lists__Survey__Detail__index.async.js | 1 - umi.js | 731 +- 186 files changed, 47045 insertions(+), 45613 deletions(-) create mode 100644 11354.async.js rename p__Classrooms__Lists__Exercise__Export__index.chunk.css => 11354.chunk.css (98%) rename 36095.async.js => 13093.async.js (90%) rename 79266.async.js => 15017.async.js (94%) rename 97543.async.js => 18860.async.js (86%) create mode 100644 19774.async.js rename 53874.async.js => 20546.async.js (93%) delete mode 100644 22424.async.js rename 88964.async.js => 22805.async.js (94%) create mode 100644 22905.async.js rename 55820.async.js => 27686.async.js (96%) rename 23778.async.js => 28188.async.js (87%) rename 26042.async.js => 34172.async.js (87%) rename 98452.async.js => 42187.async.js (98%) rename 40084.async.js => 43270.async.js (91%) rename 5521.async.js => 44016.async.js (89%) delete mode 100644 45117.async.js rename 37098.async.js => 45344.async.js (87%) rename 23792.async.js => 46353.async.js (98%) rename 49774.async.js => 48262.async.js (90%) rename 86484.async.js => 52236.async.js (93%) rename 21273.async.js => 52552.async.js (78%) rename 97420.async.js => 5357.async.js (90%) rename 78254.async.js => 54335.async.js (95%) rename 83570.async.js => 54909.async.js (97%) rename 98855.async.js => 58412.async.js (94%) rename 59337.async.js => 6039.async.js (93%) rename 47230.async.js => 63774.async.js (90%) delete mode 100644 64490.async.js rename 73453.async.js => 66357.async.js (56%) rename 4094.async.js => 67408.async.js (93%) rename 86291.async.js => 69998.async.js (90%) create mode 100644 70736.async.js create mode 100644 78830.async.js rename 34069.async.js => 85882.async.js (92%) create mode 100644 8914.async.js rename 79169.async.js => 90688.async.js (95%) rename 55254.async.js => 90966.async.js (91%) rename 3157.async.js => 91622.async.js (65%) delete mode 100644 97588.async.js create mode 100644 9888.async.js rename 23207.async.js => 99267.async.js (90%) delete mode 100644 99551.async.js create mode 100644 act/heartSaveProcess/finish.png create mode 100644 act/heartSaveProcess/iconfont/demo.css create mode 100644 act/heartSaveProcess/iconfont/demo_index.html create mode 100644 act/heartSaveProcess/iconfont/iconfont.css create mode 100644 act/heartSaveProcess/iconfont/iconfont.js create mode 100644 act/heartSaveProcess/iconfont/iconfont.json create mode 100644 act/heartSaveProcess/iconfont/iconfont.ttf create mode 100644 act/heartSaveProcess/iconfont/iconfont.woff create mode 100644 act/heartSaveProcess/iconfont/iconfont.woff2 create mode 100644 act/heartSaveProcess/index.html diff --git a/10240.async.js b/10240.async.js index 0c20c8de33..b22c15f18c 100644 --- a/10240.async.js +++ b/10240.async.js @@ -315,7 +315,6 @@ var jsx_runtime = __webpack_require__(85893); var officePath = window.ENV === "build" ? "/react/build" : ""; var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER; // let size; - console.log("disabledDownload---", disabledDownload); var unit = 1024 * 1024; var maxSize = 10 * unit; var closeRef = (0,react.useRef)(); diff --git a/11354.async.js b/11354.async.js new file mode 100644 index 0000000000..e784c39e99 --- /dev/null +++ b/11354.async.js @@ -0,0 +1,3514 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[11354,12768,66390],{ + +/***/ 96403: +/*!*********************************!*\ + !*** ./src/pages/tasks/util.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* 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'; + +/***/ }), + +/***/ 82982: +/*!*****************************************!*\ + !*** ./src/components/NoData/index.tsx ***! + \*****************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294); +/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 71577); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 85893); + + + + + + +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_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_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_SJ5m_develop_node_modules_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_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_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); + +/***/ }), + +/***/ 36579: +/*!*********************************************************!*\ + !*** ./src/components/PreviewAll/index.tsx + 1 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ PreviewAll; } +}); + +// 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); +;// 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/es/button/index.js +var es_button = __webpack_require__(71577); +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules +var ArrowDownOutlined = __webpack_require__(77171); +// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules +var monaco_editor = __webpack_require__(8691); +// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules +var tooltip = __webpack_require__(83062); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(29427); +// EXTERNAL MODULE: ./src/service/exercise.ts +var exercise = __webpack_require__(51412); +// EXTERNAL MODULE: ./src/components/NoData/index.tsx +var NoData = __webpack_require__(82982); +// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules +var env = __webpack_require__(59758); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(85893); +;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx + + + + + + + + + + + + + + + + + +/* harmony default export */ var PreviewAll = (function (_ref) { + var _data, _data2, _data3, _data4, _data5, _data6; + 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.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.useState)(""), + _useState4 = slicedToArray_default()(_useState3, 2), + token = _useState4[0], + setToken = _useState4[1]; + var _useState5 = (0,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.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER; + // let size; + var unit = 1024 * 1024; + var maxSize = 10 * unit; + var closeRef = (0,react.useRef)(); + if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") { + data = env/* default.API_SERVER */.Z.API_SERVER + data; + } + // if (type === "office") { + // size = parseUrl(data).filesize + // if (size > maxSize) { + // type = "other" + // } + // } + if (filename) monacoEditor.filename = filename; + (0,react.useEffect)(function () { + var _document$cookie, _document$cookie$repl; + var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";"); + cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) { + var i = item.split("="); + if (i[0] === '_educoder_session') { + setToken(i[1]); + } + }); + }, []); + (0,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)); + }; + 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: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;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 ? /*#__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.ONLYOFFICE */.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: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "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"] + }) + })] + }); +}); + +/***/ }), + +/***/ 12768: +/*!*********************************************************!*\ + !*** ./src/components/RenderHtml/index.tsx + 1 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// 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 = ["