1import{a as W}from"./chunk-TSAGDD3L.js";import"./chunk-2KLHVVXY.js";import{a as _}from"./chunk-SCWNZYRH.js";import{d as D,g as O,h as z,j as Z,l as j,o as q,v as Q,w as J}from"./chunk-7RCWNHPV.js";import{b as K}from"./chunk-UVZTK3KN.js";import{a as H}from"./chunk-YW6DWN4T.js";import{m as S,p as L}from"./chunk-PT5IPMWH.js";import"./chunk-M6TI2MTM.js";import{p as M,q as y}from"./chunk-ICEETNFI.js";import{a as G}from"./chunk-4KBURNX4.js";import{d as E}from"./chunk-G44W6JOE.js";import"./chunk-B6STJHB2.js";import"./chunk-PWUAYS4F.js";import"./chunk-YJKRYWMV.js";import{a as U}from"./chunk-HRYCQNPO.js";import"./chunk-ZDR3KJJS.js";import{a as R}from"./chunk-KTIPPCE2.js";import{o as $}from"./chunk-IVJ2I5VN.js";import{$b as g,Aa as f,Cb as w,E as k,Ec as m,Fc as F,Gb as V,J as B,Vc as b,Wc as x,Zb as C,dc as r,ea as u,ec as i,fc as a,gb as v,gc as c,hb as I,id as A,mb as n,nc as N,rc as T,s as d,sa as p,tc as l,za as h}from"./chunk-EN2B4KZW.js";import"./chunk-4KIXNS7N.js";function X(o,P){if(o&1&&c(0,"app-ghg-text-input",3),o&2){let t=l(2);r("control",t.phoneControl)}}function Y(o,P){if(o&1&&(i(0,"div",4)(1,"span",5),m(2,"PHONE NUMBER"),a(),c(3,"br"),i(4,"span",8),m(5),a()()),o&2){let t=l(2);n(5),F(t.mobileVerificationPhoneNumber)}}function ee(o,P){if(o&1){let t=N();i(0,"app-platypus-dialog",1),T("buttonClick",function(){h(t);let s=l();return f(s.continueClicked())})("exitButtonClick",function(){h(t);let s=l();return f(s.exitClicked())}),i(1,"form",2),C(2,X,1,1,"app-ghg-text-input",3)(3,Y,6,1,"div",4),i(4,"span",5),m(5,"BILLING ADDRESS -\xA0"),a(),i(6,"a",6),b(7,"async"),m(8,"Change Address"),a(),c(9,"address",7),b(10,"async"),a()()}if(o&2){let t=l();r("headerText",t.dialogHeaderMessage)("buttonDisabled",t.submitButtonDisabled)("showExitButton",!0),n(),r("formGroup",t.infoForm),n(),g(t.mustCollectPhoneNumber?2:3),n(4),r("href",x(7,7,t.updateAccountInfoLink$),I),n(3),r("innerHTML",x(10,9,t.formattedUserAddress$),v)}}var xe=(()=>{class o extends K{constructor(){super(),this.store=p(M),this.cdr=p(A),this.dialogRef=p(R),this.data=p(G),this.formattedUserAddress$=this.store.pipe(y(S),d(e=>_.formatAddress(e))),this.submitButtonDisabled=!0,this.updateAccountInfoLink$=this.store.pipe(y(L),k(e=>!!e),d(e=>H.getTicketUrl(E.zendesk.ticketFormIds.updateAccountInfo,e))),this.phoneControl=new Z("",{updateOn:"change"}),this.mustCollectPhoneNumber=this.data.mustCollectPhoneNumber,this.mobileVerificationPhoneNumber=this.getFormattedPhone(this.data.mobileVerificationPhoneNumber),this.dialogHeaderMessage=this.mustCollectPhoneNumber?"Please enter the following information to proceed":"Please confirm the following information to proceed",this.mustCollectPhoneNumber?(this.phoneControl.setValidators([D.required,D.minLength(14)]),this.phoneControl.valueChanges.pipe(B(300),u(this.destroyed$)).subscribe(()=>{let e=this.getFormattedPhone(this.phoneControl.value);this.phoneControl.setValue(e)})):this.phoneControl.setValue(this.mobileVerificationPhoneNumber,{emitEvent:!1}),this.infoForm=new z({phone:this.phoneControl}),this.infoForm.valueChanges.pipe(d(()=>this.infoForm.valid)).pipe(u(this.destroyed$)).subscribe(e=>{_.onNextEventLoop(()=>{this.submitButtonDisabled=!e,this.cdr.markForCheck()})})}ngAfterViewInit(){this.mobileVerificationPhoneNumber&&this.phoneControl.updateValueAndValidity()}exitClicked(){this.dialogRef.close()}continueClicked(){this.dialogRef.close(this.infoForm.value)}getFormattedPhone(t){let e=t?.replace(/\D/g,"")??"";return e.length===0?"":e.length<=3?e.replace(/^(\d{0,3})/,"($1)"):e.length<=6?e.replace(/^(\d{0,3})(\d{0,3})/,"($1) $2"):e.length<=10?e.replace(/^(\d{0,3})(\d{0,3})(\d{0,4})/,"($1) $2-$3"):e.substring(0,10).replace(/^(\d{0,3})(\d{0,3})(\d{0,4})/,"($1) $2-$3")}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=w({type:o,selectors:[["app-pay-by-bank-info-dialog"]],features:[V],decls:1,vars:1,consts:[["buttonText","Continue","formID","payment-info-form",3,"headerText","buttonDisabled","showExitButton"],["buttonText","Continue","formID","payment-info-form",3,"buttonClick","exitButtonClick","headerText","buttonDisabled","showExitButton"],["body","","id","payment-info-form",1,"max-w-400px",3,"formGroup"],["maxlength","14","id","phone","autocomplete","tel","placeholder","Phone","labelText","Phone Number",1,"w-100",3,"control"],[1,"mb-2"],[1,"font-weight-bold","fs-12px","mt-3","d-inline-block"],["target","_blank","rel","noopener noreferrer",1,"fs-12px","font-weight-bold",3,"href"],[1,"font-weight-bold","mb-0",3,"innerHTML"],[1,"font-weight-bold"]],template:function(e,s){e&1&&C(0,ee,11,11,"app-platypus-dialog",0),e&2&&g(s.infoForm?0:-1)},dependencies:[U,Q,j,O,J,q,W,$],styles:["a[_ngcontent-%COMP%]{text-decoration:underline;color:var(--c-white)}a[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0})}}return o}
1)();export{xe as PayByBankInfoDialogComponent};
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.