1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1905328b-690a-5d76-aa69-3906813bbb56")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{495:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>w});var a=t(6029),n=t(5729),i=t(9550),l=t(2789),s=t(5669),o=t.n(s),d=t(1278),c=t(1909),h=t(6663),u=t(4567),p=t(8808),m=t(5687),x=t(8068),j=t(2446),_=t(7670),y=t(9276);let g=(0,u.I4)(u.$n,{minWidth:"15rem"}),f=(0,u.I4)("div",{display:"flex",alignContent:"center",alignItems:"center",justifyContent:"center",gap:"$medium"}),b=(0,u.I4)("h1",{fontSize:"$title",lineHeight:"$title",width:"30rem",margin:"$xlarge 0","@large":{width:"38rem"}}),k=(0,u.I4)("div",{display:"grid",gap:"$xlarge",width:"30rem",justifySelf:"center",maxWidth:"100%",lineHeight:"$attribution","@large":{width:"38rem"}});function v(){return(0,a.jsxs)(j.mO,{children:[(0,a.jsx)(o(),{children:(0,a.jsx)("title",{children:"SAML Single Sign On | Parsec"})}),(0,a.jsx)(b,{children:"SAML Single Sign On"}),(0,a.jsxs)(k,{children:[(0,a.jsx)("p",{children:"The link you followed is invalid."}),(0,a.jsxs)("p",{children:["If you can't access your account, please"," ",(0,a.jsx)("a",{href:"https://support.parsec.app",children:"contact support"}),"."]})]})]})}let w=()=>{var e,r,t,s,o;let b="form_id",k="".concat(b,"_otp_error"),w="".concat(b,"_email_error"),C=(0,d.useRouter)(),E=decodeURIComponent((0,y.u)(null!=(t=C.query.token)?t:"")),S=(0,n.useRef)(null),I=(0,m.chD)(),$=(0,m.bs3)(),V=(0,m.PHI)(E),N=null!=(s=null==(e=V.data)?void 0:e.email)?s:"",O=null!=(o=null==(r=V.data)?void 0:r.team_name)?o:"",P=h.Ik({captcha_token:h.Yj().min(1),email:h.Yj().email(),otp:p._U}),T=(0,c.mN)({resolver:(0,l.u)(P),mode:"onChange",values:{email:N,otp:"",captcha_token:"",api_error:""}}),{setValue:H,setError:L,clearErrors:K,register:M,handleSubmit:q,formState:{isSubmitting:A,isValid:R,errors:W}}=T,z=async e=>{try{let r=await I.mutateAsync({otp:e.otp,token:E,captcha_token:e.captcha_token});window.location.assign(r.body.sso_complete_url)}catch(e){L("api_error",{type:"manual",message:(0,x.u$)(e).error})}finally{var r;null==(r=S.current)||r.reset(),H("captcha_token","",{shouldValidate:!0})}},U=async()=>{try{K(),await $.mutateAsync({token:E,captcha_token:T.getValues("captcha_token")})}catch(e){L("api_error",{type:"manual",message:(0,x.u$)(e).error})}finally{var e;null==(e=S.current)||e.reset(),H("captcha_token","",{shouldValidate:!0})}};return!E||V.error?(0,a.jsx)(v,{}):(0,a.jsx)(j.mO,{children:(0,a.jsxs)(j.lV,{id:b,onSubmit:q(z),title:"Join ".concat(O),titleLevel:"h1",children:[(0,a.jsx)("p",{children:"We've sent a verification code to the email address below to confirm it's you. Please enter the code to securely join your new team."}),(0,a.jsxs)(u.dh,{hasError:!!W.email,children:[(0,a.jsx)(u.dh.Label,{required:!0,label:"Email",children:(0,a.jsx)(u.pd,{...M("email"),disabled:!0,"aria-describedby":W.email?w:void 0})}),(0,a.jsx)(u.dh.HelperTextContainer,{role:"alert",children:(0,a.jsx)(i.K,{errors:W,name:"email",render:e=>{let{message:r}=e;return(0,a.jsx)(u.dh.Message,{id:w,children:r})}})})]}),(0,a.jsxs)(u.dh,{hasError:!!W.otp,children:[(0,a.jsx)(u.dh.Label,{required:!0,label:"Verification Code",children:(0,a.jsx)(u.pd,{...M("otp"),"aria-required":!0,"aria-describedby":W.otp?k:void 0})}),(0,a.jsx)(u.dh.HelperTextContainer,{role:"alert",children:(0,a.jsx)(i.K,{errors:W,name:"otp",render:e=>{let{message:r}=e;return(0,a.jsx)(u.dh.Message,{id:k,children:r})}})})]}
3),(0,a.jsx)(u.pd,{type:"hidden",...M("captcha_token")}),(0,a.jsx)(i.K,{errors:W,name:"api_error",render:e=>{let{message:r}=e;return(0,a.jsx)(u.dh.HelperTextContainer,{children:(0,a.jsx)(u.dh.Message,{role:"alert",hasError:!0,children:r})})}}),(0,a.jsxs)(j.En,{children:[(0,a.jsx)(g,{form:b,type:"submit",disabled:!R||A||""===T.getValues("captcha_token"),children:"Submit OTP"}),(0,a.jsx)(g,{onClick:U,type:"button",size:"small",level:"secondary",iconPosition:"left",disabled:A||$.isLoading||""===T.getValues("captcha_token"),children:(0,a.jsxs)(f,{children:[(0,a.jsx)(u.In,{name:"send"}),"Resend Email"]})})]}),(0,a.jsx)(u.hK,{ref:S,siteKey:_.xx,action:u.sN.ConfirmEmailCode,onSuccess:e=>{H("captcha_token",e,{shouldValidate:!0})}})]})})}},3552:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/saml/otp",function(){return t(495)}])}},e=>{e.O(0,[636,593,792],()=>e(e.s=3552)),_N_E=e.O()}]); 4//# sourceMappingURL=otp-f506887c921f3b30.js.map 5//# debugId=1905328b-690a-5d76-aa69-3906813bbb56
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.