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

2915 lines
139 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[65148],{
/***/ 1894:
/*!*******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@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@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// 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/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@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@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_17_0_2_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_17_0_2_react.forwardRef(CheckOutlined_CheckOutlined));
/***/ }),
/***/ 35593:
/*!*****************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@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@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// 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/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@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@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_17_0_2_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_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined));
/***/ }),
/***/ 64694:
/*!*************************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/MinusSquareOutlined.js + 1 modules ***!
\*************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_MinusSquareOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// 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/MinusSquareOutlined.js
// This icon file is generated automatically.
var MinusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "minus-square", "theme": "outlined" };
/* harmony default export */ var asn_MinusSquareOutlined = (MinusSquareOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/MinusSquareOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var MinusSquareOutlined_MinusSquareOutlined = function MinusSquareOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_MinusSquareOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_MinusSquareOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(MinusSquareOutlined_MinusSquareOutlined));
/***/ }),
/***/ 66811:
/*!************************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/PlusSquareOutlined.js + 1 modules ***!
\************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_PlusSquareOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// 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/PlusSquareOutlined.js
// This icon file is generated automatically.
var PlusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "plus-square", "theme": "outlined" };
/* harmony default export */ var asn_PlusSquareOutlined = (PlusSquareOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/PlusSquareOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusSquareOutlined_PlusSquareOutlined = function PlusSquareOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_PlusSquareOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_PlusSquareOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(PlusSquareOutlined_PlusSquareOutlined));
/***/ }),
/***/ 77068:
/*!*****************************************!*\
!*** ./src/components/NoData/index.tsx ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var noData = function noData(_ref) {
var img = _ref.img,
_ref$buttonProps = _ref.buttonProps,
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
_ref$styles = _ref.styles,
styles = _ref$styles === void 0 ? {} : _ref$styles,
customText = _ref.customText,
ButtonText = _ref.ButtonText,
ButtonClick = _ref.ButtonClick,
Buttonclass = _ref.Buttonclass,
ButtonTwo = _ref.ButtonTwo,
imgStyles = _ref.imgStyles,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
className: "tc animated fadeIn",
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
color: '#999',
margin: '100px auto',
visibility: loading ? 'hidden' : 'visible'
}), styles),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles), {}, {
pointerEvents: "none",
userSelect: "none"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
className: "mt20 font14",
children: customText || '暂时还没有相关数据哦!'
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
className: Buttonclass,
onClick: ButtonClick
}, buttonProps), {}, {
children: ButtonText
})), ButtonTwo && ButtonTwo]
});
};
/* harmony default export */ __webpack_exports__.Z = (noData);
/***/ }),
/***/ 49714:
/*!*********************************************************!*\
!*** ./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@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/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(59658);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 4 modules
var monaco_editor = __webpack_require__(32598);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(63834);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(39935);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(77068);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(33259);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions,
showNodata = _ref.showNodata;
var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER;
// let size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,_react_17_0_2_react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default */.Z.API_SERVER + data;
}
var getFileExtension = function getFileExtension(url) {
var filename = url.substring(url.lastIndexOf('/') + 1);
var extension = filename.split('.').pop();
return extension;
};
if (filename) monacoEditor.filename = filename;
(0,_react_17_0_2_react.useEffect)(function () {
var _document$cookie;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";");
cookies === null || cookies === void 0 || cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
if (type === "office") {
if (data.indexOf("bigfilescdn.") > -1) {
setOfficeData({
url: data,
fileType: getFileExtension(data),
model: data.indexOf("model=edit") ? "edit" : "view"
});
} else {
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;
res.url = apiServer + res.url;
setOfficeData(res);
case 9:
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)(jsx_runtime.Fragment, {
children: /*#__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(btoa(officeData.url), "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, 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"]
})
})]
});
});
/***/ }),
/***/ 52961:
/*!*********************************************!*\
!*** ./src/components/RenderHtml/index.tsx ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/createForOfIteratorHelper.js */ 91232);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var katex_dist_katex_min_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! katex/dist/katex.min.css */ 97762);
/* harmony import */ var _utils_marked__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/marked */ 37598);
/* harmony import */ var code_prettify__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! code-prettify */ 64018);
/* harmony import */ var code_prettify__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(code_prettify__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var hls_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! hls.js */ 70169);
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/utils/env */ 33259);
/* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! katex */ 15342);
/* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(katex__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! uuid */ 1012);
/* harmony import */ var _components_PreviewAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/PreviewAll */ 49714);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var ADD_MULTI = '@▁▁@';
var ADD_SINGLE = '@▁@';
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ __webpack_exports__.Z = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev,
highlightKeywords = _ref.highlightKeywords,
showProgramFill = _ref.showProgramFill,
isProgramFill = _ref.isProgramFill,
_ref$disabledFill = _ref.disabledFill,
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
programFillValue = _ref.programFillValue,
_ref$onFillChange = _ref.onFillChange,
onFillChange = _ref$onFillChange === void 0 ? function (value) {} : _ref$onFillChange,
_ref$onFillBlur = _ref.onFillBlur,
onFillBlur = _ref$onFillBlur === void 0 ? function () {} : _ref$onFillBlur;
var str = String(value);
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(""),
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)("office"),
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)([]),
_useState6 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState5, 2),
projectValue = _useState6[0],
setProjectValue = _useState6[1];
var classNamesRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)("a" + (0,uuid__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)());
var formObj = {};
var createInput = function createInput(a, num) {
// const wrap = document.createElement("span")
// wrap.className =
var input = document.createElement(a === ADD_SINGLE ? "input" : "textarea");
input.style.width = "100%";
input.style.height = a === ADD_SINGLE ? "40px" : "151px";
input.rows = 5;
input.spellcheck = false;
input.name = "edu-program-fill";
input.placeholder = "请输入";
input.dataset.id = num;
var key = Object.keys(formObj).length;
formObj[key] = input;
return "<span class=\"edu-program-fill-wrap ".concat(a === ADD_SINGLE ? "" : "show", "\" style=\"width:").concat(a === ADD_SINGLE ? "200px" : "100%", "\"><span>").concat(input.outerHTML, "<span class=\"edu-program-fill-score\"></span></span></span>");
};
var formatMD = function formatMD(rs) {
return rs.replace(/<style.*?>([\s\S]+?)<\/style>/gim, function (_, css) {
var _css = css.replace(/(\n|\r)/g, "").split("}");
var arr = [];
_css.map(function (item) {
if (item != '') {
arr.push(".".concat(classNamesRef.current, " ").concat(item));
}
});
return "<style>".concat(arr.join("}"), "</style>");
});
};
var html = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + _utils_env__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + _utils_env__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + _utils_env__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
if (showProgramFill) {
var num = -1;
str = str.replaceAll("<", "&lt;").replaceAll(">", "&gt;").replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
++num;
return createInput(a, num);
});
return "<pre style=\"background:#fff;padding:4px\">".concat(formatMD(str || ""), "</pre>");
}
var rs = formatMD(str);
rs = (0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)(rs);
var math_expressions = (0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .getMathExpressions */ .ez)();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', (0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .getTocContent */ .Qv)());
(0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .cleanToc */ .Iy)();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex__WEBPACK_IMPORTED_MODULE_10__.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
(0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .resetMathExpressions */ .AL)();
// return dompurify.sanitize(rs)
var dom = document.createElement('div');
dom.innerHTML = rs;
if (highlightKeywords) {
var escapedKeywords = highlightKeywords.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
findKeyword(dom, escapedKeywords);
return dom.innerHTML;
}
if (showTextOnly) {
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return dom.innerHTML;
}, [str, highlightKeywords]);
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
if (el.current) {
var inputs = el.current.querySelectorAll(["input", "textarea"]);
inputs.forEach(function (input) {
input.oninput = onInput;
input.onblur = onBlur;
});
}
}, [projectValue]);
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
if (!!(programFillValue !== null && programFillValue !== void 0 && programFillValue.length)) {
try {
var scoreDom = el.current.querySelectorAll(".edu-program-fill-score");
var dom = el.current.querySelectorAll('[name="edu-program-fill"]');
var _iterator = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_2___default()(dom.entries()),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var _programFillValue$k;
var _step$value = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_step.value, 2),
k = _step$value[0],
i = _step$value[1];
i.value = (_programFillValue$k = programFillValue[k]) === null || _programFillValue$k === void 0 ? void 0 : _programFillValue$k.value;
if (programFillValue[k].type === "warning") {
i.className = "program-fill-warning";
} else if (programFillValue[k].type === "success") {
i.className = "program-fill-success";
} else {
i.className = "";
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
var _iterator2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_2___default()(scoreDom.entries()),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var _programFillValue$_k, _programFillValue$_k2;
var _step2$value = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_step2.value, 2),
_k = _step2$value[0],
_i = _step2$value[1];
_i.innerHTML = (_programFillValue$_k = programFillValue[_k]) !== null && _programFillValue$_k !== void 0 && _programFillValue$_k.score ? "".concat((_programFillValue$_k2 = programFillValue[_k]) === null || _programFillValue$_k2 === void 0 ? void 0 : _programFillValue$_k2.score, "\u5206") : "";
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
setProjectValue(programFillValue);
} catch (error) {}
}
}, [programFillValue]);
var onInput = function onInput(e) {
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
projectValue[e.target.dataset.id]["value"] = e.target.value;
setProjectValue(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default()(projectValue));
onFillChange(projectValue, e.target.dataset.id);
};
var onBlur = function onBlur(e) {
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
projectValue[e.target.dataset.id]["value"] = e.target.value;
setProjectValue(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default()(projectValue));
onFillBlur(projectValue, e.target.dataset.id);
};
function findKeyword(node, keyword) {
return node.childNodes.forEach(function (childNode) {
if (childNode.childNodes.length > 0) {
findKeyword(childNode, keyword);
} else if (childNode.nodeName !== "IMG") {
if (childNode.innerHTML) {
var _childNode$innerHTML;
childNode.innerHTML = (_childNode$innerHTML = childNode.innerHTML) === null || _childNode$innerHTML === void 0 ? void 0 : _childNode$innerHTML.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
} else {
var dom = document.createElement("span");
dom.innerHTML = childNode.textContent.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
childNode.replaceWith(dom);
}
}
});
// return dom.childNodes.forEach((node:any) => {
// console.log("nodeLen:",node.childNodes.length)
// if(node.childNodes.length > 0){
// debugger
// // findKeyword(dom.childNodes,keyword)
// }else{
// if(node.nodeName !== "#text"){
// node.innerHTML = node.innerHTML.replaceAll(keyword,`<span class="c-blue">${keyword}</span>`)
// console.log("node:",node,dom,node.nodeName,node.innerHTML,node.childNodes.length)
// debugger
// }
// }
// return node
// });
}
var el = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)();
_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .lines */ .jb['WebkitLineClamp'] = showLines;
if (showLines) {
style = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, style), _utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .lines */ .jb);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 || videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_js__WEBPACK_IMPORTED_MODULE_8__/* ["default"].isSupported */ .ZP.isSupported()) {
var hls = new hls_js__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 || _el$current2.removeEventListener('click', onAncherHandler);
(0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .resetMathExpressions */ .AL)();
(0,_utils_marked__WEBPACK_IMPORTED_MODULE_6__/* .cleanToc */ .Iy)();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.Fragment, {
children: [showTextOnly && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", {
ref: el,
children: html
}), !showTextOnly && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", {
ref: el,
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, style),
className: "".concat(className ? className : '', " ").concat(disabledFill ? "disabled-fill" : "", " markdown-body ").concat(classNamesRef.current),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_PreviewAll__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 58298:
/*!***********************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Polls/Answer/index.tsx + 4 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
checkedOtherName: function() { return /* binding */ checkedOtherName; },
"default": function() { return /* binding */ Polls_Answer; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// 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/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/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__(8931);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
var menu = __webpack_require__(20834);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/layout/index.js
var layout = __webpack_require__(44000);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// 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/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/progress/index.js + 13 modules
var progress = __webpack_require__(93948);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/anchor/index.js + 4 modules
var es_anchor = __webpack_require__(79817);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Polls/Answer/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Answermodules = ({"flex_box_center":"flex_box_center___iNvBA","flex_space_between":"flex_space_between___btrNY","flex_box_vertical_center":"flex_box_vertical_center___jNwqd","flex_box_center_end":"flex_box_center_end___yhhzS","flex_box_column":"flex_box_column___XCG9Z","bg":"bg___pkT5R","title":"title___txwwg","questionIcons":"questionIcons___bUmrp","green":"green___pU_n6","orange":"orange___WqPTj","greenTip":"greenTip___xA46L","redTip":"redTip___cLZrd","orangeTip":"orangeTip___IYw_9","pollDesc":"pollDesc___k8j8U","answered":"answered___Wv6LV","unanswer":"unanswer___HFr5V","anchor":"anchor___wiaGO","answerFlag":"answerFlag___Son3q","answerActive":"answerActive___vadIk","redactivie":"redactivie___lv5Yx","questionItem":"questionItem___eheF5","answerWrap":"answerWrap___q0vMa","answerSubjective":"answerSubjective___g0GxR","otherInput":"otherInput___lNi1t","submitButton":"submitButton___Kwl_S","flexRow":"flexRow___CzS9_","header_style":"header_style___IO875","header_content":"header_content___rvYNy","header_title":"header_title___vaUUE","header_button":"header_button___pO_DR","answerInfo":"answerInfo___pUCTt","answerProgress":"answerProgress___u6eCf","dottedLineWrapper":"dottedLineWrapper___OntUi","leftHalfCircle":"leftHalfCircle___W0Nay","dottedLine":"dottedLine___KvX72","rightHalfCircle":"rightHalfCircle___NshfJ","answerSheetWrap":"answerSheetWrap___slZzY","answerSheetQuestionTitle":"answerSheetQuestionTitle___VK50d","user_info":"user_info___nyGwf","user_label":"user_label___bAPw8","user_value":"user_value___pZ4rK"});
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(63834);
// EXTERNAL MODULE: ./src/service/classrooms.ts
var classrooms = __webpack_require__(97894);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(71912);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(5112);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Polls/Answer/components/Single.tsx
var Single = function Single(_ref) {
var _itemData$question2, _itemData$question4, _itemData$question6, _answerData$poll;
var itemData = _ref.itemData,
answerData = _ref.answerData,
_ref$onSave = _ref.onSave,
onSave = _ref$onSave === void 0 ? function () {} : _ref$onSave;
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
checkedData = _useState4[0],
setCheckedData = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
otherData = _useState6[0],
setOtherData = _useState6[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question;
setData((itemData === null || itemData === void 0 || (_itemData$question = itemData.question) === null || _itemData$question === void 0 ? void 0 : _itemData$question.answers) || []);
}, [itemData === null || itemData === void 0 || (_itemData$question2 = itemData.question) === null || _itemData$question2 === void 0 ? void 0 : _itemData$question2.answers]);
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question3;
setCheckedData(itemData === null || itemData === void 0 || (_itemData$question3 = itemData.question) === null || _itemData$question3 === void 0 || (_itemData$question3 = _itemData$question3.poll_answer_ids) === null || _itemData$question3 === void 0 ? void 0 : _itemData$question3[0]);
}, [itemData === null || itemData === void 0 || (_itemData$question4 = itemData.question) === null || _itemData$question4 === void 0 ? void 0 : _itemData$question4.poll_answer_ids]);
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question5;
setOtherData(itemData === null || itemData === void 0 || (_itemData$question5 = itemData.question) === null || _itemData$question5 === void 0 ? void 0 : _itemData$question5.poll_vote_texts);
}, [itemData === null || itemData === void 0 || (_itemData$question6 = itemData.question) === null || _itemData$question6 === void 0 ? void 0 : _itemData$question6.poll_vote_texts]);
var handerChangeSingle = function handerChangeSingle(value, id) {
var _data$find;
setCheckedData(value);
var findOtherId = (_data$find = data.find(function (item) {
return checkedOtherName(item.answer_text);
})) === null || _data$find === void 0 ? void 0 : _data$find.answer_id;
if (value === findOtherId) {
onSave(id, value, otherData);
} else {
onSave(id, value, '');
}
};
var handleBlurOhter = function handleBlurOhter(id) {
var _data$find2;
if (!checkedData) {
return;
}
var findOtherId = (_data$find2 = data.find(function (item) {
return checkedOtherName(item.answer_text);
})) === null || _data$find2 === void 0 ? void 0 : _data$find2.answer_id;
if (checkedData === findOtherId) {
onSave(id, checkedData, otherData);
} else {
onSave(id, checkedData, '');
}
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
disabled: (0,authority/* isAdmin */.GJ)() || (0,authority/* isStudent */.dE)() && (answerData === null || answerData === void 0 || (_answerData$poll = answerData.poll) === null || _answerData$poll === void 0 ? void 0 : _answerData$poll.user_poll_status) === 1,
value: checkedData,
onChange: function onChange(e) {
var _itemData$question7;
handerChangeSingle(e.target.value, itemData === null || itemData === void 0 || (_itemData$question7 = itemData.question) === null || _itemData$question7 === void 0 ? void 0 : _itemData$question7.id);
},
children: data.map(function (answer, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Answermodules.answerWrap, " ").concat(Answermodules.flexRow),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: answer === null || answer === void 0 ? void 0 : answer.answer_id,
children: answer === null || answer === void 0 ? void 0 : answer.answer_text
}), checkedOtherName(answer === null || answer === void 0 ? void 0 : answer.answer_text) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginTop: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
className: Answermodules.otherInput,
value: otherData,
onChange: function onChange(e) {
return setOtherData(e.target.value);
},
onBlur: function onBlur(e) {
var _itemData$question8;
return handleBlurOhter(itemData === null || itemData === void 0 || (_itemData$question8 = itemData.question) === null || _itemData$question8 === void 0 ? void 0 : _itemData$question8.id);
}
})
})]
}, index);
})
});
};
/* harmony default export */ var components_Single = (Single);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Polls/Answer/components/Multiple.tsx
var Multiple = function Multiple(_ref) {
var _itemData$question2, _itemData$question4, _itemData$question6, _answerData$poll;
var itemData = _ref.itemData,
answerData = _ref.answerData,
_ref$onSave = _ref.onSave,
onSave = _ref$onSave === void 0 ? function () {} : _ref$onSave;
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
checkedData = _useState4[0],
setCheckedData = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
otherData = _useState6[0],
setOtherData = _useState6[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question;
setData((itemData === null || itemData === void 0 || (_itemData$question = itemData.question) === null || _itemData$question === void 0 ? void 0 : _itemData$question.answers) || []);
}, [itemData === null || itemData === void 0 || (_itemData$question2 = itemData.question) === null || _itemData$question2 === void 0 ? void 0 : _itemData$question2.answers]);
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question3;
setCheckedData(itemData === null || itemData === void 0 || (_itemData$question3 = itemData.question) === null || _itemData$question3 === void 0 ? void 0 : _itemData$question3.poll_answer_ids);
}, [itemData === null || itemData === void 0 || (_itemData$question4 = itemData.question) === null || _itemData$question4 === void 0 ? void 0 : _itemData$question4.poll_answer_ids]);
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question5;
setOtherData(itemData === null || itemData === void 0 || (_itemData$question5 = itemData.question) === null || _itemData$question5 === void 0 ? void 0 : _itemData$question5.poll_vote_texts);
}, [itemData === null || itemData === void 0 || (_itemData$question6 = itemData.question) === null || _itemData$question6 === void 0 ? void 0 : _itemData$question6.poll_vote_texts]);
var handerChangeMultiple = function handerChangeMultiple(value, id) {
var _data$find;
setCheckedData(value);
var findOtherId = (_data$find = data.find(function (item) {
return checkedOtherName(item.answer_text);
})) === null || _data$find === void 0 ? void 0 : _data$find.answer_id;
if (value.includes(findOtherId)) {
onSave(id, value, otherData);
} else {
onSave(id, value, '');
}
};
var handleBlurOhter = function handleBlurOhter(id) {
var _data$find2;
if (!(checkedData !== null && checkedData !== void 0 && checkedData.length)) {
return;
}
var findOtherId = (_data$find2 = data.find(function (item) {
return checkedOtherName(item.answer_text);
})) === null || _data$find2 === void 0 ? void 0 : _data$find2.answer_id;
if (checkedData.includes(findOtherId)) {
onSave(id, checkedData, otherData);
} else {
onSave(id, checkedData, '');
}
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
style: {
display: 'block'
},
disabled: (0,authority/* isAdmin */.GJ)() || (0,authority/* isStudent */.dE)() && (answerData === null || answerData === void 0 || (_answerData$poll = answerData.poll) === null || _answerData$poll === void 0 ? void 0 : _answerData$poll.user_poll_status) === 1,
value: checkedData,
onChange: function onChange(value) {
var _itemData$question7;
handerChangeMultiple(value, itemData === null || itemData === void 0 || (_itemData$question7 = itemData.question) === null || _itemData$question7 === void 0 ? void 0 : _itemData$question7.id);
},
children: data === null || data === void 0 ? void 0 : data.map(function (answer, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Answermodules.answerWrap, " ").concat(Answermodules.flexRow),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: answer === null || answer === void 0 ? void 0 : answer.answer_id,
children: answer === null || answer === void 0 ? void 0 : answer.answer_text
}), checkedOtherName(answer === null || answer === void 0 ? void 0 : answer.answer_text) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginTop: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
className: Answermodules.otherInput,
value: otherData,
onChange: function onChange(e) {
return setOtherData(e.target.value);
},
onBlur: function onBlur(e) {
var _itemData$question8;
return handleBlurOhter(itemData === null || itemData === void 0 || (_itemData$question8 = itemData.question) === null || _itemData$question8 === void 0 ? void 0 : _itemData$question8.id);
}
})
})]
});
})
});
};
/* harmony default export */ var components_Multiple = (Multiple);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Polls/Answer/components/Subjective.tsx
var Subjective = function Subjective(_ref) {
var _itemData$question2, _answerData$poll;
var itemData = _ref.itemData,
answerData = _ref.answerData,
_ref$onSave = _ref.onSave,
onSave = _ref$onSave === void 0 ? function () {} : _ref$onSave;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
otherData = _useState2[0],
setOtherData = _useState2[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _itemData$question;
setOtherData(itemData === null || itemData === void 0 || (_itemData$question = itemData.question) === null || _itemData$question === void 0 ? void 0 : _itemData$question.poll_vote_texts);
}, [itemData === null || itemData === void 0 || (_itemData$question2 = itemData.question) === null || _itemData$question2 === void 0 ? void 0 : _itemData$question2.poll_vote_texts]);
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("textarea", {
className: Answermodules.answerSubjective,
placeholder: "\u5728\u6B64\u586B\u5165\u7B54\u6848",
disabled: (0,authority/* isAdmin */.GJ)() || (0,authority/* isStudent */.dE)() && (answerData === null || answerData === void 0 || (_answerData$poll = answerData.poll) === null || _answerData$poll === void 0 ? void 0 : _answerData$poll.user_poll_status) === 1,
value: otherData,
onChange: function onChange(e) {
return setOtherData(e.target.value);
},
onBlur: function onBlur(e) {
var _itemData$question3;
return onSave(itemData === null || itemData === void 0 || (_itemData$question3 = itemData.question) === null || _itemData$question3 === void 0 ? void 0 : _itemData$question3.id, null, otherData);
}
})
});
};
/* harmony default export */ var components_Subjective = (Subjective);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
var RenderHtml = __webpack_require__(52961);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/MinusSquareOutlined.js + 1 modules
var MinusSquareOutlined = __webpack_require__(64694);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/PlusSquareOutlined.js + 1 modules
var PlusSquareOutlined = __webpack_require__(66811);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Polls/Answer/index.tsx
var _excluded = ["globalSetting", "loading", "user", "dispatch"];
var SubMenu = menu/* default */.Z.SubMenu;
var Content = layout/* default */.Z.Content,
Sider = layout/* default */.Z.Sider;
var checkedOtherName = function checkedOtherName(naem) {
return naem === '其他' || naem === '其它';
};
var mapping = {
1: "单选",
2: "多选",
3: "问答"
};
var Answer = function Answer(_ref) {
var _answerData$poll, _answerData$poll2, _answerData$poll3, _answerData$poll4, _answerData$question_2, _answerData$question_3, _answerData$question_4, _answerData$question_5, _answerData$questions3, _answerData$poll5, _answerData$poll6, _answerData$poll7, _answerData$poll8;
var globalSetting = _ref.globalSetting,
loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
props = objectWithoutProperties_default()(_ref, _excluded);
var params = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
answerData = _useState2[0],
setAnswerData = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(false),
_useState4 = slicedToArray_default()(_useState3, 2),
isclick = _useState4[0],
setisclick = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)([{
id: 1,
name: '单选题',
open: true
}, {
id: 2,
name: '多选题',
open: true
}, {
id: 3,
name: '问答题',
open: true
}]),
_useState6 = slicedToArray_default()(_useState5, 2),
typeList = _useState6[0],
setTypeList = _useState6[1];
(0,_react_17_0_2_react.useEffect)(function () {
initData();
}, [params.categoryId]);
(0,_react_17_0_2_react.useEffect)(function () {
dispatch({
type: 'globalSetting/headerToggle',
payload: false
});
dispatch({
type: 'globalSetting/footerToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/headerToggle',
payload: true
});
dispatch({
type: 'globalSetting/footerToggle',
payload: true
});
};
}, []);
var initData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _res$question_types, _res$question_types2, _res$question_types3;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,classrooms/* getPollStartAnswer */.i7)(objectSpread2_default()({}, params));
case 2:
res = _context.sent;
if (res) {
setAnswerData(res);
setTypeList([{
id: 1,
name: '单选题',
open: true,
countSize: res === null || res === void 0 || (_res$question_types = res.question_types) === null || _res$question_types === void 0 ? void 0 : _res$question_types.q_singles
}, {
id: 2,
name: '多选题',
open: true,
countSize: res === null || res === void 0 || (_res$question_types2 = res.question_types) === null || _res$question_types2 === void 0 ? void 0 : _res$question_types2.q_doubles
}, {
id: 3,
name: '问答题',
open: true,
countSize: res === null || res === void 0 || (_res$question_types3 = res.question_types) === null || _res$question_types3 === void 0 ? void 0 : _res$question_types3.q_mains
}]);
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function initData() {
return _ref2.apply(this, arguments);
};
}();
var handleSave = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(questionId, poll_answer_id, vote_text) {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (questionId) {
_context2.next = 3;
break;
}
console.error("handleSave no questionId params");
return _context2.abrupt("return");
case 3:
_context2.next = 5;
return (0,classrooms/* updatePollVotes */.ID)({
questionId: questionId,
poll_answer_id: poll_answer_id,
vote_text: vote_text
});
case 5:
res = _context2.sent;
if (res !== null && res !== void 0 && res.poll_vote) {
answerData.question_answered.find(function (item) {
return item.ques_id === questionId;
}).ques_status = res.poll_vote.question_status;
setAnswerData(objectSpread2_default()({}, answerData));
}
case 7:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleSave(_x, _x2, _x3) {
return _ref3.apply(this, arguments);
};
}();
var handleVerifySubmit = function handleVerifySubmit() {
var _answerData$question_;
var requiredCount = 0;
var optionalCount = 0;
var requiredKey = [];
var optionalKey = [];
answerData === null || answerData === void 0 || (_answerData$question_ = answerData.question_answered) === null || _answerData$question_ === void 0 || _answerData$question_.map(function (item, key) {
if ((item === null || item === void 0 ? void 0 : item.ques_status) === 0) {
var _answerData$questions;
var is_necessary = answerData === null || answerData === void 0 || (_answerData$questions = answerData.questions) === null || _answerData$questions === void 0 || (_answerData$questions = _answerData$questions.find(function (que) {
var _que$question;
return (que === null || que === void 0 || (_que$question = que.question) === null || _que$question === void 0 ? void 0 : _que$question.id) === item.ques_id;
})) === null || _answerData$questions === void 0 || (_answerData$questions = _answerData$questions.question) === null || _answerData$questions === void 0 ? void 0 : _answerData$questions.is_necessary;
if (is_necessary === 1) {
requiredKey.push(key);
requiredCount++;
} else {
optionalKey.push(key);
optionalCount++;
}
}
});
if (requiredCount > 0) {
modal/* default */.Z.info({
width: 530,
title: '提示',
centered: true,
okText: '知道啦',
onOk: function onOk() {
setisclick(true);
// window.location.href = `#Anchor_${requiredKey[0]}`
// window.scrollTo({ top: 100, behavior: 'smooth' });
var anchorId = "Anchor_".concat(requiredKey[0]);
var anchorElement = document.getElementById(anchorId);
var offset = -100;
var y = anchorElement.getBoundingClientRect().top + window.pageYOffset + offset;
window.scrollTo({
top: y,
behavior: 'smooth'
});
},
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "tc font16 c-black-333",
children: ["\u6709 ", requiredCount, " \u9898\u5FC5\u7B54\u9898\u672A\u7B54\uFF0C\u65E0\u6CD5\u63D0\u4EA4 ", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u5B8C\u6210\u5168\u90E8\u5FC5\u7B54\u9898\u540E\u518D\u63D0\u4EA4"]
})
});
return;
}
modal/* default */.Z.confirm({
width: 530,
title: '提示',
centered: true,
okText: '确定',
cancelText: '取消',
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "tc font16 c-black-333",
children: [optionalCount > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: ["\u6709 ", optionalCount, " \u9898\u672A\u7B54 ", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
}), "\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"]
}),
onOk: function onOk() {
handleSubmit();
// window.location.href = `#Anchor_${optionalKey[0]}`
// window.scrollTo({ top: 100, behavior: 'smooth' });
var anchorId = "Anchor_".concat(optionalKey[0]);
var anchorElement = document.getElementById(anchorId);
var offset = -100;
var y = anchorElement.getBoundingClientRect().top + window.pageYOffset + offset;
window.scrollTo({
top: y,
behavior: 'smooth'
});
}
});
};
var handleSubmit = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0,classrooms/* submitPollAnswer */.Ns)({
categoryId: params.categoryId
});
case 2:
res = _context3.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default */.ZP.success(res === null || res === void 0 ? void 0 : res.message);
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/poll/").concat(params.categoryId, "/detail?tabs=0"));
}
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function handleSubmit() {
return _ref4.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: "edu-container",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
height: '64px'
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
className: "animated fadeIn",
children: (answerData === null || answerData === void 0 || (_answerData$poll = answerData.poll) === null || _answerData$poll === void 0 ? void 0 : _answerData$poll.polls_description) && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Answermodules.pollDesc,
value: answerData === null || answerData === void 0 || (_answerData$poll2 = answerData.poll) === null || _answerData$poll2 === void 0 ? void 0 : _answerData$poll2.polls_description
})
// <p className={styles.pollDesc}>{answerData?.poll?.polls_description}</p>
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'flex-start'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
margin: '20px 20px 20px 0',
width: 280,
maxHeight: '60%'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.user_info,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.user_label,
style: {
lineHeight: '60px'
},
children: ["\u59D3\u540D", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Answermodules.user_value,
children: answerData === null || answerData === void 0 || (_answerData$poll3 = answerData.poll) === null || _answerData$poll3 === void 0 ? void 0 : _answerData$poll3.real_name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.user_label,
style: {
lineHeight: '40px'
},
children: ["\u5B66\u53F7", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Answermodules.user_value,
children: answerData === null || answerData === void 0 || (_answerData$poll4 = answerData.poll) === null || _answerData$poll4 === void 0 ? void 0 : _answerData$poll4.student_id
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
background: '#fff'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: Answermodules.answerInfo,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
justify: "space-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: "\u7B54\u9898\u8FDB\u5EA6"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: Answermodules.answerProgress,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#165DFF'
},
children: answerData === null || answerData === void 0 || (_answerData$question_2 = answerData.question_answered) === null || _answerData$question_2 === void 0 || (_answerData$question_2 = _answerData$question_2.filter(function (val) {
return (val === null || val === void 0 ? void 0 : val.ques_status) === 1;
})) === null || _answerData$question_2 === void 0 ? void 0 : _answerData$question_2.length
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#999999'
},
children: ["/", answerData === null || answerData === void 0 || (_answerData$question_3 = answerData.question_types) === null || _answerData$question_3 === void 0 ? void 0 : _answerData$question_3.q_counts]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(progress/* default */.Z, {
strokeColor: "#165dffa6",
trailColor: "#0000000d",
percent: (answerData === null || answerData === void 0 || (_answerData$question_4 = answerData.question_answered) === null || _answerData$question_4 === void 0 || (_answerData$question_4 = _answerData$question_4.filter(function (val) {
return (val === null || val === void 0 ? void 0 : val.ques_status) == 1;
})) === null || _answerData$question_4 === void 0 ? void 0 : _answerData$question_4.length) / (answerData === null || answerData === void 0 || (_answerData$question_5 = answerData.question_types) === null || _answerData$question_5 === void 0 ? void 0 : _answerData$question_5.q_counts) * 100,
showInfo: false
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: Answermodules.dottedLineWrapper,
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: Answermodules.leftHalfCircle
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: 1,
className: Answermodules.dottedLine
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: Answermodules.rightHalfCircle
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.answerSheetWrap,
children: typeList === null || typeList === void 0 ? void 0 : typeList.map(function (v, k) {
var _answerData$questions2;
var count = 0;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(v === null || v === void 0 ? void 0 : v.countSize) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.answerSheetQuestionTitle,
onClick: function onClick() {
typeList[k].open = !(v !== null && v !== void 0 && v.open);
setTypeList(toConsumableArray_default()(typeList));
},
children: [v !== null && v !== void 0 && v.open ? /*#__PURE__*/(0,jsx_runtime.jsx)(MinusSquareOutlined/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(PlusSquareOutlined/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml5 c-grey-666",
children: v === null || v === void 0 ? void 0 : v.name
})]
}), (v === null || v === void 0 ? void 0 : v.open) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: answerData === null || answerData === void 0 || (_answerData$questions2 = answerData.questions) === null || _answerData$questions2 === void 0 ? void 0 : _answerData$questions2.map(function (item, key) {
var _item$question;
if ((item === null || item === void 0 || (_item$question = item.question) === null || _item$question === void 0 ? void 0 : _item$question.question_type) == (v === null || v === void 0 ? void 0 : v.id)) {
var _answerData$question_6;
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z.Link, {
className: "".concat(Answermodules.answerFlag, " ").concat((answerData === null || answerData === void 0 || (_answerData$question_6 = answerData.question_answered) === null || _answerData$question_6 === void 0 || (_answerData$question_6 = _answerData$question_6[key]) === null || _answerData$question_6 === void 0 ? void 0 : _answerData$question_6.ques_status) == 1 ? Answermodules.answerActive : isclick && item.question.is_necessary === 1 ? Answermodules.redactivie : ''),
href: "#Anchor_".concat(key),
title: ++count
});
// return <Anchor affix={false} className={styles.answerFlag}>
// <Anchor.Link className={`${styles.answerFlag} ${answerData?.question_answered?.[key]?.ques_status == 1 ? styles.answerActive : isclick && item.question.is_necessary === 1 ? styles.redactivie : ''}`} href={`#Anchor_${key}`} title={++count}></Anchor.Link>
// </Anchor>
// return <div className={`${styles.answerFlag} ${answerData?.question_answered?.[key]?.ques_status == 1 ? styles.answerActive : isclick && item.question.is_necessary === 1 ? styles.redactivie : ''}`}>{++count}</div>
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
clear: 'both'
}
})]
}, k);
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
style: {
width: 900
},
className: [Answermodules.bg, 'pt10', 'pl30', 'pr30', 'pb30', 'mt20', 'mb50'].join(' '),
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: answerData === null || answerData === void 0 || (_answerData$questions3 = answerData.questions) === null || _answerData$questions3 === void 0 ? void 0 : _answerData$questions3.map(function (item, key) {
var _item$question2, _item$question3, _item$question4, _item$question5, _item$question6;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.questionItem,
id: "Anchor_".concat(key),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font16",
style: {
display: 'flex',
alignItems: 'center',
marginBottom: '20px'
},
children: [(item === null || item === void 0 || (_item$question2 = item.question) === null || _item$question2 === void 0 ? void 0 : _item$question2.is_necessary) !== 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: 'red',
fontSize: '14px'
},
children: "*"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "c-blue font16",
children: ["\u3010", mapping[item.question.question_type], "\u3011"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: item.question.question_title,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.title,
children: [item === null || item === void 0 || (_item$question3 = item.question) === null || _item$question3 === void 0 ? void 0 : _item$question3.question_number, "\u3001", item.question.question_title]
})
}), item.question.question_type === 2 && (item === null || item === void 0 || (_item$question4 = item.question) === null || _item$question4 === void 0 ? void 0 : _item$question4.min_choices) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "ml10",
style: {
fontWeight: 400,
color: '#666666'
},
children: ["(\u53EF\u9009", item === null || item === void 0 || (_item$question5 = item.question) === null || _item$question5 === void 0 ? void 0 : _item$question5.min_choices, "-", item === null || item === void 0 || (_item$question6 = item.question) === null || _item$question6 === void 0 ? void 0 : _item$question6.max_choices, "\u9879)"]
})]
})
}),
// 单选项
item.question.question_type == 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(components_Single, {
answerData: answerData,
itemData: item,
onSave: handleSave
}),
// 多选项
item.question.question_type == 2 && /*#__PURE__*/(0,jsx_runtime.jsx)(components_Multiple, {
answerData: answerData,
itemData: item,
onSave: handleSave
}),
//主观题
item.question.question_type == 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(components_Subjective, {
answerData: answerData,
itemData: item,
onSave: handleSave
})]
});
})
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.header_style,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
status: [util/* PollsStatus */.L4[answerData === null || answerData === void 0 || (_answerData$poll5 = answerData.poll) === null || _answerData$poll5 === void 0 ? void 0 : _answerData$poll5.poll_status]]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: answerData === null || answerData === void 0 || (_answerData$poll6 = answerData.poll) === null || _answerData$poll6 === void 0 ? void 0 : _answerData$poll6.polls_name,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.header_title,
children: answerData === null || answerData === void 0 || (_answerData$poll7 = answerData.poll) === null || _answerData$poll7 === void 0 ? void 0 : _answerData$poll7.polls_name
})
}), (0,authority/* isStudent */.dE)() && (answerData === null || answerData === void 0 || (_answerData$poll8 = answerData.poll) === null || _answerData$poll8 === void 0 ? void 0 : _answerData$poll8.user_poll_status) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.header_button,
onClick: handleVerifySubmit,
children: "\u63D0\u4EA4\u95EE\u5377"
})]
})
})]
});
};
/* harmony default export */ var Polls_Answer = ((0,_umi_production_exports.connect)(function (_ref5) {
var loading = _ref5.loading,
user = _ref5.user,
globalSetting = _ref5.globalSetting;
return {
globalSetting: globalSetting,
user: user,
loading: loading.effects
};
})(Answer));
/***/ }),
/***/ 37598:
/*!*****************************!*\
!*** ./src/utils/marked.ts ***!
\*****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AL: function() { return /* binding */ resetMathExpressions; },
/* harmony export */ Iy: function() { return /* binding */ cleanToc; },
/* harmony export */ Qv: function() { return /* binding */ getTocContent; },
/* harmony export */ ez: function() { return /* binding */ getMathExpressions; },
/* harmony export */ jb: function() { return /* binding */ lines; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! marked */ 32834);
/* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(marked__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var marked_src_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! marked/src/helpers */ 11690);
/* harmony import */ var marked_src_helpers__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(marked_src_helpers__WEBPACK_IMPORTED_MODULE_2__);
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 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked__WEBPACK_IMPORTED_MODULE_1___default().Renderer)();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,marked_src_helpers__WEBPACK_IMPORTED_MODULE_2__.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,marked_src_helpers__WEBPACK_IMPORTED_MODULE_2__.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked__WEBPACK_IMPORTED_MODULE_1___default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked__WEBPACK_IMPORTED_MODULE_1___default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ __webpack_exports__.ZP = ((marked__WEBPACK_IMPORTED_MODULE_1___default()));
/***/ }),
/***/ 13845:
/*!*************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/getScroll.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ F: function() { return /* binding */ isWindow; },
/* harmony export */ Z: function() { return /* binding */ getScroll; }
/* harmony export */ });
function isWindow(obj) {
return obj !== null && obj !== undefined && obj === obj.window;
}
function getScroll(target, top) {
var _a, _b;
if (typeof window === 'undefined') {
return 0;
}
const method = top ? 'scrollTop' : 'scrollLeft';
let result = 0;
if (isWindow(target)) {
result = target[top ? 'pageYOffset' : 'pageXOffset'];
} else if (target instanceof Document) {
result = target.documentElement[method];
} else if (target instanceof HTMLElement) {
result = target[method];
} else if (target) {
// According to the type inference, the `target` is `never` type.
// Since we configured the loose mode type checking, and supports mocking the target with such shape below::
// `{ documentElement: { scrollLeft: 200, scrollTop: 400 } }`,
// the program may falls into this branch.
// Check the corresponding tests for details. Don't sure what is the real scenario this happens.
result = target[method];
}
if (target && !isWindow(target) && typeof result !== 'number') {
result = (_b = ((_a = target.ownerDocument) !== null && _a !== void 0 ? _a : target).documentElement) === null || _b === void 0 ? void 0 : _b[method];
}
return result;
}
/***/ }),
/***/ 68031:
/*!************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/scrollTo.js + 1 modules ***!
\************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ scrollTo; }
});
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/raf.js
var raf = __webpack_require__(74570);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/easings.js
// eslint-disable-next-line import/prefer-default-export
function easeInOutCubic(t, b, c, d) {
const cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
// eslint-disable-next-line no-return-assign
return cc / 2 * ((t -= 2) * t * t + 2) + b;
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/getScroll.js
var getScroll = __webpack_require__(13845);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/scrollTo.js
function scrollTo(y) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const {
getContainer = () => window,
callback,
duration = 450
} = options;
const container = getContainer();
const scrollTop = (0,getScroll/* default */.Z)(container, true);
const startTime = Date.now();
const frameFunc = () => {
const timestamp = Date.now();
const time = timestamp - startTime;
const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
if ((0,getScroll/* isWindow */.F)(container)) {
container.scrollTo(window.pageXOffset, nextScrollTop);
} else if (container instanceof Document || container.constructor.name === 'HTMLDocument') {
container.documentElement.scrollTop = nextScrollTop;
} else {
container.scrollTop = nextScrollTop;
}
if (time < duration) {
(0,raf/* default */.Z)(frameFunc);
} else if (typeof callback === 'function') {
callback();
}
};
(0,raf/* default */.Z)(frameFunc);
}
/***/ }),
/***/ 24905:
/*!************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@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@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/_rc-checkbox@3.1.0@rc-checkbox/es/index.js
var es = __webpack_require__(5630);
// 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/config-provider/context.js
var config_provider_context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(1684);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
var context = __webpack_require__(32441);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/GroupContext.js
const GroupContext = /*#__PURE__*/_react_17_0_2_react.createContext(null);
/* harmony default export */ var checkbox_GroupContext = (GroupContext);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/style/index.js
var checkbox_style = __webpack_require__(98447);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules
var wave = __webpack_require__(14088);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/interface.js
var wave_interface = __webpack_require__(4572);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/Checkbox.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 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_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_);
const checkboxGroup = _react_17_0_2_react.useContext(checkbox_GroupContext);
const {
isFormItemInput
} = _react_17_0_2_react.useContext(context/* FormItemInputContext */.aM);
const contextDisabled = _react_17_0_2_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_17_0_2_react.useRef(restProps.value);
_react_17_0_2_react.useEffect(() => {
checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);
false ? 0 : void 0;
}, []);
_react_17_0_2_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_2_5_1_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_2_5_1_classnames_default()({
[`${prefixCls}-indeterminate`]: indeterminate
}, wave_interface/* TARGET_CLS */.A, hashId);
const ariaChecked = indeterminate ? 'mixed' : undefined;
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
component: "Checkbox",
disabled: mergedDisabled
}, /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement(es/* default */.Z, Object.assign({
"aria-checked": ariaChecked
}, checkboxProps, {
prefixCls: prefixCls,
className: checkboxClass,
disabled: mergedDisabled,
ref: ref
})), children !== undefined && /*#__PURE__*/_react_17_0_2_react.createElement("span", null, children))));
};
const Checkbox = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalCheckbox);
if (false) {}
/* harmony default export */ var checkbox_Checkbox = (Checkbox);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(41411);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/omit.js
var omit = __webpack_require__(41123);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/Group.js
"use client";
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_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_);
const [value, setValue] = _react_17_0_2_react.useState(restProps.value || defaultValue || []);
const [registeredValues, setRegisteredValues] = _react_17_0_2_react.useState([]);
_react_17_0_2_react.useEffect(() => {
if ('value' in restProps) {
setValue(restProps.value || []);
}
}, [restProps.value]);
const memoOptions = _react_17_0_2_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_17_0_2_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_2_5_1_classnames_default()(groupPrefixCls, {
[`${groupPrefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId);
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
className: classString,
style: style
}, domProps, {
ref: ref
}), /*#__PURE__*/_react_17_0_2_react.createElement(checkbox_GroupContext.Provider, {
value: context
}, childrenNode)));
};
const CheckboxGroup = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalGroup);
/* harmony default export */ var Group = (/*#__PURE__*/_react_17_0_2_react.memo(CheckboxGroup));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@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);
/***/ }),
/***/ 98447:
/*!******************************************************************!*\
!*** ./node_modules/_antd@5.9.0@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 _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 17313);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ 37613);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 83116);
// ============================== 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_0__/* .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_0__/* .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_0__/* .resetComponent */ .Wf)(token)), {
position: 'relative',
whiteSpace: 'nowrap',
lineHeight: 1,
cursor: 'pointer',
borderRadius: token.borderRadiusSM,
// 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_0__/* .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 & 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}`
}
}
},
[`
${wrapperCls}-checked:not(${wrapperCls}-disabled),
${checkboxCls}-checked:not(${checkboxCls}-disabled)
`]: {
[`&:hover ${checkboxCls}-inner`]: {
backgroundColor: token.colorPrimaryHover,
borderColor: 'transparent'
}
}
},
// ================= 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_1__/* .merge */ .TS)(token, {
checkboxCls: `.${prefixCls}`,
checkboxSize: token.controlInteractiveSize
});
return [genCheckboxStyle(checkboxToken)];
}
/* harmony default export */ __webpack_exports__.ZP = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)('Checkbox', (token, _ref) => {
let {
prefixCls
} = _ref;
return [getStyle(prefixCls, token)];
}));
/***/ }),
/***/ 20008:
/*!*********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@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@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/_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/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
var form_context = __webpack_require__(32441);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/style/index.js
var style = __webpack_require__(9937);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Group.js
"use client";
const Group = props => {
const {
getPrefixCls,
direction
} = (0,_react_17_0_2_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_2_5_1_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_17_0_2_react.useContext)(form_context/* FormItemInputContext */.aM);
const groupFormItemContext = (0,_react_17_0_2_react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
isFormItemInput: false
}), [formItemContext]);
if (false) {}
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: cls,
style: props.style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
onFocus: props.onFocus,
onBlur: props.onBlur
}, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* FormItemInputContext */.aM.Provider, {
value: groupFormItemContext
}, props.children)));
};
/* harmony default export */ var input_Group = (Group);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Input.js + 1 modules
var Input = __webpack_require__(9432);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@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@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@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_17_0_2_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_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
var EyeOutlined = __webpack_require__(35593);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/omit.js
var omit = __webpack_require__(41123);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/ref.js
var es_ref = __webpack_require__(17763);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/hooks/useRemovePasswordTimeout.js
var useRemovePasswordTimeout = __webpack_require__(59412);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Password.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 defaultIconRender = visible => visible ? /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_EyeInvisibleOutlined, null);
const ActionMap = {
click: 'onClick',
hover: 'onMouseOver'
};
const Password = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
const {
visibilityToggle = true
} = props;
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
const [visible, setVisible] = (0,_react_17_0_2_react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
const inputRef = (0,_react_17_0_2_react.useRef)(null);
_react_17_0_2_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_17_0_2_react.cloneElement( /*#__PURE__*/_react_17_0_2_react.isValidElement(icon) ? icon : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, icon), iconProps);
};
const {
className,
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
size
} = props,
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
const suffixIcon = visibilityToggle && getIcon(prefixCls);
const inputClassName = _classnames_2_5_1_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_17_0_2_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@5.3.1@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
var SearchOutlined = __webpack_require__(54462);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
var reactNode = __webpack_require__(92343);
// 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/config-provider/hooks/useSize.js
var useSize = __webpack_require__(19716);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
var Compact = __webpack_require__(33234);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Search.js
"use client";
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_17_0_2_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_17_0_2_react.useContext(context/* ConfigContext */.E_);
const composedRef = _react_17_0_2_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_17_0_2_react.useRef(null);
const onChange = e => {
if (e && e.target && e.type === 'click' && customOnSearch) {
customOnSearch(e.target.value, e, {
source: 'clear'
});
}
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, {
source: 'input'
});
}
};
const onPressEnter = e => {
if (composedRef.current || loading) {
return;
}
onSearch(e);
};
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/_react_17_0_2_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_17_0_2_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_2_5_1_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_17_0_2_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@5.9.0@antd/es/input/TextArea.js
var TextArea = __webpack_require__(1643);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@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);
/***/ }),
/***/ 44000:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/layout/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layout */ 84966);
/* harmony import */ var _Sider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Sider */ 96529);
"use client";
const Layout = _layout__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP;
Layout.Header = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Header */ .h4;
Layout.Footer = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Footer */ .$_;
Layout.Content = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Content */ .VY;
Layout.Sider = _Sider__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
/* harmony default export */ __webpack_exports__.Z = (Layout);
/***/ }),
/***/ 6774:
/*!*************************************************************************************************************!*\
!*** ./node_modules/_scroll-into-view-if-needed@3.1.0@scroll-into-view-if-needed/dist/index.js + 1 modules ***!
\*************************************************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ dist_e; }
});
;// CONCATENATED MODULE: ./node_modules/_compute-scroll-into-view@3.1.0@compute-scroll-into-view/dist/index.js
const t=t=>"object"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||"hidden"!==t)&&("visible"!==t&&"clip"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},dist_r=(e,r)=>{var i,s,d,h;if("undefined"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p="function"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k="start"===f||"nearest"===f?x-T:"end"===f?I+F:x+v/2-T+F,D="center"===u?R+E/2-V+B:"end"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:n,width:l,top:r,right:i,bottom:s,left:d}=e.getBoundingClientRect();if("if-needed"===c&&x>=0&&R>=0&&I<=H&&C<=b&&x>=r&&I<=s&&R>=d&&C<=i)return L;const h=getComputedStyle(e),a=parseInt(h.borderLeftWidth,10),g=parseInt(h.borderTopWidth,10),p=parseInt(h.borderRightWidth,10),W=parseInt(h.borderBottomWidth,10);let T=0,B=0;const F="offsetWidth"in e?e.offsetWidth-e.clientWidth-a-p:0,V="offsetHeight"in e?e.offsetHeight-e.clientHeight-g-W:0,S="offsetWidth"in e?0===e.offsetWidth?0:l/e.offsetWidth:0,X="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(m===e)T="start"===f?k:"end"===f?k-H:"nearest"===f?o(M,M+H,H,g,W,M+k,M+k+v,v):k-H/2,B="start"===u?D:"center"===u?D-b/2:"end"===u?D-b:o(y,y+b,b,a,p,y+D,y+D+E,E),T=Math.max(0,T+M),B=Math.max(0,B+y);else{T="start"===f?k-r-g:"end"===f?k-s+W+V:"nearest"===f?o(r,s,n,g,W+V,k,k+v,v):k-(r+n/2)+V/2,B="start"===u?D-d-a:"center"===u?D-(d+l/2)+F/2:"end"===u?D-i+p+F:o(d,i,l,a,p+F,D,D+E,E);const{scrollLeft:t,scrollTop:h}=e;T=0===X?0:Math.max(0,Math.min(h+T/X,e.scrollHeight-n/X+V)),B=0===S?0:Math.max(0,Math.min(t+B/S,e.scrollWidth-l/S+F)),k+=h-T,D+=t-B}L.push({el:e,top:T,left:B})}return L};//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/_scroll-into-view-if-needed@3.1.0@scroll-into-view-if-needed/dist/index.js
const dist_o=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function dist_e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(r))return r.behavior(dist_r(e,r));const l="boolean"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of dist_r(e,dist_o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}//# sourceMappingURL=index.js.map
/***/ })
}]);