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__Help__Index.async.js

1289 lines
59 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[35729],{
/***/ 80045:
/*!*******************************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
\*******************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38329);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js
// This icon file is generated automatically.
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(91851);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ExclamationCircleOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined));
/***/ }),
/***/ 97598:
/*!**********************************************!*\
!*** ./src/components/AsyncButton/index.tsx ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: function() { return /* binding */ AsyncButton; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_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_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_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_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js */ 27161);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 3113);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var _excluded = ["children"];
var AsyncButton = function AsyncButton(_ref) {
var children = _ref.children,
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded);
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
btnLoading = _useState2[0],
setBtnLoading = _useState2[1];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
loading: btnLoading,
onClick: /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.prev = 0;
setBtnLoading(true);
_context.next = 4;
return props.onClick(e);
case 4:
setBtnLoading(false);
_context.next = 11;
break;
case 7:
_context.prev = 7;
_context.t0 = _context["catch"](0);
console.error(_context.t0);
setBtnLoading(false);
case 11:
case "end":
return _context.stop();
}
}, _callee, null, [[0, 7]]);
}));
return function (_x) {
return _ref2.apply(this, arguments);
};
}(),
children: children
}));
};
/***/ }),
/***/ 16800:
/*!**********************************************!*\
!*** ./src/pages/Help/Index.tsx + 3 modules ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Index; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(26801);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(10574);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(39343);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(11006);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(27161);
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__(38670);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(15830);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/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/menu/index.js + 11 modules
var menu = __webpack_require__(20834);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
var skeleton = __webpack_require__(59981);
// 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/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(1056);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 14 modules
var markdown_editor = __webpack_require__(38874);
// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx
var AsyncButton = __webpack_require__(97598);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
var RenderHtml = __webpack_require__(80416);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(67871);
;// CONCATENATED MODULE: ./src/pages/Help/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Helpmodules = ({"flex_box_center":"flex_box_center___W5itf","flex_space_between":"flex_space_between___gui6v","flex_box_vertical_center":"flex_box_vertical_center___pD9t3","flex_box_center_end":"flex_box_center_end___ocOJP","flex_box_column":"flex_box_column___KhV4h","content":"content____xM73","title":"title___Q0EMb","menu":"menu___dbMGX","contcats":"contcats___uNFhe","cooperatives":"cooperatives___EVJ5n","imgWrp":"imgWrp___wcdFr","btns":"btns___gQP5Z","confirm":"confirm___Igsxy","cancel":"cancel___EPAJA"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(5112);
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
var verifyLogin = __webpack_require__(23645);
;// CONCATENATED MODULE: ./src/pages/Help/Feedback/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Feedbackmodules = ({"wrap":"wrap___AsKly","link":"link___CnaN3"});
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(85578);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Help/Feedback/index.tsx
var _excluded = ["user", "globalSetting", "loading", "dispatch"];
var TextArea = input/* default */.Z.TextArea;
var Feedback = function Feedback(_ref) {
var user = _ref.user,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = objectWithoutProperties_default()(_ref, _excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
(0,_react_17_0_2_react.useEffect)(function () {
var _user$userInfo;
if (!(0,util/* isUnOrNull */.W)((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login)) {
(0,verifyLogin/* handleVerifyLogin */.o1)(dispatch);
}
}, [user.userInfo.login]);
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var res, _user$userInfo2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,fetch/* default */.ZP)("/api/helps/feedback.json", {
method: "post",
body: objectSpread2_default()({}, values)
});
case 2:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
_umi_production_exports.history.push("/messages/".concat((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login, "/message_detail?target_ids=1"));
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: "".concat(Feedbackmodules.wrap, " bg-white pl30 pr30 pt30"),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "c-grey-999 line26",
children: ["\u60F3\u5BF9\u6211\u4EEC\u7684\u5E73\u53F0\u63D0\u4F9B\u529F\u80FD\u5EFA\u8BAE\uFF1F", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53D1\u73B0\u7F51\u9875\u4E2D\u7684\u95EE\u9898\u6216bug\u60F3\u544A\u8BC9\u6211\u4EEC\uFF1F", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u671F\u671B\u4E0E\u6211\u4EEC\u5C55\u5F00\u5408\u4F5C\uFF1F", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5728\u8FD9\u91CC\u628A\u4F60\u60F3\u8BF4\u7684\u4E00\u5207\u544A\u8BC9\u6211\u4EEC\u5427\uFF1F"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "c-red-ee4 mt20 mb20",
children: ["* ", /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/help/help_center",
className: "".concat(Feedbackmodules.link, " c-red-ee4"),
children: "\u770B\u770B\u5E2E\u52A9\u4E2D\u5FC3\u662F\u5426\u6709\u4F60\u60F3\u8981\u7684\u7B54\u6848"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
layout: "vertical",
form: form,
onFinish: handleFinish,
initialValues: {
question_kind: "登录注册"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u95EE\u9898\u5206\u7C7B\uFF1A",
name: "question_kind",
rules: [{
required: true,
message: '不能为空'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "\u767B\u5F55\u6CE8\u518C",
children: "\u767B\u5F55\u6CE8\u518C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "\u4FE1\u606F\u8BA4\u8BC1",
children: "\u4FE1\u606F\u8BA4\u8BC1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "\u5B9E\u8BAD\u7F16\u7A0B",
children: "\u5B9E\u8BAD\u7F16\u7A0B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "\u5B9E\u8BAD\u8BFE\u7A0B",
children: "\u5B9E\u8BAD\u8BFE\u7A0B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "\u8BFE\u5802",
children: "\u8BFE\u5802"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "\u5176\u5B83",
children: "\u5176\u5B83"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u95EE\u9898\u9875\u9762\u7F51\u5740\uFF1A",
name: "url",
rules: [{
required: true,
message: '不能为空'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u53CD\u9988\u5E73\u53F0\u95EE\u9898\uFF0C\u8BF7\u540C\u65F6\u586B\u5199\u5BF9\u5E94\u7684\u95EE\u9898\u9875\u9762\u94FE\u63A5\uFF0C\u4EE5\u4FBF\u5E73\u53F0\u80FD\u591F\u53CA\u65F6\u8DDF\u8E2A\u89E3\u51B3\uFF0C\u8C22\u8C22"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u95EE\u9898\u63CF\u8FF0\uFF1A",
name: "description",
rules: [{
required: true,
message: '不能为空'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
rows: 4,
placeholder: "\u53CD\u9988\u5E73\u53F0\u95EE\u9898\uFF0C\u8BF7\u540C\u65F6\u586B\u5199\u5BF9\u5E94\u7684\u95EE\u9898\u9875\u9762\u94FE\u63A5\uFF0C\u4EE5\u4FBF\u5E73\u53F0\u80FD\u591F\u53CA\u65F6\u8DDF\u8E2A\u89E3\u51B3\uFF0C\u8C22\u8C22"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
htmlType: "submit",
children: "\u63D0\u4EA4"
})
})]
})]
});
};
/* harmony default export */ var Help_Feedback = ((0,_umi_production_exports.connect)(function (_ref3) {
var user = _ref3.user,
loading = _ref3.loading,
globalSetting = _ref3.globalSetting;
return {
user: user,
globalSetting: globalSetting,
loading: loading.models.index
};
})(Feedback));
;// CONCATENATED MODULE: ./src/pages/Help/Index.tsx
var Index_excluded = ["user", "globalSetting", "loading", "dispatch"];
var UserPage = function UserPage(_ref) {
var _MenuArr$filter3, _MenuArr$filter4, _MenuArr$filter5, _user$userInfo, _data$contacts, _user$userInfo3, _data$data;
var user = _ref.user,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = objectWithoutProperties_default()(_ref, Index_excluded);
var _useState = (0,_react_17_0_2_react.useState)({
content: "",
message: "",
status: 0,
contacts: [],
address: "",
data: []
}),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(true),
_useState4 = slicedToArray_default()(_useState3, 2),
isLoading = _useState4[0],
setIsLoading = _useState4[1];
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var params = (0,_umi_production_exports.useParams)();
var location = (0,_umi_production_exports.useLocation)();
var _useState5 = (0,_react_17_0_2_react.useState)(null),
_useState6 = slicedToArray_default()(_useState5, 2),
mddata = _useState6[0],
setmdData = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
contacttype = _useState8[0],
setcontactType = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
isedit = _useState10[0],
setisedit = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(false),
_useState12 = slicedToArray_default()(_useState11, 2),
isedit1 = _useState12[0],
setisedit1 = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(mddata === null || mddata === void 0 ? void 0 : mddata.content),
_useState14 = slicedToArray_default()(_useState13, 2),
defaultcontent = _useState14[0],
setDefaultcontent = _useState14[1];
var MenuArr = [{
name: "关于我们",
key: "about_us",
id: "about",
editable: true
}, {
name: "加入我们",
key: "join_us",
id: "join_us",
editable: true
}, {
name: "联系我们",
key: "contact_us",
id: "contact"
}, {
name: "合作伙伴",
key: "cooperatives",
id: "cooperatives"
}, {
name: "服务协议",
key: "agreement",
id: "agreement",
editable: true
}, {
name: "帮助中心",
key: "help_center",
id: "help_center",
editable: true
}, {
name: "意见反馈",
key: "feedback",
id: "feedback"
}].filter(function (item) {
var _globalSetting$settin;
if (globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.is_local) return item.name !== '关于我们';else return true;
});
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _MenuArr$filter, _MenuArr$filter2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(location.pathname.indexOf("/feedback") === -1)) {
_context.next = 6;
break;
}
_context.t0 = setData;
_context.next = 4;
return (0,fetch/* default */.ZP)("/api/helps/".concat((_MenuArr$filter = MenuArr.filter(function (item) {
return item.key === params["id"];
})) === null || _MenuArr$filter === void 0 || (_MenuArr$filter = _MenuArr$filter[0]) === null || _MenuArr$filter === void 0 ? void 0 : _MenuArr$filter["id"], ".json"), {
method: "get"
});
case 4:
_context.t1 = _context.sent;
(0, _context.t0)(_context.t1);
case 6:
setIsLoading(false);
(0,util/* setDocumentTitle */.Dk)((_MenuArr$filter2 = MenuArr.filter(function (item) {
return item.key === params.id;
})) === null || _MenuArr$filter2 === void 0 || (_MenuArr$filter2 = _MenuArr$filter2[0]) === null || _MenuArr$filter2 === void 0 ? void 0 : _MenuArr$filter2['name']);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
//修改内容回调接口
function updateItem() {
return _updateItem.apply(this, arguments);
}
function _updateItem() {
_updateItem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var res;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return (0,fetch/* default */.ZP)('/api/helps/update_content.json', {
method: 'put',
body: {
type: params.id,
content: defaultcontent
}
});
case 2:
res = _context4.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default */.ZP.info('提交成功');
setisedit(false);
setIsLoading(true);
getData();
}
case 4:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _updateItem.apply(this, arguments);
}
(0,_react_17_0_2_react.useEffect)(function () {
setIsLoading(true);
getData();
}, [params.id]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "edu-container mt30",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: [20, 20],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
className: Helpmodules.menu,
style: {
width: 174
},
defaultSelectedKeys: [(_MenuArr$filter3 = MenuArr.filter(function (item) {
return item.key === params.id;
})) === null || _MenuArr$filter3 === void 0 ? void 0 : _MenuArr$filter3[0]['key']],
mode: "inline",
children: MenuArr.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/help/".concat(item.key),
onClick: function onClick() {
setisedit(false);
setmdData(null);
},
children: item.name
})
}, item.key);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("h1", {
className: Helpmodules.title,
children: [(_MenuArr$filter4 = MenuArr.filter(function (item) {
return item.key === params.id;
})) === null || _MenuArr$filter4 === void 0 ? void 0 : _MenuArr$filter4[0]['name'], ((_MenuArr$filter5 = MenuArr.filter(function (item) {
return item.key === params.id;
})) === null || _MenuArr$filter5 === void 0 ? void 0 : _MenuArr$filter5[0]['editable']) && (user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.role) === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
style: {
"float": 'right',
color: '#165DFF'
},
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
setisedit(true);
_context2.next = 3;
return (0,fetch/* default */.ZP)('/api/helps/edit_content.json', {
params: {
type: params.id
}
});
case 3:
res = _context2.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
setmdData(res);
console.log(res);
}
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-bianji10 font14",
style: {
color: '#165DFF'
}
}), " \u7F16\u8F91"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "minH500",
children: params.id === "feedback" ? /*#__PURE__*/(0,jsx_runtime.jsx)(Help_Feedback, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
loading: isLoading,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: [Helpmodules.content, "bg-white pl30 pr30 pt30"].join(' '),
children: [isedit ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
defaultValue: mddata === null || mddata === void 0 ? void 0 : mddata.content,
onChange: function onChange(e) {
return setDefaultcontent(e);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Helpmodules.btns,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: Helpmodules.cancel,
onClick: function onClick() {
return setisedit(false);
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
className: Helpmodules.confirm,
type: "primary",
onClick: updateItem,
children: "\u4FDD\u5B58\u66F4\u6539"
})]
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data.content || ''
})
}), (_data$contacts = data.contacts) === null || _data$contacts === void 0 ? void 0 : _data$contacts.map(function (item, key) {
var _user$userInfo2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
className: Helpmodules.contcats,
children: [(user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.role) === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
style: {
"float": 'right',
color: '#165DFF'
},
onClick: function onClick() {
setisedit1(true);
setcontactType(key + 1);
form.setFieldsValue({
name: item.name,
qq: item.qq,
mail: item.mail
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-bianji10 font14",
style: {
color: '#165DFF'
}
}), " \u7F16\u8F91"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
children: item.type
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u8054\u7CFB\u4EBA:"
}), item.name]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "QQ:"
}), item.qq]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "Email:"
}), item.mail]
})]
}, key);
}), data.address && /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
className: Helpmodules.contcats,
children: [(user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.role) === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
style: {
"float": 'right',
color: '#165DFF'
},
onClick: function onClick() {
setisedit1(true);
setcontactType(4);
form.setFieldsValue({
address: data.address
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-bianji10 font14",
style: {
color: '#165DFF'
}
}), " \u7F16\u8F91"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
children: "\u516C\u53F8\u5730\u5740"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
children: data.address
})]
}), (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, key) {
var _item$values;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Helpmodules.cooperatives,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
children: item.name
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
gutter: [10, 20],
children: (_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.map(function (v, k) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 6,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Helpmodules.imgWrp,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + v.img
})
})
});
})
})]
});
})]
})
})
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
title: "\u7F16\u8F91",
open: isedit1,
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
destroyOnClose: true,
onCancel: function onCancel() {
setisedit1(false);
},
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var formValue, res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.t0 = (objectSpread2_default());
_context3.t1 = {};
_context3.next = 4;
return form.validateFields();
case 4:
_context3.t2 = _context3.sent;
formValue = (0, _context3.t0)(_context3.t1, _context3.t2);
_context3.next = 8;
return (0,fetch/* default */.ZP)("/api/helps/update_contact.json", {
method: 'put',
body: objectSpread2_default()(objectSpread2_default()({}, formValue), {}, {
type: contacttype
})
});
case 8:
res = _context3.sent;
if (res.status === 0) {
message/* default */.ZP.success('修改成功');
getData();
setisedit1(false);
}
case 10:
case "end":
return _context3.stop();
}
}, _callee3);
})),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form,
labelAlign: "right",
labelCol: {
span: 4
},
scrollToFirstError: true,
children: [contacttype !== 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8054\u7CFB\u4EBA",
name: "name",
placeholder: "\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
maxLength: 60,
size: "large",
style: {
height: 40,
marginTop: '-4px'
}
})
}), contacttype !== 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "QQ",
name: "qq",
placeholder: "\u8BF7\u8F93\u5165QQ",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
maxLength: 60,
size: "large",
style: {
height: 40,
marginTop: '-4px'
}
})
}), contacttype !== 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "Email",
name: "mail",
placeholder: "\u8BF7\u8F93\u5165Email",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
maxLength: 60,
size: "large",
style: {
height: 40,
marginTop: '-4px'
}
})
}), contacttype === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u516C\u53F8\u5730\u5740",
name: "address",
placeholder: "\u8BF7\u8F93\u5165\u516C\u53F8\u5730\u5740",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
maxLength: 60,
size: "large",
style: {
height: 40,
marginTop: '-4px'
}
})
})]
})
})]
});
};
/* harmony default export */ var Index = ((0,_umi_production_exports.connect)(function (_ref5) {
var user = _ref5.user,
loading = _ref5.loading,
globalSetting = _ref5.globalSetting;
return {
user: user,
globalSetting: globalSetting,
loading: loading.models.index
};
})(UserPage));
/***/ }),
/***/ 28103:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ divider; }
});
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.0@classnames/index.js
var _classnames_2_5_0_classnames = __webpack_require__(73287);
var _classnames_2_5_0_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_0_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/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
// ============================== Shared ==============================
const genSharedDividerStyle = token => {
const {
componentCls,
sizePaddingEdgeHorizontal,
colorSplit,
lineWidth,
textPaddingInline,
orientationMargin,
verticalMarginInline
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
// vertical
'&-vertical': {
position: 'relative',
top: '-0.06em',
display: 'inline-block',
height: '0.9em',
marginInline: verticalMarginInline,
marginBlock: 0,
verticalAlign: 'middle',
borderTop: 0,
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
},
'&-horizontal': {
display: 'flex',
clear: 'both',
width: '100%',
minWidth: '100%',
margin: `${token.dividerHorizontalGutterMargin}px 0`
},
[`&-horizontal${componentCls}-with-text`]: {
display: 'flex',
alignItems: 'center',
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
color: token.colorTextHeading,
fontWeight: 500,
fontSize: token.fontSizeLG,
whiteSpace: 'nowrap',
textAlign: 'center',
borderBlockStart: `0 ${colorSplit}`,
'&::before, &::after': {
position: 'relative',
width: '50%',
borderBlockStart: `${lineWidth}px solid transparent`,
// Chrome not accept `inherit` in `border-top`
borderBlockStartColor: 'inherit',
borderBlockEnd: 0,
transform: 'translateY(50%)',
content: "''"
}
},
[`&-horizontal${componentCls}-with-text-left`]: {
'&::before': {
width: `${orientationMargin * 100}%`
},
'&::after': {
width: `${100 - orientationMargin * 100}%`
}
},
[`&-horizontal${componentCls}-with-text-right`]: {
'&::before': {
width: `${100 - orientationMargin * 100}%`
},
'&::after': {
width: `${orientationMargin * 100}%`
}
},
[`${componentCls}-inner-text`]: {
display: 'inline-block',
paddingBlock: 0,
paddingInline: textPaddingInline
},
'&-dashed': {
background: 'none',
borderColor: colorSplit,
borderStyle: 'dashed',
borderWidth: `${lineWidth}px 0 0`
},
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
'&::before, &::after': {
borderStyle: 'dashed none none'
}
},
[`&-vertical${componentCls}-dashed`]: {
borderInlineStartWidth: lineWidth,
borderInlineEnd: 0,
borderBlockStart: 0,
borderBlockEnd: 0
},
[`&-plain${componentCls}-with-text`]: {
color: token.colorText,
fontWeight: 'normal',
fontSize: token.fontSize
},
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
'&::before': {
width: 0
},
'&::after': {
width: '100%'
},
[`${componentCls}-inner-text`]: {
paddingInlineStart: sizePaddingEdgeHorizontal
}
},
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
'&::before': {
width: '100%'
},
'&::after': {
width: 0
},
[`${componentCls}-inner-text`]: {
paddingInlineEnd: sizePaddingEdgeHorizontal
}
}
})
};
};
// ============================== Export ==============================
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
const dividerToken = (0,statistic/* merge */.TS)(token, {
dividerHorizontalWithTextGutterMargin: token.margin,
dividerHorizontalGutterMargin: token.marginLG,
sizePaddingEdgeHorizontal: 0
});
return [genSharedDividerStyle(dividerToken)];
}, token => ({
textPaddingInline: '1em',
orientationMargin: 0.05,
verticalMarginInline: token.marginXS
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
"use client";
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const Divider = props => {
const {
getPrefixCls,
direction,
divider
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const {
prefixCls: customizePrefixCls,
type = 'horizontal',
orientation = 'center',
orientationMargin,
className,
rootClassName,
children,
dashed,
plain,
style
} = props,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
const prefixCls = getPrefixCls('divider', customizePrefixCls);
const [wrapSSR, hashId] = divider_style(prefixCls);
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
const hasChildren = !!children;
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
const classString = _classnames_2_5_0_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
[`${prefixCls}-with-text`]: hasChildren,
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
[`${prefixCls}-dashed`]: !!dashed,
[`${prefixCls}-plain`]: !!plain,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
}, className, rootClassName);
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
if (typeof orientationMargin === 'number') {
return orientationMargin;
}
if (/^\d+$/.test(orientationMargin)) {
return Number(orientationMargin);
}
return orientationMargin;
}, [orientationMargin]);
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
marginLeft: memoizedOrientationMargin
}), hasCustomMarginRight && {
marginRight: memoizedOrientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
className: classString,
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-inner-text`,
style: innerStyle
}, children)));
};
if (false) {}
/* harmony default export */ var divider = (Divider);
/***/ }),
/***/ 57809:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/select/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 73287);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rc_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-select */ 77861);
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-util/es/omit */ 99468);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/motion */ 62892);
/* harmony import */ var _util_statusUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/statusUtils */ 19080);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider/DisabledContext */ 1684);
/* harmony import */ var _config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider/defaultRenderEmpty */ 93891);
/* harmony import */ var _config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider/hooks/useSize */ 19716);
/* harmony import */ var _form_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../form/context */ 32441);
/* harmony import */ var _space_Compact__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../space/Compact */ 33234);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 14154);
/* harmony import */ var _useBuiltinPlacements__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./useBuiltinPlacements */ 58582);
/* harmony import */ var _useShowArrow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useShowArrow */ 84443);
/* harmony import */ var _utils_iconUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/iconUtil */ 66339);
"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;
};
// TODO: 4.0 - codemod should help to change `filterOption` to support node props.
const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
const InternalSelect = (_a, ref) => {
var _b;
var {
prefixCls: customizePrefixCls,
bordered = true,
className,
rootClassName,
getPopupContainer,
popupClassName,
dropdownClassName,
listHeight = 256,
placement,
listItemHeight = 24,
size: customizeSize,
disabled: customDisabled,
notFoundContent,
status: customStatus,
builtinPlacements,
dropdownMatchSelectWidth,
popupMatchSelectWidth,
direction: propDirection,
style,
allowClear
} = _a,
props = __rest(_a, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear"]);
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
renderEmpty,
direction: contextDirection,
virtual,
popupMatchSelectWidth: contextPopupMatchSelectWidth,
popupOverflow,
select
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls('select', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const direction = propDirection !== null && propDirection !== void 0 ? propDirection : contextDirection;
const {
compactSize,
compactItemClassnames
} = (0,_space_Compact__WEBPACK_IMPORTED_MODULE_4__/* .useCompactItemContext */ .ri)(prefixCls, direction);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
const mode = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => {
const {
mode: m
} = props;
if (m === 'combobox') {
return undefined;
}
if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {
return 'combobox';
}
return m;
}, [props.mode]);
const isMultiple = mode === 'multiple' || mode === 'tags';
const showSuffixIcon = (0,_useShowArrow__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props.suffixIcon, props.showArrow);
const mergedPopupMatchSelectWidth = (_b = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _b !== void 0 ? _b : contextPopupMatchSelectWidth;
// ===================== Form Status =====================
const {
status: contextStatus,
hasFeedback,
isFormItemInput,
feedbackIcon
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_form_context__WEBPACK_IMPORTED_MODULE_7__/* .FormItemInputContext */ .aM);
const mergedStatus = (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_8__/* .getMergedStatus */ .F)(contextStatus, customStatus);
// ===================== Empty =====================
let mergedNotFound;
if (notFoundContent !== undefined) {
mergedNotFound = notFoundContent;
} else if (mode === 'combobox') {
mergedNotFound = null;
} else {
mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
componentName: "Select"
});
}
// ===================== Icons =====================
const {
suffixIcon,
itemIcon,
removeIcon,
clearIcon
} = (0,_utils_iconUtil__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)(Object.assign(Object.assign({}, props), {
multiple: isMultiple,
hasFeedback,
feedbackIcon,
showSuffixIcon,
prefixCls,
showArrow: props.showArrow,
componentName: 'Select'
}));
const mergedAllowClear = allowClear === true ? {
clearIcon
} : allowClear;
const selectProps = (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(props, ['suffixIcon', 'itemIcon']);
const rcSelectRtlDropdownClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()(popupClassName || dropdownClassName, {
[`${prefixCls}-dropdown-${direction}`]: direction === 'rtl'
}, rootClassName, hashId);
const mergedSize = (0,_config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()({
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-borderless`]: !bordered,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_8__/* .getStatusClassNames */ .Z)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, select === null || select === void 0 ? void 0 : select.className, className, rootClassName, hashId);
// ===================== Placement =====================
const memoPlacement = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => {
if (placement !== undefined) {
return placement;
}
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
}, [placement, direction]);
const mergedBuiltinPlacements = (0,_useBuiltinPlacements__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(builtinPlacements, popupOverflow);
// ====================== Warning ======================
if (false) {}
// ====================== Render =======================
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_select__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP, Object.assign({
ref: ref,
virtual: virtual,
showSearch: select === null || select === void 0 ? void 0 : select.showSearch
}, selectProps, {
style: Object.assign(Object.assign({}, select === null || select === void 0 ? void 0 : select.style), style),
dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,
builtinPlacements: mergedBuiltinPlacements,
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_15__/* .getTransitionName */ .m)(rootPrefixCls, 'slide-up', props.transitionName),
listHeight: listHeight,
listItemHeight: listItemHeight,
mode: mode,
prefixCls: prefixCls,
placement: memoPlacement,
direction: direction,
suffixIcon: suffixIcon,
menuItemSelectedIcon: itemIcon,
removeIcon: removeIcon,
allowClear: mergedAllowClear,
notFoundContent: mergedNotFound,
className: mergedClassName,
getPopupContainer: getPopupContainer || getContextPopupContainer,
dropdownClassName: rcSelectRtlDropdownClassName,
disabled: mergedDisabled
})));
};
if (false) {}
const Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(InternalSelect);
// We don't care debug panel
/* istanbul ignore next */
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z)(Select);
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
Select.Option = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .Option */ .Wx;
Select.OptGroup = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .OptGroup */ .Xo;
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
if (false) {}
/* harmony default export */ __webpack_exports__["default"] = (Select);
/***/ })
}]);