PageSourceSearch

https://www.vivacom.bg/account/chunk-VITZS4FR.js

js vivacom.bg collected 2026-09-24 09:30:43 UTC 15,055 bytes, 1 lines download raw bytes

1import{a as S}from"./chunk-YVED7KY2.js";import{b as j}from"./chunk-T4EBRGWV.js";import{a as it}from"./chunk-WKSI6BXT.js";import{a as ot,b as nt}from"./chunk-ZO7MWZV5.js";import"./chunk-E5C3DMEE.js";import{a as et}from"./chunk-QZTWUFVX.js";import"./chunk-MRUXXFZZ.js";import"./chunk-ZK2UVZHG.js";import"./chunk-YCWVNKHW.js";import"./chunk-IKP3GIDA.js";import{a as tt}from"./chunk-6FDE4EML.js";import{$a as M,Eb as Z,Ka as H,ab as O,b as T,fa as $,ga as Y,ia as I,lb as k,qa as K,va as q,wc as B}from"./chunk-UMFZ3LLX.js";import{a as _,b as P}from"./chunk-BWEGVNY2.js";import{a as J,b as Q}from"./chunk-AG6QEAUI.js";import"./chunk-SAUKD7DD.js";import{Ac as X,Bc as z,Jb as v,Kc as G,Lb as x,Nb as V,Ob as L,Pb as F,Qb as f,Qc as s,Rb as r,Rc as d,Sb as a,Tb as E,_b as U,db as i,dc as N,fc as u,oa as A,ob as m,pa as R,tc as l,ub as y,uc as c,vc as w,wc as D,zc as W}from"./chunk-KKSGD2T6.js";import"./chunk-EQDQRRRY.js";var rt=(()=>{class e{constructor(t,o,n,h,p,C,b){this.dialogRef=t,this.data=o,this.billsService=n,this.trs=h,this.dialog=p,this.storageService=C,this.commonService=b,this.config=T,this.eExportType=S,this.selectedValue=S.PDF,this.downloadInProgress=!1}ngOnInit(){}closeDialog(){this.dialogRef.close()}downloadCreditNote(){this.downloadInProgress=!0;let t=this.storageService.get(_.PAYER_ID)??"";this.billsService.downloadBill(this.selectedValue,t,this.data.invoiceNumber,this.commonService.getLanguage()).subscribe(o=>{this.fetchDocUrl(o,this.selectedValue),this.downloadInProgress=!1},o=>{this.downloadInProgress=!1,console.log("Error occured while downloading credit note data: ",o),this.handleError(o)})}fetchDocUrl(t,o){if(!t?.docUrl)return;let n=o===S.XLS?S.XLS_DOWNLOAD:o,h=`${this.trs.trsTs("bills.creditNoteFor")} - ${this.data.dateOfIssuingOfTheCreditNote} - ${this.storageService.get(_.PAYER_ID)}.${n}`;fetch(t.docUrl).then(p=>{if(!p.ok)throw new Error;return p.blob()}).then(p=>{let C=window.URL.createObjectURL(p),b=document.createElement("a");b.href=C,b.download=h,document.body.appendChild(b),b.click(),document.body.removeChild(b),window.URL.revokeObjectURL(C),this.closeDialog(),this.openConfirmationDialog("success",this.trs.trsTs("bills.billIsDownloaded"))}).catch(p=>{console.warn("Fetch failed due to CORS or other issue:",p);let C=window.open(t.docUrl,"_blank");setTimeout(()=>{C&&C.closed?this.openConfirmationDialog("success",this.trs.trsTs("bills.billIsDownloaded")):this.openConfirmationDialog("error",this.trs.trsTs("bills.billIsNotDownloaded")),this.closeDialog()},1e3),C||(this.openConfirmationDialog("error",this.trs.trsTs("bills.billIsNotDownloaded")),this.closeDialog())})}handleError(t){switch(t.status){case 406:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill406"));case 409:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill409"));case 410:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill410"));case 411:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill411"));case 412:return this.openConfirmationDialog("success",this.trs.trsTs("httpErrorCode.downloadBill412"));case 413:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill413"));case 414:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill414"));case 416:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill416"));case 417:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.downloadBill417"));default:return this.openConfirmationDialog("error",this.trs.trsTs("httpErrorCode.default"))}}openConfirmationDialog(t,o){this.dialog.open(et,{width:"812px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{title:t==="success"?this.trs.trsTs("success"):this.trs.trsTs("error"),image:t==="success"?"assets/img/success-dialog-icon.svg":"assets/img/delete-account-v3.png",desc2:t==="success"?this.trs.trsTs("bills.billIsDownloaded"):o||this.trs.trsTs("bills.billIsNotDownloaded"),close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{})}static{this.\u0275fac=function(o){return new(o||e)(m($),m(Y),m(j),m(k),m(I),m(P),m(B))}}static{this.\u0275cmp=y({type:e,selectors:[["app-download-note-dialog"]],features:[G([j])],decls:32,vars:28,consts:[[1,"container-400"],[1,"title","font-bold"],[3,"ngModelChange","ngModel"],[1,"radio-item"],[1,"variant-type-v3","not-absolute",3,"value","checked"],[1,"font-size-15"],[1,"variant-type-v3","not-absolute",3,"value"],[1,"btn-wrap"],[1,"radius100","btn-3-v3","white-bordered","text-color-2","cancel-button",3,"click"],[1,"radius100","btn-3-v3","bg-main","ladda-fix-v3","black-with-ladda",3,"click","ladda"]],template:function(o,n){o&1&&(r(0,"div",0)(1,"h2",1),l(2),s(3,"translate"),a(),r(4,"mat-radio-group",2),z("ngModelChange",function(p){return X(n.selectedValue,p)||(n.selectedValue=p),p}),r(5,"div",3)(6,"mat-radio-button",4)(7,"p",5),l(8),s(9,"translate"),a()()(),r(10,"div",3)(11,"mat-radio-button",6)(12,"p",5),l(13),s(14,"translate"),a()()(),r(15,"div",3)(16,"mat-radio-button",6)(17,"p",5),l(18),s(19,"translate"),a()()(),r(20,"div",3)(21,"mat-radio-button",6)(22,"p",5),l(23),s(24,"translate"),a()()()(),r(25,"div",7)(26,"button",8),N("click",function(){return n.closeDialog()}),l(27),s(28,"translate"),a(),r(29,"button",9),N("click",function(){return n.downloadCreditNote()}),l(30),s(31,"translate"),a()()()),o&2&&(i(2),c(d(3,14,"bills.downloadNote.title")),i(2),W("ngModel",n.selectedValue),i(2),f("value",n.eExportType.PDF)("checked",!0),i(2),c(d(9,16,"bills.downloadNote.savePdf")),i(3),f("value",n.eExportType.CSV),i(2),c(d(14,18,"bills.downloadNote.saveCsv")),i(3),f("value",n.eExportType.XLS),i(2),c(d(19,20,"bills.downloadNote.saveXls")),i(3),f("value",n.eExportType.XML),i(2),c(d(24,22,"bills.downloadNote.saveXml")),i(4),w(" ",d(28,24,"cancel")," "),i(2),f("ladda",n.downloadInProgress),i(),w(" ",d(31,26,"confirm")," "))},dependencies:[ot,H,K,q,nt,Q,J,O,M],styles:[".download-note-dialog .mat-mdc-radio-button.variant-type-v3{display:block}  .download-note-dialog .mat-mdc-radio-button.variant-type-v3 .mdc-form-field{dis
1play:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;width:100%}  .mat-mdc-radio-button.variant-type-v3 .mdc-radio__outer-circle{background:#a9b3c7}.container-400[_ngcontent-%COMP%]{width:100%}mat-radio-group[_ngcontent-%COMP%]{display:block;width:100%}.title[_ngcontent-%COMP%]{font-size:18px;text-align:center;margin-bottom:32px}.radio-item[_ngcontent-%COMP%]{margin-bottom:13px;padding:0 15px 13px 24px;border-bottom:1px solid #EDEDED}.radio-item[_ngcontent-%COMP%]:last-child{margin-bottom:24px}.btn-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}"]})}}return e})();function gt(e,g){if(e&1&&(r(0,"div",0),E(1,"mat-progress-spinner",3),a()),e&2){let t=u();i(),f("mode",t.commonService.mode)("strokeWidth",2)("diameter",80)}}function ut(e,g){if(e&1&&E(0,"app-server-error",1),e&2){let t=u();f("callback",t.fetchCreditNoteDetails.bind(t))}}function ft(e,g){if(e&1&&(r(0,"span",17),l(1),a()),e&2){let t=u().$implicit,o=u(2);i(),D(" ",o.commonService.formatValueFractionDigits(t==null?null:t.amount)," ",o.config.currencySymbol," ")}}function ht(e,g){if(e&1&&(r(0,"div",14),l(1),v(2,ft,2,2,"span",17),a()),e&2){let t=g.$implicit,o=u(2);i(),w(" ",o.commonService.getLanguage()==="EN"&&t.descriptionEN||(t==null?null:t.description)," "),i(),x((t==null?null:t.amount)!=null?2:-1)}}function Ct(e,g){if(e&1&&l(0),e&2){let t=u(2);D(" ",t.commonService.formatValueFractionDigits(t.creditNoteDetails==null?null:t.creditNoteDetails.overallSumWithoutVat)," ",t.config.currencySymbol," ")}}function vt(e,g){e&1&&l(0," / ")}function xt(e,g){if(e&1&&l(0),e&2){let t=u(2);D(" ",t.commonService.formatValueFractionDigits(t.creditNoteDetails==null?null:t.creditNoteDetails.vat)," ",t.config.currencySymbol," ")}}function bt(e,g){e&1&&l(0," / ")}function _t(e,g){if(e&1&&l(0),e&2){let t=u(2);D(" ",t.commonService.formatValueFractionDigits(t.creditNoteDetails==null?null:t.creditNoteDetails.overallSumWithVat)," ",t.config.currencySymbol," ")}}function wt(e,g){e&1&&l(0," / ")}function Dt(e,g){if(e&1){let t=U();r(0,"div",2)(1,"div",4)(2,"article",5)(3,"header")(4,"div",6),E(5,"img",7),a(),r(6,"p",8),l(7),s(8,"translate"),a()(),r(9,"ul",9)(10,"li",10)(11,"div",11),l(12),s(13,"translate"),a(),r(14,"div",12),l(15),a()(),r(16,"li",10)(17,"div",11),l(18),s(19,"translate"),a(),r(20,"div",12),l(21),a()(),r(22,"li",10)(23,"div",13),l(24),s(25,"translate"),a(),L(26,ht,3,2,"div",14,V),a(),r(28,"li",10)(29,"div",11),l(30),s(31,"translate"),a(),r(32,"div",12),v(33,Ct,1,2)(34,vt,1,0),a()(),r(35,"li",10)(36,"div",11),l(37),s(38,"translate"),a(),r(39,"div",12),v(40,xt,1,2)(41,bt,1,0),a()(),r(42,"li",10)(43,"div",11),l(44),s(45,"translate"),a(),r(46,"div",12),v(47,_t,1,2)(48,wt,1,0),a()()(),r(49,"div",15)(50,"button",16),N("click",function(){A(t);let n=u();return R(n.openDownloadNoteDialog(n.commonService.formatDate(n.creditNoteDetails==null?null:n.creditNoteDetails.dateOfIssuingOfTheCreditNote,"dd. MM. yyyy")))}),l(51),s(52,"translate"),a()()()()()}if(e&2){let t=u();i(7),D("",d(8,15,"bills.creditNote.title")," ",t.creditNoteNumber||"/"),i(5),c(d(13,17,"bills.creditNote.billingAccountNumber")),i(3),c(t.payerId||"/"),i(3),c(d(19,19,"bills.creditNote.dateOfIssuing")),i(3),c(t.creditNoteDetails!=null&&t.creditNoteDetails.dateOfIssuingOfTheCreditNote?t.commonService.formatDate(t.creditNoteDetails==null?null:t.creditNoteDetails.dateOfIssuingOfTheCreditNote,"dd. MM. yyyy"):"/"),i(3),c(d(25,21,"bills.creditNote.reasonForIssuing")),i(2),F(t.creditNoteDetails==null?null:t.creditNoteDetails.reasonsForIssuing),i(4),c(d(31,23,"bills.creditNote.sumWithoutVat")),i(3),x((t.creditNoteDetails==null?null:t.creditNoteDetails.overallSumWithoutVat)!=null?33:34),i(4),c(d(38,25,"bills.creditNote.vat")),i(3),x((t.creditNoteDetails==null?null:t.creditNoteDetails.vat)!=null?40:41),i(4),c(d(45,27,"bills.creditNote.sumWithVat")),i(3),x((t.creditNoteDetails==null?null:t.creditNoteDetails.overallSumWithVat)!=null?47:48),i(3),f("disabled",!(t.creditNoteDetails!=null&&t.creditNoteDetails.dateOfIssuingOfTheCreditNote)),i(),w(" ",d(52,29,"bills.creditNote.downloadNote")," ")}}var at=(()=>{class e{constructor(t,o,n,h,p){this.commonService=t,this.billsCustomerService=o,this.trs=n,this.dialog=h,this.storageService=p,this.creditNoteNumber="",this.payerId="",this.showSpinner=!1,this.serverError=!1,this.config=T,this.commonService.isPageTitleActivated=!0,this.commonService.isBackButtonActivated=!0,this.commonService.setPageTitle(this.trs.trsTs("bills.creditNote.title"),"credit-note")}ngOnInit(){this.payerId=this.storageService.get(_.PAYER_ID)??"",this.creditNoteNumber=this.storageService.get(_.CREDIT_NOTE_BILLING_DOCUMENT)||"",this.fetchCreditNoteDetails()}
1fetchCreditNoteDetails(){if(!this.creditNoteNumber){this.serverError=!0;return}this.serverError=!1,this.showSpinner=!0,this.billsCustomerService.fetchCreditNoteDetails(this.creditNoteNumber).subscribe(t=>{console.log("response credit note",t),t?this.creditNoteDetails=t:this.serverError=!0,this.showSpinner=!1},t=>{this.showSpinner=!1,this.serverError=!0,console.log("Error occured while fetching credit note data: ",t)})}openDownloadNoteDialog(t){this.dialog.open(rt,{width:"675px",hasBackdrop:!0,backdropClass:"global-dialog-backdrop",panelClass:["global-dialog","gd-v3","download-note-dialog"],data:{invoiceNumber:this.creditNoteNumber,dateOfIssuingOfTheCreditNote:t}}).afterClosed().subscribe(()=>{})}ngOnDestroy(){this.commonService.isPageTitleActivated=!1,this.commonService.isBackButtonActivated=!1,this.storageService.remove(_.CREDIT_NOTE_BILLING_DOCUMENT)}static{this.\u0275fac=function(o){return new(o||e)(m(B),m(Z),m(k),m(I),m(P))}}static{this.\u0275cmp=y({type:e,selectors:[["app-credit-note"]],decls:3,vars:3,consts:[[1,"page-spinner"],[3,"callback"],[1,"credit-note-page","gp-pt-50"],[3,"mode","strokeWidth","diameter"],[1,"container-460"],[1,"content-card"],[1,"icon"],["src","assets/img/credit-note-icon.svg","alt","icon"],[1,"font-bold","font-size-16"],[1,"card-list"],[1,"list-item"],[1,"title","font-light"],[1,"desc","font-bold"],[1,"title","font-light","mb-5"],[1,"desc","font-medium","reason-for-issuing"],[1,"button-wrapper"],[1,"radius16","btn-1-v3","bg-main","download-btn",3,"click","disabled"],[1,"font-bold"]],template:function(o,n){o&1&&(v(0,gt,2,3,"div",0),v(1,ut,1,1,"app-server-error",1),v(2,Dt,53,31,"div",2)),o&2&&(x(n.showSpinner?0:-1),i(),x(n.serverError?1:-1),i(),x(!n.showSpinner&&!n.serverError?2:-1))},dependencies:[tt,it,O,M],styles:[".flex-layout[_ngcontent-%COMP%]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.flex-center[_ngcontent-%COMP%]{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.justify-center[_ngcontent-%COMP%]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.justify-end[_ngcontent-%COMP%]{-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end}.space-between[_ngcontent-%COMP%]{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.direction-col[_ngcontent-%COMP%]{flex-direction:column-reverse}.app-style[_ngcontent-%COMP%], .content-card[_ngcontent-%COMP%]{background:#fff;border-radius:8px}.app-margin[_ngcontent-%COMP%]{margin-bottom:20px}.app-padding[_ngcontent-%COMP%]{padding:20px 15px}.content-card[_ngcontent-%COMP%]{padding-bottom:40px}.content-card[_ngcontent-%COMP%]   header[_ngcontent-%COMP%]{padding:20px 10px 20px 16px;border-bottom:1px solid #EBEBEB;margin-bottom:16px;display:flex;align-items:center;gap:15px}.content-card[_ngcontent-%COMP%]   header[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{line-height:0}.card-list[_ngcontent-%COMP%]{font-size:14px;padding-left:34px;padding-right:15px;margin-bottom:32px}@media only screen and (min-width: 768px){.card-list[_ngcontent-%COMP%]{padding-left:54px;padding-right:75px}}.card-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]:not(:last-child){margin-bottom:11px}.card-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .reason-for-issuing[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:3px}.card-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .reason-for-issuing[_ngcontent-%COMP%]:last-child{margin-bottom:0}.button-wrapper[_ngcontent-%COMP%]{padding-left:34px;text-align:center}@media only screen and (min-width: 768px){.button-wrapper[_ngcontent-%COMP%]{padding-left:54px;text-align:left}}.button-wrapper[_ngcontent-%COMP%]   .download-btn[_ngcontent-%COMP%]{min-width:220px}@media only screen and (min-width: 600px){.button-wrapper[_ngcontent-%COMP%]   .download-btn[_ngcontent-%COMP%]{min-width:326px}}"]})}}return e})();var Yt=[{path:"",redirectTo:"credit-note",pathMatch:"full"},{path:"credit-note",component:at}];export{Yt as CREDIT_NOTE_ROUTES};

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.