2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-10-31 09:20:27 +00:00
RTL/frontend/267.8fee459f8c85a156.js
ShahanaFarooqui 8501afe9b5 ng Lint Fixes
2022-11-29 20:01:28 -08:00

1 line
31 KiB
JavaScript

"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[267],{1203:(Q,P,t)=>{t.d(P,{D:()=>N});var a=t(7579),y=t(2722),m=t(7731),C=t(8377),c=t(4650),T=t(62),D=t(9653),E=t(6895),e=t(1576),b=t(7392),w=t(266),V=t(3848);function R(u,p){if(1&u&&(c.TgZ(0,"mat-icon",9),c._uU(1,"info_outline"),c.qZA()),2&u){const l=c.oxw().$implicit;c.Q6J("matTooltip",l.tooltip)}}function H(u,p){if(1&u&&(c.TgZ(0,"span",10),c._uU(1),c.ALo(2,"number"),c.qZA()),2&u){const l=c.oxw().$implicit;c.xp6(1),c.hij(" ",c.lcZ(2,1,l.dataValue)," ")}}function x(u,p){if(1&u&&(c.TgZ(0,"span",10),c._uU(1),c.ALo(2,"number"),c.qZA()),2&u){const l=c.oxw().$implicit,s=c.oxw(2);c.xp6(1),c.hij(" ",c.xi3(2,1,l[s.currencyUnitEnum.BTC],s.currencyUnitFormats.BTC)," ")}}function O(u,p){if(1&u&&(c.TgZ(0,"span",10),c._uU(1),c.ALo(2,"number"),c.qZA()),2&u){const l=c.oxw().$implicit,s=c.oxw(2);c.xp6(1),c.hij(" ",c.xi3(2,1,l[s.currencyUnitEnum.OTHER],s.currencyUnitFormats.OTHER)," ")}}function k(u,p){if(1&u&&(c.TgZ(0,"div",5)(1,"div",6),c._uU(2),c.YNc(3,R,2,1,"mat-icon",7),c.qZA(),c.YNc(4,H,3,3,"span",8),c.YNc(5,x,3,4,"span",8),c.YNc(6,O,3,4,"span",8),c.qZA()),2&u){const l=p.$implicit,s=c.oxw().$implicit,v=c.oxw();c.xp6(2),c.hij(" ",l.title," "),c.xp6(1),c.Q6J("ngIf",l.tooltip),c.xp6(1),c.Q6J("ngIf",s===v.currencyUnitEnum.SATS),c.xp6(1),c.Q6J("ngIf",s===v.currencyUnitEnum.BTC),c.xp6(1),c.Q6J("ngIf",v.fiatConversion&&s!==v.currencyUnitEnum.SATS&&s!==v.currencyUnitEnum.BTC&&""===v.conversionErrorMsg)}}function F(u,p){if(1&u&&(c.TgZ(0,"div",11)(1,"div",12),c._uU(2),c.qZA()()),2&u){const l=c.oxw(2);c.xp6(2),c.Oqu(l.conversionErrorMsg)}}function A(u,p){if(1&u&&(c.TgZ(0,"mat-tab",1)(1,"div",2),c.YNc(2,k,7,5,"div",3),c.qZA(),c.YNc(3,F,3,1,"div",4),c.qZA()),2&u){const l=p.$implicit,s=c.oxw();c.s9C("label",l),c.xp6(2),c.Q6J("ngForOf",s.values),c.xp6(1),c.Q6J("ngIf",s.fiatConversion&&l!==s.currencyUnitEnum.SATS&&l!==s.currencyUnitEnum.BTC&&""!==s.conversionErrorMsg)}}class N{constructor(p,l){this.commonService=p,this.store=l,this.values=[],this.currencyUnitEnum=m.NT,this.currencyUnitFormats=m.Xz,this.currencyUnits=[],this.fiatConversion=!1,this.conversionErrorMsg="",this.unSubs=[new a.x,new a.x,new a.x]}ngOnInit(){this.store.select(C.dT).pipe((0,y.R)(this.unSubs[0])).subscribe(p=>{this.fiatConversion=p.settings.fiatConversion,this.currencyUnits=p.settings.currencyUnits,this.fiatConversion||this.currencyUnits.splice(2,1),this.currencyUnits.length>1&&this.values[0]&&this.values[0].dataValue>=0&&this.getCurrencyValues(this.values)})}ngOnChanges(){this.currencyUnits.length>1&&this.values[0]&&this.values[0].dataValue>=0&&this.getCurrencyValues(this.values)}getCurrencyValues(p){p.forEach(l=>{l.dataValue>0?(this.commonService.convertCurrency(l.dataValue,m.NT.SATS,m.NT.BTC,"",!0).pipe((0,y.R)(this.unSubs[1])).subscribe(s=>{l[m.NT.BTC]=s.BTC}),this.commonService.convertCurrency(l.dataValue,m.NT.SATS,m.NT.OTHER,this.currencyUnits[2],this.fiatConversion).pipe((0,y.R)(this.unSubs[2])).subscribe({next:s=>{l[m.NT.OTHER]=s.OTHER},error:s=>{this.conversionErrorMsg="Conversion Error: "+s}})):(l[m.NT.BTC]=l.dataValue,""===this.conversionErrorMsg&&(l[m.NT.OTHER]=l.dataValue))})}ngOnDestroy(){this.unSubs.forEach(p=>{p.next(null),p.complete()})}static#e=this.\u0275fac=function(l){return new(l||N)(c.Y36(T.v),c.Y36(D.yh))};static#a=this.\u0275cmp=c.Xpm({type:N,selectors:[["rtl-currency-unit-converter"]],inputs:{values:"values"},features:[c.TTD],decls:2,vars:1,consts:[[3,"label",4,"ngFor","ngForOf"],[3,"label"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","center start","class","cc-data-block",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","100","class","p-1 error-border mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center start",1,"cc-data-block"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"cc-data-title"],["matTooltipPosition","below","class","info-icon",3,"matTooltip",4,"ngIf"],["class","cc-data-value",4,"ngIf"],["matTooltipPosition","below",1,"info-icon",3,"matTooltip"],[1,"cc-data-value"],["fxLayout","row","fxFlex","100",1,"p-1","error-border","mt-1"],[1,"cc-data-block"]],template:function(l,s){1&l&&(c.TgZ(0,"mat-tab-group"),c.YNc(1,A,4,3,"mat-tab",0),c.qZA()),2&l&&(c.xp6(1),c.Q6J("ngForOf",s.currencyUnits))},dependencies:[E.sg,E.O5,e.xw,e.Wh,e.yH,b.Hw,w.gM,V.uX,V.SP,E.JJ]})}},9122:(Q,P,t)=>{t.d(P,{n:()=>l});var a=t(7274),y=t(2687),m=t(7731),C=t(4650),c=t(5043),T=t(62),D=t(7009),E=t(6895),e=t(2216),b=t(1576),w=t(5829),V=t(4859),R=t(3546),H=t(4850),x=t(658),O=t(5199),k=t(3390);const F=function(s){return{"display-none":s}};function A(s,v){if(1&s&&(C.TgZ(0,"div",20),C._UZ(1,"qr-code",21),C.qZA()),2&s){const L=C.oxw();C.Q6J("ngClass",C.VKq(4,F,L.screenSize===L.screenSizeEnum.XS||L.screenSize===L.screenSizeEnum.SM)),C.xp6(1),C.Q6J("value",L.address)("size",L.qrWidth)("errorCorrectionLevel","L")}}function N(s,v){if(1&s&&(C.TgZ(0,"div",22),C._UZ(1,"qr-code",21),C.qZA()),2&s){const L=C.oxw();C.Q6J("ngClass",C.VKq(4,F,L.screenSize!==L.screenSizeEnum.XS&&L.screenSize!==L.screenSizeEnum.SM)),C.xp6(1),C.Q6J("value",L.address)("size",L.qrWidth)("errorCorrectionLevel","L")}}function u(s,v){if(1&s&&(C.TgZ(0,"div",13)(1,"div",14)(2,"h4",15),C._uU(3,"Address Type"),C.qZA(),C.TgZ(4,"span",23),C._uU(5),C.qZA()()()),2&s){const L=C.oxw();C.xp6(5),C.Oqu(L.addressType)}}function p(s,v){1&s&&C._UZ(0,"mat-divider",17)}class l{constructor(v,L,g,U,B){this.dialogRef=v,this.data=L,this.logger=g,this.commonService=U,this.snackBar=B,this.faReceipt=y.dLy,this.address="",this.addressType="",this.qrWidth=230,this.screenSize="",this.screenSizeEnum=m.cu}ngOnInit(){this.address=this.data.address,this.addressType=this.data.addressType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onCopyAddress(v){this.snackBar.open("Generated address copied."),this.logger.info("Copied Text: "+v)}static#e=this.\u0275fac=function(L){return new(L||l)(C.Y36(a.so),C.Y36(a.WI),C.Y36(c.mQ),C.Y36(T.v),C.Y36(D.ux))};static#a=this.\u0275cmp=C.Xpm({type:l,selectors:[["rtl-on-chain-generated-address"]],decls:25,vars:8,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","35","fxLayoutAlign","center start","class","modal-qr-code-container padding-gap-large",3,"ngClass",4,"ngIf"],["fxFlex","65"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","2","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxFlex","50","fxLayoutAlign","center start","class","modal-qr-code-container padding-gap-large",3,"ngClass",4,"ngIf"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["fxLayout","row"],["fxFlex","100"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"overflow-wrap","foreground-secondary-text"],[1,"w-100","my-1"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-1"],["autoFocus","","mat-button","","color","primary","tabindex","1","type","submit","rtlClipboard","",3,"payload","copied"],["fxFlex","35","fxLayoutAlign","center start",1,"modal-qr-code-container","padding-gap-large",3,"ngClass"],[3,"value","size","errorCorrectionLevel"],["fxFlex","50","fxLayoutAlign","center start",1,"modal-qr-code-container","padding-gap-large",3,"ngClass"],[1,"foreground-secondary-text"]],template:function(L,g){1&L&&(C.TgZ(0,"div",0),C.YNc(1,A,2,6,"div",1),C.TgZ(2,"div",2)(3,"mat-card-header",3)(4,"div",4),C._UZ(5,"fa-icon",5),C.TgZ(6,"span",6),C._uU(7),C.qZA()(),C.TgZ(8,"button",7),C.NdJ("click",function(){return g.onClose()}),C._uU(9,"X"),C.qZA()(),C.TgZ(10,"mat-card-content",8)(11,"div",9),C.YNc(12,N,2,6,"div",10),C.YNc(13,u,6,1,"div",11),C.YNc(14,p,1,0,"mat-divider",12),C.TgZ(15,"div",13)(16,"div",14)(17,"h4",15),C._uU(18,"Address"),C.qZA(),C.TgZ(19,"span",16),C._uU(20),C.qZA()()(),C._UZ(21,"mat-divider",17),C.TgZ(22,"div",18)(23,"button",19),C.NdJ("copied",function(B){return g.onCopyAddress(B)}),C._uU(24,"Copy Address"),C.qZA()()()()()()),2&L&&(C.xp6(1),C.Q6J("ngIf",g.address),C.xp6(4),C.Q6J("icon",g.faReceipt),C.xp6(2),C.Oqu(g.screenSize===g.screenSizeEnum.XS?"Address":"Generated Address"),C.xp6(5),C.Q6J("ngIf",g.address),C.xp6(1),C.Q6J("ngIf",""!==g.addressType),C.xp6(1),C.Q6J("ngIf",""!==g.addressType),C.xp6(6),C.Oqu(g.address),C.xp6(3),C.Q6J("payload",g.address))},dependencies:[E.mk,E.O5,e.BN,b.xw,b.Wh,b.yH,w.oO,V.lW,R.dn,R.dk,H.d,x.uU,O.y,k.h]})}},7671:(Q,P,t)=>{t.d(P,{D:()=>Z});var a=t(4650),y=t(113),m=t(7731),C=t(5043),c=t(6895),T=t(4006),D=t(1576),E=t(4859),e=t(9602),b=t(7392),w=t(4144),V=t(9549),R=t(4385),H=t(3238);class x extends H.LF{constructor(){super("")}format(f,i){return"MMM YYYY"===i?m.gg[f.getMonth()].name+", "+f.getFullYear():"YYYY"===i?f.getFullYear().toString():f.getDate()+"/"+m.gg[f.getMonth()].name+"/"+f.getFullYear()}static#e=this.\u0275fac=function(i){return new(i||x)};static#a=this.\u0275prov=a.Yz7({token:x,factory:x.\u0275fac})}const O={parse:{dateInput:"LL"},display:{dateInput:"MMM YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}},k={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};class F{static#e=this.\u0275fac=function(i){return new(i||F)};static#a=this.\u0275dir=a.lG2({type:F,selectors:[["","monthlyDate",""]],features:[a._Bn([{provide:H._A,useClass:x},{provide:H.sG,useValue:O}])]})}class A{static#e=this.\u0275fac=function(i){return new(i||A)};static#a=this.\u0275dir=a.lG2({type:A,selectors:[["","yearlyDate",""]],features:[a._Bn([{provide:H._A,useClass:x},{provide:H.sG,useValue:k}])]})}var N=t(9843),u=t(6534);const p=["monthlyDatepicker"],l=["yearlyDatepicker"],s=function(){return{animationDirection:"forward"}};function v(z,f){if(1&z&&a.GkF(0,9),2&z){a.oxw();const i=a.MAs(19);a.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",a.DdM(2,s))}}const L=function(){return{animationDirection:"backward"}};function g(z,f){if(1&z&&a.GkF(0,9),2&z){a.oxw();const i=a.MAs(19);a.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",a.DdM(2,L))}}const U=function(){return{animationDirection:""}};function B(z,f){if(1&z&&a.GkF(0,9),2&z){a.oxw();const i=a.MAs(19);a.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",a.DdM(2,U))}}function Y(z,f){if(1&z&&(a.TgZ(0,"mat-option",17),a._uU(1),a.ALo(2,"titlecase"),a.qZA()),2&z){const i=f.$implicit;a.Q6J("value",i),a.xp6(1),a.hij(" ",a.lcZ(2,2,i)," ")}}function q(z,f){if(1&z){const i=a.EpF();a.TgZ(0,"mat-form-field",18)(1,"input",19,20),a.NdJ("ngModelChange",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.selectedValue=h)}),a.qZA(),a._UZ(3,"mat-datepicker-toggle",21),a.TgZ(4,"mat-datepicker",22,23),a.NdJ("monthSelected",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.onMonthSelected(h))})("dateSelected",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.onMonthSelected(h))}),a.qZA()()}if(2&z){const i=a.MAs(5),M=a.oxw(2);a.xp6(1),a.Q6J("matDatepicker",i)("min",M.first)("max",M.last)("ngModel",M.selectedValue),a.xp6(2),a.Q6J("for",i),a.xp6(1),a.Q6J("startAt",M.selectedValue)}}function G(z,f){if(1&z){const i=a.EpF();a.TgZ(0,"mat-form-field",24)(1,"input",25,26),a.NdJ("ngModelChange",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.selectedValue=h)}),a.qZA(),a._UZ(3,"mat-datepicker-toggle",21),a.TgZ(4,"mat-datepicker",27,28),a.NdJ("yearSelected",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.onYearSelected(h))})("monthSelected",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.onYearSelected(h))})("dateSelected",function(h){a.CHM(i);const _=a.oxw(2);return a.KtG(_.onYearSelected(h))}),a.qZA()()}if(2&z){const i=a.MAs(5),M=a.oxw(2);a.xp6(1),a.Q6J("matDatepicker",i)("min",M.first)("max",M.last)("ngModel",M.selectedValue),a.xp6(2),a.Q6J("for",i),a.xp6(1),a.Q6J("startAt",M.selectedValue)}}function K(z,f){if(1&z){const i=a.EpF();a.TgZ(0,"div",10)(1,"div",11)(2,"mat-select",12),a.NdJ("ngModelChange",function(h){a.CHM(i);const _=a.oxw();return a.KtG(_.selScrollRange=h)})("selectionChange",function(h){a.CHM(i);const _=a.oxw();return a.KtG(_.onRangeChanged(h))}),a.YNc(3,Y,3,4,"mat-option",13),a.qZA()(),a.TgZ(4,"div",14),a.YNc(5,q,6,6,"mat-form-field",15),a.YNc(6,G,6,6,"mat-form-field",16),a.qZA()()}if(2&z){const i=a.oxw();a.Q6J("@sliderAnimation",i.animationDirection),a.xp6(2),a.Q6J("ngModel",i.selScrollRange),a.xp6(1),a.Q6J("ngForOf",i.scrollRanges),a.xp6(2),a.Q6J("ngIf",i.selScrollRange===i.scrollRanges[0]),a.xp6(1),a.Q6J("ngIf",i.selScrollRange===i.scrollRanges[1])}}class Z{constructor(f){this.logger=f,this.scrollRanges=m.op,this.selScrollRange=this.scrollRanges[0],this.today=new Date(Date.now()),this.first=new Date(2018,0,1,0,0,0),this.last=new Date(this.today.getFullYear(),this.today.getMonth(),this.today.getDate(),0,0,0),this.disablePrev=!1,this.disableNext=!0,this.animationDirection="",this.selectedValue=this.last,this.stepChanged=new a.vpe}onRangeChanged(f){this.selScrollRange=f.value,this.onStepChange("LAST")}onMonthSelected(f){this.selectedValue=f,this.onStepChange("SELECTED"),this.monthlyDatepicker.close()}onYearSelected(f){this.selectedValue=f,this.onStepChange("SELECTED"),this.yearlyDatepicker.close()}onStepChange(f){switch(this.logger.info(f),f){case"FIRST":this.animationDirection="backward",this.selectedValue!==this.first&&(this.selectedValue=this.first,this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange}));break;case"PREVIOUS":this.selectedValue=this.selScrollRange===m.op[1]?new Date(this.selectedValue.getFullYear()-1,0,1,0,0,0):new Date(this.selectedValue.getFullYear(),this.selectedValue.getMonth()-1,1,0,0,0),this.animationDirection="backward",this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange});break;case"NEXT":this.selectedValue=this.selScrollRange===m.op[1]?new Date(this.selectedValue.getFullYear()+1,0,1,0,0,0):new Date(this.selectedValue.getFullYear(),this.selectedValue.getMonth()+1,1,0,0,0),this.animationDirection="forward",this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange});break;case"LAST":this.animationDirection="forward",this.selectedValue=this.last,this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange});break;default:this.animationDirection="",this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange})}this.disablePrev=this.selScrollRange===m.op[1]?this.selectedValue.getFullYear()<=this.first.getFullYear():this.selectedValue.getFullYear()<=this.first.getFullYear()&&this.selectedValue.getMonth()<=this.first.getMonth(),this.disableNext=this.selScrollRange===m.op[1]?this.selectedValue.getFullYear()>=this.last.getFullYear():this.selectedValue.getFullYear()>=this.last.getFullYear()&&this.selectedValue.getMonth()>=this.last.getMonth(),this.logger.info(this.disablePrev),this.logger.info(this.disableNext),setTimeout(()=>{this.animationDirection=""},800)}onChartMouseUp(f){"monthlyDate"===f.srcElement.name?this.monthlyDatepicker.open():"yearlyDate"===f.srcElement.name&&this.yearlyDatepicker.open()}static#e=this.\u0275fac=function(i){return new(i||Z)(a.Y36(C.mQ))};static#a=this.\u0275cmp=a.Xpm({type:Z,selectors:[["rtl-horizontal-scroller"]],viewQuery:function(i,M){if(1&i&&(a.Gf(p,5),a.Gf(l,5)),2&i){let h;a.iGM(h=a.CRH())&&(M.monthlyDatepicker=h.first),a.iGM(h=a.CRH())&&(M.yearlyDatepicker=h.first)}},hostBindings:function(i,M){1&i&&a.NdJ("click",function(_){return M.onChartMouseUp(_)})},outputs:{stepChanged:"stepChanged"},decls:20,vars:5,consts:[["fxLayout","row","fxLayoutAlign","space-between stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","22"],["mat-icon-button","","color","primary","type","button","tabindex","1",1,"pr-4",3,"click"],["mat-icon-button","","color","primary","type","button","tabindex","2",3,"disabled","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","22"],["mat-icon-button","","color","primary","type","button","tabindex","5",1,"pr-4",3,"disabled","click"],["mat-icon-button","","color","primary","type","button","tabindex","6",3,"click"],["controlsPanel",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["fxLayout","row","fxLayoutAlign","center center","fxFlex","56"],["fxFlex","50","fxLayoutAlign","center center","fxLayoutAlign.gt-xs","end center",1,"font-bold-700"],["fxFlex","80","fxFlex.gt-md","30","name","selScrlRange","placeholder","Range","tabindex","3",1,"font-bold-700",3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayout","row","fxLayoutAlign","center center","fxLayoutAlign.gt-xs","start center"],["monthlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center",4,"ngIf"],["yearlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center",4,"ngIf"],[3,"value"],["monthlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center"],["matInput","","name","monthlyDate","tabindex","4","readonly","",3,"matDatepicker","min","max","ngModel","ngModelChange"],["monthlyDt","ngModel"],["matSuffix","",3,"for"],["startView","year",3,"startAt","monthSelected","dateSelected"],["monthlyDatepicker",""],["yearlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center"],["matInput","","name","yearlyDate","tabindex","4","readonly","",3,"matDatepicker","min","max","ngModel","ngModelChange"],["yearlyDt","ngModel"],["startView","multi-year",3,"startAt","yearSelected","monthSelected","dateSelected"],["yearlyDatepicker",""]],template:function(i,M){1&i&&(a.TgZ(0,"div",0)(1,"div",1)(2,"button",2),a.NdJ("click",function(){return M.onStepChange("FIRST")}),a.TgZ(3,"mat-icon"),a._uU(4,"skip_previous"),a.qZA()(),a.TgZ(5,"button",3),a.NdJ("click",function(){return M.onStepChange("PREVIOUS")}),a.TgZ(6,"mat-icon"),a._uU(7,"navigate_before"),a.qZA()()(),a.YNc(8,v,1,3,"ng-container",4),a.YNc(9,g,1,3,"ng-container",4),a.YNc(10,B,1,3,"ng-container",4),a.TgZ(11,"div",5)(12,"button",6),a.NdJ("click",function(){return M.onStepChange("NEXT")}),a.TgZ(13,"mat-icon"),a._uU(14,"navigate_next"),a.qZA()(),a.TgZ(15,"button",7),a.NdJ("click",function(){return M.onStepChange("LAST")}),a.TgZ(16,"mat-icon"),a._uU(17,"skip_next"),a.qZA()()()(),a.YNc(18,K,7,5,"ng-template",null,8,a.W1O)),2&i&&(a.xp6(5),a.Q6J("disabled",M.disablePrev),a.xp6(3),a.Q6J("ngIf","forward"===M.animationDirection),a.xp6(1),a.Q6J("ngIf","backward"===M.animationDirection),a.xp6(1),a.Q6J("ngIf",""===M.animationDirection),a.xp6(2),a.Q6J("disabled",M.disableNext))},dependencies:[c.sg,c.O5,c.tP,T.Fj,T.JJ,T.On,D.xw,D.Wh,D.yH,E.RK,e.Mq,e.hl,e.nW,b.Hw,w.Nt,V.KE,V.R9,R.gD,H.ey,F,A,N.F,u.q,c.rS],data:{animation:[y.l]}})}},165:(Q,P,t)=>{t.d(P,{g:()=>W});var a=t(8739),y=t(6308),m=t(671),C=t(7731),c=t(7861),T=t(7579),D=t(2722),E=t(8377),e=t(4650),b=t(62),w=t(9653),V=t(6895),R=t(9445),H=t(4006),x=t(1576),O=t(5829),k=t(4859),F=t(4144),A=t(9549),N=t(4385),u=t(3238),p=t(6839);function l(o,n){if(1&o&&(e.TgZ(0,"mat-option",30),e._uU(1),e.qZA()),2&o){const r=n.$implicit,d=e.oxw();e.Q6J("value",r),e.xp6(1),e.Oqu(d.getLabel(r))}}function s(o,n){1&o&&(e.TgZ(0,"th",31),e._uU(1,"Date"),e.qZA())}function v(o,n){if(1&o&&(e.TgZ(0,"td",32),e._uU(1),e.ALo(2,"date"),e.qZA()),2&o){const r=n.$implicit,d=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,null==r?null:r.date,d.dataRange===d.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy"))}}function L(o,n){1&o&&(e.TgZ(0,"th",33),e._uU(1,"Amount Paid (Sats)"),e.qZA())}function g(o,n){if(1&o&&(e.TgZ(0,"td",32)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&o){const r=n.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,null==r?null:r.amount_paid,"1.0-2"))}}function U(o,n){1&o&&(e.TgZ(0,"th",33),e._uU(1,"# Payments"),e.qZA())}function B(o,n){if(1&o&&(e.TgZ(0,"td",32)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&o){const r=n.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==r?null:r.num_payments))}}function Y(o,n){1&o&&(e.TgZ(0,"th",33),e._uU(1,"Amount Received (Sats)"),e.qZA())}function q(o,n){if(1&o&&(e.TgZ(0,"td",32)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&o){const r=n.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,null==r?null:r.amount_received,"1.0-2"))}}function G(o,n){1&o&&(e.TgZ(0,"th",33),e._uU(1,"# Invoices"),e.qZA())}function K(o,n){if(1&o&&(e.TgZ(0,"td",32)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&o){const r=n.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==r?null:r.num_invoices))}}function Z(o,n){if(1&o){const r=e.EpF();e.TgZ(0,"th",35)(1,"div",36)(2,"mat-select",37),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){e.CHM(r);const S=e.oxw();return e.KtG(S.onDownloadCSV())}),e._uU(5,"Download CSV"),e.qZA()()()()}}function z(o,n){if(1&o){const r=e.EpF();e.TgZ(0,"td",39)(1,"button",40),e.NdJ("click",function(){const I=e.CHM(r).$implicit,e2=e.oxw();return e.KtG(e2.onTransactionClick(I))}),e._uU(2,"View Info"),e.qZA()()}}function f(o,n){1&o&&(e.TgZ(0,"p"),e._uU(1,"No transaction available."),e.qZA())}function i(o,n){if(1&o&&(e.TgZ(0,"td",41),e.YNc(1,f,2,0,"p",42),e.qZA()),2&o){const r=e.oxw();e.xp6(1),e.Q6J("ngIf",!(null!=r.transactions&&r.transactions.data)||(null==r.transactions||null==r.transactions.data?null:r.transactions.data.length)<1)}}const M=function(o){return{"display-none":o}};function h(o,n){if(1&o&&e._UZ(0,"tr",43),2&o){const r=e.oxw();e.Q6J("ngClass",e.VKq(1,M,(null==r.transactions?null:r.transactions.data)&&(null==r.transactions||null==r.transactions.data?null:r.transactions.data.length)>0))}}function _(o,n){1&o&&e._UZ(0,"tr",44)}function j(o,n){1&o&&e._UZ(0,"tr",45)}const J=function(){return["all"]},$=function(){return["no_transaction"]};class W{constructor(n,r,d,S){this.commonService=n,this.store=r,this.datePipe=d,this.camelCaseWithReplace=S,this.dataRange=C.op[0],this.dataList=[],this.selFilter="",this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices"],this.tableSetting={tableId:"transactions",recordsPerPage:C.IV,sortBy:"date",sortOrder:C.Pi.DESCENDING},this.nodePageDefs=C.hG,this.selFilterBy="all",this.timezoneOffset=60*new Date(Date.now()).getTimezoneOffset(),this.scrollRanges=C.op,this.transactions=new m.by([]),this.pageSize=C.IV,this.pageSizeOptions=C.TJ,this.screenSize="",this.screenSizeEnum=C.cu,this.unSubs=[new T.x,new T.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(E.dT).pipe((0,D.R)(this.unSubs[0])).subscribe(n=>{this.nodePageDefs="CLN"===n.lnImplementation?C.At:"ECL"===n.lnImplementation?C.Xk:C.hG}),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:C.IV,this.dataList&&this.dataList.length>0&&this.loadTransactionsTable(this.dataList)}ngAfterViewInit(){this.setTableWidgets()}ngOnChanges(n){n.dataList&&!n.dataList.firstChange&&(this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:C.IV,this.loadTransactionsTable(this.dataList)),n.selFilter&&!n.selFilter.firstChange&&(this.selFilterBy="all",this.applyFilter())}onTransactionClick(n){const r=[[{key:"date",value:this.datePipe.transform(n.date,this.dataRange===C.op[1]?"MMM/yyyy":"dd/MMM/yyyy"),title:"Date",width:100,type:C.Gi.DATE}],[{key:"amount_paid",value:Math.round(n.amount_paid),title:"Amount Paid (Sats)",width:50,type:C.Gi.NUMBER},{key:"num_payments",value:n.num_payments,title:"# Payments",width:50,type:C.Gi.NUMBER}],[{key:"amount_received",value:Math.round(n.amount_received),title:"Amount Received (Sats)",width:50,type:C.Gi.NUMBER},{key:"num_invoices",value:n.num_invoices,title:"# Invoices",width:50,type:C.Gi.NUMBER}]];this.store.dispatch((0,c.qR)({payload:{data:{type:C.n_.INFORMATION,alertTitle:"Transaction Summary",message:r}}}))}applyFilter(){this.transactions&&(this.transactions.filter=this.selFilter.trim().toLowerCase())}getLabel(n){const r=this.nodePageDefs.reports[this.tableSetting.tableId].allowedColumns.find(d=>d.column===n);return r?r.label?r.label:this.camelCaseWithReplace.transform(r.column,"_"):this.commonService.titleCase(n)}setFilterPredicate(){this.transactions.filterPredicate=(n,r)=>{let d="";switch(this.selFilterBy){case"all":d=(n.date?(this.datePipe.transform(n.date,"dd/MMM")+"/"+n.date.getFullYear()).toLowerCase():"")+JSON.stringify(n).toLowerCase();break;case"date":d=this.datePipe.transform(new Date(n[this.selFilterBy]||0),this.dataRange===this.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy")?.toLowerCase()||"";break;default:d=typeof n[this.selFilterBy]>"u"?"":"string"==typeof n[this.selFilterBy]?n[this.selFilterBy].toLowerCase():"boolean"==typeof n[this.selFilterBy]?n[this.selFilterBy]?"yes":"no":n[this.selFilterBy].toString()}return d.includes(r)}}loadTransactionsTable(n){this.transactions=new m.by(n?[...n]:[]),this.setTableWidgets()}setTableWidgets(){this.transactions&&this.transactions.data&&this.transactions.data.length>0&&(this.transactions.sortingDataAccessor=(n,r)=>n[r]&&isNaN(n[r])?n[r].toLocaleLowerCase():n[r]?+n[r]:null,this.transactions.sort=this.sort,this.transactions.sort?.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.transactions.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter())}onDownloadCSV(){this.transactions.data&&this.transactions.data.length>0&&this.commonService.downloadFile(this.dataList,"Transactions-report-"+this.dataRange.toLowerCase())}ngOnDestroy(){this.unSubs.forEach(n=>{n.next(),n.complete()})}static#e=this.\u0275fac=function(r){return new(r||W)(e.Y36(b.v),e.Y36(w.yh),e.Y36(V.uU),e.Y36(R.D3))};static#a=this.\u0275cmp=e.Xpm({type:W,selectors:[["rtl-transactions-report-table"]],viewQuery:function(r,d){if(1&r&&(e.Gf(y.YE,5),e.Gf(a.NW,5)),2&r){let S;e.iGM(S=e.CRH())&&(d.sort=S.first),e.iGM(S=e.CRH())&&(d.paginator=S.first)}},inputs:{dataRange:"dataRange",dataList:"dataList",selFilter:"selFilter",displayedColumns:"displayedColumns",tableSetting:"tableSetting"},features:[e._Bn([{provide:a.ye,useValue:(0,C.pt)("Transactions")}]),e.TTD],decls:38,vars:12,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxFlex","49"],["placeholder","Filter By","tabindex","1","name","filterBy",3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount_paid"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","num_payments"],["matColumnDef","amount_received"],["matColumnDef","num_invoices"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cellcolspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cellcolspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(r,d){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"div",3),e.TgZ(4,"div",4)(5,"mat-form-field",5)(6,"mat-select",6),e.NdJ("ngModelChange",function(I){return d.selFilterBy=I})("selectionChange",function(){return d.selFilter="",d.applyFilter()}),e.YNc(7,l,2,2,"mat-option",7),e.qZA()(),e.TgZ(8,"mat-form-field",5)(9,"input",8),e.NdJ("ngModelChange",function(I){return d.selFilter=I})("input",function(){return d.applyFilter()})("keyup",function(){return d.applyFilter()}),e.qZA()()()(),e.TgZ(10,"div",9)(11,"div",10)(12,"table",11,12),e.ynx(14,13),e.YNc(15,s,2,0,"th",14),e.YNc(16,v,3,4,"td",15),e.BQk(),e.ynx(17,16),e.YNc(18,L,2,0,"th",17),e.YNc(19,g,4,4,"td",15),e.BQk(),e.ynx(20,18),e.YNc(21,U,2,0,"th",17),e.YNc(22,B,4,3,"td",15),e.BQk(),e.ynx(23,19),e.YNc(24,Y,2,0,"th",17),e.YNc(25,q,4,4,"td",15),e.BQk(),e.ynx(26,20),e.YNc(27,G,2,0,"th",17),e.YNc(28,K,4,3,"td",15),e.BQk(),e.ynx(29,21),e.YNc(30,Z,6,0,"th",22),e.YNc(31,z,3,0,"td",23),e.BQk(),e.ynx(32,24),e.YNc(33,i,2,1,"td",25),e.BQk(),e.YNc(34,h,1,3,"tr",26),e.YNc(35,_,1,0,"tr",27),e.YNc(36,j,1,0,"tr",28),e.qZA(),e._UZ(37,"mat-paginator",29),e.qZA()()()()),2&r&&(e.xp6(6),e.Q6J("ngModel",d.selFilterBy),e.xp6(1),e.Q6J("ngForOf",e.DdM(10,J).concat(d.displayedColumns.slice(0,-1))),e.xp6(2),e.Q6J("ngModel",d.selFilter),e.xp6(3),e.Q6J("dataSource",d.transactions),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(11,$)),e.xp6(1),e.Q6J("matHeaderRowDef",d.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",d.displayedColumns),e.xp6(1),e.Q6J("pageSize",d.pageSize)("pageSizeOptions",d.pageSizeOptions)("showFirstLastButtons",d.screenSize!==d.screenSizeEnum.XS))},dependencies:[V.mk,V.sg,V.O5,H.Fj,H.JJ,H.On,x.xw,x.Wh,x.yH,O.oO,k.lW,F.Nt,A.KE,N.gD,N.$L,u.ey,y.YE,y.nU,m.BZ,m.fO,m.as,m.w1,m.Dz,m.nj,m.mD,m.Ke,m.ge,m.ev,m.XQ,m.Gk,m.Q2,a.NW,p.$V,V.JJ,V.uU]})}},3396:(Q,P,t)=>{t.d(P,{KfU:()=>P2,ctA:()=>n1});var P2={prefix:"far",iconName:"face-frown",icon:[512,512,[9785,"frown"],"f119","M143.9 398.6C131.4 394.1 124.9 380.3 129.4 367.9C146.9 319.4 198.9 288 256 288C313.1 288 365.1 319.4 382.6 367.9C387.1 380.3 380.6 394.1 368.1 398.6C355.7 403.1 341.9 396.6 337.4 384.1C328.2 358.5 297.2 336 256 336C214.8 336 183.8 358.5 174.6 384.1C170.1 396.6 156.3 403.1 143.9 398.6V398.6zM208.4 208C208.4 225.7 194 240 176.4 240C158.7 240 144.4 225.7 144.4 208C144.4 190.3 158.7 176 176.4 176C194 176 208.4 190.3 208.4 208zM304.4 208C304.4 190.3 318.7 176 336.4 176C354 176 368.4 190.3 368.4 208C368.4 225.7 354 240 336.4 240C318.7 240 304.4 225.7 304.4 208zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},n1={prefix:"far",iconName:"face-smile",icon:[512,512,[128578,"smile"],"f118","M256 352C293.2 352 319.2 334.5 334.4 318.1C343.3 308.4 358.5 307.7 368.3 316.7C378 325.7 378.6 340.9 369.6 350.6C347.7 374.5 309.7 400 256 400C202.3 400 164.3 374.5 142.4 350.6C133.4 340.9 133.1 325.7 143.7 316.7C153.5 307.7 168.7 308.4 177.6 318.1C192.8 334.5 218.8 352 256 352zM208.4 208C208.4 225.7 194 240 176.4 240C158.7 240 144.4 225.7 144.4 208C144.4 190.3 158.7 176 176.4 176C194 176 208.4 190.3 208.4 208zM304.4 208C304.4 190.3 318.7 176 336.4 176C354 176 368.4 190.3 368.4 208C368.4 225.7 354 240 336.4 240C318.7 240 304.4 225.7 304.4 208zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]}}}]);