mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
281e51eb7a
Bug Fix: CLN version check error with prefix `basedon`
1 line
31 KiB
JavaScript
1 line
31 KiB
JavaScript
"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[267],{1203:(X,k,n)=>{n.d(k,{D:()=>w});var a=n(7579),S=n(2722),u=n(7731),e=n(8377),t=n(4650),F=n(62),b=n(9653),D=n(6895),L=n(1576),c=n(7392),B=n(266),E=n(3848);function T(h,V){if(1&h&&(t.TgZ(0,"mat-icon",10),t._uU(1,"info_outline"),t.qZA()),2&h){const H=t.oxw().$implicit;t.Q6J("matTooltip",H.tooltip)}}function y(h,V){if(1&h&&(t.TgZ(0,"span",11),t._uU(1),t.ALo(2,"number"),t.qZA()),2&h){const H=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,H.dataValue,"1.0-0")," ")}}function R(h,V){if(1&h&&(t.TgZ(0,"span",11),t._uU(1),t.ALo(2,"number"),t.qZA()),2&h){const H=t.oxw().$implicit,s=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,H[s.currencyUnitEnum.BTC],s.currencyUnitFormats.BTC)," ")}}function N(h,V){if(1&h&&(t.TgZ(0,"span",11),t._uU(1),t.ALo(2,"number"),t.qZA()),2&h){const H=t.oxw().$implicit,s=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,H[s.currencyUnitEnum.OTHER],s.currencyUnitFormats.OTHER)," ")}}function Z(h,V){if(1&h&&(t.TgZ(0,"div",6)(1,"div",7),t._uU(2),t.YNc(3,T,2,1,"mat-icon",8),t.qZA(),t.YNc(4,y,3,4,"span",9),t.YNc(5,R,3,4,"span",9),t.YNc(6,N,3,4,"span",9),t.qZA()),2&h){const H=V.$implicit,s=t.oxw().$implicit,z=t.oxw();t.xp6(2),t.hij(" ",H.title," "),t.xp6(1),t.Q6J("ngIf",H.tooltip),t.xp6(1),t.Q6J("ngIf",s===z.currencyUnitEnum.SATS),t.xp6(1),t.Q6J("ngIf",s===z.currencyUnitEnum.BTC),t.xp6(1),t.Q6J("ngIf",z.fiatConversion&&s!==z.currencyUnitEnum.SATS&&s!==z.currencyUnitEnum.BTC&&""===z.conversionErrorMsg)}}function O(h,V){if(1&h&&(t.TgZ(0,"div",12)(1,"div",13),t._uU(2),t.qZA()()),2&h){const H=t.oxw(2);t.xp6(2),t.Oqu(H.conversionErrorMsg)}}function P(h,V){if(1&h&&(t.TgZ(0,"mat-tab",2)(1,"div",3),t.YNc(2,Z,7,5,"div",4),t.qZA(),t.YNc(3,O,3,1,"div",5),t.qZA()),2&h){const H=V.$implicit,s=t.oxw();t.s9C("label",H),t.xp6(2),t.Q6J("ngForOf",s.values),t.xp6(1),t.Q6J("ngIf",s.fiatConversion&&H!==s.currencyUnitEnum.SATS&&H!==s.currencyUnitEnum.BTC&&""!==s.conversionErrorMsg)}}let w=(()=>{var h;class V{constructor(s,z){this.commonService=s,this.store=z,this.values=[],this.currencyUnitEnum=u.NT,this.currencyUnitFormats=u.Xz,this.currencyUnits=[],this.fiatConversion=!1,this.conversionErrorMsg="",this.unSubs=[new a.x,new a.x,new a.x]}ngOnInit(){this.store.select(e.dT).pipe((0,S.R)(this.unSubs[0])).subscribe(s=>{this.fiatConversion=s.settings.fiatConversion,this.currencyUnits=s.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(s){s.forEach(z=>{z.dataValue>0?(this.commonService.convertCurrency(z.dataValue,u.NT.SATS,u.NT.BTC,"",!0).pipe((0,S.R)(this.unSubs[1])).subscribe(_=>{z[u.NT.BTC]=_.BTC}),this.commonService.convertCurrency(z.dataValue,u.NT.SATS,u.NT.OTHER,this.currencyUnits[2],this.fiatConversion).pipe((0,S.R)(this.unSubs[2])).subscribe({next:_=>{z[u.NT.OTHER]=_.OTHER},error:_=>{this.conversionErrorMsg="Conversion Error: "+_}})):(z[u.NT.BTC]=z.dataValue,""===this.conversionErrorMsg&&(z[u.NT.OTHER]=z.dataValue))})}ngOnDestroy(){this.unSubs.forEach(s=>{s.next(null),s.complete()})}}return(h=V).\u0275fac=function(s){return new(s||h)(t.Y36(F.v),t.Y36(b.yh))},h.\u0275cmp=t.Xpm({type:h,selectors:[["rtl-currency-unit-converter"]],inputs:{values:"values"},features:[t.TTD],decls:2,vars:1,consts:[["mat-stretch-tabs","false","mat-align-tabs","start"],[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 start",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(s,z){1&s&&(t.TgZ(0,"mat-tab-group",0),t.YNc(1,P,4,3,"mat-tab",1),t.qZA()),2&s&&(t.xp6(1),t.Q6J("ngForOf",z.currencyUnits))},dependencies:[D.sg,D.O5,L.xw,L.Wh,L.yH,c.Hw,B.gM,E.uX,E.SP,D.JJ]}),V})()},9122:(X,k,n)=>{n.d(k,{n:()=>H});var a=n(5412),S=n(2687),u=n(7731),e=n(4650),t=n(5043),F=n(62),b=n(7009),D=n(6895),L=n(2216),c=n(1576),B=n(5829),E=n(4859),T=n(3546),y=n(4850),R=n(658),N=n(5199),Z=n(3390);const O=function(s){return{"display-none":s}};function P(s,z){if(1&s&&(e.TgZ(0,"div",20),e._UZ(1,"qr-code",21),e.qZA()),2&s){const _=e.oxw();e.Q6J("ngClass",e.VKq(4,O,_.screenSize===_.screenSizeEnum.XS||_.screenSize===_.screenSizeEnum.SM)),e.xp6(1),e.Q6J("value",_.address)("size",_.qrWidth)("errorCorrectionLevel","L")}}function w(s,z){if(1&s&&(e.TgZ(0,"div",22),e._UZ(1,"qr-code",21),e.qZA()),2&s){const _=e.oxw();e.Q6J("ngClass",e.VKq(4,O,_.screenSize!==_.screenSizeEnum.XS&&_.screenSize!==_.screenSizeEnum.SM)),e.xp6(1),e.Q6J("value",_.address)("size",_.qrWidth)("errorCorrectionLevel","L")}}function h(s,z){if(1&s&&(e.TgZ(0,"div",13)(1,"div",14)(2,"h4",15),e._uU(3,"Address Type"),e.qZA(),e.TgZ(4,"span",23),e._uU(5),e.qZA()()()),2&s){const _=e.oxw();e.xp6(5),e.Oqu(_.addressType)}}function V(s,z){1&s&&e._UZ(0,"mat-divider",17)}let H=(()=>{var s;class z{constructor(A,x,Y,U,G){this.dialogRef=A,this.data=x,this.logger=Y,this.commonService=U,this.snackBar=G,this.faReceipt=S.dLy,this.address="",this.addressType="",this.qrWidth=230,this.screenSize="",this.screenSizeEnum=u.cu}ngOnInit(){this.address=this.data.address,this.addressType=this.data.addressType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onCopyAddress(A){this.snackBar.open("Generated address copied."),this.logger.info("Copied Text: "+A)}}return(s=z).\u0275fac=function(A){return new(A||s)(e.Y36(a.so),e.Y36(a.WI),e.Y36(t.mQ),e.Y36(F.v),e.Y36(b.ux))},s.\u0275cmp=e.Xpm({type:s,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 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(A,x){1&A&&(e.TgZ(0,"div",0),e.YNc(1,P,2,6,"div",1),e.TgZ(2,"div",2)(3,"mat-card-header",3)(4,"div",4),e._UZ(5,"fa-icon",5),e.TgZ(6,"span",6),e._uU(7),e.qZA()(),e.TgZ(8,"button",7),e.NdJ("click",function(){return x.onClose()}),e._uU(9,"X"),e.qZA()(),e.TgZ(10,"mat-card-content",8)(11,"div",9),e.YNc(12,w,2,6,"div",10),e.YNc(13,h,6,1,"div",11),e.YNc(14,V,1,0,"mat-divider",12),e.TgZ(15,"div",13)(16,"div",14)(17,"h4",15),e._uU(18,"Address"),e.qZA(),e.TgZ(19,"span",16),e._uU(20),e.qZA()()(),e._UZ(21,"mat-divider",17),e.TgZ(22,"div",18)(23,"button",19),e.NdJ("copied",function(U){return x.onCopyAddress(U)}),e._uU(24,"Copy Address"),e.qZA()()()()()()),2&A&&(e.xp6(1),e.Q6J("ngIf",x.address),e.xp6(4),e.Q6J("icon",x.faReceipt),e.xp6(2),e.Oqu(x.screenSize===x.screenSizeEnum.XS?"Address":"Generated Address"),e.xp6(5),e.Q6J("ngIf",x.address),e.xp6(1),e.Q6J("ngIf",""!==x.addressType),e.xp6(1),e.Q6J("ngIf",""!==x.addressType),e.xp6(6),e.Oqu(x.address),e.xp6(3),e.Q6J("payload",x.address))},dependencies:[D.mk,D.O5,L.BN,c.xw,c.Wh,c.yH,B.oO,E.lW,T.dn,T.dk,y.d,R.uU,N.y,Z.h]}),z})()},7671:(X,k,n)=>{n.d(k,{D:()=>Q});var a=n(4650),S=n(113),u=n(7731),e=n(5043),t=n(6895),F=n(4006),b=n(1576),D=n(4859),L=n(9602),c=n(7392),B=n(4144),E=n(9549),T=n(4385),y=n(3238),R=n(3353);let N=(()=>{var o;class M extends y.LF{constructor(r,d){super(r,d)}format(r,d){return"MMM YYYY"===d?u.gg[r.getMonth()].name+", "+r.getFullYear():"YYYY"===d?r.getFullYear().toString():r.getDate()+"/"+u.gg[r.getMonth()].name+"/"+r.getFullYear()}}return(o=M).\u0275fac=function(r){return new(r||o)(a.LFG(y.Ad,8),a.LFG(R.t4))},o.\u0275prov=a.Yz7({token:o,factory:o.\u0275fac}),M})();const Z={parse:{dateInput:"LL"},display:{dateInput:"MMM YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}},O={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};let P=(()=>{var o;class M{}return(o=M).\u0275fac=function(r){return new(r||o)},o.\u0275dir=a.lG2({type:o,selectors:[["","monthlyDate",""]],features:[a._Bn([{provide:y._A,useClass:N},{provide:y.sG,useValue:Z}])]}),M})(),w=(()=>{var o;class M{}return(o=M).\u0275fac=function(r){return new(r||o)},o.\u0275dir=a.lG2({type:o,selectors:[["","yearlyDate",""]],features:[a._Bn([{provide:y._A,useClass:N},{provide:y.sG,useValue:O}])]}),M})();var h=n(9843),V=n(6534);const H=["monthlyDatepicker"],s=["yearlyDatepicker"],z=function(){return{animationDirection:"forward"}};function _(o,M){if(1&o&&a.GkF(0,9),2&o){a.oxw();const f=a.MAs(19);a.Q6J("ngTemplateOutlet",f)("ngTemplateOutletContext",a.DdM(2,z))}}const A=function(){return{animationDirection:"backward"}};function x(o,M){if(1&o&&a.GkF(0,9),2&o){a.oxw();const f=a.MAs(19);a.Q6J("ngTemplateOutlet",f)("ngTemplateOutletContext",a.DdM(2,A))}}const Y=function(){return{animationDirection:""}};function U(o,M){if(1&o&&a.GkF(0,9),2&o){a.oxw();const f=a.MAs(19);a.Q6J("ngTemplateOutlet",f)("ngTemplateOutletContext",a.DdM(2,Y))}}function G(o,M){if(1&o&&(a.TgZ(0,"mat-option",17),a._uU(1),a.ALo(2,"titlecase"),a.qZA()),2&o){const f=M.$implicit;a.Q6J("value",f),a.xp6(1),a.hij(" ",a.lcZ(2,2,f)," ")}}function q(o,M){if(1&o){const f=a.EpF();a.TgZ(0,"mat-form-field",18)(1,"input",19,20),a.NdJ("ngModelChange",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.selectedValue=d)}),a.qZA(),a._UZ(3,"mat-datepicker-toggle",21),a.TgZ(4,"mat-datepicker",22,23),a.NdJ("monthSelected",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.onMonthSelected(d))})("dateSelected",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.onMonthSelected(d))}),a.qZA()()}if(2&o){const f=a.MAs(5),r=a.oxw(2);a.xp6(1),a.Q6J("matDatepicker",f)("min",r.first)("max",r.last)("ngModel",r.selectedValue),a.xp6(2),a.Q6J("for",f),a.xp6(1),a.Q6J("startAt",r.selectedValue)}}function K(o,M){if(1&o){const f=a.EpF();a.TgZ(0,"mat-form-field",24)(1,"input",25,26),a.NdJ("ngModelChange",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.selectedValue=d)}),a.qZA(),a._UZ(3,"mat-datepicker-toggle",21),a.TgZ(4,"mat-datepicker",27,28),a.NdJ("yearSelected",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.onYearSelected(d))})("monthSelected",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.onYearSelected(d))})("dateSelected",function(d){a.CHM(f);const C=a.oxw(2);return a.KtG(C.onYearSelected(d))}),a.qZA()()}if(2&o){const f=a.MAs(5),r=a.oxw(2);a.xp6(1),a.Q6J("matDatepicker",f)("min",r.first)("max",r.last)("ngModel",r.selectedValue),a.xp6(2),a.Q6J("for",f),a.xp6(1),a.Q6J("startAt",r.selectedValue)}}function J(o,M){if(1&o){const f=a.EpF();a.TgZ(0,"div",10)(1,"div",11)(2,"mat-select",12),a.NdJ("ngModelChange",function(d){a.CHM(f);const C=a.oxw();return a.KtG(C.selScrollRange=d)})("selectionChange",function(d){a.CHM(f);const C=a.oxw();return a.KtG(C.onRangeChanged(d))}),a.YNc(3,G,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,K,6,6,"mat-form-field",16),a.qZA()()}if(2&o){const f=a.oxw();a.Q6J("@sliderAnimation",f.animationDirection),a.xp6(2),a.Q6J("ngModel",f.selScrollRange),a.xp6(1),a.Q6J("ngForOf",f.scrollRanges),a.xp6(2),a.Q6J("ngIf",f.selScrollRange===f.scrollRanges[0]),a.xp6(1),a.Q6J("ngIf",f.selScrollRange===f.scrollRanges[1])}}let Q=(()=>{var o;class M{constructor(r){this.logger=r,this.scrollRanges=u.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(r){this.selScrollRange=r.value,this.onStepChange("LAST")}onMonthSelected(r){this.selectedValue=r,this.onStepChange("SELECTED"),this.monthlyDatepicker.close()}onYearSelected(r){this.selectedValue=r,this.onStepChange("SELECTED"),this.yearlyDatepicker.close()}onStepChange(r){switch(this.logger.info(r),r){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===u.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===u.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===u.op[1]?this.selectedValue.getFullYear()<=this.first.getFullYear():this.selectedValue.getFullYear()<=this.first.getFullYear()&&this.selectedValue.getMonth()<=this.first.getMonth(),this.disableNext=this.selScrollRange===u.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(r){"monthlyDate"===r.srcElement.name?this.monthlyDatepicker.open():"yearlyDate"===r.srcElement.name&&this.yearlyDatepicker.open()}}return(o=M).\u0275fac=function(r){return new(r||o)(a.Y36(e.mQ))},o.\u0275cmp=a.Xpm({type:o,selectors:[["rtl-horizontal-scroller"]],viewQuery:function(r,d){if(1&r&&(a.Gf(H,5),a.Gf(s,5)),2&r){let C;a.iGM(C=a.CRH())&&(d.monthlyDatepicker=C.first),a.iGM(C=a.CRH())&&(d.yearlyDatepicker=C.first)}},hostBindings:function(r,d){1&r&&a.NdJ("click",function(W){return d.onChartMouseUp(W)})},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","20"],["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","20"],["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","58"],["fxFlex","50","fxLayoutAlign","center center","fxLayoutAlign.gt-xs","end center",1,"font-bold-700"],["fxFlex","60","fxFlex.gt-md","30","name","selScrlRange","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","","fxLayoutAlign","center center",4,"ngIf"],["yearlyDate","","fxLayoutAlign","center center",4,"ngIf"],[3,"value"],["monthlyDate","","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","","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(r,d){1&r&&(a.TgZ(0,"div",0)(1,"div",1)(2,"button",2),a.NdJ("click",function(){return d.onStepChange("FIRST")}),a.TgZ(3,"mat-icon"),a._uU(4,"skip_previous"),a.qZA()(),a.TgZ(5,"button",3),a.NdJ("click",function(){return d.onStepChange("PREVIOUS")}),a.TgZ(6,"mat-icon"),a._uU(7,"navigate_before"),a.qZA()()(),a.YNc(8,_,1,3,"ng-container",4),a.YNc(9,x,1,3,"ng-container",4),a.YNc(10,U,1,3,"ng-container",4),a.TgZ(11,"div",5)(12,"button",6),a.NdJ("click",function(){return d.onStepChange("NEXT")}),a.TgZ(13,"mat-icon"),a._uU(14,"navigate_next"),a.qZA()(),a.TgZ(15,"button",7),a.NdJ("click",function(){return d.onStepChange("LAST")}),a.TgZ(16,"mat-icon"),a._uU(17,"skip_next"),a.qZA()()()(),a.YNc(18,J,7,5,"ng-template",null,8,a.W1O)),2&r&&(a.xp6(5),a.Q6J("disabled",d.disablePrev),a.xp6(3),a.Q6J("ngIf","forward"===d.animationDirection),a.xp6(1),a.Q6J("ngIf","backward"===d.animationDirection),a.xp6(1),a.Q6J("ngIf",""===d.animationDirection),a.xp6(2),a.Q6J("disabled",d.disableNext))},dependencies:[t.sg,t.O5,t.tP,F.Fj,F.JJ,F.On,b.xw,b.Wh,b.yH,D.RK,L.Mq,L.hl,L.nW,c.Hw,B.Nt,E.KE,E.R9,T.gD,y.ey,P,w,h.F,V.q,t.rS],data:{animation:[S.l]}}),M})()},165:(X,k,n)=>{n.d(k,{g:()=>c2});var a=n(8739),S=n(6308),u=n(671),e=n(7731),t=n(7861),F=n(7579),b=n(2722),D=n(8377),L=n(4385),c=n(4650),B=n(62),E=n(9653),T=n(6895),y=n(9445),R=n(4006),N=n(1576),Z=n(5829),O=n(4859),P=n(4144),w=n(9549),h=n(3238),V=n(6839);function H(l,v){if(1&l&&(c.TgZ(0,"mat-option",30),c._uU(1),c.qZA()),2&l){const p=v.$implicit,i=c.oxw();c.Q6J("value",p),c.xp6(1),c.Oqu(i.getLabel(p))}}function s(l,v){1&l&&(c.TgZ(0,"th",31),c._uU(1,"Date"),c.qZA())}function z(l,v){if(1&l&&(c.TgZ(0,"td",32),c._uU(1),c.ALo(2,"date"),c.qZA()),2&l){const p=v.$implicit,i=c.oxw();c.xp6(1),c.Oqu(c.xi3(2,1,null==p?null:p.date,i.dataRange===i.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy"))}}function _(l,v){1&l&&(c.TgZ(0,"th",33),c._uU(1,"Amount Paid (Sats)"),c.qZA())}function A(l,v){if(1&l&&(c.TgZ(0,"td",32)(1,"span",34),c._uU(2),c.ALo(3,"number"),c.qZA()()),2&l){const p=v.$implicit;c.xp6(2),c.Oqu(c.xi3(3,1,null==p?null:p.amount_paid,"1.0-2"))}}function x(l,v){1&l&&(c.TgZ(0,"th",33),c._uU(1,"# Payments"),c.qZA())}function Y(l,v){if(1&l&&(c.TgZ(0,"td",32)(1,"span",34),c._uU(2),c.ALo(3,"number"),c.qZA()()),2&l){const p=v.$implicit;c.xp6(2),c.Oqu(c.lcZ(3,1,null==p?null:p.num_payments))}}function U(l,v){1&l&&(c.TgZ(0,"th",33),c._uU(1,"Amount Received (Sats)"),c.qZA())}function G(l,v){if(1&l&&(c.TgZ(0,"td",32)(1,"span",34),c._uU(2),c.ALo(3,"number"),c.qZA()()),2&l){const p=v.$implicit;c.xp6(2),c.Oqu(c.xi3(3,1,null==p?null:p.amount_received,"1.0-2"))}}function q(l,v){1&l&&(c.TgZ(0,"th",33),c._uU(1,"# Invoices"),c.qZA())}function K(l,v){if(1&l&&(c.TgZ(0,"td",32)(1,"span",34),c._uU(2),c.ALo(3,"number"),c.qZA()()),2&l){const p=v.$implicit;c.xp6(2),c.Oqu(c.lcZ(3,1,null==p?null:p.num_invoices))}}function J(l,v){if(1&l){const p=c.EpF();c.TgZ(0,"th",35)(1,"div",36)(2,"mat-select",37),c._UZ(3,"mat-select-trigger"),c.TgZ(4,"mat-option",38),c.NdJ("click",function(){c.CHM(p);const m=c.oxw();return c.KtG(m.onDownloadCSV())}),c._uU(5,"Download CSV"),c.qZA()()()()}}function Q(l,v){if(1&l){const p=c.EpF();c.TgZ(0,"td",39)(1,"button",40),c.NdJ("click",function(){const g=c.CHM(p).$implicit,I=c.oxw();return c.KtG(I.onTransactionClick(g))}),c._uU(2,"View Info"),c.qZA()()}}function o(l,v){1&l&&(c.TgZ(0,"p"),c._uU(1,"No transaction available."),c.qZA())}function M(l,v){if(1&l&&(c.TgZ(0,"td",41),c.YNc(1,o,2,0,"p",42),c.qZA()),2&l){const p=c.oxw();c.xp6(1),c.Q6J("ngIf",!(null!=p.transactions&&p.transactions.data)||(null==p.transactions||null==p.transactions.data?null:p.transactions.data.length)<1)}}const f=function(l){return{"display-none":l}};function r(l,v){if(1&l&&c._UZ(0,"tr",43),2&l){const p=c.oxw();c.Q6J("ngClass",c.VKq(1,f,(null==p.transactions?null:p.transactions.data)&&(null==p.transactions||null==p.transactions.data?null:p.transactions.data.length)>0))}}function d(l,v){1&l&&c._UZ(0,"tr",44)}function C(l,v){1&l&&c._UZ(0,"tr",45)}const W=function(){return["all"]},$=function(){return["no_transaction"]};let c2=(()=>{var l;class v{constructor(i,m,g,I){this.commonService=i,this.store=m,this.datePipe=g,this.camelCaseWithReplace=I,this.dataRange=e.op[0],this.dataList=[],this.selFilter="",this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices"],this.tableSetting={tableId:"transactions",recordsPerPage:e.IV,sortBy:"date",sortOrder:e.Pi.DESCENDING},this.nodePageDefs=e.hG,this.selFilterBy="all",this.timezoneOffset=60*new Date(Date.now()).getTimezoneOffset(),this.scrollRanges=e.op,this.transactions=new u.by([]),this.pageSize=e.IV,this.pageSizeOptions=e.TJ,this.screenSize="",this.screenSizeEnum=e.cu,this.unSubs=[new F.x,new F.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(D.dT).pipe((0,b.R)(this.unSubs[0])).subscribe(i=>{this.nodePageDefs="CLN"===i.lnImplementation?e.At:"ECL"===i.lnImplementation?e.Xk:e.hG}),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:e.IV,this.dataList&&this.dataList.length>0&&this.loadTransactionsTable(this.dataList)}ngAfterViewInit(){setTimeout(()=>{this.setTableWidgets()},0)}ngOnChanges(i){i.dataList&&!i.dataList.firstChange&&(this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:e.IV,this.loadTransactionsTable(this.dataList)),i.selFilter&&!i.selFilter.firstChange&&(this.selFilterBy="all",this.applyFilter())}onTransactionClick(i){const m=[[{key:"date",value:this.datePipe.transform(i.date,this.dataRange===e.op[1]?"MMM/yyyy":"dd/MMM/yyyy"),title:"Date",width:100,type:e.Gi.DATE}],[{key:"amount_paid",value:Math.round(i.amount_paid),title:"Amount Paid (Sats)",width:50,type:e.Gi.NUMBER},{key:"num_payments",value:i.num_payments,title:"# Payments",width:50,type:e.Gi.NUMBER}],[{key:"amount_received",value:Math.round(i.amount_received),title:"Amount Received (Sats)",width:50,type:e.Gi.NUMBER},{key:"num_invoices",value:i.num_invoices,title:"# Invoices",width:50,type:e.Gi.NUMBER}]];this.store.dispatch((0,t.qR)({payload:{data:{type:e.n_.INFORMATION,alertTitle:"Transaction Summary",message:m}}}))}applyFilter(){this.transactions&&(this.transactions.filter=this.selFilter.trim().toLowerCase())}getLabel(i){const m=this.nodePageDefs.reports[this.tableSetting.tableId].allowedColumns.find(g=>g.column===i);return m?m.label?m.label:this.camelCaseWithReplace.transform(m.column,"_"):this.commonService.titleCase(i)}setFilterPredicate(){this.transactions.filterPredicate=(i,m)=>{let g="";switch(this.selFilterBy){case"all":g=(i.date?(this.datePipe.transform(i.date,"dd/MMM")+"/"+i.date.getFullYear()).toLowerCase():"")+JSON.stringify(i).toLowerCase();break;case"date":g=this.datePipe.transform(new Date(i[this.selFilterBy]||0),this.dataRange===this.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy")?.toLowerCase()||"";break;default:g=typeof i[this.selFilterBy]>"u"?"":"string"==typeof i[this.selFilterBy]?i[this.selFilterBy].toLowerCase():"boolean"==typeof i[this.selFilterBy]?i[this.selFilterBy]?"yes":"no":i[this.selFilterBy].toString()}return g.includes(m)}}loadTransactionsTable(i){this.transactions=new u.by(i?[...i]:[]),this.setTableWidgets()}setTableWidgets(){this.transactions&&this.transactions.data&&this.transactions.data.length>0&&(this.transactions.sort=this.sort,this.transactions.sortingDataAccessor=(i,m)=>i[m]&&isNaN(i[m])?i[m].toLocaleLowerCase():i[m]?+i[m]:null,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(i=>{i.next(),i.complete()})}}return(l=v).\u0275fac=function(i){return new(i||l)(c.Y36(B.v),c.Y36(E.yh),c.Y36(T.uU),c.Y36(y.D3))},l.\u0275cmp=c.Xpm({type:l,selectors:[["rtl-transactions-report-table"]],viewQuery:function(i,m){if(1&i&&(c.Gf(S.YE,5),c.Gf(a.NW,5)),2&i){let g;c.iGM(g=c.CRH())&&(m.sort=g.first),c.iGM(g=c.CRH())&&(m.paginator=g.first)}},inputs:{dataRange:"dataRange",dataList:"dataList",selFilter:"selFilter",displayedColumns:"displayedColumns",tableSetting:"tableSetting"},features:[c._Bn([{provide:L.PG,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:a.ye,useValue:(0,e.pt)("Transactions")}]),c.TTD],decls:43,vars:14,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"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","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,"matSortActive","matSortDirection","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-cell","","colspan","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-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,m){1&i&&(c.TgZ(0,"div",0)(1,"div",1)(2,"div",2),c._UZ(3,"div",3),c.TgZ(4,"div",4)(5,"mat-form-field",5)(6,"mat-label"),c._uU(7,"Filter By"),c.qZA(),c.TgZ(8,"mat-select",6),c.NdJ("ngModelChange",function(I){return m.selFilterBy=I})("selectionChange",function(){return m.selFilter="",m.applyFilter()}),c.TgZ(9,"perfect-scrollbar"),c.YNc(10,H,2,2,"mat-option",7),c.qZA()()(),c.TgZ(11,"mat-form-field",5)(12,"mat-label"),c._uU(13,"Filter"),c.qZA(),c.TgZ(14,"input",8),c.NdJ("ngModelChange",function(I){return m.selFilter=I})("input",function(){return m.applyFilter()})("keyup",function(){return m.applyFilter()}),c.qZA()()()(),c.TgZ(15,"div",9)(16,"div",10)(17,"table",11,12),c.ynx(19,13),c.YNc(20,s,2,0,"th",14),c.YNc(21,z,3,4,"td",15),c.BQk(),c.ynx(22,16),c.YNc(23,_,2,0,"th",17),c.YNc(24,A,4,4,"td",15),c.BQk(),c.ynx(25,18),c.YNc(26,x,2,0,"th",17),c.YNc(27,Y,4,3,"td",15),c.BQk(),c.ynx(28,19),c.YNc(29,U,2,0,"th",17),c.YNc(30,G,4,4,"td",15),c.BQk(),c.ynx(31,20),c.YNc(32,q,2,0,"th",17),c.YNc(33,K,4,3,"td",15),c.BQk(),c.ynx(34,21),c.YNc(35,J,6,0,"th",22),c.YNc(36,Q,3,0,"td",23),c.BQk(),c.ynx(37,24),c.YNc(38,M,2,1,"td",25),c.BQk(),c.YNc(39,r,1,3,"tr",26),c.YNc(40,d,1,0,"tr",27),c.YNc(41,C,1,0,"tr",28),c.qZA(),c._UZ(42,"mat-paginator",29),c.qZA()()()()),2&i&&(c.xp6(8),c.Q6J("ngModel",m.selFilterBy),c.xp6(2),c.Q6J("ngForOf",c.DdM(12,W).concat(m.displayedColumns.slice(0,-1))),c.xp6(4),c.Q6J("ngModel",m.selFilter),c.xp6(3),c.Q6J("matSortActive",m.tableSetting.sortBy)("matSortDirection",m.tableSetting.sortOrder)("dataSource",m.transactions),c.xp6(22),c.Q6J("matFooterRowDef",c.DdM(13,$)),c.xp6(1),c.Q6J("matHeaderRowDef",m.displayedColumns),c.xp6(1),c.Q6J("matRowDefColumns",m.displayedColumns),c.xp6(1),c.Q6J("pageSize",m.pageSize)("pageSizeOptions",m.pageSizeOptions)("showFirstLastButtons",m.screenSize!==m.screenSizeEnum.XS))},dependencies:[T.mk,T.sg,T.O5,R.Fj,R.JJ,R.On,N.xw,N.Wh,N.yH,Z.oO,O.lW,P.Nt,w.KE,w.hX,L.gD,L.$L,h.ey,S.YE,S.nU,u.BZ,u.fO,u.as,u.w1,u.Dz,u.nj,u.mD,u.Ke,u.ge,u.ev,u.yh,u.XQ,u.Gk,u.Q2,a.NW,V.Vv,V.$V,T.JJ,T.uU]}),v})()},3396:(X,k,n)=>{n.d(k,{KfU:()=>P2,ctA:()=>r1});var P2={prefix:"far",iconName:"face-frown",icon:[512,512,[9785,"frown"],"f119","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM174.6 384.1c-4.5 12.5-18.2 18.9-30.7 14.4s-18.9-18.2-14.4-30.7C146.9 319.4 198.9 288 256 288s109.1 31.4 126.6 79.9c4.5 12.5-2 26.2-14.4 30.7s-26.2-2-30.7-14.4C328.2 358.5 297.2 336 256 336s-72.2 22.5-81.4 48.1zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},r1={prefix:"far",iconName:"face-smile",icon:[512,512,[128578,"smile"],"f118","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm177.6 62.1C192.8 334.5 218.8 352 256 352s63.2-17.5 78.4-33.9c9-9.7 24.2-10.4 33.9-1.4s10.4 24.2 1.4 33.9c-22 23.8-60 49.4-113.6 49.4s-91.7-25.5-113.6-49.4c-9-9.7-8.4-24.9 1.4-33.9s24.9-8.4 33.9 1.4zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]}}}]); |