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

to{
  opacity: 1;
  transform: translate(0px, 0px);
}`,x=s=>({loginMain:(0,t.css)({flexGrow:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minWidth:"100%"}),container:(0,t.css)({minHeight:"100%",backgroundPosition:"center",backgroundRepeat:"no-repeat",flex:1,minWidth:"100%",marginLeft:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),loginAnim:(0,t.css)({"&:before":{opacity:1},".login-content-box":{opacity:1}}),submitButton:(0,t.css)({justifyContent:"center",width:"100%"}),loginLogo:(0,t.css)({width:"100%",maxWidth:60,marginBottom:s.spacing(2),[s.breakpoints.up("sm")]:{maxWidth:100}}),loginLogoWrapper:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:s.spacing(3)}),titleWrapper:(0,t.css)({textAlign:"center"}),mainTitle:(0,t.css)({fontSize:22,[s.breakpoints.up("sm")]:{fontSize:32}}),subTitle:(0,t.css)({fontSize:s.typography.size.md,color:s.colors.text.secondary}),loginContent:(0,t.css)({maxWidth:478,width:"calc(100% - 2rem)",display:"flex",alignItems:"stretch",flexDirection:"column",position:"relative",justifyContent:"flex-start",zIndex:1,minHeight:320,borderRadius:s.shape.radius.lg,padding:s.spacing(2,0),opacity:0,[s.transitions.handleMotion("no-preference")]:{transition:"opacity 0.5s ease-in-out"},[s.transitions.handleMotion("reduce")]:{opacity:1},[s.breakpoints.up("sm")]:{minHeight:s.spacing(40),justifyContent:"center"}}),loginOuterBox:(0,t.css)({display:"flex",overflowY:"hidden",alignItems:"center",justifyContent:"center"}),loginInnerBox:(0,t.css)({padding:s.spacing(0,2,2,2),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,maxWidth:415,width:"100%",transform:"translate(0px, 0px)",[s.transitions.handleMotion("no-preference")]:{transition:"0.25s ease"}}),enterAnimation:(0,t.css)({[s.transitions.handleMotion("no-preference")]:{animation:`${v} ease-out 0.2s`}})})},39637(M,r,i){i.r(r),i.d(r,{VerifyEmailPage:()=>u,default:()=>f});var n=i(14553),t=i(58102),c=i(55501),g=i(49785),e=i(92745),l=i(68143),y=i(32881),m=i(45861),h=i(53487),v=i(37386),x=i(63527),s=i(41654),o=i(65642),d=i(64762),a=i(42939);const j=()=>{const E=(0,d._2)(),{handleSubmit:L,register:B,formState:{errors:p}}=(0,g.mN)(),[S,D]=(0,c.useState)(!1),I=C=>{(0,l.AI)().post("/api/user/signup",C).then(()=>{D(!0)}).catch(A=>{const T=A.data?.message||A;E.warning(T)})};return S?(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:(0,n.jsx)(e.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)(y.mc,{margin:"md"}),(0,n.jsx)(m.z9,{variant:"primary",href:(0,o.zj)().appSubUrl+"/signup",children:(0,n.jsx)(e.x6,{i18nKey:"sign-up.verify.complete-button",children:"Complete signup"})})]}):(0,n.jsxs)("form",{onSubmit:L(I),children:[(0,n.jsx)(h.s,{children:(0,n.jsx)(e.x6,{i18nKey:"sign-up.verify.header",children:"Verify email"})}),(0,n.jsx)(v.D,{label:(0,e.t)("sign-up.verify.email-label","Email"),description:(0,e.t)("sign-up.verify.email-description","Enter your email address to get a verification link sent to you"),invalid:!!p.email,error:p.email?.message,children:(0,n.jsx)(x.p,{id:"email",...B("email",{required:"Email is required",pattern:{value:a.pL,message:"Email is invalid"}})})}),(0,n.jsxs)(s.B,{children:[(0,n.jsx)(m.$n,{type:"submit",children:(0,n.jsx)(e.x6,{i18nKey:"sign-up.verify.send-button",children:"Send verification email"})}),(0,n.jsx)(m.z9,{fill:"text",href:(0,o.zj)().appSubUrl+"/login",children:(0,n.jsx)(e.x6,{i18nKey:"sign-up.verify.back-button",children:"Back to login"})})]})]})},u=()=>(0,n.jsx)(t.GU,{children:(0,n.jsx)(t.qm,{children:(0,n.jsx)(j,{})})}),f=u},42939(M,r,i){i.d(r,{pL:()=>t,z5:()=>g});var n=i(43173);const t=/^[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])?)*$/;function c(){const e=n.$.licenseInfo?.trialExpiry;return!!(e&&e>0)}const g=()=>c()&&n.$.featureToggles.featureHighlights}}]);

//# sourceMappingURL=2018-react19.a7df91b50d57415fcbc7.js.map