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

2036 lines
93 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[86069,90282],{
/***/ 69601:
/*!***************************************************************************!*\
!*** ./src/pages/virtualSpaces/Lists/Lesson/Detail/index.tsx + 1 modules ***!
\***************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Detail; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(39647);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
var _umi_production_exports = __webpack_require__(32136);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(21068);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var es_modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(52306);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(88590);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(8772);
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 34 modules
var ui_customization = __webpack_require__(8034);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(69519);
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Lesson/Detail/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___Q28K2","flex_space_between":"flex_space_between___XKhJD","flex_box_vertical_center":"flex_box_vertical_center___G6xvN","flex_box_center_end":"flex_box_center_end___OpS9Y","flex_box_column":"flex_box_column___Jx7wj","Onerow":"Onerow___iGZyH","MultiLine":"MultiLine___zus_s","LessonsList":"LessonsList___d2liG","LessonsListItem":"LessonsListItem___CaSaY","LessonsListItemImg":"LessonsListItemImg___LCyOb","imgUpLoad":"imgUpLoad___gXVAl","LessonDetail":"LessonDetail___z2veM"});
// EXTERNAL MODULE: ./src/utils/fetch.ts
var utils_fetch = __webpack_require__(84087);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(18765);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(25644);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
var RenderHtml = __webpack_require__(70159);
// EXTERNAL MODULE: ./src/pages/virtualSpaces/Lists/Lesson/AddOrEdit/index.tsx
var AddOrEdit = __webpack_require__(31042);
// EXTERNAL MODULE: ./src/pages/virtualSpaces/components/FileImage/index.tsx + 7 modules
var FileImage = __webpack_require__(7965);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(4443);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(82522);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Lesson/Detail/index.tsx
var _excluded = ["classroomList", "globalSetting", "user", "virtualSpaces", "loading", "dispatch"];
var LessonPage = function LessonPage(_ref) {
var _LessonDetail$data, _LessonDetail$data2, _LessonDetail$data3, _LessonDetail$data4, _LessonDetail$data5, _LessonDetail$data6, _LessonDetail$data8, _LessonResList$data, _LessonResList$data2, _LessonResList$data3, _LessonResList$data4;
var classroomList = _ref.classroomList,
globalSetting = _ref.globalSetting,
user = _ref.user,
virtualSpaces = _ref.virtualSpaces,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = objectWithoutProperties_default()(_ref, _excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _Form$useForm3 = es_form/* default */.Z.useForm(),
_Form$useForm4 = slicedToArray_default()(_Form$useForm3, 1),
form1 = _Form$useForm4[0];
var _Form$useForm5 = es_form/* default */.Z.useForm(),
_Form$useForm6 = slicedToArray_default()(_Form$useForm5, 1),
form2 = _Form$useForm6[0];
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
var _useState = (0,_react_17_0_2_react.useState)({
content: "",
type: ""
}),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var LessonDetail = virtualSpaces.LessonDetail,
LessonResList = virtualSpaces.LessonResList;
var _useParams = (0,_umi_production_exports.useParams)(),
virtual_spacesId = _useParams.virtual_spacesId,
id = _useParams.id,
fileid = _useParams.fileid;
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
searchParams = _useSearchParams2[0];
var _useState3 = (0,_react_17_0_2_react.useState)(Boolean(searchParams.get("isViewFile")) || false),
_useState4 = slicedToArray_default()(_useState3, 2),
isViewFile = _useState4[0],
setIsViewFile = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
isDescOpen = _useState6[0],
setIsDescOpen = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
isEditModal = _useState8[0],
setIsEditModal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
isAddResModal = _useState10[0],
setIsAddResModal = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(false),
_useState12 = slicedToArray_default()(_useState11, 2),
isUpResModal = _useState12[0],
setIsUpResModal = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)({}),
_useState14 = slicedToArray_default()(_useState13, 2),
listItem = _useState14[0],
setListItem = _useState14[1];
var DescOpenDom = (0,_react_17_0_2_react.useRef)(null);
var _useState15 = (0,_react_17_0_2_react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
isDescOpenShow = _useState16[0],
setIsDescOpenShow = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)({
virtual_classroom_id: virtual_spacesId,
virtual_spacesId: virtual_spacesId,
id: id,
resType: 1,
resource_type: 1,
page: 1,
limit: 20
}),
_useState18 = slicedToArray_default()(_useState17, 2),
urlData = _useState18[0],
setUrlData = _useState18[1];
var columns = [{
title: '名称',
dataIndex: 'name',
ellipsis: true,
render: function render(text, record) {
var _record$attachment, _record$attachment2, _record$attachment3;
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "topLeft",
title: text || (record === null || record === void 0 || (_record$attachment = record.attachment) === null || _record$attachment === void 0 ? void 0 : _record$attachment.title),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(FileImage/* default */.Z, {
fileName: text || (record === null || record === void 0 || (_record$attachment2 = record.attachment) === null || _record$attachment2 === void 0 ? void 0 : _record$attachment2.title)
}), text || (record === null || record === void 0 || (_record$attachment3 = record.attachment) === null || _record$attachment3 === void 0 ? void 0 : _record$attachment3.title) || "--"]
})
});
}
}, {
title: '上传日期',
dataIndex: 'updated_at',
ellipsis: true,
width: 150,
render: function render(text) {
return dayjs_min_default()(text).format("YYYY-MM-DD HH:mm");
}
}, {
title: '类型',
dataIndex: 'resource_type',
ellipsis: true,
width: 80,
render: function render(text, record) {
var _record$attachment4;
return (text == 2 ? "外链" : record === null || record === void 0 || (_record$attachment4 = record.attachment) === null || _record$attachment4 === void 0 ? void 0 : _record$attachment4.show_file_type) || "未知文件";
}
}, {
title: '操作',
dataIndex: 'keyword',
align: "right",
ellipsis: true,
width: 200,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
padding: "4px 10px"
},
type: "link",
onClick: function onClick() {
if (urlData.resource_type == 2) {
window.open(record === null || record === void 0 ? void 0 : record.url);
return;
}
window.open("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson/").concat(id, "/detail/").concat(record === null || record === void 0 ? void 0 : record.attachment_id, "?isViewFile=true&recordid=").concat(record.id, "&leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
},
children: "\u67E5\u770B"
}), urlData.resource_type == 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
openLoading: true,
type: "link",
style: {
padding: "4px 10px"
},
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _record$attachment5, _record$attachment8, _record$attachment9;
var _record$attachment6, _record$attachment7;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!["pdf", "txt", "image"].includes(record === null || record === void 0 || (_record$attachment5 = record.attachment) === null || _record$attachment5 === void 0 ? void 0 : _record$attachment5.file_type)) {
_context.next = 4;
break;
}
_context.next = 3;
return handleUpDown("".concat(env/* default */.Z.API_SERVER).concat(record === null || record === void 0 || (_record$attachment6 = record.attachment) === null || _record$attachment6 === void 0 || (_record$attachment6 = _record$attachment6.url) === null || _record$attachment6 === void 0 ? void 0 : _record$attachment6.replace('disposition=inline', '')), record === null || record === void 0 || (_record$attachment7 = record.attachment) === null || _record$attachment7 === void 0 ? void 0 : _record$attachment7.title);
case 3:
return _context.abrupt("return");
case 4:
(0,util/* downLoadLink */.Nd)(record === null || record === void 0 || (_record$attachment8 = record.attachment) === null || _record$attachment8 === void 0 ? void 0 : _record$attachment8.title, "".concat(env/* default */.Z.API_SERVER).concat(record === null || record === void 0 || (_record$attachment9 = record.attachment) === null || _record$attachment9 === void 0 || (_record$attachment9 = _record$attachment9.url) === null || _record$attachment9 === void 0 ? void 0 : _record$attachment9.replace('disposition=inline', '')));
case 5:
case "end":
return _context.stop();
}
}, _callee);
})),
children: "\u4E0B\u8F7D"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
padding: "4px 10px"
},
type: "link",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0,utils_fetch/* default */.ZP)("/api/virtual_classrooms/".concat(virtual_spacesId, "/good_lessons/").concat(id, "/delete_resources.json"), {
method: 'delete',
body: {
lesson_resource_id: record.id
}
});
case 2:
res = _context2.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success("删除成功");
getLessonResourcesList();
}
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
})),
children: "\u5220\u9664"
})]
});
}
}];
var uploadProps = {
multiple: true,
maxCount: 10,
// accept: ".pdf, .docx, .doc, .xlsx, .xls, .ppt, .pptx, .zip,.jpg,.png",
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (fileSize > 500 || fileSize == 0) {
message/* default */.ZP.error("".concat(file.name, " \u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002").concat(fileSize == 0 ? "文件内容不能为空" : '超过文件大小限制(500MB)'));
return upload/* default */.Z.LIST_IGNORE;
}
return true;
},
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json")
};
var getGoodLessonsDetail = function getGoodLessonsDetail() {
dispatch({
type: "virtualSpaces/getGoodLessonsDetail",
payload: {
virtual_spacesId: virtual_spacesId,
id: id,
virtual_classroom_id: virtual_spacesId
}
});
};
var getLessonResourcesList = function getLessonResourcesList() {
window.scrollTo(0, 0);
dispatch({
type: "virtualSpaces/getLessonResourcesList",
payload: objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
virtual_spacesId: virtual_spacesId,
id: id
})
});
};
var getItem = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(id) {
var result, res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0,utils_fetch/* default */.ZP)("/api/attachments/".concat(id, "/detail.json"), {
method: 'get'
});
case 2:
result = _context3.sent;
if (!((result === null || result === void 0 ? void 0 : result.status) !== -1)) {
_context3.next = 10;
break;
}
if (!(result.file_type === "txt")) {
_context3.next = 9;
break;
}
_context3.next = 7;
return (0,utils_fetch/* default */.ZP)(result.url, {
method: "get",
headers: {
"Content-Type": "application/xml"
},
credentials: 'omit'
});
case 7:
res = _context3.sent;
monacoValueRef.current = res;
case 9:
setData({
type: result.file_type,
content: result.url + "&nocredentials=true"
});
case 10:
setListItem(objectSpread2_default()({
recordid: Number(searchParams.get("recordid"))
}, result));
case 11:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function getItem(_x) {
return _ref4.apply(this, arguments);
};
}();
var handleUpDown = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(url) {
var _exec, _res$headers;
var filename,
res,
blob,
fileName,
_args4 = arguments;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
filename = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : "";
_context4.next = 3;
return fetch(url, {
method: "get"
});
case 3:
res = _context4.sent;
_context4.next = 6;
return res.blob();
case 6:
blob = _context4.sent;
fileName = decodeURIComponent((_exec = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(res === null || res === void 0 || (_res$headers = res.headers) === null || _res$headers === void 0 ? void 0 : _res$headers.get("Content-Disposition"))) === null || _exec === void 0 || (_exec = _exec[1]) === null || _exec === void 0 ? void 0 : _exec.replace(/['"]/g, ''));
(0,util/* downLoadLink */.Nd)(filename || fileName, window.URL.createObjectURL(blob));
case 9:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return function handleUpDown(_x2) {
return _ref5.apply(this, arguments);
};
}();
(0,_react_17_0_2_react.useEffect)(function () {
!isAddResModal && getLessonResourcesList();
}, [urlData]);
(0,_react_17_0_2_react.useEffect)(function () {
if (isViewFile) {
getItem(fileid);
} else {
virtual_spacesId && id && getGoodLessonsDetail();
}
}, [isViewFile]);
(0,_react_17_0_2_react.useEffect)(function () {
var _DescOpenDom$current;
if ((DescOpenDom === null || DescOpenDom === void 0 || (_DescOpenDom$current = DescOpenDom.current) === null || _DescOpenDom$current === void 0 ? void 0 : _DescOpenDom$current.clientHeight) > 84) {
setIsDescOpenShow(true);
} else {
setIsDescOpenShow(false);
}
}, [LessonDetail]);
return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: !!loading["virtualSpaces/getLessonResourcesList"] || !!loading["virtualSpaces/getGoodLessonsDetail"],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "ml40 mr40",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* HeadBack */.qE, {
title: isViewFile ? listItem === null || listItem === void 0 ? void 0 : listItem.title : LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data = LessonDetail.data) === null || _LessonDetail$data === void 0 ? void 0 : _LessonDetail$data.name,
onClick: function onClick() {
if (isViewFile) {
_umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson/").concat(id, "/detail?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
return;
}
_umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
},
children: [isViewFile && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
openLoading: true,
className: "primary-hover",
type: "link",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xiazai4 font14"
}),
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var _listItem$url2;
var _listItem$url;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
if (!["pdf", "txt", "image"].includes(listItem === null || listItem === void 0 ? void 0 : listItem.file_type)) {
_context5.next = 4;
break;
}
_context5.next = 3;
return handleUpDown("".concat(env/* default */.Z.API_SERVER).concat(listItem === null || listItem === void 0 || (_listItem$url = listItem.url) === null || _listItem$url === void 0 ? void 0 : _listItem$url.replace('disposition=inline', '')), listItem === null || listItem === void 0 ? void 0 : listItem.title);
case 3:
return _context5.abrupt("return");
case 4:
(0,util/* downLoadLink */.Nd)(listItem === null || listItem === void 0 ? void 0 : listItem.title, "".concat(env/* default */.Z.API_SERVER).concat(listItem === null || listItem === void 0 || (_listItem$url2 = listItem.url) === null || _listItem$url2 === void 0 ? void 0 : _listItem$url2.replace('disposition=inline', '')));
case 5:
case "end":
return _context5.stop();
}
}, _callee5);
})),
children: "\u4E0B\u8F7D"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "delete-hover",
type: "link",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-piliangshanchubeifen font14"
}),
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
var res;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return (0,utils_fetch/* default */.ZP)("/api/virtual_classrooms/".concat(virtual_spacesId, "/good_lessons/").concat(id, "/delete_resources.json"), {
method: 'delete',
body: {
lesson_resource_id: listItem === null || listItem === void 0 ? void 0 : listItem.recordid
}
});
case 2:
res = _context6.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success("删除成功");
_umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson/").concat(id, "/detail?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
}
case 4:
case "end":
return _context6.stop();
}
}, _callee6);
})),
children: "\u5220\u9664"
})]
}), !isViewFile && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "primary-hover",
type: "link",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-bianji7 font14"
}),
onClick: function onClick() {
setIsEditModal(true);
form2.setFieldsValue(LessonDetail === null || LessonDetail === void 0 ? void 0 : LessonDetail.data);
},
children: "\u7F16\u8F91"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "delete-hover",
type: "link",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-piliangshanchubeifen font14"
}),
onClick: function onClick() {
var modal = es_modal/* default */.Z.confirm({
icon: null,
centered: true,
maskClosable: true,
width: 374,
title: "提示",
content: "确定删除该好课?",
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
var res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return (0,utils_fetch/* default */.ZP)("/api/virtual_classrooms/".concat(virtual_spacesId, "/good_lessons/").concat(id, ".json"), {
method: 'delete'
});
case 2:
res = _context7.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success("删除成功");
modal.destroy();
_umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
}
case 4:
case "end":
return _context7.stop();
}
}, _callee7);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}(),
onCancel: function onCancel() {
return modal.destroy();
}
});
},
children: "\u5220\u9664"
})]
})]
}), isViewFile && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
position: "relative",
height: 1000,
margin: "25px 0"
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
data: data === null || data === void 0 ? void 0 : data.content,
type: data === null || data === void 0 ? void 0 : data.type,
disabledDownload: !(0,authority/* isLogin */.bg)(),
style: {
position: 'absolute',
zIndex: 1,
alignItems: 'flex-start'
},
monacoEditor: {
value: monacoValueRef.current,
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onClose: function onClose() {
setData({
content: "",
type: ""
});
_umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson/").concat(id, "/detail?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
}
})
}), !isViewFile && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.LessonDetail,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
wrap: false,
justify: "space-between",
style: {
height: 104
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
width: 166,
height: 104,
src: "".concat(env/* default */.Z.API_SERVER).concat(LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data2 = LessonDetail.data) === null || _LessonDetail$data2 === void 0 || (_LessonDetail$data2 = _LessonDetail$data2.cover) === null || _LessonDetail$data2 === void 0 ? void 0 : _LessonDetail$data2.url)
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "ml20",
style: {
flexDirection: "column",
flex: 1
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
style: {
fontWeight: 500,
lineHeight: "26px"
},
children: LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data3 = LessonDetail.data) === null || _LessonDetail$data3 === void 0 ? void 0 : _LessonDetail$data3.name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt20",
style: {
lineHeight: "22px",
color: "#333"
},
children: LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data4 = LessonDetail.data) === null || _LessonDetail$data4 === void 0 ? void 0 : _LessonDetail$data4.creator
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt10",
style: {
lineHeight: "22px",
color: "#333"
},
children: LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data5 = LessonDetail.data) === null || _LessonDetail$data5 === void 0 ? void 0 : _LessonDetail$data5.school_name
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: (LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data6 = LessonDetail.data) === null || _LessonDetail$data6 === void 0 ? void 0 : _LessonDetail$data6.lesson_url) && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
onClick: function onClick() {
var _LessonDetail$data7;
window.open(LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data7 = LessonDetail.data) === null || _LessonDetail$data7 === void 0 ? void 0 : _LessonDetail$data7.lesson_url);
},
children: "\u8FDB\u5165\u8BFE\u7A0B"
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: DescOpenDom,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: "mt20 font14 ".concat(!isDescOpen && Detailmodules.MultiLine),
style: {
WebkitLineClamp: 4
},
value: LessonDetail === null || LessonDetail === void 0 || (_LessonDetail$data8 = LessonDetail.data) === null || _LessonDetail$data8 === void 0 ? void 0 : _LessonDetail$data8.desc
})
}), isDescOpenShow && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
style: {
"float": "right",
display: "inline-block"
},
onClick: function onClick() {
return setIsDescOpen(!isDescOpen);
},
children: isDescOpen ? "收起" : "展开"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTabs */.YG, {
className: "mt20",
value: urlData.resource_type,
onChange: function onChange(resource_type) {
return setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
resource_type: resource_type
}));
},
tabBarExtraContent: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "link",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shangchuan3 font14"
}),
onClick: function onClick() {
setIsUpResModal(true);
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
resource_type: 1
}));
},
children: "\u4E0A\u4F20\u8D44\u6E90"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "link",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-lianjie2 font14"
}),
onClick: function onClick() {
setIsAddResModal(true);
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
resource_type: 2
}));
},
children: "\u6DFB\u52A0\u5916\u94FE"
})]
}),
dataSource: [{
id: 1,
name: "资源"
}, {
id: 2,
name: "外链资源"
}]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
className: "mt20",
columns: columns,
dataSource: (LessonResList === null || LessonResList === void 0 || (_LessonResList$data = LessonResList.data) === null || _LessonResList$data === void 0 ? void 0 : _LessonResList$data.list) || [],
locale: {
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
},
pagination: false
}), (LessonResList === null || LessonResList === void 0 || (_LessonResList$data2 = LessonResList.data) === null || _LessonResList$data2 === void 0 ? void 0 : _LessonResList$data2.count) != 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mt20 mb20",
wrap: false,
align: "middle",
justify: "space-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
children: ["\u5171\xA0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF"
},
children: (LessonResList === null || LessonResList === void 0 || (_LessonResList$data3 = LessonResList.data) === null || _LessonResList$data3 === void 0 ? void 0 : _LessonResList$data3.count) || 0
}), "\xA0\u6761\u6570\u636E"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: false,
showQuickJumper: true,
current: urlData.page,
pageSize: urlData.limit,
onChange: function onChange(page, limit) {
return setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
page: page,
limit: limit
}));
},
total: (LessonResList === null || LessonResList === void 0 || (_LessonResList$data4 = LessonResList.data) === null || _LessonResList$data4 === void 0 ? void 0 : _LessonResList$data4.count) || 0
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddOrEdit/* default */.Z, {
title: "编辑好课",
form: form2,
width: 1200,
open: isEditModal,
centered: true,
destroyOnClose: true,
dispatch: dispatch,
onCancel: function onCancel() {
return setIsEditModal(false);
},
confirmLoading: loading["virtualSpaces/putGoodLessonsDetail"],
onOk: function onOk() {
return form2.submit();
},
handleFinish: ( /*#__PURE__*/function () {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(ValueAll) {
var res;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return dispatch({
type: "virtualSpaces/putGoodLessonsDetail",
payload: objectSpread2_default()({
virtual_spacesId: virtual_spacesId,
id: id
}, ValueAll)
});
case 2:
res = _context8.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success("修改成功");
setIsEditModal(false);
getGoodLessonsDetail();
}
case 4:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return function (_x3) {
return _ref8.apply(this, arguments);
};
}())
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: "添加外链资源",
width: 800,
open: isAddResModal,
destroyOnClose: true,
onCancel: function onCancel() {
setIsAddResModal(false);
form.resetFields();
},
confirmLoading: loading["virtualSpaces/postAddLessonRes"],
onOk: function onOk() {
return form.submit();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form,
initialValues: {},
colon: false,
onFinish: ( /*#__PURE__*/function () {
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(ValueAll) {
var res;
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return dispatch({
type: "virtualSpaces/postAddLessonRes",
payload: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, ValueAll), urlData), {}, {
virtual_module_id: window.localStorage.getItem('vtrsModuleId')
})
});
case 2:
res = _context9.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success("添加成功");
setIsAddResModal(false);
form.resetFields();
getLessonResourcesList();
}
case 4:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return function (_x4) {
return _ref9.apply(this, arguments);
};
}()),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
htmlFor: null,
name: "name",
label: "\u8D44\u6E90\u540D\u79F0",
rules: [{
required: true,
message: '请输入资源名称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u8D44\u6E90\u540D\u79F0",
maxLength: 60
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
htmlFor: null,
name: "url",
label: "\u8D44\u6E90\u94FE\u63A5",
rules: [{
required: true,
message: '请输入链接资源'
}, {
type: 'url',
message: '资源链接格式不正确'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u8D44\u6E90",
maxLength: 150
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: "上传资源",
width: 665,
open: isUpResModal,
destroyOnClose: true,
onCancel: function onCancel() {
setIsUpResModal(false);
form1.resetFields();
},
confirmLoading: loading["virtualSpaces/postAddLessonRes"],
onOk: function onOk() {
return form1.submit();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form1,
initialValues: {},
layout: "vertical",
onFinish: ( /*#__PURE__*/function () {
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10(ValueAll) {
var _ValueAll$attachment_;
var res;
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
ValueAll.attachment_ids = (ValueAll === null || ValueAll === void 0 || (_ValueAll$attachment_ = ValueAll.attachment_ids) === null || _ValueAll$attachment_ === void 0 ? void 0 : _ValueAll$attachment_.map(function (item) {
var _item$response;
return item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id;
})) || [];
_context10.next = 3;
return dispatch({
type: "virtualSpaces/postAddLessonRes",
payload: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, ValueAll), urlData), {}, {
virtual_module_id: window.localStorage.getItem('vtrsModuleId')
})
});
case 3:
res = _context10.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success("添加成功");
setIsUpResModal(false);
form1.resetFields();
getLessonResourcesList();
}
case 5:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return function (_x5) {
return _ref10.apply(this, arguments);
};
}()),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
htmlFor: null,
name: "attachment_ids",
valuePropName: "fileList",
rules: [{
required: true,
message: '请上传图片'
}],
getValueFromEvent: function getValueFromEvent(e) {
if (Array.isArray(e)) {
return e;
}
return e === null || e === void 0 ? void 0 : e.fileList;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
style: {
borderRadius: "2px"
},
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shangchuan3"
}),
children: "\u4E0A\u4F20\u6587\u4EF6"
})
}))
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "font12",
style: {
color: "#6B758B",
lineHeight: "20px"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u6CE8\u610F\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["1\u3001\u4E0A\u4F20\u6587\u4EF6\uFF0C\u5373\u8868\u60A8\u5DF2\u540C\u610F", /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
target: "_blank",
to: "/users/mmipb3zhj/videos/protocol",
children: "\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"
}), "\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u5355\u54E5\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC7500M"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "3\u3001\u4E00\u6B21\u6700\u591A\u4E0A\u4F2010\u4E2A\u6587\u4EF6"
})]
})]
})
})]
})
});
};
/* harmony default export */ var Detail = ((0,_umi_production_exports.connect)(function (_ref11) {
var loading = _ref11.loading,
globalSetting = _ref11.globalSetting,
virtualSpaces = _ref11.virtualSpaces,
user = _ref11.user;
return {
globalSetting: globalSetting,
loading: loading.effects,
virtualSpaces: virtualSpaces,
user: user
};
})(LessonPage));
/***/ }),
/***/ 7965:
/*!****************************************************************************!*\
!*** ./src/pages/virtualSpaces/components/FileImage/index.tsx + 7 modules ***!
\****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_FileImage; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(39647);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/default.png
var default_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAAAzZJREFUaEPt2W1IE3EcB/Dv3dzUPTTbfFi5RuiCkjJ6AEt8oLRAKQl9EfSiICL0RS+KXkT4IoogEExMcBQRvYogyZKIwDcmlPUiZxYI2YO4czG3qTn35G4XNyhEc9vd5u5mt3dj/7v7f37f3/9ud0cwDCPDOvoQEkjkaUoJiTwg/H8J5Vu+XqHBXAID3Rqk45IR5L2HtUXX6swIJWP/MRPSW8Z9YCBPxsFW28fVgwWOyQBZ2lGmciZ6nNig7vGkVC7aRO/XmTDlCXnHZoPlnRU5nxJBiQbEItx+OjTsCDXdqdK84IsSFYhF+GkmPGRbuNxRrevkgxIdiEXQDMEMUR5LW8XGC1xRogSxCIIgmPd2b//NA9o6LijRgv4gRp2BMbVBs/eiEcF4YKIHsYjx2eA0RZO7b+9TOmKh0gLEIuwLtPezO1jZVakdiYYSBShW1Zf8bnW1mPevJxBcLeYMCbS0AvoU/PXh0HJSQiuKJSX0j/7RZ5Fw+cNcOmvVsYKdFAxKGa6X56LGpEROpgzzwTAGKS9a3zgx8Yv/HYkgoGKtHP1NRmzIXPnIzxcK43gvheHpAK/EBAGxmD35WXD6aNx454LV4ccOnQKtZXoYNXJ8n1tE2aMJ0Ax3U8pBm1UZGD29NTLTxj4KAzbf31mX6BQYPGmKfK95Mgkrj5RSDtqVq4ClxoD5II36XgrhZSlMnCuCWk7ifP9P9HzxcI4o5aBoM6wqzMbThsLIkCM9k/jg4L6ORAHarlOg0axGc2kOVHISww4/antsnNNhNxAcdGiLEo/rN0FGEhEA5QnhxHMK3+YW0xPUVpmHszu1CNIMuj/Ooss6A3cCF1nBE2qvzsOZEi1e/VjAqZd2Xqks3UhwkFGdAXYNsS3Gt81EBVKQQEWhEkN2H7whHlfSZZkKntDd2gI0bdNgwOZFY99U+rfcg6MGNBSr8XbKh2PPqPQHaeQEDptUeG3zYiaQ+C2E4C2XcCRiW0MSKEYFpJZbXiDpIUmyF03STwopeGkcdw0ILLqazdnRxsd8WL/Gr/XjtoCAWwai3dFcfCshUPxHFMfImAmJY5rxz0ICxV8rYUZKCQlT9/iP+htQKA9TYDw82QAAAABJRU5ErkJggg==";
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/excel.png
var excel_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAAA+NJREFUaEPtmnlIFFEcx7/jrlnZoVYWlrFZ2F3qtrVBm0FlF2UF0fGPEXRZqWV22KEWJf1hIkX0TwRBZUSHFXZIoV2moFJRYmaY7uZupmbrrsceL97Clh3rzNZMs9W8f99v3vt+3vc7w8x7wxBCZPiHGiMBebibkkMebhD+T4fmXVsVbycklgDD+XRIEzQlb58qYR6fY7I6RGFshGTwOalzrKXD58NkMV9PDF+/hK/xWYHm5Kys4NuZzkC+8h7Qt9afSQrfuIYPKFagqJyVVj4m+tkY1CEKRJvOrM/cFbE56Xfn8hggMAx516Lfv1O5Kf13oDwHCAABsWtb6uKSJ8Wd/FUojwKiEATEWmvUr96j2pL9K1AeB0QhbMTeoTXpl+ydFHfbXSiPBKIQFrvVXNdqmLNHGV/oDpSoQAsUsxDg09el3g5iaTa0GGYkqxKec4USFWhCwGhMHDCmS62ttvYP70mjeu+4LdVcoEQF8mbkmDV0Ovp39+9Sq9naqmtob1AlKxPes0GJCkTFyYgXQv2GYUCPfujm5e1Sb0NbU/URzb4RHg/kFGi1WmC3dv1Skr/8qvyvAWITSvvvRJ+XgH5YKCFfTrm40rlGcuhnKyY55G6O3KiXIidFzo248FEqRU6KHB85cmMMQSM3PUiNIN+ByK7M+SJpzegVeNFYgSJDGTaNX42bb+/hzaeabyQP6hmIrWFrEdwrCG22duRrH+PsqyuwERsrmqBAckaGTE0aTpdfQGn9c6gHRmB5aDS2PzzgEJc6ORGXq3LxrKH8G6GH1Dvx4F0RbtXko7vMBwsUM3FP+whN7c3iAtHZqUPpU3cjveQ4todvwK7Hh/GhrdEhzBVQluYALr6+gYd1xawA3xcI6pBzsqihkdgWtg6pRRl4Yij9osEV0Cj/EYgdHwNfeU8U6ApxvTqPkzt/7PNht3Kz42tTZzIgo+zr/qArICexoncwIgerQTdKkh4dxFujltUxwR1aqJgNZeAEpBUfxUF1Egp0T5BXe7/LyH2vOmbUMrRYTLhUlSsuUKhfCHZExCL+/n6YrGb06dYbWZo0pBRnoMaoQ8rkbSjSl6Hy4xuH0OYOo+P+ovfQnZoClNQ/Qy9vXySGb8Cxp6fwsqlSXKCZQ6ah2qhFVfPX3aWxAaGO+OXrCqEKDHNEytno45s+9fx9+mJxyFwo+gTTsyHcrX2Aknpu226CR451SXkukID+i3c5IY8k3UkkA1Tdjj4/ku0a1p1TIQ+N2cR17pcxTOLNReey2K5hBaIDCHWszyaO9lNnvBjmBBcYR7308xKXZRWxRnJIxMXnNLXkEKdlErHoM3lAaVMM4OYsAAAAAElFTkSuQmCC";
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/pdf.png
var pdf_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAABQBJREFUaEPtmmtoU2cYx//POc3pRVtte7K7G92YK1QHY/tQkbmi4hA/TOZyUp0oirWguNEJo8gu/bbJ3JVNhjJRmmKTbNBNd0FWkF2g0IGMUf0wGH5wF0napkubmEvfZ7xpUtqs5sT05LKZ8y3nvJfn9/yf93ne9yXEzCr+Rw+VgUpczbJCJS4Qbk+FAnv2rIiHw29CiCcB3GmRStfV6urN9WfOjFg0XmIYU4USMJOTlxhYbsXERBRjYBTMdxHRmKJpWxpcrmErxs4KyG8YZ5nZYdWEIJqsqq5+PBIKXWDgAflb0bStjS7XRSvmMFXIZxi/g9mqMIMEsHs8y8c7O++dHh+/wMyPgOiGYrO1N/b1nV8slDmQwxFf7CTz+ieB5Lupjg49HAh8zcBjBMRRUbFbP3vWvZj5igokDZ84cKAu6vefA/NaIhIgOqi73SdzhSo6UMLwnp5q38jIZwA2yZ+KonQ3ut3HcoEqDaAZKJvv8mUXmLclod5odLtfvVWo0gGSlp84ofgGB09CiN0JEEU5bne7X7gVqMIDASG711uXychRp/NdIcShRF1RFJe+YcNe7N8vsgErBhDU2tr7G06d+sMEqkcI8UoCimhAX7NmB7q6omZQRQEiVT2s9/e/b2ac3+nsYiHeSkJ9qzc1PYujR0OZ+hUFCECIqqq26L2932cBtRfMHzOzko0jigUkw0jWnE8J+JEBXyYwlpmPeRup6st6f/87paiQmTALfi8DLeQWn9V7uZy0melUVuj2VIhokpgT6ZaJFGKuZKIVYH4o5RAiGgfzULJNBYAaeXQn4EGZfuc6jgAG8E26M5noPjCvntc2H1mOiC7rHs+j8ixDQqg1uh6UxW58585N8WjUC+YlIPrB7vG0hTo775gGYrXNzVOyygc7O+sjgcARMB9kZi1ZMGO6x1MtjxEVsVjinXxCwWA7pqffKxiQzzB+BXPTzGqln211dc/Eg8HnWIhjKSC/YURSN7MEXCNF6a3S9Q9uTEy0cDQqT6uKvGOQQD6H46vU8eFmeSMvSSGl0DwguTFW1UOsab9wOHxxIaDZcAQu6S0t6/xXrvSwEIdLEkh6X1u6dH0sFNokhPgwE5AEkwc4rqwc5HB4OAXkdzp7wbxuVh3mJek3TXlVaHTXrpUqs0Y2W3DZ5s3XAgMDrfFYbICZ682ACPhcX7Vqh39k5G8AQoZcepiNOZ27p4X4pGBraLS9/W0W4h4AVWB+mIHm2cmTSWHuGkrLbOd1r3erzzAmCNAkkN/pdEGIp+aMUcPMywoGlL6G5nnYDEhVX7fV1vZGA4HfZteQYXwJ5qczbSTyGnK5AiWSSlNT6+jVq91CiCP/KSCfYfyZyOrMEQB/QVG+qLTbj0cmJlYjEpFp21aSWe5fYZIMuXnvvV51/Ny5lfFo9HkS4qX0wlrMOjTNgJ8Ae/o2Zs7WR17Ij82pPTYw1zNAC64RousE1KcgC1pYMy3afH/LS1LIt9EFz3JlIAs9YFXITQGotNCunIdSFOXFRrf7o4xhafbHC7/DMcTAEzlbYWFH0rT1el/fd4sD2r7dyfF4n4V25TQUEQ3rGzeuNbvjNr1olLP72tu7SYjXzOpETpZm04loSKup2bns9OmrZs2zApKDjHV03I1wuJXjcbvZoFZ9F0RRVVVHGvbt+wltbfLuwfTJGsh0pBJpUAYqESFuakZZobJCBfbAP/nAgWJ1139AAAAAAElFTkSuQmCC";
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/ppt.png
var ppt_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAAA19JREFUaEPtmltIFFEYx/+zs17WVVtZRUMhykLoKSjBBytKUCRCyKDIILpQUFHkiqT1YFJo5S1BQ4JKSPOlhwwLLH0oC0sK0iBEVqxcWW+r6bb3mRMzJm24Ojs6244187acb77z/33/bw+Hc4YihND4hx5KAZK5m4pDMjcI/6dDpsxN5wnDngZIspQOadKznuuv3M6WMqegQ3MwTKWUk87n0u7NA6Wi2nTnSnOkyi8INJyR3C+1M95AdEwsmMnxppj8q0ekgPIDaINHiol85eAc4oC4h5001+ryy/JXOpdsgCiKIsz4cInOcOPaSqBkAzQHQVj3qOmCvvBm3XKhZAbEN5+HHfl6TFdU3bwcKBkC8UwuxjySG1NU+UwslDyBuObzuGzEbMrWXap5LQYqqEARWfuhjk9cVC9xOWbU4+ad2uLqPn+hggoUsnkrNNvSl9RKnPaJ8LGRtLDLtUP+QAUViKhDoM3cB3VswpJaWbvVFGqZSI0orh4TggoqEL9Qq2iEpmwBHbcWqrCwRfUyE2NDcRWNG2UPNC+QeFiwLFlS77pXX9SrBkhIKDee1DGoAC0o1HBG4Dan/rjiHaM45KtiikNi+0hEvNJySsuJaBcpQpWWU1pOij4SkSOgLRd54CS/9ScMw0ty9fVguqEMcDkRfaIQmrRdICwLEAJHdydm7lcjPG03oo/OnVSpIiLB2qz8+FTFRbgHPgmiBRRIX9oA66O7cH58C0obhRhDGdzGz5htqkNc1UNM15Xyv1U6PfQl9bA+aYa94zEvmouPv/MU5kPbBSH+2tbHG4ibVJORg/DUHZgqN/wBxI1F5Z0BFRqGmXtV8gayd3fC3d8LOjYB0ccLMNvSAHtnKw9kbX0Az7dBqJPWY82pIljKDXD1vpM3EFd1xjIO4rTD8b4Ljq52XjAHxHy3gNhtIDYr7G9ewPnh9+HNqmg5717ngCzXC8CMmnz+RxSgX2UJ6Cqn3XMQjp6XYMZGFrgQmXsMP9paQBw236sYrUb04bOYaayRzyonSolEwQF1SCKNotIoQL43p4G7khRlDyhjUocxRegdwZPTQF4aC4nzHqdo2pDYPnBL6B1BIC5BoK71hcTNjVNGilbV+wPDRysfL/lX1qBFKQ4FrfR+Tqw45Gehghb2EzV0UlPSsDHCAAAAAElFTkSuQmCC";
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/video.png
var video_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAAA0hJREFUaEPtmctLVFEcxz+30dDRXDiSWaDLSAUN0jAhTPFNJhIuotVI+cAHZJLgZhYFToSizsbX/QtEbaOtQkJDDYygRYtoISgqbbTwgQ43DrdhMB/3OjN3ulP3LM895/f7fc73d55XUhTFxj9UJAvI5GpaCplcIP5jhZ48ucTWVheKcg9FuRwWpSRpFUl6jcPxHLd7XY9PfQq1tFxne3saRUnSYzTkbSTpO3Z7OQMDH7VsawO5XBdYXv4MXNEyZvD3FVJTM3G5fpzmRxvo0aNneL0vDA5Wn3mbrYvhYXdwQE7nO+CWPo+Gt3qPLN8OFugnEGN4qPoc7CLL8cECHejzFaZWshxlAR0aAafTUsjQ5DMs5WpqoKAAenuhsBDy8/0csgznz8PDh/66mRmYn4f2doiOVuu/foWREejoAIdDrdvfh+lpmJw8flwMAxoagqgo2NqC7m548AAyM9UgvF7o74erV6Giwh/Y+DisrUFDA5w7p9YvLcHEBHR2QlycH6q+PsxAQgVfWV+Hnh5oaoK0NLV2dxdevoTiYsjL87cdHYXYWHUAfOXtW1hcPKye0/kXgYTrb99gcFBNn6TfR77NTXC71dRLT1cDPDiAvj7IyICyMn/QY2OwsaGqJ0lQVxdmoOPdGV9r2BwSk9k3D4zACHvKWUBnlNF0Cq2swNSUuueUlkJKytmITAcklue5ORVCzDWxCVdVQUKCPjDTAYklfGHhcPAxMVBZCSUl/tPCSXgRAeQLPjERamshN/dktSIKyIfR2grZ2cdDRSRQWxtkZf0DQOJkLVIuJyfCU04cSu/ehaKiCFwUxGl8dlZVwGaDO3fUZTv+1DcOv2Kmm0NiY33zRr3oiWU6OVnf/uNrZTqgs4V/tLUFpI6J9lPwSa8+4iTgexsIVo0/+4tL4OPHYb7gVVdDeXnoocQjiZh74p3huGLYBS/Uqui1ZwH9OVLWy6ne3AmwXQhSbhW4GKD7UHfbQJZP/b+rvWzX1Y2hKNWhjiwge5I0yejo/dP6agM1Nl5jb++DCX567WK338Dj+RIckOjd3JzFzs4r4CaKYg9odAPtJEnbwAKxsU/xeD5pmdFWSMuCyb5bQCYT5Eg4lkKWQmEegV/wVtNEQlRZ7wAAAABJRU5ErkJggg==";
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/word.png
var word_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAABDNJREFUaEPtmXtsU1Ucx7+37bq1rGu7Rxndypjr6CozhkV8hKAs6AwJ8ZEAMkMQHxlEosPgI4qvf1hEo4n/EFEhOkXDNhSJkYfRkQyZJgQxwKJbtznLykbtXLvbduvjHnOuNlD3uC3cS69w75+9v/s738/5fs/JvacMIUSNa+hiFCCZu6k4JHODcP05dBRg6ttcW+KENBCCG8R0aFuN5ecGu3GRmD0FHSpucz0f50iTmIMmerXXzYUnFDtdZ521UKz+gkCWlh4XAeaJNeClfShQtSkbX7nZjvttubVijCEIVNTSExNjoKl6JIDovb2/j+1/aJ5h5ZWOJRsgAKS5179rXYVx45VAyQkIcQLyca9/+2N248uXCyUrIAoxwRHyUR/77Aa74d3LgZIdEIVgoxzZ3Rt49Okq06fpQskSiEL4JuJcc3/ggWeqzN+kA5VRoP1LS7DYop9W7/lwLNbcN1b7wgJzZ6pQGQV6ymHCqzcXzai1j41G9vwxUfPKjbm/pgKVUSC9Cti3tBS3FOpm1Nrlj4RazgWdry8wDwpBZRSIistmgA12IxYV6mDQTv/xfMI7fqGxOt8qe6CEQBKNg8TJjHp965ya/w2QkFB637u6UgGaNFFSvpym4sqlNYpDU82Y4lC6OUqjXomcErk04iJGqRI5JXJi5CiNHpJGrqHShPryPBACeMJRdHrD+KDHjwh38QXTkqPG1psK+LM3WnfcG8b2sz4EYxdrSvUavFhdAKcxG3FC0D4UwltdPkS5yaSSAjUvnoP3ukd5kVadhoermzMLK9rdvBhjlgrf3mPDttM+HHCzUDPAE5UmPGgzYPn3blDuEr0GX9eWYuspLw4OBpGlYrDZacZgKIY9/YFJRFcNKDFy08IiDLBR7OwZxUvVBfzPTWd8ScLev70YBwdZfOlmsePW2Tg5Mo4PXf6UgnfVgZZYdFhfYcTjnUPYd1cJ3ukawQ/ecJLYh8vz4MjT4rVf/sSPy8tQ3+FBPxuVJ9CyYj1WlRmw8adhfL7Eip3dozg6HEoS+0iFEXTd0Ch23DuXh+8OROQJtOuOYnw3FMJn/QE0Vpl54c+d9CaJbb3Tyq89WvdmTRFGIhze+E8sp6OTPHJHPEGc+mscVl0W1pQboFUxWHvsPK8nR83g0DIbv17aBsb4Bd8w34R8rRrrj/9TY9aqcPhuG1oHxvDFvzWbnfk44QtPua4kBbqvNBcrywygG7AnFOO37QPn2KTJ1akZbHKYcVthDj3i5bfk3S4//0ziytWosMlh4g9JxuMcDnuC+KRv8g5H6yUFSin0IhcpQNfFu5ylxfUbAakQOT1pt2PA9F5YbXcIPSh4cjq71dXIEfK2UCOp76sYZsvwKrvgf0aCQFQohSIET2bCKeoMw2BHKjBUa0pAUs++mP0VIDFnU4peikNSzKqYPa85h/4GTP+NU24sRsEAAAAASUVORK5CYII=";
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/imgs/zip.png
var zip_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAAAXNSR0IArs4c6QAABIRJREFUaEPtml1oHFUUx//nzswmaZNso0lTNNAUTGtb8UFb44v9MEQs1NYiQoqiRh/0RRCsCtqCFqFBSrX4JggRqk3yUB+qUCSE2hTMhxELokJiWo2xTZs1SROyn3OP7G52dtmd7M7O7qy7uvM4c885/9/93537MUvMrOA/dFEZqMjdLDtU5Abhf+7QWGcLdP/rYPkIGHeBVBXKmrhpodv2DCT8oXtm5+Syd1Srv/tt7Onz2ksEqw6NCYycegNSHgO4MlaMt74Hcm8xavPkGdDNr2xpCd28gdDfsxCatkCu6jbt6cEf7SSyNuRGDh+F5HeTC/B9J0HVTcZt+VsfxK1zdnQgBhQOJkUJiNo1u7SD332fbbLMQD907kTAOwhATQHafhJUkwA00Qsx+2W2GiLtE4EiUEIJKuvce9UDl4aySZgZaLijF4ynzJLyti5QbXPcofHPITzns6lvtE0GWnEqqFS729VDly5bTWoB6PA0mBvNEgaXq0Bag/FIVGmgjfsAiMg98s8Af/Za0mIGFIVSQ0rdHY+r+wcuWklkBSgA5qjCDJdctxfi3peNVqz7QaPPZwqLPNfnPAjOXDdtS4qqK+76feqB/oFMyTIDDXWEMiWJPZfuPRBbX7EFxIEAAtfGwZJNywnN5XNtaG5C27n5dHqKBigsUi4uIHjjL7Cum2pW3XUX1EOD+50DqmgAXPVGfn3ZBzQ9CaLoCOXFKSiePqsGR9tJCfb7TKFIiCv06PkHHQPi7V2gmvhbjid7wFfPhFEiNUnVQBXGPJwdmFlrwjJae2odBMrfPGSZ9uGelPkwMTan3xDncWItCiC55ThE3WZDi/y1G2L+gmVttho66ZB+2wvJa1d0MZSGFtDmF42JFb7roIkPbeleNchJoOSiucxDlqnLQMldVaCVQlE6pAfXguvbAKKovqVpqKGstzTp2Qo55CJKQuGl38p6TCiAsLSutWwQCg5kXZq9lo4C3bkLvPFZQE04KInJDC6Brn4KzI/aE75alJNAvO0EqHbTqoJ59gpo4kQJASUtfVLmJc/PEOPHy0Bpe8DRIZfgEMv4xpZEdEEsS9EhaNUIXXwJFJwzOpZd66G2dYMXJktvyPHSFMTvp1NGiWw5Ft7ilR4QpA/0y9EkIALf/xHY6yktILnpCETjDvD8T9EzuNhGorIpcuYtpwYgpj8pnbdcyOsCGtsBLbYnStDuXwDd6odSZX6CY5vSybdcbO3GLFP0RU5+1LTbf3tMjgPZk2U/Kmeg4Y4gGCv7Afs68haZM9BQR/jAOX4inzdlNhIRzaL17IZ0kVaOscIffJ6wUT7/IURfo/XswdyARp7bDQ70/+vDjsAQle3Y2Z32s0pmh8LdMfxMF1g/kv8uzyKjEKfw0BdvZoqwBnStW8PMN++D5WsACv3fIB1CnMb6x95B8wvB/ADFsox2PgDpfQug3WCOf3bIVMXO8/ALAPwtlIoPsOOzMasprDlklm3iYxU1fgdmTgCLFSHc86rlD22J8uwDWe2yArcrAxW4w7MuV3Yo6y4rcMA/JZNzUzMJvf0AAAAASUVORK5CYII=";
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/components/FileImage/index.tsx
var _excluded = ["fileName", "width"];
var FileImage = function FileImage(_ref) {
var fileName = _ref.fileName,
_ref$width = _ref.width,
width = _ref$width === void 0 ? 26 : _ref$width,
props = objectWithoutProperties_default()(_ref, _excluded);
var checkFileType = function checkFileType() {
var ext = fileName.split('.').pop().toLowerCase(); // 获取文件扩展名并转换为小写
switch (ext) {
// 视频文件
case 'mp4':
case 'ram':
case 'avi':
case 'wmv':
case 'mov':
case 'mkv':
case 'flv':
case 'webm':
case 'm4v':
case 'rmvb':
case 'ts':
case 'vob':
case 'f4v':
case 'ogv':
case 'swf':
case 'asf':
case 'mpg':
case 'mpeg':
case '3gp':
case '3g2':
case 'm2ts':
case 'mts':
return video_namespaceObject;
// 压缩文件
case 'zip':
case 'rar':
case '7z':
case 'gz':
case 'tar':
case 'tgz':
case 'xz':
case 'z':
return zip_namespaceObject;
// 文档文件
case 'doc':
case 'docx':
return word_namespaceObject;
case 'ppt':
case 'pptx':
return ppt_namespaceObject;
case 'xls':
case 'xlsx':
return excel_namespaceObject;
case 'pdf':
return pdf_namespaceObject;
default:
return default_namespaceObject;
}
};
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", objectSpread2_default()(objectSpread2_default()({}, props), {}, {
width: width,
src: checkFileType()
}));
};
/* harmony default export */ var components_FileImage = (FileImage);
/***/ }),
/***/ 41750:
/*!********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/rate/index.js + 8 modules ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ rate; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.4@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(24931);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/StarFilled.js
// This icon file is generated automatically.
var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" };
/* harmony default export */ var asn_StarFilled = (StarFilled);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(99194);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/StarFilled.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var StarFilled_StarFilled = function StarFilled(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_StarFilled
}));
};
/**![star](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkwOC4xIDM1My4xbC0yNTMuOS0zNi45TDU0MC43IDg2LjFjLTMuMS02LjMtOC4yLTExLjQtMTQuNS0xNC41LTE1LjgtNy44LTM1LTEuMy00Mi45IDE0LjVMMzY5LjggMzE2LjJsLTI1My45IDM2LjljLTcgMS0xMy40IDQuMy0xOC4zIDkuM2EzMi4wNSAzMi4wNSAwIDAwLjYgNDUuM2wxODMuNyAxNzkuMS00My40IDI1Mi45YTMxLjk1IDMxLjk1IDAgMDA0Ni40IDMzLjdMNTEyIDc1NGwyMjcuMSAxMTkuNGM2LjIgMy4zIDEzLjQgNC40IDIwLjMgMy4yIDE3LjQtMyAyOS4xLTE5LjUgMjYuMS0zNi45bC00My40LTI1Mi45IDE4My43LTE3OS4xYzUtNC45IDguMy0xMS4zIDkuMy0xOC4zIDIuNy0xNy41LTkuNS0zMy43LTI3LTM2LjN6IiAvPjwvc3ZnPg==) */
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(StarFilled_StarFilled);
if (false) {}
/* harmony default export */ var icons_StarFilled = (RefIcon);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.4@@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(84957);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.4@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(69553);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.4@@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(46012);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.39.1@rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__(290);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.39.1@rc-util/es/KeyCode.js
var KeyCode = __webpack_require__(81331);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.39.1@rc-util/es/pickAttrs.js
var pickAttrs = __webpack_require__(90339);
;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/Star.js
function Star(props, ref) {
var disabled = props.disabled,
prefixCls = props.prefixCls,
character = props.character,
characterRender = props.characterRender,
index = props.index,
count = props.count,
value = props.value,
allowHalf = props.allowHalf,
focused = props.focused,
onHover = props.onHover,
onClick = props.onClick;
// =========================== Events ===========================
var onInternalHover = function onInternalHover(e) {
onHover(e, index);
};
var onInternalClick = function onInternalClick(e) {
onClick(e, index);
};
var onInternalKeyDown = function onInternalKeyDown(e) {
if (e.keyCode === KeyCode/* default */.Z.ENTER) {
onClick(e, index);
}
};
// =========================== Render ===========================
// >>>>> ClassName
var starValue = index + 1;
var classNameList = new Set([prefixCls]);
// TODO: Current we just refactor from CC to FC. This logic seems can be optimized.
if (value === 0 && index === 0 && focused) {
classNameList.add("".concat(prefixCls, "-focused"));
} else if (allowHalf && value + 0.5 >= starValue && value < starValue) {
classNameList.add("".concat(prefixCls, "-half"));
classNameList.add("".concat(prefixCls, "-active"));
if (focused) {
classNameList.add("".concat(prefixCls, "-focused"));
}
} else {
if (starValue <= value) {
classNameList.add("".concat(prefixCls, "-full"));
} else {
classNameList.add("".concat(prefixCls, "-zero"));
}
if (starValue === value && focused) {
classNameList.add("".concat(prefixCls, "-focused"));
}
}
// >>>>> Node
var characterNode = typeof character === 'function' ? character(props) : character;
var start = /*#__PURE__*/_react_17_0_2_react.createElement("li", {
className: _classnames_2_5_1_classnames_default()(Array.from(classNameList)),
ref: ref
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
onClick: disabled ? null : onInternalClick,
onKeyDown: disabled ? null : onInternalKeyDown,
onMouseMove: disabled ? null : onInternalHover,
role: "radio",
"aria-checked": value > index ? 'true' : 'false',
"aria-posinset": index + 1,
"aria-setsize": count,
tabIndex: disabled ? -1 : 0
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-first")
}, characterNode), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-second")
}, characterNode)));
if (characterRender) {
start = characterRender(start, props);
}
return start;
}
/* harmony default export */ var es_Star = (/*#__PURE__*/_react_17_0_2_react.forwardRef(Star));
;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/useRefs.js
function useRefs() {
var nodeRef = _react_17_0_2_react.useRef({});
function getRef(index) {
return nodeRef.current[index];
}
function setRef(index) {
return function (node) {
nodeRef.current[index] = node;
};
}
return [getRef, setRef];
}
;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/util.js
function getScroll(w) {
var ret = w.pageXOffset;
var method = 'scrollLeft';
if (typeof ret !== 'number') {
var d = w.document;
// ie6,7,8 standard mode
ret = d.documentElement[method];
if (typeof ret !== 'number') {
// quirks mode
ret = d.body[method];
}
}
return ret;
}
function getClientPosition(elem) {
var x;
var y;
var doc = elem.ownerDocument;
var body = doc.body;
var docElem = doc && doc.documentElement;
var box = elem.getBoundingClientRect();
x = box.left;
y = box.top;
x -= docElem.clientLeft || body.clientLeft || 0;
y -= docElem.clientTop || body.clientTop || 0;
return {
left: x,
top: y
};
}
function getOffsetLeft(el) {
var pos = getClientPosition(el);
var doc = el.ownerDocument;
// Only IE use `parentWindow`
var w = doc.defaultView || doc.parentWindow;
pos.left += getScroll(w);
return pos.left;
}
;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/Rate.js
var _excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"];
function Rate(props, ref) {
var _classNames;
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls,
className = props.className,
defaultValue = props.defaultValue,
propValue = props.value,
_props$count = props.count,
count = _props$count === void 0 ? 5 : _props$count,
_props$allowHalf = props.allowHalf,
allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf,
_props$allowClear = props.allowClear,
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
_props$character = props.character,
character = _props$character === void 0 ? '★' : _props$character,
characterRender = props.characterRender,
disabled = props.disabled,
_props$direction = props.direction,
direction = _props$direction === void 0 ? 'ltr' : _props$direction,
_props$tabIndex = props.tabIndex,
tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
autoFocus = props.autoFocus,
onHoverChange = props.onHoverChange,
onChange = props.onChange,
onFocus = props.onFocus,
onBlur = props.onBlur,
onKeyDown = props.onKeyDown,
onMouseLeave = props.onMouseLeave,
restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
var _useRefs = useRefs(),
_useRefs2 = (0,slicedToArray/* default */.Z)(_useRefs, 2),
getStarRef = _useRefs2[0],
setStarRef = _useRefs2[1];
var rateRef = _react_17_0_2_react.useRef(null);
// ============================ Ref =============================
var triggerFocus = function triggerFocus() {
if (!disabled) {
var _rateRef$current;
(_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 ? void 0 : _rateRef$current.focus();
}
};
_react_17_0_2_react.useImperativeHandle(ref, function () {
return {
focus: triggerFocus,
blur: function blur() {
if (!disabled) {
var _rateRef$current2;
(_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 ? void 0 : _rateRef$current2.blur();
}
}
};
});
// =========================== Value ============================
var _useMergedState = (0,useMergedState/* default */.Z)(defaultValue || 0, {
value: propValue
}),
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
value = _useMergedState2[0],
setValue = _useMergedState2[1];
var _useMergedState3 = (0,useMergedState/* default */.Z)(null),
_useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2),
cleanedValue = _useMergedState4[0],
setCleanedValue = _useMergedState4[1];
var getStarValue = function getStarValue(index, x) {
var reverse = direction === 'rtl';
var starValue = index + 1;
if (allowHalf) {
var starEle = getStarRef(index);
var leftDis = getOffsetLeft(starEle);
var width = starEle.clientWidth;
if (reverse && x - leftDis > width / 2) {
starValue -= 0.5;
} else if (!reverse && x - leftDis < width / 2) {
starValue -= 0.5;
}
}
return starValue;
};
// >>>>> Change
var changeValue = function changeValue(nextValue) {
setValue(nextValue);
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
};
// =========================== Focus ============================
var _React$useState = _react_17_0_2_react.useState(false),
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
focused = _React$useState2[0],
setFocused = _React$useState2[1];
var onInternalFocus = function onInternalFocus() {
setFocused(true);
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
};
var onInternalBlur = function onInternalBlur() {
setFocused(false);
onBlur === null || onBlur === void 0 ? void 0 : onBlur();
};
// =========================== Hover ============================
var _React$useState3 = _react_17_0_2_react.useState(null),
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
hoverValue = _React$useState4[0],
setHoverValue = _React$useState4[1];
var onHover = function onHover(event, index) {
var nextHoverValue = getStarValue(index, event.pageX);
if (nextHoverValue !== cleanedValue) {
setHoverValue(nextHoverValue);
setCleanedValue(null);
}
onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(nextHoverValue);
};
var onMouseLeaveCallback = function onMouseLeaveCallback(event) {
if (!disabled) {
setHoverValue(null);
setCleanedValue(null);
onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(undefined);
}
if (event) {
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(event);
}
};
// =========================== Click ============================
var onClick = function onClick(event, index) {
var newValue = getStarValue(index, event.pageX);
var isReset = false;
if (allowClear) {
isReset = newValue === value;
}
onMouseLeaveCallback();
changeValue(isReset ? 0 : newValue);
setCleanedValue(isReset ? newValue : null);
};
var onInternalKeyDown = function onInternalKeyDown(event) {
var keyCode = event.keyCode;
var reverse = direction === 'rtl';
var nextValue = value;
if (keyCode === KeyCode/* default */.Z.RIGHT && nextValue < count && !reverse) {
if (allowHalf) {
nextValue += 0.5;
} else {
nextValue += 1;
}
changeValue(nextValue);
event.preventDefault();
} else if (keyCode === KeyCode/* default */.Z.LEFT && nextValue > 0 && !reverse) {
if (allowHalf) {
nextValue -= 0.5;
} else {
nextValue -= 1;
}
changeValue(nextValue);
event.preventDefault();
} else if (keyCode === KeyCode/* default */.Z.RIGHT && nextValue > 0 && reverse) {
if (allowHalf) {
nextValue -= 0.5;
} else {
nextValue -= 1;
}
changeValue(nextValue);
event.preventDefault();
} else if (keyCode === KeyCode/* default */.Z.LEFT && nextValue < count && reverse) {
if (allowHalf) {
nextValue += 0.5;
} else {
nextValue += 1;
}
changeValue(nextValue);
event.preventDefault();
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
};
// =========================== Effect ===========================
_react_17_0_2_react.useEffect(function () {
if (autoFocus && !disabled) {
triggerFocus();
}
}, []);
// =========================== Render ===========================
// >>> Star
var starNodes = new Array(count).fill(0).map(function (item, index) {
return /*#__PURE__*/_react_17_0_2_react.createElement(es_Star, {
ref: setStarRef(index),
index: index,
count: count,
disabled: disabled,
prefixCls: "".concat(prefixCls, "-star"),
allowHalf: allowHalf,
value: hoverValue === null ? value : hoverValue,
onClick: onClick,
onHover: onHover,
key: item || index,
character: character,
characterRender: characterRender,
focused: focused
});
});
var classString = _classnames_2_5_1_classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames));
// >>> Node
return /*#__PURE__*/_react_17_0_2_react.createElement("ul", (0,esm_extends/* default */.Z)({
className: classString,
onMouseLeave: onMouseLeaveCallback,
tabIndex: disabled ? -1 : tabIndex,
onFocus: disabled ? null : onInternalFocus,
onBlur: disabled ? null : onInternalBlur,
onKeyDown: disabled ? null : onInternalKeyDown,
ref: rateRef,
role: "radiogroup"
}, (0,pickAttrs/* default */.Z)(restProps, {
aria: true,
data: true,
attr: true
})), starNodes);
}
/* harmony default export */ var es_Rate = (/*#__PURE__*/_react_17_0_2_react.forwardRef(Rate));
;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/index.js
/* harmony default export */ var es = (es_Rate);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/rate/style/index.js
"use client";
const genRateStarStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-star`]: {
position: 'relative',
display: 'inline-block',
color: 'inherit',
cursor: 'pointer',
'&:not(:last-child)': {
marginInlineEnd: token.marginXS
},
'> div': {
transition: `all ${token.motionDurationMid}, outline 0s`,
'&:hover': {
transform: token.starHoverScale
},
'&:focus': {
outline: 0
},
'&:focus-visible': {
outline: `${token.lineWidth}px dashed ${token.starColor}`,
transform: token.starHoverScale
}
},
'&-first, &-second': {
color: token.starBg,
transition: `all ${token.motionDurationMid}`,
userSelect: 'none',
[token.iconCls]: {
verticalAlign: 'middle'
}
},
'&-first': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: '50%',
height: '100%',
overflow: 'hidden',
opacity: 0
},
[`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {
opacity: 1
},
[`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {
color: 'inherit'
}
}
};
};
const genRateRtlStyle = token => ({
[`&-rtl${token.componentCls}`]: {
direction: 'rtl'
}
});
const genRateStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
display: 'inline-block',
margin: 0,
padding: 0,
color: token.starColor,
fontSize: token.starSize,
lineHeight: 'unset',
listStyle: 'none',
outline: 'none',
// disable styles
[`&-disabled${componentCls} ${componentCls}-star`]: {
cursor: 'default',
'> div:hover': {
transform: 'scale(1)'
}
}
}), genRateStarStyle(token)), {
// text styles
[`+ ${componentCls}-text`]: {
display: 'inline-block',
marginInlineStart: token.marginXS,
fontSize: token.fontSize
}
}), genRateRtlStyle(token))
};
};
// ============================== Export ==============================
/* harmony default export */ var rate_style = ((0,genComponentStyleHook/* default */.Z)('Rate', token => {
const rateToken = (0,statistic/* merge */.TS)(token, {});
return [genRateStyle(rateToken)];
}, token => ({
starColor: token.yellow6,
starSize: token.controlHeightLG * 0.5,
starHoverScale: 'scale(1.1)',
starBg: token.colorFillContent
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/rate/index.js
"use client";
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const rate_Rate = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
const {
prefixCls,
className,
rootClassName,
style,
tooltips,
character = /*#__PURE__*/_react_17_0_2_react.createElement(icons_StarFilled, null)
} = props,
rest = __rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character"]);
const characterRender = (node, _ref) => {
let {
index
} = _ref;
if (!tooltips) {
return node;
}
return /*#__PURE__*/_react_17_0_2_react.createElement(tooltip/* default */.Z, {
title: tooltips[index]
}, node);
};
const {
getPrefixCls,
direction,
rate
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const ratePrefixCls = getPrefixCls('rate', prefixCls);
// Style
const [wrapSSR, hashId] = rate_style(ratePrefixCls);
const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(es, Object.assign({
ref: ref,
character: character,
characterRender: characterRender
}, rest, {
className: _classnames_2_5_1_classnames_default()(className, rootClassName, hashId, rate === null || rate === void 0 ? void 0 : rate.className),
style: mergedStyle,
prefixCls: ratePrefixCls,
direction: direction
})));
});
if (false) {}
/* harmony default export */ var rate = (rate_Rate);
/***/ }),
/***/ 31797:
/*!*************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules ***!
\*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ es_statistic; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js
var useForceUpdate = __webpack_require__(56762);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
var reactNode = __webpack_require__(92343);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
var skeleton = __webpack_require__(87876);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Number.js
"use client";
const StatisticNumber = props => {
const {
value,
formatter,
precision,
decimalSeparator,
groupSeparator = '',
prefixCls
} = props;
let valueNode;
if (typeof formatter === 'function') {
// Customize formatter
valueNode = formatter(value);
} else {
// Internal formatter
const val = String(value);
const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
// Process if illegal number
if (!cells || val === '-') {
valueNode = val;
} else {
const negative = cells[1];
let int = cells[2] || '0';
let decimal = cells[4] || '';
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
if (typeof precision === 'number') {
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
}
if (decimal) {
decimal = `${decimalSeparator}${decimal}`;
}
valueNode = [/*#__PURE__*/_react_17_0_2_react.createElement("span", {
key: "int",
className: `${prefixCls}-content-value-int`
}, negative, int), decimal && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
key: "decimal",
className: `${prefixCls}-content-value-decimal`
}, decimal)];
}
}
return /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-content-value`
}, valueNode);
};
/* harmony default export */ var statistic_Number = (StatisticNumber);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/style/index.js
"use client";
const genStatisticStyle = token => {
const {
componentCls,
marginXXS,
padding,
colorTextDescription,
titleFontSize,
colorTextHeading,
contentFontSize,
fontFamily
} = token;
return {
[`${componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
[`${componentCls}-title`]: {
marginBottom: marginXXS,
color: colorTextDescription,
fontSize: titleFontSize
},
[`${componentCls}-skeleton`]: {
paddingTop: padding
},
[`${componentCls}-content`]: {
color: colorTextHeading,
fontSize: contentFontSize,
fontFamily,
[`${componentCls}-content-value`]: {
display: 'inline-block',
direction: 'ltr'
},
[`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
display: 'inline-block'
},
[`${componentCls}-content-prefix`]: {
marginInlineEnd: marginXXS
},
[`${componentCls}-content-suffix`]: {
marginInlineStart: marginXXS
}
}
})
};
};
// ============================== Export ==============================
/* harmony default export */ var statistic_style = ((0,genComponentStyleHook/* default */.Z)('Statistic', token => {
const statisticToken = (0,statistic/* merge */.TS)(token, {});
return [genStatisticStyle(statisticToken)];
}, token => {
const {
fontSizeHeading3,
fontSize
} = token;
return {
titleFontSize: fontSize,
contentFontSize: fontSizeHeading3
};
}));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Statistic.js
"use client";
const Statistic = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
valueStyle,
value = 0,
title,
valueRender,
prefix,
suffix,
loading = false,
onMouseEnter,
onMouseLeave,
decimalSeparator = '.',
groupSeparator = ','
} = props;
const {
getPrefixCls,
direction,
statistic
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
const [wrapSSR, hashId] = statistic_style(prefixCls);
const valueNode = /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Number, Object.assign({
decimalSeparator: decimalSeparator,
groupSeparator: groupSeparator,
prefixCls: prefixCls
}, props, {
value: value
}));
const cls = _classnames_2_5_1_classnames_default()(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId);
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: cls,
style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave
}, title && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-title`
}, title), /*#__PURE__*/_react_17_0_2_react.createElement(skeleton/* default */.Z, {
paragraph: false,
loading: loading,
className: `${prefixCls}-skeleton`
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
style: valueStyle,
className: `${prefixCls}-content`
}, prefix && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-content-prefix`
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-content-suffix`
}, suffix)))));
};
if (false) {}
/* harmony default export */ var statistic_Statistic = (Statistic);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/utils.js
// Countdown
const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds
];
function formatTimeStr(duration, format) {
let leftDuration = duration;
const escapeRegex = /\[[^\]]*]/g;
const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
const templateText = format.replace(escapeRegex, '[]');
const replacedText = timeUnits.reduce((current, _ref) => {
let [name, unit] = _ref;
if (current.includes(name)) {
const value = Math.floor(leftDuration / unit);
leftDuration -= value * unit;
return current.replace(new RegExp(`${name}+`, 'g'), match => {
const len = match.length;
return value.toString().padStart(len, '0');
});
}
return current;
}, templateText);
let index = 0;
return replacedText.replace(escapeRegex, () => {
const match = keepList[index];
index += 1;
return match;
});
}
function formatCountdown(value, config) {
const {
format = ''
} = config;
const target = new Date(value).getTime();
const current = Date.now();
const diff = Math.max(target - current, 0);
return formatTimeStr(diff, format);
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Countdown.js
"use client";
const REFRESH_INTERVAL = 1000 / 30;
function getTime(value) {
return new Date(value).getTime();
}
const Countdown = props => {
const {
value,
format = 'HH:mm:ss',
onChange,
onFinish
} = props;
const forceUpdate = (0,useForceUpdate/* default */.Z)();
const countdown = _react_17_0_2_react.useRef(null);
const stopTimer = () => {
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
if (countdown.current) {
clearInterval(countdown.current);
countdown.current = null;
}
};
const syncTimer = () => {
const timestamp = getTime(value);
if (timestamp >= Date.now()) {
countdown.current = setInterval(() => {
forceUpdate();
onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now());
if (timestamp < Date.now()) {
stopTimer();
}
}, REFRESH_INTERVAL);
}
};
_react_17_0_2_react.useEffect(() => {
syncTimer();
return () => {
if (countdown.current) {
clearInterval(countdown.current);
countdown.current = null;
}
};
}, [value]);
const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), {
format
}));
const valueRender = node => (0,reactNode/* cloneElement */.Tm)(node, {
title: undefined
});
return /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Statistic, Object.assign({}, props, {
valueRender: valueRender,
formatter: formatter
}));
};
/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/_react_17_0_2_react.memo(Countdown));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js
"use client";
statistic_Statistic.Countdown = statistic_Countdown;
/* harmony default export */ var es_statistic = (statistic_Statistic);
/***/ })
}]);