1import{a as A,b as W}from"./chunk-7MTZS4JA.js";import"./chunk-RTIZOHXX.js";import"./chunk-XXYLUTEQ.js";import"./chunk-DNFL7V5E.js";import"./chunk-ZL7MM2RJ.js";import"./chunk-D4PVEYVW.js";import"./chunk-XQ3OH5B7.js";import{g as $}from"./chunk-XAMY6DUE.js";import{g as U}from"./chunk-5AZO2E3H.js";import"./chunk-DE65ZGA7.js";import"./chunk-65I45D2I.js";import"./chunk-GZL4NBTB.js";import{a as V}from"./chunk-OMIAKVTT.js";import"./chunk-3XCK7DOC.js";import"./chunk-PJWNDC7A.js";import{M as q,N as B}from"./chunk-QDFFLVTB.js";import"./chunk-JIVZONLP.js";import{p as D}from"./chunk-S43ITSQ5.js";import{e as N,h as F,k as w}from"./chunk-5FWAKVG3.js";import{G as C,H as E,k,q as O,z as R}from"./chunk-KAXBUATZ.js";import{Cc as u,Dc as n,Ec as a,Fa as m,Jb as l,Jd as P,Kd as j,Oc as I,Sa as T,Ta as S,Vc as d,Wb as c,Xc as v,bc as L,cc as g,gc as _,gd as b,i as M,jd as p,ld as x}from"./chunk-XW6AEKHB.js";import{l as f}from"./chunk-6G35VSEK.js";function G(t,y){t&1&&(n(0,"h1"),p(1,"Log in"),a())}function K(t,y){if(t&1){let e=I();n(0,"p",11),p(1," Don't have an account? "),n(2,"a",12),d("click",function(){T(e);let o=v();return S(o.navigateToRegister())}),p(3,"Sign up for free."),a()()}}function Q(t,y){if(t&1&&(n(0,"div",13),p(1),a()),t&2){let e=v();l(),x(" ",e.errorMessage," ")}}var h=(()=>{class t{constructor(e,i,o,s,r,z){this.route=e,this.router=i,this.utilitiesService=o,this.metaService=s,this.titleService=r,this.meta=z,this.title="Login | Canapii",this.description="Log into your Canapii account.",this.redirectTo="",this.passwordless=!1,this.phase$=new M(""),this.errorMessage="",this.titleService.setTitle(this.title),this.metaService.updateTag({name:"description",content:this.description})}ngOnInit(){this.redirectTo=this.route.snapshot.queryParamMap.get("r"),this.utilitiesService.insertThirdPartyTrackingCodes()}forgotpassword(e){this.router.navigate(["/","auth","forgot"],{state:{email:e}})}signup(){this.router.navigate(["/","auth","register"])}navigateToRegister(){this.redirectTo?this.router.navigate(["../auth/register"],{queryParams:{rd:this.redirectTo}}):this.router.navigate(["/","auth","register"])}success(){return f(this,null,function*(){try{if(this.redirectTo){let e={};this.redirectTo.startsWith("/emp")?window.location.href=this.redirectTo:yield this.router.navigate([this.redirectTo],{queryParams:e})}else yield this.router.navigateByUrl("/account")}catch(e){console.log(e)}})}validateShow(e){return f(this,null,function*(){this.errorMessage="";try{yield U({username:e.username});let i=D();sessionStorage.setItem(i,JSON.stringify({username:e.username,password:e.password})),this.router.navigate(["/","auth","confirm",e.username],{queryParams:{c:i}})}catch(i){console.error("[login] resend verification code failed",i),this.errorMessage="We could not send your verification code. Please try again."}})}phaseChange(e){this.phase$.next(e)}static{this.\u0275fac=function(i){return new(i||t)(c(N),c(F),c(V),c(C),c(E),c(C))}}static{this.\u0275cmp=L({type:t,selectors:[["ng-component"]],decls:16,vars:7,consts:[[1,"container-fluid","auth-wrapper"],[1,"row","auth-row"],[1,"col-12","col-lg-7","col-xl-9","order-lg-last","form","auth-col"],[1,"auth-form-wrapper"],[4,"ngIf"],["class","mb-5",4,"ngIf"],["class","alert alert-danger","role","alert","data-testid","login-resend-error",4,"ngIf"],[3,"success","forgotpassword","signup","validate","passwordless","phaseChange"],[1,"col-12","col-lg-5","col-xl-3","order-lg-first","side","auth-col"],["translate",""],["translate","",1,"custom-btn","custom-btn-outline","custom-btn-light","w-50","mt-4",3,"click"],[1,"mb-5"],[3,"click"],["role","alert","data-testid","login-resend-error",1,"alert","alert-danger"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),_(4,G,2,0,"h1",4)(5,K,4,0,"p",5),P(6,"async"),_(7,Q,2,1,"div",6),n(8,"app-login",7),d("success",function(){return o.success()})("forgotpassword",function(r){return o.forgotpassword(r)})("signup",function(){return o.signup()})("validate",function(r){return o.validateShow(r)})("passwordless",function(r){return o.passwordless=r})("phaseChange",function(r){return o.phaseChange(r)}),a()()(),n(9,"div",8)(10,"h2",9),p(11,"Hello new friend!"),a(),n(12,"p"),p(13,"Start your journey with us"),a(),n(14,"button",10),d("click",function(){return o.navigateToRegister()}),p(15," Sign up "),a()()()()),i&2&&(l(4),u("ngIf",!o.passwordless),l(),u("ngIf",!o.passwordless&&j(6,5,o.phase$)!=="authenticate"),l(2),u("ngIf",o.errorMessage),l(2),b("background-image","url(/assets/subpage/login-bg.png)"))},dependencies:[k,A,O],styles:[".show-password[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:none}.custom-btn.custom-btn-light[_ngcontent-%COMP%]{border-radius:8px!important}a[_ngcontent-%COMP%]{color:#53badb!important}.auth-wrapper[_ngcontent-%COMP%] .auth-row[_ngcontent-%COMP%] .auth-form-wrapper[_ngcontent-%COMP%]{margin-top:50px}"]})}}return t})();var X=[{path:"",component:h}],J=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=g({type:t})}
1static{this.\u0275inj=m({imports:[w.forChild(X),w]})}}return t})();var _e=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=g({type:t})}static{this.\u0275inj=m({imports:[R,J,$,q,B,W,h]})}}return t})();export{_e as LoginModule};
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.