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.
2 lines
65 KiB
2 lines
65 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[30,14],{"+ego":function(K,ae,p){"use strict";p.r(ae);var vt=p("GNNt"),je=p("wEI+"),yt=p("T2oS"),Te=p("W9HT"),Et=p("2qtc"),me=p("kLXV"),Ce=p("PpiC"),W=p("q1tI"),i=p.n(W),Ne=p("+Gva"),ee=p("9kvl"),_t=p("14J3"),Ae=p("BMrR"),wt=p("jCWc"),pe=p("kPKH"),bt=p("miYZ"),ge=p("tsqr"),te=p("k1fw"),Q=p("9og8"),Z=p("tJVT"),Pt=p("Znn+"),Oe=p("ZTPi"),Lt=p("+L6B"),ie=p("2/Rp"),Rt=p("sRBo"),Be=p("kaz8"),Ot=p("5NDa"),H=p("5rEg"),xt=p("y8nQ"),Y=p("Vl3Y"),J=p("jb+D"),Se=p("4i/N"),ue=p("m3rI"),ke=p("Ty5D"),Ut=p("0zpY"),se=p("J66h");function ve(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ve=function(){return u};var c,u={},F=Object.prototype,f=F.hasOwnProperty,x=Object.defineProperty||function(r,e,t){r[e]=t.value},v=typeof Symbol=="function"?Symbol:{},T=v.iterator||"@@iterator",G=v.asyncIterator||"@@asyncIterator",B=v.toStringTag||"@@toStringTag";function m(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{m({},"")}catch(r){m=function(t,n,o){return t[n]=o}}function D(r,e,t,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),s=new O(n||[]);return x(a,"_invoke",{value:$(r,t,s)}),a}function L(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=D;var b="suspendedStart",_="suspendedYield",V="executing",R="completed",h={};function j(){}function C(){}function g(){}var M={};m(M,T,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(y([])));E&&E!==F&&f.call(E,T)&&(M=E);var w=g.prototype=j.prototype=Object.create(M);function I(r){["next","throw","return"].forEach(function(e){m(r,e,function(t){return this._invoke(e,t)})})}function P(r,e){function t(o,a,s,l){var d=L(r[o],r,a);if(d.type!=="throw"){var N=d.arg,U=N.value;return U&&typeof U=="object"&&f.call(U,"__await")?e.resolve(U.__await).then(function(A){t("next",A,s,l)},function(A){t("throw",A,s,l)}):e.resolve(U).then(function(A){N.value=A,s(N)},function(A){return t("throw",A,s,l)})}l(d.arg)}var n;x(this,"_invoke",{value:function(a,s){function l(){return new e(function(d,N){t(a,s,d,N)})}return n=n?n.then(l,l):l()}})}function $(r,e,t){var n=b;return function(o,a){if(n===V)throw new Error("Generator is already running");if(n===R){if(o==="throw")throw a;return{value:c,done:!0}}for(t.method=o,t.arg=a;;){var s=t.delegate;if(s){var l=k(s,t);if(l){if(l===h)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===b)throw n=R,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=V;var d=L(r,e,t);if(d.type==="normal"){if(n=t.done?R:_,d.arg===h)continue;return{value:d.arg,done:t.done}}d.type==="throw"&&(n=R,t.method="throw",t.arg=d.arg)}}}function k(r,e){var t=e.method,n=r.iterator[t];if(n===c)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=c,k(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=L(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=c),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function X(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 z(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(X,this),this.reset(!0)}function y(r){if(r||r===""){var e=r[T];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(f.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=c,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return C.prototype=g,x(w,"constructor",{value:g,configurable:!0}),x(g,"constructor",{value:C,configurable:!0}),C.displayName=m(g,B,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===C||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,m(r,B,"GeneratorFunction")),r.prototype=Object.create(w),r},u.awrap=function(r){return{__await:r}},I(P.prototype),m(P.prototype,G,function(){return this}),u.AsyncIterator=P,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new P(D(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(s){return s.done?s.value:a.next()})},I(w),m(w,B,"Generator"),m(w,T,function(){return this}),m(w,"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=y,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(z),!e)for(var t in this)t.charAt(0)==="t"&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},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(N,U){return s.type="throw",s.arg=e,t.next=N,U&&(t.method="next",t.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var l=f.call(a,"catchLoc"),d=f.call(a,"finallyLoc");if(l&&d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!d)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&&f.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 s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},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),z(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;z(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=c),h}},u}var le={height:48,borderRadius:4},De=function(u){var F=u.dispatch,f=u.setType,x=u.user,v=u.setusername,T=Y.a.useForm(),G=Object(Z.a)(T,1),B=G[0],m=Object(ke.l)(),D=Object(W.useState)(""),L=Object(Z.a)(D,2),b=L[0],_=L[1],V=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,R=Object(W.useState)(0),h=Object(Z.a)(R,2),j=h[0],C=h[1];Object(W.useEffect)(function(){B.resetFields()},[x.showPopLogin]);var g=Object(W.useMemo)(function(){return"/rucaptcha?t="+new Date().getTime()},[j]),M=function(){var E=Object(Q.a)(ve().mark(function w(I){var P,$,k,X;return ve().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return V.test(I.password)||(v(I.login),_("\u7CFB\u7EDF\u68C0\u6D4B\u60A8\u7684\u5BC6\u7801\u5F3A\u5EA6\u8FC7\u4F4E\uFF0C\u8BF7\u53CA\u65F6\u4FEE\u6539")),I.password=se.Base64.encode(I.password),O.next=4,Object(J.b)(I);case 4:if(P=O.sent,!P.status){O.next=9;break}return _(P==null?void 0:P.message),C(j+1),O.abrupt("return");case 9:(P==null?void 0:P.show)?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",P==null?void 0:P.start_date)):localStorage.removeItem("extension-modal"),console.log(ee.c,"history"),m.pathname==="/user/login"||m.pathname==="/login"?(X=(($=m.query)===null||$===void 0?void 0:$.from)||((k=m.query)===null||k===void 0?void 0:k.back_url),X?window.location.href=decodeURIComponent(X):ee.c.replace("/")):window.location.reload(),B.resetFields();case 13:case"end":return O.stop()}},w)}));return function(I){return E.apply(this,arguments)}}(),S=function(){F({type:"user/showPopLogin",payload:{showPopLogin:!1}})};return i.a.createElement(Y.a,{layout:"vertical",form:B,initialValues:{autologin:!0,login:x.actionTabs.phone},onFinish:M,onValuesChange:function(){return _("")}},!!b&&i.a.createElement("div",{className:"res-error-values"},i.a.createElement("span",null,b),i.a.createElement(Se.a,{onClick:function(){return _("")}})),i.a.createElement(Y.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u3001\u624B\u673A\u53F7\u6216\u90AE\u7BB1"}]},i.a.createElement(H.a,{style:le,size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7/\u8D26\u53F7",onBlur:function(){F({type:"user/setActionTabs",payload:{phone:B.getFieldValue("login")}})}})),i.a.createElement(Y.a.Item,{name:"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"}]},i.a.createElement(H.a.Password,{style:le,size:"large",placeholder:"\u5BC6\u7801"})),i.a.createElement(Y.a.Item,null,i.a.createElement("div",{className:"flex-container",style:{justifyContent:"space-between"}},i.a.createElement(Y.a.Item,{name:"autologin",noStyle:!0,valuePropName:"checked"},i.a.createElement(Be.a,null,"\u4E0B\u6B21\u81EA\u52A8\u767B\u5F55")),i.a.createElement("div",null))),i.a.createElement(Y.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement(H.a,{style:le,size:"large",placeholder:"\u9A8C\u8BC1\u7801"}),i.a.createElement("img",{src:(ue.a===null||ue.a===void 0?void 0:ue.a.API_SERVER)+g,style:{height:"32px",marginLeft:"10px"},onClick:function(){C(j+1)}}))),i.a.createElement(Y.a.Item,null,i.a.createElement(ie.a,{size:"large",type:"primary",htmlType:"submit",block:!0,className:"font16",style:le},"\u767B\u5F55")),i.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:20}},"\u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",i.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300A\u670D\u52A1\u534F\u8BAE\u6761\u6B3E\u300B")))},Ie=Object(ee.a)(function(c){var u=c.user,F=c.loading,f=c.globalSetting;return{user:u,globalSetting:f,loading:F.models.index}})(De),Ft=p("5Dmo"),ce=p("3S7+"),q=p("1vsH");function oe(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */oe=function(){return u};var c,u={},F=Object.prototype,f=F.hasOwnProperty,x=Object.defineProperty||function(r,e,t){r[e]=t.value},v=typeof Symbol=="function"?Symbol:{},T=v.iterator||"@@iterator",G=v.asyncIterator||"@@asyncIterator",B=v.toStringTag||"@@toStringTag";function m(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{m({},"")}catch(r){m=function(t,n,o){return t[n]=o}}function D(r,e,t,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),s=new O(n||[]);return x(a,"_invoke",{value:$(r,t,s)}),a}function L(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=D;var b="suspendedStart",_="suspendedYield",V="executing",R="completed",h={};function j(){}function C(){}function g(){}var M={};m(M,T,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(y([])));E&&E!==F&&f.call(E,T)&&(M=E);var w=g.prototype=j.prototype=Object.create(M);function I(r){["next","throw","return"].forEach(function(e){m(r,e,function(t){return this._invoke(e,t)})})}function P(r,e){function t(o,a,s,l){var d=L(r[o],r,a);if(d.type!=="throw"){var N=d.arg,U=N.value;return U&&typeof U=="object"&&f.call(U,"__await")?e.resolve(U.__await).then(function(A){t("next",A,s,l)},function(A){t("throw",A,s,l)}):e.resolve(U).then(function(A){N.value=A,s(N)},function(A){return t("throw",A,s,l)})}l(d.arg)}var n;x(this,"_invoke",{value:function(a,s){function l(){return new e(function(d,N){t(a,s,d,N)})}return n=n?n.then(l,l):l()}})}function $(r,e,t){var n=b;return function(o,a){if(n===V)throw new Error("Generator is already running");if(n===R){if(o==="throw")throw a;return{value:c,done:!0}}for(t.method=o,t.arg=a;;){var s=t.delegate;if(s){var l=k(s,t);if(l){if(l===h)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===b)throw n=R,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=V;var d=L(r,e,t);if(d.type==="normal"){if(n=t.done?R:_,d.arg===h)continue;return{value:d.arg,done:t.done}}d.type==="throw"&&(n=R,t.method="throw",t.arg=d.arg)}}}function k(r,e){var t=e.method,n=r.iterator[t];if(n===c)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=c,k(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=L(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=c),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function X(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 z(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(X,this),this.reset(!0)}function y(r){if(r||r===""){var e=r[T];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(f.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=c,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return C.prototype=g,x(w,"constructor",{value:g,configurable:!0}),x(g,"constructor",{value:C,configurable:!0}),C.displayName=m(g,B,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===C||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,m(r,B,"GeneratorFunction")),r.prototype=Object.create(w),r},u.awrap=function(r){return{__await:r}},I(P.prototype),m(P.prototype,G,function(){return this}),u.AsyncIterator=P,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new P(D(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(s){return s.done?s.value:a.next()})},I(w),m(w,B,"Generator"),m(w,T,function(){return this}),m(w,"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=y,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(z),!e)for(var t in this)t.charAt(0)==="t"&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},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(N,U){return s.type="throw",s.arg=e,t.next=N,U&&(t.method="next",t.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var l=f.call(a,"catchLoc"),d=f.call(a,"finallyLoc");if(l&&d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!d)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&&f.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 s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},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),z(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;z(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=c),h}},u}var ye={height:48},xe=/(\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,Me=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,Ge={timer:0},de=function(c){return c[c.setTimer=0]="setTimer",c}(de||{});function Ve(c,u){switch(u.type){case de.setTimer:return Object(te.a)(Object(te.a)({},c),{},{timer:u.payload});default:throw new Error}}var Xe=function(u){var F,f=u.validateName,x=u.getCode,v=u.register,T=u.style,G=T===void 0?{}:T,B=u.buttonText,m=B===void 0?"\u6CE8\u518C":B,D=u.globalSetting,L=Y.a.useForm(),b=Object(Z.a)(L,1),_=b[0],V=Object(W.useReducer)(Ve,Ge),R=Object(Z.a)(V,2),h=R[0],j=R[1],C=Object(W.useState)(!1),g=Object(Z.a)(C,2),M=g[0],S=g[1],E=h.timer;function w(y){return I.apply(this,arguments)}function I(){return I=Object(Q.a)(oe().mark(function y(r){var e,t,n,o,a,s;return oe().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return e=r.login,t=r.password,n=r.code,d.next=3,v({login:e,password:t,code:n});case 3:o=d.sent,a=o.message,s=o.status;debugger;if(!(s<0)){d.next=10;break}return _.setFields([{name:"code",errors:[a]}]),d.abrupt("return");case 10:window.location.reload();case 11:case"end":return d.stop()}},y)})),I.apply(this,arguments)}function P(){return $.apply(this,arguments)}function $(){return $=Object(Q.a)(oe().mark(function y(){var r,e,t,n,o,a;return oe().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(r=_.getFieldValue("login"),e=0,!(!xe.test(r)||r.indexOf(" ")>-1)){l.next=6;break}return _.setFields([{name:"login",errors:["\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"]}]),e=1,l.abrupt("return",e);case 6:return l.next=8,f({login:r,type:1});case 8:return t=l.sent,n=t.status,o=t.message,a=n>0,a?e=2:(_.setFields([{name:"login",errors:[o]}]),e=1),l.abrupt("return",e);case 14:case"end":return l.stop()}},y)})),$.apply(this,arguments)}var k=function(){var y=Object(Q.a)(oe().mark(function r(){var e,t,n,o,a;return oe().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(e=_.getFieldValue("verify"),t=_.getFieldValue("login"),t){l.next=6;break}_.validateFields(["login"]),l.next=15;break;case 6:return S(!0),l.next=9,x({login:t,type:1,smscode:Object(q.L)(t)});case 9:n=l.sent,o=n.status,a=n.message,o<0&&_.setFields([{name:"code",errors:[a]}]),j({type:de.setTimer,payload:60}),S(!1);case 15:case"end":return l.stop()}},r)}));return function(){return y.apply(this,arguments)}}();function X(y,r){if(!r)return Promise.resolve();if(!Me.test(r))return Promise.reject("\u8BF7\u8F93\u51658~16\u4F4D\u5B57\u7B26\uFF0C\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u7279\u6B8A\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD");if(r.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 e=r.length;return e>=8&&e<=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")}var z=function(r,e){return e?Promise.resolve():Promise.reject("\u8BF7\u62D6\u52A8\u6ED1\u5757\u9A8C\u8BC1")};Object(W.useEffect)(function(){E>0&&setTimeout(function(){j({type:de.setTimer,payload:E-1})},1e3)},[E]);var O=function(r,e){return e?e.indexOf(" ")>-1?Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):xe.test(e)?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):Promise.resolve()};return i.a.createElement(Y.a,{layout:"vertical",form:_,style:G,initialValues:{autologin:!0,protool:!1},onFinish:w},i.a.createElement(Y.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"},{validator:O}]},i.a.createElement(H.a,{style:ye,autoComplete:"new-login",size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",onBlur:function(){return P},onChange:function(){return _.setFieldsValue({verify:0})}})),!(D==null||((F=D.setting)===null||F===void 0)?void 0:F.is_local)&&i.a.createElement(Y.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},i.a.createElement(H.a,{suffix:i.a.createElement(ie.a,{loading:M,type:"link",onClick:k,disabled:E>0}," ",E===0?"\u83B7\u53D6\u9A8C\u8BC1\u7801":"".concat(E,"\u79D2\u53EF\u91CD\u65B0\u83B7\u53D6")),style:{paddingRight:2,height:48},placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",size:"large"})),i.a.createElement(ce.a,{title:i.a.createElement("div",null,i.a.createElement("span",null,"\u957F\u5EA6\u4E3A8-16\u4F4D\u5B57\u7B26"),i.a.createElement("br",null),i.a.createElement("span",null,"\u5B57\u6BCD/\u6570\u5B57\u4EE5\u53CA\u6807\u70B9\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD"),i.a.createElement("br",null),i.a.createElement("span",null,"\u4E0D\u5141\u8BB8\u6709\u7A7A\u683C\u3001\u4E2D\u6587")),placement:"topRight"},i.a.createElement(Y.a.Item,{name:"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:X}]},i.a.createElement(H.a.Password,{autoComplete:"new-password",style:ye,size:"large",placeholder:"\u8BF7\u8F93\u51658~16\u4F4D\u5B57\u7B26\uFF0C\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u7279\u6B8A\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD"}))),i.a.createElement(Y.a.Item,null,i.a.createElement(ie.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:ye,className:"font16"}," ",m," ")),i.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:35}},"\u6CE8\u518C\u5E76\u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",i.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300A\u670D\u52A1\u534F\u8BAE\u6761\u6B3E\u300B")))},$e=Object(ee.a)(function(c){var u=c.globalSetting;return{globalSetting:u}})(Xe);function re(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */re=function(){return u};var c,u={},F=Object.prototype,f=F.hasOwnProperty,x=Object.defineProperty||function(r,e,t){r[e]=t.value},v=typeof Symbol=="function"?Symbol:{},T=v.iterator||"@@iterator",G=v.asyncIterator||"@@asyncIterator",B=v.toStringTag||"@@toStringTag";function m(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{m({},"")}catch(r){m=function(t,n,o){return t[n]=o}}function D(r,e,t,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),s=new O(n||[]);return x(a,"_invoke",{value:$(r,t,s)}),a}function L(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=D;var b="suspendedStart",_="suspendedYield",V="executing",R="completed",h={};function j(){}function C(){}function g(){}var M={};m(M,T,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(y([])));E&&E!==F&&f.call(E,T)&&(M=E);var w=g.prototype=j.prototype=Object.create(M);function I(r){["next","throw","return"].forEach(function(e){m(r,e,function(t){return this._invoke(e,t)})})}function P(r,e){function t(o,a,s,l){var d=L(r[o],r,a);if(d.type!=="throw"){var N=d.arg,U=N.value;return U&&typeof U=="object"&&f.call(U,"__await")?e.resolve(U.__await).then(function(A){t("next",A,s,l)},function(A){t("throw",A,s,l)}):e.resolve(U).then(function(A){N.value=A,s(N)},function(A){return t("throw",A,s,l)})}l(d.arg)}var n;x(this,"_invoke",{value:function(a,s){function l(){return new e(function(d,N){t(a,s,d,N)})}return n=n?n.then(l,l):l()}})}function $(r,e,t){var n=b;return function(o,a){if(n===V)throw new Error("Generator is already running");if(n===R){if(o==="throw")throw a;return{value:c,done:!0}}for(t.method=o,t.arg=a;;){var s=t.delegate;if(s){var l=k(s,t);if(l){if(l===h)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===b)throw n=R,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=V;var d=L(r,e,t);if(d.type==="normal"){if(n=t.done?R:_,d.arg===h)continue;return{value:d.arg,done:t.done}}d.type==="throw"&&(n=R,t.method="throw",t.arg=d.arg)}}}function k(r,e){var t=e.method,n=r.iterator[t];if(n===c)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=c,k(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=L(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=c),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function X(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 z(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(X,this),this.reset(!0)}function y(r){if(r||r===""){var e=r[T];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(f.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=c,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return C.prototype=g,x(w,"constructor",{value:g,configurable:!0}),x(g,"constructor",{value:C,configurable:!0}),C.displayName=m(g,B,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===C||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,m(r,B,"GeneratorFunction")),r.prototype=Object.create(w),r},u.awrap=function(r){return{__await:r}},I(P.prototype),m(P.prototype,G,function(){return this}),u.AsyncIterator=P,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new P(D(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(s){return s.done?s.value:a.next()})},I(w),m(w,B,"Generator"),m(w,T,function(){return this}),m(w,"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=y,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(z),!e)for(var t in this)t.charAt(0)==="t"&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},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(N,U){return s.type="throw",s.arg=e,t.next=N,U&&(t.method="next",t.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var l=f.call(a,"catchLoc"),d=f.call(a,"finallyLoc");if(l&&d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!d)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&&f.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 s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},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),z(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;z(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=c),h}},u}var Ee={height:48},Ue=/(\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,ze=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,Ye={timer:0},fe=function(c){return c[c.setTimer=0]="setTimer",c}(fe||{});function We(c,u){switch(u.type){case fe.setTimer:return Object(te.a)(Object(te.a)({},c),{},{timer:u.payload});default:throw new Error}}var Ze=function(u){var F,f=u.validateName,x=u.getCode,v=u.register,T=u.style,G=T===void 0?{}:T,B=u.buttonText,m=B===void 0?"\u6CE8\u518C":B,D=u.globalSetting,L=Y.a.useForm(),b=Object(Z.a)(L,1),_=b[0],V=Object(W.useReducer)(We,Ye),R=Object(Z.a)(V,2),h=R[0],j=R[1],C=Object(W.useState)(!1),g=Object(Z.a)(C,2),M=g[0],S=g[1],E=h.timer;function w(y){return I.apply(this,arguments)}function I(){return I=Object(Q.a)(re().mark(function y(r){var e,t,n,o,a,s;return re().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return e=r.login,t=r.new_password,n=r.code,r.new_password=se.Base64.encode(r.new_password),d.next=4,v({login:e,new_password:t,code:n});case 4:if(o=d.sent,a=o.message,s=o.status,!(s<0)){d.next=10;break}return _.setFields([{name:"code",errors:[a]}]),d.abrupt("return");case 10:location.reload();case 11:case"end":return d.stop()}},y)})),I.apply(this,arguments)}function P(){return $.apply(this,arguments)}function $(){return $=Object(Q.a)(re().mark(function y(){var r,e,t,n,o,a;return re().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(r=_.getFieldValue("login"),e=0,!(!Ue.test(r)||r.indexOf(" ")>-1)){l.next=6;break}return _.setFields([{name:"login",errors:["\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"]}]),e=1,l.abrupt("return",e);case 6:return l.next=8,f({login:r,type:2});case 8:return t=l.sent,n=t.status,o=t.message,a=n>0,a?e=2:(_.setFields([{name:"login",errors:[o]}]),e=1),l.abrupt("return",e);case 14:case"end":return l.stop()}},y)})),$.apply(this,arguments)}var k=function(){var y=Object(Q.a)(re().mark(function r(){var e,t,n,o,a;return re().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return e=_.getFieldValue("verify"),t=_.getFieldValue("login"),l.next=4,_.validateFields(["login"]);case 4:if(t){l.next=8;break}_.validateFields(["login"]),l.next=17;break;case 8:return S(!0),l.next=11,x({login:t,type:2,smscode:Object(q.L)(t)});case 11:n=l.sent,o=n.status,a=n.message,o<0&&_.setFields([{name:"code",errors:[a]}]),j({type:fe.setTimer,payload:60}),S(!1);case 17:case"end":return l.stop()}},r)}));return function(){return y.apply(this,arguments)}}();function X(y,r){if(!r)return Promise.resolve();if(!ze.test(r))return Promise.reject("\u8BF7\u8F93\u51658~16\u4F4D\u5B57\u7B26\uFF0C\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u7279\u6B8A\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD");if(r.indexOf(" ")>-1)return Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C");var e=r.length;return e>=8&&e<=16?Promise.resolve():Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C")}var z=function(r,e){return e?Promise.resolve():Promise.reject("\u8BF7\u62D6\u52A8\u6ED1\u5757\u9A8C\u8BC1")};Object(W.useEffect)(function(){E>0&&setTimeout(function(){j({type:fe.setTimer,payload:E-1})},1e3)},[E]);var O=function(){var y=Object(Q.a)(re().mark(function r(e,t){var n,o,a,s;return re().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(t){d.next=2;break}return d.abrupt("return",Promise.resolve());case 2:if(!(t.indexOf(" ")>-1)){d.next=4;break}return d.abrupt("return",Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"));case 4:if(!Ue.test(t)){d.next=18;break}return d.next=7,f({login:t,type:2});case 7:if(n=d.sent,o=n.status,a=n.message,s=o>0,!s){d.next=15;break}return d.abrupt("return",Promise.resolve());case 15:return d.abrupt("return",Promise.reject(a));case 16:d.next=19;break;case 18:return d.abrupt("return",Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"));case 19:case"end":return d.stop()}},r)}));return function(e,t){return y.apply(this,arguments)}}();return i.a.createElement(Y.a,{layout:"vertical",form:_,style:G,initialValues:{autologin:!0,protool:!1},onFinish:w},i.a.createElement(Y.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"},{validator:O}]},i.a.createElement(H.a,{style:Ee,autoComplete:"new-login",size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",onChange:function(){return _.setFieldsValue({verify:0})}})),i.a.createElement(ce.a,{title:i.a.createElement("div",null,i.a.createElement("span",null,"\u957F\u5EA6\u4E3A8-16\u4F4D\u5B57\u7B26"),i.a.createElement("br",null),i.a.createElement("span",null,"\u5B57\u6BCD/\u6570\u5B57\u4EE5\u53CA\u6807\u70B9\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD"),i.a.createElement("br",null),i.a.createElement("span",null,"\u4E0D\u5141\u8BB8\u6709\u7A7A\u683C\u3001\u4E2D\u6587")),placement:"topRight"},i.a.createElement(Y.a.Item,{name:"new_password",rules:[{required:!0,message:"\u8BF7\u8F93\u51658-16\u4F4D\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C"},{validator:X}]},i.a.createElement(H.a.Password,{autoComplete:"new-password",style:Ee,size:"large",placeholder:"\u8F93\u51658\uFF5E16\u4F4D\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199"}))),!(D==null||((F=D.setting)===null||F===void 0)?void 0:F.is_local)&&i.a.createElement(Y.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},i.a.createElement(H.a,{suffix:i.a.createElement(ie.a,{loading:M,type:"link",onClick:k,disabled:E>0}," ",E===0?"\u83B7\u53D6\u9A8C\u8BC1\u7801":"".concat(E,"\u79D2\u53EF\u91CD\u65B0\u83B7\u53D6")),style:{paddingRight:2,height:48},placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",size:"large"})),i.a.createElement(Y.a.Item,null,i.a.createElement(ie.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:Ee,className:"font16"}," ",m," ")),i.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:20}},"\u4FEE\u6539\u5E76\u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",i.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300A\u670D\u52A1\u534F\u8BAE\u6761\u6B3E\u300B")))},Qe=Object(ee.a)(function(c){var u=c.globalSetting;return{globalSetting:u}})(Ze),Je=p("h0ge"),He=p.n(Je),Ke=p("/nL+"),qe=p.n(Ke),et=p("IxGP"),_e=p.n(et),we=window.location.host,be=ue.a.QQLoginCB,tt=function(c){var u=c.onWechatLogin,F=c.setType,f=c.loginType;function x(){Object(q.E)()?window.location.href="https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=".concat(be,"%2fotherloginqq&state=null,").concat(we,"&response_type=code"):Object(q.I)("https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=".concat(be,"%2fotherloginqq&state=null,").concat(we,"&response_type=code"))}return i.a.createElement(i.a.Fragment,null,(f===1||f===2)&&i.a.createElement("div",{style:{marginTop:f===4?20:92,marginBottom:60},className:"font16 tc"},"\u6CA1\u6709\u8D26\u53F7\uFF1F",i.a.createElement("span",{onClick:function(){return F(3)},className:"c-blue current"},"\u514D\u8D39\u6CE8\u518C")),(f===3||f===4||f===5)&&i.a.createElement("div",{style:{marginTop:92,marginBottom:60},className:"font16 tc"},"\u5DF2\u6709\u8D26\u53F7\uFF1F",i.a.createElement("span",{onClick:function(){return F(1)},className:"c-blue current"},"\u7ACB\u5373\u767B\u5F55")),i.a.createElement("p",{className:_e.a.driver},i.a.createElement("span",{style:{color:"#444444"}},"\u5FEB\u901F\u767B\u5F55")),i.a.createElement("div",{className:_e.a["other-login"]},i.a.createElement("a",{title:"\u5FAE\u4FE1\u767B\u5F55",onClick:u},i.a.createElement("img",{src:He.a,alt:"\u5FAE\u4FE1",width:66})),i.a.createElement("a",{title:"qq\u767B\u5F55",onClick:x},i.a.createElement("img",{src:qe.a,alt:"QQ",width:66}))))};function rt(c){var u=c.onBack,F=c.setType;return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{overflow:"hidden",width:300,height:300,margin:"20px auto 0 auto"}},i.a.createElement("iframe",{className:_e.a["wechat-qrcode"],frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-top-navigation",scrolling:"no",src:"https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=".concat(be,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,").concat(we,"#wechat_redirect")})),i.a.createElement("div",{style:{marginTop:17,marginBottom:10},className:"font16 bold tc c-blue current"},i.a.createElement("span",{onClick:function(){return F(1)},style:{borderBottom:"2px solid #1890FF"}},"\u8FD4\u56DE\u8D26\u53F7\u767B\u5F55")),i.a.createElement("div",{className:"tc",style:{paddingTop:14,paddingBottom:40}},"\u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",i.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300A\u670D\u52A1\u534F\u8BAE\u6761\u6B3E\u300B")))}function Pe(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pe=function(){return u};var c,u={},F=Object.prototype,f=F.hasOwnProperty,x=Object.defineProperty||function(r,e,t){r[e]=t.value},v=typeof Symbol=="function"?Symbol:{},T=v.iterator||"@@iterator",G=v.asyncIterator||"@@asyncIterator",B=v.toStringTag||"@@toStringTag";function m(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{m({},"")}catch(r){m=function(t,n,o){return t[n]=o}}function D(r,e,t,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),s=new O(n||[]);return x(a,"_invoke",{value:$(r,t,s)}),a}function L(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=D;var b="suspendedStart",_="suspendedYield",V="executing",R="completed",h={};function j(){}function C(){}function g(){}var M={};m(M,T,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(y([])));E&&E!==F&&f.call(E,T)&&(M=E);var w=g.prototype=j.prototype=Object.create(M);function I(r){["next","throw","return"].forEach(function(e){m(r,e,function(t){return this._invoke(e,t)})})}function P(r,e){function t(o,a,s,l){var d=L(r[o],r,a);if(d.type!=="throw"){var N=d.arg,U=N.value;return U&&typeof U=="object"&&f.call(U,"__await")?e.resolve(U.__await).then(function(A){t("next",A,s,l)},function(A){t("throw",A,s,l)}):e.resolve(U).then(function(A){N.value=A,s(N)},function(A){return t("throw",A,s,l)})}l(d.arg)}var n;x(this,"_invoke",{value:function(a,s){function l(){return new e(function(d,N){t(a,s,d,N)})}return n=n?n.then(l,l):l()}})}function $(r,e,t){var n=b;return function(o,a){if(n===V)throw new Error("Generator is already running");if(n===R){if(o==="throw")throw a;return{value:c,done:!0}}for(t.method=o,t.arg=a;;){var s=t.delegate;if(s){var l=k(s,t);if(l){if(l===h)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===b)throw n=R,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=V;var d=L(r,e,t);if(d.type==="normal"){if(n=t.done?R:_,d.arg===h)continue;return{value:d.arg,done:t.done}}d.type==="throw"&&(n=R,t.method="throw",t.arg=d.arg)}}}function k(r,e){var t=e.method,n=r.iterator[t];if(n===c)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=c,k(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=L(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=c),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function X(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 z(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(X,this),this.reset(!0)}function y(r){if(r||r===""){var e=r[T];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(f.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=c,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return C.prototype=g,x(w,"constructor",{value:g,configurable:!0}),x(g,"constructor",{value:C,configurable:!0}),C.displayName=m(g,B,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===C||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,m(r,B,"GeneratorFunction")),r.prototype=Object.create(w),r},u.awrap=function(r){return{__await:r}},I(P.prototype),m(P.prototype,G,function(){return this}),u.AsyncIterator=P,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new P(D(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(s){return s.done?s.value:a.next()})},I(w),m(w,B,"Generator"),m(w,T,function(){return this}),m(w,"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=y,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(z),!e)for(var t in this)t.charAt(0)==="t"&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},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(N,U){return s.type="throw",s.arg=e,t.next=N,U&&(t.method="next",t.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var l=f.call(a,"catchLoc"),d=f.call(a,"finallyLoc");if(l&&d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!d)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&&f.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 s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},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),z(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;z(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=c),h}},u}var he={height:48},jt=/(\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,nt=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,at={timer:0},Le=function(c){return c[c.setTimer=0]="setTimer",c}(Le||{});function ot(c,u){switch(u.type){case Le.setTimer:return Object(te.a)(Object(te.a)({},c),{},{timer:u.payload});default:throw new Error}}var it=function(u){var F=u.validateName,f=u.getCode,x=u.register,v=u.style,T=v===void 0?{}:v,G=u.buttonText,B=G===void 0?"\u6CE8\u518C":G,m=u.globalSetting,D=Y.a.useForm(),L=Object(Z.a)(D,1),b=L[0],_=Object(W.useReducer)(ot,at),V=Object(Z.a)(_,2),R=V[0],h=V[1],j=Object(W.useState)(!1),C=Object(Z.a)(j,2),g=C[0],M=C[1],S=R.timer;function E(P){return w.apply(this,arguments)}function w(){return w=Object(Q.a)(Pe().mark(function P($){var k,X,z,O,y;return Pe().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=$.old_password,X=$.newPassword,e.next=3,x({old_password:k,newPassword:X});case 3:if(z=e.sent,O=z.message,y=z.status,!(y<0)){e.next=9;break}return b.setFields([{name:"code",errors:[O]}]),e.abrupt("return");case 9:case"end":return e.stop()}},P)})),w.apply(this,arguments)}var I=function($,k,X){k?k.indexOf(" ")>-1?X("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C"):k.length<8||k.length>16?X("\u8BF7\u8F93\u51658-16\u4F4D\u5B57\u7B26\u7684\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\uFF01"):nt.test(k)?X():X("\u8BF7\u8F93\u51658~16\u4F4D\u5B57\u7B26\uFF0C\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u7279\u6B8A\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD"):X("\u8BF7\u8F93\u51658-16\u4F4D\u5B57\u7B26\u7684\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\uFF01")};return Object(W.useEffect)(function(){S>0&&setTimeout(function(){h({type:Le.setTimer,payload:S-1})},1e3)},[S]),i.a.createElement(Y.a,{layout:"vertical",form:b,style:T,initialValues:{autologin:!0,protool:!1},onFinish:E},i.a.createElement(Y.a.Item,{name:"old_password",rules:[{required:!0,message:"\u8BF7\u8F93\u51658\uFF5E16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199"}]},i.a.createElement(H.a,{style:he,autoComplete:"new-login",size:"large",type:"password",placeholder:"\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801",onChange:function(){return b.setFieldsValue({verify:0})}})),i.a.createElement(ce.a,{title:i.a.createElement("div",null,i.a.createElement("span",null,"\u957F\u5EA6\u4E3A8-16\u4F4D\u5B57\u7B26"),i.a.createElement("br",null),i.a.createElement("span",null,"\u5B57\u6BCD/\u6570\u5B57\u4EE5\u53CA\u6807\u70B9\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD"),i.a.createElement("br",null),i.a.createElement("span",null,"\u4E0D\u5141\u8BB8\u6709\u7A7A\u683C\u3001\u4E2D\u6587")),placement:"topRight"},i.a.createElement(Y.a.Item,{name:"newPassword",rules:[{required:!0,message:"\u8BF7\u8F93\u51658-16\u4F4D\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C"},{validator:I}]},i.a.createElement(H.a.Password,{autoComplete:"new-password",style:he,size:"large",placeholder:"\u8F93\u51658\uFF5E16\u4F4D\u65B0\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199"}))),i.a.createElement(ce.a,{title:i.a.createElement("div",null,i.a.createElement("span",null,"\u957F\u5EA6\u4E3A8-16\u4F4D\u5B57\u7B26"),i.a.createElement("br",null),i.a.createElement("span",null,"\u5B57\u6BCD/\u6570\u5B57\u4EE5\u53CA\u6807\u70B9\u7B26\u53F7\u81F3\u5C11\u5305\u542B2\u79CD"),i.a.createElement("br",null),i.a.createElement("span",null,"\u4E0D\u5141\u8BB8\u6709\u7A7A\u683C\u3001\u4E2D\u6587")),placement:"topRight"},i.a.createElement(Y.a.Item,{name:"againPassword",rules:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801"},{validator:function($,k,X){k!=b.getFieldsValue().newPassword?X("\u4E24\u6B21\u8F93\u5165\u7684\u65B0\u5BC6\u7801\u5FC5\u987B\u4E00\u81F4\uFF01"):X()}}]},i.a.createElement(H.a.Password,{autoComplete:"new-password",style:he,size:"large",placeholder:"\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801"}))),i.a.createElement(Y.a.Item,null,i.a.createElement(ie.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:he,className:"font16"}," ",B," ")),i.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:20}},"\u4FEE\u6539\u5E76\u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",i.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300A\u670D\u52A1\u534F\u8BAE\u6761\u6B3E\u300B")))},ut=Object(ee.a)(function(c){var u=c.globalSetting;return{globalSetting:u}})(it),st=p("4R62"),Re=p.n(st);function ne(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ne=function(){return u};var c,u={},F=Object.prototype,f=F.hasOwnProperty,x=Object.defineProperty||function(r,e,t){r[e]=t.value},v=typeof Symbol=="function"?Symbol:{},T=v.iterator||"@@iterator",G=v.asyncIterator||"@@asyncIterator",B=v.toStringTag||"@@toStringTag";function m(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{m({},"")}catch(r){m=function(t,n,o){return t[n]=o}}function D(r,e,t,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),s=new O(n||[]);return x(a,"_invoke",{value:$(r,t,s)}),a}function L(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=D;var b="suspendedStart",_="suspendedYield",V="executing",R="completed",h={};function j(){}function C(){}function g(){}var M={};m(M,T,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(y([])));E&&E!==F&&f.call(E,T)&&(M=E);var w=g.prototype=j.prototype=Object.create(M);function I(r){["next","throw","return"].forEach(function(e){m(r,e,function(t){return this._invoke(e,t)})})}function P(r,e){function t(o,a,s,l){var d=L(r[o],r,a);if(d.type!=="throw"){var N=d.arg,U=N.value;return U&&typeof U=="object"&&f.call(U,"__await")?e.resolve(U.__await).then(function(A){t("next",A,s,l)},function(A){t("throw",A,s,l)}):e.resolve(U).then(function(A){N.value=A,s(N)},function(A){return t("throw",A,s,l)})}l(d.arg)}var n;x(this,"_invoke",{value:function(a,s){function l(){return new e(function(d,N){t(a,s,d,N)})}return n=n?n.then(l,l):l()}})}function $(r,e,t){var n=b;return function(o,a){if(n===V)throw new Error("Generator is already running");if(n===R){if(o==="throw")throw a;return{value:c,done:!0}}for(t.method=o,t.arg=a;;){var s=t.delegate;if(s){var l=k(s,t);if(l){if(l===h)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===b)throw n=R,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=V;var d=L(r,e,t);if(d.type==="normal"){if(n=t.done?R:_,d.arg===h)continue;return{value:d.arg,done:t.done}}d.type==="throw"&&(n=R,t.method="throw",t.arg=d.arg)}}}function k(r,e){var t=e.method,n=r.iterator[t];if(n===c)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=c,k(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=L(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=c),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function X(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 z(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(X,this),this.reset(!0)}function y(r){if(r||r===""){var e=r[T];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(f.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=c,o.done=!0,o};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return C.prototype=g,x(w,"constructor",{value:g,configurable:!0}),x(g,"constructor",{value:C,configurable:!0}),C.displayName=m(g,B,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===C||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,m(r,B,"GeneratorFunction")),r.prototype=Object.create(w),r},u.awrap=function(r){return{__await:r}},I(P.prototype),m(P.prototype,G,function(){return this}),u.AsyncIterator=P,u.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new P(D(r,e,t,n),o);return u.isGeneratorFunction(e)?a:a.next().then(function(s){return s.done?s.value:a.next()})},I(w),m(w,B,"Generator"),m(w,T,function(){return this}),m(w,"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=y,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(z),!e)for(var t in this)t.charAt(0)==="t"&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},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(N,U){return s.type="throw",s.arg=e,t.next=N,U&&(t.method="next",t.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var l=f.call(a,"catchLoc"),d=f.call(a,"finallyLoc");if(l&&d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!d)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&&f.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 s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},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),z(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;z(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=c),h}},u}var lt=Oe.a.TabPane,ct=function(c){var u=c.dispatch,F=c.is_main_site,f=c.is_local,x=c.style,v=x===void 0?{}:x,T=Object(W.useState)(!1),G=Object(Z.a)(T,2),B=G[0],m=G[1],D=Object(W.useState)("1"),L=Object(Z.a)(D,2),b=L[0],_=L[1],V=Object(W.useState)(1),R=Object(Z.a)(V,2),h=R[0],j=R[1],C=Object(W.useState)(),g=Object(Z.a)(C,2),M=g[0],S=g[1];function E(){j(1),m(!1)}function w(){j(2),m(!0)}function I(O){console.log(O),_(O)}var P={buttonText:"\u767B \u5F55",validateName:J.G,getCode:J.w,register:function(){var O=Object(Q.a)(ne().mark(function r(e){var t;return ne().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(J.a)({phone:e.login,code:e.code});case 2:if(t=o.sent,!(t.status===0)){o.next=6;break}return(t==null?void 0:t.show)?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",t==null?void 0:t.start_date)):localStorage.removeItem("extension-modal"),o.abrupt("return","/");case 6:return o.abrupt("return",t);case 7:case"end":return o.stop()}},r)}));function y(r){return O.apply(this,arguments)}return y}()},$={buttonText:"\u6CE8\u518C\u5E76\u767B\u5F55",validateName:J.G,getCode:J.w,register:function(){var O=Object(Q.a)(ne().mark(function r(e){var t,n;return ne().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(J.z)(Object(te.a)({},e));case 2:if(t=a.sent,!(t.status===0)){a.next=9;break}return n=localStorage.getItem("addinfo"),n==="1"?localStorage.setItem("addinfo","2"):localStorage.setItem("registeruser","1"),localStorage.removeItem("extension-modal"),ge.b.info("\u6CE8\u518C\u5E76\u767B\u9646\u6210\u529F"),a.abrupt("return","/");case 9:return a.abrupt("return",t);case 10:case"end":return a.stop()}},r)}));function y(r){return O.apply(this,arguments)}return y}()},k={buttonText:"\u4FEE\u6539\u5BC6\u7801",validateName:J.G,getCode:J.w,register:function(){var O=Object(Q.a)(ne().mark(function r(e){var t;return ne().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(J.f)(Object(te.a)({login:M},e));case 2:return t=o.sent,ge.b.info("\u4FEE\u6539\u5BC6\u7801\u6210\u529F"),o.abrupt("return",t);case 5:case"end":return o.stop()}},r)}));function y(r){return O.apply(this,arguments)}return y}()},X={buttonText:"\u4FEE\u6539\u5E76\u767B\u5F55",validateName:J.G,getCode:J.w,register:function(){var O=Object(Q.a)(ne().mark(function r(e){var t;return ne().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return e.new_password_confirmation=se.Base64.encode(e.new_password),e.new_password=se.Base64.encode(e.new_password),o.next=4,Object(J.A)(Object(te.a)({},e));case 4:if(t=o.sent,!(t.status===0)){o.next=9;break}return(t==null?void 0:t.show)?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",t==null?void 0:t.start_date)):localStorage.removeItem("extension-modal"),ge.b.info("\u4FEE\u6539\u6210\u529F"),o.abrupt("return","/");case 9:return o.abrupt("return",t);case 10:case"end":return o.stop()}},r)}));function y(r){return O.apply(this,arguments)}return y}()},z=Object(W.useCallback)(function(){switch(h){case 1:return i.a.createElement(Oe.a,{defaultActiveKey:b,onChange:I,className:Re.a.tabs},i.a.createElement(lt,{tab:"\u8D26\u53F7\u767B\u5F55",key:"1"},i.a.createElement("div",{className:"mt20"},b==="1"&&i.a.createElement(Ie,{setusername:S,setType:j}))));case 2:return i.a.createElement(rt,{setType:j,onBack:E});case 3:return i.a.createElement("div",{className:"ml40"},i.a.createElement("h1",{className:"font18 mb20 mt35"},"\u65B0\u7528\u6237\u6CE8\u518C"),i.a.createElement($e,$));case 4:return i.a.createElement("div",{className:"ml40"},i.a.createElement("h1",{className:"font18 mb20 mt35"},"\u627E\u56DE\u5BC6\u7801"),i.a.createElement(Qe,X));case 5:return i.a.createElement("div",{className:"ml40"},i.a.createElement("h1",{className:"font18 mb20 mt35"},"\u4FEE\u6539\u5BC6\u7801"),i.a.createElement(ut,k))}},[h,b]);return i.a.createElement("div",{className:Re.a["login-panel-wrapper2"],style:v},i.a.createElement(Ae.a,null,i.a.createElement(pe.a,{flex:"1"},z()),f&&i.a.createElement(pe.a,{flex:"40px"}),i.a.createElement(pe.a,{flex:"295px",className:Re.a["login-panel-right-wrp"]},!f&&i.a.createElement(tt,{loginType:h,setType:j,onWechatLogin:w}))))},dt=p("1TMG"),ft=p.n(dt),ht=function(u){var F,f,x=u.user,v=u.globalSetting,T=u.loading,G=u.dispatch,B=function(){G({type:"user/showPopLogin",payload:{showPopLogin:!1,showClosable:!1}})},m=(F=v.setting)===null||F===void 0?void 0:F.main_site,D=(f=v.setting)===null||f===void 0?void 0:f.is_local;return i.a.createElement(me.a,{centered:!0,visible:x.showPopLogin,footer:null,width:D?420:765,keyboard:!1,maskClosable:!1,wrapClassName:ft.a.popLogin,closable:x.showClosable,onCancel:B},x.showPopLogin&&i.a.createElement(ct,{is_main_site:m,is_local:D}))},mt=Object(ee.a)(function(c){var u=c.user,F=c.loading,f=c.globalSetting;return{user:u,globalSetting:f,loading:F.models.index}})(ht),pt=p("wd/R"),Fe=p.n(pt),gt=function(u){var F=u.loading,f=u.globalSetting,x=u.children,v=u.user,T=u.dispatch,G=u.location,B=Object(Ce.a)(u,["loading","globalSetting","children","user","dispatch","location"]),m=f.globalLoading;Object(W.useEffect)(function(){},[]),Object(W.useEffect)(function(){if(document.body.scrollIntoView(),T({type:"globalSetting/query",payload:{}}),T({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),console.log(G,":location"),G.pathname==="/admins"||G.pathname==="/sidekiq"){var L=document.domain;if(L.indexOf("educoder.net")>-1)switch(L){case"www.educoder.net":case"educoder.net":window.location.href="https://data.educoder.net".concat(G.pathname);break;default:var b=document.domain.split(".");b[0]=b[0]+"-data",window.location.href="https://".concat(b.join(".")).concat(G.pathname);break}}me.a.destroyAll(),Object(ee.e)("zh-CN",!1)},[G.pathname]),Object(W.useEffect)(function(){f.updateData.system_update?localStorage.updateEndTime||new Date().getTime()<new Date(f.updateData.end_time).getTime()&&me.a.info({title:f.updateData.subject,content:f.updateData.system_score,onOk:function(){localStorage.updateEndTime=f.updateData.end_time}}):localStorage.removeItem("updateEndTime")},[f.updateData.system_update]),Object(W.useEffect)(function(){var L;if((L=v.userInfo)===null||L===void 0?void 0:L.login){var b,_;window.gtag("config","UA-198293321-1",{user_id:(b=v.userInfo)===null||b===void 0?void 0:b.login,custom_map:{dimension1:"user_id"}}),window.gtag("set",{user_id:(_=v.userInfo)===null||_===void 0?void 0:_.login})}},[v.userInfo]),Object(W.useEffect)(function(){var L,b;if(((L=v.userInfo)===null||L===void 0?void 0:L.login)&&D(),(b=v.userInfo)===null||b===void 0?void 0:b.user_school){var _,V,R,h;Object(q.Q)([(_=v.userInfo)===null||_===void 0?void 0:_.user_school,(V=v.userInfo)===null||V===void 0?void 0:V.login,3]),Object(q.P)(["\u7528\u6237\u8BBF\u95EE\u660E\u7EC6",(R=v.userInfo)===null||R===void 0?void 0:R.login,(h=v.userInfo)===null||h===void 0?void 0:h.user_school])}},[v.userInfo,G.pathname]);var D=function(){var b,_=localStorage.trackUserTime,V=localStorage.trackUser;if(!(_&&Fe()(_).isSame(Fe()().startOf("day"),"d")&&V==((b=v.userInfo)===null||b===void 0?void 0:b.login))){var R,h,j,C;localStorage.trackUserTime=new Date,localStorage.trackUser=(R=v.userInfo)===null||R===void 0?void 0:R.login;var g="";switch(v.userInfo.role){case 1:g="\u8D85\u7BA1";break;case 2:g="\u8FD0\u8425";break;case 5:g="\u8BA4\u8BC1\u6559\u5E08";break;case 12:g="\u672A\u8BA4\u8BC1\u6559\u5E08";break;case 15:g="\u5B66\u751F";break}if(((h=v.userInfo)===null||h===void 0?void 0:h.identity)!=="student"&&((j=v.userInfo)===null||j===void 0?void 0:j.identity)!=="teacher"&&(g="\u4E13\u4E1A\u4EBA\u58EB"),(C=v.userInfo)===null||C===void 0?void 0:C.user_school){var M,S,E;Object(q.P)(["\u5B66\u6821\u6D3B\u8DC3\u7528\u6237",(M=v.userInfo)===null||M===void 0?void 0:M.user_school]),Object(q.P)(["\u7528\u6237\u8BBF\u95EE\u660E\u7EC6",(S=v.userInfo)===null||S===void 0?void 0:S.login,(E=v.userInfo)===null||E===void 0?void 0:E.user_school])}Object(q.P)(["\u5E73\u53F0PC\u7AEF","\u603B\u6D3B\u8DC3\u7528\u6237\u6570"]),Object(q.P)(["\u5E73\u53F0PC\u7AEF",g])}};return i.a.createElement(je.b,{locale:Ne.default},i.a.createElement(mt,null),i.a.createElement(Te.a,{size:"large",spinning:m.show,tip:m.text,className:"ant-spin-nested-loading-black"},x))},Tt=ae.default=Object(ee.a)(function(c){var u=c.loading,F=c.globalSetting,f=c.user;return{loading:u,globalSetting:F,user:f}})(gt)},"/nL+":function(K,ae,p){K.exports=p.p+"static/qq.daaf090d.svg"},"0zpY":function(K,ae,p){},"1TMG":function(K,ae,p){K.exports={popLogin:"popLogin___3dT1f"}},"4R62":function(K,ae,p){K.exports={"login-panel-wrapper2":"login-panel-wrapper2___togLZ","ant-form-item-explain":"ant-form-item-explain___ThRBE","ant-form-item":"ant-form-item___3IV6B","ant-form-item-with-help":"ant-form-item-with-help___tz-ky","login-panel-right-wrp":"login-panel-right-wrp___2GQ8_","res-error-values":"res-error-values___2aGnb",tabs:"tabs___2wmM-"}},IxGP:function(K,ae,p){K.exports={"other-login":"other-login___re0Nc","btn-link":"btn-link___1uZTy","wechat-qrcode":"wechat-qrcode___14L6l",driver:"driver___1fhl_"}},h0ge:function(K,ae,p){K.exports=p.p+"static/wechat.4a721a82.svg"}}]);
|