PageSourceSearch

https://telemach.me/account/3650-es2015.ab1f69bde02a68c5155b.js

js telemach.me collected 2026-10-08 09:04:33 UTC 45,964 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunke_care=self.webpackChunke_care||[]).push([[3650],{63650:function(e,i,t){t.r(i),t.d(i,{EBillManagementModule:function(){return Be}});var l=t(38583),s=t(54655),n=t(41075),o=t(49326),a=t(25885),r=t(3172),c=(()=>{return(e=c||(c={})).E_BILL_ON_EMAIL="E",e.E_INVOICE_ON_EMAIL="YES",e.E_INVOICE="Y",c;var e})(),d=t(37716),g=t(22238),u=t(8481),m=t(26684),b=t(34541),f=t(76358),h=t(4885),v=t(45396),p=t(3679),B=t(85531),E=t(35458),S=t(28497),C=t(98295),I=t(83166),A=t(29790);function Z(e,i){if(1&e){const e=d.EpF();d.TgZ(0,"div",4),d.TgZ(1,"div",5),d.TgZ(2,"p",6),d._uU(3),d.ALo(4,"translate"),d.qZA(),d.qZA(),d.TgZ(5,"div",7),d.TgZ(6,"mat-slide-toggle",8),d.NdJ("change",function(i){return d.CHM(e),d.oxw().toggleCheckbox(i,"haveItemizedInvoice")}),d.qZA(),d.qZA(),d.qZA()}2&e&&(d.xp6(3),d.Oqu(d.lcZ(4,1,"bills.manageEBillSettings.haveItemisedBills")))}function L(e,i){1&e&&(d.TgZ(0,"mat-error",21),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"errorRequired")," "))}function x(e,i){if(1&e&&(d.ynx(0),d.YNc(1,L,3,3,"mat-error",20),d.BQk()),2&e){const e=d.oxw(2);d.xp6(1),d.Q6J("ngIf",e.disabledEBillForm.controls.postalCode.errors&&e.disabledEBillForm.controls.postalCode.errors.required)}}function F(e,i){1&e&&(d.TgZ(0,"mat-error",21),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"errorRequired")," "))}function T(e,i){if(1&e&&(d.ynx(0),d.YNc(1,F,3,3,"mat-error",20),d.BQk()),2&e){const e=d.oxw(2);d.xp6(1),d.Q6J("ngIf",e.disabledEBillForm.controls.city.errors&&e.disabledEBillForm.controls.city.errors.required)}}function y(e,i){1&e&&(d.TgZ(0,"mat-error",21),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"errorRequired")," "))}function q(e,i){if(1&e&&(d.ynx(0),d.YNc(1,y,3,3,"mat-error",20),d.BQk()),2&e){const e=d.oxw(2);d.xp6(1),d.Q6J("ngIf",e.disabledEBillForm.controls.area.errors&&e.disabledEBillForm.controls.area.errors.required)}}function k(e,i){1&e&&(d.TgZ(0,"mat-error",21),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"errorRequired")," "))}function D(e,i){if(1&e&&(d.ynx(0),d.YNc(1,k,3,3,"mat-error",20),d.BQk()),2&e){const e=d.oxw(2);d.xp6(1),d.Q6J("ngIf",e.disabledEBillForm.controls.street.errors&&e.disabledEBillForm.controls.street.errors.required)}}function N(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",9),d.TgZ(2,"div",5),d.TgZ(3,"p",6),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.qZA(),d.TgZ(6,"div",7),d.TgZ(7,"mat-slide-toggle",10),d.NdJ("change",function(i){return d.CHM(e),d.oxw().toggleCheckbox(i,"settingsForAll")}),d.qZA(),d.qZA(),d.qZA(),d.TgZ(8,"p",11),d._uU(9),d.ALo(10,"translate"),d.qZA(),d.TgZ(11,"div",12),d.TgZ(12,"mat-form-field",13),d.TgZ(13,"label"),d._uU(14),d.ALo(15,"translate"),d.qZA(),d.TgZ(16,"input",14),d.NdJ("input",function(){return d.CHM(e),d.oxw().onInput()}),d.qZA(),d.qZA(),d.YNc(17,x,2,1,"ng-container",3),d.qZA(),d.TgZ(18,"div",12),d.TgZ(19,"mat-form-field",13),d.TgZ(20,"label"),d._uU(21),d.ALo(22,"translate"),d.qZA(),d.TgZ(23,"input",15),d.NdJ("input",function(){return d.CHM(e),d.oxw().onInput()}),d.qZA(),d.qZA(),d.YNc(24,T,2,1,"ng-container",3),d.qZA(),d.TgZ(25,"div",12),d.TgZ(26,"mat-form-field",13),d.TgZ(27,"label"),d._uU(28),d.ALo(29,"translate"),d.qZA(),d.TgZ(30,"input",16),d.NdJ("input",function(){return d.CHM(e),d.oxw().onInput()}),d.qZA(),d.qZA(),d.YNc(31,q,2,1,"ng-container",3),d.qZA(),d.TgZ(32,"div",12),d.TgZ(33,"mat-form-field",13),d.TgZ(34,"label"),d._uU(35),d.ALo(36,"translate"),d.qZA(),d.TgZ(37,"input",17),d.NdJ("input",function(){return d.CHM(e),d.oxw().onInput()}),d.qZA(),d.qZA(),d.YNc(38,D,2,1,"ng-container",3),d.qZA(),d.TgZ(39,"div",18),d.TgZ(40,"mat-form-field",13),d.TgZ(41,"label"),d._uU(42),d.ALo(43,"translate"),d.qZA(),d.TgZ(44,"input",19),d.NdJ("input",function(){return d.CHM(e),d.oxw().onInput()}),d.qZA(),d.qZA(),d.qZA(),d.BQk()}if(2&e){const e=d.oxw();d.xp6(4),d.Oqu(d.lcZ(5,11,"bills.manageEBillSettings.useSettingsForAllCustomers")),d.xp6(5),d.Oqu(d.lcZ(10,13,"bills.manageEBillSettings.provideAddressForDelivery")),d.xp6(5),d.Oqu(d.lcZ(15,15,"bills.manageEBillSettings.postalCode")),d.xp6(3),d.Q6J("ngIf",e.formSubmitted),d.xp6(4),d.Oqu(d.lcZ(22,17,"bills.manageEBillSettings.city")),d.xp6(3),d.Q6J("ngIf",e.formSubmitted),d.xp6(4),d.Oqu(d.lcZ(29,19,"bills.manageEBillSettings.area")),d.xp6(3),d.Q6J("ngIf",e.formSubmitted),d.xp6(4),d.Oqu(d.lcZ(36,21,"bills.manageEBillSettings.street")),d.xp6(3),d.Q6J("ngIf",e.formSubmitted),d.xp6(4),d.Oqu(d.lcZ(43,23,"bills.manageEBillSettings.streetNumber"))}}let O=(()=>{class e{constructor(e,i,t,l,s,n){this.trs=e,this.formBuilder=i,this.billsCustomerService=t,this.dialog=l,this.customerService=s,this.gtmService=n,this.config=a.v,this.formSubmitted=!1}ngOnInit(){var e;const i=null===(e=this.billsCustomerService.customerAddressData)||void 0===e?void 0:e.find(e=>{var i;return"HOME"===(null===(i=e.AddressData)||void 0===i?void 0:i.addressType)});this.disabledEBillForm=this.formBuilder.group({haveItemizedInvoice:["NO"!==this.billSettings.itemizedInvoice],settingsForAll:[!1],postalCode:[null==i?void 0:i.AddressData.zipCode,[p.kI.required]],city:[null==i?void 0:i.AddressData.city,[p.kI.required]],area:[""],street:[null==i?void 0:i.AddressData.street,[p.kI.required]],streetNo:[null==i?void 0:i.AddressData.streetNumber]}),console.log("billSettings",this.billSettings)}ngOnChanges(){this.checkIsFormSubmitted()}onInput(){this.formSubmitted=!1,this.billsCustomerService.isEBillDeactivateFormEmpty=!(this.disabledEBillForm.controls.postalCode.value||this.disabledEBillForm.controls.city.value||this.disabledEBillForm.controls.area.value||this.disabledEBillForm.controls.street.value||this.disabledEBillForm.controls.streetNo.value)}checkIsFormSubmitted(){console.log("this.isSubmitButtonClicked",this.isSubmitButtonClicked),this.isSubmitButtonClicked&&this.formClicked&&"disabledEBillForm"===this.formClicked&&this.checkFormSubmit()}toggleCheckbox(e,i){this.disabledEBillForm.controls[i].setValue(e.checked)}checkFormSubmit(){if(this.disabledEBillForm&&this.disabledEBillForm.invali
1d&&"RS"!==a.v.defaultLang)return this.formSubmitted=!0,console.log("this.disabledEBillForm",this.disabledEBillForm),void console.log("errors",this.disabledEBillForm.errors);this.disabledEBillForm&&(this.formSubmitted=!0,console.log("form is ok",this.disabledEBillForm),this.submitForm())}submitForm(){const e={zipCode:this.disabledEBillForm.controls.postalCode.value,city:this.disabledEBillForm.controls.city.value,area:this.disabledEBillForm.controls.area.value,street:this.disabledEBillForm.controls.street.value,streetNo:this.disabledEBillForm.controls.streetNo.value,settingsForAll:this.disabledEBillForm.controls.settingsForAll.value};this.billsCustomerService.updateManageEBillSettingsInProgress=!0,this.billsCustomerService.deactivateEBill(e).subscribe(e=>{e.status&&"OK"===e.status?(this.openConfirmationDialog("success"),this.eBillSettingsGtmSendAction()):this.openConfirmationDialog("error"),this.formSubmitted=!1,this.billsCustomerService.updateManageEBillSettingsInProgress=!1,this.disabledEBillForm.reset()},e=>{console.log("Error occurred while changing contact address"),this.openConfirmationDialog("error"),this.formSubmitted=!1,this.billsCustomerService.updateManageEBillSettingsInProgress=!1,this.disabledEBillForm.reset()})}eBillSettingsGtmSendAction(){var e,i;const t=(null===(i=null===(e=this.customerService)||void 0===e?void 0:e.selectedCustomer)||void 0===i?void 0:i.customerType)===B.A.BUSINESS?"business":"consumer",l={user_id:localStorage.getItem("notificationUuid"),account_type:t,ebill_activation:!1};this.gtmService.pushToDataLayer(E.V.SELFCARE_ACTIONS,l)}openConfirmationDialog(e){this.dialog.open(r.k,{width:"812px",hasBackdrop:!1,panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:"success"===e?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:this.trs.trsTs("success"===e?"success":"error"),desc:"success"===e?this.trs.trsTs("bills.manageBillAddresses.changeSuccessTitle"):"",desc2:this.trs.trsTs("success"===e?"bills.manageBillAddresses.changeSuccessDescription":"bills.manageBillAddresses.changeErrorDescription"),close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{"success"===e&&console.log("success on close dialog")})}}return e.\u0275fac=function(i){return new(i||e)(d.Y36(u.D),d.Y36(p.qu),d.Y36(f.$),d.Y36(g.uw),d.Y36(b.v),d.Y36(S.J))},e.\u0275cmp=d.Xpm({type:e,selectors:[["app-disabled-ebill"]],inputs:{isSubmitButtonClicked:"isSubmitButtonClicked",formClicked:"formClicked",billSettings:"billSettings"},features:[d.TTD],decls:4,vars:7,consts:[[3,"innerHTML"],["autocomplete","off",3,"formGroup"],["class","slide-wrapper mb-25",4,"ngIf"],[4,"ngIf"],[1,"slide-wrapper","mb-25"],[1,"left"],[1,"font-size-14","font-bold"],[1,"right"],["formControlName","haveItemizedInvoice",1,"global-mat-slide-toggle",3,"change"],[1,"slide-wrapper","mb-20"],["formControlName","settingsForAll",1,"global-mat-slide-toggle",3,"change"],[1,"font-bold","font-bold","mb-15"],[1,"form-field-holder","mb-20"],["floatLabel","never",1,"style-type-v3","reset-margin"],["matInput","","type","text","formControlName","postalCode","autocomplete","false",3,"input"],["matInput","","type","text","formControlName","city","autocomplete","false",3,"input"],["matInput","","type","text","formControlName","area","autocomplete","false",3,"input"],["matInput","","type","text","formControlName","street","autocomplete","false",3,"input"],[1,"form-field-holder","mb-40"],["matInput","","type","text","formControlName","streetNo","autocomplete","false",3,"input"],["class","ec-errors font-light font-size-12",4,"ngIf"],[1,"ec-errors","font-light","font-size-12"]],template:function(e,i){1&e&&(d._UZ(0,"p",0),d.TgZ(1,"form",1),d.YNc(2,Z,7,3,"div",2),d.YNc(3,N,45,25,"ng-container",3),d.qZA()),2&e&&(d.Gre("font-size-14 font-light ","BG"===i.config.defaultLang||"GR"===i.config.defaultLang?"mb-10":"mb-40",""),d.Q6J("innerHTML",i.trs.trsTs("bills.manageEBillSettings.disabledEBillDesc"),d.oJD),d.xp6(1),d.Q6J("formGroup",i.disabledEBillForm),d.xp6(1),d.Q6J("ngIf","BG"===i.config.defaultLang),d.xp6(1),d.Q6J("ngIf","BG"===i.config.defaultLang||"GR"===i.config.defaultLang))},directives:[p._Y,p.JL,p.sg,l.O5,v.Rr,p.JJ,p.u,C.KE,I.Nt,p.Fj,C.TO],pipes:[A.X$],styles:[""]}),e})();var G=t(25294),w=t(39181);function _(e,i){if(1&e&&d._UZ(0,"p",5),2&e){const e=d.oxw();d.Gre("font-size-14 font-light ","BG"===e.config.defaultLang||"GR"===e.config.defaultLang?"mb-10":"mb-40",""),d.Q6J("innerHTML",e.trs.trsTs("HR"===e.config.defaultLang&&"7"===(null==e.billSettings?null:e.billSettings.billDistributionChannel)?"bills.manageEBillSettings.enabledEBillDesc7":"bills.manageEBillSettings.enabledEBillDesc"),d.oJD)}}function J(e,i){if(1&e&&d._UZ(0,"p",5),2&e){const e=d.oxw();d.Gre("font-size-14 font-light ","BG"===e.config.defaultLang||"GR"===e.config.defaultLang?"mb-10":"mb-40",""),d.Q6J("innerHTML",e.trs.trsTs("bills.manageEBillSettings.disabledEBillDesc"),d.oJD)}}function Q(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",6),d.TgZ(2,"div",7),d.TgZ(3,"p",8),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.qZA(),d.TgZ(6,"div",9),d.TgZ(7,"mat-slide-toggle",10),d.NdJ("change",function(i){return d.CHM(e),d.oxw().changeEInvoice(i)}),d.qZA(),d.qZA(),d.qZA(),d.BQk()}
12&e&&(d.xp6(4),d.Oqu(d.lcZ(5,1,"bills.manageEBillSettings.receiveEInvoice")))}function R(e,i){1&e&&(d.TgZ(0,"mat-error",15),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"validationMessage.enterEmail")," "))}function M(e,i){if(1&e&&(d.ynx(0),d.YNc(1,R,3,3,"mat-error",14),d.BQk()),2&e){const e=d.oxw(2);d.xp6(1),d.Q6J("ngIf",e.enabledEBillForm.controls.email.errors&&e.enabledEBillForm.controls.email.errors.email)}}const Y=function(e){return{"disabled-input":e}};function z(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",11),d.TgZ(2,"mat-form-field",12),d.TgZ(3,"label"),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.TgZ(6,"input",13),d.NdJ("input",function(){return d.CHM(e),d.oxw().formSubmitted=!1}),d.qZA(),d.qZA(),d.YNc(7,M,2,1,"ng-container",2),d.qZA(),d.BQk()}if(2&e){const e=d.oxw();d.xp6(2),d.Q6J("ngClass",d.VKq(7,Y,"BG"===e.config.defaultLang&&!e.enabledEBillForm.controls.receiveEInvoice.value)),d.xp6(2),d.Oqu(d.lcZ(5,5,"bills.manageEBillSettings.emailToReceive")),d.xp6(2),d.Q6J("disabled","SI"!==e.config.defaultLang&&"BG"!==e.config.defaultLang||"BG"===e.config.defaultLang&&!e.enabledEBillForm.controls.receiveEInvoice.value)("readonly","SI"!==e.config.defaultLang&&"BG"!==e.config.defaultLang||"BG"===e.config.defaultLang&&!e.enabledEBillForm.controls.receiveEInvoice.value),d.xp6(1),d.Q6J("ngIf",e.formSubmitted)}}function H(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",7),d.TgZ(2,"p",8),d._uU(3),d.ALo(4,"translate"),d.ALo(5,"translate"),d.qZA(),d.qZA(),d.TgZ(6,"div",9),d.TgZ(7,"mat-slide-toggle",16),d.NdJ("change",function(i){return d.CHM(e),d.oxw(2).changeReceiveEmail(i)}),d.qZA(),d.qZA(),d.BQk()}if(2&e){const e=d.oxw(2);d.xp6(3),d.hij(" ","HR"!==e.config.defaultLang&&"SI"!==e.config.defaultLang||!e.billsCustomerService.isActivateEBill?d.lcZ(5,5,"bills.manageEBillSettings.receiveEBillOnEmail"):d.lcZ(4,3,"bills.manageEBillSettings.enabledEBillService")," "),d.xp6(4),d.Q6J("checked",!("HR"!==e.config.defaultLang&&"SI"!==e.config.defaultLang||!e.billsCustomerService.isActivateEBill)||e.enabledEBillForm.controls.receiveEBillOnEmail.value)("disabled",("HR"===e.config.defaultLang||"SI"===e.config.defaultLang)&&e.billsCustomerService.isActivateEBill)}}function U(e,i){if(1&e&&(d.TgZ(0,"div"),d.YNc(1,H,8,7,"ng-container",2),d.qZA()),2&e){const e=d.oxw();d.Gre("slide-wrapper ","BG"===e.config.defaultLang?"mb-5":"mb-20",""),d.xp6(1),d.Q6J("ngIf","GR"!==e.config.defaultLang)}}
1function P(e,i){1&e&&(d.TgZ(0,"mat-error",15),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"validationMessage.enterEmail")," "))}function V(e,i){if(1&e&&(d.ynx(0),d.YNc(1,P,3,3,"mat-error",14),d.BQk()),2&e){const e=d.oxw(2);d.xp6(1),d.Q6J("ngIf",e.enabledEBillForm.controls.email2.errors&&e.enabledEBillForm.controls.email2.errors.email)}}function j(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",11),d.TgZ(2,"mat-form-field",12),d.TgZ(3,"label"),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.TgZ(6,"input",17),d.NdJ("input",function(i){return d.CHM(e),d.oxw().onEmailInputChange(i.target.value)}),d.qZA(),d.qZA(),d.YNc(7,V,2,1,"ng-container",2),d.qZA(),d.BQk()}if(2&e){const e=d.oxw();d.xp6(2),d.Q6J("ngClass",d.VKq(7,Y,"BG"===e.config.defaultLang&&!e.enabledEBillForm.controls.receiveEBillOnEmail.value)),d.xp6(2),d.Oqu(d.lcZ(5,5,"bills.manageEBillSettings.emailToReceive")),d.xp6(2),d.Q6J("disabled","BG"===e.config.defaultLang&&!e.enabledEBillForm.controls.receiveEBillOnEmail.value)("readonly","BG"===e.config.defaultLang&&!e.enabledEBillForm.controls.receiveEBillOnEmail.value),d.xp6(1),d.Q6J("ngIf",e.formSubmitted)}}function K(e,i){1&e&&(d.TgZ(0,"mat-error",15),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"errorRequired")," "))}function W(e,i){1&e&&(d.ynx(0),d.YNc(1,K,3,3,"mat-error",14),d.BQk()),2&e&&(d.xp6(1),d.Q6J("ngIf",!1))}function X(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",11),d.TgZ(2,"mat-form-field",18),d.TgZ(3,"label"),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.TgZ(6,"input",19),d.NdJ("input",function(){return d.CHM(e),d.oxw(2).formSubmitted=!1}),d.qZA(),d.qZA(),d.YNc(7,W,2,1,"ng-container",2),d.qZA(),d.BQk()}if(2&e){const e=d.oxw(2);d.xp6(4),d.Oqu(d.lcZ(5,3,"bills.manageEBillSettings.mobileNumberToReceive")),d.xp6(2),d.Q6J("readonly",!1),d.xp6(1),d.Q6J("ngIf",e.formSubmitted)}}function $(e,i){if(1&e&&(d.ynx(0),d.YNc(1,X,8,5,"ng-container",2),d.BQk()),2&e){const e=d.oxw();d.xp6(1),d.Q6J("ngIf","GR"===e.config.defaultLang||e.receiveOnSms)}}function ee(e,i){1&e&&(d.TgZ(0,"p",23),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"bills.manageEBillSettings.onlyMobPostpaidDesc")," "))}function ie(e,i){if(1&e){const e=d.EpF();d.TgZ(0,"div",20),d.TgZ(1,"div",7),d.TgZ(2,"p",8),d._uU(3),d.ALo(4,"translate"),d.qZA(),d.YNc(5,ee,3,3,"p",21),d.qZA(),d.TgZ(6,"div",9),d.TgZ(7,"mat-slide-toggle",22),d.NdJ("change",function(i){return d.CHM(e),d.oxw().toggleCheckbox(i,"haveItemizedInvoice")}),d.qZA(),d.qZA(),d.qZA()}if(2&e){const e=d.oxw();d.xp6(3),d.Oqu(d.lcZ(4,3,"bills.manageEBillSettings.haveItemisedBills")),d.xp6(2),d.Q6J("ngIf","BG"===e.config.defaultLang&&"not allowed"===(null==e.billSettings?null:e.billSettings.itemizedInvoice)),d.xp6(2),d.Q6J("disabled","BG"===e.config.defaultLang&&"not allowed"===(null==e.billSettings?null:e.billSettings.itemizedInvoice))}}function te(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"div",24),d.TgZ(2,"div",7),d.TgZ(3,"p",8),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.qZA(),d.TgZ(6,"div",9),d.TgZ(7,"mat-slide-toggle",25),d.NdJ("change",function(i){return d.CHM(e),d.oxw().toggleCheckbox(i,"settingsForAll")}),d.qZA(),d.qZA(),d.qZA(),d.BQk()}2&e&&(d.xp6(4),d.Oqu(d.lcZ(5,1,"bills.manageEBillSettings.useSettingsForAllCustomers")))}let le=(()=>{class e{constructor(e,i,t,l,s,n,o){this.trs=e,this.formBuilder=i,this.billsCustomerService=t,this.customerService=l,this.profileService=s,this.dialog=n,this.gtmService=o,this.config=a.v,this.inputChanged=new d.vpe,this.receiveOnSms=!0,this.formSubmitted=!1,this.itemizedBillNotAllowed=!1,this.copyFormDataGr={receiveEBillOnEmail:"",receiveEBillOnSms:!0,email2:"",phoneNumber:"",eBillChecked:!1,receiveOnSms:!1}}ngOnInit(){var e,i,t,l;"BG"===a.v.defaultLang&&"not allowed"===(null===(e=this.billSettings)||void 0===e?void 0:e.itemizedInvoice)&&(this.itemizedBillNotAllowed=!0);const s=(null===(i=this.billSettings)||void 0===i?void 0:i.billDistributionEmail)||(null===(t=this.billSettings)||void 0===t?void 0:t.email)||("BG"!==a.v.defaultLang?"":null===(l=this.profileService)||void 0===l?void 0:l.usernameClear);this.setEBillEnabledForm(s),this.receiveOnSms=""!==this.billSettings.msisdn,this.copyFormDataGr.receiveEBillOnEmail=this.enabledEBillForm.controls.receiveEBillOnEmail.value,this.copyFormDataGr.receiveEBillOnSms=this.receiveOnSms,this.copyFormDataGr.email2=this.enabledEBillForm.controls.email2.value,this.copyFormDataGr.phoneNumber=this.enabledEBillForm.controls.phoneNumber.value,this.copyFormDataGr.eBillChecked="1"===this.billSettings.billDistributionChannel||"HR"===a.v.defaultLang&&"7"===this.billSettings.billDistributionChannel,this.copyFormDataGr.receiveOnSms=""!==this.billSettings.msisdn}ngOnChanges(e){"BG"===a.v.defaultLang&&this.enabledEBillForm&&this.enableEInvoiceOnFirstChange(e),this.checkIsFormSubmitted()}ngDoCheck(){"GR"===a.v.defaultLang&&(this.isBillEnabled?this.checkFormIsChanged():this.billsCustomerService.eBillEnabledFormIsTouched=!0)}setEBillEnabledForm(e){var i;this.enabledEBillForm=this.formBuilder.group({receiveEBillOnEmail:[{value:!!this.isBillEnabled&&("BG"===a.v.defaultLang&&this.billSettings.billDistributionChannel===c.E_BILL_ON_EMAIL||"BG"!==a.v.defaultLang&&("1"===this.billSettings.billDistributionChannel||"HR"===a.v.defaultLang&&"7"===this.billSettings.billDistributionChannel)&&""!==this.billSettings.billDistributionEmail),disabled:"SI"!==a.v.defaultLang&&"BG"!==a.v.defaultLang}],email:[{value:this.billSettings.billDistributionEmail||this.billSettings.email||"",disabled:"SI"!==a.v.defaultLang&&"BG"!==a.v.defaultLang},[p.kI.email]],email2:[{value:e,disabled:!1},[p.kI.email]],receiveEBillOnSms:[{value:""!==this.billSettings.msisdn,disabled:!1},p.kI.required],phoneNumber:[{value:null===(i=this.profileService)||void 0===i?void 0:i.contactPhone,disabled:!1}],haveItemizedInvoice:[{value:!!this.isBillEnabled&&this.billSettings.itemizedInvoice===c.E_INVOICE_ON_EMAIL,disabled:!!this.isBillEnabled&&!(this.billSettings.billDistributionChannel===c.E_INVOICE||this.billSettings.billDistributionChannel===c.E_INVOICE_ON_EMAIL)},p.kI.required],settingsForAll:[{value:"",disabled:!1}],receiveEInvoice:[{value:!!this.isBillEnabled&&this.billSettings.billDistributionChannel===c.E_INVOICE,disabled:!1},p.kI.required]})}enableEInvoiceOnFirstChange(e){var i;(null==e?void 0:e.isBillEnabled)&&(null===(i=null==e?void 0:e.isBillEnabled)||void 0===i?void 0:i.currentValue)&&this.enabledEBillForm.patchValue({receiveEInvoice:!0})}onEmailInputChange(e){this.formSubmitted=!1,this.inputChanged.emit(e)}checkFormIsChanged(){!this.enabledEBillForm||(this.billsCustomerService.eBillEnabledFormIsTouched=this.copyFormDataGr.email2!==this.enabledEBillForm.controls.email2.value||this.copyFormDataGr.phoneNumber!==this.enabledEBillForm.controls.phoneNumber.value||""!==this.enabledEBillForm.controls.settingsForAll.value&&!1!==this.enabledEBillForm.controls.settingsForAll.value)}toggleSmsButton(e){this.enabledEBillForm.controls.receiveEBillOnEmail.setValue(!0),this.enabledEBillForm.controls.receiveEBillOnSms.setValue(!this.enabledEBillForm.controls.receiveEBillOnSms.value)}changeReceiveEmail(e){if(console.log("event changeReceiveEmail",e),"GR"!==a.v.defaultLang)return"BG"!==a.v.defaultLang?(e.source.checked=!0,void this.enabledEBillForm.controls.receiveEBillOnEmail.setValue(!0)):(this.enabledEBillForm.controls.receiveEBillOnEmail.setValue(!this.enabledEBillForm.controls.receiveEBillOnEmail.value),void("BG"===a.v.defaultLang&&(e.checked?(this.billsCustomerService.isActivateEBill=!0,this.enabledEBillForm.controls.receiveEInvoice.setValue(!1),this.enabledEBillForm.controls.haveItemizedInvoice.setValue(!1),this.enabledEBillForm.controls.haveItemizedInvoice.disable({onlySelf:!0})):(this.enabledEBillForm.controls.receiveEInvoice.setValue(!0),this.enabledEBillForm.controls.haveItemizedInvoice.enable()))));this.enabledEBillForm.controls.receiveEBillOnEmail.setValue(!this.enabledEBillForm.controls.receiveEBillOnEmail.value)}changeEInvoice(e){console.log("event changeEInvoice",e),this.enabledEBillForm.controls.receiveEInvoice.setValue(e.checked),this.enabledEBillForm.controls.receiveEBillOnEmail.setValue(!e.checked),e.checked?(this.billsCustomerService.isActivateEBill=!0,this.enabledEBillForm.controls.haveItemizedInvoice.enable()):(this.enabledEBillForm.controls.haveItemizedInvoice.setValue(!1),this.enabledEBillForm.controls.haveItemizedInvoice.disable({onlySelf:!0}))}toggleCheckbox(e,i){if("BG"===a.v.defaultLang&&"haveItemizedInvoice"===i&&this.itemizedBillNotAllowed)return console.log("stop!!!"),void this.enabledEBillForm.controls[i].setValue(!1);this.enabledEBillForm.controls[i].setValue(e.checked),e.checked&&(this.billsCustomerService.isActivateEBill=!0)}checkIsFormSubmitted(){this.isSubmitButtonClicked&&this.formClicked&&"activeEBillForm"===this.formClicked&&this.checkFormSubmit()}checkFormSubmit(){if(this.formSubmitted=!0,this.enabledEBillForm&&this.enabledEBillForm.invali
1d)return console.log("this.enabledEBillForm",this.enabledEBillForm),void console.log("errors",this.enabledEBillForm.errors);this.enabledEBillForm&&(console.log("PASS this.enabledEBillForm",this.enabledEBillForm),this.submitForm())}submitForm(){var e;this.billsCustomerService.updateManageEBillSettingsInProgress=!0;let i="";("GR"===a.v.defaultLang||"BG"===a.v.defaultLang)&&this.customerService.customersData.some(e=>e.ContractTypes.some(t=>t.Contracts.some(t=>t.payerId===this.billSettings.payerId&&(i=e.customerIdentity,!0))));let t={};"BG"===a.v.defaultLang&&(t={email:this.enabledEBillForm.controls.email.value,msisdn:this.enabledEBillForm.controls.phoneNumber.value,changeForAllCustomerCodes:(this.enabledEBillForm.controls.settingsForAll.value||!1).toString(),activation:this.setActivationFlag(),customerCode:i,customerIdentity:this.billSettings.payerId}),"GR"===a.v.defaultLang&&(t={customerCode:localStorage.getItem("payerId"),email:this.enabledEBillForm.controls.email2.value,activation:"4",msisdn:this.enabledEBillForm.controls.phoneNumber.value,customerIdentity:localStorage.getItem("caid")}),"GR"!==a.v.defaultLang&&"BG"!==a.v.defaultLang&&(t={payerId:localStorage.getItem("payerId"),distributionChannel:null===(e=this.billsCustomerService)||void 0===e?void 0:e.billDistributionChannel,eBillProcessingFlag:"RS"===a.v.defaultLang?G.y.E_ACTIVATION:G.y.E_EMAIL,email:this.enabledEBillForm.controls.email2.value}),this.billsCustomerService.updateManageEBillSettings(t).subscribe(e=>{e.status&&"OK"===e.status?(("SI"===a.v.defaultLang||"HR"===a.v.defaultLang)&&(this.billsCustomerService.isSameEmail=!0),"BG"===a.v.defaultLang?this.openConfirmationDialog("success",e.statusMessage):this.openConfirmationDialogOtherCountries("success","HR"===a.v.defaultLang?"1"===this.billSettings.billDistributionChannel||"7"===this.billSettings.billDistributionChannel:"1"===this.billSettings.billDistributionChannel),this.eBillSettingsGtmSendAction()):"BG"===a.v.defaultLang?this.openConfirmationDialog("error"):this.openConfirmationDialogOtherCountries("error"),this.billsCustomerService.updateManageEBillSettingsInProgress=!1,this.formSubmitted=!1},e=>{console.log("Error occurred while changing contact address"),this.billsCustomerService.updateManageEBillSettingsInProgress=!1,"BG"===a.v.defaultLang?this.openConfirmationDialog("error",e):this.openConfirmationDialogOtherCountries("error",!1,e),this.formSubmitted=!1})}eBillSettingsGtmSendAction(){var e,i;const t=(null===(i=null===(e=this.customerService)||void 0===e?void 0:e.selectedCustomer)||void 0===i?void 0:i.customerType)===B.A.BUSINESS?"business":"consumer",l={user_id:localStorage.getItem("notificationUuid"),account_type:t,ebill_activation:!0};this.gtmService.pushToDataLayer(E.V.SELFCARE_ACTIONS,l)}setActivationFlag(){return this.enabledEBillForm.controls.receiveEInvoice.value&&(this.activationFlag=this.enabledEBillForm.controls.haveItemizedInvoice.value?c.E_INVOICE_ON_EMAIL:c.E_INVOICE),this.enabledEBillForm.controls.receiveEBillOnEmail.value&&(this.activationFlag=c.E_BILL_ON_EMAIL),this.activationFlag}openConfirmationDialogOtherCountries(e,i,t){let l="";l=this.trs.trsTs("SI"!==a.v.defaultLang&&"HR"!==a.v.defaultLang&&"BA"!==a.v.defaultLang&&"ME"!==a.v.defaultLang||!i?"bills.manageEBillSettings.settingsActivatedSuccessfully":"bills.manageEBillSettings.settingsUpdatedSuccessfully"),"success"!==e&&(l=this.trs.trsTs("bills.manageEBillSettings.unSuccessEBillDialog")),this.dialog.open(r.k,{width:"812px",hasBackdrop:!1,panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:"success"===e?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:this.trs.trsTs("success"===e?"success":"httpErrorCode.default"),desc:"success"===e?l:this.getErrorMessage(t),desc2:"",close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{})}getErrorMessage(e){switch(e.status){case 410:return this.trs.trsTs("bills.manageBillAddresses.errorDeactivation410");case 411:return this.trs.trsTs("bills.manageBillAddresses.errorDeactivation411");default:this.trs.trsTs("bills.manageBillAddresses.changeErrorDescription")}}openConfirmationDialog(e,i){this.dialog.open(r.k,{width:"812px",hasBackdrop:!1,panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:"success"===e?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:"",desc:"success"===e?this.trs.trsTs("BG"===a.v.defaultLang?"bills.manageEBillSettings.successEBillDialog":"bills.manageBillAddresses.changeSuccessTitle"):"",desc2:"success"===e&&"OK"===i?"BG"===a.v.defaultLang?"":this.trs.trsTs("bills.manageBillAddresses.changeSuccessDescription"):"success"===e&&"OK"!==i?this.changeWasNotImplementedForNextBA(i):this.handleErrorDescription(i),close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{})}changeWasNotImplementedForNextBA(e){return this.trs.trsTs("bills.manageBillAddresses.changeWasNotImplementedForNextBA")+e.replaceAll(" ",",")}handleErrorDescription(e){switch(e.status){case 406:return this.trs.trsTs("bills.manageBillAddresses.error406");case 409:return this.trs.trsTs("bills.manageBillAddresses.error409");case 410:return this.trs.trsTs("bills.manageBillAddresses.error410");case 411:return this.trs.trsTs("bills.manageBillAddresses.error411");case 412:return this.trs.trsTs("bills.manageEBillSettings.error412Ebill");default:this.trs.trsTs("bills.manageBillAddresses.changeErrorDescription")}}showChangesAreInProgress(){this.dialog.open(r.k,{width:"812px",hasBackdrop:!1,panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:"assets/img/unsuccess-dialog-icon.svg",title:this.trs.trsTs("bills.manageBillAddresses.changesInProgressTitle"),desc:this.trs.trsTs("bills.manageBillAddresses.changesInProgressDesc"),close:this.trs.trsTs("close")}})}}return e.\u0275fac=function(i){return new(i||e)(d.Y36(u.D),d.Y36(p.qu),d.Y36(f.$),d.Y36(b.v),d.Y36(w.H),d.Y36(g.uw),d.Y36(S.J))},e.\u0275cmp=d.Xpm({type:e,selectors:[["app-enabled-ebill"]],inputs:{isSubmitButtonClicked:"isSubmitButtonClicked",formClicked:"formClicked",billSettings:"billSettings",isBillEnabled:"isBillEnabled"},outputs:{inputChanged:"inputChanged"},features:[d.TTD],decls:10,vars:10,consts:[[3,"class","innerHTML",4,"ngIf"],[3,"formGroup"],[4,"ngIf"],[3,"class",4,"ngIf"],["class","slide-wrapper bigger-gap mb-20",4,"ngIf"],[3,"innerHTML"],[1,"slide-wrapper","mb-5"],[1,"left"],[1,"font-size-14","font-bold"],[1,"right","lh-0"],["formControlName","receiveEInvoice",1,"global-mat-slide-toggle",3,"change"],[1,"form-field-holder","mb-20"],["floatLabel","never",1,"style-type-v3","reset-margin",3,"ngClass"],["matInput","","type","email","formControlName","email",3,"disabled","readonly","input"],["class","ec-errors font-light font-size-12",4,"ngIf"],[1,"ec-errors","font-light","font-size-12"],[1,"global-mat-slide-toggle",3,"checked","disabled","change"],["matInput","","type","email","formControlName","email2",3,"disabled","readonly","input"],["floatLabel","never",1,"style-type-v3","reset-margin"],["matInput","","type","text","formControlName","phoneNumber",3,"readonly","input"],[1,"slide-wrapper","bigger-gap","mb
1-20"],["class","font-size-12 text-color-5",4,"ngIf"],["formControlName","haveItemizedInvoice",1,"global-mat-slide-toggle",3,"disabled","change"],[1,"font-size-12","text-color-5"],[1,"slide-wrapper","mb-40"],["formControlName","settingsForAll",1,"global-mat-slide-toggle",3,"change"]],template:function(e,i){1&e&&(d.YNc(0,_,1,4,"p",0),d.YNc(1,J,1,4,"p",0),d.TgZ(2,"form",1),d.YNc(3,Q,8,3,"ng-container",2),d.YNc(4,z,8,9,"ng-container",2),d.YNc(5,U,2,4,"div",3),d.YNc(6,j,8,9,"ng-container",2),d.YNc(7,$,2,1,"ng-container",2),d.YNc(8,ie,8,5,"div",4),d.YNc(9,te,8,3,"ng-container",2),d.qZA()),2&e&&(d.Q6J("ngIf",i.isBillEnabled),d.xp6(1),d.Q6J("ngIf",!i.isBillEnabled),d.xp6(1),d.Q6J("formGroup",i.enabledEBillForm),d.xp6(1),d.Q6J("ngIf","BG"===i.config.defaultLang),d.xp6(1),d.Q6J("ngIf","BG"===i.config.defaultLang||i.enabledEBillForm.controls.receiveEInvoice.value),d.xp6(1),d.Q6J("ngIf","RS"!==i.config.defaultLang&&"BA"!==i.config.defaultLang&&"ME"!==i.config.defaultLang&&("BG"===i.config.defaultLang||i.billsCustomerService.isActivateEBill&&("GR"===i.config.defaultLang||"BG"===i.config.defaultLang)||i.billsCustomerService.isActivateEBill&&("SI"===i.config.defaultLang&&"1"===i.billSettings.billDistributionChannel||"HR"===i.config.defaultLang&&("1"===i.billSettings.billDistributionChannel||"7"===i.billSettings.billDistributionChannel)))),d.xp6(1),d.Q6J("ngIf","BG"===i.config.defaultLang||!("GR"!==i.config.defaultLang&&("HR"!==i.config.defaultLang&&"SI"!==i.config.defaultLang&&"BA"!==i.config.defaultLang&&"ME"!==i.config.defaultLang&&"RS"!==i.config.defaultLang||!i.billsCustomerService.isActivateEBill))||i.enabledEBillForm.controls.receiveEBillOnEmail.value),d.xp6(1),d.Q6J("ngIf","GR"===i.config.defaultLang),d.xp6(1),d.Q6J("ngIf","BG"===i.config.defaultLang),d.xp6(1),d.Q6J("ngIf","GR"===i.config.defaultLang||"BG"===i.config.defaultLang))},directives:[l.O5,p._Y,p.JL,p.sg,v.Rr,p.JJ,p.u,C.KE,l.mk,I.Nt,p.Fj,C.TO],pipes:[A.X$],styles:[".style-type-v3.disabled-input[_ngcontent-%COMP%]{opacity:.5}.style-type-v3.disabled-input[_ngcontent-%COMP%]   label[_ngcontent-%COMP%], .style-type-v3.disabled-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}@media (min-width: 1100px){.slide-wrapper.bigger-gap[_ngcontent-%COMP%]{grid-gap:30px;gap:30px}}"]}),e})();function se(e,i){if(1&e&&(d.TgZ(0,"div",2),d._UZ(1,"mat-progress-spinner",3),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.Q6J("mode",e.commonService.mode)("strokeWidth",2)("diameter",80)}}function ne(e,i){1&e&&(d.ynx(0),d._uU(1),d.ALo(2,"translate"),d.BQk()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"bills.manageEBillSettings.receiveEBillOnEmail")," "))}function oe(e,i){1&e&&(d.ynx(0),d._uU(1),d.ALo(2,"translate"),d.BQk()),2&e&&(d.xp6(1),d.hij(" ",d.lcZ(2,1,"bills.manageEBillSettings.eBill")," "))}function ae(e,i){if(1&e&&(d.TgZ(0,"p",16),d.YNc(1,ne,3,3,"ng-container",1),d.YNc(2,oe,3,3,"ng-container",1),d.qZA()),2&e){const e=d.oxw(3);d.xp6(1),d.Q6J("ngIf","BG"!==e.config.defaultLang),d.xp6(1),d.Q6J("ngIf","BG"===e.config.defaultLang)}}function re(e,i){if(1&e&&(d.TgZ(0,"p",17),d._uU(1),d.qZA()),2&e){const e=d.oxw(3);d.xp6(1),d.hij(" ",e.trs.trsTs(e.billsCustomerService.isActivateEBill?"bills.manageEBillSettings.enabled":"bills.manageEBillSettings.disabled")," ")}}function ce(e,i){if(1&e){const e=d.EpF();d.TgZ(0,"div",18),d.TgZ(1,"mat-slide-toggle",19),d.NdJ("change",function(i){return d.CHM(e),d.oxw(3).changeFormView(i)}),d.qZA(),d.qZA()}if(2&e){const e=d.oxw(3);d.xp6(1),d.Q6J("checked",e.billsCustomerService.isActivateEBill)("disabled",("HR"===e.config.defaultLang||"SI"===e.config.defaultLang||"BA"===e.config.defaultLang||"ME"===e.config.defaultLang||"BG"===e.config.defaultLang)&&e.billsCustomerService.isActivateEBill)}}function de(e,i){if(1&e&&(d.ynx(0),d._UZ(1,"app-disabled-ebill",20),d.BQk()),2&e){const e=d.oxw(3);d.xp6(1),d.Q6J("isSubmitButtonClicked",e.isSubmitButtonClicked)("formClicked",e.whichFormIsClicked)("billSettings",e.billSettings)}}function ge(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"app-enabled-ebill",21),d.NdJ("inputChanged",function(i){return d.CHM(e),d.oxw(3).onInputChanged(i)}),d.qZA(),d.BQk()}if(2&e){const e=d.oxw(3);d.xp6(1),d.Q6J("isSubmitButtonClicked",e.isSubmitButtonClicked)("formClicked",e.whichFormIsClicked)("billSettings",e.billSettings)("isBillEnabled","BG"===e.config.defaultLang&&"P"!==e.billSettings.billDistributionChannel||"BG"!==e.config.defaultLang&&"1"===e.billSettings.billDistributionChannel||"HR"===e.config.defaultLang&&"7"===e.billSettings.billDistributionChannel)}}function ue(e,i){if(1&e){const e=d.EpF();d.ynx(0),d.TgZ(1,"button",22),d.NdJ("click",function(){return d.CHM(e),d.oxw(3).submitForm(
1)}),d._uU(2),d.ALo(3,"translate"),d.qZA(),d.BQk()}if(2&e){const e=d.oxw(3);d.xp6(1),d.Q6J("ladda",e.billsCustomerService.updateManageEBillSettingsInProgress)("disabled",e.disableSubmitButton()),d.xp6(1),d.hij(" ",d.lcZ(3,3,"confirm")," ")}}function me(e,i){1&e&&(d.TgZ(0,"mat-error",23),d.TgZ(1,"div",24),d._UZ(2,"img",25),d.qZA(),d.TgZ(3,"div",26),d.TgZ(4,"p",27),d._uU(5),d.ALo(6,"translate"),d.qZA(),d.TgZ(7,"p",28),d._uU(8),d.ALo(9,"translate"),d.qZA(),d.qZA(),d.qZA()),2&e&&(d.xp6(5),d.Oqu(d.lcZ(6,2,"bills.manageEBillSettings.errorTitle")),d.xp6(3),d.Oqu(d.lcZ(9,4,"bills.manageEBillSettings.errorDesc")))}function be(e,i){1&e&&(d.TgZ(0,"p",29),d._uU(1),d.ALo(2,"translate"),d.qZA()),2&e&&(d.xp6(1),d.Oqu(d.lcZ(2,1,"bills.manageEBillSettings.description02")))}function fe(e,i){if(1&e&&(d.ynx(0),d.TgZ(1,"div",6),d.TgZ(2,"div",7),d.ynx(3),d.TgZ(4,"div",8),d.TgZ(5,"div",9),d.YNc(6,ae,3,2,"p",10),d.YNc(7,re,2,1,"p",11),d.qZA(),d.YNc(8,ce,2,2,"div",12),d.qZA(),d.BQk(),d.YNc(9,de,2,3,"ng-container",1),d.YNc(10,ge,2,4,"ng-container",1),d.TgZ(11,"div",13),d.YNc(12,ue,4,5,"ng-container",1),d.YNc(13,me,10,6,"mat-error",14),d.qZA(),d.YNc(14,be,3,3,"p",15),d.qZA(),d.qZA(),d.BQk()),2&e){const e=d.oxw(2);d.xp6(6),d.Q6J("ngIf","SI"!==e.config.defaultLang&&"HR"!==e.config.defaultLang||"SI"===e.config.defaultLang&&"1"!==e.billSettings.billDistributionChannel||"HR"===e.config.defaultLang&&"1"!==e.billSettings.billDistributionChannel),d.xp6(1),d.Q6J("ngIf","BG"===e.config.defaultLang),d.xp6(1),d.Q6J("ngIf","SI"!==e.config.defaultLang&&"HR"!==e.config.defaultLang&&"BA"!==e.config.defaultLang&&"ME"!==e.config.defaultLang||"SI"===e.config.defaultLang&&"1"!==e.billSettings.billDistributionChannel||"HR"===e.config.defaultLang&&"1"!==e.billSettings.billDistributionChannel||("BA"===e.config.defaultLang||"ME"===e.config.defaultLang)&&"1"!==e.billSettings.billDistributionChannel),d.xp6(1),d.Q6J("ngIf",("GR"===e.config.defaultLang||"RS"===e.config.defaultLang)&&!e.billsCustomerService.isActivateEBill),d.xp6(1),d.Q6J("ngIf",e.billsCustomerService.isActivateEBill||"GR"!==e.config.defaultLang&&"RS"!==e.config.defaultLang),d.xp6(2),d.Q6J("ngIf","SI"!==e.config.defaultLang&&"HR"!==e.config.defaultLang||e.billsCustomerService.isActivateEBill),d.xp6(1),d.Q6J("ngIf",!1),d.xp6(1),d.Q6J("ngIf","BG"===e.config.defaultLang)}}function he(e,i){1&e&&(d.TgZ(0,"div",30),d.TgZ(1,"div",31),d._UZ(2,"img",32),d.qZA(),d.TgZ(3,"p",33),d._uU(4),d.ALo(5,"translate"),d.qZA(),d.qZA()),2&e&&(d.xp6(4),d.Oqu(d.lcZ(5,1,"bills.manageEBillSettings.noData")))}function ve(e,i){if(1&e&&(d.ynx(0),d.YNc(1,fe,15,8,"ng-container",4),d.YNc(2,he,6,3,"ng-template",null,5,d.W1O),d.BQk()),2&e){const e=d.MAs(3),i=d.oxw();d.xp6(1),d.Q6J("ngIf",i.billSettings)("ngIfElse",e)}}const pe=[{path:"",redirectTo:"ebill-settings"},{path:"ebill-settings",component:(()=>{class e{constructor(e,i,t,l,s){this.dialog=e,this.trs=i,this.commonService=t,this.customerService=l,this.billsCustomerService=s,this.config=a.v,this.payerId="",this.payerIdentity="",this.whichFormIsClicked="",this.eBillActivationFlag=c,this.isEBillLoaded=!1,this.hasEBillError=!1,this.isSubmitButtonClicked=1,this.commonService.isPageTitleActivated=!0,this.commonService.isBackButtonActivated=!0,this.commonService.setPageTitle(this.trs.trsTs("bills.manageEBillSettings.title"),"bills-ebill-settings"),this.commonService.isPageSubtitleActivated=!0,this.commonService.pageSubtitle="GR"!==a.v.defaultLang&&"BG"!==a.v.defaultLang?this.trs.trsTsParams("bills.manageEBillSettings.subtitle01",{payerId:localStorage.getItem("payerId"),payerName:localStorage.getItem("payerName")}):this.trs.trsTsParams("bills.manageEBillSettings.subtitle",{payerId:localStorage.getItem("payerId")}),this.payerId=localStorage.getItem("payerId"),this.payerIdentity=localStorage.getItem("payerIdentity")}ngOnInit(){this.fetchEBill(),"GR"===a.v.defaultLang&&this.fetchDataForDisableForm()}fetchDataForDisableForm(){this.billsCustomerService.fetchEBillAddresses().subscribe(e=>{e.status&&"OK"===e.status&&(this.billsCustomerService.customerAddressData=e.CustomerAddressData,console.log("this.customerAddressData",e.CustomerAddressData))},e=>{console.log("Error occurred while fetching Bill addresses: ",e)})}fetchEBill(){this.isEBillLoaded=!1;const e=[];let i="";("GR"===a.v.defaultLang||"BG"===a.v.defaultLang)&&this.customerService.customersData.some(e=>e.ContractTypes.some(t=>t.Contracts.some(t=>t.payerId===this.payerId&&(i=e.customerIdentity,!0))));let t="GR"===a.v.defaultLang||"BG"===a.v.defaultLang?i:this.payerIdentity;("BA"===a.v.defaultLang||"ME"===a.v.defaultLang)&&(t=localStorage.getItem("caid")),t?this.billsCustomerService.fetchEBill(t).subscribe(i=>{var t,l,s;console.log("response fetchEBill",i),i.status&&"OK"===i.status?(i.billDistributionDetail
1s.forEach(i=>{i.payerId===this.payerId&&(this.billSettings=i,("SI"===a.v.defaultLang||"HR"===a.v.defaultLang)&&(this.billsCustomerService.isSameEmail=!!(null==i?void 0:i.billDistributionEmail)),e.push({email:null==i?void 0:i.billDistributionEmail,channel:"1"===(null==i?void 0:i.billDistributionChannel)||"HR"===a.v.defaultLang&&"7"===(null==i?void 0:i.billDistributionChannel)?i.billDistributionChannel:"",billDistributionChannel:null==i?void 0:i.billDistributionChannel,billDistributionEmail:null==i?void 0:i.billDistributionEmail}))}),this.billsCustomerService.billDistributionChannel=(null==i?void 0:i.billDistributionDetails)&&(null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.email)&&(null===(l=null==e?void 0:e[0])||void 0===l?void 0:l.channel)?null===(s=null==e?void 0:e[0])||void 0===s?void 0:s.channel:"GR"!==a.v.defaultLang&&"BG"!==a.v.defaultLang?"1":"",this.setEnableOrDisableEBill(null==e?void 0:e[0])):this.hasEBillError=!0,this.isEBillLoaded=!0},e=>{console.log("Error occurred while fetching EBill: ",e),this.hasEBillError=!0,this.isEBillLoaded=!0}):(this.isEBillLoaded=!0,this.hasEBillError=!0)}setEnableOrDisableEBill(e){"BG"===a.v.defaultLang&&(console.log("dataaaaa",e),this.billsCustomerService.isActivateEBill="P"!==e.billDistributionChannel),"BG"!==a.v.defaultLang&&(this.billsCustomerService.isActivateEBill="1"===(null==e?void 0:e.billDistributionChannel)||"HR"===a.v.defaultLang&&"7"===(null==e?void 0:e.billDistributionChannel))}changeFormView(e){if("GR"!==a.v.defaultLang)return"1"===this.billSettings.billDistributionChannel||"HR"===a.v.defaultLang&&"7"===this.billSettings.billDistributionChannel?"RS"!==a.v.defaultLang?(e.source.checked=!0,void(this.billsCustomerService.isActivateEBill=!0)):void(this.billsCustomerService.isActivateEBill=!this.billsCustomerService.isActivateEBill):"BG"!==a.v.defaultLang?(this.billsCustomerService.isActivateEBill=!this.billsCustomerService.isActivateEBill,"BA"===a.v.defaultLang||"ME"===a.v.defaultLang?(this.billsCustomerService.isActivateEBill=!0,e.source.checked=!0):void 0):(e.source.checked=!0,this.billsCustomerService.isActivateEBill=!0,void(this.billSettings.billDistributionChannel=c.E_INVOICE));this.billsCustomerService.isActivateEBill=!this.billsCustomerService.isActivateEBill,console.log("2",this.billsCustomerService.isActivateEBill),this.isSubmitButtonClicked=1,this.whichFormIsClicked=this.billsCustomerService.isActivateEBill?"activeEBillForm":"disabledEBillForm"}submitForm(){this.isSubmitButtonClicked=this.isSubmitButtonClicked+1,this.whichFormIsClicked=this.billsCustomerService.isActivateEBill?"activeEBillForm":"disabledEBillForm"}openConfirmationDialog(e){this.dialog.open(r.k,{width:"812px",hasBackdrop:!1,panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:"success"===e?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:this.trs.trsTs("success"===e?"success":"error"),desc:this.trs.trsTs("success"===e?"bills.manageEBillSettings.successEBillDialog":"bills.manageEBillSettings.unSuccessEBillDialog"),close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{})}disableSubmitButton(){if("HR"===a.v.defaultLang||"SI"===a.v.defaultLang)return!!this.billsCustomerService.isSameEmail;if("BG"===a.v.defaultLang)return!this.billsCustomerService.isActivateEBill;if("disabledEBillForm"===this.whichFormIsClicked&&"RS"===a.v.defaultLang||"disabledEBillForm"===this.whichFormIsClicked&&!this.billsCustomerService.isEBillDeactivateFormEmpty)return!1;if("disabledEBillForm"===this.whichFormIsClicked&&this.billsCustomerService.isEBillDeactivateFormEmpty)return!0;if("GR"===a.v.defaultLang){if(this.billsCustomerService.isActivateEBill&&!this.billsCustomerService.eBillEnabledFormIsTouched)return!0;if(this.billsCustomerService.isActivateEBill&&this.billsCustomerService.eBillEnabledFormIsTouched)return!1}return!1}onInputChanged(e){var i;"BG"!==a.v.defaultLang&&"GR"!==a.v.defaultLang&&(this.billsCustomerService.isSameEmail=(null===(i=this.billSettings)||void 0===i?void 0:i.billDistributionEmail)===e||!e,this.disableSubmitButton())}ngOnDestroy(){localStorage.removeItem("payerId"),this.commonService.isPageSubtitleActivated=!1}}return e.\u0275fac=function(i){return new(i||e)(d.Y36(g.uw),d.Y36(u.D),d.Y36(m.v),d.Y36(b.v),d.Y36(f.$))},e.\u0275cmp=d.Xpm({type:e,selectors:[["app-ebill-management"]],decls:2,vars:2,consts:[["class","page-spinner",4,"ngIf"],[4,"ngIf"],[1,"page-spinner"],[3,"mode","strokeWidth","diameter"],[4,"ngIf","ngIfElse"],["noEBill",""],[1,"eon-settings-pages","eon-account-settings"],[1,"container-460"],[1,"slide-wrapper","mb-15"],[1,"left"],["class","font-size-14 font-bold",4,"ngIf"],["class","font-size-12 font-light",4,"ngIf"],["class","right",4,"ngIf"],[1,"text-align-center","mb-30","relative"],["class","error-v3 custom",4,"ngIf"],["class","font-size-14 font-light",4,"ngIf"],[1,"font-size-14","font-bold"],[1,"font-size-12","font-light"],[1,"right"],[1,"global-mat-slide-toggle",3,"checked","disabled","change"],[3,"isSubmitButtonClicked","formClicked","billSettings"],[3,"isSubmitButtonClicked","formClicked","billSettings","isBillEnabled","inputChanged"],[1,"radius16","btn-5-v3","bg-main","ladda-fix-v3",3,"ladda","disabled","click"],[1,"error-v3","custom"],[1,"icon-wrap"],["src","assets/img/warning-icon.svg","alt","info"],[1,"content"],[1,"font-size-15","font-bold","text-uppercase","text-color-3","mb-5"],[1,"font-size-13","font-medium","text-color-3"],[1,"font-size-14","font-light"],[1,"error-wrapper","no-data"],[1,"mt-40","mb
1-60"],["src","assets/img/payments-empty-icon.svg","alt","empty payment"],[1,"font-bold","font-size-16"]],template:function(e,i){1&e&&(d.YNc(0,se,2,3,"div",0),d.YNc(1,ve,4,2,"ng-container",1)),2&e&&(d.Q6J("ngIf",!i.isEBillLoaded),d.xp6(1),d.Q6J("ngIf",i.isEBillLoaded))},directives:[l.O5,h.Ou,v.Rr,O,le,o.d_,C.TO],pipes:[A.X$],styles:[".slide-wrapper{display:flex;align-items:center;justify-content:space-between;grid-gap:10px;gap:10px}.error-v3.custom[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:18px;gap:18px;padding:15px 17px 17px;box-shadow:0 30px 60px #0000004d;text-align:left!important}.error-v3.custom[_ngcontent-%COMP%]   .icon-wrap[_ngcontent-%COMP%]{line-height:0}.error-v3.custom[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{width:calc(100% - 42px)}"]}),e})()}];let Be=(()=>{class e{}return e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d.oAB({type:e}),e.\u0275inj=d.cJS({imports:[[l.ez,s.Bz.forChild(pe),n.m,o.o5.forRoot({style:"slide-down",spinnerSize:30,spinnerColor:"#000",spinnerLines:12})],s.Bz]}),e})()}}]);

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.