"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[9287],{11675:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(23615),l=n.n(a),r=(n(40895),n(84390)),o=n.n(r);const i=e=>{var t,n;return o().createElement("svg",{width:(null===(t=e.width)||void 0===t?void 0:t.toString())||"246",height:(null===(n=e.height)||void 0===n?void 0:n.toString())||"182",viewBox:"0 0 246 182",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M22.7549 148.149H223.245C224.72 148.128 226.127 147.512 227.158 146.436C228.189 145.359 228.759 143.911 228.744 142.407V5.84874C228.759 4.34474 228.189 2.89609 227.158 1.81987C226.127 0.743655 224.72 0.127555 223.245 0.106445H22.7549C21.2803 0.12965 19.8745 0.746388 18.8443 1.82215C17.814 2.89791 17.243 4.34537 17.2556 5.84874V142.415C17.245 143.917 17.817 145.362 18.8471 146.436C19.8771 147.51 21.2817 148.126 22.7549 148.149Z",fill:"var(--center-channel-color)"}),o().createElement("path",{d:"M0.638184 167.787C0.638184 174.585 6.16258 181.383 12.8629 181.383H233.145C239.458 181.383 245.362 174.601 245.362 167.787H0.638184Z",fill:"#24262E"}),o().createElement("path",{d:"M224.969 148.149H21.0311L0.638184 167.787H245.362L224.969 148.149Z",fill:"#D1D4DB"}),o().createElement("path",{d:"M218.87 149.66H27.1217L20.2764 157.968H225.723L218.87 149.66Z",fill:"#AFB3C0"}),o().createElement("path",{d:"M144.023 160.989H101.985L98.8296 165.521H147.17L144.023 160.989Z",fill:"#24262E"}),o().createElement("rect",{width:"187.319",height:"120.851",transform:"translate(29.3403 12.9468)",fill:"#505667"}),o().createElement("path",{d:"M88.8224 110.383C84.491 110.383 82.5285 107.261 84.4612 103.445L119.469 34.6773C121.452 30.8712 124.574 30.8712 126.516 34.6773L161.515 103.445C163.497 107.251 161.515 110.383 157.154 110.383H88.8224Z",fill:"var(--away-indicator)"}),o().createElement("path",{d:"M117.497 60.1105L121.095 84.2851C121.13 84.7648 121.345 85.2136 121.697 85.5412C122.049 85.8688 122.512 86.0509 122.993 86.0509C123.474 86.0509 123.937 85.8688 124.289 85.5412C124.642 85.2136 124.857 84.7648 124.891 84.2851L128.489 60.1105C129.143 50.6845 116.833 50.6845 117.497 60.1105Z",fill:"#2D3039"}),o().createElement("path",{d:"M122.988 88.6563C124.078 88.6582 125.142 88.9831 126.047 89.5898C126.952 90.1966 127.657 91.0579 128.072 92.0651C128.488 93.0722 128.596 94.18 128.382 95.2483C128.168 96.3167 127.643 97.2977 126.871 98.0674C126.1 98.8372 125.118 99.361 124.05 99.5729C122.981 99.7847 121.873 99.675 120.867 99.2576C119.861 98.8402 119 98.1339 118.395 97.2278C117.79 96.3218 117.467 95.2567 117.467 94.1672C117.467 93.4426 117.61 92.7252 117.888 92.0559C118.165 91.3867 118.572 90.7787 119.085 90.2668C119.598 89.755 120.206 89.3493 120.876 89.0729C121.546 88.7965 122.264 88.655 122.988 88.6563Z",fill:"#2D3039"}),o().createElement("path",{d:"M123 3.88281C123.597 3.88281 124.181 4.06002 124.678 4.392C125.175 4.72398 125.562 5.19583 125.791 5.7479C126.02 6.29996 126.08 6.90744 125.963 7.49351C125.846 8.07958 125.559 8.61792 125.136 9.04045C124.714 9.46299 124.175 9.75075 123.589 9.86732C123.003 9.9839 122.396 9.92404 121.844 9.69537C121.292 9.46669 120.82 9.07947 120.488 8.58263C120.156 8.08578 119.979 7.50164 119.979 6.90409C119.979 6.1028 120.297 5.33432 120.863 4.76772C121.43 4.20112 122.199 3.88281 123 3.88281Z",fill:"#DDDFE4"}),o().createElement("path",{d:"M140.405 176.851H104.815C103.587 176.851 100.34 176.851 100.34 172.319H144.904C144.904 176.851 141.562 176.851 140.405 176.851Z",fill:"var(--center-channel-color)"}))};i.propTypes={width:l().number,height:l().number};const s=i},19287:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y}),n(52077),n(83526),n(14078),n(68581),n(61418),n(911);var a=n(84390),l=n.n(a),r=n(72060),o=n(70314),i=n(9448),s=n(17554),c=n(31435),d=n(83905),u=n(23894),m=n(68679),C=n(28176),E=n(11675),p=n(41513),v=n(25598),f=n(23712),h=n(70174),g=function(e){return e.PENDING="pending",e.SUCCESS="success",e.FAILURE="failure",e}(g||{});const y=()=>{var e;const{formatMessage:t}=(0,r.useIntl)(),n=(0,o.useDispatch)(),y=(0,i.useHistory)(),{search:w}=(0,i.useLocation)(),S=null!==(e=new URLSearchParams(w).get("token"))&&void 0!==e?e:"",L=Boolean((0,o.useSelector)(u.rc)),_=(0,o.useSelector)(d.g1),[M,N]=(0,a.useState)(g.PENDING),[D,H]=(0,a.useState)("");(0,a.useEffect)((()=>{(0,C.L9)("signup","do_verify_email",(0,h.Z)()),b()}),[]);const Z=()=>{if(L)return _?void y.push("/"):void(0,m.mc)();const e=new URLSearchParams(w);e.set("extra",f.Constants.SIGNIN_VERIFIED),y.push("/login?".concat(e))},b=async()=>{const{error:e}=await n((0,c.NH)(S));if(e)return N(g.FAILURE),void H(t({id:"signup_user_completed.invalid_invite.message",defaultMessage:"Please speak with your Administrator to receive an invitation."}));if(N(g.SUCCESS),await n((0,s.b9)()),!L)return void Z();n((0,s.H)({message:f.MN.EMAIL_VERIFIED,type:f.Mw.SUCCESS},!0)),(0,C.L9)("settings","verify_email");const{error:a}=await n((0,c.jo)());if(a)return N(g.FAILURE),void H(t({id:"signup_user_completed.failed_update_user_state",defaultMessage:"Please clear your cache and try to log in."}));Z()};return M===g.FAILURE?l().createElement("div",{className:"do-verify-body"},l().createElement("div",{className:"do-verify-body-content"},l().createElement(p.Z,{title:t({id:"signup_user_completed.invalid_invite.title",defaultMessage:"This invite link is invalid"}),message:D,SVGElement:l().createElement(E.Z,null),extraContent:l().createElement("div",{className:"do-verify-body-content-button-container"},l().createElement("button",{className:"do-verify-body-content-button-return",onClick:()=>y.replace("/")},t({id:"signup_user_completed.return",defaultMessage:"Return to log in"})))}))):l().createElement(v.Z,null)}},41513:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(23615),l=n.n(a),r=n(84390),o=n.n(r),i=n(23712);const s=e=>{let{title:t,message:n,SVGElement:a,extraContent:l,onEnterKeyDown:r}=e;return o().createElement("div",{className:"content-layout-column",onKeyDown:e=>{r&&e.key===i.default.KeyCodes.ENTER[0]&&r(e)},tabIndex:0},o().createElement("div",{className:"content-layout-column-svg"},a),o().createElement("h1",{className:"content-layout-column-title"},t),o().createElement("p",{className:"content-layout-column-message"},n),l&&o().createElement("div",{className:"content-layout-column-extra-content"},l))};s.propTypes={title:l().node.isRequired,message:l().node.isRequired,SVGElement:l().node,extraContent:l().node,onEnterKeyDown:l().func};const c=s}}]); //# sourceMappingURL=9287.3a5fa59b5d84af37c772.js.map