|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[27182],{
|
|
|
|
|
|
/***/ 63606:
|
|
|
/*!******************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***!
|
|
|
\******************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ icons_CheckOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_CheckOutlined = (CheckOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_CheckOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_CheckOutlined = (/*#__PURE__*/react.forwardRef(CheckOutlined_CheckOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 96842:
|
|
|
/*!************************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules ***!
|
|
|
\************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ icons_DoubleRightOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_DoubleRightOutlined = (DoubleRightOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DoubleRightOutlined_DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_DoubleRightOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_DoubleRightOutlined = (/*#__PURE__*/react.forwardRef(DoubleRightOutlined_DoubleRightOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 99611:
|
|
|
/*!****************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
|
|
|
\****************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ icons_EyeOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_EyeOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/react.forwardRef(EyeOutlined_EyeOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 61854:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./src/components/User/RegisterPanel/unlock.tsx + 1 modules ***!
|
|
|
\******************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ unlock; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./src/components/User/RegisterPanel/unlock.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
|
|
|
var CloseOutlined = __webpack_require__(97937);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js + 1 modules
|
|
|
var CheckOutlined = __webpack_require__(63606);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules
|
|
|
var DoubleRightOutlined = __webpack_require__(96842);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(29427);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/components/User/RegisterPanel/unlock.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var initialState = {
|
|
|
moveX: 0,
|
|
|
verify: 0
|
|
|
};
|
|
|
var Types = /*#__PURE__*/function (Types) {
|
|
|
Types[Types["SET_MOVEX"] = 0] = "SET_MOVEX";
|
|
|
Types[Types["VERIFY"] = 1] = "VERIFY";
|
|
|
return Types;
|
|
|
}(Types || {});
|
|
|
function reducer(state, action) {
|
|
|
switch (action.type) {
|
|
|
case Types.SET_MOVEX:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
moveX: action.payload
|
|
|
});
|
|
|
case Types.VERIFY:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), action.payload);
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//antd 自定义表单项
|
|
|
/* harmony default export */ var unlock = (function (_ref) {
|
|
|
var value = _ref.value,
|
|
|
onChange = _ref.onChange,
|
|
|
onValidate = _ref.onValidate;
|
|
|
var _useReducer = (0,react.useReducer)(reducer, initialState),
|
|
|
_useReducer2 = slicedToArray_default()(_useReducer, 2),
|
|
|
state = _useReducer2[0],
|
|
|
dispatch = _useReducer2[1];
|
|
|
var moveX = state.moveX,
|
|
|
verify = state.verify;
|
|
|
var handlerEl = (0,react.useRef)();
|
|
|
var wrapperEL = (0,react.useRef)();
|
|
|
var bgEl = (0,react.useRef)();
|
|
|
var startDrag = (0,react.useRef)();
|
|
|
var wrapperRect = (0,react.useMemo)(function () {
|
|
|
if (wrapperEL.current) {
|
|
|
return wrapperEL.current.getBoundingClientRect();
|
|
|
}
|
|
|
}, [wrapperEL.current]);
|
|
|
(0,react.useEffect)(function () {
|
|
|
if (wrapperRect) {
|
|
|
var onMove = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
|
|
|
var pageX;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!startDrag.current) {
|
|
|
_context.next = 15;
|
|
|
break;
|
|
|
}
|
|
|
pageX = e.pageX - left;
|
|
|
if (isMobile) {
|
|
|
pageX = e.changedTouches[0].pageX - left;
|
|
|
}
|
|
|
if (pageX < 0) {
|
|
|
pageX = 0;
|
|
|
}
|
|
|
if (!(pageX >= distance)) {
|
|
|
_context.next = 14;
|
|
|
break;
|
|
|
}
|
|
|
startDrag.current = false;
|
|
|
pageX = distance;
|
|
|
_context.next = 9;
|
|
|
return onValidate();
|
|
|
case 9:
|
|
|
flag = _context.sent;
|
|
|
dispatch({
|
|
|
type: Types.VERIFY,
|
|
|
payload: {
|
|
|
moveX: pageX,
|
|
|
verify: flag
|
|
|
}
|
|
|
});
|
|
|
onChange(flag);
|
|
|
_context.next = 15;
|
|
|
break;
|
|
|
case 14:
|
|
|
dispatch({
|
|
|
type: Types.SET_MOVEX,
|
|
|
payload: pageX
|
|
|
});
|
|
|
case 15:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function onMove(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var onMouseUp = function onMouseUp() {
|
|
|
startDrag.current = false;
|
|
|
if (flag === 0) {
|
|
|
handlerEl.current.style.transition = 'left .5s ease';
|
|
|
bgEl.current.style.transition = 'width .5s ease';
|
|
|
dispatch({
|
|
|
type: Types.VERIFY,
|
|
|
payload: {
|
|
|
moveX: 0
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
var flag = 0;
|
|
|
var width = wrapperRect.width,
|
|
|
left = wrapperRect.left;
|
|
|
var distance = width - 48;
|
|
|
var isMobile = !(0,util/* isPc */.b9)();
|
|
|
if (!isMobile) {
|
|
|
window.addEventListener('mousemove', onMove);
|
|
|
window.addEventListener('mouseup', onMouseUp);
|
|
|
} else {
|
|
|
window.addEventListener('touchmove', onMove);
|
|
|
window.addEventListener('touchend', onMouseUp);
|
|
|
}
|
|
|
return function () {
|
|
|
if (!isMobile) {
|
|
|
window.removeEventListener('mousemove', onMove);
|
|
|
window.removeEventListener('mouseup', onMouseUp);
|
|
|
} else {
|
|
|
window.removeEventListener('touchmove', onMove);
|
|
|
window.removeEventListener('touchend', onMouseUp);
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
}, [wrapperRect, util/* isPc */.b9]);
|
|
|
(0,react.useEffect)(function () {
|
|
|
dispatch({
|
|
|
type: Types.VERIFY,
|
|
|
payload: {
|
|
|
verify: value,
|
|
|
moveX: value ? (wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - 48 : 0
|
|
|
}
|
|
|
});
|
|
|
}, [value]);
|
|
|
function onStartDrag() {
|
|
|
if (!verify) {
|
|
|
startDrag.current = true;
|
|
|
handlerEl.current.style.transition = '';
|
|
|
bgEl.current.style.transition = '';
|
|
|
}
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
ref: wrapperEL,
|
|
|
className: "unlock-wrapper",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: bgEl,
|
|
|
className: verify === 1 ? 'unlock-error-bg' : 'unlock-bg',
|
|
|
style: {
|
|
|
width: moveX
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "unlock-text",
|
|
|
children: verify ? verify === 1 ? '验证失败' : '验证通过' : '拖动滑块至右侧验证'
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: handlerEl,
|
|
|
onTouchStart: onStartDrag,
|
|
|
onMouseDown: onStartDrag,
|
|
|
style: {
|
|
|
left: moveX
|
|
|
},
|
|
|
className: "unlock-handler",
|
|
|
children: verify ? verify === 1 ? /*#__PURE__*/(0,jsx_runtime.jsx)(CloseOutlined/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(CheckOutlined/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(DoubleRightOutlined/* default */.Z, {})
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 88063:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/pages/User/Register/service.ts ***!
|
|
|
\********************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "Ol": function() { return /* binding */ validateName; },
|
|
|
/* harmony export */ "c0": function() { return /* binding */ resetPassword; },
|
|
|
/* harmony export */ "o1": function() { return /* binding */ getValidateCode; },
|
|
|
/* harmony export */ "ry": function() { return /* binding */ wechatRegister; },
|
|
|
/* harmony export */ "z2": function() { return /* binding */ register; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 84519);
|
|
|
|
|
|
//type 1 表示用户注册 2 忘记密码 3 绑定手机/邮箱
|
|
|
function validateName(params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)('accounts/valid_email_and_phone.json', params);
|
|
|
}
|
|
|
//type 1:用户注册注册 2:忘记密码 3:绑定手机 4: 绑定邮箱,5: 验收手机号有效
|
|
|
function getValidateCode(params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .get */ .U2)('accounts/get_verification_code.json', params);
|
|
|
}
|
|
|
function register(params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)('accounts/register.json', params);
|
|
|
}
|
|
|
function wechatRegister(params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)('weapps/register.json', params);
|
|
|
}
|
|
|
function resetPassword(params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* .post */ .v_)('accounts/reset_password.json', params);
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 63100:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./src/pages/User/ResetPassword/index.tsx + 2 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 */ ResetPassword; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
|
|
|
var es_form = __webpack_require__(25159);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(79531);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./src/components/User/RegisterPanel/unlock.tsx + 1 modules
|
|
|
var unlock = __webpack_require__(61854);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(29427);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
;// CONCATENATED MODULE: ./src/components/User/ResetPasswordPanel/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var ResetPasswordPanelmodules = ({"wrap":"wrap___jh1g8","formWrapper":"formWrapper___ac7hS","link":"link___eiEQu"});
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/components/User/ResetPasswordPanel/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var inputStyle = {
|
|
|
height: 48,
|
|
|
borderRadius: 4
|
|
|
};
|
|
|
var loginRegex = /(\b[\w\.-]+@[\w\.-]+\.\w{2,4}\b)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$)/i;
|
|
|
var initialState = {
|
|
|
timer: 0
|
|
|
};
|
|
|
var Types = /*#__PURE__*/function (Types) {
|
|
|
Types[Types["setTimer"] = 0] = "setTimer";
|
|
|
return Types;
|
|
|
}(Types || {});
|
|
|
function reducer(state, action) {
|
|
|
switch (action.type) {
|
|
|
case Types.setTimer:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
timer: action.payload
|
|
|
});
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}
|
|
|
/* harmony default export */ var ResetPasswordPanel = (function (_ref) {
|
|
|
var validateName = _ref.validateName,
|
|
|
getCode = _ref.getCode,
|
|
|
callback = _ref.callback,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style;
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var _useReducer = (0,react.useReducer)(reducer, initialState),
|
|
|
_useReducer2 = slicedToArray_default()(_useReducer, 2),
|
|
|
state = _useReducer2[0],
|
|
|
dispatch = _useReducer2[1];
|
|
|
var _useState = (0,react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
codeLoading = _useState2[0],
|
|
|
setCodeLoading = _useState2[1];
|
|
|
var timer = state.timer;
|
|
|
function onFinish(_x) {
|
|
|
return _onFinish.apply(this, arguments);
|
|
|
}
|
|
|
function _onFinish() {
|
|
|
_onFinish = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(values) {
|
|
|
var login, new_password, code, new_password_confirmation, _yield$callback, message, status, show, start_date, from;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
login = values.login, new_password = values.new_password, code = values.code, new_password_confirmation = values.new_password_confirmation;
|
|
|
_context2.next = 3;
|
|
|
return callback({
|
|
|
login: login,
|
|
|
new_password_confirmation: new_password_confirmation,
|
|
|
new_password: new_password,
|
|
|
code: code
|
|
|
});
|
|
|
case 3:
|
|
|
_yield$callback = _context2.sent;
|
|
|
message = _yield$callback.message;
|
|
|
status = _yield$callback.status;
|
|
|
show = _yield$callback.show;
|
|
|
start_date = _yield$callback.start_date;
|
|
|
if (status === 0) {
|
|
|
if (show) {
|
|
|
localStorage.setItem('extension-modal', 'exist');
|
|
|
localStorage.setItem('extension-date', start_date);
|
|
|
} else {
|
|
|
localStorage.removeItem('extension-modal');
|
|
|
}
|
|
|
from = searchParams.get("from");
|
|
|
if (from && from.indexOf('login') < 0) {
|
|
|
_umi_production_exports.history.replace(from);
|
|
|
} else {
|
|
|
_umi_production_exports.history.replace('/');
|
|
|
}
|
|
|
} else {
|
|
|
form.setFields([{
|
|
|
name: 'code',
|
|
|
errors: [message]
|
|
|
}]);
|
|
|
}
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return _onFinish.apply(this, arguments);
|
|
|
}
|
|
|
function onValidateName() {
|
|
|
return _onValidateName.apply(this, arguments);
|
|
|
}
|
|
|
function _onValidateName() {
|
|
|
_onValidateName = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var login, flag, _yield$validateName, status, message, isOk;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
login = form.getFieldValue('login');
|
|
|
flag = 0;
|
|
|
if (!(!loginRegex.test(login) || login.indexOf(" ") > -1)) {
|
|
|
_context3.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
form.setFields([{
|
|
|
name: 'login',
|
|
|
errors: ['请输入正确的手机号或邮箱']
|
|
|
}]);
|
|
|
flag = 1;
|
|
|
return _context3.abrupt("return", flag);
|
|
|
case 6:
|
|
|
_context3.next = 8;
|
|
|
return validateName({
|
|
|
login: login,
|
|
|
type: 2
|
|
|
});
|
|
|
case 8:
|
|
|
_yield$validateName = _context3.sent;
|
|
|
status = _yield$validateName.status;
|
|
|
message = _yield$validateName.message;
|
|
|
isOk = status > 0;
|
|
|
if (isOk) {
|
|
|
flag = 2;
|
|
|
} else {
|
|
|
form.setFields([{
|
|
|
name: 'login',
|
|
|
errors: [message]
|
|
|
}]);
|
|
|
flag = 1;
|
|
|
}
|
|
|
return _context3.abrupt("return", flag);
|
|
|
case 14:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return _onValidateName.apply(this, arguments);
|
|
|
}
|
|
|
var onGetCode = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var verify, login, _yield$getCode, status, message;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
verify = form.getFieldValue('verify');
|
|
|
login = form.getFieldValue('login');
|
|
|
if (verify) {
|
|
|
_context.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
form.validateFields(['verify']);
|
|
|
_context.next = 15;
|
|
|
break;
|
|
|
case 6:
|
|
|
setCodeLoading(true);
|
|
|
_context.next = 9;
|
|
|
return getCode({
|
|
|
login: login,
|
|
|
type: 2,
|
|
|
smscode: (0,util/* setmiyah */.M)(login)
|
|
|
});
|
|
|
case 9:
|
|
|
_yield$getCode = _context.sent;
|
|
|
status = _yield$getCode.status;
|
|
|
message = _yield$getCode.message;
|
|
|
if (status < 0) {
|
|
|
form.setFields([{
|
|
|
name: 'code',
|
|
|
errors: [message]
|
|
|
}]);
|
|
|
}
|
|
|
dispatch({
|
|
|
type: Types.setTimer,
|
|
|
payload: 60
|
|
|
});
|
|
|
setCodeLoading(false);
|
|
|
case 15:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function onGetCode() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
function validatePassword(_, value) {
|
|
|
var confirmationValue = form.getFieldValue('new_password_confirmation');
|
|
|
if (!value) {
|
|
|
return Promise.resolve();
|
|
|
}
|
|
|
form.setFields([{
|
|
|
name: 'new_password_confirmation',
|
|
|
errors: confirmationValue && confirmationValue !== value ? ['两次密码不一致'] : []
|
|
|
}]);
|
|
|
if (value.indexOf(" ") > -1) {
|
|
|
return Promise.reject('请输入8-16位密码,区分大小写、不能使用空格');
|
|
|
}
|
|
|
var len = value.length;
|
|
|
if (len >= 8 && len <= 16) {
|
|
|
return Promise.resolve();
|
|
|
} else {
|
|
|
return Promise.reject('请输入8-16位密码,区分大小写、不能使用空格');
|
|
|
}
|
|
|
}
|
|
|
(0,react.useEffect)(function () {
|
|
|
if (timer > 0) {
|
|
|
setTimeout(function () {
|
|
|
dispatch({
|
|
|
type: Types.setTimer,
|
|
|
payload: timer - 1
|
|
|
});
|
|
|
}, 1000);
|
|
|
}
|
|
|
}, [timer]);
|
|
|
var verifyValidate = function verifyValidate(_, value) {
|
|
|
return value ? Promise.resolve() : Promise.reject('请拖动滑块验证');
|
|
|
};
|
|
|
var LoginValidate = function LoginValidate(_, value) {
|
|
|
if (!value) {
|
|
|
return Promise.resolve();
|
|
|
}
|
|
|
if (value.indexOf(" ") > -1) {
|
|
|
return Promise.reject('请输入正确的手机号或邮箱');
|
|
|
}
|
|
|
if (loginRegex.test(value)) {
|
|
|
return Promise.resolve();
|
|
|
} else {
|
|
|
return Promise.reject('请输入正确的手机号或邮箱');
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: ResetPasswordPanelmodules.wrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
layout: "vertical",
|
|
|
form: form,
|
|
|
style: style,
|
|
|
className: ResetPasswordPanelmodules.formWrapper,
|
|
|
initialValues: {
|
|
|
autologin: true,
|
|
|
protool: true
|
|
|
},
|
|
|
onFinish: onFinish,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
name: "login",
|
|
|
label: "\u8D26\u53F7",
|
|
|
required: false,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入正确的手机号或邮箱'
|
|
|
}, {
|
|
|
validator: LoginValidate
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: inputStyle,
|
|
|
size: 'middle',
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",
|
|
|
onChange: function onChange() {
|
|
|
return form.setFieldsValue({
|
|
|
verify: 0
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
name: "verify",
|
|
|
rules: [{
|
|
|
validator: verifyValidate
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(unlock/* default */.Z, {
|
|
|
onValidate: onValidateName
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
label: "\u5BC6\u7801",
|
|
|
required: false,
|
|
|
name: "new_password",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入8-16位密码,区分大小写、不能使用空格'
|
|
|
}, {
|
|
|
validator: validatePassword
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default.Password */.Z.Password, {
|
|
|
style: inputStyle,
|
|
|
size: 'middle',
|
|
|
placeholder: "\u8F93\u51658\uFF5E16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",
|
|
|
visibilityToggle: false
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
name: "new_password_confirmation",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请再次输入新密码'
|
|
|
}, function (_ref3) {
|
|
|
var getFieldValue = _ref3.getFieldValue;
|
|
|
return {
|
|
|
validator: function validator(_, value) {
|
|
|
if (!value || getFieldValue('new_password') === value) {
|
|
|
return Promise.resolve();
|
|
|
}
|
|
|
return Promise.reject('两次密码不一致');
|
|
|
}
|
|
|
};
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default.Password */.Z.Password, {
|
|
|
style: inputStyle,
|
|
|
size: 'middle',
|
|
|
placeholder: "\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801",
|
|
|
visibilityToggle: false
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
name: "code",
|
|
|
label: "\u9A8C\u8BC1\u7801",
|
|
|
required: false,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入验证码'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
suffix: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
loading: codeLoading,
|
|
|
type: "link",
|
|
|
onClick: onGetCode,
|
|
|
disabled: timer > 0,
|
|
|
children: [" ", timer === 0 ? '获取验证码' : "".concat(timer, "\u79D2\u53EF\u91CD\u65B0\u83B7\u53D6")]
|
|
|
}),
|
|
|
style: {
|
|
|
paddingRight: 2,
|
|
|
height: 48,
|
|
|
borderRadius: 4
|
|
|
},
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",
|
|
|
size: 'middle'
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
block: true,
|
|
|
style: inputStyle,
|
|
|
children: " \u5B8C\u6210 "
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
className: "tc",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
className: "font14",
|
|
|
to: "/user/login",
|
|
|
children: "\u8FD4\u56DE\u767B\u5F55"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/pages/User/Register/service.ts
|
|
|
var service = __webpack_require__(88063);
|
|
|
;// CONCATENATED MODULE: ./src/pages/User/ResetPassword/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var ResetPassword = (function () {
|
|
|
var panelProps = {
|
|
|
getCode: service/* getValidateCode */.o1,
|
|
|
callback: function () {
|
|
|
var _callback = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
|
|
|
var response;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,service/* resetPassword */.c0)(values);
|
|
|
case 2:
|
|
|
response = _context.sent;
|
|
|
return _context.abrupt("return", response);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function callback(_x) {
|
|
|
return _callback.apply(this, arguments);
|
|
|
}
|
|
|
return callback;
|
|
|
}(),
|
|
|
validateName: service/* validateName */.Ol
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(ResetPasswordPanel, objectSpread2_default()({}, panelProps));
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 79531:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/input/index.js + 5 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ input; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
|
|
|
var form_context = __webpack_require__(65223);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
|
|
|
var style = __webpack_require__(47673);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Group.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Group = props => {
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction
|
|
|
} = (0,react.useContext)(context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
className
|
|
|
} = props;
|
|
|
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
|
|
|
const inputPrefixCls = getPrefixCls('input');
|
|
|
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
|
|
|
const cls = classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-lg`]: props.size === 'large',
|
|
|
[`${prefixCls}-sm`]: props.size === 'small',
|
|
|
[`${prefixCls}-compact`]: props.compact,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, hashId, className);
|
|
|
const formItemContext = (0,react.useContext)(form_context/* FormItemInputContext */.aM);
|
|
|
const groupFormItemContext = (0,react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
|
|
|
isFormItemInput: false
|
|
|
}), [formItemContext]);
|
|
|
if (false) {}
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement("span", {
|
|
|
className: cls,
|
|
|
style: props.style,
|
|
|
onMouseEnter: props.onMouseEnter,
|
|
|
onMouseLeave: props.onMouseLeave,
|
|
|
onFocus: props.onFocus,
|
|
|
onBlur: props.onBlur
|
|
|
}, /*#__PURE__*/react.createElement(form_context/* FormItemInputContext.Provider */.aM.Provider, {
|
|
|
value: groupFormItemContext
|
|
|
}, props.children)));
|
|
|
};
|
|
|
/* harmony default export */ var input_Group = (Group);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/Input.js + 1 modules
|
|
|
var Input = __webpack_require__(82586);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_EyeInvisibleOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
|
|
var EyeOutlined = __webpack_require__(99611);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(10366);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/ref.js
|
|
|
var es_ref = __webpack_require__(17799);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/hooks/useRemovePasswordTimeout.js
|
|
|
var useRemovePasswordTimeout = __webpack_require__(72922);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Password.js
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const defaultIconRender = visible => visible ? /*#__PURE__*/react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/react.createElement(icons_EyeInvisibleOutlined, null);
|
|
|
const ActionMap = {
|
|
|
click: 'onClick',
|
|
|
hover: 'onMouseOver'
|
|
|
};
|
|
|
const Password = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
visibilityToggle = true
|
|
|
} = props;
|
|
|
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
|
|
|
const [visible, setVisible] = (0,react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
|
|
|
const inputRef = (0,react.useRef)(null);
|
|
|
react.useEffect(() => {
|
|
|
if (visibilityControlled) {
|
|
|
setVisible(visibilityToggle.visible);
|
|
|
}
|
|
|
}, [visibilityControlled, visibilityToggle]);
|
|
|
// Remove Password value
|
|
|
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
|
|
|
const onVisibleChange = () => {
|
|
|
const {
|
|
|
disabled
|
|
|
} = props;
|
|
|
if (disabled) {
|
|
|
return;
|
|
|
}
|
|
|
if (visible) {
|
|
|
removePasswordTimeout();
|
|
|
}
|
|
|
setVisible(prevState => {
|
|
|
var _a;
|
|
|
const newState = !prevState;
|
|
|
if (typeof visibilityToggle === 'object') {
|
|
|
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
|
|
|
}
|
|
|
return newState;
|
|
|
});
|
|
|
};
|
|
|
const getIcon = prefixCls => {
|
|
|
const {
|
|
|
action = 'click',
|
|
|
iconRender = defaultIconRender
|
|
|
} = props;
|
|
|
const iconTrigger = ActionMap[action] || '';
|
|
|
const icon = iconRender(visible);
|
|
|
const iconProps = {
|
|
|
[iconTrigger]: onVisibleChange,
|
|
|
className: `${prefixCls}-icon`,
|
|
|
key: 'passwordIcon',
|
|
|
onMouseDown: e => {
|
|
|
// Prevent focused state lost
|
|
|
// https://github.com/ant-design/ant-design/issues/15173
|
|
|
e.preventDefault();
|
|
|
},
|
|
|
onMouseUp: e => {
|
|
|
// Prevent caret position change
|
|
|
// https://github.com/ant-design/ant-design/issues/23524
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/react.cloneElement( /*#__PURE__*/react.isValidElement(icon) ? icon : /*#__PURE__*/react.createElement("span", null, icon), iconProps);
|
|
|
};
|
|
|
const {
|
|
|
className,
|
|
|
prefixCls: customizePrefixCls,
|
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
|
size
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
|
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
|
|
|
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
|
|
const inputClassName = classnames_default()(prefixCls, className, {
|
|
|
[`${prefixCls}-${size}`]: !!size
|
|
|
});
|
|
|
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
|
|
|
type: visible ? 'text' : 'password',
|
|
|
className: inputClassName,
|
|
|
prefixCls: inputPrefixCls,
|
|
|
suffix: suffixIcon
|
|
|
});
|
|
|
if (size) {
|
|
|
omittedProps.size = size;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(Input/* default */.Z, Object.assign({
|
|
|
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
|
|
|
}, omittedProps));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var input_Password = (Password);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
|
|
var SearchOutlined = __webpack_require__(68795);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
|
|
|
var useSize = __webpack_require__(98675);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js
|
|
|
var Compact = __webpack_require__(4173);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Search.js
|
|
|
var Search_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Search = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
|
className,
|
|
|
size: customizeSize,
|
|
|
suffix,
|
|
|
enterButton = false,
|
|
|
addonAfter,
|
|
|
loading,
|
|
|
disabled,
|
|
|
onSearch: customOnSearch,
|
|
|
onChange: customOnChange,
|
|
|
onCompositionStart,
|
|
|
onCompositionEnd
|
|
|
} = props,
|
|
|
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const composedRef = react.useRef(false);
|
|
|
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
|
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
|
const {
|
|
|
compactSize
|
|
|
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
|
|
const size = (0,useSize/* default */.Z)(ctx => {
|
|
|
var _a;
|
|
|
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
|
|
});
|
|
|
const inputRef = react.useRef(null);
|
|
|
const onChange = e => {
|
|
|
if (e && e.target && e.type === 'click' && customOnSearch) {
|
|
|
customOnSearch(e.target.value, e);
|
|
|
}
|
|
|
if (customOnChange) {
|
|
|
customOnChange(e);
|
|
|
}
|
|
|
};
|
|
|
const onMouseDown = e => {
|
|
|
var _a;
|
|
|
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
};
|
|
|
const onSearch = e => {
|
|
|
var _a, _b;
|
|
|
if (customOnSearch) {
|
|
|
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e);
|
|
|
}
|
|
|
};
|
|
|
const onPressEnter = e => {
|
|
|
if (composedRef.current || loading) {
|
|
|
return;
|
|
|
}
|
|
|
onSearch(e);
|
|
|
};
|
|
|
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/react.createElement(SearchOutlined/* default */.Z, null) : null;
|
|
|
const btnClassName = `${prefixCls}-button`;
|
|
|
let button;
|
|
|
const enterButtonAsElement = enterButton || {};
|
|
|
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
|
|
|
if (isAntdButton || enterButtonAsElement.type === 'button') {
|
|
|
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
|
|
|
onMouseDown,
|
|
|
onClick: e => {
|
|
|
var _a, _b;
|
|
|
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
|
onSearch(e);
|
|
|
},
|
|
|
key: 'enterButton'
|
|
|
}, isAntdButton ? {
|
|
|
className: btnClassName,
|
|
|
size
|
|
|
} : {}));
|
|
|
} else {
|
|
|
button = /*#__PURE__*/react.createElement(es_button/* default */.ZP, {
|
|
|
className: btnClassName,
|
|
|
type: enterButton ? 'primary' : undefined,
|
|
|
size: size,
|
|
|
disabled: disabled,
|
|
|
key: "enterButton",
|
|
|
onMouseDown: onMouseDown,
|
|
|
onClick: onSearch,
|
|
|
loading: loading,
|
|
|
icon: searchIcon
|
|
|
}, enterButton);
|
|
|
}
|
|
|
if (addonAfter) {
|
|
|
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
|
|
|
key: 'addonAfter'
|
|
|
})];
|
|
|
}
|
|
|
const cls = classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-${size}`]: !!size,
|
|
|
[`${prefixCls}-with-button`]: !!enterButton
|
|
|
}, className);
|
|
|
const handleOnCompositionStart = e => {
|
|
|
composedRef.current = true;
|
|
|
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
|
|
|
};
|
|
|
const handleOnCompositionEnd = e => {
|
|
|
composedRef.current = false;
|
|
|
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
|
|
|
};
|
|
|
return /*#__PURE__*/react.createElement(Input/* default */.Z, Object.assign({
|
|
|
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
|
|
|
onPressEnter: onPressEnter
|
|
|
}, restProps, {
|
|
|
size: size,
|
|
|
onCompositionStart: handleOnCompositionStart,
|
|
|
onCompositionEnd: handleOnCompositionEnd,
|
|
|
prefixCls: inputPrefixCls,
|
|
|
addonAfter: button,
|
|
|
suffix: suffix,
|
|
|
onChange: onChange,
|
|
|
className: cls,
|
|
|
disabled: disabled
|
|
|
}));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var input_Search = (Search);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/TextArea.js
|
|
|
var TextArea = __webpack_require__(96330);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/index.js
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const input_Input = Input/* default */.Z;
|
|
|
if (false) {}
|
|
|
input_Input.Group = input_Group;
|
|
|
input_Input.Search = input_Search;
|
|
|
input_Input.TextArea = TextArea/* default */.Z;
|
|
|
input_Input.Password = input_Password;
|
|
|
/* harmony default export */ var input = (input_Input);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 33507:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/antd/es/style/motion/collapse.js ***!
|
|
|
\*******************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
const genCollapseMotion = token => ({
|
|
|
[token.componentCls]: {
|
|
|
// For common/openAnimation
|
|
|
[`${token.antCls}-motion-collapse-legacy`]: {
|
|
|
overflow: 'hidden',
|
|
|
'&-active': {
|
|
|
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
|
|
|
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
|
|
|
}
|
|
|
},
|
|
|
[`${token.antCls}-motion-collapse`]: {
|
|
|
overflow: 'hidden',
|
|
|
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
|
|
|
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (genCollapseMotion);
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |