1"use strict";(self.webpackChunkaccount_settings=self.webpackChunkaccount_settings||[]).push([[1230],{44687:(I,p,a)=>{a.d(p,{g:()=>v});var s=a(19212),u=a(24438),r=a(96814);function c(i,d){if(1&i&&(s.TgZ(0,"div",1)(1,"div",2)(2,"div",3),s._uU(3),s.qZA()()()),2&i){const e=s.oxw();s.xp6(3),s.Oqu(e.errorMsg)}}let v=(()=>{class i{constructor(e){this.csrfTokenService=e,this.isUnauthorized=!1,this.isUnauthorizedFormName=null,this.errorMsg="This session has expired. Please refresh and try again.",this.formName=null}ngOnInit(){this.csrfTokenService.isUnauthorized$.subscribe(e=>{"boolean"==typeof e?this.isUnauthorized=e:"object"==typeof e&&e&&(this.isUnauthorized=e.isUnauthorized,this.isUnauthorizedFormName=e.isUnauthorizedFormName)})}static{this.\u0275fac=function(m){return new(m||i)(s.Y36(u.A))}}static{this.\u0275cmp=s.Xpm({type:i,selectors:[["account-csrf-error-message"]],inputs:{errorMsg:"errorMsg",formName:"formName"},decls:1,vars:1,consts:[["class","csrf-error-message-container site-alert-danger alert alert-info","role","alert",4,"ngIf"],["role","alert",1,"csrf-error-message-container","site-alert-danger","alert","alert-info"],[1,"alert-content"],[1,"alert-description"]],template:function(m,f){1&m&&s.YNc(0,c,4,1,"div",0),2&m&&s.Q6J("ngIf",f.isUnauthorized&&!f.formName||f.isUnauthorized&&f.formName&&f.formName==f.isUnauthorizedFormName)},dependencies:[r.O5],encapsulation:2})}}return i})()},41384:(I,p,a)=>{a.d(p,{T:()=>v});var s=a(19212),u=a(87163),r=a(96814);function c(i,d){if(1&i&&(s.TgZ(0,"div"),s._uU(1),s.qZA()),2&i){const e=s.oxw();s.xp6(),s.hij(" ",e.errorMessage," ")}}let v=(()=>{class i{constructor(e){this.ValidationService=e,this.errorDefs={},this.errorMessage=""}ngOnChanges(e){const m=e.inputErrors.currentValue;this.errorMessage="",m&&Object.keys(m).some(f=>{if(m[f])return this.errorMessage=this.errorDefs[f]?this.errorDefs[f]:this.ValidationService.getValidatorErrorMessage(f),!0})}static{this.\u0275fac=function(m){return new(m||i)(s.Y36(u.R))}}static{this.\u0275cmp=s.Xpm({type:i,selectors:[["input-error-message"]],inputs:{errorDefs:"errorDefs",inputErrors:"inputErrors"},features:[s.TTD],decls:1,vars:1,consts:[[4,"ngIf"]],template:function(m,f){1&m&&s.YNc(0,c,2,1,"div",0),2&m&&s.Q6J("ngIf",f.errorMessage)},dependencies:[r.O5],encapsulation:2})}}return i})()},73555:(I,p,a)=>{a.d(p,{E:()=>r});var s=a(19212),u=a(40285);let r=(()=>{class c{constructor(i){this.ngControl=i,this.el=i}onChange(){this.el.control.patchValue(this.el.control.value.trim())}static{this.\u0275fac=function(d){return new(d||c)(s.Y36(u.a5))}}static{this.\u0275dir=s.lG2({type:c,selectors:[["","no-whitespace",""]],hostBindings:function(d,e){1&d&&s.NdJ("change",function(){return e.onChange()})}})}}return c})()},52996:(I,p,a)=>{a.d(p,{v:()=>r});var s=a(19212),u=a(40285);let r=(()=>{class c{constructor(i){this.ngControl=i,this.el=i}onChange(){const e=this.el.control.value.replace(/\D/g,"").replace(/^1+/,"").match(/(\d{0,3})(\d{0,3})(\d{0,4})/);this.el.control.patchValue(e[2]?"("+e[1]+") "+e[2]+(e[3]?"-"+e[3]:""):e[1])}static{this.\u0275fac=function(d){return new(d||c)(s.Y36(u.a5))}}static{this.\u0275dir=s.lG2({type:c,selectors:[["","phone-mask",""]],hostBindings:function(d,e){1&d&&s.NdJ("change",function(){return e.onChange()})}})}}return c})()},10802:(I,p,a)=>{function s(){return u=>0!==("string"==typeof u.value?u.value:"").trim().length?null:{whitespace:!0}}a.d(p,{o:()=>s})},18771:(I,p,a)=>{function s(){return u=>{let c=!0;return typeof u.value<"u"&&u.value&&(c=!u.value.match(/[^\s\w\u00c0-\u017e,.:&\/#()+%'`@-]/)),c?null:{scripts:!0}}}a.d(p,{i:()=>s})},71230:(I,p,a)=>{a.r(p),a.d(p,{ContactInfo2Module:()=>ee});var s=a(96814),u=a(3609),r=a(40285),c=a(18771),v=a(10802),i=a(74420),d=a(36358),e=a(19212),m=a(33727),f=a(14097),F=a(72026),Z=a(39346),T=a(59169),U=a(24438),x=a(70923),M=a(41384),y=a(52996),D=a(73555),N=a(44687);const J=(n,l)=>({"account-alert-success":n,"site-alert-danger":l}),A=(n,l)=>({"account-i-check":n,"account-i-warning":l});function L(n,l){if(1&n&&(e.TgZ(0,"div",28)(1,"span",29),e._UZ(2,"div",30),e.qZA(),e.TgZ(3,"span",31),e._uU(4),e.qZA()()),2&n){const o=e.oxw();e.Q6J("ngClass",e.WLB(3,J,o.validatingEmail,!o.validatingEmail)),e.xp6(2),e.Q6J("ngClass",e.WLB(6,A,o.validatingEmail,!o.validatingEmail)),e.xp6(2),e.hij(" ",o.updateMessage," ")}}function Q(n,l){1&n&&e._UZ(0,"span",32)}function B(n,l){if(1&n&&e._UZ(0,"input-error-message",33),2&n){const o=e.oxw();e.Q6J("inputErrors",o.contactInfoForm.get("email").errors)("errorDefs",o.validationMessages.email)}}function b(n,l){1&n&&e._UZ(0,"span",32)}function W(n,l){if(1&n&&e._UZ(0,"input-error-message",33),2&n){const o=e.oxw();e.Q6J("inputErrors",o.contactInfoForm.get("first_name").errors)("errorDefs",o.validationMessages.first_name)}}function O(n,l){1&n&&e._UZ(0,"span",32)}function V(n,l){if(1&n&&e._UZ(0,"input-error-message",33),2&n){const o=e.oxw();e.Q6J("inputErrors",o.contactInfoForm.get("last_name").errors)("errorDefs",o.validationMessages.last_name)}}function w(n,l){1&n&&e._UZ(0,"span",32)}function P(n,l){if(1&n&&e._UZ(0,"input-error-message",33),2&n){const o=e.oxw();e.Q6J("inputErrors",o.contactInfoForm.get("company_name").errors)("errorDefs",o.validationMessages.company_name)}}function S(n,l){1&n&&e._UZ(0,"span",32)}function Y(n,l){if(1&n&&e._UZ(0,"input-error-message",33),2&n){const o=e.oxw();e.Q6J("inputErrors",o.contactInfoForm.get("phone").errors)("errorDefs",o.validationMessages.phone)}}function k(n,l){1&n&&e._UZ(0,"span",32)}function R(n,l){if(1&n&&e._UZ(0,"input-error-message",34),2&n){const o=e.oxw();e.Q6J("inputErrors",o.contactInfoForm.get("phone_ext").errors)("errorDefs",o.validationMessages.phone_ext)}}function z(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function q(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",35),e._uU(2," Updating... "),e.TgZ(3,"span",36),e._uU(4,"Updating. Please wait."),e.qZA()())}const g=(n,l)=>({error:n,valid:l}),K=(n,l)=>({"has-error":n,"has-value":l}),j=(n,l)=>({"show-error":n,"has-value":l}),H=[{path:"",component:(()=>{class n{constructor(o,h,t,_,C,E,te){this.customerService=o,this.RefreshTokenService=h,this.AuthService=t,this.ConfigManagerService=_,this.ValidateEmailService=C,this.csrfTokenService=E,this.DataLayerService=te,this.processingRequest=!1,this.validatingEmail=!0,this.isLoading=!1,this.validationMessages={first_name:{required:"First name is required.",scripts:"Invalid Format.",validInput:"Invalid Format."},last_name:{required:"Last name is required.",scripts:"Invalid Format.",validInput:"Invalid Format."},email:{required:"Email is required.",email:"Invalid Email.",whitespace:"Email address is required.",scripts:"Invalid Email."},company_name:{scripts:"Invalid Character.",maxlength:"Company name must not exceed 100 characters."},phone:{required:"Phone is required.",minlength:"Phone is invali
1d.",whitespace:"Phone is required."},phone_ext:{pattern:"Ext is invalid.",scripts:"Ext is invalid."}},this.csrfToken=null,this.csrfTokenFormName="settings-update-contact-info",this.settingsConfig=this.ConfigManagerService.getConfig("settings")}ngOnInit(){this.buildForm(),this.getCustomerInfo(),this.contactInfoLabel=this.settingsConfig.contact_information.label,this.csrfTokenService.emitUnauthorized(!1),this.csrfTokenService.getToken(this.csrfTokenFormName).subscribe(o=>{this.csrfToken=o})}buildForm(){this.contactInfoForm=new r.cw({first_name:new r.NI("",[r.kI.required,(0,v.o)(),(0,c.i)(),(0,d.Z)()]),last_name:new r.NI("",[r.kI.required,(0,v.o)(),(0,c.i)(),(0,d.Z)()]),email:new r.NI("",[r.kI.required,(0,i.L)(),(0,v.o)(),(0,c.i)(),r.kI.email]),company_name:new r.NI("",[(0,c.i)(),r.kI.maxLength(this.settingsConfig.contact_information.max_company_length)]),phone:new r.NI("",[r.kI.required,r.kI.maxLength(this.settingsConfig.contact_information.max_phone_length),r.kI.minLength(this.settingsConfig.contact_information.min_phone_length),(0,c.i)()]),phone_ext:new r.NI("",[(0,c.i)()])})}getCustomerInfo(){this.isLoading=!0,this.customerService.getCustomer().subscribe(o=>{o.status&&(this.customerEmail=o.data.email,this.contactInfoForm.patchValue({email:o.data.email,first_name:o.data.first_name,last_name:o.data.last_name,company_name:o.data.company_name?o.data.company_name:"",phone:o.data.phone?o.data.phone:"",phone_ext:o.data.phone_ext?o.data.phone_ext:""})),this.isLoading=!1})}validateEmail(){return this.ValidateEmailService.validate(this.contactInfoForm.value.email)}showControlError(o){return this.contactInfoForm.get(o).invalid&&this.contactInfoForm.get(o).touched}hasValue(o){return this.contactInfoForm.get(o).value}onBlurTrim(o){this.contactInfoForm.patchValue({[o]:this.contactInfoForm.value[o].trim()})}updateContactInformation(){this.processingRequest=!0,this.validatingEmail=!0,this.isLoading=!0,this.updateMessage="",this.contactInfoForm.valid&&this.validateEmail().subscribe(o=>{if("login"==o.action&&this.customerEmail!=this.contactInfoForm.value.email)this.validationMessages.email.email="Email is already in use.",this.contactInfoForm.get("email").setErrors({email:!0});else{if(this.csrfTokenService.emitUnauthorized(!1),!this.csrfToken)return this.csrfTokenService.emitUnauthorized(!0),!1;const h={...this.contactInfoForm.value,csrfToken:this.csrfToken,csrfTokenFormName:this.csrfTokenFormName};this.DataLayerService.logDataLayerEvent({event:"Update_preferences_initiated",event_category:"Update_preferences",event_action:"Update_preferences",event_label:"Contact Information"}),this.customerService.updateCustomer(h).subscribe(t=>{if(t.status){this.customerEmail=this.contactInfoForm.value.email,this.updateMessage="Your Account has been updated!",this.customerService.customerName.next(this.contactInfoForm.value.first_name),this.updateAccessToken();const _=document.querySelector(".customer-firstname");_&&(_.textContent=this.contactInfoForm.value.first_name),this.DataLayerService.logDataLayerEvent({event:"Update_preferences_completed",event_category:"Update_preferences",event_action:"Update_preferences_completed",event_label:"Contact Information"})}},t=>{if(412==t.status&&t.error.detail){const _=[];for(const C in t.error.detail)for(const E in t.error.detail[C])_.push(t.error.detail[C][E]);this.updateMessage=_.join(", "),this.validatingEmail=!1}403==t.status&&this.csrfTokenService.emitUnauthorized(!0)})}this.processingRequest=!1,this.isLoading=!1})}updateAccessToken(){this.RefreshTokenService.refreshAccessToken().subscribe(o=>{this.AuthService.setAccessToken(o.access_token,o.expires_in)})}static{this.\u0275fac=function(h){return new(h||n)(e.Y36(m.v),e.Y36(f.$),e.Y36(F.e),e.Y36(Z.Q),e.Y36(T._),e.Y36(U.A),e.Y36(x.n))}}static{this.\u0275cmp=e.Xpm({type:n,selectors:[["app-contact-info-2"]],decls:65,vars:70,consts:[[1,"page-contact-info-container"],["class","account-contact-info-alert","tabindex","0","role","alert",3,"ngClass",4,"ngIf"],["tabindex","0",1,"contact-info-label","first-focus-element"],["autocomplete","off",1,"contact-info-form-container",3,"formGroup","submit"],[1,"account-input-group"],[1,"account-input-label-container"],["for","email",1,"account-input-label"],[1,"account-input",3,"ngClass"],["type","text","email","","formControlName","email","maxlength","50","name","email","id","email","no-whitespace","","autocomplete","off",3,"blur"],["class","input-error-icon fa fa-exclamation-triangle",4,"ngIf"],[1,"account-input-message",3,"ngClass"],["tabindex","0","role","alert",3,"inputErrors","errorDefs",4,"ngIf"],["for","first_name",1,"account-input-label"],["type","text","no-whitespace","","formControlName","first_name","name","first_name","
1id","first_name","maxlength","30"],["for","last_name",1,"account-input-label"],["type","text","no-whitespace","","formControlName","last_name","id","last_name","name","last_name","maxlength","30"],["for","company_name",1,"account-input-label"],["type","text","formControlName","company_name","maxlength","100","id","company_name","name","company_name","no-whitespace",""],[1,"account-input-group","phone-ext-container"],["for","phone",1,"account-input-label"],[1,"account-input-holder"],["type","text","phone-mask","","formControlName","phone","id","phone","name","phone","maxlength","14"],["for","phone_ext",1,"account-input-label"],["type","text","formControlName","phone_ext","id","phone_ext","name","phone_ext","maxlength","4","pattern","[0-9]{1,4}",3,"ngClass"],[3,"inputErrors","errorDefs",4,"ngIf"],[1,"contact-info-form-submit-btn","account-btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["processing",""],["tabindex","0","role","alert",1,"account-contact-info-alert",3,"ngClass"],[1,"account-alert-icon"],[3,"ngClass"],[1,"account-alert-title"],[1,"input-error-icon","fa","fa-exclamation-triangle"],["tabindex","0","role","alert",3,"inputErrors","errorDefs"],[3,"inputErrors","errorDefs"],[1,"fa","fa-spinner","fa-spin"],["role","alert",1,"accessibility-hidden"]],template:function(h,t){if(1&h&&(e.TgZ(0,"div",0),e.YNc(1,L,5,9,"div",1),e.TgZ(2,"h3",2),e._uU(3),e.qZA(),e.TgZ(4,"form",3),e.NdJ("submit",function(){return t.updateContactInformation()}),e._UZ(5,"account-csrf-error-message"),e.TgZ(6,"div",4)(7,"div",5)(8,"label",6),e._uU(9,"Email"),e.qZA()(),e.TgZ(10,"div",7)(11,"input",8),e.NdJ("blur",function(){return t.onBlurTrim("email")}),e.qZA(),e.YNc(12,Q,1,0,"span",9),e.TgZ(13,"div",10),e.YNc(14,B,1,2,"input-error-message",11),e.qZA()()(),e.TgZ(15,"div",4)(16,"div",5)(17,"label",12),e._uU(18,"First Name"),e.qZA()(),e.TgZ(19,"div",7),e._UZ(20,"input",13),e.YNc(21,b,1,0,"span",9),e.TgZ(22,"div",10),e.YNc(23,W,1,2,"input-error-message",11),e.qZA()()(),e.TgZ(24,"div",4)(25,"div",5)(26,"label",14),e._uU(27,"Last Name"),e.qZA()(),e.TgZ(28,"div",7),e._UZ(29,"input",15),e.YNc(30,O,1,0,"span",9),e.TgZ(31,"div",10),e.YNc(32,V,1,2,"input-error-message",11),e.qZA()()(),e.TgZ(33,"div",4)(34,"div",5)(35,"label",16),e._uU(36,"Company"),e.qZA()(),e.TgZ(37,"div",7),e._UZ(38,"input",17),e.YNc(39,w,1,0,"span",9),e.TgZ(40,"div",10),e.YNc(41,P,1,2,"input-error-message",11),e.qZA()()(),e.TgZ(42,"div",18)(43,"div",5)(44,"label",19),e._uU(45,"Phone"),e.qZA()(),e.TgZ(46,"div",20)(47,"div",7),e._UZ(48,"input",21),e.YNc(49,S,1,0,"span",9),e.TgZ(50,"div",10),e.YNc(51,Y,1,2,"input-error-message",11),e.qZA()(),e.TgZ(52,"div",4)(53,"div",5)(54,"label",22),e._uU(55,"Ext."),e.qZA()(),e.TgZ(56,"div",7),e._UZ(57,"input",23),e.YNc(58,k,1,0,"span",9),e.TgZ(59,"div",10),e.YNc(60,R,1,2,"input-error-message",24),e.qZA()()()()(),e.TgZ(61,"button",25),e.YNc(62,z,2,0,"span",26)(63,q,5,0,"ng-template",null,27,e.W1O),e.qZA()()()),2&h){const _=e.MAs(64);e.xp6(),e.Q6J("ngIf",t.updateMessage),e.xp6(2),e.Oqu(t.contactInfoLabel),e.xp6(),e.Q6J("formGroup",t.contactInfoForm),e.xp6(6),e.Q6J("ngClass",e.WLB(31,g,t.showControlError("email"),t.hasValue("email"))),e.xp6(2),e.Q6J("ngIf",t.contactInfoForm.get("email").invalid&&t.contactInfoForm.get("email").touched),e.xp6(),e.Q6J("ngClass",e.WLB(34,g,t.showControlError("email"),t.hasValue("email"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("email").invalid&&t.contactInfoForm.get("email").touched),e.xp6(5),e.Q6J("ngClass",e.WLB(37,g,t.showControlError("first_name"),t.hasValue("first_name"))),e.xp6(2),e.Q6J("ngIf",t.contactInfoForm.get("first_name").invalid&&t.contactInfoForm.get("first_name").touched),e.xp6(),e.Q6J("ngClass",e.WLB(40,g,t.showControlError("first_name"),t.hasValue("first_name"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("first_name").invalid&&t.contactInfoForm.get("first_name").touched),e.xp6(5),e.Q6J("ngClass",e.WLB(43,g,t.showControlError("last_name"),t.hasValue("last_name"))),e.xp6(2),e.Q6J("ngIf",t.contactInfoForm.get("last_name").invalid&&t.contactInfoForm.get("last_name").touched),e.xp6(),e.Q6J("ngClass",e.WLB(46,g,t.showControlError("last_name"),t.hasValue("last_name"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("last_name").invalid&&t.contactInfoForm.get("last_name").touched),e.xp6(
15),e.Q6J("ngClass",e.WLB(49,g,t.showControlError("company_name"),t.hasValue("company_name"))),e.xp6(2),e.Q6J("ngIf",t.contactInfoForm.get("company_name").invalid&&t.contactInfoForm.get("company_name").touched),e.xp6(),e.Q6J("ngClass",e.WLB(52,g,t.showControlError("company_name"),t.hasValue("company_name"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("company_name").invalid&&t.contactInfoForm.get("company_name").touched),e.xp6(6),e.Q6J("ngClass",e.WLB(55,g,t.showControlError("phone"),t.hasValue("phone"))),e.xp6(2),e.Q6J("ngIf",t.contactInfoForm.get("phone").invalid&&t.contactInfoForm.get("phone").touched),e.xp6(),e.Q6J("ngClass",e.WLB(58,g,t.showControlError("phone"),t.hasValue("phone"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("phone").invalid&&t.contactInfoForm.get("phone").touched),e.xp6(5),e.Q6J("ngClass",e.WLB(61,g,t.showControlError("phone_ext"),t.hasValue("phone_ext"))),e.xp6(),e.Q6J("ngClass",e.WLB(64,K,t.showControlError("phone_ext"),t.hasValue("phone_ext"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("phone_ext").invalid&&t.contactInfoForm.get("phone_ext").touched),e.xp6(),e.Q6J("ngClass",e.WLB(67,j,t.showControlError("phone_ext"),t.hasValue("phone_ext"))),e.xp6(),e.Q6J("ngIf",t.contactInfoForm.get("phone_ext").invalid&&t.contactInfoForm.get("phone_ext").touched),e.xp6(),e.Q6J("disabled",!t.contactInfoForm.valid||t.processingRequest),e.xp6(),e.Q6J("ngIf",!t.processingRequest)("ngIfElse",_)}},dependencies:[s.mk,s.O5,r._Y,r.Fj,r.JJ,r.JL,r.nD,r.c5,r.on,r.sg,r.u,i.f,M.T,y.v,D.E,N.g],encapsulation:2})}}return n})()}];let G=(()=>{class n{static{this.\u0275fac=function(h){return new(h||n)}}static{this.\u0275mod=e.oAB({type:n})}static{this.\u0275inj=e.cJS({imports:[u.Bz.forChild(H),u.Bz]})}}return n})();var X=a(20434),$=a(38168);let ee=(()=>{class n{static{this.\u0275fac=function(h){return new(h||n)}}static{this.\u0275mod=e.oAB({type:n})}static{this.\u0275inj=e.cJS({providers:[T._],imports:[s.ez,G,r.u5,r.UX,X.b,$.r]})}}return n})()}}]);
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.