PageSourceSearch

https://my.wpa.org.uk/_nuxt/BMLOslxU.js

js wpa.org.uk collected 2026-09-24 10:05:17 UTC 24,752 bytes, 2 lines download raw bytes

1import{d as G,u as X,a as Y,c as w,o as u,b as l,e as M,f as H,g as h,t as N,w as W,_ as ge,h as e,i as te,j,r as J,k as y,l as se,F as ve,m as Ae,n as q,v as Te,p as F,q as O,s as ue,x,y as U,z as Se,A as we,B as Ce,C as $e,D as re,E as ke,G as Ee,H as be}from"./BIRXwELB.js";import{_ as he}from"./0zEYwRwf.js";import{_ as le,a as Le}from"./C2DD_Syo.js";import{r as Q}from"./CILcquMS.js";import{_ as ae}from"./ZyYNL5Jg.js";import{_ as Re}from"./BNeTQpnL.js";import{l as k}from"./D2CNqzKQ.js";import{a as me,r as oe,u as ye,c as _e}from"./NcdzsEtb.js";import{_ as Me}from"./_kOHRoWi.js";import{_ as Oe}from"./B5gcD-QN.js";import"./D8aEg3BZ.js";const Ie={class:"auth-form"},Ne={class:"contact-wpa-message"},xe={key:0},Ue={key:1},De=["href"],We=G({__name:"ContactWpa",props:{message:{type:String,default:""},customerAccount:{type:Object,default:null},telephone:{type:String,default:""},hasPhoneNumber:{type:Boolean,default:!1},redirectToOracle:{type:Boolean,default:!1}},setup(b){const t=X(),o=Y(),a=b,s=()=>{a.redirectToOracle?Q.accessOracle(o):(o.commit("login/SET_CURRENT_STEP",0),t.go(0))};return(L,i)=>{const r=ge,g=le;return u(),w("div",Ie,[i[4]||(i[4]=l("h1",{class:"page-title"},"My WPA Login",-1)),l("p",Ne,[H(N(a.message)+" ",1),a.hasPhoneNumber&&a.telephone===null?(u(),w("span",xe,"Please contact us for further assistance with logging into the WPA website.")):a.redirectToOracle?h("",!0):(u(),w("span",Ue,[i[1]||(i[1]=H("To unlock your account please reset your password here ")),M(r,{to:"/forgotten-password"},{default:W(()=>i[0]||(i[0]=[H("forgotten password")])),_:1}),i[2]||(i[2]=H(". If you still need help, please ")),l("a",{href:e(o).state.config.WPA_PUBLIC_WEBSITE_CONTACT},"contact us",8,De),i[3]||(i[3]=H("."))]))]),l("button",{class:"btn-submit",onClick:s},N(a.redirectToOracle?"Go to Oracle":"Back to My WPA Login"),1),M(g,{"auth-ask":"Don’t have an account yet?","auth-url":"/register","auth-url-text":"Register for My WPA"})])}}}),fe={getCustomerAccountName(b,t){switch(t){case te.customerType.PROVIDER:return"Provider";case te.customerType.PERSON:return`Administer and access my personal
2         ${b.state.login.policyWord}`;case te.customerType.GROUP:return`Administer and access my group  ${b.state.login.policyWord}`;case te.customerType.INTERMEDIARY:return"Intermediary Contact";case te.customerType.UMBRELLA:return`Administer and access my group  ${b.state.login.policyWord}`;default:return""}}},He={class:"inline-input"},Be={class:"label-muted"},Ke=["id","value"],Ve={key:0,class:"error-msg"},de=G({__name:"SwitchAccount",setup(b){const{$api:t,$bus:o,$loading:a,$tokenWrapper:s}=j(),L=t(),i=Y(),r=X(),g=J({customerAccounts:[],accountSelected:{},showAuthFeedback:!1,errorMsg:""}),I=y(()=>i.getters["login/getCustomerAccountInfo"]);se(()=>{d(),o.$on("switch-account",async()=>{var C,n,p,P;a.$start();try{const v=await L.security.switchAccount(g.accountSelected.customerAccountId);v.status===k.loginStatus.Success?(i.commit("login/SET_CUSTOMER_ACCOUNT_INFO",{CustomerAccountId:(C=v.customerAccount)==null?void 0:C.customerAccountId,CustomerTypeId:(n=v.customerAccount)==null?void 0:n.customerTypeId,LinkedAccounts:(p=v.customerAccount)==null?void 0:p.linkedAccounts,CustomerId:(P=v.customerAccount)==null?void 0:P.customerId}),await i.dispatch("setTokens",v.refreshToken),Q.redirectToHomepage(i,s,fetch,r)):(g.errorMsg="An error has occured.",a.$finish())}catch{a.$finish()}})});const d=()=>{const C=document.getElementById(g.customerAccounts[0].customerAccountId);C&&C.focus()};let T=I.value.CustomerAccountId,R=fe.getCustomerAccountName(i,I.value.CustomerTypeId);const S={customerAccountId:T,customerAccountText:R};return g.customerAccounts.push(S),I.value.LinkedAccounts.forEach(C=>{T=C.customerAccountId,R=fe.getCustomerAccountName(i,C.customerTypeId);const n={customerAccountId:T,customerAccountText:R};g.customerAccounts.push(n),g.accountSelected=g.customerAccounts[0]}),(C,n)=>(u(),w("div",null,[n[1]||(n[1]=l("div",null,[l("p",{class:"label-like-element"},"How can we help you today?")],-1)),(u(!0),w(ve,null,Ae(e(g).customerAccounts,p=>(u(),w("div",{key:p.customerAccountText,class:"input-group-static-label"},[l("div",He,[l("div",null,[l("label",Be,[q(l("input",{id:p.customerAccountId,ref_for:!0,ref:p.customerAccountText,"onUpdate:modelValue":n[0]||(n[0]=P=>e(g).accountSelected=P),name:"accountOption",type:"radio",value:p,readonly:""}
2,null,8,Ke),[[Te,e(g).accountSelected]]),H(" "+N(p.customerAccountText),1)])])])]))),128)),e(g).errorMsg!==""?(u(),w("p",Ve,N(e(g).errorMsg),1)):h("",!0)]))}}),Fe={class:"input-group-floating-label"},qe={class:"password-container"},Ge=["type"],Ye=["aria-label","onKeydown"],ze={class:"input-helper"},Xe={key:0,class:"input-helper"},je={key:1,class:"input-helper input-error"},Je={class:"input-group-floating-label"},Qe={class:"password-container"},Ze=["type"],et=["aria-label","onKeydown"],tt={key:0,class:"input-helper"},st={key:1,class:"input-helper"},ot={key:2,class:"input-helper input-error"},nt={key:0,class:"error-msg"},rt={class:"btn-submit",type:"submit",name:"register"},pe=G({__name:"ChangePassword",setup(b){const t=Y(),{$api:o,$bus:a,$loading:s,$tokenWrapper:L}=j(),i=o(),r=X(),g=F(null),I=F(null),d=J({passwordHelp:"Choose a complex password",retypePasswordHelp:"Please repeat your password",isPasswordTypedIn:!1,errorMsg:"",isSwitchAccount:!1,buttonText:"Save and Login",isPasswordHidden:!0,isRetypePasswordHidden:!0}),T=()=>{d.isPasswordHidden=!1},R=()=>{d.isPasswordHidden=!0},S=()=>{d.isRetypePasswordHidden=!1},C=()=>{d.isRetypePasswordHidden=!0},n=F({password:"",retypePassword:""}),p=y(()=>({password:{required:oe,allowedCharactersPatternPasswordRegex:me,$lazy:!0},retypePassword:{required:oe,allowedCharactersPatternPasswordRegex:me,$lazy:!0}})),P=ye(p,n);y(()=>t.getters["register/getTwoFactorActivation"]);const v=y(()=>t.getters["login/getCustomerAccountInfo"]),_=y(()=>P.value.password.required.$invalid?"Please enter password":P.value.password.allowedCharactersPatternPasswordRegex.$invalid?"Special characters are not allowed":[" "].some(f=>n.value.password.includes(f))?"Please provide a valid value":""),A=y(()=>P.value.retypePassword.required.$invalid?"Please repeat password":P.value.retypePassword.allowedCharactersPatternPasswordRegex.$invalid?"Special characters are not allowed":[" "].some(f=>n.value.retypePassword.includes(f))?"Please provide a valid value":n.value.retypePassword!==""&&n.value.retypePassword!==n.value.password?"Password fields do not match":""),D=y(()=>n.value.retypePassword===n.value.password&&n.value.password.length!==0?"Your Passwords match":n.value.retypePassword===""&&n.value.password.length!==0?"Repeat your password":_.value!==""||A.value!==""?!1:"");v.value.LinkedAccounts.length!==0&&(d.buttonText="Save and Continue"),se(()=>{document.body.style.overflow="hidden"});const B=()=>{d.isPasswordTypedIn=!0,a.$emit("on-password-input",n.value.password)},Z=()=>{d.errorMsg="",d.isPasswordTypedIn=!1},ee=async()=>{if(P.value.$touch(),s.$start(),m()){const f=await i.security.changeCustomerAccountTemporaryPassword(n.value.password);f.success?v.value.LinkedAccounts.length!==0?(t.commit("UPDATE_ACCESS_TOKEN",f.token),d.isSwitchAccount=!0,s.$finish()):(await t.dispatch("setTokens",f.refreshToken),Q.redirectToHomepage(t,L,fetch,r)):(d.errorMsg=f.message,s.$finish())}else s.$finish()},m=()=>!(P.value.password.$invalid||P.value.retypePassword.$invalid||n.value.retypePassword!==""&&n.value.retypePassword!==n.value.password||_.value!==""||A.value!==""),c=()=>{a.$emit("show-step"),t.commit("login/SET_CURRENT_STEP",0),document.body.style.overflow="scroll"};return(f,$)=>{const K=he,z=Re,E=le,ie=de,V=ae;return u(),w("div",null,[$[4]||($[4]=l("h1",{class:"page-title"},"My WPA Login",-1)),l("form",{class:"auth-form",onSubmit:U(ee,["prevent"])},[l("div",Fe,[l("div",qe,[q(l("input",{id:"password",ref_key:"passwordRef",ref:g,"onUpdate:modelValue":$[0]||($[0]=ce=>e(n).password=ce),type:e(d).isPasswordHidden?"password":"text",placeholder:"password",onKeyup:B,onBlur:Z}
2,null,40,Ge),[[ue,e(n).password]]),e(n).password?(u(),w("button",{key:0,type:"button","aria-label":e(d).isPasswordHidden?"Show password":"Hide password",onPointerdown:U(T,["prevent"]),onPointerup:R,onPointerleave:R,onPointercancel:R,onKeydown:[x(U(T,["prevent"]),["space"]),x(U(T,["prevent"]),["enter"])],onKeyup:[x(R,["space"]),x(R,["enter"])]},[M(K,{name:e(d).isPasswordHidden?"view":"hide",color:"gray-color"},null,8,["name"])],40,Ye)):h("",!0),$[2]||($[2]=l("label",{for:"password"},"New password",-1))]),q(l("p",ze,[M(z)],512),[[Se,e(d).isPasswordTypedIn]]),e(d).isPasswordTypedIn===!1&&e(_)===""?(u(),w("p",Xe,N(e(d).passwordHelp),1)):h("",!0),e(d).isPasswordTypedIn===!1&&e(_)!==""?(u(),w("p",je,N(e(_)),1)):h("",!0)]),l("div",Je,[l("div",Qe,[q(l("input",{id:"retypePassword",ref_key:"retypePasswordRef",ref:I,"onUpdate:modelValue":$[1]||($[1]=ce=>e(n).retypePassword=ce),type:e(d).isRetypePasswordHidden?"password":"text",placeholder:"password"},null,8,Ze),[[ue,e(n).retypePassword]]),e(n).retypePassword?(u(),w("button",{key:0,type:"button","aria-label":e(d).isRetypePasswordHidden?"Show password":"Hide password",onPointerdown:U(S,["prevent"]),onPointerup:C,onPointerleave:C,onPointercancel:C,onKeydown:[x(U(S,["prevent"]),["space"]),x(U(S,["prevent"]),["enter"])],onKeyup:[x(C,["space"]),x(C,["enter"])]},[M(K,{name:e(d).isRetypePasswordHidden?"view":"hide",color:"gray-color"},null,8,["name"])],40,et)):h("",!0),$[3]||($[3]=l("label",{for:"retypePassword"},"Confirm new password",-1))]),e(A)===""&&e(d).retypePasswordHelp!==""&&e(D)===""?(u(),w("p",tt,N(e(d).retypePasswordHelp),1)):e(A)===""&&e(D)!==""?(u(),w("p",st,N(e(D)),1)):(u(),w("p",ot,N(e(A)),1))]),e(d).errorMsg?(u(),w("p",nt,N(e(d).errorMsg),1)):h("",!0),l("button",rt,N(e(d).buttonText),1),M(E)],32),e(d).isSwitchAccount?(u(),O(V,{key:0,title:"Login to My WPA",description:"More than one account was found for the credentials entered.","save-modal-event":"switch-account",cancel:!0,onCloseModal:c},{default:W(()=>[M(ie)]),_:1})):h("",!0)])}}}),ne={MaxAttemptsShowCaptcha:2,MaxAttemptsAccountLock:3};function Pe(b,t){return t===null||b===0?ne.MaxAttemptsAccountLock:ne.MaxAttemptsAccountLock-b}function at(b,t){if(b<ne.MaxAttemptsAccountLock){const o=Pe(b,t);return o===1?`${o} attempt remaining.`:null}}function it(b){return!(b<ne.MaxAttemptsShowCaptcha)}const ct={key:0},ut={class:"input-group-floating-label"},lt={class:"input-helper"},dt={class:"input-group-floating-label"},pt={class:"password-container"},mt=["type"],_t=["aria-label","onKeydown"],ft={class:"input-helper"},gt={class:"input-group-floating-label"},wt={key:0,class:"input-helper input-error"},ht={key:1,class:"input-helper input-error"},yt={key:0,class:"customCaptcha",style:{display:"flex",gap:"5px"}},Pt=["disabled"],vt="Your session has been locked. You may want to retrieve your username before trying a new log on.",At=G({__name:"Start",setup(b){const t=F(null),o=F(null);let a=F("");const s=J({passwordAttempts:0,checked:!1,isLoginStart:!0,isLoginError:!1,customerAccount:null,telephone:"",isLoginChangePassword:!1,contactWpaMessage:"",showAuthFeedback:!1,hasPhoneNumber:!0,redirectToOracle:!1,isPasswordHidden:!0}),L=()=>{s.isPasswordHidden=!1},i=()=>{s.isPasswordHidden=!0},r=Y(),{$api:g,$tokenWrapper:I,$bus:d,$loading:T}=j(),R=g(),S=F({username:"",password:""}),C=y(()=>({username:{required:_e.withMessage("Please enter the username",oe)},password:{required:_e.withMessage("Please enter the password",oe)}})),n=ye(C,S),p=y(()=>n.value.username.$errors.length?n.value.username.$errors[0].$message:n.value.password.$errors.length?n.value.password.$errors[0].$message:a.value!==null?a.value:null),P=y(()=>Pe(s.passwordAttempts,s.customerAccount)),v=y(()=>at(s.passwordAttempts,s.customerAccount)),_=y(()=>it(s.passwordAttempts)),A=y(()=>_.value?!s.checked:!1);se(()=>{we().then(async()=>{let m=Ce();const c=decodeURIComponent(m.query.return_url),f=decodeURIComponent(m.query.channel),$=decodeURIComponent(m.query.env);c!==null&&c!=="undefined"&&f!==null&&f!=="undefined"&&await r.commit("login/SET_RETURN_URL",ee(c,f,$)),t.value.focus()})}),$e(()=>{P.value===0&&(s.isLoginStart=!1,s.isLoginError=!0)}),re(()=>{d.$off("show-start")});const D=async()=>{var m,c,f,$,K,z;try{s.checked=!1,T.$start();const E=await R.security.webLogin(S.value.username,S.value.password);r.commit("login/SET_CUSTOMER_ACCOUNT_INFO",{CustomerAccountId:(m=E.customerAccount)==null?void 0:m.customerAccountId,CustomerTypeId:(c=E.customerAccount)==null?void 0:c.customerTypeId,LinkedAccounts:(f=E.customerAccount)==null?void 0:f.linkedAccounts,CustomerId:($=E.customerAccount)==null?void 0:$.customerId,LeadId:(K=E.customerAccount)==null?void 0:K.leadId,BuyCustomerId:(z=E.customerAccount)==null?void 0:z.buyCustomerId}
2),s.customerAccount=E.customerAccount,s.telephone=E.telephone,r.commit("login/SET_POLICY_WORD",E.policyWord),E.status===k.loginStatus.UsernameOrPasswordIsIncorrect?(s.passwordAttempts+=1,a.value=E.message,T.$finish()):E.status===k.loginStatus.AccountIsLocked||E.status===k.loginStatus.AccountHasBeenLocked?(a.value=null,s.contactWpaMessage=E.message,s.isLoginStart=!1,s.isLoginError=!0,T.$finish()):(s.passwordAttempts=0,a.value=null,await B(E))}catch{}},B=async m=>{if(m.status===k.loginStatus.TwoFactorAuthentication){r.commit("UPDATE_ACCESS_TOKEN",m.accessToken);const c=await R.security.getLoginTwoFactorPinOptions();if(c.length===0)s.isLoginStart=!1,s.isLoginError=!0,s.contactWpaMessage="You have Two-Factor Authentication activated for signing into the WPA website. We have tried to send you a 4 digit code, however we do not hold a phone number or email address for you.",T.$finish();else{const f=[];c.forEach($=>{f.push({sendOptionId:$.pinOptionId,text:$.text,accessToken:$.accessToken})}),r.commit("login/SET_SEND_OPTIONS_RESPONSE",f),r.commit("login/LOGIN_TWO_FACTOR",!0),T.$finish()}r.commit("login/SET_USERNAME",S.value.username),r.commit("login/NEXT_STEP")}else if(m.status===k.loginStatus.DateOfBirthAuthentication)r.commit("UPDATE_ACCESS_TOKEN",m.accessToken),r.commit("login/LOGIN_DOB",!0),T.$finish(),r.commit("login/SET_USERNAME",S.value.username),r.commit("login/NEXT_STEP");else if(m.status===k.loginStatus.ChangePasswordRequired)r.commit("UPDATE_ACCESS_TOKEN",m.accessToken),s.isLoginStart=!1,s.isLoginChangePassword=!0,T.$finish();else if(m.status===k.loginStatus.Success){r.commit("UPDATE_ACCESS_TOKEN",m.accessToken),await r.dispatch("setTokens",m.refreshToken);const c=X();Q.redirectToHomepage(r,I,fetch,c)}else s.isLoginStart=!1,s.isLoginError=!0,s.contactWpaMessage=m.message,s.hasPhoneNumber=m.status!==k.loginStatus.OracleCustomerWithoutLoginRight,s.redirectToOracle=m.status===k.loginStatus.OracleCustomerWithoutLoginRight,T.$finish()},Z=async()=>{n.value.username.$validate(),n.value.password.$validate(),!n.value.username.$invalid&&!n.value.password.$invalid&&await D()},ee=(m,c,f)=>(m=m.toLowerCase(),c=c.toLowerCase(),f=f!=null?f.toLowerCase():null,c==="mql"?f==="local"&&r.state.config.RUNNING_ENVIRONMENT!=="LIVE"?r.state.config.MY_WPA_LOCAL_URL+m:r.state.config.MY_WPA_URL+m:c==="hp"?f==="local"&&r.state.config.RUNNING_ENVIRONMENT!=="LIVE"?r.state.config.MY_WPA_HP_LOCAL_URL+m:r.state.config.MY_WPA_HP_URL+m:c==="broker"?f==="local"&&r.state.config.RUNNING_ENVIRONMENT!=="LIVE"?r.state.config.MY_WPA_BROKER_LOCAL_URL+m:r.state.config.MY_WPA_BROKER_URL+m:null);return(m,c)=>{const f=ge,$=he,K=le,z=We,E=ae,ie=pe;return u(),w("div",null,[e(s).isLoginStart?(u(),w("div",ct,[c[8]||(c[8]=l("h1",{class:"page-title"},"My WPA Login",-1)),l("form",{class:"auth-form",onSubmit:U(Z,["prevent"])},[l("div",ut,[q(l("input",{id:"username",ref_key:"usernameRef",ref:t,"onUpdate:modelValue":c[0]||(c[0]=V=>e(S).username=V),type:"text",placeholder:"[email protected]"},null,512),[[ke,e(S).username]]),c[4]||(c[4]=l("label",{for:"username"},"Username",-1)),l("p",lt,[M(f,{class:"btn-text btn-text-small",to:"/forgotten-username",tabindex:"-1"},{default:W(()=>c[3]||(c[3]=[H(" Forgotten My Username ")])),_:1})])]),l("div",dt,[l("div",pt,[q(l("input",{id:"password",ref_key:"passwordRef",ref:o,"onUpdate:modelValue":c[1]||(c[1]=V=>e(S).password=V),type:e(s).isPasswordHidden?"password":"text",placeholder:"password"},null,8,mt),[[ue,e(S).password]]),e(S).password?(u(),w("button",{key:0,type:"button","aria-label":e(s).isPasswordHidden?"Show password":"Hide password",onPointerdown:U(L,["prevent"]),onPointerup:i,onPointerleave:i,onPointercancel:i,onKeydown:[x(U(L,["prevent"]),["space"]),x(U(L,["prevent"]),["enter"])],onKeyup:[x(i,["space"]),x(i,["enter"])]},[M($,{name:e(s).isPasswordHidden?"view":"hide",color:"gray-color"},null,8,["name"])],40,_t)):h("",!0),c[5]||(c[5]=l("label",{for:"password"},"Password",-1))]),l("p",ft,[M(f,{class:"btn-text btn-text-small",to:"/forgotten-password"},{default:W(()=>c[6]||(c[6]=[H(" Forgotten My Password ")])),_:1})])]),l("div",gt,[e(v)?(u(),w("p",wt,N(e(v)),1)):(u(),w("p",ht,N(e(p)),1))]),e(_)?(u(),w("div",yt,[q(l("input",{id:"customCaptcha","onUpdate:modelValue":c[2]||(c[2]=V=>e(s).checked=V),type:"checkbox",value:"verfiedHuman"},null,512),[[Ee,e(s).checked]]),c[7]||(c[7]=l("label",{for:"customCaptcha"},"Select this box before pressing submit",-1))])):h("",!0),l("button",{class:"btn-submit",type:"submit",name:"sign-in",disabled:e(A)}," Login to My WPA ",8,Pt),M(K,{"auth-ask":"Don’t have an account yet? ","auth-url":"/register","auth-url-text":"Register for My WPA"})],32)])):h("",!0),e(s).isLoginError?(u(),O(z,{key:1,message:e(s).contactWpaMessage,"customer-account":e(s).customerAccount,telephone:m.telephone,"has-phone-number":e(s).hasPhoneNumber,"redirect-to-oracle":e(s).redirectToOracle},null,8,["message","customer-account","telephone","has-phone-number","redirect-to-oracle"])):h("",!0),e(s).showAuthFeedback?(u(),O(E,{key:2,title:"Session Locked",description:vt,"is-feedback":!0,next:!1,"btn-continue":!0,"redirect-path":"/forgotten-username"})):h("",!0),e(s).isLoginChangePassword?(u(),O(ie,{key:3})):h("",!0)])}}}),Tt=G({__name:"Step1",emits:["date-validation"],setup(b,{emit:t}){const o=J({date:null,errorMsg:"",isNextDisabled:!1,isChangePassword:!1,isSwitchAccount:!1}),a=Y(),{$api:s,$tokenWrapper:L,$bus:i,$loading:r}=j(),g=s(),I=y(()=>a.getters["login/getLoginDob"]),d=y(()=>a.getters["login/getLoginTwoFactor"]),T=y(()=>a.getters["login/getUsername"]),R=y(()=>a.getters["login/getSendOptionsResponse"]),S=y(()=>a.getters["login/getSendOptionIdSelected"]);y(()=>a.getters["login/getCustomerAccountInfo"]),re(()=>{a.commit("login/LOGIN_TWO_FACTOR",!1),a.commit("login/LOGIN_DOB",!1)});const C=async _=>{if(o.errorMsg="",_.status===k.loginStatus.ChangePasswordRequired)a.commit("login/LOGIN_DOB",!1),i.$emit("hide-step"),o.isChangePassword=!0,a.commit("UPDATE_ACCESS_TOKEN",_.accessToken),r.$finish();else if(_.status===k.loginStatus.MultipleLinkedAccounts)a.commit("UPDATE_ACCESS_TOKEN",_.accessToken),a.commit("login/LOGIN_DOB",!1),o.isSwitchAccount=!0,r.$finish();else if(_.status===k.loginStatus.Success){await a.dispatch("setTokens",_.refreshToken);const A=X();Q.redirectToHomepage(a,L,fetch,A)}else _.status===k.loginStatus.AccountIsLocked||_.status===k.loginStatus.AccountHasBeenLocked?(o.isNextDisabled=!0,o.errorMsg=_.message,r.$finish()):(o.errorMsg=_.message,r.$finish())},n=async()=>
2{if(o.date){r.$start();try{const _=await g.security.webLoginDateOfBirth(o.date);await C(_)}catch{r.$finish()}}else o.errorMsg="Please enter Date of Birth"},p=async()=>{r.$start();const _=R.value.find(A=>A.sendOptionId===S.value);_&&a.commit("UPDATE_ACCESS_TOKEN",_.accessToken);try{const A=await g.security.sendLoginTwoFactorPin(S.value);a.commit("UPDATE_ACCESS_TOKEN",A.accessToken),a.commit("login/NEXT_STEP")}catch{}finally{r.$finish()}},P=async _=>{const A=_;a.commit("login/SET_SEND_OPTION_ID_SELECTED",A),A!==0&&p()},v=async()=>{o.errorMsg="",o.isSwitchAccount&&i.$emit("show-step"),a.commit("login/SET_CURRENT_STEP",0),document.body.style.overflow="scroll"};return(_,A)=>{const D=Me,B=ae,Z=Le,ee=pe,m=de;return u(),w("div",null,[e(I)?(u(),O(B,{key:0,title:"Login to My WPA",description:`Hi, ${e(T)}! To complete login, we need to check your Date of Birth.`,"save-modal-event":"verify-date",cancel:!0,"is-next-disabled":e(o).isNextDisabled,onCloseModal:v},{default:W(()=>[M(D,{onInput:A[0]||(A[0]=c=>{e(o).date=c}),label:"Please enter your Date of Birth:","error-msg-label":"Date of Birth",required:!0,"error-msg":e(o).errorMsg,onDateValidation:n},null,8,["error-msg"])]),_:1},8,["description","is-next-disabled"])):e(d)?(u(),O(B,{key:1,title:"Login to My WPA",description:`Hi, ${e(T)}! To complete login, we need to send you a verification code.`,"save-modal-event":"next-step",cancel:!0,onCloseModal:v},{default:W(()=>[M(Z,{"send-options-response":e(R),onSendCode:P},null,8,["send-options-response"])]),_:1},8,["description"])):h("",!0),e(o).isChangePassword?(u(),O(ee,{key:2})):h("",!0),e(o).isSwitchAccount?(u(),O(B,{key:3,title:"Login to My WPA",description:"More than one account was found for the credentials entered.","save-modal-event":"switch-account",cancel:!0,onCloseModal:v},{default:W(()=>[M(m)]),_:1})):h("",!0)])}}}),St=G({__name:"Step2",setup(b){const t=J({isLocked:!1,isNextDisabled:!1,isPrevious:!0,isCancel:!1,isCodeResend:!1,contactTypeSelectedText:"",errorMsg:"",verifyCodeKey:0,isVerifyCode:!0,isChangePassword:!1,isSwitchAccount:!1}),o=Y(),{$api:a,$tokenWrapper:s,$bus:L,$loading:i}=j(),r=a(),g=y(()=>o.getters["login/getUsername"]),I=y(()=>o.getters["login/getSendOptionsResponse"]),d=y(()=>o.getters["login/getSendOptionIdSelected"]);t.contactTypeSelectedText=I.value.filter(p=>p.sendOptionId===d.value)[0].text,se(()=>{L.$on("resend-code",()=>{C(),t.errorMsg="",t.isCodeResend=!0,t.verifyCodeKey+=1}),L.$on("request-new-code",()=>{i.$start(),o.commit("login/LOGIN_TWO_FACTOR",!0),o.commit("login/SET_CURRENT_STEP",1),i.$finish()})}),re(()=>{L.$off("resend-code"),L.$off("request-new-code")});const T=async p=>{if(p.status===k.loginStatus.ChangePasswordRequired)t.isVerifyCode=!1,L.$emit("hide-step"),t.isChangePassword=!0,o.commit("UPDATE_ACCESS_TOKEN",p.accessToken),i.$finish();else if(p.status===k.loginStatus.MultipleLinkedAccounts)o.commit("UPDATE_ACCESS_TOKEN",p.accessToken),t.isVerifyCode=!1,t.isSwitchAccount=!0,i.$finish();else if(p.status===k.loginStatus.Success){await o.dispatch("setTokens",p.refreshToken);const P=X();Q.redirectToHomepage(o,s,fetch,P)}else p.status===k.loginStatus.AccountIsLocked||p.status===k.loginStatus.AccountHasBeenLocked?(t.isLocked=!0,t.isNextDisabled=!0,t.isPrevious=!1,t.isCancel=!0,t.errorMsg=p.message,i.$finish()):(t.errorMsg=p.message,i.$finish())},R=async p=>{const P=p;if(P!==""){i.$start();try{const v=await r.security.webLoginTwoFactor(P);await T(v)}catch{i.$finish()}}else t.errorMsg="Please enter the verification code."},S=()=>{i.$start(),t.errorMsg="",o.commit("login/LOGIN_TWO_FACTOR",!0),o.commit("login/PREVIOUS_STEP"),i.$finish()},C=async()=>{i.$start();try{const p=await r.security.sendLoginTwoFactorPin(d.value);p.status===k.loginStatus.Success?o.commit("UPDATE_ACCESS_TOKEN",p.accessToken):(t.isNextDisabled=!0,t.errorMsg=p.message)}catch{}finally{i.$finish()}},n=()=>{t.errorMsg="",o.commit("login/SET_CURRENT_STEP",0),document.body.style.overflow="scroll"};return(p,P)=>{const v=Oe,_=ae,A=pe,D=de;return u(),w("div",null,[e(t).isVerifyCode?(u(),O(_,{key:e(t).verifyCodeKey,title:"Login to My WPA",description:e(t).isCodeResend?`A new code was sent to ${e(t).contactTypeSelectedText}. This code will also expire in 5 minutes.`:`Almost there, ${e(g)}! We sent a code to ${e(t).contactTypeSelectedText}. The code will expire in 5 minutes.`,"save-modal-event":"verify-code",previous:e(t).isPrevious,cancel:e(t).isCancel,"is-next-disabled":e(t).isNextDisabled,onCloseModal:n,onOnPrevious:S},{default:W(()=>[M(v,{"error-msg":e(t).errorMsg,"is-locked":e(t).isLocked,onTwoFactorValidation:R},null,8,["error-msg","is-locked"])]),_:1},8,["description","previous","cancel","is-next-disabled"])):h("",!0),e(t).isChangePassword?(u(),O(A,{key:1})):h("",!0),e(t).isSwitchAccount?(u(),O(_,{key:2,title:"Login to My WPA",description:"More than one account was found for the credentials entered.","save-modal-event":"switch-account",cancel:!0,onCloseModal:n},{default:W(()=>[M(D)]),_:1})):h("",!0)])}}}),Ct={class:"auth-content"},Ut=G({__name:"index",setup(b){be({title:"WPA Login"});const{$bus:t}=j(),o=J({start:!0}),a=Y(),s=y(()=>a.getters["login/getStep"]);return se(()=>{we(()=>{t.$on("hide-step",()=>{o.start=!1}),t.$on("show-step",()=>{o.start=!0})})}),re(()=>{t.$off("hide-step"),t.$off("show-step")}),a.commit("login/SET_CURRENT_STEP",0),(L,i)=>{const r=At,g=Tt,I=St;return u(),w("div",Ct,[e(o).start?(u(),O(r,{key:0})):h("",!0),e(s)===1?(u(),O(g,{key:1})):h("",!0),e(s)===2?(u(),O(I,{key:2})):h("",!0)])}}});
2export{Ut as default};

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.