1import{a as oe}from"./chunk-XB2DGHNE.js";import{b as ne}from"./chunk-3JAH6CNL.js";import{d as w}from"./chunk-6AAQMWA5.js";import{a as T,b as re}from"./chunk-4KFEKOMB.js";import{a as O,b as ie}from"./chunk-7P55SE7J.js";import{a as U,b as K,c as W,e as j,f as J,i as Y,j as X,k as Z,l as $,n as ee}from"./chunk-2BUKBHR4.js";import{b as z,h as G,k as B}from"./chunk-IATIYDOH.js";import{b as te}from"./chunk-IR3IXP4R.js";import{c as Q}from"./chunk-KKTVKEJB.js";import{a as H}from"./chunk-OFPOYJTS.js";import{j as L}from"./chunk-DGVY3FNH.js";import{Db as x,Fb as m,Ib as N,Jb as P,Kb as S,Pb as _,Ra as a,Rb as l,S as p,Sb as D,Tb as y,Ua as q,Va as F,X as C,Y as b,Z as E,ab as V,ba as A,ia as f,la as I,lb as h,mb as d,nb as c,sb as u,tb as i,ua as R,ub as o,vb as v,zb as M}from"./chunk-IIXPTABD.js";import{a as k}from"./chunk-7CGTOI24.js";function le(n,t){if(n&1&&(i(0,"p",24),l(1),o()),n&2){let e=m(2);a(),y(" ",e.emailError()," ")}}function se(n,t){if(n&1){let e=M();i(0,"label",22),l(1," Username or Email "),i(2,"span",5),l(3,"*"),o(),i(4,"span",9),l(5,"(required)"),o()(),i(6,"input",23),x("input",function(s){C(e);let g=m();return b(g.onEmailInput(s))}),o(),d(7,le,2,1,"p",24)}if(n&2){let e=m();_("error-label",e.emailError()),a(6),_("input-error",e.emailError()),u("value",e.email),h("aria-invalid",e.emailError()?"true":null)("aria-describedby",e.emailError()?"merge-email-error":e.mergeError()?"merge-general-error":null),a(),c(e.emailError()?7:-1)}}function me(n,t){if(n&1&&(i(0,"label",22),l(1,"Username or Email"),o(),v(2,"input",25)),n&2){let e=m();a(2),u("value",e.email),h("aria-describedby",e.mergeError()?"merge-general-error":null)}}function pe(n,t){n&1&&(E(),i(0,"svg",14),v(1,"path",26)(2,"path",27)(3,"path",28)(4,"path",29),o())}function de(n,t){n&1&&(E(),i(0,"svg",14),v(1,"path",30)(2,"circle",31),o())}function ce(n,t){if(n&1&&(i(0,"p",15),l(1),o()),n&2){let e=m();a(),y(" ",e.getError("password")," ")}}function ue(n,t){if(n&1&&(i(0,"p",16),l(1),o()),n&2){let e=m();a(),y(" ",e.mergeError()," ")}}function ge(n,t){if(n&1){let e=M();i(0,"app-turnstile-widget",32),x("tokenReceived",function(s){C(e);let g=m();return b(g.onTurnstileToken(s))})("tokenExpired",function(){C(e);let s=m();return b(s.onTurnstileExpired())}),o()}if(n&2){let e=m();u("siteKey",e.turnstileSiteKey())}}function fe(n,t){if(n&1&&(i(0,"p",19),l(1),o()),n&2){let e=m();a(),D(e.captchaError())}}function he(n,t){n&1&&l(0," Confirming... ")}function ye(n,t){n&1&&l(0," Confirm ")}var ae=class n{fb=p($);route=p(G);identityApi=p(re);destroyRef=p(A);configService=p(H);elementRef=p(R);titleService=p(z);brandService=p(Q);isBrowser=L(p(I));turnstileWidget;authLayout;pageTitle=f("");pageTitleAnnouncement=oe(this.pageTitle.asReadonly(),this.isBrowser);mergeForm=this.fb.group({password:["",[K.required]]});email="";providerName="";providerId="";showPassword=f(!1);isSubmitting=f(!1);mergeError=f("");captchaError=f("");emailError=f("");turnstileToken="";isEmailEditable(){return this.providerName.toLowerCase()==="facebook"}resetPasswordQueryParams(){return this.isEmailEditable()?{}:{email:this.email}}onEmailInput(t){this.email=t.target.value,this.email.trim()&&this.emailError.set("")}captchaEnabled(){return this.configService.isCaptchaEnabled()}turnstileSiteKey(){return this.configService.getCloudflareSiteKey()}ngOnInit(){this.email=this.route.snapshot.queryParamMap.get("email")??"",this.providerName=this.route.snapshot.queryParamMap.get("provider")??"",this.providerId=this.route.snapshot.queryParamMap.get("providerId")??"",ie(this.titleService,this.brandService,"Account Verification"),this.pageTitle.set(this.titleService.getTitle())}ngAfterViewInit(){if(!this.isBrowser)return;let t=this.authLayout?.logoLink()??this.elementRef.nativeElement.querySelector("h1");t?.focus(),t?.scrollIntoView?.({block:"center"})}onTurnstileToken(t){this.turnstileToken=t,this.captchaError.set("")}onTurnstileExpired(){this.turnstileToken=""}onSubmit(){this.clearPasswordServerError();let t=this.isEmailEditable()&&!this.email.trim();if(t&&this.emailError.set("Please enter your username or email"),this.mergeForm.invali
1d||t){this.mergeForm.markAllAsTouched(),this.focusFirstError();return}if(this.captchaEnabled()&&!this.turnstileToken){this.captchaError.set("Please complete the verification challenge.");return}this.isSubmitting.set(!0),this.mergeError.set(""),this.captchaError.set("");let{password:e}=this.mergeForm.value,r=k({email:this.email,password:e,providerName:this.providerName,providerId:this.providerId},this.captchaEnabled()&&{cloudflareToken:this.turnstileToken});this.identityApi.mergeAccount(r).pipe(te(this.destroyRef)).subscribe({next:s=>{if(this.isSubmitting.set(!1),s.isCaptchaInvalid){this.turnstileToken="",this.captchaError.set("Verification failed. Please try again."),this.turnstileWidget?.reset();return}if((s.success||s.requiresPasswordReset)&&s.redirectUrl){ne(s.redirectUrl,"/app/signin");return}this.handleInvalidCredentials(s.errorMessage)},error:s=>{this.isSubmitting.set(!1);let g=s.status===429?s.error?.errorMessage??"Too many attempts. Please try again later.":"An error occurred. Please try again.";this.mergeError.set(g),w(this.elementRef.nativeElement)}})}handleInvalidCredentials(t){if(this.isEmailEditable()){this.mergeError.set(t??"Incorrect email or password"),w(this.elementRef.nativeElement,"#merge-email");return}let e=this.mergeForm.get("password");e?.setErrors({serverError:"Incorrect password"}),e?.markAsTouched(),w(this.elementRef.nativeElement)}clearPasswordServerError(){let t=this.mergeForm.get("password");t?.hasError("serverError")&&t.updateValueAndValidity()}focusFirstError(){let t=this.elementRef.nativeElement;(this.isEmailEditable()&&this.emailError()?t.querySelector("#merge-email"):t.querySelector("input.ng-invalid"))?.focus()}hasError(t){let e=this.mergeForm.get(t);return!!(e?.invalid&&e?.touched)}getError(t){let e=this.mergeForm.get(t);return!e?.errors||!e.touched?"":e.errors.required?"Please enter a password":e.errors.serverError?e.errors.serverError:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=V({type:n,selectors:[["app-merge-account"]],viewQuery:function(e,r){if(e&1&&N(T,5)(O,5),e&2){let s;P(s=S())&&(r.turnstileWidget=s.first),P(s=S())&&(r.authLayout=s.first)}},decls:42,vars:22,consts:[["backUrl","/app/signin","backText","Back to Sign In"],["aria-live","polite","aria-atomic","true","data-automation-id","merge-page-announcement",1,"sr-only"],["data-automation-id","merge-heading",1,"heading"],[1,"subtitle"],[1,"fields-note"],["aria-hidden","true",1,"required"],["novalidate","",3,"ngSubmit","formGroup"],[1,"form-group"],["for","merge-password"],[1,"sr-only"],[1,"password-wrapper"],["id","merge-password","formControlName","password","required","","aria-required","true","data-automation-id","merge-password",3,"type"],["id","merge-password-hint",1,"sr-only"],["type","button","aria-label","Show password",1,"password-toggle",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["id","merge-password-error","data-automation-id","merge-password-error",1,"error-message"],["id","merge-general-error","role","alert","data-automation-id","merge-error",1,"error-message","merge-error"],[1,"captcha-fieldset"],[3,"siteKey"],["role","alert",1,"captcha-error"],["type","submit","data-automation-id","merge-submit",1,"btn-primary",3,"disabled"],["routerLink","/forgot-password","data-automation-id","merge-reset-password",1,"reset-password-link",3,"queryParams"],["for","merge-email"],["type","text","id","merge-email","name","username","placeholder","[email protected]","required","","aria-required","true","data-automation-id","merge-email","autocomplete","username",3,"input","value"],["id","merge-email-error","data-automation-id","merge-email-error",1,"error-message"],["type","email","id","merge-email","placeholder","[email protected]","readonly","","aria-readonly","true","data-automation-id","merge-email","autocomplete","username",3,"value"],["d","M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"],["d","M14.084 14.158a3 3 0 0 1-4.242-4.242"],["d","M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"],["d","m2 2 20 20"],["d","M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"],["cx","12","cy","12","r","3"],[3,"tokenReceived","tokenExpired","siteKey"]],template:function(e,r){e&1&&(i(0,"app-auth-layout",0)(1,"p",1),l(2),o(),i(3,"h1",2),l(4,"ACCOUNT VERIFICATION REQUIRED"),o(),i(5,"p",3),l(6),o(),i(7,"p",4),l(8,"Fields marked with an asterisk ("),i(9,"span",5),l(10,"*"),o(),l(11,") are required"),o(),i(12,"form",6),x("ngSubmit",function(){return r.onSubmit()}),i(13,"div",7),d(14,se,8,8)(15,me,3,2),o(),i(16,"div",7)(17,"label",8),l(18," Password "),i(19,"span",5),l(20,"*"),o(),i(21,"span",9),l(22,"(required)"),o()(),i(23,"div",10),v(24,"input",11),q(),i(25,"span",12),l(26,"Enter your existing GovernmentJobs account password"),o(),i(27,"button",13),x("click",function(){return r.showPassword.update(g=>!g)}),d(28,pe,5,0,":svg:svg",14)(29,de,3,0,":svg:svg",14),o()(),d(30,ce,2,1,"p",15),o(),d(31,ue,2,1,"p",16),i(32,"fieldset",17)(33,"legend",9),l(34,"Human verification"),o(),d(35,ge,1,1,"app-turnstile-widget",18),d(36,fe,2,1,"p",19),o(),i(37,"button",20),d(38,he,1,0)(39,ye,1,0),o()(),i(40,"a",21),l(41," Reset Password "),o()()),e&2&&(a(2),y(" ",r.pageTitleAnnouncement()," "),a(4),y(" We found an existing GovernmentJobs account linked to your ",r.providerName," email. For security, please enter your GovernmentJobs password to verify your identity and access your account. "),a(6),u("formGroup",r.mergeForm),a(2),c(r.isEmailEditable()?14:15),a(3),_("error-label",r.hasError("password")),a(7),_("input-error",r.hasError("password")),u("type",r.showPassword()?"text":"password"),h("aria-invalid",r.hasError("password")?"true":null)("aria-describedby",r.hasError("password")?"merge-password-error":r.mergeError()?"merge-general-error":"merge-password-hint")("autocomplete",r.showPassword()?"off":"current-password"),F(),a(3),h("aria-pressed",r.showPassword()),a(),c(r.showPassword()?28:29),a(2),c(r.hasError("password")?30:-1),a(),c(r.mergeError()?31:-1),a(4),c(r.captchaEnabled()&&r.turnstileSiteKey()?35:-1),a(),c(r.captchaError()?36:-1),a(),u("disabled",r.isSubmitting()),h("aria-busy",r.isSubmitting()),a(),c(r.isSubmitting()?38:39),a(2),u("queryParams",r.resetPasswordQueryParams()))},dependencies:[ee,Y,U,j,J,W,Z,X,B,O,T],styles:[".heading[_ngcontent-%COMP%]{font-family:var(--font-family);font-size:30px;font-weight:700;color:var(--color-text-dark);line-height:37.5px;text-align:center;margin:0 0 4px;letter-spacing:-.025em}.subtitle[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:var(--color-text-secondary);line-height:21px;text-align:center;margin:0 0 20px}.required-instruction[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-dark);margin-bottom:16px;text-align:left}.form-group[_ngcontent-%COMP%]{margin-bottom:16px}label[_ngcontent-%COMP%]{display:block;font-size:14px;font-weight:600;color:var(--color-text-dark);line-height:21px;margin-bottom:6px;font-family:var(--font-family)}label.error-label[_ngcontent-%COMP%], .required[_ngcontent-%COMP%]{color:var(--color-error)}input[type=email][_ngcontent-%COMP%], input[type=password][_ngcontent-%COMP%], input[type=text][_ngcontent-%COMP%]{display:flex;height:36px;width:100%;font-family:var(--font-family);font-size:14px;font-weight:400;color:var(--color-text);background-color:var(--color-card-bg);border:1px solid #737373;border-radius:var(--radius-input);padding:8px 12px;line-height:20px;outline:none}input[type=email][_ngcontent-%COMP%]:focus, input[type=password][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus{box-shadow:0 0 0 2px var(--color-primary)}input[type=email].input-error[_ngcontent-%COMP%], input[type=password].input-error[_ngcontent-%COMP%], input[type=text].input-error[_ngcontent-%COMP%]{border-color:var(--color-error)}input[type=email].input-error[_ngcontent-%COMP%]:focus, input[type=password].input-error[_ngcontent-%COMP%]:focus, input[type=text].input-error[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 2px var(--color-error)}input[type=email][_ngcontent-%COMP%]::placeholder, input[type=password][_ngcontent-%COMP%]::placeholder, input[type=text][_ngcontent-%COMP%]::placeholder{color:#737373}input[type=email][_ngcontent-%COMP%]::-ms-reveal, input[type=email][_ngcontent-%COMP%]::-ms-clear, input[type=password][_ngcontent-%COMP%]::-ms-reveal, input[type=password][_ngcontent-%COMP%]::-ms-clear, input[type=text][_ngcontent-%COMP%]::-ms-reveal, input[type=text][_ngcontent-%COMP%]::-ms-clear{display:none}.password-wrapper[_ngcontent-%COMP%]{position:relative}.password-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-right:40px}.password-toggle[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;padding:4px;min-width:24px;min-height:24px;
1cursor:pointer;color:var(--color-toggle);display:flex;align-items:center;justify-content:center}.password-toggle[_ngcontent-%COMP%]:hover{color:var(--color-toggle-hover)}.password-toggle[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px;border-radius:2px}.legal-text[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);line-height:1.5;margin-top:16px;margin-bottom:0}.btn-primary[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;font-family:var(--font-family);font-size:16px;font-weight:700;color:#fff;background-color:var(--color-primary);border:1px solid var(--color-primary);border-radius:var(--radius-button);padding:8px 16px;min-height:36px;margin-top:16px;cursor:pointer;line-height:24px}.btn-primary[_ngcontent-%COMP%]:hover{background-color:var(--color-primary-hover);border-color:var(--color-primary-hover)}.btn-primary[_ngcontent-%COMP%]:disabled{pointer-events:none;opacity:.5}.error-message[_ngcontent-%COMP%]{font-size:13px;color:var(--color-error);margin-top:4px;line-height:1.4}.footer-text[_ngcontent-%COMP%]{color:var(--color-text-secondary);text-align:center;margin-top:24px;font-weight:500;font-size:16px}.footer-link[_ngcontent-%COMP%]{font-weight:600;color:var(--color-primary);text-decoration:underline}.social-auth-error[_ngcontent-%COMP%]{font-size:13px;color:var(--color-error);text-align:center;margin-top:12px;line-height:1.5}.magic-link-error[_ngcontent-%COMP%]{font-size:13px;color:var(--color-error);text-align:center;margin:0 0 16px;line-height:1.5}.captcha-error[_ngcontent-%COMP%]{font-size:13px;color:var(--color-error);margin:4px 0 0;line-height:1.5}.fields-note[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-muted);margin-bottom:16px;text-align:left}.subtitle[_ngcontent-%COMP%]{text-align:left}.merge-error[_ngcontent-%COMP%]{margin-bottom:12px}.captcha-fieldset[_ngcontent-%COMP%]{border:none;padding:0;margin:0;min-width:0;max-width:100%}.reset-password-link[_ngcontent-%COMP%]{display:block;text-align:center;margin-top:12px;font-family:var(--font-family);font-size:14px;color:var(--color-primary);text-decoration:underline}"]})};export{ae as MergeAccountComponent};
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.