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__User__ResetPassword.74d8...

2 lines
30 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[228],{LsG1:function(ie,H,m){"use strict";m.r(H);var V=m("9og8"),A=m("q1tI"),E=m.n(A),ne=m("+L6B"),q=m("2/Rp"),re=m("5NDa"),X=m("5rEg"),pe=m("y8nQ"),W=m("Vl3Y"),ee=m("tJVT"),te=m("k1fw"),Ne=m("tJYU"),ve=m("4i/N"),ye=m("bRQS"),fe=m("VTBJ"),ge={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"},Ee=ge,we=m("6VBw"),de=function(u,S){return A.createElement(we.a,Object(fe.a)(Object(fe.a)({},u),{},{ref:S,icon:Ee}))};de.displayName="DoubleRightOutlined";var be=A.forwardRef(de),se=m("1vsH");function ue(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ue=function(){return u};var s,u={},S=Object.prototype,y=S.hasOwnProperty,N=Object.defineProperty||function(r,e,t){r[e]=t.value},C=typeof Symbol=="function"?Symbol:{},x=C.iterator||"@@iterator",B=C.asyncIterator||"@@asyncIterator",R=C.toStringTag||"@@toStringTag";function d(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{d({},"")}catch(r){d=function(t,n,o){return t[n]=o}}function Y(r,e,t,n){var o=e&&e.prototype instanceof I?e:I,a=Object.create(o.prototype),i=new f(n||[]);return N(a,"_invoke",{value:Q(r,t,i)}),a}function k(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=Y;var _="suspendedStart",z="suspendedYield",U="executing",F="completed",h={};function I(){}function P(){}function p(){}var G={};d(G,x,function(){return this});var T=Object.getPrototypeOf,D=T&&T(T(O([])));D&&D!==S&&y.call(D,x)&&(G=D);var L=p.prototype=I.prototype=Object.create(G);function J(r){["next","throw","return"].forEach(function(e){d(r,e,function(t){return this._invoke(e,t)})})}function M(r,e){function t(o,a,i,c){var l=k(r[o],r,a);if(l.type!=="throw"){var w=l.arg,b=w.value;return b&&typeof b=="object"&&y.call(b,"__await")?e.resolve(b.__await).then(function(g){t("next",g,i,c)},function(g){t("throw",g,i,c)}):e.resolve(b).then(function(g){w.value=g,i(w)},function(g){return t("throw",g,i,c)})}c(l.arg)}var n;N(this,"_invoke",{value:function(a,i){function c(){return new e(function(l,w){t(a,i,l,w)})}return n=n?n.then(c,c):c()}})}function Q(r,e,t){var n=_;return function(o,a){if(n===U)throw new Error("Generator is already running");if(n===F){if(o==="throw")throw a;return{value:s,done:!0}}for(t.method=o,t.arg=a;;){var i=t.delegate;if(i){var c=$(i,t);if(c){if(c===h)continue;return c}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===_)throw n=F,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=U;var l=k(r,e,t);if(l.type==="normal"){if(n=t.done?F:z,l.arg===h)continue;return{value:l.arg,done:t.done}}l.type==="throw"&&(n=F,t.method="throw",t.arg=l.arg)}}}function $(r,e){var t=e.method,n=r.iterator[t];if(n===s)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=s,$(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),h;var o=k(n,r.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=s),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function v(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function f(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(j,this),this.reset(!0)}function O(r){if(r||r===""){var e=r[x];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function o(){for(;++t<r.length;)if(y.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=s,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return P.prototype=p,N(L,"constructor",{value:p,configurable:!0}),N(p,"constructor",{value:P,configurable:!0}),P.displayName=d(p,R,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===P||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,p):(r.__proto__=p,d(r,R,"GeneratorFunction")),r.prototype=Object.create(L),r},u.awrap=function(r){return{__await:r}},J(M.prototype),d(M.prototype,B,function(){return this}),u.AsyncIterator=M,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new M(Y(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(i){return i.done?i.value:a.next()})},J(L),d(L,R,"Generator"),d(L,x,function(){return this}),d(L,"toString",function(){return"[object Generator]"}),u.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function o(){for(;t.length;){var a=t.pop();if(a in e)return o.value=a,o.done=!1,o}return o.done=!0,o}},u.values=O,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(v),!e)for(var t in this)t.charAt(0)==="t"&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(w,b){return i.type="throw",i.arg=e,t.next=w,b&&(t.method="next",t.arg=s),!!b}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var c=y.call(a,"catchLoc"),l=y.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&y.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;v(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=s),h}},u}var Le={moveX:0,verify:0},K=function(s){return s[s.SET_MOVEX=0]="SET_MOVEX",s[s.VERIFY=1]="VERIFY",s}(K||{});function Oe(s,u){switch(u.type){case K.SET_MOVEX:return Object(te.a)(Object(te.a)({},s),{},{moveX:u.payload});case K.VERIFY:return Object(te.a)(Object(te.a)({},s),u.payload);default:throw new Error}}var _e=function(s){var u=s.value,S=s.onChange,y=s.onValidate,N=Object(A.useReducer)(Oe,Le),C=Object(ee.a)(N,2),x=C[0],B=C[1],R=x.moveX,d=x.verify,Y=Object(A.useRef)(),k=Object(A.useRef)(),_=Object(A.useRef)(),z=Object(A.useRef)(),U=Object(A.useMemo)(function(){if(k.current)return k.current.getBoundingClientRect()},[k.current]);Object(A.useEffect)(function(){if(U){var h,I=function(M){return(h=h||Object(V.a)(ue().mark(function Q($){var j;return ue().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!z.current){f.next=15;break}if(j=$.pageX-T,L&&(j=$.changedTouches[0].pageX-T),j<0&&(j=0),!(j>=D)){f.next=14;break}return z.current=!1,j=D,f.next=9,y();case 9:p=f.sent,B({type:K.VERIFY,payload:{moveX:j,verify:p}}),S(p),f.next=15;break;case 14:B({type:K.SET_MOVEX,payload:j});case 15:case"end":return f.stop()}},Q)}))).apply(this,arguments)},P=function(){z.current=!1,p===0&&(Y.current.style.transition="left .5s ease",_.current.style.transition="width .5s ease",B({type:K.VERIFY,payload:{moveX:0}}))},p=0,G=U.width,T=U.left,D=G-48,L=!Object(se.H)();return L?(window.addEventListener("touchmove",I),window.addEventListener("touchend",P)):(window.addEventListener("mousemove",I),window.addEventListener("mouseup",P)),function(){L?(window.removeEventListener("touchmove",I),window.removeEventListener("touchend",P)):(window.removeEventListener("mousemove",I),window.removeEventListener("mouseup",P))}}},[U,se.H]),Object(A.useEffect)(function(){B({type:K.VERIFY,payload:{verify:u,moveX:u?(U==null?void 0:U.width)-48:0}})},[u]);function F(){d||(z.current=!0,Y.current.style.transition="",_.current.style.transition="")}return E.a.createElement("div",{ref:k,className:"unlock-wrapper"},E.a.createElement("div",{ref:_,className:d===1?"unlock-error-bg":"unlock-bg",style:{width:R}}),E.a.createElement("div",{className:"unlock-text"},d?d===1?"\u9A8C\u8BC1\u5931\u8D25":"\u9A8C\u8BC1\u901A\u8FC7":"\u62D6\u52A8\u6ED1\u5757\u81F3\u53F3\u4FA7\u9A8C\u8BC1"),E.a.createElement("div",{ref:Y,onTouchStart:F,onMouseDown:F,style:{left:R},className:"unlock-handler"},d?d===1?E.a.createElement(ve.a,null):E.a.createElement(ye.a,null):E.a.createElement(be,null)))},je=m("Ty5D"),he=m("9kvl"),Re=m("55Ip");function Z(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Z=function(){return u};var s,u={},S=Object.prototype,y=S.hasOwnProperty,N=Object.defineProperty||function(r,e,t){r[e]=t.value},C=typeof Symbol=="function"?Symbol:{},x=C.iterator||"@@iterator",B=C.asyncIterator||"@@asyncIterator",R=C.toStringTag||"@@toStringTag";function d(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{d({},"")}catch(r){d=function(t,n,o){return t[n]=o}}function Y(r,e,t,n){var o=e&&e.prototype instanceof I?e:I,a=Object.create(o.prototype),i=new f(n||[]);return N(a,"_invoke",{value:Q(r,t,i)}),a}function k(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=Y;var _="suspendedStart",z="suspendedYield",U="executing",F="completed",h={};function I(){}function P(){}function p(){}var G={};d(G,x,function(){return this});var T=Object.getPrototypeOf,D=T&&T(T(O([])));D&&D!==S&&y.call(D,x)&&(G=D);var L=p.prototype=I.prototype=Object.create(G);function J(r){["next","throw","return"].forEach(function(e){d(r,e,function(t){return this._invoke(e,t)})})}function M(r,e){function t(o,a,i,c){var l=k(r[o],r,a);if(l.type!=="throw"){var w=l.arg,b=w.value;return b&&typeof b=="object"&&y.call(b,"__await")?e.resolve(b.__await).then(function(g){t("next",g,i,c)},function(g){t("throw",g,i,c)}):e.resolve(b).then(function(g){w.value=g,i(w)},function(g){return t("throw",g,i,c)})}c(l.arg)}var n;N(this,"_invoke",{value:function(a,i){function c(){return new e(function(l,w){t(a,i,l,w)})}return n=n?n.then(c,c):c()}})}function Q(r,e,t){var n=_;return function(o,a){if(n===U)throw new Error("Generator is already running");if(n===F){if(o==="throw")throw a;return{value:s,done:!0}}for(t.method=o,t.arg=a;;){var i=t.delegate;if(i){var c=$(i,t);if(c){if(c===h)continue;return c}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===_)throw n=F,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=U;var l=k(r,e,t);if(l.type==="normal"){if(n=t.done?F:z,l.arg===h)continue;return{value:l.arg,done:t.done}}l.type==="throw"&&(n=F,t.method="throw",t.arg=l.arg)}}}function $(r,e){var t=e.method,n=r.iterator[t];if(n===s)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=s,$(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),h;var o=k(n,r.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=s),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function v(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function f(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(j,this),this.reset(!0)}function O(r){if(r||r===""){var e=r[x];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function o(){for(;++t<r.length;)if(y.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=s,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return P.prototype=p,N(L,"constructor",{value:p,configurable:!0}),N(p,"constructor",{value:P,configurable:!0}),P.displayName=d(p,R,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===P||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,p):(r.__proto__=p,d(r,R,"GeneratorFunction")),r.prototype=Object.create(L),r},u.awrap=function(r){return{__await:r}},J(M.prototype),d(M.prototype,B,function(){return this}),u.AsyncIterator=M,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new M(Y(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(i){return i.done?i.value:a.next()})},J(L),d(L,R,"Generator"),d(L,x,function(){return this}),d(L,"toString",function(){return"[object Generator]"}),u.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function o(){for(;t.length;){var a=t.pop();if(a in e)return o.value=a,o.done=!1,o}return o.done=!0,o}},u.values=O,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(v),!e)for(var t in this)t.charAt(0)==="t"&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(w,b){return i.type="throw",i.arg=e,t.next=w,b&&(t.method="next",t.arg=s),!!b}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var c=y.call(a,"catchLoc"),l=y.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&y.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;v(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=s),h}},u}var oe={height:48},me=/(\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,xe={timer:0},ae=function(s){return s[s.setTimer=0]="setTimer",s}(ae||{});function Pe(s,u){switch(u.type){case ae.setTimer:return Object(te.a)(Object(te.a)({},s),{},{timer:u.payload});default:throw new Error}}var Te=function(s){var u,S,y,N=s.validateName,C=s.getCode,x=s.callback,B=s.style,R=B===void 0?{}:B,d=Object(je.l)(),Y=W.a.useForm(),k=Object(ee.a)(Y,1),_=k[0],z=Object(A.useReducer)(Pe,xe),U=Object(ee.a)(z,2),F=U[0],h=U[1],I=Object(A.useState)(!1),P=Object(ee.a)(I,2),p=P[0],G=P[1],T=F.timer;function D(j){return(u=u||Object(V.a)(Z().mark(function v(f){var O,r,e,t,n,o,a,i,c,l,w;return Z().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return O=f.login,r=f.new_password,e=f.code,t=f.new_password_confirmation,g.next=3,x({login:O,new_password_confirmation:t,new_password:r,code:e});case 3:n=g.sent,o=n.message,a=n.status,i=n.show,c=n.start_date,a===0?(i?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",c)):localStorage.removeItem("extension-modal"),w=(l=d.query)===null||l===void 0?void 0:l.from,w&&w.indexOf("login")<0?he.c.replace(w):he.c.replace("/")):_.setFields([{name:"code",errors:[o]}]);case 9:case"end":return g.stop()}},v)}))).apply(this,arguments)}function L(){return(S=S||Object(V.a)(Z().mark(function j(){var v,f,O,r,e,t;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(v=_.getFieldValue("login"),f=0,!(!me.test(v)||v.indexOf(" ")>-1)){o.next=6;break}return _.setFields([{name:"login",errors:["\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"]}]),f=1,o.abrupt("return",f);case 6:return o.next=8,N({login:v,type:2});case 8:return O=o.sent,r=O.status,e=O.message,t=r>0,t?f=2:(_.setFields([{name:"login",errors:[e]}]),f=1),o.abrupt("return",f);case 14:case"end":return o.stop()}},j)}))).apply(this,arguments)}var J=function(){return(y=y||Object(V.a)(Z().mark(function v(){var f,O,r,e,t;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(f=_.getFieldValue("verify"),O=_.getFieldValue("login"),f){o.next=6;break}_.validateFields(["verify"]),o.next=15;break;case 6:return G(!0),o.next=9,C({login:O,type:2,smscode:Object(se.P)(O)});case 9:r=o.sent,e=r.status,t=r.message,e<0&&_.setFields([{name:"code",errors:[t]}]),h({type:ae.setTimer,payload:60}),G(!1);case 15:case"end":return o.stop()}},v)}))).apply(this,arguments)};function M(j,v){var f=_.getFieldValue("new_password_confirmation");if(!v)return Promise.resolve();if(_.setFields([{name:"new_password_confirmation",errors:f&&f!==v?["\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4"]:[]}]),v.indexOf(" ")>-1)return Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C");var O=v.length;return O>=8&&O<=16?Promise.resolve():Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C")}Object(A.useEffect)(function(){T>0&&setTimeout(function(){h({type:ae.setTimer,payload:T-1})},1e3)},[T]);var Q=function(v,f){return f?Promise.resolve():Promise.reject("\u8BF7\u62D6\u52A8\u6ED1\u5757\u9A8C\u8BC1")},$=function(v,f){return f?f.indexOf(" ")>-1?Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):me.test(f)?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):Promise.resolve()};return E.a.createElement(W.a,{layout:"vertical",form:_,style:R,initialValues:{autologin:!0,protool:!0},onFinish:D},E.a.createElement(W.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"},{validator:$}]},E.a.createElement(X.a,{style:oe,size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",onChange:function(){return _.setFieldsValue({verify:0})}})),E.a.createElement(W.a.Item,{name:"verify",rules:[{validator:Q}]},E.a.createElement(_e,{onValidate:L})),E.a.createElement(W.a.Item,{name:"new_password",rules:[{required:!0,message:"\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C"},{validator:M}]},E.a.createElement(X.a.Password,{style:oe,size:"large",placeholder:"\u8F93\u51658\uFF5E16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",visibilityToggle:!1})),E.a.createElement(W.a.Item,{name:"new_password_confirmation",rules:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801"},function(j){var v=j.getFieldValue;return{validator:function(O,r){return!r||v("new_password")===r?Promise.resolve():Promise.reject("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")}}}]},E.a.createElement(X.a.Password,{style:oe,size:"large",placeholder:"\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801",visibilityToggle:!1})),E.a.createElement(W.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},E.a.createElement(X.a,{suffix:E.a.createElement(q.a,{loading:p,type:"link",onClick:J,disabled:T>0}," ",T===0?"\u83B7\u53D6\u9A8C\u8BC1\u7801":"".concat(T,"\u79D2\u53EF\u91CD\u65B0\u83B7\u53D6")),style:{paddingRight:2,height:48},placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",size:"large"})),E.a.createElement(W.a.Item,null,E.a.createElement(q.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:oe}," \u5B8C\u6210 ")),E.a.createElement(W.a.Item,{className:"tc"},E.a.createElement(Re.Link,{to:"/user/login"},"\u8FD4\u56DE\u767B\u5F55")))},ce=m("YrPe");function le(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */le=function(){return u};var s,u={},S=Object.prototype,y=S.hasOwnProperty,N=Object.defineProperty||function(r,e,t){r[e]=t.value},C=typeof Symbol=="function"?Symbol:{},x=C.iterator||"@@iterator",B=C.asyncIterator||"@@asyncIterator",R=C.toStringTag||"@@toStringTag";function d(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{d({},"")}catch(r){d=function(t,n,o){return t[n]=o}}function Y(r,e,t,n){var o=e&&e.prototype instanceof I?e:I,a=Object.create(o.prototype),i=new f(n||[]);return N(a,"_invoke",{value:Q(r,t,i)}),a}function k(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=Y;var _="suspendedStart",z="suspendedYield",U="executing",F="completed",h={};function I(){}function P(){}function p(){}var G={};d(G,x,function(){return this});var T=Object.getPrototypeOf,D=T&&T(T(O([])));D&&D!==S&&y.call(D,x)&&(G=D);var L=p.prototype=I.prototype=Object.create(G);function J(r){["next","throw","return"].forEach(function(e){d(r,e,function(t){return this._invoke(e,t)})})}function M(r,e){function t(o,a,i,c){var l=k(r[o],r,a);if(l.type!=="throw"){var w=l.arg,b=w.value;return b&&typeof b=="object"&&y.call(b,"__await")?e.resolve(b.__await).then(function(g){t("next",g,i,c)},function(g){t("throw",g,i,c)}):e.resolve(b).then(function(g){w.value=g,i(w)},function(g){return t("throw",g,i,c)})}c(l.arg)}var n;N(this,"_invoke",{value:function(a,i){function c(){return new e(function(l,w){t(a,i,l,w)})}return n=n?n.then(c,c):c()}})}function Q(r,e,t){var n=_;return function(o,a){if(n===U)throw new Error("Generator is already running");if(n===F){if(o==="throw")throw a;return{value:s,done:!0}}for(t.method=o,t.arg=a;;){var i=t.delegate;if(i){var c=$(i,t);if(c){if(c===h)continue;return c}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===_)throw n=F,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=U;var l=k(r,e,t);if(l.type==="normal"){if(n=t.done?F:z,l.arg===h)continue;return{value:l.arg,done:t.done}}l.type==="throw"&&(n=F,t.method="throw",t.arg=l.arg)}}}function $(r,e){var t=e.method,n=r.iterator[t];if(n===s)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=s,$(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),h;var o=k(n,r.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=s),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function v(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function f(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(j,this),this.reset(!0)}function O(r){if(r||r===""){var e=r[x];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function o(){for(;++t<r.length;)if(y.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=s,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return P.prototype=p,N(L,"constructor",{value:p,configurable:!0}),N(p,"constructor",{value:P,configurable:!0}),P.displayName=d(p,R,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===P||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,p):(r.__proto__=p,d(r,R,"GeneratorFunction")),r.prototype=Object.create(L),r},u.awrap=function(r){return{__await:r}},J(M.prototype),d(M.prototype,B,function(){return this}),u.AsyncIterator=M,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new M(Y(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(i){return i.done?i.value:a.next()})},J(L),d(L,R,"Generator"),d(L,x,function(){return this}),d(L,"toString",function(){return"[object Generator]"}),u.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function o(){for(;t.length;){var a=t.pop();if(a in e)return o.value=a,o.done=!1,o}return o.done=!0,o}},u.values=O,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(v),!e)for(var t in this)t.charAt(0)==="t"&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(w,b){return i.type="throw",i.arg=e,t.next=w,b&&(t.method="next",t.arg=s),!!b}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var c=y.call(a,"catchLoc"),l=y.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&y.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;v(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=s),h}},u}var Ae=H.default=function(){var s,u={getCode:ce.a,callback:function(y){return(s=s||Object(V.a)(le().mark(function N(C){var x;return le().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,Object(ce.c)(C);case 2:return x=R.sent,R.abrupt("return",x);case 4:case"end":return R.stop()}},N)}))).apply(this,arguments)},validateName:ce.d};return E.a.createElement(Te,u)}},YrPe:function(ie,H,m){"use strict";m.d(H,"d",function(){return A}),m.d(H,"a",function(){return E}),m.d(H,"b",function(){return ne}),m.d(H,"e",function(){return q}),m.d(H,"c",function(){return re});var V=m("ErOA");function A(X){return Object(V.c)("accounts/valid_email_and_phone.json",X)}function E(X){return Object(V.c)("accounts/get_verification_code.json",X)}function ne(X){return Object(V.f)("accounts/register.json",X)}function q(X){return Object(V.f)("weapps/register.json",X)}function re(X){return Object(V.f)("accounts/reset_password.json",X)}},bRQS:function(ie,H,m){"use strict";var V=m("VTBJ"),A=m("q1tI"),E={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"},ne=E,q=m("6VBw"),re=function(W,ee){return A.createElement(q.a,Object(V.a)(Object(V.a)({},W),{},{ref:ee,icon:ne}))};re.displayName="CheckOutlined";var X=H.a=A.forwardRef(re)},tJYU:function(ie,H,m){}}]);