"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8006],{67293:(S,d,i)=>{i.d(d,{GU:()=>h,YO:()=>c,qm:()=>y});var n=i(74848),s=i(22803),g=i(96540),m=i(29675),p=i(11817),l=i(77455),r=i(50363);const y=({children:t,enterAnimation:o=!0})=>{const a=(0,m.of)(c);return(0,n.jsx)("div",{className:(0,s.cx)(a.loginInnerBox,o&&a.enterAnimation),children:t})},h=({children:t,branding:o,isChangingPassword:a})=>{const e=(0,m.of)(c),[v,x]=(0,g.useState)(!1),u=o?.loginSubtitle??l.M.GetLoginSubTitle(),E=o?.loginTitle??l.M.LoginTitle,L=o?.loginBoxBackground||l.M.LoginBoxBackground(),B=o?.loginLogo,f=o?.hideEdition??l.M.HideEdition;return(0,g.useEffect)(()=>x(!0),[]),(0,n.jsxs)(l.M.LoginBackground,{className:(0,s.cx)(e.container,v&&e.loginAnim,o?.loginBackground),children:[(0,n.jsx)("div",{className:e.loginMain,children:(0,n.jsxs)("div",{className:(0,s.cx)(e.loginContent,L,"login-content-box"),children:[(0,n.jsxs)("div",{className:e.loginLogoWrapper,children:[(0,n.jsx)(l.M.LoginLogo,{className:e.loginLogo,logo:B}),(0,n.jsx)("div",{className:e.titleWrapper,children:a?(0,n.jsx)("h1",{className:e.mainTitle,children:(0,n.jsx)(p.x6,{i18nKey:"login.layout.update-password",children:"Update your password"})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:e.mainTitle,children:E}),u&&(0,n.jsx)("h3",{className:e.subTitle,children:u})]})})]}),(0,n.jsx)("div",{className:e.loginOuterBox,children:t})]})}),o?.hideFooter?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(r.wi,{hideEdition:f,customLinks:o?.footerLinks})]})},j=(0,s.keyframes)`
from{
  opacity: 0;
  transform: translate(-60px, 0px);
}

to{
  opacity: 1;
  transform: translate(0px, 0px);
}`,c=t=>({loginMain:(0,s.css)({flexGrow:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minWidth:"100%"}),container:(0,s.css)({minHeight:"100%",backgroundPosition:"center",backgroundRepeat:"no-repeat",flex:1,minWidth:"100%",marginLeft:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),loginAnim:(0,s.css)({"&:before":{opacity:1},".login-content-box":{opacity:1}}),submitButton:(0,s.css)({justifyContent:"center",width:"100%"}),loginLogo:(0,s.css)({width:"100%",maxWidth:60,marginBottom:t.spacing(2),[t.breakpoints.up("sm")]:{maxWidth:100}}),loginLogoWrapper:(0,s.css)({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:t.spacing(3)}),titleWrapper:(0,s.css)({textAlign:"center"}),mainTitle:(0,s.css)({fontSize:22,[t.breakpoints.up("sm")]:{fontSize:32}}),subTitle:(0,s.css)({fontSize:t.typography.size.md,color:t.colors.text.secondary}),loginContent:(0,s.css)({maxWidth:478,width:"calc(100% - 2rem)",display:"flex",alignItems:"stretch",flexDirection:"column",position:"relative",justifyContent:"flex-start",zIndex:1,minHeight:320,borderRadius:t.shape.radius.default,padding:t.spacing(2,0),opacity:0,[t.transitions.handleMotion("no-preference","reduce")]:{transition:"opacity 0.5s ease-in-out"},[t.breakpoints.up("sm")]:{minHeight:t.spacing(40),justifyContent:"center"}}),loginOuterBox:(0,s.css)({display:"flex",overflowY:"hidden",alignItems:"center",justifyContent:"center"}),loginInnerBox:(0,s.css)({padding:t.spacing(0,2,2,2),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,maxWidth:415,width:"100%",transform:"translate(0px, 0px)",[t.transitions.handleMotion("no-preference")]:{transition:"0.25s ease"}}),enterAnimation:(0,s.css)({[t.transitions.handleMotion("no-preference")]:{animation:`${j} ease-out 0.2s`}})})},58006:(S,d,i)=>{i.r(d),i.d(d,{VerifyEmailPage:()=>x,default:()=>u});var n=i(74848),s=i(67293),g=i(96540),m=i(49785),p=i(28082),l=i(19550),r=i(54594),y=i(99178),h=i(86489),j=i(34128),c=i(48583),t=i(88023),o=i(17687),a=i(11817),e=i(4148);const v=()=>{const E=(0,o._2)(),{handleSubmit:L,register:B,formState:{errors:f}}=(0,m.mN)(),[C,D]=(0,g.useState)(!1),I=A=>{(0,p.AI)().post("/api/user/signup",A).then(()=>{D(!0)}).catch(M=>{const P=M.data?.message||M;E.warning(P)})};return C?(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.info",children:"An email with a verification link has been sent to the email address. You should receive it shortly."})}),(0,n.jsx)(l.mc,{margin:"md"}),(0,n.jsx)(r.z9,{variant:"primary",href:(0,t.zj)().appSubUrl+"/signup",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.complete-button",children:"Complete signup"})})]}):(0,n.jsxs)("form",{onSubmit:L(I),children:[(0,n.jsx)(y.s,{children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.header",children:"Verify email"})}),(0,n.jsx)(h.D,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!f.email,error:f.email?.message,children:(0,n.jsx)(j.p,{id:"email",...B("email",{required:"Email is required",pattern:{value:e.pL,message:"Email is invalid"}}),placeholder:"Email"})}),(0,n.jsxs)(c.B,{children:[(0,n.jsx)(r.$n,{type:"submit",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.send-button",children:"Send verification email"})}),(0,n.jsx)(r.z9,{fill:"text",href:(0,t.zj)().appSubUrl+"/login",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.back-button",children:"Back to login"})})]})]})},x=()=>(0,n.jsx)(s.GU,{children:(0,n.jsx)(s.qm,{children:(0,n.jsx)(v,{})})}),u=x}}]);

//# sourceMappingURL=8006.9aa403fd358aebdb8115.js.map