(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1148:function(e,a,t){"use strict";t.d(a,"a",(function(){return u}));var r=t(16),s=t.n(r),i=t(6),n=t.n(i),o=t(28),c=t(1123);function l(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}class u extends n.a.PureComponent{render(){return n.a.createElement("div",{id:"back_button",className:"signup-header"},n.a.createElement(c.a,{onClick:this.props.onClick,to:this.props.url},n.a.createElement(o.c,{id:"generic_icons.back",defaultMessage:"Back Icon"},e=>n.a.createElement("span",{id:"back_button_icon",className:"fa fa-1x fa-angle-left",title:e})),n.a.createElement(o.c,{id:"web.header.back",defaultMessage:"Back"})))}}l(u,"propTypes",{url:s.a.string,onClick:s.a.func}),l(u,"defaultProps",{url:"/"})},1152:function(e,a,t){e.exports=t.p+"files/77de51bb9d8c3e0ae1c9fba08495fcc7.png"},1968:function(e,a,t){"use strict";t.r(a);var r=t(7),s=t(307),i=t(21),n=t(15),o=t(10),c=t(43),l=(t(51),t(170),t(35),t(603),t(16)),u=t.n(l),d=t(6),p=t.n(d),m=t(28),E=t(309),f=t(96),h=t(0),g=t(1152),b=t.n(g),v=t(1148),_=t(1135),I=t(1136);function y(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}class R extends p.a.PureComponent{constructor(e){super(e),y(this,"verifyEmail",async()=>{const{actions:{verifyUserEmail:e}}=this.props,a=await e(new URLSearchParams(this.props.location.search).get("token"));a&&a.data?this.handleSuccess():a&&a.error&&this.handleError(h.O.FAILED_EMAIL_VERIFICATION)}),this.state={verifyStatus:"pending",serverError:""}}componentDidMount(){this.verifyEmail()}handleRedirect(){this.props.isLoggedIn?I.f():f.a.push("/login?extra=verified&email="+encodeURIComponent(new URLSearchParams(this.props.location.search).get("email")))}handleSuccess(){this.setState({verifyStatus:"success"}),this.props.actions.clearErrors(),this.props.isLoggedIn?(this.props.actions.logError({message:h.h.EMAIL_VERIFIED,type:h.i.SUCCESS},!0),Object(E.d)("settings","verify_email"),this.props.actions.getMe().then(({data:e,error:a})=>{e?this.handleRedirect():a&&this.handleError(h.O.FAILED_USER_STATE_GET)})):this.handleRedirect()}handleError(e){let a="";e===h.O.FAILED_EMAIL_VERIFICATION?a=p.a.createElement(m.c,{id:"signup_user_completed.invalid_invite",defaultMessage:"The invite link was invalid. Please speak with your Administrator to receive an invitation."}):e===h.O.FAILED_USER_STATE_GET&&(a=p.a.createElement(m.c,{id:"signup_user_completed.failed_update_user_state",defaultMessage:"Please clear your cache and try to log in."})),this.setState({verifyStatus:"failure",serverError:a})}render(){if("failure"!==this.state.verifyStatus)return p.a.createElement(_.a,null);let e=null;return this.state.serverError&&(e=p.a.createElement("div",{className:"form-group has-error"},p.a.createElement("label",{className:"control-label"},this.state.serverError))),p.a.createElement("div",null,p.a.createElement(v.a,null),p.a.createElement("div",{className:"col-sm-12"},p.a.createElement("div",{className:"signup-team__container"},p.a.createElement("img",{alt:"signup team logo",className:"signup-team-logo",src:b.a}),p.a.createElement("div",{className:"signup__content"},p.a.createElement("h1",null,this.props.siteName),p.a.createElement("h4",{className:"color--light"},p.a.createElement(m.c,{id:"web.root.signup_info",defaultMessage:"All team communication in one place, searchable and accessible anywhere"})),e))))}}y(R,"propTypes",{location:u.a.object.isRequired,siteName:u.a.string,actions:u.a.shape({verifyUserEmail:u.a.func.isRequired,getMe:u.a.func.isRequired,logError:u.a.func.isRequired,clearErrors:u.a.func.isRequired}).isRequired,user:u.a.shape({email_verified:u.a.bool}),isLoggedIn:u.a.bool.isRequired}),R.defaultProps={location:{}};a.default=Object(s.connect)((function(e){const a=Object(n.getConfig)(e).SiteName;return{isLoggedIn:Boolean(Object(o.getCurrentUserId)(e)),siteName:a,user:Object(o.getCurrentUser)(e)}}),(function(e){return{actions:Object(r.bindActionCreators)({verifyUserEmail:i.verifyUserEmail,getMe:i.getMe,logError:c.logError,clearErrors:c.clearErrors},e)}}))(R)}}]);
//# sourceMappingURL=17.bf241bb2c863204c4c37.js.map