mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 09:50:36 +01:00
3910284d58
Release 0.12.2. Co-authored-by: saiy2k <saiy2k@gmail.com> Co-authored-by: bota87 <52842374+bota87@users.noreply.github.com> Co-authored-by: Bota <Bota@ASUS> Co-authored-by: Harshvardhan R <harshvardhanr.181it217@nitk.edu.in>
1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[893],{534:(Y,A,i)=>{i.d(A,{Kf:()=>G,I3:()=>K});var G={prefix:"far",iconName:"frown",icon:[496,512,[],"f119","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.4 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c8.1 9.7 23.1 11.9 33.8 3.1 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z"]},K={prefix:"far",iconName:"smile",icon:[496,512,[],"f118","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"]}},1203:(Y,A,i)=>{i.d(A,{D:()=>w});var e=i(7579),M=i(2722),m=i(7731),a=i(8377),t=i(5e3),c=i(62),Z=i(5620),T=i(3251),x=i(9808),H=i(7093),S=i(5245),N=i(7238);function y(d,C){if(1&d&&(t.TgZ(0,"mat-icon",9),t._uU(1,"info_outline"),t.qZA()),2&d){const v=t.oxw().$implicit;t.Q6J("matTooltip",v.tooltip)}}function O(d,C){if(1&d&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"number"),t.qZA()),2&d){const v=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,v.dataValue)," ")}}function D(d,C){if(1&d&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"number"),t.qZA()),2&d){const v=t.oxw().$implicit,l=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,v[l.currencyUnitEnum.BTC],l.currencyUnitFormats.BTC)," ")}}function R(d,C){if(1&d&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"number"),t.qZA()),2&d){const v=t.oxw().$implicit,l=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,v[l.currencyUnitEnum.OTHER],l.currencyUnitFormats.OTHER)," ")}}function b(d,C){if(1&d&&(t.TgZ(0,"div",5),t.TgZ(1,"div",6),t._uU(2),t.YNc(3,y,2,1,"mat-icon",7),t.qZA(),t.YNc(4,O,3,3,"span",8),t.YNc(5,D,3,4,"span",8),t.YNc(6,R,3,4,"span",8),t.qZA()),2&d){const v=C.$implicit,l=t.oxw().$implicit,u=t.oxw();t.xp6(2),t.hij(" ",v.title," "),t.xp6(1),t.Q6J("ngIf",v.tooltip),t.xp6(1),t.Q6J("ngIf",l===u.currencyUnitEnum.SATS),t.xp6(1),t.Q6J("ngIf",l===u.currencyUnitEnum.BTC),t.xp6(1),t.Q6J("ngIf",u.fiatConversion&&l!==u.currencyUnitEnum.SATS&&l!==u.currencyUnitEnum.BTC&&""===u.conversionErrorMsg)}}function E(d,C){if(1&d&&(t.TgZ(0,"div",11),t.TgZ(1,"div",12),t._uU(2),t.qZA(),t.qZA()),2&d){const v=t.oxw(2);t.xp6(2),t.Oqu(v.conversionErrorMsg)}}function L(d,C){if(1&d&&(t.TgZ(0,"mat-tab",1),t.TgZ(1,"div",2),t.YNc(2,b,7,5,"div",3),t.qZA(),t.YNc(3,E,3,1,"div",4),t.qZA()),2&d){const v=C.$implicit,l=t.oxw();t.s9C("label",v),t.xp6(2),t.Q6J("ngForOf",l.values),t.xp6(1),t.Q6J("ngIf",l.fiatConversion&&v!==l.currencyUnitEnum.SATS&&v!==l.currencyUnitEnum.BTC&&""!==l.conversionErrorMsg)}}let w=(()=>{class d{constructor(v,l){this.commonService=v,this.store=l,this.values=[],this.currencyUnitEnum=m.NT,this.currencyUnitFormats=m.Xz,this.currencyUnits=[],this.fiatConversion=!1,this.conversionErrorMsg="",this.unSubs=[new e.x,new e.x,new e.x]}ngOnInit(){this.store.select(a.dT).pipe((0,M.R)(this.unSubs[0])).subscribe(v=>{this.fiatConversion=v.settings.fiatConversion,this.currencyUnits=v.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(v){v.forEach(l=>{l.dataValue>0?(this.commonService.convertCurrency(l.dataValue,m.NT.SATS,m.NT.BTC,"",!0).pipe((0,M.R)(this.unSubs[1])).subscribe(u=>{l[m.NT.BTC]=u.BTC}),this.commonService.convertCurrency(l.dataValue,m.NT.SATS,m.NT.OTHER,this.currencyUnits[2],this.fiatConversion).pipe((0,M.R)(this.unSubs[2])).subscribe({next:u=>{l[m.NT.OTHER]=u.OTHER},error:u=>{this.conversionErrorMsg="Conversion Error: "+u}})):(l[m.NT.BTC]=l.dataValue,""===this.conversionErrorMsg&&(l[m.NT.OTHER]=l.dataValue))})}ngOnDestroy(){this.unSubs.forEach(v=>{v.next(null),v.complete()})}}return d.\u0275fac=function(v){return new(v||d)(t.Y36(c.v),t.Y36(Z.yh))},d.\u0275cmp=t.Xpm({type:d,selectors:[["rtl-currency-unit-converter"]],inputs:{values:"values"},features:[t.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(v,l){1&v&&(t.TgZ(0,"mat-tab-group"),t.YNc(1,L,4,3,"mat-tab",0),t.qZA()),2&v&&(t.xp6(1),t.Q6J("ngForOf",l.currencyUnits))},directives:[T.SP,x.sg,T.uX,H.xw,H.yH,H.Wh,x.O5,S.Hw,N.gM],pipes:[x.JJ],styles:[""]}),d})()},9122:(Y,A,i)=>{i.d(A,{n:()=>v});var e=i(8966),M=i(801),m=i(7731),a=i(5e3),t=i(5043),c=i(62),Z=i(7261),T=i(7093),x=i(9808),H=i(9224),S=i(9444),N=i(7423),y=i(4834),O=i(3390),D=i(6895),R=i(3322),b=i(159);const E=function(l){return{"display-none":l}};function L(l,u){if(1&l&&(a.TgZ(0,"div",20),a._UZ(1,"qr-code",21),a.qZA()),2&l){const p=a.oxw();a.Q6J("ngClass",a.VKq(4,E,p.screenSize===p.screenSizeEnum.XS||p.screenSize===p.screenSizeEnum.SM)),a.xp6(1),a.Q6J("value",p.address)("size",p.qrWidth)("errorCorrectionLevel","L")}}function w(l,u){if(1&l&&(a.TgZ(0,"div",22),a._UZ(1,"qr-code",21),a.qZA()),2&l){const p=a.oxw();a.Q6J("ngClass",a.VKq(4,E,p.screenSize!==p.screenSizeEnum.XS&&p.screenSize!==p.screenSizeEnum.SM)),a.xp6(1),a.Q6J("value",p.address)("size",p.qrWidth)("errorCorrectionLevel","L")}}function d(l,u){if(1&l&&(a.TgZ(0,"div",13),a.TgZ(1,"div",14),a.TgZ(2,"h4",15),a._uU(3,"Address Type"),a.qZA(),a.TgZ(4,"span",23),a._uU(5),a.qZA(),a.qZA(),a.qZA()),2&l){const p=a.oxw();a.xp6(5),a.Oqu(p.addressType)}}function C(l,u){1&l&&a._UZ(0,"mat-divider",17)}let v=(()=>{class l{constructor(p,g,U,P,F){this.dialogRef=p,this.data=g,this.logger=U,this.commonService=P,this.snackBar=F,this.faReceipt=M.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(p){this.snackBar.open("Generated address copied."),this.logger.info("Copied Text: "+p)}}return l.\u0275fac=function(p){return new(p||l)(a.Y36(e.so),a.Y36(e.WI),a.Y36(t.mQ),a.Y36(c.v),a.Y36(Z.ux))},l.\u0275cmp=a.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(p,g){1&p&&(a.TgZ(0,"div",0),a.YNc(1,L,2,6,"div",1),a.TgZ(2,"div",2),a.TgZ(3,"mat-card-header",3),a.TgZ(4,"div",4),a._UZ(5,"fa-icon",5),a.TgZ(6,"span",6),a._uU(7),a.qZA(),a.qZA(),a.TgZ(8,"button",7),a.NdJ("click",function(){return g.onClose()}),a._uU(9,"X"),a.qZA(),a.qZA(),a.TgZ(10,"mat-card-content",8),a.TgZ(11,"div",9),a.YNc(12,w,2,6,"div",10),a.YNc(13,d,6,1,"div",11),a.YNc(14,C,1,0,"mat-divider",12),a.TgZ(15,"div",13),a.TgZ(16,"div",14),a.TgZ(17,"h4",15),a._uU(18,"Address"),a.qZA(),a.TgZ(19,"span",16),a._uU(20),a.qZA(),a.qZA(),a.qZA(),a._UZ(21,"mat-divider",17),a.TgZ(22,"div",18),a.TgZ(23,"button",19),a.NdJ("copied",function(P){return g.onCopyAddress(P)}),a._uU(24,"Copy Address"),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA()),2&p&&(a.xp6(1),a.Q6J("ngIf",g.address),a.xp6(4),a.Q6J("icon",g.faReceipt),a.xp6(2),a.Oqu(g.screenSize===g.screenSizeEnum.XS?"Address":"Generated Address"),a.xp6(5),a.Q6J("ngIf",g.address),a.xp6(1),a.Q6J("ngIf",""!==g.addressType),a.xp6(1),a.Q6J("ngIf",""!==g.addressType),a.xp6(6),a.Oqu(g.address),a.xp6(3),a.Q6J("payload",g.address))},directives:[T.xw,T.Wh,x.O5,T.yH,H.dk,S.BN,N.lW,H.dn,y.d,O.h,D.y,x.mk,R.oO,b.uU],styles:[""]}),l})()},7671:(Y,A,i)=>{i.d(A,{D:()=>W});var e=i(5e3),M=i(113),m=i(7731),a=i(5043),t=i(7093),c=i(7423),Z=i(5245),T=i(9808),x=i(4107),H=i(3075),S=i(508),N=i(7322);let y=(()=>{class s extends S.LF{format(r,f){return"MMM YYYY"===f?m.gg[r.getMonth()].name+", "+r.getFullYear():"YYYY"===f?r.getFullYear().toString():r.getDate()+"/"+m.gg[r.getMonth()].name+"/"+r.getFullYear()}}return s.\u0275fac=function(){let _;return function(f){return(_||(_=e.n5z(s)))(f||s)}}(),s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac}),s})();const O={parse:{dateInput:"LL"},display:{dateInput:"MMM YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}},D={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};let R=(()=>{class s{}return s.\u0275fac=function(r){return new(r||s)},s.\u0275dir=e.lG2({type:s,selectors:[["","monthlyDate",""]],features:[e._Bn([{provide:S._A,useClass:y},{provide:S.sG,useValue:O}])]}),s})(),b=(()=>{class s{}return s.\u0275fac=function(r){return new(r||s)},s.\u0275dir=e.lG2({type:s,selectors:[["","yearlyDate",""]],features:[e._Bn([{provide:S._A,useClass:y},{provide:S.sG,useValue:D}])]}),s})();var E=i(7531),L=i(6856),w=i(6534),d=i(9843);const C=["monthlyDatepicker"],v=["yearlyDatepicker"],l=function(){return{animationDirection:"forward"}};function u(s,_){if(1&s&&e.GkF(0,9),2&s){e.oxw();const r=e.MAs(19);e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(2,l))}}const p=function(){return{animationDirection:"backward"}};function g(s,_){if(1&s&&e.GkF(0,9),2&s){e.oxw();const r=e.MAs(19);e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(2,p))}}const U=function(){return{animationDirection:""}};function P(s,_){if(1&s&&e.GkF(0,9),2&s){e.oxw();const r=e.MAs(19);e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(2,U))}}function F(s,_){if(1&s&&(e.TgZ(0,"mat-option",17),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&s){const r=_.$implicit;e.Q6J("value",r),e.xp6(1),e.hij(" ",e.lcZ(2,2,r)," ")}}function B(s,_){if(1&s){const r=e.EpF();e.TgZ(0,"mat-form-field",18),e.TgZ(1,"input",19,20),e.NdJ("ngModelChange",function(n){return e.CHM(r),e.oxw(2).selectedValue=n}),e.qZA(),e._UZ(3,"mat-datepicker-toggle",21),e.TgZ(4,"mat-datepicker",22,23),e.NdJ("monthSelected",function(n){return e.CHM(r),e.oxw(2).onMonthSelected(n)})("dateSelected",function(n){return e.CHM(r),e.oxw(2).onMonthSelected(n)}),e.qZA(),e.qZA()}if(2&s){const r=e.MAs(5),f=e.oxw(2);e.xp6(1),e.Q6J("matDatepicker",r)("min",f.first)("max",f.last)("ngModel",f.selectedValue),e.xp6(2),e.Q6J("for",r),e.xp6(1),e.Q6J("startAt",f.selectedValue)}}function I(s,_){if(1&s){const r=e.EpF();e.TgZ(0,"mat-form-field",24),e.TgZ(1,"input",25,26),e.NdJ("ngModelChange",function(n){return e.CHM(r),e.oxw(2).selectedValue=n}),e.qZA(),e._UZ(3,"mat-datepicker-toggle",21),e.TgZ(4,"mat-datepicker",27,28),e.NdJ("yearSelected",function(n){return e.CHM(r),e.oxw(2).onYearSelected(n)})("monthSelected",function(n){return e.CHM(r),e.oxw(2).onYearSelected(n)})("dateSelected",function(n){return e.CHM(r),e.oxw(2).onYearSelected(n)}),e.qZA(),e.qZA()}if(2&s){const r=e.MAs(5),f=e.oxw(2);e.xp6(1),e.Q6J("matDatepicker",r)("min",f.first)("max",f.last)("ngModel",f.selectedValue),e.xp6(2),e.Q6J("for",r),e.xp6(1),e.Q6J("startAt",f.selectedValue)}}function k(s,_){if(1&s){const r=e.EpF();e.TgZ(0,"div",10),e.TgZ(1,"div",11),e.TgZ(2,"mat-select",12),e.NdJ("ngModelChange",function(n){return e.CHM(r),e.oxw().selScrollRange=n})("selectionChange",function(n){return e.CHM(r),e.oxw().onRangeChanged(n)}),e.YNc(3,F,3,4,"mat-option",13),e.qZA(),e.qZA(),e.TgZ(4,"div",14),e.YNc(5,B,6,6,"mat-form-field",15),e.YNc(6,I,6,6,"mat-form-field",16),e.qZA(),e.qZA()}if(2&s){const r=e.oxw();e.Q6J("@sliderAnimation",r.animationDirection),e.xp6(2),e.Q6J("ngModel",r.selScrollRange),e.xp6(1),e.Q6J("ngForOf",r.scrollRanges),e.xp6(2),e.Q6J("ngIf",r.selScrollRange===r.scrollRanges[0]),e.xp6(1),e.Q6J("ngIf",r.selScrollRange===r.scrollRanges[1])}}let W=(()=>{class s{constructor(r){this.logger=r,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 e.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===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(r){"monthlyDate"===r.srcElement.name?this.monthlyDatepicker.open():"yearlyDate"===r.srcElement.name&&this.yearlyDatepicker.open()}}return s.\u0275fac=function(r){return new(r||s)(e.Y36(a.mQ))},s.\u0275cmp=e.Xpm({type:s,selectors:[["rtl-horizontal-scroller"]],viewQuery:function(r,f){if(1&r&&(e.Gf(C,5),e.Gf(v,5)),2&r){let n;e.iGM(n=e.CRH())&&(f.monthlyDatepicker=n.first),e.iGM(n=e.CRH())&&(f.yearlyDatepicker=n.first)}},hostBindings:function(r,f){1&r&&e.NdJ("click",function(h){return f.onChartMouseUp(h)})},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(r,f){1&r&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return f.onStepChange("FIRST")}),e.TgZ(3,"mat-icon"),e._uU(4,"skip_previous"),e.qZA(),e.qZA(),e.TgZ(5,"button",3),e.NdJ("click",function(){return f.onStepChange("PREVIOUS")}),e.TgZ(6,"mat-icon"),e._uU(7,"navigate_before"),e.qZA(),e.qZA(),e.qZA(),e.YNc(8,u,1,3,"ng-container",4),e.YNc(9,g,1,3,"ng-container",4),e.YNc(10,P,1,3,"ng-container",4),e.TgZ(11,"div",5),e.TgZ(12,"button",6),e.NdJ("click",function(){return f.onStepChange("NEXT")}),e.TgZ(13,"mat-icon"),e._uU(14,"navigate_next"),e.qZA(),e.qZA(),e.TgZ(15,"button",7),e.NdJ("click",function(){return f.onStepChange("LAST")}),e.TgZ(16,"mat-icon"),e._uU(17,"skip_next"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(18,k,7,5,"ng-template",null,8,e.W1O)),2&r&&(e.xp6(5),e.Q6J("disabled",f.disablePrev),e.xp6(3),e.Q6J("ngIf","forward"===f.animationDirection),e.xp6(1),e.Q6J("ngIf","backward"===f.animationDirection),e.xp6(1),e.Q6J("ngIf",""===f.animationDirection),e.xp6(2),e.Q6J("disabled",f.disableNext))},directives:[t.xw,t.Wh,t.yH,c.lW,Z.Hw,T.O5,T.tP,x.gD,H.JJ,H.On,T.sg,S.ey,N.KE,R,E.Nt,L.hl,w.q,d.F,H.Fj,L.nW,N.R9,L.Mq,b],pipes:[T.rS],styles:[""],data:{animation:[M.l]}}),s})()},165:(Y,A,i)=>{i.d(A,{g:()=>f});var e=i(6087),M=i(4847),m=i(2075),a=i(7731),t=i(7861),c=i(5e3),Z=i(62),T=i(5620),x=i(9808),H=i(7093),S=i(7322),N=i(7531),y=i(3075),O=i(644),D=i(4107),R=i(508),b=i(7423),E=i(3322);function L(n,h){1&n&&(c.TgZ(0,"th",27),c._uU(1,"Date"),c.qZA())}function w(n,h){if(1&n&&(c.TgZ(0,"td",28),c._uU(1),c.ALo(2,"date"),c.qZA()),2&n){const o=h.$implicit,z=c.oxw();c.xp6(1),c.Oqu(c.xi3(2,1,null==o?null:o.date,z.dataRange===z.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy"))}}function d(n,h){1&n&&(c.TgZ(0,"th",29),c._uU(1,"Amount Paid (Sats)"),c.qZA())}function C(n,h){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=h.$implicit;c.xp6(2),c.Oqu(c.xi3(3,1,null==o?null:o.amount_paid,"1.0-2"))}}function v(n,h){1&n&&(c.TgZ(0,"th",29),c._uU(1,"# Payments"),c.qZA())}function l(n,h){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=h.$implicit;c.xp6(2),c.Oqu(c.lcZ(3,1,null==o?null:o.num_payments))}}function u(n,h){1&n&&(c.TgZ(0,"th",29),c._uU(1,"Amount Received (Sats)"),c.qZA())}function p(n,h){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=h.$implicit;c.xp6(2),c.Oqu(c.xi3(3,1,null==o?null:o.amount_received,"1.0-2"))}}function g(n,h){1&n&&(c.TgZ(0,"th",29),c._uU(1,"# Invoices"),c.qZA())}function U(n,h){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=h.$implicit;c.xp6(2),c.Oqu(c.lcZ(3,1,null==o?null:o.num_invoices))}}function P(n,h){if(1&n){const o=c.EpF();c.TgZ(0,"th",31),c.TgZ(1,"div",32),c.TgZ(2,"mat-select",33),c._UZ(3,"mat-select-trigger"),c.TgZ(4,"mat-option",34),c.NdJ("click",function(){return c.CHM(o),c.oxw().onDownloadCSV()}),c._uU(5,"Download CSV"),c.qZA(),c.qZA(),c.qZA(),c.qZA()}}function F(n,h){if(1&n){const o=c.EpF();c.TgZ(0,"td",35),c.TgZ(1,"button",36),c.NdJ("click",function(){const q=c.CHM(o).$implicit;return c.oxw().onTransactionClick(q)}),c._uU(2,"View Info"),c.qZA(),c.qZA()}}function B(n,h){1&n&&(c.TgZ(0,"p"),c._uU(1,"No transaction available."),c.qZA())}function I(n,h){if(1&n&&(c.TgZ(0,"td",37),c.YNc(1,B,2,0,"p",38),c.qZA()),2&n){const o=c.oxw();c.xp6(1),c.Q6J("ngIf",!(null!=o.transactions&&o.transactions.data)||(null==o.transactions||null==o.transactions.data?null:o.transactions.data.length)<1)}}const k=function(n){return{"display-none":n}};function W(n,h){if(1&n&&c._UZ(0,"tr",39),2&n){const o=c.oxw();c.Q6J("ngClass",c.VKq(1,k,(null==o.transactions?null:o.transactions.data)&&(null==o.transactions||null==o.transactions.data?null:o.transactions.data.length)>0))}}function s(n,h){1&n&&c._UZ(0,"tr",40)}function _(n,h){1&n&&c._UZ(0,"tr",41)}const r=function(){return["no_transaction"]};let f=(()=>{class n{constructor(o,z,V){this.commonService=o,this.store=z,this.datePipe=V,this.dataRange=a.op[0],this.dataList=[],this.filterValue="",this.timezoneOffset=60*new Date(Date.now()).getTimezoneOffset(),this.scrollRanges=a.op,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["date","amount_paid","amount_received","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices","actions"]):(this.flgSticky=!0,this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices","actions"])}ngOnInit(){this.dataList&&this.dataList.length>0&&this.loadTransactionsTable(this.dataList)}ngAfterViewInit(){this.setTableWidgets()}ngOnChanges(o){o.dataList&&!o.dataList.firstChange&&this.loadTransactionsTable(this.dataList),o.filterValue&&!o.filterValue.firstChange&&this.applyFilter()}onTransactionClick(o){const z=[[{key:"date",value:this.datePipe.transform(o.date,this.dataRange===a.op[1]?"MMM/yyyy":"dd/MMM/yyyy"),title:"Date",width:100,type:a.Gi.DATE}],[{key:"amount_paid",value:Math.round(o.amount_paid),title:"Amount Paid (Sats)",width:50,type:a.Gi.NUMBER},{key:"num_payments",value:o.num_payments,title:"# Payments",width:50,type:a.Gi.NUMBER}],[{key:"amount_received",value:Math.round(o.amount_received),title:"Amount Received (Sats)",width:50,type:a.Gi.NUMBER},{key:"num_invoices",value:o.num_invoices,title:"# Invoices",width:50,type:a.Gi.NUMBER}]];this.store.dispatch((0,t.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Transaction Summary",message:z}}}))}applyFilter(){this.transactions&&(this.transactions.filter=this.filterValue.trim().toLowerCase())}loadTransactionsTable(o){this.transactions=new m.by(o?[...o]:[]),this.setTableWidgets()}setTableWidgets(){this.transactions&&this.transactions.data&&this.transactions.data.length>0&&(this.transactions.sortingDataAccessor=(o,z)=>o[z]&&isNaN(o[z])?o[z].toLocaleLowerCase():o[z]?+o[z]:null,this.transactions.sort=this.sort,this.transactions.filterPredicate=(o,z)=>((o.date?(this.datePipe.transform(o.date,"dd/MMM")+"/"+o.date.getFullYear()).toLowerCase():"")+JSON.stringify(o).toLowerCase()).includes(z),this.transactions.paginator=this.paginator)}onDownloadCSV(){this.transactions.data&&this.transactions.data.length>0&&this.commonService.downloadFile(this.dataList,"Transactions-report-"+this.dataRange.toLowerCase())}}return n.\u0275fac=function(o){return new(o||n)(c.Y36(Z.v),c.Y36(T.yh),c.Y36(x.uU))},n.\u0275cmp=c.Xpm({type:n,selectors:[["rtl-transactions-report-table"]],viewQuery:function(o,z){if(1&o&&(c.Gf(M.YE,5),c.Gf(e.NW,5)),2&o){let V;c.iGM(V=c.CRH())&&(z.sort=V.first),c.iGM(V=c.CRH())&&(z.paginator=V.first)}},inputs:{dataRange:"dataRange",dataList:"dataList",filterValue:"filterValue"},features:[c._Bn([{provide:e.ye,useValue:(0,a.pt)("Transactions")}]),c.TTD],decls:34,vars:10,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","30","fxLayoutAlign","start end"],["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","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","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","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(o,z){1&o&&(c.TgZ(0,"div",0),c.TgZ(1,"div",1),c.TgZ(2,"div",2),c._UZ(3,"div",3),c.TgZ(4,"mat-form-field",4),c.TgZ(5,"input",5),c.NdJ("ngModelChange",function(q){return z.filterValue=q})("input",function(){return z.applyFilter()})("keyup",function(){return z.applyFilter()}),c.qZA(),c.qZA(),c.qZA(),c.TgZ(6,"div",6),c.TgZ(7,"div",7),c.TgZ(8,"table",8,9),c.ynx(10,10),c.YNc(11,L,2,0,"th",11),c.YNc(12,w,3,4,"td",12),c.BQk(),c.ynx(13,13),c.YNc(14,d,2,0,"th",14),c.YNc(15,C,4,4,"td",12),c.BQk(),c.ynx(16,15),c.YNc(17,v,2,0,"th",14),c.YNc(18,l,4,3,"td",12),c.BQk(),c.ynx(19,16),c.YNc(20,u,2,0,"th",14),c.YNc(21,p,4,4,"td",12),c.BQk(),c.ynx(22,17),c.YNc(23,g,2,0,"th",14),c.YNc(24,U,4,3,"td",12),c.BQk(),c.ynx(25,18),c.YNc(26,P,6,0,"th",19),c.YNc(27,F,3,0,"td",20),c.BQk(),c.ynx(28,21),c.YNc(29,I,2,1,"td",22),c.BQk(),c.YNc(30,W,1,3,"tr",23),c.YNc(31,s,1,0,"tr",24),c.YNc(32,_,1,0,"tr",25),c.qZA(),c._UZ(33,"mat-paginator",26),c.qZA(),c.qZA(),c.qZA(),c.qZA()),2&o&&(c.xp6(5),c.Q6J("ngModel",z.filterValue),c.xp6(3),c.Q6J("dataSource",z.transactions),c.xp6(22),c.Q6J("matFooterRowDef",c.DdM(9,r)),c.xp6(1),c.Q6J("matHeaderRowDef",z.displayedColumns)("matHeaderRowDefSticky",z.flgSticky),c.xp6(1),c.Q6J("matRowDefColumns",z.displayedColumns),c.xp6(1),c.Q6J("pageSize",z.pageSize)("pageSizeOptions",z.pageSizeOptions)("showFirstLastButtons",z.screenSize!==z.screenSizeEnum.XS))},directives:[H.xw,H.yH,H.Wh,S.KE,N.Nt,y.Fj,y.JJ,y.On,O.$V,m.BZ,M.YE,m.w1,m.fO,m.Dz,m.mD,m.Ke,m.as,m.nj,e.NW,m.ge,M.nU,m.ev,D.gD,D.$L,R.ey,b.lW,m.yh,x.O5,m.Q2,x.mk,E.oO,m.XQ,m.Gk],pipes:[x.uU,x.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})()},9843:(Y,A,i)=>{i.d(A,{F:()=>m});var e=i(3075),M=i(5e3);let m=(()=>{class a{validate(c){return this.max?e.kI.max(+this.max)(c):null}}return a.\u0275fac=function(c){return new(c||a)},a.\u0275dir=M.lG2({type:a,selectors:[["input","max",""]],inputs:{max:"max"},features:[M._Bn([{provide:e.Cf,useExisting:a,multi:!0}])]}),a})()}}]); |