(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{1025:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(35),a=n(0),o=n(4),i=n(14),c=n(15),s=n(16),u=n(17),l=n(9),d=n(2),h=n(3),p=n.n(h),f=n(1),g=n(39),m=n(27),b=n(940),v=n.n(b),A=n(83),C=n.n(A);function E(e,t){return t?e.trim():e}var O={useTrim:!0},w={required:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,n=t.useTrim;return""!==E(e,n)},maxLength:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,r=n.useTrim;return E(e,r).length<=t},minLength:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,r=n.useTrim;return E(e,r).length>=t},pattern:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,r=n.useTrim;return t.test(E(e,r))}};function y(){return function(e){return function(e){var t=e.contextTypes,n=e.defaultProps,r=Object.assign({},e.prototype);function a(e){for(var t=r[e],n=arguments.length,a=new Array(n>1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=this.state||{},r=n._validations;r&&r.length>0&&this.setState(Object.assign({},e,{_validations:[]}),t)},addValidation:function(e){this.setState((function(t){var n=t._validations;return{_validations:[e].concat(Object(o.a)(n||[]))}}))},addManualValidation:function(e){this.addValidation({type:"manual",message:e})},validate:function(){this.context.form.validate(this)}}),Object.assign(e,{contextTypes:Object.assign({},t,{form:p.a.object}),defaultProps:Object.assign({},n,{validations:[]})}),e}(e)}}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var a=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var j=function(e){Object(s.a)(n,e);var t=S(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,c=new Array(r),s=0;s0&&void 0!==arguments[0]?arguments[0]:{};r.a.dispatch("ui/showToast",{icon:"fail",text:o(e)})}},1119:function(e,t,n){"use strict";var r=n(0),a=n(35),o=n(14),i=n(15),c=n(16),s=n(17),u=n(9),l=n(2),d=n(3),h=n.n(d),p=n(1),f=n(11),g=n.n(f),m=n(83),b=n.n(m),v=n(135),A=n(1025);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var a=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var E=function(e){Object(c.a)(n,e);var t=C(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i=7)r({validationMessage:k});else{var a=t.pageX,o=t.pageY;e.updateSize();var i=e.chineseCaptchaImg.getBoundingClientRect(),c=i.top,s=i.left,u=o-c-window.pageYOffset-10,l=a-s-window.pageXOffset-10,d=[].concat(Object(g.a)(n),[{top:u,left:l+60+16}]);e.updateMarkPoint(d)}}},e.handleUnMarkPoint=function(t){var n=Object(g.a)(e.state.markPositionsArray);n.splice(t,1),e.updateMarkPoint(n)},e.updateMarkPoint=function(t){e.setState({markPositionsArray:t},(function(){e.props.onUpdateInput(e.parseMarkPositionsArrayToInputValue(t))}))},e.parseMarkPositionsArrayToInputValue=function(t){return JSON.stringify({img_size:[e.chineseImgWidth,e.chineseImgHeight],input_points:t.map((function(e){var t=e.top;return[e.left+10-60-16,t+10]}))})},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.setState({isClient:!0}),this.updateSize()}},{key:"componentWillReceiveProps",value:function(e){this.props.url!==e.url&&this.props.isChinese&&this.setState({markPositionsArray:[]})}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.url!==e.url||this.props.validationMessage!==e.validationMessage||this.props.isShown!==e.isShown||this.props.className!==e.className||this.state.markPositionsArray!==t.markPositionsArray}},{key:"renderCaptcha",value:function(){var e=this,t=this.props,n=t.url,r=t.isChinese,a=t.onRefresh;return n?Object(s.c)("div",{className:r?"Captcha-chineseContainer":"Captcha-englishContainer",children:[Object(s.b)("img",{"data-tooltip":"看不清楚?换一张",className:r?"Captcha-chineseImg":"Captcha-englishImg",src:n,alt:"图形验证码",onClick:r?this.handleMarkPoint:a,ref:r&&function(t){e.chineseCaptchaImg=t}}),r?this.state.markPositionsArray.map((function(t,n){return Object(s.b)(I,{onUnMark:function(){return e.handleUnMarkPoint(n)},position:t},n)})):null]}):null}},{key:"render",value:function(){var e=this.props,t=e.isChinese,n=e.validationMessage,r=e.className,a=e.onUpdateInput,o=e.validations,i=e.isShown,c=e.onRefresh,u=this.state.isClient,l=this.renderCaptcha();return Object(s.b)("div",{className:b()("Captcha",r,{"Captcha-chinese":t&&u}),style:i?{}:{width:"0",height:"0",opacity:"0",overflow:"hidden",margin:"0",padding:"0",border:"0"},children:t?Object(s.c)("div",{children:[Object(s.c)("div",{className:"Captcha-chineseOperator",children:[Object(s.b)("span",{className:b()("Captcha-info",{"Captcha-error":Boolean(n)}),children:n||"请点击图中倒立的文字"}),Object(s.b)(A.c,{className:"Captcha-chineseRefreshButton",preset:"plain",onClick:c,children:Object(s.b)(v.a,{size:20})})]}),l]}):Object(s.c)("div",{children:[Object(s.b)(C.a,{name:"captcha",type:"text",errorMessageClassName:"Captcha-errorMessage",placeholder:"验证码",onChange:a,validations:i?o:[],manualValidateError:n,tabIndex:i?0:-1}),Object(s.b)("span",{className:"Captcha-englishImage",children:l})]})})}}]),n}(d.Component);Q.propTypes={isChinese:l.a.bool,url:l.a.string,validationMessage:l.a.string,onValidation:l.a.func,onRefresh:l.a.func.isRequired,onUpdateInput:l.a.func.isRequired,isShown:l.a.bool,validations:l.a.array},Q.defaultProps={isChinese:!1,isShown:!1,validations:[{type:"required",message:"请填写验证码",className:"Captcha-requiredErrorMessage"}]};var N=Q;function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var a=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var P=function(e){Object(o.a)(n,e);var t=T(n);function n(){var e;Object(r.a)(this,n);for(var a=arguments.length,o=new Array(a),i=0;i0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(t){return setTimeout(t,e)}))};function a(e){var t=[];return e.reduce((function(e,n){return e.then((function(){return n().then((function(e){t.push(e)}))}))}),Promise.resolve()).then((function(){return t}))}},1378:function(e,t,n){"use strict";var r=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;t.a=function(e){return r.test(e)}},1411:function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rv)throw Error("numRounds must a integer >= 1");if("SHA-1"===e)c=512,g=x,m=z,i=160,b=function(e){return e.slice()};else if(0===e.lastIndexOf("SHA-",0))if(g=function(t,n){return q(t,n,e)},m=function(t,n,r,a){var o,i;if("SHA-224"===e||"SHA-256"===e)o=15+(n+65>>>9<<4),i=16;else{if("SHA-384"!==e&&"SHA-512"!==e)throw Error("Unexpected error in SHA-2 implementation");o=31+(n+129>>>10<<5),i=32}for(;t.length<=o;)t.push(0);for(t[n>>>5]|=128<<24-n%32,n+=r,t[o]=4294967295&n,t[o-1]=n/4294967296|0,r=t.length,n=0;nt;t+=1)n[t]=e[t].slice();return n},B=1,"SHA3-224"===e)c=1152,i=224;else if("SHA3-256"===e)c=1088,i=256;else if("SHA3-384"===e)c=832,i=384;else if("SHA3-512"===e)c=576,i=512;else if("SHAKE128"===e)c=1344,i=-1,I=31,j=!0;else{if("SHAKE256"!==e)throw Error("Chosen SHA variant is not supported");c=1088,i=-1,I=31,j=!0}m=function(e,t,n,r,a){var o,i=I,s=[],u=(n=c)>>>5,l=0,d=t>>>5;for(o=0;o=n;o+=u)r=L(e.slice(o,o+u),r),t-=n;for(e=e.slice(o),t%=n;e.length>>3)>>2]^=i<=a));)s.push(e.a),0==64*(l+=1)%n&&(L(null,r),l=0);return s}}o=f(t,r,B),a=F(e),this.setHMACKey=function(t,n,o){var s;if(!0===O)throw Error("HMAC key already set");if(!0===S)throw Error("Cannot set HMAC key after calling update");if(!0===j)throw Error("SHAKE is not supported for HMAC");for(t=(n=f(n,r=(o||{}).encoding||"UTF8",B)(t)).binLen,n=n.value,o=(s=c>>>3)/4-1,s>>5;for(e=(t=o(e,C,E)).binLen,n=t.value,t=e>>>5,r=0;r>>5),E=e%c,S=!0},this.getHash=function(t,n){var r,o,c,f;if(!0===O)throw Error("Cannot call getHash after setting HMAC key");if(c=p(n),!0===j){if(-1===c.shakeLen)throw Error("shakeLen must be specified in options");i=c.shakeLen}switch(t){case"HEX":r=function(e){return s(e,i,B,c)};break;case"B64":r=function(e){return u(e,i,B,c)};break;case"BYTES":r=function(e){return l(e,i,B)};break;case"ARRAYBUFFER":try{o=new ArrayBuffer(0)}catch(e){throw Error("ARRAYBUFFER not supported by this environment")}r=function(e){return d(e,i,B)};break;case"UINT8ARRAY":try{o=new Uint8Array(0)}catch(e){throw Error("UINT8ARRAY not supported by this environment")}r=function(e){return h(e,i,B)};break;default:throw Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}for(f=m(C.slice(),E,A,b(a),i),o=1;o>>24-i%32),f=m(f,i,0,F(e),i);return r(f)},this.getHMAC=function(t,n){var r,o,f,v;if(!1===O)throw Error("Cannot call getHMAC without first setting HMAC key");switch(f=p(n),t){case"HEX":r=function(e){return s(e,i,B,f)};break;case"B64":r=function(e){return u(e,i,B,f)};break;case"BYTES":r=function(e){return l(e,i,B)};break;case"ARRAYBUFFER":try{r=new ArrayBuffer(0)}catch(e){throw Error("ARRAYBUFFER not supported by this environment")}r=function(e){return d(e,i,B)};break;case"UINT8ARRAY":try{r=new Uint8Array(0)}catch(e){throw Error("UINT8ARRAY not supported by this environment")}r=function(e){return h(e,i,B)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}return o=m(C.slice(),E,A,b(a),i),v=g(y,F(e)),r(v=m(o,i,c,v,i))}}function i(e,t){this.a=e,this.b=t}function c(e,t,n,r){var a,o,i,c,s;for(t=t||[0],o=(n=n||0)>>>3,s=-1===r?3:0,a=0;a>>2,t.length<=i&&t.push(0),t[i]|=e[a]<<8*(s+c%4*r);return{value:t,binLen:8*e.length+n}}function s(e,t,n,r){var a,o,i,c="";for(t/=8,i=-1===n?3:0,a=0;a>>2]>>>8*(i+a%4*n),c+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?c.toUpperCase():c}function u(e,t,n,r){var a,o,i,c,s="",u=t/8;for(c=-1===n?3:0,a=0;a>>2]:0,i=a+2>>2]:0,i=(e[a>>>2]>>>8*(c+a%4*n)&255)<<16|(o>>>8*(c+(a+1)%4*n)&255)<<8|i>>>8*(c+(a+2)%4*n)&255,o=0;4>o;o+=1)s+=8*a+6*o<=t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>>6*(3-o)&63):r.b64Pad;return s}function l(e,t,n){var r,a,o,i="";for(t/=8,o=-1===n?3:0,r=0;r>>2]>>>8*(o+r%4*n)&255,i+=String.fromCharCode(a);return i}function d(e,t,n){t/=8;var r,a,o,i=new ArrayBuffer(t);for(o=new Uint8Array(i),a=-1===n?3:0,r=0;r>>2]>>>8*(a+r%4*n)&255;return i}function h(e,t,n){t/=8;var r,a,o=new Uint8Array(t);for(a=-1===n?3:0,r=0;r>>2]>>>8*(a+r%4*n)&255;return o}function p(e){var t={outputUpper:!1,b64Pad:"=",shakeLen:-1};if(e=e||{},t.outputUpper=e.outputUpper||!1,!0===e.hasOwnProperty("b64Pad")&&(t.b64Pad=e.b64Pad),!0===e.hasOwnProperty("shakeLen")){if(0!=e.shakeLen%8)throw Error("shakeLen must be a multiple of 8");t.shakeLen=e.shakeLen}if("boolean"!=typeof t.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw Error("Invalid b64Pad formatting option");return t}function f(e,t,n){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":e=function(e,t,r){var a,o,i,c,s,u,l=e.length;if(0!=l%2)throw Error("String of HEX type must be in byte increments");for(t=t||[0],s=(r=r||0)>>>3,u=-1===n?3:0,a=0;a>>1)+s)>>>2;t.length<=i;)t.push(0);t[i]|=o<<8*(u+c%4*n)}return{value:t,binLen:4*l+r}};break;case"TEXT":e=function(e,r,a){var o,i,c,s,u,l,d,h,p=0;if(r=r||[0],u=(a=a||0)>>>3,"UTF8"===t)for(h=-1===n?3:0,c=0;c(o=e.charCodeAt(c))?i.push(o):2048>o?(i.push(192|o>>>6),i.push(128|63&o)):55296>o||57344<=o?i.push(224|o>>>12,128|o>>>6&63,128|63&o):(c+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(c)),i.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),s=0;s>>2;r.length<=l;)r.push(0);r[l]|=i[s]<<8*(h+d%4*n),p+=1}else if("UTF16BE"===t||"UTF16LE"===t)for(h=-1===n?2:0,i="UTF16LE"===t&&1!==n||"UTF16LE"!==t&&1===n,c=0;c>>8),l=(d=p+u)>>>2;r.length<=l;)r.push(0);r[l]|=o<<8*(h+d%4*n),p+=2}return{value:r,binLen:8*p+a}};break;case"B64":e=function(e,t,r){var a,o,i,c,s,u,l,d,h=0;if(-1===e.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");if(o=e.indexOf("="),e=e.replace(/\=/g,""),-1!==o&&o