From 57678a35dfda9ea7a8943212ac1322868d4dee6c Mon Sep 17 00:00:00 2001 From: autosubmit Date: Fri, 8 Sep 2023 18:56:20 +0800 Subject: [PATCH] Auto Submit --- 12768.async.js | 1 + 29212.async.js | 135 +- 29212.chunk.css | 1 - 34934.async.js | 803 + 35574.async.js | 1 + 42680.async.js | 1343 - 57133.async.js | 3738 ++ 57133.chunk.css | 2607 ++ 59627.async.js | 20 +- 39447.async.js => 67425.async.js | 391 +- 70665.async.js | 2994 ++ 72377.async.js | 19 +- 91205.async.js | 3 +- 91229.async.js | 12 +- 25625.async.js => 97404.async.js | 50 +- 69782.async.js => 98452.async.js | 1733 +- 99566.async.js | 6 +- layouts__ShixunDetail__index.async.js | 86 +- layouts__ShixunDetail__index.chunk.css | 4 +- layouts__virtualDetail__index.async.js | 16 +- layouts__virtualDetail__index.chunk.css | 13 + ...ssrooms__Lists__Attachment__index.async.js | 121 +- p__Classrooms__Lists__Board__index.async.js | 21 +- ...ts__CommonHomework__Detail__index.async.js | 95 +- ...ts__CommonHomework__Review__index.async.js | 10 +- ...oms__Lists__CommonHomework__index.async.js | 533 +- ...ooms__Lists__Exercise__Add__index.async.js | 1 + ...oms__Lists__Exercise__Add__index.chunk.css | 1 + ...s__Lists__Exercise__Answer__index.async.js | 1 + ...s__Lists__Exercise__Detail__index.async.js | 24 +- ...s__Lists__Exercise__Export__index.async.js | 16 + ...s__Exercise__ImitateAnswer__index.async.js | 1 + ...s__Lists__Exercise__Review__index.async.js | 20 +- ...lassrooms__Lists__Exercise__index.async.js | 21 +- ...sts__GroupHomework__Detail__index.async.js | 78 +- ...sts__GroupHomework__Review__index.async.js | 10 +- ...ooms__Lists__GroupHomework__index.async.js | 461 +- ...oms__Lists__OnlineLearning__index.async.js | 11738 ++---- ...ooms__Lists__Polls__Detail__index.async.js | 1 + p__Classrooms__Lists__Polls__index.async.js | 21 +- ...__ProgramHomework__Comment__index.async.js | 1 + ...s__ProgramHomework__Detail__index.async.js | 1 + ...ms__Lists__ProgramHomework__index.async.js | 24 +- ...__ShixunHomeworks__Comment__index.async.js | 1 + ...s__ShixunHomeworks__Detail__index.async.js | 1 + ...ms__Lists__ShixunHomeworks__index.async.js | 20 +- p__Competitions__Detail__index.async.js | 1 + p__Competitions__Edit__index.async.js | 188 +- p__Demo__index.async.js | 1 + ...ngineering__Evaluate__List__index.async.js | 4 +- ...ering__Lists__CurseSetting__index.async.js | 1 + ...gineering__Lists__Document__index.async.js | 1 + ...ng__Lists__TrainingProgram__index.async.js | 1 + p__Engineering__Norm__List__index.async.js | 4 +- p__Graduations__Lists__Tasks__index.async.js | 75 +- p__Graduations__Lists__Topics__index.async.js | 20 +- p__Graduations__Review__index.async.js | 1 + p__Innovation__Detail__index.async.js | 24 +- p__Innovation__MyDataSet__index.async.js | 4 +- p__Innovation__MyMirror__index.async.js | 2 +- p__Innovation__MyProject__index.async.js | 4 +- p__Innovation__PublicDataSet__index.async.js | 4 +- p__Innovation__PublicMirror__index.async.js | 2 +- p__Innovation__PublicProject__index.async.js | 4 +- p__Innovation__Tasks__index.async.js | 19 +- p__MyProblem__index.async.js | 189 +- p__Paperlibrary__Add__index.async.js | 1 + p__Paperlibrary__Add__index.chunk.css | 1 + p__Paperlibrary__Random__Edit__index.async.js | 20 +- p__Paperlibrary__See__index.async.js | 14 +- p__Paths__Detail__id.async.js | 34867 +++++++--------- p__Paths__Detail__id.chunk.css | 1247 +- p__Paths__Index__index.async.js | 2 +- p__Paths__New__index.async.js | 36 +- p__Problems__OjForm__NewEdit__index.async.js | 213 +- p__Problems__OjForm__NewEdit__index.chunk.css | 3 + p__Problems__OjForm__index.async.js | 188 +- p__Problemset__NewItem__index.async.js | 1 + p__Problemset__Preview__index.async.js | 13 +- p__Problemset__index.async.js | 3 +- p__Question__AddOrEdit__index.async.js | 188 +- p__Question__OjProblem__index.async.js | 189 +- p__Search__index.async.js | 2 +- ...hixuns__Detail__Challenges__index.async.js | 4 +- p__Shixuns__Detail__Discuss__index.async.js | 31 +- ...hixuns__Detail__Repository__index.async.js | 1 + ...enges__EditPracticeSetting__index.async.js | 37 + ...nges__EditPracticeSetting__index.chunk.css | 1 - ...__Challenges__EditQuestion__index.async.js | 4 +- ...uns__Edit__body__Warehouse__index.async.js | 1 + p__Shixuns__Edit__index.async.js | 20 +- p__Shixuns__Index__index.async.js | 2 +- p__Shixuns__New__index.async.js | 19 +- p__Terminal__index.async.js | 6 +- p__User__BindAccount__index.async.js | 1594 + p__User__BindAccount__index.chunk.css | 67 + p__User__Detail__Certificate__index.chunk.css | 3 - ...Detail__ExperImentImg__Add__index.async.js | 74 +- ...ail__ExperImentImg__Detail__index.async.js | 702 +- ...il__ExperImentImg__Detail__index.chunk.css | 1 - ...ser__Detail__ExperImentImg__index.async.js | 358 +- ...__Topics__Exercise__Detail__index.async.js | 19 +- p__User__OtherLogin__index.async.js | 1037 - p__User__OtherLogin__index.chunk.css | 146 - p__User__Register__index.async.js | 1094 +- p__User__ResetPassword__index.async.js | 799 - p__tasks__index.async.js | 895 +- p__tasks__index.chunk.css | 358 +- ...alSpaces__Lists__Knowledge__index.async.js | 3818 +- ...lSpaces__Lists__Knowledge__index.chunk.css | 2607 -- ...alSpaces__Lists__Material__index.chunk.css | 11 +- ...paces__Lists__Plan__Detail__index.async.js | 2 + p__virtualSpaces__Lists__Plan__index.async.js | 12 +- ...__Lists__Resources__Detail__index.async.js | 2 + ...alSpaces__Lists__Resources__index.async.js | 2 +- ...ualSpaces__Lists__Settings__index.async.js | 56 +- ...ces__Lists__Survey__Detail__index.async.js | 2 + ...rtualSpaces__Lists__Survey__index.async.js | 14 +- umi.css | 8 + umi.js | 84 +- 120 files changed, 37865 insertions(+), 40761 deletions(-) create mode 100644 34934.async.js delete mode 100644 42680.async.js create mode 100644 57133.async.js create mode 100644 57133.chunk.css rename 39447.async.js => 67425.async.js (87%) create mode 100644 70665.async.js rename 25625.async.js => 97404.async.js (97%) rename 69782.async.js => 98452.async.js (71%) create mode 100644 p__User__BindAccount__index.async.js create mode 100644 p__User__BindAccount__index.chunk.css delete mode 100644 p__User__OtherLogin__index.async.js delete mode 100644 p__User__OtherLogin__index.chunk.css diff --git a/12768.async.js b/12768.async.js index 9eed55fc12..f309001a23 100644 --- a/12768.async.js +++ b/12768.async.js @@ -155,6 +155,7 @@ 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/29212.async.js b/29212.async.js index b1223c87b7..62eece941b 100644 --- a/29212.async.js +++ b/29212.async.js @@ -87,6 +87,80 @@ var apiPref = _utils_env__WEBPACK_IMPORTED_MODULE_0__/* ["default"].API_SERVER * /***/ }), +/***/ 48559: +/*!**********************************************!*\ + !*** ./src/components/AsyncButton/index.tsx ***! + \**********************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Z": function() { return /* binding */ AsyncButton; } +/* harmony export */ }); +/* 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 _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js */ 70215); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 71577); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 67294); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 85893); + + + + + +var _excluded = ["children"]; + + + +var AsyncButton = function AsyncButton(_ref) { + var children = _ref.children, + props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded); + var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false), + _useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2), + btnLoading = _useState2[0], + setBtnLoading = _useState2[1]; + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["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()({}, props), {}, { + loading: btnLoading, + onClick: /*#__PURE__*/function () { + var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) { + return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + setBtnLoading(true); + _context.next = 4; + return props.onClick(e); + case 4: + setBtnLoading(false); + _context.next = 11; + break; + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](0); + console.error(_context.t0); + setBtnLoading(false); + case 11: + case "end": + return _context.stop(); + } + }, _callee, null, [[0, 7]]); + })); + return function (_x) { + return _ref2.apply(this, arguments); + }; + }(), + children: children + })); +}; + +/***/ }), + /***/ 82982: /*!*****************************************!*\ !*** ./src/components/NoData/index.tsx ***! @@ -241,6 +315,7 @@ 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)(); @@ -2588,7 +2663,8 @@ var CustomInput = function CustomInput(_ref) { var _dataSource$find; var _ref$dataSource = _ref.dataSource, dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource, - value = _ref.value, + _ref$value = _ref.value, + value = _ref$value === void 0 ? '' : _ref$value, onChange = _ref.onChange, className = _ref.className, _ref$style = _ref.style, @@ -2604,20 +2680,24 @@ var CustomInput = function CustomInput(_ref) { setInputValue = _useState4[1]; (0,react.useEffect)(function () { var _JSON$stringify; + var newValue = value; if ((_JSON$stringify = JSON.stringify(value)) !== null && _JSON$stringify !== void 0 && _JSON$stringify.includes('{')) { setDropValue(value.id); - setInputValue(value.value); - } else { - setInputValue(value); + newValue = value.value || ''; + } + try { + setInputValue(decodeURIComponent(newValue || "")); + } catch (error) { + setInputValue(decodeURIComponent(newValue || "")); } }, [value]); var handleChange = function handleChange() { - onChange(inputValue, dropValue || null); + onChange(encodeURIComponent(inputValue), dropValue || null); }; var handleDropValue = function handleDropValue(id) { if (id === dropValue) return; setDropValue(id); - onChange(inputValue, id); + onChange(encodeURIComponent(inputValue), id); }; return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: classnames_default()(CustomInputmodules.input, className), @@ -2648,7 +2728,7 @@ var CustomInput = function CustomInput(_ref) { })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { onPressEnter: handleChange, - value: decodeURIComponent(inputValue || ""), + value: inputValue, onChange: function onChange(e) { return setInputValue(e.target.value); }, @@ -3765,6 +3845,8 @@ var markdown_editor = __webpack_require__(55373); ;// CONCATENATED MODULE: ./src/pages/User/Detail/ExperImentImg/components/ModifyMirrorModal/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var ModifyMirrorModalmodules = ({"errorTip":"errorTip___yZItq","btns":"btns___kcUDL","confirm":"confirm___EXVbh","cancel":"cancel___vQdUc","formWrap":"formWrap___diWab"}); +// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx +var AsyncButton = __webpack_require__(48559); // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(85893); ;// CONCATENATED MODULE: ./src/pages/User/Detail/ExperImentImg/components/ModifyMirrorModal/index.tsx @@ -3779,6 +3861,7 @@ var jsx_runtime = __webpack_require__(85893); + var ModifyMirrorModal = function ModifyMirrorModal(_ref) { var visible = _ref.visible, mirrorId = _ref.mirrorId, @@ -3795,6 +3878,10 @@ var ModifyMirrorModal = function ModifyMirrorModal(_ref) { _useState4 = slicedToArray_default()(_useState3, 2), errorMsg = _useState4[0], setErrorMsg = _useState4[1]; + var _useState5 = (0,react.useState)(false), + _useState6 = slicedToArray_default()(_useState5, 2), + btnLoading = _useState6[0], + setBtnLoading = _useState6[1]; (0,react.useEffect)(function () { if (mirrorId != undefined && visible) { getMirrorInfo(); @@ -3837,14 +3924,15 @@ var ModifyMirrorModal = function ModifyMirrorModal(_ref) { return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: + setBtnLoading(true); _context2.t0 = (objectSpread2_default()); _context2.t1 = {}; - _context2.next = 4; + _context2.next = 5; return form.validateFields(); - case 4: + case 5: _context2.t2 = _context2.sent; formValue = (0, _context2.t0)(_context2.t1, _context2.t2); - _context2.next = 8; + _context2.next = 9; return (0,fetch/* default */.ZP)("/api/user_mirrors/".concat(mirrorId, ".json"), { method: 'put', body: { @@ -3852,14 +3940,15 @@ var ModifyMirrorModal = function ModifyMirrorModal(_ref) { description: formValue === null || formValue === void 0 ? void 0 : formValue.description } }); - case 8: + case 9: res = _context2.sent; if (res.status === 0) { message/* default.success */.ZP.success('修改成功'); getData(); } + setBtnLoading(false); setVisible(false); - case 11: + case 13: case "end": return _context2.stop(); } @@ -3911,6 +4000,7 @@ var ModifyMirrorModal = function ModifyMirrorModal(_ref) { centered: true, width: 1200, title: "\u4FEE\u6539\u955C\u50CF\u4FE1\u606F", + maskClosable: false, open: visible, destroyOnClose: true, footer: null, @@ -3997,13 +4087,22 @@ var ModifyMirrorModal = function ModifyMirrorModal(_ref) { onClick: onCancel, className: ModifyMirrorModalmodules.cancel, children: "\u53D6\u6D88 " - }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { - onClick: function onClick() { - return onOk(); - }, - className: ModifyMirrorModalmodules.confirm, + }), /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, { type: "primary", - children: "\u786E\u5B9A " + className: ModifyMirrorModalmodules.confirm, + onClick: /*#__PURE__*/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 onOk(); + case 2: + case "end": + return _context5.stop(); + } + }, _callee5); + })), + children: "\u786E\u5B9A" })] })] }); diff --git a/29212.chunk.css b/29212.chunk.css index 63d02df66f..c48309eeac 100644 --- a/29212.chunk.css +++ b/29212.chunk.css @@ -2664,7 +2664,6 @@ span.CodeMirror-selectedtext { margin-bottom: 20px; } .btns___kcUDL .confirm___EXVbh { - width: 60px; height: 32px; background: #3061D0; box-shadow: 0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5); diff --git a/34934.async.js b/34934.async.js new file mode 100644 index 0000000000..f8a5ac659f --- /dev/null +++ b/34934.async.js @@ -0,0 +1,803 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[34934],{ + +/***/ 63606: +/*!******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_CheckOutlined; } +}); + +// 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/CheckOutlined.js +// This icon file is generated automatically. +var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" }; +/* harmony default export */ var asn_CheckOutlined = (CheckOutlined); + +// 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/CheckOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_CheckOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_CheckOutlined = (/*#__PURE__*/react.forwardRef(CheckOutlined_CheckOutlined)); + +/***/ }), + +/***/ 96842: +/*!************************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules ***! + \************************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_DoubleRightOutlined; } +}); + +// 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/DoubleRightOutlined.js +// This icon file is generated automatically. +var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" }; +/* harmony default export */ var asn_DoubleRightOutlined = (DoubleRightOutlined); + +// 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/DoubleRightOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var DoubleRightOutlined_DoubleRightOutlined = function DoubleRightOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_DoubleRightOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_DoubleRightOutlined = (/*#__PURE__*/react.forwardRef(DoubleRightOutlined_DoubleRightOutlined)); + +/***/ }), + +/***/ 99611: +/*!****************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// 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)); + +/***/ }), + +/***/ 61854: +/*!******************************************************************!*\ + !*** ./src/components/User/RegisterPanel/unlock.tsx + 1 modules ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ unlock; } +}); + +// 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/components/User/RegisterPanel/unlock.less +// extracted by mini-css-extract-plugin + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules +var CloseOutlined = __webpack_require__(97937); +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js + 1 modules +var CheckOutlined = __webpack_require__(63606); +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules +var DoubleRightOutlined = __webpack_require__(96842); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(29427); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(85893); +;// CONCATENATED MODULE: ./src/components/User/RegisterPanel/unlock.tsx + + + + + + + + + + +var initialState = { + moveX: 0, + verify: 0 +}; +var Types = /*#__PURE__*/function (Types) { + Types[Types["SET_MOVEX"] = 0] = "SET_MOVEX"; + Types[Types["VERIFY"] = 1] = "VERIFY"; + return Types; +}(Types || {}); +function reducer(state, action) { + switch (action.type) { + case Types.SET_MOVEX: + return objectSpread2_default()(objectSpread2_default()({}, state), {}, { + moveX: action.payload + }); + case Types.VERIFY: + return objectSpread2_default()(objectSpread2_default()({}, state), action.payload); + default: + throw new Error(); + } +} + +//antd 自定义表单项 +/* harmony default export */ var unlock = (function (_ref) { + var value = _ref.value, + onChange = _ref.onChange, + onValidate = _ref.onValidate; + var _useReducer = (0,react.useReducer)(reducer, initialState), + _useReducer2 = slicedToArray_default()(_useReducer, 2), + state = _useReducer2[0], + dispatch = _useReducer2[1]; + var moveX = state.moveX, + verify = state.verify; + var handlerEl = (0,react.useRef)(); + var wrapperEL = (0,react.useRef)(); + var bgEl = (0,react.useRef)(); + var startDrag = (0,react.useRef)(); + var wrapperRect = (0,react.useMemo)(function () { + if (wrapperEL.current) { + return wrapperEL.current.getBoundingClientRect(); + } + }, [wrapperEL.current]); + (0,react.useEffect)(function () { + if (wrapperRect) { + var onMove = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) { + var pageX; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + if (!startDrag.current) { + _context.next = 15; + break; + } + pageX = e.pageX - left; + if (isMobile) { + pageX = e.changedTouches[0].pageX - left; + } + if (pageX < 0) { + pageX = 0; + } + if (!(pageX >= distance)) { + _context.next = 14; + break; + } + startDrag.current = false; + pageX = distance; + _context.next = 9; + return onValidate(); + case 9: + flag = _context.sent; + dispatch({ + type: Types.VERIFY, + payload: { + moveX: pageX, + verify: flag + } + }); + onChange(flag); + _context.next = 15; + break; + case 14: + dispatch({ + type: Types.SET_MOVEX, + payload: pageX + }); + case 15: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function onMove(_x) { + return _ref2.apply(this, arguments); + }; + }(); + var onMouseUp = function onMouseUp() { + startDrag.current = false; + if (flag === 0) { + handlerEl.current.style.transition = 'left .5s ease'; + bgEl.current.style.transition = 'width .5s ease'; + dispatch({ + type: Types.VERIFY, + payload: { + moveX: 0 + } + }); + } + }; + var flag = 0; + var width = wrapperRect.width, + left = wrapperRect.left; + var distance = width - 48; + var isMobile = !(0,util/* isPc */.b9)(); + if (!isMobile) { + window.addEventListener('mousemove', onMove); + window.addEventListener('mouseup', onMouseUp); + } else { + window.addEventListener('touchmove', onMove); + window.addEventListener('touchend', onMouseUp); + } + return function () { + if (!isMobile) { + window.removeEventListener('mousemove', onMove); + window.removeEventListener('mouseup', onMouseUp); + } else { + window.removeEventListener('touchmove', onMove); + window.removeEventListener('touchend', onMouseUp); + } + }; + } + }, [wrapperRect, util/* isPc */.b9]); + (0,react.useEffect)(function () { + dispatch({ + type: Types.VERIFY, + payload: { + verify: value, + moveX: value ? (wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - 48 : 0 + } + }); + }, [value]); + function onStartDrag() { + if (!verify) { + startDrag.current = true; + handlerEl.current.style.transition = ''; + bgEl.current.style.transition = ''; + } + } + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + ref: wrapperEL, + className: "unlock-wrapper", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { + ref: bgEl, + className: verify === 1 ? 'unlock-error-bg' : 'unlock-bg', + style: { + width: moveX + } + }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "unlock-text", + children: verify ? verify === 1 ? '验证失败' : '验证通过' : '拖动滑块至右侧验证' + }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + ref: handlerEl, + onTouchStart: onStartDrag, + onMouseDown: onStartDrag, + style: { + left: moveX + }, + className: "unlock-handler", + children: verify ? verify === 1 ? /*#__PURE__*/(0,jsx_runtime.jsx)(CloseOutlined/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(CheckOutlined/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(DoubleRightOutlined/* default */.Z, {}) + })] + }); +}); + +/***/ }), + +/***/ 88063: +/*!********************************************!*\ + !*** ./src/pages/User/Register/service.ts ***! + \********************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Ol": function() { return /* binding */ validateName; }, +/* harmony export */ "c0": function() { return /* binding */ resetPassword; }, +/* harmony export */ "o1": function() { return /* binding */ getValidateCode; }, +/* harmony export */ "z2": function() { return /* binding */ register; } +/* harmony export */ }); +/* unused harmony export wechatRegister */ +/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 84519); + +//type 1 表示用户注册 2 忘记密码 3 绑定手机/邮箱 +function validateName(params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)('accounts/valid_email_and_phone.json', params); +} +//type 1:用户注册注册 2:忘记密码 3:绑定手机 4: 绑定邮箱,5: 验收手机号有效 +function getValidateCode(params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)('accounts/get_verification_code.json', params); +} +function register(params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)('accounts/register.json', params); +} +function wechatRegister(params) { + return post('weapps/register.json', params); +} +function resetPassword(params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)('accounts/reset_password.json', params); +} + +/***/ }), + +/***/ 79531: +/*!*********************************************************!*\ + !*** ./node_modules/antd/es/input/index.js + 5 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// 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); + +/***/ }), + +/***/ 33507: +/*!*******************************************************!*\ + !*** ./node_modules/antd/es/style/motion/collapse.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__) { + +const genCollapseMotion = token => ({ + [token.componentCls]: { + // For common/openAnimation + [`${token.antCls}-motion-collapse-legacy`]: { + overflow: 'hidden', + '&-active': { + transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, + opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` + } + }, + [`${token.antCls}-motion-collapse`]: { + overflow: 'hidden', + transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, + opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` + } + } +}); +/* harmony default export */ __webpack_exports__["Z"] = (genCollapseMotion); + +/***/ }) + +}]); \ No newline at end of file diff --git a/35574.async.js b/35574.async.js index 53bc879798..92947b0aa8 100644 --- a/35574.async.js +++ b/35574.async.js @@ -156,6 +156,7 @@ 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/42680.async.js b/42680.async.js deleted file mode 100644 index 27ecb3fca8..0000000000 --- a/42680.async.js +++ /dev/null @@ -1,1343 +0,0 @@ -"use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[42680,83570],{ - -/***/ 63606: -/*!******************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_CheckOutlined; } -}); - -// 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/CheckOutlined.js -// This icon file is generated automatically. -var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" }; -/* harmony default export */ var asn_CheckOutlined = (CheckOutlined); - -// 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/CheckOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_CheckOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_CheckOutlined = (/*#__PURE__*/react.forwardRef(CheckOutlined_CheckOutlined)); - -/***/ }), - -/***/ 96842: -/*!************************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules ***! - \************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_DoubleRightOutlined; } -}); - -// 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/DoubleRightOutlined.js -// This icon file is generated automatically. -var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" }; -/* harmony default export */ var asn_DoubleRightOutlined = (DoubleRightOutlined); - -// 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/DoubleRightOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var DoubleRightOutlined_DoubleRightOutlined = function DoubleRightOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_DoubleRightOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_DoubleRightOutlined = (/*#__PURE__*/react.forwardRef(DoubleRightOutlined_DoubleRightOutlined)); - -/***/ }), - -/***/ 99611: -/*!****************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// 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)); - -/***/ }), - -/***/ 84567: -/*!************************************************************!*\ - !*** ./node_modules/antd/es/checkbox/index.js + 3 modules ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ es_checkbox; } -}); - -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(94184); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js + 5 modules -var es = __webpack_require__(95860); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js -var config_provider_context = __webpack_require__(53124); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js -var DisabledContext = __webpack_require__(98866); -// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js -var context = __webpack_require__(65223); -;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/GroupContext.js - -const GroupContext = /*#__PURE__*/react.createContext(null); -/* harmony default export */ var checkbox_GroupContext = (GroupContext); -// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js -var checkbox_style = __webpack_require__(63185); -;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Checkbox.js -var __rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - - - -const InternalCheckbox = (props, ref) => { - var _a; - const { - prefixCls: customizePrefixCls, - className, - rootClassName, - children, - indeterminate = false, - style, - onMouseEnter, - onMouseLeave, - skipGroup = false, - disabled - } = props, - restProps = __rest(props, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]); - const { - getPrefixCls, - direction, - checkbox - } = react.useContext(config_provider_context/* ConfigContext */.E_); - const checkboxGroup = react.useContext(checkbox_GroupContext); - const { - isFormItemInput - } = react.useContext(context/* FormItemInputContext */.aM); - const contextDisabled = react.useContext(DisabledContext/* default */.Z); - const mergedDisabled = (_a = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _a !== void 0 ? _a : contextDisabled; - const prevValue = react.useRef(restProps.value); - react.useEffect(() => { - checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value); - false ? 0 : void 0; - }, []); - react.useEffect(() => { - if (skipGroup) { - return; - } - if (restProps.value !== prevValue.current) { - checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current); - checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value); - prevValue.current = restProps.value; - } - return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value); - }, [restProps.value]); - const prefixCls = getPrefixCls('checkbox', customizePrefixCls); - const [wrapSSR, hashId] = (0,checkbox_style/* default */.ZP)(prefixCls); - const checkboxProps = Object.assign({}, restProps); - if (checkboxGroup && !skipGroup) { - checkboxProps.onChange = function () { - if (restProps.onChange) { - restProps.onChange.apply(restProps, arguments); - } - if (checkboxGroup.toggleOption) { - checkboxGroup.toggleOption({ - label: children, - value: restProps.value - }); - } - }; - checkboxProps.name = checkboxGroup.name; - checkboxProps.checked = checkboxGroup.value.includes(restProps.value); - } - const classString = classnames_default()(`${prefixCls}-wrapper`, { - [`${prefixCls}-rtl`]: direction === 'rtl', - [`${prefixCls}-wrapper-checked`]: checkboxProps.checked, - [`${prefixCls}-wrapper-disabled`]: mergedDisabled, - [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput - }, checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, hashId); - const checkboxClass = classnames_default()({ - [`${prefixCls}-indeterminate`]: indeterminate - }, hashId); - const ariaChecked = indeterminate ? 'mixed' : undefined; - return wrapSSR( - /*#__PURE__*/ - // eslint-disable-next-line jsx-a11y/label-has-associated-control - react.createElement("label", { - className: classString, - style: Object.assign(Object.assign({}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.style), style), - onMouseEnter: onMouseEnter, - onMouseLeave: onMouseLeave - }, /*#__PURE__*/react.createElement(es/* default */.Z, Object.assign({ - "aria-checked": ariaChecked - }, checkboxProps, { - prefixCls: prefixCls, - className: checkboxClass, - disabled: mergedDisabled, - ref: ref - })), children !== undefined && /*#__PURE__*/react.createElement("span", null, children))); -}; -const Checkbox = /*#__PURE__*/react.forwardRef(InternalCheckbox); -if (false) {} -/* harmony default export */ var checkbox_Checkbox = (Checkbox); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules -var toConsumableArray = __webpack_require__(74902); -// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js -var omit = __webpack_require__(10366); -;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Group.js - -var Group_rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - -const InternalGroup = (props, ref) => { - const { - defaultValue, - children, - options = [], - prefixCls: customizePrefixCls, - className, - rootClassName, - style, - onChange - } = props, - restProps = Group_rest(props, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]); - const { - getPrefixCls, - direction - } = react.useContext(config_provider_context/* ConfigContext */.E_); - const [value, setValue] = react.useState(restProps.value || defaultValue || []); - const [registeredValues, setRegisteredValues] = react.useState([]); - react.useEffect(() => { - if ('value' in restProps) { - setValue(restProps.value || []); - } - }, [restProps.value]); - const memoOptions = react.useMemo(() => options.map(option => { - if (typeof option === 'string' || typeof option === 'number') { - return { - label: option, - value: option - }; - } - return option; - }), [options]); - const cancelValue = val => { - setRegisteredValues(prevValues => prevValues.filter(v => v !== val)); - }; - const registerValue = val => { - setRegisteredValues(prevValues => [].concat((0,toConsumableArray/* default */.Z)(prevValues), [val])); - }; - const toggleOption = option => { - const optionIndex = value.indexOf(option.value); - const newValue = (0,toConsumableArray/* default */.Z)(value); - if (optionIndex === -1) { - newValue.push(option.value); - } else { - newValue.splice(optionIndex, 1); - } - if (!('value' in restProps)) { - setValue(newValue); - } - onChange === null || onChange === void 0 ? void 0 : onChange(newValue.filter(val => registeredValues.includes(val)).sort((a, b) => { - const indexA = memoOptions.findIndex(opt => opt.value === a); - const indexB = memoOptions.findIndex(opt => opt.value === b); - return indexA - indexB; - })); - }; - const prefixCls = getPrefixCls('checkbox', customizePrefixCls); - const groupPrefixCls = `${prefixCls}-group`; - const [wrapSSR, hashId] = (0,checkbox_style/* default */.ZP)(prefixCls); - const domProps = (0,omit/* default */.Z)(restProps, ['value', 'disabled']); - const childrenNode = options.length ? memoOptions.map(option => /*#__PURE__*/react.createElement(checkbox_Checkbox, { - prefixCls: prefixCls, - key: option.value.toString(), - disabled: 'disabled' in option ? option.disabled : restProps.disabled, - value: option.value, - checked: value.includes(option.value), - onChange: option.onChange, - className: `${groupPrefixCls}-item`, - style: option.style, - title: option.title - }, option.label)) : children; - // eslint-disable-next-line react/jsx-no-constructed-context-values - const context = { - toggleOption, - value, - disabled: restProps.disabled, - name: restProps.name, - // https://github.com/ant-design/ant-design/issues/16376 - registerValue, - cancelValue - }; - const classString = classnames_default()(groupPrefixCls, { - [`${groupPrefixCls}-rtl`]: direction === 'rtl' - }, className, rootClassName, hashId); - return wrapSSR( /*#__PURE__*/react.createElement("div", Object.assign({ - className: classString, - style: style - }, domProps, { - ref: ref - }), /*#__PURE__*/react.createElement(checkbox_GroupContext.Provider, { - value: context - }, childrenNode))); -}; - -const CheckboxGroup = /*#__PURE__*/react.forwardRef(InternalGroup); -/* harmony default export */ var Group = (/*#__PURE__*/react.memo(CheckboxGroup)); -;// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/index.js -'use client'; - - - -const es_checkbox_Checkbox = checkbox_Checkbox; -es_checkbox_Checkbox.Group = Group; -es_checkbox_Checkbox.__ANT_CHECKBOX = true; -if (false) {} -/* harmony default export */ var es_checkbox = (es_checkbox_Checkbox); - -/***/ }), - -/***/ 63185: -/*!******************************************************!*\ - !*** ./node_modules/antd/es/checkbox/style/index.js ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "C2": function() { return /* binding */ getStyle; } -/* harmony export */ }); -/* unused harmony export genCheckboxStyle */ -/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ 68024); -/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ 14747); -/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 45503); -/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 67968); - - - -// ============================== Motion ============================== -const antCheckboxEffect = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antCheckboxEffect', { - '0%': { - transform: 'scale(1)', - opacity: 0.5 - }, - '100%': { - transform: 'scale(1.6)', - opacity: 0 - } -}); -// ============================== Styles ============================== -const genCheckboxStyle = token => { - const { - checkboxCls - } = token; - const wrapperCls = `${checkboxCls}-wrapper`; - return [ - // ===================== Basic ===================== - { - // Group - [`${checkboxCls}-group`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .resetComponent */ .Wf)(token)), { - display: 'inline-flex', - flexWrap: 'wrap', - columnGap: token.marginXS, - // Group > Grid - [`> ${token.antCls}-row`]: { - flex: 1 - } - }), - // Wrapper - [wrapperCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .resetComponent */ .Wf)(token)), { - display: 'inline-flex', - alignItems: 'baseline', - cursor: 'pointer', - // Fix checkbox & radio in flex align #30260 - '&:after': { - display: 'inline-block', - width: 0, - overflow: 'hidden', - content: "'\\a0'" - }, - // Checkbox near checkbox - [`& + ${wrapperCls}`]: { - marginInlineStart: 0 - }, - [`&${wrapperCls}-in-form-item`]: { - 'input[type="checkbox"]': { - width: 14, - height: 14 // FIXME: magic - } - } - }), - - // Wrapper > Checkbox - [checkboxCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .resetComponent */ .Wf)(token)), { - position: 'relative', - whiteSpace: 'nowrap', - lineHeight: 1, - cursor: 'pointer', - // To make alignment right when `controlHeight` is changed - // Ref: https://github.com/ant-design/ant-design/issues/41564 - alignSelf: 'center', - // Wrapper > Checkbox > input - [`${checkboxCls}-input`]: { - position: 'absolute', - // Since baseline align will get additional space offset, - // we need to move input to top to make it align with text. - // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799 - inset: 0, - zIndex: 1, - cursor: 'pointer', - opacity: 0, - margin: 0, - [`&:focus-visible + ${checkboxCls}-inner`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .genFocusOutline */ .oN)(token)) - }, - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - boxSizing: 'border-box', - position: 'relative', - top: 0, - insetInlineStart: 0, - display: 'block', - width: token.checkboxSize, - height: token.checkboxSize, - direction: 'ltr', - backgroundColor: token.colorBgContainer, - border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`, - borderRadius: token.borderRadiusSM, - borderCollapse: 'separate', - transition: `all ${token.motionDurationSlow}`, - '&:after': { - boxSizing: 'border-box', - position: 'absolute', - top: '50%', - insetInlineStart: '21.5%', - display: 'table', - width: token.checkboxSize / 14 * 5, - height: token.checkboxSize / 14 * 8, - border: `${token.lineWidthBold}px solid ${token.colorWhite}`, - borderTop: 0, - borderInlineStart: 0, - transform: 'rotate(45deg) scale(0) translate(-50%,-50%)', - opacity: 0, - content: '""', - transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}` - } - }, - // Wrapper > Checkbox + Text - '& + span': { - paddingInlineStart: token.paddingXS, - paddingInlineEnd: token.paddingXS - } - }) - }, - // ===================== Hover ===================== - { - // Wrapper - [`${wrapperCls}:hover ${checkboxCls}:after`]: { - visibility: 'visible' - }, - // Wrapper & Wrapper > Checkbox - [` - ${wrapperCls}:not(${wrapperCls}-disabled), - ${checkboxCls}:not(${checkboxCls}-disabled) - `]: { - [`&:hover ${checkboxCls}-inner`]: { - borderColor: token.colorPrimary - } - }, - [`${wrapperCls}:not(${wrapperCls}-disabled)`]: { - [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled) ${checkboxCls}-inner`]: { - backgroundColor: token.colorPrimaryHover, - borderColor: 'transparent' - }, - [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled):after`]: { - borderColor: token.colorPrimaryHover - } - } - }, - // ==================== Checked ==================== - { - // Wrapper > Checkbox - [`${checkboxCls}-checked`]: { - [`${checkboxCls}-inner`]: { - backgroundColor: token.colorPrimary, - borderColor: token.colorPrimary, - '&:after': { - opacity: 1, - transform: 'rotate(45deg) scale(1) translate(-50%,-50%)', - transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}` - } - }, - // Checked Effect - '&:after': { - position: 'absolute', - top: 0, - insetInlineStart: 0, - width: '100%', - height: '100%', - borderRadius: token.borderRadiusSM, - visibility: 'hidden', - border: `${token.lineWidthBold}px solid ${token.colorPrimary}`, - animationName: antCheckboxEffect, - animationDuration: token.motionDurationSlow, - animationTimingFunction: 'ease-in-out', - animationFillMode: 'backwards', - content: '""', - transition: `all ${token.motionDurationSlow}` - } - }, - [` - ${wrapperCls}-checked:not(${wrapperCls}-disabled), - ${checkboxCls}-checked:not(${checkboxCls}-disabled) - `]: { - [`&:hover ${checkboxCls}-inner`]: { - backgroundColor: token.colorPrimaryHover, - borderColor: 'transparent' - }, - [`&:hover ${checkboxCls}:after`]: { - borderColor: token.colorPrimaryHover - } - } - }, - // ================= Indeterminate ================= - { - [checkboxCls]: { - '&-indeterminate': { - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - backgroundColor: token.colorBgContainer, - borderColor: token.colorBorder, - '&:after': { - top: '50%', - insetInlineStart: '50%', - width: token.fontSizeLG / 2, - height: token.fontSizeLG / 2, - backgroundColor: token.colorPrimary, - border: 0, - transform: 'translate(-50%, -50%) scale(1)', - opacity: 1, - content: '""' - } - } - } - } - }, - // ==================== Disable ==================== - { - // Wrapper - [`${wrapperCls}-disabled`]: { - cursor: 'not-allowed' - }, - // Wrapper > Checkbox - [`${checkboxCls}-disabled`]: { - // Wrapper > Checkbox > input - [`&, ${checkboxCls}-input`]: { - cursor: 'not-allowed', - // Disabled for native input to enable Tooltip event handler - // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901 - pointerEvents: 'none' - }, - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - background: token.colorBgContainerDisabled, - borderColor: token.colorBorder, - '&:after': { - borderColor: token.colorTextDisabled - } - }, - '&:after': { - display: 'none' - }, - '& + span': { - color: token.colorTextDisabled - }, - [`&${checkboxCls}-indeterminate ${checkboxCls}-inner::after`]: { - background: token.colorTextDisabled - } - } - }]; -}; -// ============================== Export ============================== -function getStyle(prefixCls, token) { - const checkboxToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__/* .merge */ .TS)(token, { - checkboxCls: `.${prefixCls}`, - checkboxSize: token.controlInteractiveSize - }); - return [genCheckboxStyle(checkboxToken)]; -} -/* harmony default export */ __webpack_exports__["ZP"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Checkbox', (token, _ref) => { - let { - prefixCls - } = _ref; - return [getStyle(prefixCls, token)]; -})); - -/***/ }), - -/***/ 79531: -/*!*********************************************************!*\ - !*** ./node_modules/antd/es/input/index.js + 5 modules ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// 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); - -/***/ }), - -/***/ 33507: -/*!*******************************************************!*\ - !*** ./node_modules/antd/es/style/motion/collapse.js ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__) { - -const genCollapseMotion = token => ({ - [token.componentCls]: { - // For common/openAnimation - [`${token.antCls}-motion-collapse-legacy`]: { - overflow: 'hidden', - '&-active': { - transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, - opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` - } - }, - [`${token.antCls}-motion-collapse`]: { - overflow: 'hidden', - transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, - opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` - } - } -}); -/* harmony default export */ __webpack_exports__["Z"] = (genCollapseMotion); - -/***/ }), - -/***/ 95860: -/*!**********************************************************!*\ - !*** ./node_modules/rc-checkbox/es/index.js + 5 modules ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ es; } -}); - -// UNUSED EXPORTS: Checkbox - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js -var objectSpread2 = __webpack_require__(1413); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(4942); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(97685); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(45987); -// 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); -;// CONCATENATED MODULE: ./node_modules/rc-checkbox/node_modules/rc-util/es/hooks/useEvent.js - -function useEvent(callback) { - var fnRef = react.useRef(); - fnRef.current = callback; - var memoFn = react.useCallback(function () { - var _fnRef$current; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args)); - }, []); - return memoFn; -} -;// CONCATENATED MODULE: ./node_modules/rc-checkbox/node_modules/rc-util/es/Dom/canUseDom.js -function canUseDom() { - return !!(typeof window !== 'undefined' && window.document && window.document.createElement); -} -;// CONCATENATED MODULE: ./node_modules/rc-checkbox/node_modules/rc-util/es/hooks/useLayoutEffect.js - - - -/** - * Wrap `React.useLayoutEffect` which will not throw warning message in test env - */ -var useInternalLayoutEffect = true && canUseDom() ? react.useLayoutEffect : react.useEffect; -var useLayoutEffect = function useLayoutEffect(callback, deps) { - var firstMountRef = react.useRef(true); - useInternalLayoutEffect(function () { - return callback(firstMountRef.current); - }, deps); - - // We tell react that first mount has passed - useInternalLayoutEffect(function () { - firstMountRef.current = false; - return function () { - firstMountRef.current = true; - }; - }, []); -}; -var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) { - useLayoutEffect(function (firstMount) { - if (!firstMount) { - return callback(); - } - }, deps); -}; -/* harmony default export */ var hooks_useLayoutEffect = ((/* unused pure expression or super */ null && (useLayoutEffect))); -;// CONCATENATED MODULE: ./node_modules/rc-checkbox/node_modules/rc-util/es/hooks/useState.js - - -/** - * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed. - * We do not make this auto is to avoid real memory leak. - * Developer should confirm it's safe to ignore themselves. - */ -function useSafeState(defaultValue) { - var destroyRef = react.useRef(false); - var _React$useState = react.useState(defaultValue), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), - value = _React$useState2[0], - setValue = _React$useState2[1]; - react.useEffect(function () { - destroyRef.current = false; - return function () { - destroyRef.current = true; - }; - }, []); - function safeSetState(updater, ignoreDestroy) { - if (ignoreDestroy && destroyRef.current) { - return; - } - setValue(updater); - } - return [value, safeSetState]; -} -;// CONCATENATED MODULE: ./node_modules/rc-checkbox/node_modules/rc-util/es/hooks/useMergedState.js - - - - -/** We only think `undefined` is empty */ -function hasValue(value) { - return value !== undefined; -} - -/** - * Similar to `useState` but will use props value if provided. - * Note that internal use rc-util `useState` hook. - */ -function useMergedState(defaultStateValue, option) { - var _ref = option || {}, - defaultValue = _ref.defaultValue, - value = _ref.value, - onChange = _ref.onChange, - postState = _ref.postState; - - // ======================= Init ======================= - var _useState = useSafeState(function () { - if (hasValue(value)) { - return value; - } else if (hasValue(defaultValue)) { - return typeof defaultValue === 'function' ? defaultValue() : defaultValue; - } else { - return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue; - } - }), - _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), - innerValue = _useState2[0], - setInnerValue = _useState2[1]; - var mergedValue = value !== undefined ? value : innerValue; - var postMergedValue = postState ? postState(mergedValue) : mergedValue; - - // ====================== Change ====================== - var onChangeFn = useEvent(onChange); - var _useState3 = useSafeState([mergedValue]), - _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), - prevValue = _useState4[0], - setPrevValue = _useState4[1]; - useLayoutUpdateEffect(function () { - var prev = prevValue[0]; - if (innerValue !== prev) { - onChangeFn(innerValue, prev); - } - }, [prevValue]); - - // Sync value back to `undefined` when it from control to un-control - useLayoutUpdateEffect(function () { - if (!hasValue(value)) { - setInnerValue(value); - } - }, [value]); - - // ====================== Update ====================== - var triggerChange = useEvent(function (updater, ignoreDestroy) { - setInnerValue(updater, ignoreDestroy); - setPrevValue([mergedValue], ignoreDestroy); - }); - return [postMergedValue, triggerChange]; -} -;// CONCATENATED MODULE: ./node_modules/rc-checkbox/es/index.js - - - - - -var _excluded = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"]; - - - - -var Checkbox = /*#__PURE__*/(0,react.forwardRef)(function (props, ref) { - var _classNames; - var _props$prefixCls = props.prefixCls, - prefixCls = _props$prefixCls === void 0 ? 'rc-checkbox' : _props$prefixCls, - className = props.className, - style = props.style, - checked = props.checked, - disabled = props.disabled, - _props$defaultChecked = props.defaultChecked, - defaultChecked = _props$defaultChecked === void 0 ? false : _props$defaultChecked, - _props$type = props.type, - type = _props$type === void 0 ? 'checkbox' : _props$type, - title = props.title, - onChange = props.onChange, - inputProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded); - var inputRef = (0,react.useRef)(null); - var _useMergedState = useMergedState(defaultChecked, { - value: checked - }), - _useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2), - rawValue = _useMergedState2[0], - setRawValue = _useMergedState2[1]; - (0,react.useImperativeHandle)(ref, function () { - return { - focus: function focus() { - var _inputRef$current; - (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus(); - }, - blur: function blur() { - var _inputRef$current2; - (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur(); - }, - input: inputRef.current - }; - }); - var classString = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-checked"), rawValue), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)); - var handleChange = function handleChange(e) { - if (disabled) { - return; - } - if (!('checked' in props)) { - setRawValue(e.target.checked); - } - onChange === null || onChange === void 0 ? void 0 : onChange({ - target: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { - type: type, - checked: e.target.checked - }), - stopPropagation: function stopPropagation() { - e.stopPropagation(); - }, - preventDefault: function preventDefault() { - e.preventDefault(); - }, - nativeEvent: e.nativeEvent - }); - }; - return /*#__PURE__*/react.createElement("span", { - className: classString, - title: title, - style: style - }, /*#__PURE__*/react.createElement("input", (0,esm_extends/* default */.Z)({}, inputProps, { - className: "".concat(prefixCls, "-input"), - ref: inputRef, - onChange: handleChange, - disabled: disabled, - checked: !!rawValue, - type: type - })), /*#__PURE__*/react.createElement("span", { - className: "".concat(prefixCls, "-inner") - })); -}); -/* harmony default export */ var es = (Checkbox); - -/***/ }) - -}]); \ No newline at end of file diff --git a/57133.async.js b/57133.async.js new file mode 100644 index 0000000000..60f997db74 --- /dev/null +++ b/57133.async.js @@ -0,0 +1,3738 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[57133,4977,72377,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'; + +/***/ }), + +/***/ 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; + console.log("disabledDownload---", disabledDownload); + 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/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 = ["