You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/angular/432.635dd65c825f8e4ca25b.js

1 line
271 KiB
JavaScript

(self.webpackChunkrtl=self.webpackChunkrtl||[]).push([[432],{1432:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ECLModule:()=>Ir});var i=n(1511),a=n(6853),o=n(2865),s=n(1572),l=n(3722),r=n(5994);function c(t,e){1&t&&s._UZ(0,"mat-progress-bar",3)}let u=(()=>{class t{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(t=>{switch(!0){case t instanceof a.OD:this.loading=!0;break;case t instanceof a.m2:case t instanceof a.gk:case t instanceof a.Q3:this.loading=!1}})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.YNc(1,c,1,0,"mat-progress-bar",1),s._UZ(2,"router-outlet",null,2),s.qZA()),2&t&&(s.xp6(1),s.Q6J("ngIf",e.loading))},directives:[l.xw,l.yH,l.Wh,i.O5,a.lC,r.pW],styles:[""],data:{animation:[o.g]}}),t})();var d=n(9666),m=n(9568),h=n(8868),p=n(7810),g=n(5291),f=n(9421),x=n(6124),Z=n(3869),y=n(964),A=n(5573),w=n(1084),T=n(7592),v=n(7271),q=n(7439),C=n(8055),b=n(5980),S=n(3691),L=n(377);const F=function(t){return{backgroundColor:t}};function _(t,e){if(1&t&&s._UZ(0,"span",6),2&t){const t=s.oxw();s.Q6J("ngStyle",s.VKq(1,F,t.information.color))}}function k(t,e){if(1&t&&(s.TgZ(0,"div"),s.TgZ(1,"h4",1),s._uU(2,"Color"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"span",7),s._uU(5),s.ALo(6,"uppercase"),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(4),s.Q6J("ngStyle",s.VKq(4,F,t.information.color)),s.xp6(1),s.hij(" ",s.lcZ(6,2,t.information.color)," ")}}function N(t,e){if(1&t&&(s.TgZ(0,"span",2),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(t)}}let U=(()=>{class t{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.chains=[],this.chains.push("Bitcoin "+(this.information.network?this.commonService.titleCase(this.information.network):"Testnet"))}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[s.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Alias"),s.qZA(),s.TgZ(4,"div",2),s._uU(5),s.YNc(6,_,1,3,"span",3),s.qZA(),s.qZA(),s.YNc(7,k,7,6,"div",4),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"Implementation"),s.qZA(),s.TgZ(11,"div",2),s._uU(12),s.qZA(),s.qZA(),s.TgZ(13,"div"),s.TgZ(14,"h4",1),s._uU(15,"Chain"),s.qZA(),s.YNc(16,N,2,1,"span",5),s.qZA(),s.qZA()),2&t&&(s.xp6(5),s.hij(" ",e.information.alias," "),s.xp6(1),s.Q6J("ngIf",!e.showColorFieldSeparately),s.xp6(1),s.Q6J("ngIf",e.showColorFieldSeparately),s.xp6(5),s.Oqu(e.information.lnImplementation||e.information.version?e.information.lnImplementation+" "+e.information.version:""),s.xp6(4),s.Q6J("ngForOf",e.chains))},directives:[l.xw,l.yH,l.Wh,i.O5,i.sg,i.PC,L.Zl],pipes:[i.gd],styles:[""]}),t})(),D=(()=>{class t{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances"},decls:21,vars:11,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["mode","determinate",1,"dashboard-progress-bar",3,"value"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Lightning"),s.qZA(),s.TgZ(4,"div",2),s._uU(5),s.ALo(6,"number"),s.qZA(),s._UZ(7,"mat-progress-bar",3),s.qZA(),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"On-chain"),s.qZA(),s.TgZ(11,"div",2),s._uU(12),s.ALo(13,"number"),s.qZA(),s._UZ(14,"mat-progress-bar",3),s.qZA(),s.TgZ(15,"div"),s.TgZ(16,"h4",1),s._uU(17,"Total"),s.qZA(),s.TgZ(18,"div",2),s._uU(19),s.ALo(20,"number"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(5),s.hij("",s.lcZ(6,5,e.balances.lightning)," Sats"),s.xp6(2),s.s9C("value",e.balances.lightning/e.balances.total*100),s.xp6(5),s.hij("",s.lcZ(13,7,e.balances.onchain)," Sats"),s.xp6(2),s.s9C("value",e.balances.onchain/e.balances.total*100),s.xp6(5),s.hij("",s.lcZ(20,9,e.balances.total)," Sats"))},directives:[l.xw,l.yH,l.Wh,r.pW],pipes:[i.JJ],styles:[""]}),t})();var I=n(6283),O=n(6828),J=n(7679),Y=n(7038);function P(t,e){if(1&t&&(s.TgZ(0,"div",17),s.TgZ(1,"span",18),s._uU(2),s.ALo(3,"slice"),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-hint",19),s.TgZ(6,"strong",5),s._uU(7,"Local:"),s.qZA(),s._uU(8),s.ALo(9,"number"),s.qZA(),s.TgZ(10,"mat-hint",20),s._UZ(11,"fa-icon",21),s._uU(12),s.ALo(13,"number"),s.qZA(),s.TgZ(14,"mat-hint",22),s.TgZ(15,"strong",5),s._uU(16,"Remote:"),s.qZA(),s._uU(17),s.ALo(18,"number"),s.qZA(),s.qZA(),s._UZ(19,"mat-progress-bar",23),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.s9C("matTooltip",t.alias||t.shortChannelId),s.s9C("matTooltipDisabled",(t.alias||t.shortChannelId).length<26),s.xp6(1),s.AsE("",s.Dn7(3,9,(null==t?null:t.alias)||(null==t?null:t.shortChannelId),0,24),"",((null==t?null:t.alias)||(null==t?null:t.shortChannelId)).length>25?"...":"",""),s.xp6(6),s.hij("",s.xi3(9,13,(null==t?null:t.toLocal)||0,"1.0-0")," Sats"),s.xp6(3),s.Q6J("icon",n.faBalanceScale),s.xp6(1),s.hij(" (",s.lcZ(13,16,(null==t?null:t.balancedness)||0),") "),s.xp6(5),s.hij("",s.xi3(18,18,(null==t?null:t.toRemote)||0,"1.0-0")," Sats"),s.xp6(2),s.s9C("value",t.toLocal&&t.toLocal>0?+t.toLocal/(+t.toLocal+ +t.toRemote)*100:0)}}function R(t,e){if(1&t&&(s.TgZ(0,"div",15),s.YNc(1,P,20,21,"div",16),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngForOf",t.allChannels)}}function M(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",24),s._uU(1," No channels available. "),s.TgZ(2,"button",25),s.NdJ("click",function(){return s.CHM(t),s.oxw().goToChannels()}),s._uU(3,"Open Channel"),s.qZA(),s.qZA()}}let Q=(()=>{class t{constructor(t){this.router=t,this.faBalanceScale=g.DL8,this.faDumbbell=g.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy"},decls:26,vars:15,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["fxLayout","column","fxFlex","100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"matTooltip","matTooltipDisabled"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90","color-primary"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90","color-primary"],["matTooltip","Balance Score",1,"color-primary","mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90","color-primary"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",1,"mt-1","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(t,e){if(1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"span",2),s._uU(3,"Total Capacity"),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-hint",4),s.TgZ(6,"strong",5),s._uU(7,"Local:"),s.qZA(),s._uU(8),s.ALo(9,"number"),s.qZA(),s.TgZ(10,"mat-hint",6),s._UZ(11,"fa-icon",7),s._uU(12),s.ALo(13,"number"),s.qZA(),s.TgZ(14,"mat-hint",8),s.TgZ(15,"strong",5),s._uU(16,"Remote:"),s.qZA(),s._uU(17),s.ALo(18,"number"),s.qZA(),s.qZA(),s._UZ(19,"mat-progress-bar",9),s.qZA(),s.TgZ(20,"div",10),s._UZ(21,"mat-divider",11),s.qZA(),s.TgZ(22,"div",12),s.YNc(23,R,2,1,"div",13),s.qZA(),s.qZA(),s.YNc(24,M,4,0,"ng-template",null,14,s.W1O)),2&t){const t=s.MAs(25);s.xp6(8),s.hij("",s.xi3(9,7,e.channelBalances.localBalance||0,"1.0-0")," Sats"),s.xp6(3),s.Q6J("icon",e.faBalanceScale),s.xp6(1),s.hij(" (",s.lcZ(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),s.xp6(5),s.hij("",s.xi3(18,12,e.channelBalances.remoteBalance||0,"1.0-0")," Sats"),s.xp6(2),s.s9C("value",e.channelBalances.localBalance&&e.channelBalances.localBalance>0?+e.channelBalances.localBalance/(+e.channelBalances.localBalance+ +e.channelBalances.remoteBalance)*100:0),s.xp6(4),s.Q6J("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",t)}},directives:[l.xw,l.Wh,l.yH,I.bx,T.BN,O.gM,r.pW,J.d,Y.$V,i.O5,i.sg,b.lW],pipes:[i.JJ,i.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),t})(),E=(()=>{class t{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){if(this.fees.monthly_fee){this.totalFees=[{name:"Monthly",value:this.fees.monthly_fee},{name:"Weekly",value:this.fees.weekly_fee},{name:"Daily ",value:this.fees.daily_fee}];let t=Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10),e=Math.pow(10,t-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/e)*e/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees"},features:[s.TTD],decls:38,vars:18,consts:[["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Daily"),s.qZA(),s.TgZ(4,"div",2),s._uU(5),s.ALo(6,"number"),s.qZA(),s.qZA(),s.TgZ(7,"div"),s.TgZ(8,"h4",1),s._uU(9,"Weekly"),s.qZA(),s.TgZ(10,"div",2),s._uU(11),s.ALo(12,"number"),s.qZA(),s.qZA(),s.TgZ(13,"div"),s.TgZ(14,"h4",1),s._uU(15,"Monthly"),s.qZA(),s.TgZ(16,"div",2),s._uU(17),s.ALo(18,"number"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(19,"div",0),s.TgZ(20,"div"),s.TgZ(21,"h4",1),s._uU(22,"Transactions"),s.qZA(),s.TgZ(23,"div",2),s._uU(24),s.ALo(25,"number"),s.qZA(),s.qZA(),s.TgZ(26,"div"),s.TgZ(27,"h4",1),s._uU(28,"Transactions"),s.qZA(),s.TgZ(29,"div",2),s._uU(30),s.ALo(31,"number"),s.qZA(),s.qZA(),s.TgZ(32,"div"),s.TgZ(33,"h4",1),s._uU(34,"Transactions"),s.qZA(),s.TgZ(35,"div",2),s._uU(36),s.ALo(37,"number"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(5),s.hij("",s.lcZ(6,6,null==e.fees?null:e.fees.daily_fee)," Sats"),s.xp6(6),s.hij("",s.lcZ(12,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),s.xp6(6),s.hij("",s.lcZ(18,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),s.xp6(7),s.Oqu(s.lcZ(25,12,null==e.fees?null:e.fees.daily_txs)),s.xp6(6),s.Oqu(s.lcZ(31,14,null==e.fees?null:e.fees.weekly_txs)),s.xp6(6),s.Oqu(s.lcZ(37,16,null==e.fees?null:e.fees.monthly_txs)))},directives:[l.xw,l.yH,l.Wh],pipes:[i.JJ],styles:[""]}),t})(),B=(()=>{class t{constructor(){this.channelsStatus={}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus"},decls:41,vars:18,consts:[["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],[1,"dot","tiny-dot","green"],[1,"dot","tiny-dot","yellow"],[1,"dot","tiny-dot","grey"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Active"),s.qZA(),s.TgZ(4,"div",2),s._UZ(5,"span",3),s._uU(6),s.ALo(7,"number"),s.qZA(),s.qZA(),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"Pending"),s.qZA(),s.TgZ(11,"div",2),s._UZ(12,"span",4),s._uU(13),s.ALo(14,"number"),s.qZA(),s.qZA(),s.TgZ(15,"div"),s.TgZ(16,"h4",1),s._uU(17,"Inactive"),s.qZA(),s.TgZ(18,"div",2),s._UZ(19,"span",5),s._uU(20),s.ALo(21,"number"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(22,"div",0),s.TgZ(23,"div"),s.TgZ(24,"h4",1),s._uU(25,"Capacity"),s.qZA(),s.TgZ(26,"div",2),s._uU(27),s.ALo(28,"number"),s.qZA(),s.qZA(),s.TgZ(29,"div"),s.TgZ(30,"h4",1),s._uU(31,"Capacity"),s.qZA(),s.TgZ(32,"div",2),s._uU(33),s.ALo(34,"number"),s.qZA(),s.qZA(),s.TgZ(35,"div"),s.TgZ(36,"h4",1),s._uU(37,"Capacity"),s.qZA(),s.TgZ(38,"div",2),s._uU(39),s.ALo(40,"number"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(6),s.Oqu(s.lcZ(7,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),s.xp6(7),s.Oqu(s.lcZ(14,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),s.xp6(7),s.Oqu(s.lcZ(21,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),s.xp6(7),s.hij("",s.lcZ(28,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),s.xp6(6),s.hij("",s.lcZ(34,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),s.xp6(6),s.hij("",s.lcZ(40,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats"))},directives:[l.xw,l.yH,l.Wh],pipes:[i.JJ],styles:[""]}),t})();function H(t,e){if(1&t&&(s.TgZ(0,"mat-hint",17),s.TgZ(1,"strong",18),s._uU(2,"Capacity: "),s.qZA(),s._uU(3),s.ALo(4,"number"),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(3),s.hij("",s.xi3(4,1,t.toRemote||0,"1.0-0")," Sats")}}function z(t,e){if(1&t&&(s.TgZ(0,"mat-hint",17),s.TgZ(1,"strong",18),s._uU(2,"Capacity: "),s.qZA(),s._uU(3),s.ALo(4,"number"),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(3),s.hij("",s.xi3(4,1,t.toLocal||0,"1.0-0")," Sats")}}function V(t,e){if(1&t&&s._UZ(0,"mat-progress-bar",19),2&t){const t=s.oxw().$implicit,e=s.oxw(2);s.s9C("value",e.totalLiquidity>0?(+t.toRemote||0)/e.totalLiquidity*100:0)}}function G(t,e){if(1&t&&s._UZ(0,"mat-progress-bar",19),2&t){const t=s.oxw().$implicit,e=s.oxw(2);s.s9C("value",e.totalLiquidity>0?(+t.toLocal||0)/e.totalLiquidity*100:0)}}function $(t,e){if(1&t&&(s.TgZ(0,"div",12),s.TgZ(1,"span",13),s._uU(2),s.ALo(3,"slice"),s.qZA(),s.TgZ(4,"div",14),s.YNc(5,H,5,4,"mat-hint",15),s.YNc(6,z,5,4,"mat-hint",15),s.qZA(),s.YNc(7,V,1,1,"mat-progress-bar",16),s.YNc(8,G,1,1,"mat-progress-bar",16),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.s9C("matTooltip",t.alias||t.shortChannelId),s.s9C("matTooltipDisabled",(t.alias||t.shortChannelId).length<26),s.xp6(1),s.AsE("",s.Dn7(3,8,t.alias||t.shortChannelId,0,24),"",(t.alias||t.shortChannelId).length>25?"...":"",""),s.xp6(3),s.Q6J("ngIf","In"===n.direction),s.xp6(1),s.Q6J("ngIf","Out"===n.direction),s.xp6(1),s.Q6J("ngIf","In"===n.direction),s.xp6(1),s.Q6J("ngIf","Out"===n.direction)}}function X(t,e){if(1&t&&(s.TgZ(0,"div",10),s.YNc(1,$,9,12,"div",11),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngForOf",t.allChannels)}}function W(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",22),s.NdJ("click",function(){return s.CHM(t),s.oxw(2).goToChannels()}),s._uU(1,"Open Channel"),s.qZA()}}function K(t,e){if(1&t&&(s.TgZ(0,"div",20),s._uU(1," No channels available. "),s.YNc(2,W,2,0,"button",21),s.qZA()),2&t){const t=s.oxw();s.xp6(2),s.Q6J("ngIf","Out"===t.direction)}}const j=function(t,e,n){return{"mb-4":t,"mb-2":e,"mb-1":n}};let tt=(()=>{class t{constructor(t,e){this.router=t,this.commonService=e,this.screenSize="",this.screenSizeEnum=f.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.F0),s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels"},decls:14,vars:11,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["fxLayout","column","fxFlex","100",1,"w-100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"matTooltip","matTooltipDisabled"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","100","fxLayoutAlign","start center","class","font-size-90 color-primary",4,"ngIf"],["class","dashboard-progress-bar","mode","determinate",3,"value",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"font-size-90","color-primary"],[1,"font-weight-900","mr-5px"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","1",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(t,e){if(1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"span",2),s._uU(3,"Total Capacity"),s.qZA(),s.TgZ(4,"mat-hint",3),s._uU(5),s.ALo(6,"number"),s.qZA(),s._UZ(7,"mat-progress-bar",4),s.qZA(),s.TgZ(8,"div",5),s._UZ(9,"mat-divider",6),s.qZA(),s.TgZ(10,"div",7),s.YNc(11,X,2,1,"div",8),s.qZA(),s.qZA(),s.YNc(12,K,3,1,"ng-template",null,9,s.W1O)),2&t){const t=s.MAs(13);s.Q6J("ngClass",s.kEZ(7,j,e.screenSize===e.screenSizeEnum.XS||e.screenSize===e.screenSizeEnum.SM,e.screenSize===e.screenSizeEnum.MD,e.screenSize===e.screenSizeEnum.LG||e.screenSize===e.screenSizeEnum.XL)),s.xp6(5),s.hij("",s.xi3(6,4,e.totalLiquidity,"1.0-0")," Sats"),s.xp6(6),s.Q6J("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",t)}},directives:[l.xw,l.Wh,l.yH,i.mk,L.oO,I.bx,r.pW,J.d,Y.$V,i.O5,i.sg,O.gM,b.lW],pipes:[i.JJ,i.OU],styles:[""]}),t})();var et=n(5109),nt=n(3005),it=n(2464),at=n(7033),ot=n(4608),st=n(3929),lt=n(6073),rt=n(6756),ct=n(6880),ut=n(5095),dt=n(4786),mt=n(1522);function ht(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Description is required."),s.qZA())}function pt(t,e){if(1&t&&(s.TgZ(0,"mat-option",25),s._uU(1),s.ALo(2,"titlecase"),s.qZA()),2&t){const t=e.$implicit;s.Q6J("value",t),s.xp6(1),s.Oqu(s.lcZ(2,2,t))}}function gt(t,e){if(1&t&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Oqu(t.invoiceError)}}function ft(t,e){if(1&t&&(s.TgZ(0,"div",26),s._UZ(1,"fa-icon",27),s.YNc(2,gt,2,1,"span",11),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==t.invoiceError)}}let xt=(()=>{class t{constructor(t,e,n,i,a,o){this.dialogRef=t,this.data=e,this.store=n,this.decimalPipe=i,this.commonService=a,this.actions$=o,this.faExclamationTriangle=g.eHv,this.selNode={},this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=f.IV,this.timeUnitEnum=f.Qk,this.timeUnits=f.LO,this.selTimeUnit=f.Qk.SECS,this.invoiceError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information}),this.actions$.pipe((0,m.R)(this.unSubs[1]),(0,h.h)(t=>t.type===x.Wz||t.type===x.Wk)).subscribe(t=>{t.type===x.Wk&&this.dialogRef.close(),t.type===x.Wz&&"CreateInvoice"===t.payload.action&&(this.invoiceError=t.payload.message)})}onAddInvoice(t){if(this.invoiceError="",!this.description)return!0;let e=this.expiry?this.expiry:3600;this.selTimeUnit!==f.Qk.SECS&&(e=this.commonService.convertTime(this.expiry,this.selTimeUnit,f.Qk.SECS));let n=null;n=this.invoiceValue?{description:this.description,expireIn:e,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:e},this.store.dispatch(new st.Fk("Creating Invoice...")),this.store.dispatch(new x.Ks(n))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=void 0,this.invoiceValueHint="",this.selTimeUnit=f.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,f.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,m.R)(this.unSubs[2])).subscribe(t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,f.Xz.OTHER)+" "+t.unit}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(ot.WI),s.Y36(y.yh),s.Y36(i.JJ),s.Y36(w.v),s.Y36(A.eX))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-create-invoices"]],decls:35,vars:17,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","placeholder","Expiry","type","number","name","exp","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Create Invoice"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"form",7,8),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"input",10),s.NdJ("ngModelChange",function(t){return e.description=t}),s.qZA(),s.YNc(13,ht,2,0,"mat-error",11),s.qZA(),s.TgZ(14,"div",12),s.TgZ(15,"mat-form-field",13),s.TgZ(16,"input",14),s.NdJ("ngModelChange",function(t){return e.invoiceValue=t})("keyup",function(){return e.onInvoiceValueChange()}),s.qZA(),s.TgZ(17,"span",15),s._uU(18),s.qZA(),s.TgZ(19,"mat-hint"),s._uU(20),s.qZA(),s.qZA(),s.TgZ(21,"mat-form-field",16),s.TgZ(22,"input",17),s.NdJ("ngModelChange",function(t){return e.expiry=t}),s.qZA(),s.TgZ(23,"span",15),s._uU(24),s.ALo(25,"titlecase"),s.qZA(),s.qZA(),s.TgZ(26,"mat-form-field",18),s.TgZ(27,"mat-select",19),s.NdJ("selectionChange",function(t){return e.onTimeUnitChange(t)}),s.YNc(28,pt,3,4,"mat-option",20),s.qZA(),s.qZA(),s.qZA(),s.YNc(29,ft,3,2,"div",21),s.TgZ(30,"div",22),s.TgZ(31,"button",23),s.NdJ("click",function(){return e.resetData()}),s._uU(32,"Clear Field"),s.qZA(),s.TgZ(33,"button",24),s.NdJ("click",function(){s.CHM(t);const n=s.MAs(10);return e.onAddInvoice(n)}),s._uU(34,"Create Invoice"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}2&t&&(s.xp6(6),s.Q6J("mat-dialog-close",!1),s.xp6(6),s.Q6J("ngModel",e.description),s.xp6(1),s.Q6J("ngIf",!e.description),s.xp6(3),s.Q6J("ngModel",e.invoiceValue)("step",100)("min",1),s.xp6(2),s.hij(" ",null==e.information?null:e.information.smaller_currency_unit," "),s.xp6(2),s.Oqu(e.invoiceValueHint),s.xp6(2),s.Q6J("ngModel",e.expiry)("step",e.selTimeUnit===e.timeUnitEnum.SECS?300:e.selTimeUnit===e.timeUnitEnum.MINS?10:e.selTimeUnit===e.timeUnitEnum.HOURS?2:1)("min",1),s.xp6(2),s.hij(" ",s.lcZ(25,15,e.selTimeUnit)," "),s.xp6(3),s.Q6J("value",e.selTimeUnit),s.xp6(1),s.Q6J("ngForOf",e.timeUnits),s.xp6(1),s.Q6J("ngIf",""!==e.invoiceError))},directives:[l.xw,l.yH,q.dk,l.Wh,b.lW,ot.ZT,q.dn,lt._Y,lt.JL,lt.F,I.KE,rt.Nt,lt.Fj,ct.h,lt.Q7,lt.JJ,lt.On,i.O5,lt.wV,lt.qQ,ut.q,I.R9,I.bx,dt.gD,i.sg,I.TO,mt.ey,T.BN],pipes:[i.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();var Zt=n(3921),yt=n(4636);function At(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Description is required."),s.qZA())}function wt(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"form",4,5),s.TgZ(2,"mat-form-field",6),s.TgZ(3,"input",7),s.NdJ("ngModelChange",function(e){return s.CHM(t),s.oxw().description=e}),s.qZA(),s.YNc(4,At,2,0,"mat-error",8),s.qZA(),s.TgZ(5,"mat-form-field",9),s.TgZ(6,"input",10,11),s.NdJ("ngModelChange",function(e){return s.CHM(t),s.oxw().invoiceValue=e})("keyup",function(){return s.CHM(t),s.oxw().onInvoiceValueChange()}),s.qZA(),s.TgZ(8,"span",12),s._uU(9),s.qZA(),s.TgZ(10,"mat-hint"),s._uU(11),s.qZA(),s.qZA(),s.TgZ(12,"div",13),s.TgZ(13,"button",14),s.NdJ("click",function(){return s.CHM(t),s.oxw().resetData()}),s._uU(14,"Clear Field"),s.qZA(),s.TgZ(15,"button",15),s.NdJ("click",function(){s.CHM(t);const e=s.MAs(1);return s.oxw().onAddInvoice(e)}),s._uU(16,"Create Invoice"),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=s.oxw();s.xp6(3),s.Q6J("ngModel",t.description),s.xp6(1),s.Q6J("ngIf",!t.description),s.xp6(2),s.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),s.xp6(3),s.hij(" ",null==t.information?null:t.information.smaller_currency_unit," "),s.xp6(2),s.Oqu(t.invoiceValueHint)}}function Tt(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",16),s.TgZ(1,"button",17),s.NdJ("click",function(){return s.CHM(t),s.oxw().openCreateInvoiceModal()}),s._uU(2,"Create Invoice"),s.qZA(),s.qZA()}}function vt(t,e){1&t&&s._UZ(0,"mat-progress-bar",47)}function qt(t,e){1&t&&(s.TgZ(0,"th",48),s._uU(1," Date Created "),s.qZA())}const Ct=function(t){return{"mr-0":t}};function bt(t,e){if(1&t&&s._UZ(0,"span",53),2&t){const t=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Ct,t.screenSize===t.screenSizeEnum.XS))}}function St(t,e){if(1&t&&s._UZ(0,"span",54),2&t){const t=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Ct,t.screenSize===t.screenSizeEnum.XS))}}function Lt(t,e){if(1&t&&s._UZ(0,"span",55),2&t){const t=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Ct,t.screenSize===t.screenSizeEnum.XS))}}function Ft(t,e){if(1&t&&(s.TgZ(0,"td",49),s.YNc(1,bt,1,3,"span",50),s.YNc(2,St,1,3,"span",51),s.YNc(3,Lt,1,3,"span",52),s._uU(4),s.ALo(5,"date"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Q6J("ngIf","received"===t.status),s.xp6(1),s.Q6J("ngIf","unpaid"===t.status),s.xp6(1),s.Q6J("ngIf","expired"===t.status||"unknown"===t.status),s.xp6(1),s.hij(" ",s.xi3(5,4,1e3*t.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function _t(t,e){1&t&&(s.TgZ(0,"th",48),s._uU(1," Date Settled "),s.qZA())}function kt(t,e){if(1&t&&(s.TgZ(0,"td",49),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(t.receivedAtStr||"-")}}function Nt(t,e){1&t&&(s.TgZ(0,"th",48),s._uU(1," Description "),s.qZA())}const Ut=function(t){return{"max-width":t}};function Dt(t,e){if(1&t&&(s.TgZ(0,"td",49),s.TgZ(1,"div",56),s.TgZ(2,"span",57),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("ngStyle",s.VKq(2,Ut,n.screenSize===n.screenSizeEnum.XS?"10rem":"32rem")),s.xp6(2),s.Oqu(t.description)}}function It(t,e){1&t&&(s.TgZ(0,"th",58),s._uU(1," Amount (Sats) "),s.qZA())}function Ot(t,e){if(1&t&&(s.TgZ(0,"td",59),s.TgZ(1,"span",60),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",t.amount?s.xi3(3,1,t.amount,"1.0-0"):"-","")}}function Jt(t,e){1&t&&(s.TgZ(0,"th",58),s._uU(1," Amount Settled (Sats) "),s.qZA())}function Yt(t,e){if(1&t&&(s.TgZ(0,"td",59),s.TgZ(1,"span",60),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",t.amountSettled?s.xi3(3,1,t.amountSettled,"1.0-0"):"-","")}}function Pt(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",61),s.TgZ(1,"div",62),s.TgZ(2,"mat-select",63),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",64),s.NdJ("click",function(){return s.CHM(t),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}const Rt=function(t){return{"px-3":t}};function Mt(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",65),s.TgZ(1,"button",66),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw(2).onInvoiceClick(n,e)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}if(2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Rt,t.screenSize!==t.screenSizeEnum.XS))}}function Qt(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No invoices available."),s.qZA())}function Et(t,e){if(1&t&&(s.TgZ(0,"td",67),s.YNc(1,Qt,2,0,"p",8),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)}}const Bt=function(t){return{"display-none":t}};function Ht(t,e){if(1&t&&s._UZ(0,"tr",68),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Bt,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function zt(t,e){1&t&&s._UZ(0,"tr",69)}function Vt(t,e){if(1&t&&s._UZ(0,"tr",70),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("@newlyAddedRowAnimation",t.label===n.newlyAddedInvoiceMemo&&t.value===n.newlyAddedInvoiceValue&&n.flgAnimate?"added":"notAdded")}}const Gt=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},$t=function(){return["no_invoice"]};function Xt(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",18),s.TgZ(1,"div",19),s.TgZ(2,"div",20),s._UZ(3,"fa-icon",21),s.TgZ(4,"span",22),s._uU(5,"Invoices History"),s.qZA(),s.qZA(),s.TgZ(6,"mat-form-field",23),s.TgZ(7,"input",24),s.NdJ("keyup",function(e){return s.CHM(t),s.oxw().applyFilter(e.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",25),s.YNc(9,vt,1,0,"mat-progress-bar",26),s.TgZ(10,"table",27,28),s.ynx(12,29),s.YNc(13,qt,2,0,"th",30),s.YNc(14,Ft,6,7,"td",31),s.BQk(),s.ynx(15,32),s.YNc(16,_t,2,0,"th",30),s.YNc(17,kt,2,1,"td",31),s.BQk(),s.ynx(18,33),s.YNc(19,Nt,2,0,"th",30),s.YNc(20,Dt,4,4,"td",31),s.BQk(),s.ynx(21,34),s.YNc(22,It,2,0,"th",35),s.YNc(23,Ot,4,4,"td",36),s.BQk(),s.ynx(24,37),s.YNc(25,Jt,2,0,"th",35),s.YNc(26,Yt,4,4,"td",36),s.BQk(),s.ynx(27,38),s.YNc(28,Pt,6,0,"th",39),s.YNc(29,Mt,3,3,"td",40),s.BQk(),s.ynx(30,41),s.YNc(31,Et,2,1,"td",42),s.BQk(),s.YNc(32,Ht,1,3,"tr",43),s.YNc(33,zt,1,0,"tr",44),s.YNc(34,Vt,1,1,"tr",45),s.qZA(),s.qZA(),s._UZ(35,"mat-paginator",46),s.qZA()}if(2&t){const t=s.oxw();s.xp6(3),s.Q6J("icon",t.faHistory),s.xp6(6),s.Q6J("ngIf",!0===t.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",t.invoices)("ngClass",s.VKq(11,Gt,"error"===t.flgLoading[0])),s.xp6(22),s.Q6J("matFooterRowDef",s.DdM(13,$t)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Wt=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.decimalPipe=n,this.commonService=i,this.datePipe=a,this.calledFrom="transactions",this.faHistory=g.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.flgAnimate=!0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===f.cu.SM||this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","amountSettled","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","receivedAt","description","amount","amountSettled","actions"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchInvoices"===t.action&&(this.flgLoading[0]="error")}),this.selNode=t.nodeSettings,this.information=t.information,this.invoiceJSONArr=t.invoices&&t.invoices.length>0?t.invoices:[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),setTimeout(()=>{this.flgAnimate=!1},5e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.invoices),this.logger.info(t)})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch(new st.wu({data:{pageSize:this.pageSize,component:xt}}))}onAddInvoice(t){if(!this.description)return!0;let e=this.expiry?this.expiry:3600;this.flgAnimate=!0,this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let n=null;n=this.invoiceValue?{description:this.description,expireIn:e,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:e},this.store.dispatch(new st.Fk("Creating Invoice...")),this.store.dispatch(new x.Ks(n)),this.resetData()}onInvoiceClick(t,e){this.store.dispatch(new st.wu({data:{invoice:t,newlyAdded:!1,component:Zt.R}}))}loadInvoicesTable(t){this.invoices=new at.by(t?[...t]:[]),this.invoices.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(t,e)=>((t.timestamp?this.datePipe.transform(new Date(1e3*t.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(t).toLowerCase()).includes(e),this.invoices.paginator=this.paginator}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}applyFilter(t){this.invoices.filter=t.value.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,f.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,f.Xz.OTHER)+" "+t.unit}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(i.JJ),s.Y36(w.v),s.Y36(i.uU))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},inputs:{calledFrom:"calledFrom"},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description","required","true",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["invcVal","ngModel"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","receivedAt"],["matColumnDef","description"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pr-3",4,"matCellDef"],["matColumnDef","amountSettled"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Received","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Received","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unpaid","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Expired","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-3"],["mat-cell","",1,"pr-3"],["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",3,"ngClass"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.YNc(1,wt,17,7,"form",1),s.YNc(2,Tt,3,0,"div",2),s.YNc(3,Xt,36,14,"div",3),s.qZA()),2&t&&(s.xp6(1),s.Q6J("ngIf","home"===e.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===e.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===e.calledFrom))},directives:[l.xw,l.yH,l.Wh,i.O5,lt._Y,lt.JL,lt.F,I.KE,rt.Nt,lt.Fj,lt.Q7,lt.JJ,lt.On,lt.wV,lt.qQ,ut.q,I.R9,I.bx,b.lW,I.TO,T.BN,Y.$V,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,r.pW,at.ge,it.nU,at.ev,O.gM,i.PC,L.Zl,dt.gD,dt.$L,mt.ey,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.uU,i.JJ],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[yt.Q]}}),t})();var Kt=n(9056),jt=n(4147),te=n(3556);const ee=["paymentReq"];function ne(t,e){if(1&t&&(s.TgZ(0,"mat-hint"),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Oqu(t.paymentDecodedHint)}}function ie(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Payment request is required."),s.qZA())}function ae(t,e){if(1&t&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Oqu(t.paymentDecodedHint)}}function oe(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Payment amount is required."),s.qZA())}function se(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-form-field",1),s.TgZ(1,"input",17,18),s.NdJ("ngModelChange",function(e){return s.CHM(t),s.oxw().paymentAmount=e})("change",function(e){return s.CHM(t),s.oxw().onAmountChange(e)}),s.qZA(),s.TgZ(3,"mat-hint"),s._uU(4,"It is a zero amount invoice, enter amount to be paid."),s.qZA(),s.YNc(5,oe,2,0,"mat-error",11),s.qZA()}if(2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngModel",t.paymentAmount),s.xp6(4),s.Q6J("ngIf",!t.paymentAmount)}}function le(t,e){if(1&t&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Oqu(t.paymentError)}}function re(t,e){if(1&t&&(s.TgZ(0,"div",19),s._UZ(1,"fa-icon",20),s.YNc(2,le,2,1,"span",11),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==t.paymentError)}}let ce=(()=>{class t{constructor(t,e,n,i,a,o,s,l){this.dialogRef=t,this.store=e,this.eclEffects=n,this.logger=i,this.commonService=a,this.decimalPipe=o,this.actions$=s,this.dataService=l,this.faExclamationTriangle=g.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=f.Vc[0],this.feeLimitTypes=f.Vc,this.paymentError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t.nodeSettings,this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions$.pipe((0,m.R)(this.unSubs[1]),(0,h.h)(t=>t.type===x.Wz||t.type===x.qC)).subscribe(t=>{t.type===x.qC&&this.dialogRef.close(),t.type===x.Wz&&"SendPayment"===t.payload.action&&(delete this.paymentDecoded.amount,this.paymentError=t.payload.message)})}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():(this.paymentAmount=null,this.paymentError="",this.paymentDecodedHint="",this.paymentReq.control.setErrors(null),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,Kt.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(+this.paymentDecoded.amount,f.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,m.R)(this.unSubs[2])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description}))},t=>{this.logger.error(t),this.paymentDecodedHint="ERROR: "+(t.message?t.message:"string"==typeof t?t:JSON.stringify(t)),this.paymentReq.control.setErrors({decodeError:!0})}))}sendPayment(){this.store.dispatch(new st.Fk("Sending Payment...")),this.store.dispatch(new x.Ar(this.zeroAmtInvoice?{invoice:this.paymentRequest,amountMsat:1e3*this.paymentAmount,fromDialog:!0}:{invoice:this.paymentRequest,fromDialog:!0}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,Kt.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(+this.paymentDecoded.amount,f.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,m.R)(this.unSubs[3])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description}))},t=>{this.logger.error(t),this.paymentDecodedHint="ERROR: "+(t.message?t.message:"string"==typeof t?t:JSON.stringify(t)),this.paymentReq.control.setErrors({decodeError:!0})}))}onAmountChange(t){delete this.paymentDecoded.amount,this.paymentDecoded.amount=t}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=f.Vc[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(y.yh),s.Y36(jt.o),s.Y36(Z.mQ),s.Y36(w.v),s.Y36(i.JJ),s.Y36(A.eX),s.Y36(te.D))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(t,e){if(1&t&&s.Gf(ee,5),2&t){let t;s.iGM(t=s.CRH())&&(e.paymentReq=t.first)}},decls:24,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){if(1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Send Payment"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"form",7,8),s.TgZ(11,"mat-form-field",1),s.TgZ(12,"textarea",9,10),s.NdJ("ngModelChange",function(t){return e.onPaymentRequestEntry(t)})("matTextareaAutosize",function(){return!0}),s.qZA(),s.YNc(14,ne,2,1,"mat-hint",11),s.YNc(15,ie,2,0,"mat-error",11),s.YNc(16,ae,2,1,"mat-error",11),s.qZA(),s.YNc(17,se,6,2,"mat-form-field",12),s.YNc(18,re,3,2,"div",13),s.TgZ(19,"div",14),s.TgZ(20,"button",15),s.NdJ("click",function(){return e.resetData()}),s._uU(21,"Clear Fields"),s.qZA(),s.TgZ(22,"button",16),s.NdJ("click",function(){return e.onSendPayment()}),s._uU(23,"Send Payment"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t){const t=s.MAs(13);s.xp6(6),s.Q6J("mat-dialog-close",!1),s.xp6(6),s.Q6J("ngModel",e.paymentRequest),s.xp6(2),s.Q6J("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),s.xp6(1),s.Q6J("ngIf",!e.paymentRequest),s.xp6(1),s.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),s.xp6(1),s.Q6J("ngIf",e.zeroAmtInvoice),s.xp6(1),s.Q6J("ngIf",""!==e.paymentError)}},directives:[l.xw,l.yH,q.dk,l.Wh,b.lW,ot.ZT,q.dn,lt._Y,lt.JL,lt.F,I.KE,rt.Nt,lt.Fj,rt.D7,ct.h,lt.Q7,lt.JJ,lt.On,i.O5,I.bx,I.TO,T.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();var ue=n(5001);const de=["scrollContainer"];function me(t,e){if(1&t&&(s.TgZ(0,"div",9),s.TgZ(1,"div",1),s.TgZ(2,"h4",11),s._uU(3,"Description"),s.qZA(),s.TgZ(4,"span",12),s._uU(5),s.qZA(),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(5),s.Oqu(t.description)}}function he(t,e){1&t&&s._UZ(0,"mat-divider",14)}function pe(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-expansion-panel",23),s.NdJ("opened",function(){return s.CHM(t),s.oxw().onExpansionOpen(!0)})("closed",function(){return s.CHM(t),s.oxw().onExpansionOpen(!1)}),s.TgZ(1,"mat-expansion-panel-header"),s.TgZ(2,"mat-panel-title"),s.TgZ(3,"h4",24),s._uU(4),s.qZA(),s.TgZ(5,"h4",25),s._uU(6),s.ALo(7,"number"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",8),s.TgZ(9,"div",9),s.TgZ(10,"div",26),s.TgZ(11,"h4",11),s._uU(12,"Fees (mSats)"),s.qZA(),s.TgZ(13,"span",12),s._uU(14),s.ALo(15,"number"),s.qZA(),s.qZA(),s.TgZ(16,"div",26),s.TgZ(17,"h4",11),s._uU(18,"Date/Time"),s.qZA(),s.TgZ(19,"span",12),s._uU(20),s.ALo(21,"date"),s.qZA(),s.qZA(),s.qZA(),s._UZ(22,"mat-divider",14),s.TgZ(23,"div",9),s.TgZ(24,"div",1),s.TgZ(25,"h4",11),s._uU(26,"ID"),s.qZA(),s.TgZ(27,"span",27),s._uU(28),s.qZA(),s.qZA(),s.qZA(),s._UZ(29,"mat-divider",14),s.TgZ(30,"div",9),s.TgZ(31,"div",1),s.TgZ(32,"h4",11),s._uU(33,"To Channel"),s.qZA(),s.TgZ(34,"span",27),s._uU(35),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=s.oxw();s.Q6J("expanded",i.expansionOpen),s.xp6(4),s.hij("Part ",n+1,""),s.xp6(2),s.hij("",s.lcZ(7,7,t.amount)," (Sats)"),s.xp6(8),s.Oqu(s.lcZ(15,9,t.feesPaid)),s.xp6(6),s.Oqu(s.xi3(21,11,t.timestamp,"dd/MMM/YYYY HH:mm")),s.xp6(8),s.Oqu(t.id),s.xp6(7),s.Oqu(t.toChannelAlias)}}let ge=(()=>{class t{constructor(t,e){this.dialogRef=t,this.data=e,this.description=null,this.shouldScroll=!0,this.expansionOpen=!0}ngOnInit(){this.payment=this.data.payment,this.data.sentPaymentInfo.length>0&&this.data.sentPaymentInfo[0].paymentRequest&&this.data.sentPaymentInfo[0].paymentRequest.description&&""!==this.data.sentPaymentInfo[0].paymentRequest.description&&(this.description=this.data.sentPaymentInfo[0].paymentRequest.description)}ngAfterViewChecked(){this.shouldScroll=this.scrollContainer.nativeElement.classList.value.includes("ps--active-y")}onScrollDown(){this.scrollContainer.nativeElement.scrollTop=this.scrollContainer.nativeElement.scrollTop+62.6}onExpansionOpen(t){this.expansionOpen=t}onClose(){this.dialogRef.close(!1)}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(ot.WI))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(t,e){if(1&t&&s.Gf(de,5),2&t){let t;s.iGM(t=s.CRH())&&(e.scrollContainer=t.first)}},decls:66,vars:15,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"h-40","padding-gap-x-large",3,"perfectScrollbar"],["scrollContainer",""],["fxLayout","column"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],["fxFlex","70"],[1,"w-100","my-1"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["class","flat-expansion-panel my-1",3,"expanded","opened","closed",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start end",1,"btn-sticky-container","padding-gap-x-large"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"padding-gap-x-large","padding-gap-bottom-large"],["fxLayoutAlign","center center","tabindex","1","mat-stroked-button","","color","primary","type","button","default","",1,"mr-1",3,"mat-dialog-close"],[1,"flat-expansion-panel","my-1",3,"expanded","opened","closed"],["fxFlex","30","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","70","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Payment Information"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s.NdJ("click",function(){return e.onClose()}),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6,7),s.TgZ(10,"div",8),s.TgZ(11,"div",9),s.TgZ(12,"div",10),s.TgZ(13,"h4",11),s._uU(14,"Amount (Sats)"),s.qZA(),s.TgZ(15,"span",12),s._uU(16),s.ALo(17,"number"),s.qZA(),s.qZA(),s.TgZ(18,"div",13),s.TgZ(19,"h4",11),s._uU(20,"Date/Time"),s.qZA(),s.TgZ(21,"span",12),s._uU(22),s.ALo(23,"date"),s.qZA(),s.qZA(),s.qZA(),s._UZ(24,"mat-divider",14),s.TgZ(25,"div",9),s.TgZ(26,"div",1),s.TgZ(27,"h4",11),s._uU(28,"ID"),s.qZA(),s.TgZ(29,"span",12),s._uU(30),s.qZA(),s.qZA(),s.qZA(),s._UZ(31,"mat-divider",14),s.TgZ(32,"div",9),s.TgZ(33,"div",1),s.TgZ(34,"h4",11),s._uU(35,"Payment Hash"),s.qZA(),s.TgZ(36,"span",12),s._uU(37),s.qZA(),s.qZA(),s.qZA(),s._UZ(38,"mat-divider",14),s.TgZ(39,"div",9),s.TgZ(40,"div",1),s.TgZ(41,"h4",11),s._uU(42,"Payment Preimage"),s.qZA(),s.TgZ(43,"span",12),s._uU(44),s.qZA(),s.qZA(),s.qZA(),s._UZ(45,"mat-divider",14),s.TgZ(46,"div",9),s.TgZ(47,"div",1),s.TgZ(48,"h4",11),s._uU(49,"Recipient Node"),s.qZA(),s.TgZ(50,"span",12),s._uU(51),s.qZA(),s.qZA(),s.qZA(),s._UZ(52,"mat-divider",14),s.YNc(53,me,6,1,"div",15),s.YNc(54,he,1,0,"mat-divider",16),s.TgZ(55,"div",9),s.TgZ(56,"div",1),s.TgZ(57,"mat-accordion"),s.YNc(58,pe,36,14,"mat-expansion-panel",17),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(59,"div",18),s.TgZ(60,"button",19),s.NdJ("click",function(){return e.onScrollDown()}),s.TgZ(61,"mat-icon",20),s._uU(62,"arrow_downward"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(63,"div",21),s.TgZ(64,"button",22),s._uU(65,"OK"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(16),s.Oqu(s.lcZ(17,10,e.payment.recipientAmount)),s.xp6(6),s.Oqu(s.xi3(23,12,e.payment.firstPartTimestamp,"dd/MMM/YYYY HH:mm")),s.xp6(8),s.Oqu(e.payment.id),s.xp6(7),s.Oqu(e.payment.paymentHash),s.xp6(7),s.Oqu(e.payment.paymentPreimage),s.xp6(7),s.Oqu(e.payment.recipientNodeAlias),s.xp6(2),s.Q6J("ngIf",e.description),s.xp6(1),s.Q6J("ngIf",e.description),s.xp6(4),s.Q6J("ngForOf",e.payment.parts),s.xp6(6),s.Q6J("mat-dialog-close",!1))},directives:[l.xw,l.Wh,l.yH,q.dk,b.lW,q.dn,Y.$V,J.d,i.O5,ue.pp,i.sg,S.Hw,ot.ZT,ue.ib,ue.yz,ue.yK],pipes:[i.JJ,i.uU],styles:[""]}),t})();var fe=n(8914);const xe=["sendPaymentForm"];function Ze(t,e){if(1&t&&(s.TgZ(0,"mat-hint"),s._uU(1),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Oqu(t.paymentDecodedHint)}}function ye(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Payment request is required."),s.qZA())}function Ae(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"form",4,5),s.TgZ(2,"mat-form-field",6),s.TgZ(3,"textarea",7,8),s.NdJ("ngModelChange",function(e){return s.CHM(t),s.oxw().onPaymentRequestEntry(e)})("matTextareaAutosize",function(){return!0}),s.qZA(),s.YNc(5,Ze,2,1,"mat-hint",9),s.YNc(6,ye,2,0,"mat-error",9),s.qZA(),s.TgZ(7,"div",10),s.TgZ(8,"button",11),s.NdJ("click",function(){return s.CHM(t),s.oxw().resetData()}),s._uU(9,"Clear Field"),s.qZA(),s.TgZ(10,"button",12),s.NdJ("click",function(){return s.CHM(t),s.oxw().onSendPayment()}),s._uU(11,"Send Payment"),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=s.oxw();s.xp6(3),s.Q6J("ngModel",t.paymentRequest),s.xp6(2),s.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),s.xp6(1),s.Q6J("ngIf",!t.paymentRequest)}}function we(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",13),s.TgZ(1,"button",12),s.NdJ("click",function(){return s.CHM(t),s.oxw().openSendPaymentModal()}),s._uU(2,"Send Payment"),s.qZA(),s.qZA()}}function Te(t,e){1&t&&s._UZ(0,"mat-progress-bar",48)}function ve(t,e){1&t&&(s.TgZ(0,"th",49),s._uU(1,"Date/Time"),s.qZA())}function qe(t,e){if(1&t&&(s.TgZ(0,"td",50),s._uU(1),s.ALo(2,"date"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,null==t?null:t.firstPartTimestamp,"dd/MMM/YYYY HH:mm"))}}function Ce(t,e){1&t&&(s.TgZ(0,"th",49),s._uU(1,"ID"),s.qZA())}const be=function(t){return{"max-width":t}};function Se(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"div",51),s.TgZ(2,"span",52),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("ngStyle",s.VKq(2,be,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),s.xp6(2),s.Oqu(t.id)}}function Le(t,e){1&t&&(s.TgZ(0,"th",49),s._uU(1,"Destination"),s.qZA())}function Fe(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"div",51),s.TgZ(2,"span",52),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("ngStyle",s.VKq(2,be,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),s.xp6(2),s.Oqu(t.recipientNodeAlias)}}function _e(t,e){1&t&&(s.TgZ(0,"th",53),s._uU(1,"Amount (Sats)"),s.qZA())}function ke(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"span",54),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,null==t?null:t.recipientAmount))}}function Ne(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",55),s.TgZ(1,"div",56),s.TgZ(2,"mat-select",57),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",58),s.NdJ("click",function(){return s.CHM(t),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Ue(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",59),s.TgZ(1,"button",60),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw(2).onPaymentClick(e)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function De(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No payments available."),s.qZA())}function Ie(t,e){if(1&t&&(s.TgZ(0,"td",61),s.YNc(1,De,2,0,"p",9),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)}}function Oe(t,e){if(1&t&&(s.TgZ(0,"span",64),s._uU(1),s.ALo(2,"date"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",s.xi3(2,1,t.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function Je(t,e){if(1&t&&(s.ynx(0),s.YNc(1,Oe,3,4,"span",63),s.BQk()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==t?null:t.parts)}}function Ye(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"span",62),s._uU(2),s.qZA(),s.YNc(3,Je,2,1,"ng-container",9),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" Total Attempts: ",null==t||null==t.parts?null:t.parts.length," "),s.xp6(1),s.Q6J("ngIf",t.is_expanded)}}function Pe(t,e){if(1&t&&(s.TgZ(0,"span",62),s.TgZ(1,"span",65),s.TgZ(2,"span",52),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(4);s.xp6(1),s.Q6J("ngStyle",s.VKq(2,be,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),s.xp6(2),s.Oqu(t.id)}}function Re(t,e){if(1&t&&(s.TgZ(0,"span"),s.YNc(1,Pe,4,4,"span",66),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==t?null:t.parts)}}function Me(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"div",65),s.TgZ(2,"span",52),s._uU(3),s.qZA(),s.qZA(),s.YNc(4,Re,2,1,"span",9),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("ngStyle",s.VKq(3,be,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),s.xp6(2),s.Oqu(t.id),s.xp6(1),s.Q6J("ngIf",t.is_expanded)}}function Qe(t,e){if(1&t&&(s.TgZ(0,"span",62),s.TgZ(1,"span",65),s.TgZ(2,"span",52),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(4);s.xp6(1),s.Q6J("ngStyle",s.VKq(2,be,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),s.xp6(2),s.Oqu(t.toChannelAlias)}}function Ee(t,e){if(1&t&&(s.TgZ(0,"span"),s.YNc(1,Qe,4,4,"span",66),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==t?null:t.parts)}}function Be(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"div",65),s.TgZ(2,"span",52),s._uU(3),s.qZA(),s.qZA(),s.YNc(4,Ee,2,1,"span",9),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("ngStyle",s.VKq(3,be,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),s.xp6(2),s.Oqu(null==t?null:t.recipientNodeAlias),s.xp6(1),s.Q6J("ngIf",t.is_expanded)}}function He(t,e){if(1&t&&(s.TgZ(0,"span",67),s._uU(1),s.ALo(2,"number"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",s.xi3(2,1,t.amount,"1.0-0")," ")}}function ze(t,e){if(1&t&&(s.TgZ(0,"span"),s.YNc(1,He,3,4,"span",68),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==t?null:t.parts)}}function Ve(t,e){if(1&t&&(s.TgZ(0,"td",50),s.TgZ(1,"span",67),s._uU(2),s.ALo(3,"number"),s.qZA(),s.YNc(4,ze,2,1,"span",9),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.xi3(3,2,null==t?null:t.recipientAmount,"1.0-0")),s.xp6(2),s.Q6J("ngIf",t.is_expanded)}}function Ge(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",70),s.TgZ(1,"button",73),s.NdJ("click",function(){const e=s.CHM(t).$implicit,n=s.oxw(2).$implicit;return s.oxw(2).onPartClick(e,n)}),s._uU(2),s.qZA(),s.qZA()}if(2&t){const t=e.index;s.xp6(2),s.hij("View ",t+1,"")}}function $e(t,e){if(1&t&&(s.TgZ(0,"div"),s.YNc(1,Ge,3,1,"div",72),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==t?null:t.parts)}}function Xe(t,e){if(1&t&&(s.TgZ(0,"td",69),s.TgZ(1,"span",70),s.TgZ(2,"button",71),s.NdJ("click",function(){const t=e.$implicit;return t.is_expanded=!t.is_expanded}),s._uU(3),s.qZA(),s.qZA(),s.YNc(4,$e,2,1,"div",9),s.qZA()),2&t){const t=e.$implicit;s.xp6(3),s.Oqu(t.is_expanded?"Hide":"Show"),s.xp6(1),s.Q6J("ngIf",t.is_expanded)}}function We(t,e){if(1&t&&s._UZ(0,"tr",74),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("@newlyAddedRowAnimation",t.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const Ke=function(t){return{"display-none":t}};function je(t,e){if(1&t&&s._UZ(0,"tr",75),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Ke,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function tn(t,e){1&t&&s._UZ(0,"tr",76)}function en(t,e){if(1&t&&s._UZ(0,"tr",74),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("@newlyAddedRowAnimation",t.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const nn=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},an=function(){return["no_payment"]};function on(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",14),s.TgZ(1,"div",15),s.TgZ(2,"div",16),s._UZ(3,"fa-icon",17),s.TgZ(4,"span",18),s._uU(5,"Payments History"),s.qZA(),s.qZA(),s.TgZ(6,"mat-form-field",19),s.TgZ(7,"input",20),s.NdJ("keyup",function(e){return s.CHM(t),s.oxw().applyFilter(e.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",21),s.YNc(9,Te,1,0,"mat-progress-bar",22),s.TgZ(10,"table",23,24),s.ynx(12,25),s.YNc(13,ve,2,0,"th",26),s.YNc(14,qe,3,4,"td",27),s.BQk(),s.ynx(15,28),s.YNc(16,Ce,2,0,"th",26),s.YNc(17,Se,4,4,"td",27),s.BQk(),s.ynx(18,29),s.YNc(19,Le,2,0,"th",26),s.YNc(20,Fe,4,4,"td",27),s.BQk(),s.ynx(21,30),s.YNc(22,_e,2,0,"th",31),s.YNc(23,ke,4,3,"td",27),s.BQk(),s.ynx(24,32),s.YNc(25,Ne,6,0,"th",33),s.YNc(26,Ue,3,0,"td",34),s.BQk(),s.ynx(27,35),s.YNc(28,Ie,2,1,"td",36),s.BQk(),s.ynx(29,37),s.YNc(30,Ye,4,2,"td",27),s.BQk(),s.ynx(31,38),s.YNc(32,Me,5,5,"td",27),s.BQk(),s.ynx(33,39),s.YNc(34,Be,5,5,"td",27),s.BQk(),s.ynx(35,40),s.YNc(36,Ve,5,5,"td",27),s.BQk(),s.ynx(37,41),s.YNc(38,Xe,5,2,"td",42),s.BQk(),s.YNc(39,We,1,1,"tr",43),s.YNc(40,je,1,3,"tr",44),s.YNc(41,tn,1,0,"tr",45),s.YNc(42,en,1,1,"tr",46),s.qZA(),s.qZA(),s._UZ(43,"mat-paginator",47),s.qZA()}if(2&t){const t=s.oxw();s.xp6(3),s.Q6J("icon",t.faHistory),s.xp6(6),s.Q6J("ngIf",!0===t.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",t.payments)("ngClass",s.VKq(13,nn,"error"===t.flgLoading[0])),s.xp6(29),s.Q6J("matRowDefColumns",t.partColumns)("matRowDefWhen",t.is_group),s.xp6(1),s.Q6J("matFooterRowDef",s.DdM(15,an)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let sn=(()=>{class t{constructor(t,e,n,i,a,o,s){this.logger=t,this.commonService=e,this.store=n,this.rtlEffects=i,this.decimalPipe=a,this.dataService=o,this.datePipe=s,this.calledFrom="transactions",this.faHistory=g.qO$,this.newlyAddedPayment="",this.flgAnimate=!0,this.selNode={},this.flgLoading=[!0],this.information={},this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","actions"],this.partColumns=["groupTotal","groupAction"]):this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","recipientAmount","actions"],this.partColumns=["groupTotal","groupAmount","groupAction"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","id","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupAmount","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["firstPartTimestamp","id","recipientNodeAlias","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupChannelAlias","groupAmount","groupAction"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.selNode=t.nodeSettings,t.payments.sent&&t.payments.sent.map(e=>{let n=t.peers.find(t=>t.nodeId===e.recipientNodeId);e.recipientNodeAlias=n?n.alias:e.recipientNodeId,e.parts&&e.parts.map(e=>{let n=t.activeChannels.find(t=>t.channelId===e.toChannelId);e.toChannelAlias=n?n.alias:e.toChannelId})}),this.paymentJSONArr=t.payments&&t.payments.sent&&t.payments.sent.length>0?t.payments.sent:[],this.loadPaymentsTable(this.paymentJSONArr),setTimeout(()=>{this.flgAnimate=!1},3e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.loadPaymentsTable(this.paymentJSONArr)}loadPaymentsTable(t){this.payments=new at.by(t?[...t]:[]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(t,e)=>{switch(e){case"firstPartTimestamp":return this.commonService.sortByKey(t.parts,"timestamp","number",this.sort.direction),t.firstPartTimestamp;case"id":return this.commonService.sortByKey(t.parts,"id","string",this.sort.direction),t.id;case"recipientNodeAlias":return this.commonService.sortByKey(t.parts,"toChannelAlias","string",this.sort.direction),t.recipientNodeAlias;case"recipientAmount":return this.commonService.sortByKey(t.parts,"amount","number",this.sort.direction),t.recipientAmount;default:return t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}},this.payments.filterPredicate=(t,e)=>((t.firstPartTimestamp?this.datePipe.transform(new Date(t.firstPartTimestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(t).toLowerCase()).includes(e),this.payments.paginator=this.paginator}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,Kt.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp?(this.paymentDecoded.amount||(this.paymentDecoded.amount=0),this.sendPayment()):this.resetData()})}sendPayment(){this.flgAnimate=!0,this.newlyAddedPayment=this.paymentDecoded.paymentHash,this.paymentDecoded.amount&&0!==this.paymentDecoded.amount?(this.store.dispatch(new st.b_({data:{type:f.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:50,type:f.Gi.DATE_TIME},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:f.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:f.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}})),this.rtlEffects.closeConfirm.pipe((0,Kt.q)(1)).subscribe(t=>{t&&(this.store.dispatch(new st.Fk("Sending Payment...")),this.store.dispatch(new x.Ar({invoice:this.paymentRequest,fromDialog:!1})),this.resetData())})):(this.store.dispatch(new st.b_({data:{type:f.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:40,type:f.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:f.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:f.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}})),this.rtlEffects.closeConfirm.pipe((0,Kt.q)(1)).subscribe(t=>{t&&(this.paymentDecoded.amount=t[0].inputValue,this.store.dispatch(new st.Fk("Sending Payment...")),this.store.dispatch(new x.Ar({invoice:this.paymentRequest,amountMsat:1e3*t[0].inputValue,fromDialog:!1})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,Kt.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.amount?this.commonService.convertCurrency(+this.paymentDecoded.amount,f.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description}):this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch(new st.wu({data:{component:ce}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}is_group(t,e){return e.parts&&e.parts.length>1}onPaymentClick(t){t.paymentHash&&""!==t.paymentHash.trim()?this.dataService.decodePayments(t.paymentHash).pipe((0,Kt.q)(1)).subscribe(e=>{this.showPaymentView(t,e.length&&e.length>0?e[0]:[])},e=>{this.showPaymentView(t,[])}):this.showPaymentView(t,[])}showPaymentView(t,e){this.store.dispatch(new st.wu({data:{sentPaymentInfo:e,payment:t,component:ge}}))}onPartClick(t,e){e.paymentHash&&""!==e.paymentHash.trim()?this.dataService.decodePayments(e.paymentHash).pipe((0,Kt.q)(1)).subscribe(n=>{this.showPartView(t,e,n)},n=>{this.showPartView(t,e,[])}):this.showPartView(t,e,[])}showPartView(t,e,n){const i=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:f.Gi.STRING}],[{key:"paymentPreimage",value:e.paymentPreimage,title:"Payment Preimage",width:100,type:f.Gi.STRING}],[{key:"toChannelId",value:t.toChannelId,title:"Channel",width:100,type:f.Gi.STRING}],[{key:"id",value:t.id,title:"Part ID",width:50,type:f.Gi.STRING},{key:"timestamp",value:t.timestamp,title:"Time",width:50,type:f.Gi.DATE_TIME}],[{key:"amount",value:t.amount,title:"Amount (Sats)",width:50,type:f.Gi.NUMBER},{key:"feesPaid",value:t.feesPaid,title:"Fee (Sats)",width:50,type:f.Gi.NUMBER}]];n.length>0&&n[0].paymentRequest&&n[0].paymentRequest.description&&""!==n[0].paymentRequest.description&&i.splice(3,0,[{key:"description",value:n[0].paymentRequest.description,title:"Description",width:100,type:f.Gi.STRING}]),this.store.dispatch(new st.wu({data:{type:f.n_.INFORMATION,alertTitle:"Payment Part Information",message:i}}))}applyFilter(t){this.payments.filter=t.value.trim().toLowerCase()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){let t=JSON.parse(JSON.stringify(this.payments.data)),e=t.reduce((t,e)=>(e.paymentHash&&""!==e.paymentHash.trim()&&(t=""===t?e.paymentHash:t+","+e.paymentHash),t),"");this.dataService.decodePayments(e).pipe((0,m.R)(this.unSubs[2])).subscribe(e=>{e.forEach((e,n)=>{e.length>0&&e[0].paymentRequest&&e[0].paymentRequest.description&&""!==e[0].paymentRequest.description&&(t[n].description=e[0].paymentRequest.description)});let n=t.reduce((t,e)=>t.concat(e),[]);this.commonService.downloadFile(n,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(fe.V),s.Y36(i.JJ),s.Y36(te.D),s.Y36(i.uU))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(t,e){if(1&t&&(s.Gf(xe,5),s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.form=t.first),s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},inputs:{calledFrom:"calledFrom"},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","firstPartTimestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","recipientNodeAlias"],["matColumnDef","recipientAmount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupId"],["matColumnDef","groupChannelAlias"],["matColumnDef","groupAmount"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["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"],["fxLayoutAlign","start center",1,"part-row-span"],["fxLayoutAlign","start center","class","part-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"part-row-span","pl-3"],["fxLayoutAlign","start center",1,"ellipsis-parent","part-row-span",3,"ngStyle"],["fxLayoutAlign","start center","class","part-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"part-row-span"],["fxLayoutAlign","end center","class","part-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["fxLayoutAlign","end start"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-part-expand",3,"click"],["fxLayoutAlign","end start",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-part-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.YNc(1,Ae,12,3,"form",1),s.YNc(2,we,3,0,"div",2),s.YNc(3,on,44,16,"div",3),s.qZA()),2&t&&(s.xp6(1),s.Q6J("ngIf","home"===e.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===e.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===e.calledFrom))},directives:[l.xw,l.yH,l.Wh,i.O5,lt._Y,lt.JL,lt.F,I.KE,rt.Nt,lt.Fj,rt.D7,lt.Q7,Y.$V,lt.JJ,lt.On,b.lW,I.bx,I.TO,T.BN,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.nj,at.Ke,at.as,nt.NW,r.pW,at.ge,it.nU,at.ev,i.PC,L.Zl,dt.gD,dt.$L,mt.ey,at.yh,i.sg,at.Gk,at.Q2,at.XQ],pipes:[i.uU,i.JJ],styles:[".mat-column-groupChannelAlias[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%]{padding:0 1rem;flex:0 0 25%;width:25%}.mat-column-groupChannelAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.part-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:15rem}"],data:{animation:[yt.Q]}}),t})();function ln(t,e){if(1&t&&(s.TgZ(0,"button",25),s.TgZ(1,"mat-icon"),s._uU(2,"more_vert"),s.qZA(),s.qZA()),2&t){s.oxw();const t=s.MAs(11);s.Q6J("matMenuTriggerFor",t)}}function rn(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",15),s.NdJ("click",function(){return s.CHM(t),s.oxw(3).onNavigateTo("/ecl/reports")}),s._uU(1,"Fees Summary"),s.qZA()}}function cn(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",15),s.NdJ("click",function(){return s.CHM(t),s.oxw(3).onsortChannelsBy()}),s._uU(1),s.qZA()}if(2&t){const t=s.oxw(3);s.xp6(1),s.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}const un=function(t){return{"error-border":t}};function dn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-node-info",26),2&t){const t=s.oxw(3);s.Q6J("information",t.information)("showColorFieldSeparately",!1)("ngClass",s.VKq(3,un,"error"===t.flgLoading[0]))}}function mn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-balances-info",27),2&t){const t=s.oxw(3);s.Q6J("balances",t.balances)("ngClass",s.VKq(2,un,"error"===t.flgLoading[2]))}}function hn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-channel-capacity-info",28),2&t){const t=s.oxw(3);s.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("allChannels",t.allChannelsCapacity)("ngClass",s.VKq(4,un,"error"===t.flgLoading[5]))}}function pn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-fee-info",29),2&t){const t=s.oxw(3);s.Q6J("fees",t.fees)("ngClass",s.VKq(2,un,"error"===t.flgLoading[1]))}}function gn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-channel-status-info",30),2&t){const t=s.oxw(3);s.Q6J("channelsStatus",t.channelsStatus)("ngClass",s.VKq(2,un,"error"===t.flgLoading[0]))}}function fn(t,e){1&t&&(s.TgZ(0,"h3"),s._uU(1,"Error! Unable to find information!"),s.qZA())}function xn(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-grid-tile",8),s.TgZ(1,"mat-card",9),s.TgZ(2,"mat-card-header"),s.TgZ(3,"mat-card-title",10),s.TgZ(4,"div"),s._UZ(5,"fa-icon",11),s.TgZ(6,"span"),s._uU(7),s.qZA(),s.qZA(),s.TgZ(8,"div"),s.YNc(9,ln,3,1,"button",12),s.TgZ(10,"mat-menu",13,14),s.TgZ(12,"button",15),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw(2).onNavigateTo(e.link)}),s._uU(13),s.qZA(),s.YNc(14,rn,2,0,"button",16),s.YNc(15,cn,2,1,"button",16),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(16,"mat-card-content",17),s.TgZ(17,"div",18),s.YNc(18,dn,1,5,"rtl-ecl-node-info",19),s.YNc(19,mn,1,4,"rtl-ecl-balances-info",20),s.YNc(20,hn,1,6,"rtl-ecl-channel-capacity-info",21),s.YNc(21,pn,1,4,"rtl-ecl-fee-info",22),s.YNc(22,gn,1,4,"rtl-ecl-channel-status-info",23),s.YNc(23,fn,2,0,"h3",24),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=e.$implicit;s.Q6J("colspan",t.cols)("rowspan",t.rows),s.xp6(5),s.Q6J("icon",t.icon),s.xp6(2),s.Oqu(t.title),s.xp6(2),s.Q6J("ngIf",t.link),s.xp6(4),s.hij("Go To ",t.goTo,""),s.xp6(1),s.Q6J("ngIf","fee"===t.id),s.xp6(1),s.Q6J("ngIf","capacity"===t.id),s.xp6(1),s.s9C("fxFlex","capacity"===t.id?90:70),s.xp6(1),s.Q6J("ngSwitch",t.id),s.xp6(1),s.Q6J("ngSwitchCase","node"),s.xp6(1),s.Q6J("ngSwitchCase","balance"),s.xp6(1),s.Q6J("ngSwitchCase","capacity"),s.xp6(1),s.Q6J("ngSwitchCase","fee"),s.xp6(1),s.Q6J("ngSwitchCase","status")}}function Zn(t,e){if(1&t&&(s.TgZ(0,"div",2),s.TgZ(1,"div",3),s._UZ(2,"fa-icon",4),s.TgZ(3,"span",5),s._uU(4),s.qZA(),s.qZA(),s.TgZ(5,"mat-grid-list",6),s.YNc(6,xn,24,15,"mat-grid-tile",7),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(2),s.Q6J("icon",t.flgLoading[0]?t.faFrown:t.faSmile),s.xp6(2),s.Oqu(t.flgLoading[0]?"Error! Please check the server connection.":"Welcome "+t.information.alias+"! Your node is up and running."),s.xp6(1),s.Q6J("rowHeight",t.operatorCardHeight),s.xp6(1),s.Q6J("ngForOf",t.operatorCards)}}function yn(t,e){if(1&t&&(s.TgZ(0,"button",25),s.TgZ(1,"mat-icon"),s._uU(2,"more_vert"),s.qZA(),s.qZA()),2&t){s.oxw();const t=s.MAs(9);s.Q6J("matMenuTriggerFor",t)}}function An(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-card-header"),s.TgZ(1,"mat-card-title",10),s.TgZ(2,"div"),s._UZ(3,"fa-icon",11),s.TgZ(4,"span"),s._uU(5),s.qZA(),s.qZA(),s.TgZ(6,"div"),s.YNc(7,yn,3,1,"button",12),s.TgZ(8,"mat-menu",13,39),s.TgZ(10,"button",15),s.NdJ("click",function(){s.CHM(t);const e=s.oxw().$implicit;return s.oxw(2).onNavigateTo(e.link)}),s._uU(11),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=s.oxw().$implicit;s.xp6(3),s.Q6J("icon",t.icon),s.xp6(2),s.Oqu(t.title),s.xp6(2),s.Q6J("ngIf",t.link),s.xp6(4),s.hij("Go To ",t.goTo,"")}}function wn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-node-info",40),2&t){const t=s.oxw(3);s.Q6J("information",t.information)("ngClass",s.VKq(2,un,"error"===t.flgLoading[0]))}}function Tn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-balances-info",27),2&t){const t=s.oxw(3);s.Q6J("balances",t.balances)("ngClass",s.VKq(2,un,"error"===t.flgLoading[2]))}}function vn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-channel-liquidity-info",41),2&t){const t=s.oxw(3);s.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("allChannels",t.allInboundChannels)("ngClass",s.VKq(4,un,"error"===t.flgLoading[5]))}}function qn(t,e){if(1&t&&s._UZ(0,"rtl-ecl-channel-liquidity-info",41),2&t){const t=s.oxw(3);s.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("allChannels",t.allOutboundChannels)("ngClass",s.VKq(4,un,"error"===t.flgLoading[5]))}}function Cn(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",50),s.TgZ(1,"mat-icon"),s._uU(2,"more_vert"),s.qZA(),s.qZA(),s.TgZ(3,"mat-menu",13,51),s.TgZ(5,"button",15),s.NdJ("click",function(){s.CHM(t);const e=s.oxw(2).$implicit;return s.oxw(2).onNavigateTo(e.link)}),s._uU(6),s.qZA(),s.TgZ(7,"button",15),s.NdJ("click",function(){return s.CHM(t),s.oxw(4).onNavigateTo("/ecl/reports/transactions")}),s._uU(8,"Transactions Summary"),s.qZA(),s.qZA()}if(2&t){const t=s.MAs(4),e=s.oxw(2).$implicit;s.Q6J("matMenuTriggerFor",t),s.xp6(6),s.hij("Go To ",e.goTo,"")}}function bn(t,e){1&t&&(s.TgZ(0,"span",42),s.TgZ(1,"mat-tab-group",43),s.TgZ(2,"mat-tab",44),s._UZ(3,"rtl-ecl-lightning-invoices",45),s.qZA(),s.TgZ(4,"mat-tab",46),s._UZ(5,"rtl-ecl-lightning-payments",47),s.qZA(),s.TgZ(6,"mat-tab",48),s.YNc(7,Cn,9,2,"ng-template",49),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(3),s.Q6J("calledFrom","home"),s.xp6(2),s.Q6J("calledFrom","home"),s.xp6(1),s.Q6J("disabled",!0))}function Sn(t,e){1&t&&(s.TgZ(0,"h3"),s._uU(1,"Error! Unable to find information!"),s.qZA())}const Ln=function(t){return{"p-0":t}};function Fn(t,e){if(1&t&&(s.TgZ(0,"mat-grid-tile",8),s.TgZ(1,"mat-card",33),s.YNc(2,An,12,4,"mat-card-header",34),s.TgZ(3,"mat-card-content",35),s.TgZ(4,"div",18),s.YNc(5,wn,1,4,"rtl-ecl-node-info",36),s.YNc(6,Tn,1,4,"rtl-ecl-balances-info",20),s.YNc(7,vn,1,6,"rtl-ecl-channel-liquidity-info",37),s.YNc(8,qn,1,6,"rtl-ecl-channel-liquidity-info",37),s.YNc(9,bn,8,3,"span",38),s.YNc(10,Sn,2,0,"h3",24),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.Q6J("colspan",t.cols)("rowspan",t.rows),s.xp6(1),s.Q6J("ngClass",s.VKq(11,Ln,"transactions"===t.id)),s.xp6(1),s.Q6J("ngIf","transactions"!==t.id),s.xp6(1),s.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),s.xp6(1),s.Q6J("ngSwitch",t.id),s.xp6(1),s.Q6J("ngSwitchCase","node"),s.xp6(1),s.Q6J("ngSwitchCase","balance"),s.xp6(1),s.Q6J("ngSwitchCase","inboundLiq"),s.xp6(1),s.Q6J("ngSwitchCase","outboundLiq"),s.xp6(1),s.Q6J("ngSwitchCase","transactions")}}function _n(t,e){if(1&t&&(s.TgZ(0,"div",31),s._UZ(1,"fa-icon",4),s.TgZ(2,"span",5),s._uU(3),s.qZA(),s.qZA(),s.TgZ(4,"mat-grid-list",32),s.YNc(5,Fn,11,13,"mat-grid-tile",7),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faSmile),s.xp6(2),s.hij("Welcome ",t.information.alias,"! Your node is up and running."),s.xp6(1),s.Q6J("rowHeight",t.merchantCardHeight),s.xp6(1),s.Q6J("ngForOf",t.merchantCards)}}let kn=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.actions$=n,this.commonService=i,this.router=a,this.faSmile=p.I3,this.faFrown=p.Kf,this.faAngleDoubleDown=g.Sbq,this.faAngleDoubleUp=g.Vfw,this.faChartPie=g.OS1,this.faBolt=g.BDt,this.faServer=g.xf3,this.faNetworkWired=g.kXW,this.flgChildInfoUpdated=!1,this.userPersonaEnum=f.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.channels=[],this.onchainBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.flgLoading=[!0,!0,!0,!0,!0,!0,!0,!0],this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goTo:"Routing",link:"/ecl/routing",icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goTo:"Transactions",link:"/ecl/transactions",title:"",cols:6,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===f.cu.SM||this.screenSize===f.cu.MD?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goTo:"Routing",link:"/ecl/routing",icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goTo:"Transactions",link:"/ecl/transactions",title:"",cols:3,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCardHeight=(window.screen.height-200)/2+"px",this.merchantCardHeight=(window.screen.height-210)/10+"px",this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goTo:"Routing",link:"/ecl/routing",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goTo:"Transactions",link:"/ecl/transactions",title:"",cols:2,rows:5}])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.flgLoading=[!0,!0,!0,!0,!0,!0,!0,!0],t.effectErrors.forEach(t=>{"FetchInfo"===t.action&&(this.flgLoading[0]="error"),"FetchFees"===t.action&&(this.flgLoading[1]="error"),"FetchChannels"===t.action&&(this.flgLoading[2]="error")}),this.selNode=t.nodeSettings,this.information=t.information,"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.information.nodeId),this.fees=t.fees,"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!this.fees.daily_fee),this.channels=t.activeChannels,this.onchainBalance=t.onchainBalance,this.balances.onchain=this.onchainBalance.total,this.balances.lightning=t.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);let e=t.lightningBalance.localBalance?+t.lightningBalance.localBalance:0,n=t.lightningBalance.remoteBalance?+t.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:e,remoteBalance:n,balancedness:+(1-Math.abs((e-n)/(e+n))).toFixed(3)},this.channelsStatus=t.channelsStatus,this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(t=>t.toRemote>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(t=>t.toLocal>0),"toLocal"))),this.channels.forEach(t=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(t.toRemote),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(t.toLocal)}),"error"!==this.flgLoading[2]&&(this.flgLoading[2]=!this.channels),this.flgChildInfoUpdated=this.balances.lightning>=0&&this.balances.onchain>=0&&this.fees.monthly_fee>=0,this.logger.info(t)}),this.actions$.pipe((0,m.R)(this.unSubs[2]),(0,h.h)(t=>t.type===x.iR||t.type===x.UA)).subscribe(t=>{t.type===x.iR&&(this.flgChildInfoUpdated=!1),t.type===x.UA&&(this.flgChildInfoUpdated=!0)})}onNavigateTo(t){this.router.navigateByUrl(t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.channels.sort(function(t,e){const n=+t.toLocal+ +t.toRemote,i=+e.toLocal+ +e.toRemote;return n>i?-1:n<i?1:0})):(this.sortField="Balance Score",this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels,"balancedness"))))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(A.eX),s.Y36(w.v),s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"click",4,"ngIf"],["fxLayout","column",1,"dashboard-card-content",3,"fxFlex"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"balances","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"fees","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","ngClass",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass"],["fxFlex","100",3,"balances","ngClass"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","ngClass"],["fxFlex","100",3,"fees","ngClass"],["fxFlex","100",3,"channelsStatus","ngClass"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",1,"dashboard-card-content",3,"fxFlex"],["fxFlex","100",3,"information","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","ngClass",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information","ngClass"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","ngClass"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",2,"max-width","20px",3,"matMenuTriggerFor"],["menuTransactions","matMenu"]],template:function(t,e){if(1&t&&(s.YNc(0,Zn,7,4,"div",0),s.YNc(1,_n,6,4,"ng-template",null,1,s.W1O)),2&t){const t=s.MAs(2);s.Q6J("ngIf",e.selNode.userPersona===e.userPersonaEnum.OPERATOR)("ngIfElse",t)}},directives:[i.O5,l.xw,l.Wh,T.BN,v.Il,i.sg,v.DX,q.a8,l.yH,q.dk,q.n5,C.VK,C.OP,q.dn,i.RF,i.n9,i.ED,b.lW,C.p6,S.Hw,U,i.mk,L.oO,D,Q,E,B,tt,et.SP,et.uX,Wt,sn,et.uD],styles:[""]}),t})();const Nn=["form"];function Un(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Bitcoin address is required."),s.qZA())}function Dn(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function In(t,e){if(1&t&&(s.TgZ(0,"mat-option",29),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.Q6J("value",t),s.xp6(1),s.Oqu(t)}}function On(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Target Confirmation Blocks is required."),s.qZA())}function Jn(t,e){if(1&t&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Oqu(t.sendFundError)}}function Yn(t,e){if(1&t&&(s.TgZ(0,"div",30),s._UZ(1,"fa-icon",31),s.YNc(2,Jn,2,1,"span",12),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==t.sendFundError)}}let Pn=(()=>{class t{constructor(t,e,n,i,a,o){this.dialogRef=t,this.logger=e,this.store=n,this.commonService=i,this.decimalPipe=a,this.actions$=o,this.faExclamationTriangle=g.eHv,this.selNode={},this.addressTypes=[],this.flgLoadingWallet=!0,this.selectedAddress=f._t[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=f.uA,this.selAmountUnit=f.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=f.Xz,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select("root").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.fiatConversion=t.selNode.settings.fiatConversion,this.amountUnits=t.selNode.settings.currencyUnits,this.appConfig=t.appConfig,this.nodeData=t.nodeData,this.logger.info(t)}),this.actions$.pipe((0,m.R)(this.unSubs[1]),(0,h.h)(t=>t.type===x.Wz||t.type===x.wL)).subscribe(t=>{t.type===x.wL&&(this.store.dispatch(new st.Lw("Fund Sent Successfully!")),this.dialogRef.close()),t.type===x.Wz&&"SendOnchainFunds"===t.payload.action&&(this.sendFundError=t.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.store.dispatch(new st.Fk("Sending Funds...")),this.transaction.amount&&this.selAmountUnit!==f.NT.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?f.NT.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe((0,m.R)(this.unSubs[2])).subscribe(t=>{this.transaction.amount=parseInt(t[f.NT.SATS]),this.selAmountUnit=f.NT.SATS,this.store.dispatch(new x.J6(this.transaction))}):this.store.dispatch(new x.J6(this.transaction))}get invalidValues(){return!this.transaction.address||""===this.transaction.address||!this.transaction.amount||this.transaction.amount<=0||!this.transaction.blocks||this.transaction.blocks<=0}resetData(){this.sendFundError="",this.transaction={}}onAmountUnitChange(t){let e=this,n=t.value===this.amountUnits[2]?f.NT.OTHER:t.value;this.transaction.amount&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?f.NT.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe((0,m.R)(this.unSubs[3])).subscribe(t=>{e.transaction.amount=+e.decimalPipe.transform(t[n],e.currencyUnitFormats[n]).replace(/,/g,"")}),this.selAmountUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(w.v),s.Y36(i.JJ),s.Y36(A.eX))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(t,e){if(1&t&&s.Gf(Nn,7),2&t){let t;s.iGM(t=s.CRH())&&(e.form=t.first)}},decls:36,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","addr","required","",3,"ngModel","ngModelChange"],["addrs","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amt","type","number","tabindex","2","required","",3,"ngModel","step","min","ngModelChange"],["amnt","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Target Confirmation Blocks","type","number","name","blocks","tabindex","8","required","true",3,"ngModel","step","min","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-flat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Send Payment"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"form",7,8),s.NdJ("submit",function(){return e.onSendFunds()})("reset",function(){return e.resetData()}),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"input",10,11),s.NdJ("ngModelChange",function(t){return e.transaction.address=t}),s.qZA(),s.YNc(14,Un,2,0,"mat-error",12),s.qZA(),s.TgZ(15,"mat-form-field",13),s.TgZ(16,"input",14,15),s.NdJ("ngModelChange",function(t){return e.transaction.amount=t}),s.qZA(),s.TgZ(18,"span",16),s._uU(19),s.qZA(),s.YNc(20,Dn,2,0,"mat-error",12),s.qZA(),s.TgZ(21,"mat-form-field",17),s.TgZ(22,"mat-select",18),s.NdJ("selectionChange",function(t){return e.onAmountUnitChange(t)}),s.YNc(23,In,2,2,"mat-option",19),s.qZA(),s.qZA(),s.TgZ(24,"div",20),s.TgZ(25,"mat-form-field",21),s.TgZ(26,"input",22,23),s.NdJ("ngModelChange",function(t){return e.transaction.blocks=t}),s.qZA(),s.YNc(28,On,2,0,"mat-error",12),s.qZA(),s.qZA(),s._UZ(29,"div",24),s.YNc(30,Yn,3,2,"div",25),s.TgZ(31,"div",26),s.TgZ(32,"button",27),s._uU(33,"Clear Fields"),s.qZA(),s.TgZ(34,"button",28),s._uU(35,"Send Funds"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(6),s.Q6J("mat-dialog-close",!1),s.xp6(6),s.Q6J("ngModel",e.transaction.address),s.xp6(2),s.Q6J("ngIf",!e.transaction.address),s.xp6(2),s.Q6J("ngModel",e.transaction.amount)("step",100)("min",0),s.xp6(3),s.hij(" ",e.selAmountUnit," "),s.xp6(1),s.Q6J("ngIf",!e.transaction.amount),s.xp6(2),s.Q6J("value",e.selAmountUnit),s.xp6(1),s.Q6J("ngForOf",e.amountUnits),s.xp6(3),s.Q6J("ngModel",e.transaction.blocks)("step",1)("min",0),s.xp6(2),s.Q6J("ngIf",!e.transaction.blocks),s.xp6(2),s.Q6J("ngIf",""!==e.sendFundError))},directives:[l.xw,l.yH,q.dk,l.Wh,b.lW,ot.ZT,q.dn,lt._Y,lt.JL,lt.F,I.KE,rt.Nt,lt.Fj,ct.h,lt.Q7,lt.JJ,lt.On,i.O5,lt.wV,lt.qQ,ut.q,I.R9,dt.gD,i.sg,I.TO,mt.ey,T.BN],styles:[""]}),t})();var Rn=n(882);function Mn(t,e){1&t&&s._UZ(0,"mat-progress-bar",31)}function Qn(t,e){1&t&&(s.TgZ(0,"th",32),s._uU(1," Date/Time "),s.qZA())}function En(t,e){if(1&t&&(s.TgZ(0,"td",33),s._uU(1),s.ALo(2,"date"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,1e3*t.timestamp,"dd/MMM/YYYY HH:mm"))}}function Bn(t,e){1&t&&(s.TgZ(0,"th",34),s._uU(1," Amount (Sats) "),s.qZA())}function Hn(t,e){if(1&t&&(s.TgZ(0,"span",37),s._uU(1),s.ALo(2,"number"),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.Oqu(s.lcZ(2,1,t.amount))}}function zn(t,e){if(1&t&&(s.TgZ(0,"span",38),s._uU(1),s.ALo(2,"number"),s.qZA()),2&t){const t=s.oxw().$implicit;s.xp6(1),s.hij("(",s.lcZ(2,1,-1*t.amount),")")}}function Vn(t,e){if(1&t&&(s.TgZ(0,"td",33),s.YNc(1,Hn,3,3,"span",35),s.YNc(2,zn,3,3,"span",36),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Q6J("ngIf",t.amount>0||0===t.amount),s.xp6(1),s.Q6J("ngIf",t.amount<0)}}function Gn(t,e){1&t&&(s.TgZ(0,"th",34),s._uU(1," Fees (Sats) "),s.qZA())}function $n(t,e){if(1&t&&(s.TgZ(0,"td",33),s.TgZ(1,"span",37),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.fees))}}function Xn(t,e){1&t&&(s.TgZ(0,"th",39),s._uU(1," Confirmations "),s.qZA())}function Wn(t,e){if(1&t&&(s.TgZ(0,"td",40),s.TgZ(1,"span",37),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==t?null:t.confirmations)," ")}}function Kn(t,e){1&t&&(s.TgZ(0,"th",32),s._uU(1," Address "),s.qZA())}function jn(t,e){if(1&t&&(s.TgZ(0,"td",33),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(t.address)}}function ti(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",41),s.TgZ(1,"div",42),s.TgZ(2,"mat-select",43),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",44),s.NdJ("click",function(){return s.CHM(t),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function ei(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",45),s.TgZ(1,"button",46),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw().onTransactionClick(n,e)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function ni(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No transactions available."),s.qZA())}function ii(t,e){if(1&t&&(s.TgZ(0,"td",47),s.YNc(1,ni,2,0,"p",48),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngIf",!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)}}const ai=function(t){return{"display-none":t}};function oi(t,e){if(1&t&&s._UZ(0,"tr",49),2&t){const t=s.oxw();s.Q6J("ngClass",s.VKq(1,ai,(null==t.listTransactions?null:t.listTransactions.data)&&(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)>0))}}function si(t,e){1&t&&s._UZ(0,"tr",50)}function li(t,e){1&t&&s._UZ(0,"tr",51)}const ri=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},ci=function(){return["no_transaction"]};let ui=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.commonService=e,this.store=n,this.datePipe=i,this.faHistory=g.qO$,this.displayedColumns=[],this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unsub=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","confirmations","fees","actions"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"])}ngOnInit(){this.store.dispatch(new x.eL),this.store.select("ecl").pipe((0,m.R)(this.unsub[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchTransactions"===t.action&&(this.flgLoading[0]="error")}),t.transactions&&this.loadTransactionsTable(t.transactions),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.transactions),this.logger.info(t)})}applyFilter(t){this.listTransactions.filter=t.value.trim().toLowerCase()}onTransactionClick(t,e){this.store.dispatch(new st.wu({data:{type:f.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:t.blockHash,title:"Block Hash",width:100}],[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"timestamp",value:t.timestamp,title:"Date/Time",width:50,type:f.Gi.DATE_TIME},{key:"confirmations",value:t.confirmations,title:"Number of Confirmations",width:50,type:f.Gi.NUMBER}],[{key:"fees",value:t.fees,title:"Fees (Sats)",width:50,type:f.Gi.NUMBER},{key:"amount",value:t.amount,title:"Amount (Sats)",width:50,type:f.Gi.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100,type:f.Gi.STRING}]]}}))}loadTransactionsTable(t){this.listTransactions=new at.by([...t]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.listTransactions.filterPredicate=(t,e)=>((t.timestamp?this.datePipe.transform(new Date(1e3*t.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(t).toLowerCase()).includes(e),this.listTransactions.paginator=this.paginator,this.logger.info(this.listTransactions)}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unsub.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(i.uU))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Transactions")}])],decls:37,vars:14,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","fees"],["matColumnDef","confirmations"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["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,"pl-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(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"div",2),s._UZ(3,"fa-icon",3),s.TgZ(4,"span",4),s._uU(5,"Transaction History"),s.qZA(),s.qZA(),s.TgZ(6,"mat-form-field",5),s.TgZ(7,"input",6),s.NdJ("keyup",function(t){return e.applyFilter(t.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",7),s.TgZ(9,"div",8),s.YNc(10,Mn,1,0,"mat-progress-bar",9),s.TgZ(11,"table",10,11),s.ynx(13,12),s.YNc(14,Qn,2,0,"th",13),s.YNc(15,En,3,4,"td",14),s.BQk(),s.ynx(16,15),s.YNc(17,Bn,2,0,"th",16),s.YNc(18,Vn,3,2,"td",14),s.BQk(),s.ynx(19,17),s.YNc(20,Gn,2,0,"th",16),s.YNc(21,$n,4,3,"td",14),s.BQk(),s.ynx(22,18),s.YNc(23,Xn,2,0,"th",19),s.YNc(24,Wn,4,3,"td",20),s.BQk(),s.ynx(25,21),s.YNc(26,Kn,2,0,"th",13),s.YNc(27,jn,2,1,"td",14),s.BQk(),s.ynx(28,22),s.YNc(29,ti,6,0,"th",23),s.YNc(30,ei,3,0,"td",24),s.BQk(),s.ynx(31,25),s.YNc(32,ii,2,1,"td",26),s.BQk(),s.YNc(33,oi,1,3,"tr",27),s.YNc(34,si,1,0,"tr",28),s.YNc(35,li,1,0,"tr",29),s.qZA(),s._UZ(36,"mat-paginator",30),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(3),s.Q6J("icon",e.faHistory),s.xp6(7),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.listTransactions)("ngClass",s.VKq(11,ri,"error"===e.flgLoading[0])),s.xp6(22),s.Q6J("matFooterRowDef",s.DdM(13,ci)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,T.BN,I.KE,rt.Nt,Y.$V,i.O5,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,r.pW,at.ge,it.nU,at.ev,dt.gD,dt.$L,mt.ey,b.lW,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.uU,i.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function di(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",12),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().activeLink=e.link}),s._uU(1),s.qZA()}if(2&t){const t=e.$implicit,n=s.oxw();s.s9C("routerLink",t.link),s.Q6J("active",n.activeLink===t.link),s.xp6(1),s.Oqu(t.name)}}let mi=(()=>{class t{constructor(t,e){this.store=t,this.router=e,this.selNode={},this.faExchangeAlt=g.Ssp,this.faChartPie=g.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t instanceof a.Av)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link}),this.store.select("ecl").pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.balances=[{title:"Total Balance",dataValue:t.onchainBalance.total||0},{title:"Confirmed",dataValue:t.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:t.onchainBalance.unconfirmed}]})}openSendFundsModal(){this.store.dispatch(new st.wu({data:{component:Pn}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(y.yh),s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-on-chain"]],decls:21,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large","mt-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"On-chain Balance"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s._UZ(7,"rtl-currency-unit-converter",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s._UZ(9,"fa-icon",1),s.TgZ(10,"span",2),s._uU(11,"On-chain Transactions"),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s.TgZ(13,"mat-card"),s.TgZ(14,"mat-card-content",4),s.TgZ(15,"nav",7),s.YNc(16,di,2,3,"div",8),s.qZA(),s.TgZ(17,"div",9),s._UZ(18,"router-outlet"),s.qZA(),s.TgZ(19,"div",10),s._UZ(20,"rtl-ecl-on-chain-transaction-history",11),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(1),s.Q6J("icon",e.faChartPie),s.xp6(6),s.Q6J("values",e.balances),s.xp6(2),s.Q6J("icon",e.faExchangeAlt),s.xp6(7),s.Q6J("ngForOf",e.links))},directives:[l.xw,l.Wh,T.BN,q.a8,q.dn,Rn.D,et.BU,i.sg,l.yH,a.lC,ui,et.Nj,a.rH],styles:[""]}),t})();var hi=n(1050);function pi(t,e){if(1&t&&(s.TgZ(0,"span",10),s._uU(1,"Channels"),s.qZA()),2&t){const t=s.oxw();s.s9C("matBadge",t.activeChannels)}}function gi(t,e){if(1&t&&(s.TgZ(0,"span",10),s._uU(1,"Peers"),s.qZA()),2&t){const t=s.oxw();s.s9C("matBadge",t.activePeers)}}let fi=(()=>{class t{constructor(t,e){this.store=t,this.router=e,this.activePeers=0,this.activeChannels=0,this.faUsers=g.FVb,this.faChartPie=g.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t instanceof a.Av)).subscribe(t=>{this.activeLink=this.links.findIndex(e=>e.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("ecl").pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.activeChannels=t.channelsStatus&&t.channelsStatus.active&&t.channelsStatus.active.channels?t.channelsStatus.active.channels:0,this.balances=[{title:"Total Balance",dataValue:t.onchainBalance.total||0},{title:"Confirmed",dataValue:t.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:t.onchainBalance.unconfirmed}]})}onSelectedTabChange(t){this.router.navigateByUrl("/ecl/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(y.yh),s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"On-chain Balance"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s._UZ(7,"rtl-currency-unit-converter",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s._UZ(9,"fa-icon",1),s.TgZ(10,"span",2),s._uU(11,"Connections"),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s.TgZ(13,"mat-card"),s.TgZ(14,"mat-card-content",4),s.TgZ(15,"mat-tab-group",7),s.NdJ("selectedIndexChange",function(t){return e.activeLink=t})("selectedTabChange",function(t){return e.onSelectedTabChange(t)}),s.TgZ(16,"mat-tab"),s.YNc(17,pi,2,1,"ng-template",8),s.qZA(),s.TgZ(18,"mat-tab"),s.YNc(19,gi,2,1,"ng-template",8),s.qZA(),s.qZA(),s.TgZ(20,"div",9),s._UZ(21,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(1),s.Q6J("icon",e.faChartPie),s.xp6(6),s.Q6J("values",e.balances),s.xp6(2),s.Q6J("icon",e.faUsers),s.xp6(6),s.Q6J("selectedIndex",e.activeLink))},directives:[l.xw,l.Wh,T.BN,q.a8,q.dn,Rn.D,et.SP,et.uX,et.uD,l.yH,a.lC,hi.k],styles:[""]}),t})();function xi(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",11),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().activeLink=e.link}),s._uU(1),s.qZA()}if(2&t){const t=e.$implicit,n=s.oxw();s.s9C("routerLink",t.link),s.Q6J("active",n.activeLink===t.link),s.xp6(1),s.Oqu(t.name)}}let Zi=(()=>{class t{constructor(t,e,n){this.logger=t,this.store=e,this.router=n,this.faExchangeAlt=g.Ssp,this.faChartPie=g.OS1,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t instanceof a.Av)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link}),this.store.select("ecl").pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.currencyUnits=t.nodeSettings.currencyUnits,this.balances=t.nodeSettings.userPersona===f.ol.OPERATOR?[{title:"Local Capacity",dataValue:t.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:t.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:t.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:t.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(t)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"Lightning Balance"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s._UZ(7,"rtl-currency-unit-converter",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",6),s._UZ(9,"fa-icon",1),s.TgZ(10,"span",2),s._uU(11,"Lightning Transactions"),s.qZA(),s.qZA(),s.TgZ(12,"div",7),s.TgZ(13,"mat-card"),s.TgZ(14,"mat-card-content",4),s.TgZ(15,"nav",8),s.YNc(16,xi,2,3,"div",9),s.qZA(),s.TgZ(17,"div",10),s._UZ(18,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(1),s.Q6J("icon",e.faChartPie),s.xp6(6),s.Q6J("values",e.balances),s.xp6(2),s.Q6J("icon",e.faExchangeAlt),s.xp6(7),s.Q6J("ngForOf",e.links))},directives:[l.xw,l.Wh,T.BN,q.a8,q.dn,Rn.D,et.BU,i.sg,l.yH,a.lC,et.Nj,a.rH],styles:[""]}),t})();function yi(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",11),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().activeLink=e.link}),s._uU(1),s.qZA()}if(2&t){const t=e.$implicit,n=s.oxw();s.s9C("routerLink",t.link),s.Q6J("active",n.activeLink===t.link),s.xp6(1),s.Oqu(t.name)}}let Ai=(()=>{class t{constructor(t){this.router=t,this.faMapSigns=g.SuH,this.events=[],this.flgLoading=[!0],this.errorMessage="",this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t instanceof a.Av)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-routing"]],decls:13,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"fa-icon",2),s.TgZ(3,"span",3),s._uU(4,"Routing"),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"mat-card",5),s.TgZ(7,"mat-card-content",6),s.TgZ(8,"div",7),s.TgZ(9,"nav",8),s.YNc(10,yi,2,3,"div",9),s.qZA(),s.qZA(),s.TgZ(11,"div",10),s._UZ(12,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(2),s.Q6J("icon",e.faMapSigns),s.xp6(8),s.Q6J("ngForOf",e.links))},directives:[l.xw,l.Wh,T.BN,l.yH,q.a8,q.dn,et.BU,i.sg,a.lC,et.Nj,a.rH],styles:[""]}),t})();var wi=n(4810),Ti=n(1403),vi=n(2609);function qi(t,e){1&t&&(s.TgZ(0,"th",24),s._uU(1,"Address"),s.qZA())}function Ci(t,e){if(1&t&&(s.TgZ(0,"td",25),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",t," ")}}function bi(t,e){1&t&&(s.TgZ(0,"th",26),s.TgZ(1,"span",27),s._uU(2,"Actions"),s.qZA(),s.qZA())}function Si(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",28),s.TgZ(1,"span",27),s.TgZ(2,"button",29),s.NdJ("copied",function(e){return s.CHM(t),s.oxw(2).onCopyNodeURI(e)}),s._uU(3,"Copy Node URI"),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=e.$implicit,n=s.oxw(2);s.xp6(2),s.Q6J("payload",n.lookupResult.nodeId+"@"+t)}}function Li(t,e){1&t&&s._UZ(0,"tr",30)}function Fi(t,e){1&t&&s._UZ(0,"tr",31)}const _i=function(t){return{"background-color":t}};function ki(t,e){if(1&t&&(s.TgZ(0,"div",1),s._UZ(1,"mat-divider",2),s.TgZ(2,"div",3),s.TgZ(3,"div",4),s.TgZ(4,"h4",5),s._uU(5,"Pub Key"),s.qZA(),s.TgZ(6,"span",6),s._uU(7),s.qZA(),s.qZA(),s.qZA(),s._UZ(8,"mat-divider",7),s.TgZ(9,"div",3),s.TgZ(10,"div",4),s.TgZ(11,"h4",5),s._uU(12,"Signature"),s.qZA(),s.TgZ(13,"span",8),s._uU(14),s.qZA(),s.qZA(),s.qZA(),s._UZ(15,"mat-divider",7),s.TgZ(16,"div",3),s.TgZ(17,"div",9),s.TgZ(18,"h4",5),s._uU(19,"Alias"),s.qZA(),s.TgZ(20,"span",8),s._uU(21),s.TgZ(22,"span",10),s._uU(23),s.qZA(),s.qZA(),s.qZA(),s.TgZ(24,"div",9),s.TgZ(25,"h4",5),s._uU(26,"Date/Time"),s.qZA(),s.TgZ(27,"span",8),s._uU(28),s.ALo(29,"date"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(30,"div",11),s.TgZ(31,"h4",12),s._uU(32,"Addresses"),s.qZA(),s.TgZ(33,"div",13),s.TgZ(34,"table",14,15),s.ynx(36,16),s.YNc(37,qi,2,0,"th",17),s.YNc(38,Ci,2,1,"td",18),s.BQk(),s.ynx(39,19),s.YNc(40,bi,3,0,"th",20),s.YNc(41,Si,4,1,"td",21),s.BQk(),s.YNc(42,Li,1,0,"tr",22),s.YNc(43,Fi,1,0,"tr",23),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(t.lookupResult.nodeId),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(t.lookupResult.signature),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(t.lookupResult.alias),s.xp6(1),s.Q6J("ngStyle",s.VKq(15,_i,t.lookupResult.rgbColor)),s.xp6(1),s.Oqu(t.lookupResult.rgbColor?t.lookupResult.rgbColor:""),s.xp6(5),s.Oqu(s.xi3(29,12,1e3*t.lookupResult.timestamp,"dd/MMM/YYYY HH:mm")),s.xp6(6),s.Q6J("dataSource",t.addresses),s.xp6(8),s.Q6J("matHeaderRowDef",t.displayedColumns),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns)}}let Ni=(()=>{class t{constructor(t,e){this.logger=t,this.snackBar=e,this.displayedColumns=["address","actions"]}ngOnInit(){this.addresses=new at.by(this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses?this.lookupResult.addresses:[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}onCopyNodeURI(t){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+t)}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(Ti.ux))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(t,e){if(1&t&&s.Gf(it.YE,5),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","row"],["fxFlex","100"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text","w-100"],[1,"my-1",3,"inset"],[1,"foreground-secondary-text"],["fxFlex","50"],[1,"ml-2",3,"ngStyle"],["fxLayout","column",1,"mt-2"],["fxFlex","100","fxLayoutAlign","start",1,"font-bold-500","mb-1"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","address"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&s.YNc(0,ki,44,17,"div",0),2&t&&s.Q6J("ngIf",e.lookupResult)},directives:[i.O5,l.xw,J.d,l.yH,l.Wh,i.PC,L.Zl,Y.$V,at.BZ,it.YE,at.w1,at.fO,at.Dz,at.as,at.nj,at.ge,it.nU,at.ev,b.lW,vi.y,at.XQ,at.Gk],pipes:[i.uU],styles:[""]}),t})();const Ui=["form"];function Di(t,e){if(1&t&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function Ii(t,e){if(1&t&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.hij("Invalid ",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder,".")}}function Oi(t,e){if(1&t&&(s.TgZ(0,"div"),s._UZ(1,"rtl-ecl-node-lookup",29),s.qZA()),2&t){const t=s.oxw(3);s.xp6(1),s.Q6J("lookupResult",t.nodeLookupValue)}}function Ji(t,e){if(1&t&&(s.TgZ(0,"span",27),s.YNc(1,Oi,2,1,"div",28),s.qZA()),2&t){const t=s.oxw(2),e=s.MAs(26);s.xp6(1),s.Q6J("ngIf",t.nodeLookupValue.nodeId)("ngIfElse",e)}}function Yi(t,e){1&t&&(s.TgZ(0,"span",27),s.TgZ(1,"h3"),s._uU(2,"Error! Unable to find details!"),s.qZA(),s.qZA())}function Pi(t,e){if(1&t&&(s.TgZ(0,"div",21),s.TgZ(1,"div",22),s.TgZ(2,"span",23),s._uU(3),s.qZA(),s.qZA(),s.TgZ(4,"div",24),s.YNc(5,Ji,2,2,"span",25),s.YNc(6,Yi,3,0,"span",26),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(3),s.hij("",t.lookupFields[t.selectedFieldId].name," Details"),s.xp6(1),s.Q6J("ngSwitch",t.selectedFieldId),s.xp6(1),s.Q6J("ngSwitchCase",0)}}function Ri(t,e){1&t&&(s.TgZ(0,"h3"),s._uU(1,"Error! Unable to find details!"),s.qZA())}const Mi=function(t){return{"mt-2":t}};let Qi=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.commonService=e,this.store=n,this.actions$=i,this.lookupKeyCtrl=new lt.NI,this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Node ID"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=g.wn1,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions$.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t.type===x.ht||t.type===x.Wz)).subscribe(t=>{if(t.type===x.ht){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue=t.payload[0]?JSON.parse(JSON.stringify(t.payload[0])):{nodeid:""};break;case 1:this.channelLookupValue=t.payload?JSON.parse(JSON.stringify(t.payload)):[]}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===x.Wz&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1})}onLookup(){if(!this.lookupKeyCtrl.value)return this.lookupKeyCtrl.setErrors({required:!0}),!0;if(this.lookupKeyCtrl.value&&(this.lookupKeyCtrl.value.includes("@")||this.lookupKeyCtrl.value.includes(",")))return this.lookupKeyCtrl.setErrors({invalid:!0}),!0;switch(this.selectedFieldId||(this.selectedFieldId=0),this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.store.dispatch(new st.Fk("Searching "+this.lookupFields[this.selectedFieldId].name+"...")),this.selectedFieldId){case 0:this.store.dispatch(new x.x$(this.lookupKeyCtrl.value.trim()))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.lookupKeyCtrl.setValue(""),this.lookupKeyCtrl.setErrors(null),this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(A.eX))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-lookups"]],viewQuery:function(t,e){if(1&t&&s.Gf(Ui,7),2&t){let t;s.iGM(t=s.CRH())&&(e.form=t.first)}},decls:27,vars:10,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"card-content-gap","mt-1"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start space-between",1,"w-100"],["form","ngForm"],["fxFlex","20","fxFlex.gt-md","15","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxFlex","80","fxFlex.gt-md","85","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl","placeholder"],["key",""],[4,"ngIf"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch","class","w-100 mt-2",4,"ngIf"],["errorBlock",""],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"fa-icon",2),s.TgZ(3,"span",3),s._uU(4,"Graph Lookups"),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"mat-card",5),s.TgZ(7,"mat-card-content",6),s.TgZ(8,"form",7,8),s.TgZ(10,"div",9),s.TgZ(11,"mat-radio-group",10),s.TgZ(12,"mat-radio-button",11),s._uU(13,"Node"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(14,"mat-form-field",12),s._UZ(15,"input",13,14),s.YNc(17,Di,2,1,"mat-error",15),s.YNc(18,Ii,2,1,"mat-error",15),s.qZA(),s.TgZ(19,"div",16),s.TgZ(20,"button",17),s.NdJ("click",function(){return e.resetData()}),s._uU(21,"Clear"),s.qZA(),s.TgZ(22,"button",18),s.NdJ("click",function(){return e.onLookup()}),s._uU(23,"Lookup"),s.qZA(),s.qZA(),s.qZA(),s.YNc(24,Pi,7,3,"div",19),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(25,Ri,2,0,"ng-template",null,20,s.W1O)),2&t&&(s.xp6(2),s.Q6J("icon",e.faSearch),s.xp6(10),s.Q6J("value",0),s.xp6(2),s.Q6J("ngClass",s.VKq(8,Mi,e.screenSize===e.screenSizeEnum.XS||e.screenSize===e.screenSizeEnum.SM)),s.xp6(1),s.Q6J("formControl",e.lookupKeyCtrl)("placeholder",(null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder)||"Lookup Key"),s.xp6(2),s.Q6J("ngIf",null==e.lookupKeyCtrl.errors?null:e.lookupKeyCtrl.errors.required),s.xp6(1),s.Q6J("ngIf",null==e.lookupKeyCtrl.errors?null:e.lookupKeyCtrl.errors.invalid),s.xp6(6),s.Q6J("ngIf",e.flgSetLookupValue))},directives:[l.xw,l.Wh,T.BN,l.yH,q.a8,q.dn,lt._Y,lt.JL,lt.F,wi.VQ,wi.U0,I.KE,i.mk,L.oO,rt.Nt,lt.Fj,lt.Q7,lt.JJ,lt.oH,i.O5,b.lW,I.TO,i.RF,i.n9,i.ED,Ni],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),t})();var Ei=n(7969);let Bi=(()=>{class t{constructor(t,e){this.store=t,this.eclEffects=e,this.newAddress=""}onGenerateAddress(){this.store.dispatch(new st.Fk("Getting New Address...")),this.store.dispatch(new x.ER),this.eclEffects.setNewAddress.pipe((0,Kt.q)(1)).subscribe(t=>{this.newAddress=t,this.store.dispatch(new st.wu({width:"58%",data:{address:this.newAddress,addressType:"",component:Ei.n}}))})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(y.yh),s.Y36(jt.o))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-on-chain-receive"]],decls:4,vars:0,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"button",2),s.NdJ("click",function(){return e.onGenerateAddress()}),s._uU(3,"Generate Address"),s.qZA(),s.qZA(),s.qZA())},directives:[l.xw,l.yH,l.Wh,b.lW],styles:[""]}),t})(),Hi=(()=>{class t{constructor(t,e){this.store=t,this.activatedRoute=e,this.sweepAll=!1,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activatedRoute.data.pipe((0,m.R)(this.unSubs[0])).subscribe(t=>this.sweepAll=t.sweepAll)}openSendFundsModal(){this.store.dispatch(new st.wu({data:{sweepAll:this.sweepAll,component:Pn}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(y.yh),s.Y36(a.gz))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"button",2),s.NdJ("click",function(){return e.openSendFundsModal()}),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(3),s.Oqu(e.sweepAll?"Sweep All":"Send Funds"))},directives:[l.xw,l.yH,l.Wh,b.lW],styles:[""]}),t})();var zi=n(1258),Vi=n(1681),Gi=n(3474),$i=n(7521),Xi=n(84);const Wi=["form"];function Ki(t,e){if(1&t&&(s.TgZ(0,"mat-option",34),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.Q6J("value",t),s.xp6(1),s.Oqu(t.alias?t.alias:t.nodeId?t.nodeId:"")}}function ji(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Peer alias is required."),s.qZA())}function ta(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Peer not found in the list."),s.qZA())}function ea(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-form-field",1),s.TgZ(1,"input",30),s.NdJ("change",function(){return s.CHM(t),s.oxw().onSelectedPeerChanged()}),s.qZA(),s.TgZ(2,"mat-autocomplete",31,32),s.NdJ("optionSelected",function(){return s.CHM(t),s.oxw().onSelectedPeerChanged()}),s.YNc(4,Ki,2,2,"mat-option",33),s.ALo(5,"async"),s.qZA(),s.YNc(6,ji,2,0,"mat-error",17),s.YNc(7,ta,2,0,"mat-error",17),s.qZA()}if(2&t){const t=s.MAs(3),e=s.oxw();s.xp6(1),s.Q6J("formControl",e.selectedPeer)("matAutocomplete",t),s.xp6(1),s.Q6J("displayWith",e.displayFn),s.xp6(2),s.Q6J("ngForOf",s.lcZ(5,6,e.filteredPeers)),s.xp6(2),s.Q6J("ngIf",null==e.selectedPeer.errors?null:e.selectedPeer.errors.required),s.xp6(1),s.Q6J("ngIf",null==e.selectedPeer.errors?null:e.selectedPeer.errors.notfound)}}function na(t,e){1&t&&s.GkF(0)}function ia(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function aa(t,e){if(1&t&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function oa(t,e){if(1&t&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Oqu(t.channelConnectionError)}}function sa(t,e){if(1&t&&(s.TgZ(0,"div",35),s._UZ(1,"fa-icon",36),s.YNc(2,oa,2,1,"span",17),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==t.channelConnectionError)}}function la(t,e){if(1&t&&(s.TgZ(0,"mat-expansion-panel",38),s.TgZ(1,"mat-expansion-panel-header"),s.TgZ(2,"mat-panel-title"),s.TgZ(3,"span"),s._uU(4,"Peer: \xa0"),s.qZA(),s.TgZ(5,"strong",39),s._uU(6),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",9),s.TgZ(8,"div",0),s.TgZ(9,"div",1),s.TgZ(10,"h4",40),s._uU(11,"Pubkey"),s.qZA(),s.TgZ(12,"span",41),s._uU(13),s.qZA(),s.qZA(),s.qZA(),s._UZ(14,"mat-divider",42),s.TgZ(15,"div",0),s.TgZ(16,"div",43),s.TgZ(17,"h4",40),s._uU(18,"Address"),s.qZA(),s.TgZ(19,"span",44),s._uU(20),s.qZA(),s.qZA(),s.TgZ(21,"div",43),s.TgZ(22,"h4",40),s._uU(23,"State"),s.qZA(),s.TgZ(24,"span",44),s._uU(25),s.ALo(26,"titlecase"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t){const t=s.oxw(2);s.xp6(6),s.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.nodeId)),s.xp6(7),s.Oqu(t.peer.nodeId),s.xp6(7),s.Oqu(null==t.peer?null:t.peer.address),s.xp6(5),s.Oqu(s.lcZ(26,4,null==t.peer?null:t.peer.state))}}function ra(t,e){if(1&t&&s.YNc(0,la,27,6,"mat-expansion-panel",37),2&t){const t=s.oxw();s.Q6J("ngIf",t.peer)}}let ca=(()=>{class t{constructor(t,e,n,i){this.dialogRef=t,this.data=e,this.store=n,this.actions$=i,this.selectedPeer=new lt.NI,this.faExclamationTriangle=g.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer?this.data.message.peer:null,this.peers=this.data.message.peers&&this.data.message.peers.length?this.data.message.peers:[],this.actions$.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t.type===x.Wz||t.type===x.M8)).subscribe(t=>{t.type===x.Wz&&"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message),t.type===x.M8&&this.dialogRef.close()});let t="",e="";this.sortedPeers=this.peers.sort((n,i)=>(t=n.alias?n.alias.toLowerCase():n.nodeId?n.nodeId.toLowerCase():"",e=i.alias?i.alias.toLowerCase():n.nodeId.toLowerCase(),t<e?-1:t>e?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,m.R)(this.unSubs[1]),(0,zi.O)(""),(0,Vi.U)(t=>"string"==typeof t?t:t.alias?t.alias:t.nodeId),(0,Vi.U)(t=>t?this.filterPeers(t):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(e=>0===e.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.nodeId?t.nodeId:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.nodeId?this.selectedPeer.value.nodeId:void 0,"string"==typeof this.selectedPeer.value){let t=this.peers.filter(t=>t.alias.length===this.selectedPeer.value.length&&0===t.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].nodeId&&(this.selectedPubkey=t[0].nodeId)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.feeRate=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.feeRate&&this.feeRate>0?"Advanced Options | Fee (Sats/vByte): "+this.feeRate:"Advanced Options"}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0)return!0;this.store.dispatch(new st.Fk("Opening Channel...")),this.store.dispatch(new x.nb({nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate,feeRate:this.feeRate}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(ot.WI),s.Y36(y.yh),s.Y36(A.eX))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(t,e){if(1&t&&s.Gf(Wi,7),2&t){let t;s.iGM(t=s.CRH())&&(e.form=t.first)}},decls:48,vars:19,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Fee (Sats/vByte)","type","number","name","fee","tabindex","7",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-flat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,e){if(1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s.NdJ("click",function(){return e.onClose()}),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"form",7,8),s.NdJ("submit",function(){return e.onOpenChannel()})("reset",function(){return e.resetData()}),s.TgZ(11,"div",9),s.YNc(12,ea,8,8,"mat-form-field",10),s.qZA(),s.YNc(13,na,1,0,"ng-container",11),s.TgZ(14,"div",9),s.TgZ(15,"div",12),s.TgZ(16,"mat-form-field",13),s.TgZ(17,"input",14,15),s.NdJ("ngModelChange",function(t){return e.fundingAmount=t}),s.qZA(),s.TgZ(19,"mat-hint"),s._uU(20),s.ALo(21,"number"),s.qZA(),s.TgZ(22,"span",16),s._uU(23),s.qZA(),s.YNc(24,ia,2,0,"mat-error",17),s.YNc(25,aa,2,1,"mat-error",17),s.qZA(),s.TgZ(26,"div",18),s.TgZ(27,"mat-slide-toggle",19),s.NdJ("ngModelChange",function(t){return e.isPrivate=t}),s._uU(28,"Private Channel"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(29,"mat-expansion-panel",20),s.NdJ("closed",function(){return e.onAdvancedPanelToggle(!0)})("opened",function(){return e.onAdvancedPanelToggle(!1)}),s.TgZ(30,"mat-expansion-panel-header"),s.TgZ(31,"mat-panel-title"),s.TgZ(32,"span"),s._uU(33),s.qZA(),s.qZA(),s.qZA(),s.TgZ(34,"div",21),s.TgZ(35,"div",12),s.TgZ(36,"div",22),s.TgZ(37,"mat-form-field",1),s.TgZ(38,"input",23,24),s.NdJ("ngModelChange",function(t){return e.feeRate=t}),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(40,sa,3,2,"div",25),s.TgZ(41,"div",26),s.TgZ(42,"button",27),s._uU(43,"Clear Fields"),s.qZA(),s.TgZ(44,"button",28),s._uU(45,"Open Channel"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(46,ra,1,1,"ng-template",null,29,s.W1O)),2&t){const t=s.MAs(18),n=s.MAs(47);s.xp6(5),s.Oqu(e.alertTitle),s.xp6(7),s.Q6J("ngIf",!e.peer&&e.peers&&e.peers.length>0),s.xp6(1),s.Q6J("ngTemplateOutlet",n),s.xp6(4),s.Q6J("ngModel",e.fundingAmount)("step",1e3)("min",1)("max",e.totalBalance),s.xp6(3),s.hij("Remaining Bal: ",s.lcZ(21,17,e.totalBalance-(e.fundingAmount?e.fundingAmount:0)),""),s.xp6(3),s.hij(" ",null==e.information?null:e.information.smaller_currency_unit," "),s.xp6(1),s.Q6J("ngIf",null==t.errors?null:t.errors.required),s.xp6(1),s.Q6J("ngIf",null==t.errors?null:t.errors.max),s.xp6(2),s.Q6J("ngModel",e.isPrivate),s.xp6(6),s.Oqu(e.advancedTitle),s.xp6(5),s.Q6J("ngModel",e.feeRate)("step",1)("min",0),s.xp6(2),s.Q6J("ngIf",""!==e.channelConnectionError)}},directives:[l.xw,l.yH,q.dk,l.Wh,b.lW,q.dn,lt._Y,lt.JL,lt.F,i.O5,i.tP,I.KE,rt.Nt,lt.wV,lt.qQ,lt.Fd,lt.Fj,ut.q,Gi.F,lt.Q7,lt.JJ,lt.On,I.bx,I.R9,$i.Rr,ue.ib,ue.yz,ue.yK,ct.h,Xi.ZL,lt.oH,Xi.XC,i.sg,mt.ey,I.TO,T.BN,J.d],pipes:[i.JJ,i.Ov,i.rS],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),t})();function ua(t,e){if(1&t&&(s.TgZ(0,"span",7),s._uU(1,"Open"),s.qZA()),2&t){const t=s.oxw();s.s9C("matBadge",t.numOfOpenChannels)}}function da(t,e){if(1&t&&(s.TgZ(0,"span",7),s._uU(1,"Pending"),s.qZA()),2&t){const t=s.oxw();s.s9C("matBadge",t.numOfPendingChannels)}}function ma(t,e){if(1&t&&(s.TgZ(0,"span",7),s._uU(1,"Inactive"),s.qZA()),2&t){const t=s.oxw();s.s9C("matBadge",t.numOfInactiveChannels)}}let ha=(()=>{class t{constructor(t,e,n){this.logger=t,this.store=e,this.router=n,this.numOfOpenChannels=0,this.numOfPendingChannels=0,this.numOfInactiveChannels=0,this.selNode={},this.information={},this.peers=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"inactive",name:"Inactive"}],this.activeLink=0,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t instanceof a.Av)).subscribe(t=>{this.activeLink=this.links.findIndex(e=>e.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("ecl").pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.numOfOpenChannels=t.channelsStatus&&t.channelsStatus.active&&t.channelsStatus.active.channels?t.channelsStatus.active.channels:0,this.numOfPendingChannels=t.channelsStatus&&t.channelsStatus.pending&&t.channelsStatus.pending.channels?t.channelsStatus.pending.channels:0,this.numOfInactiveChannels=t.channelsStatus&&t.channelsStatus.inactive&&t.channelsStatus.inactive.channels?t.channelsStatus.inactive.channels:0,this.selNode=t.nodeSettings,this.information=t.information,this.peers=t.peers,this.totalBalance=t.onchainBalance.total,this.logger.info(t)})}onOpenChannel(){this.store.dispatch(new st.wu({data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:ca}}))}onSelectedTabChange(t){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channels-tables"]],decls:14,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"button",2),s.NdJ("click",function(){return e.onOpenChannel()}),s._uU(3,"Open Channel"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-tab-group",4),s.NdJ("selectedIndexChange",function(t){return e.activeLink=t})("selectedTabChange",function(t){return e.onSelectedTabChange(t)}),s.TgZ(6,"mat-tab"),s.YNc(7,ua,2,1,"ng-template",5),s.qZA(),s.TgZ(8,"mat-tab"),s.YNc(9,da,2,1,"ng-template",5),s.qZA(),s.TgZ(10,"mat-tab"),s.YNc(11,ma,2,1,"ng-template",5),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s._UZ(13,"router-outlet"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(5),s.Q6J("selectedIndex",e.activeLink))},directives:[l.xw,l.yH,l.Wh,b.lW,et.SP,et.uX,et.uD,a.lC,hi.k],styles:[""]}),t})();function pa(t,e){if(1&t&&(s.TgZ(0,"div",11),s.TgZ(1,"h4",12),s._uU(2,"Short Channel ID"),s.qZA(),s.TgZ(3,"span",13),s._uU(4),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(4),s.Oqu(t.channel.shortChannelId)}}function ga(t,e){if(1&t&&(s.TgZ(0,"div",11),s.TgZ(1,"h4",12),s._uU(2,"State"),s.qZA(),s.TgZ(3,"span",15),s._uU(4),s.ALo(5,"titlecase"),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(4),s.Oqu(s.lcZ(5,1,t.channel.state))}}function fa(t,e){if(1&t&&(s.TgZ(0,"div"),s.TgZ(1,"div",9),s.TgZ(2,"div",11),s.TgZ(3,"h4",12),s._uU(4,"Local Balance (Sats)"),s.qZA(),s.TgZ(5,"span",15),s._uU(6),s.ALo(7,"number"),s.qZA(),s.qZA(),s.TgZ(8,"div",11),s.TgZ(9,"h4",12),s._uU(10,"Remote Balance (Sats)"),s.qZA(),s.TgZ(11,"span",15),s._uU(12),s.ALo(13,"number"),s.qZA(),s.qZA(),s.qZA(),s._UZ(14,"mat-divider",14),s.TgZ(15,"div",9),s.TgZ(16,"div",11),s.TgZ(17,"h4",12),s._uU(18,"Base Fee (mSats)"),s.qZA(),s.TgZ(19,"span",15),s._uU(20),s.ALo(21,"number"),s.qZA(),s.qZA(),s.TgZ(22,"div",11),s.TgZ(23,"h4",12),s._uU(24,"Fee Rate (mili mSats)"),s.qZA(),s.TgZ(25,"span",15),s._uU(26),s.ALo(27,"number"),s.qZA(),s.qZA(),s.qZA(),s._UZ(28,"mat-divider",14),s.qZA()),2&t){const t=s.oxw();s.xp6(6),s.Oqu(s.lcZ(7,6,t.channel.toLocal)),s.xp6(6),s.Oqu(s.lcZ(13,8,t.channel.toRemote)),s.xp6(2),s.Q6J("inset",!0),s.xp6(6),s.Oqu(s.lcZ(21,10,t.channel.feeBaseMsat)),s.xp6(6),s.Oqu(s.lcZ(27,12,t.channel.feeProportionalMillionths)),s.xp6(2),s.Q6J("inset",!0)}}function xa(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"Show Advanced"),s.qZA())}function Za(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"Hide Advanced"),s.qZA())}function ya(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",21),s.NdJ("click",function(){return s.CHM(t),s.oxw().onShowAdvanced()}),s.YNc(1,xa,2,0,"p",22),s.YNc(2,Za,2,0,"ng-template",null,23,s.W1O),s.qZA()}if(2&t){const t=s.MAs(3),e=s.oxw();s.xp6(1),s.Q6J("ngIf",!e.showAdvanced)("ngIfElse",t)}}function Aa(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",24),s.NdJ("copied",function(e){return s.CHM(t),s.oxw().onCopyChanID(e)}),s._uU(1,"Copy Short Channel ID"),s.qZA()}if(2&t){const t=s.oxw();s.Q6J("payload",t.channel.shortChannelId)}}function wa(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",25),s.NdJ("copied",function(e){return s.CHM(t),s.oxw().onCopyChanID(e)}),s._uU(1,"Copy Channel ID"),s.qZA()}if(2&t){const t=s.oxw();s.Q6J("payload",t.channel.channelId)}}const Ta=function(t){return{"xs-scroll-y":t}},va=function(t,e){return{"mt-2":t,"mt-1":e}};let qa=(()=>{class t{constructor(t,e,n,i,a){this.dialogRef=t,this.data=e,this.logger=n,this.commonService=i,this.snackBar=a,this.faReceipt=g.dLy,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=f.cu}ngOnInit(){this.channel=this.data.channel,this.channelsType=this.data.channelsType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("open"===this.channelsType?"Short channel ID "+t+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+t)}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(ot.WI),s.Y36(Z.mQ),s.Y36(w.v),s.Y36(Ti.ux))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-information"]],decls:64,vars:28,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["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","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50",4,"ngIf"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-stroked-button","","color","primary","type","reset","tabindex","1","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-stroked-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-flat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s._UZ(4,"fa-icon",4),s.TgZ(5,"span",5),s._uU(6,"Channel Information"),s.qZA(),s.qZA(),s.TgZ(7,"button",6),s.NdJ("click",function(){return e.onClose()}),s._uU(8,"X"),s.qZA(),s.qZA(),s.TgZ(9,"mat-card-content",7),s.TgZ(10,"div",8),s.TgZ(11,"div",9),s.YNc(12,pa,5,1,"div",10),s.TgZ(13,"div",11),s.TgZ(14,"h4",12),s._uU(15,"Peer Alias"),s.qZA(),s.TgZ(16,"span",13),s._uU(17),s.qZA(),s.qZA(),s.YNc(18,ga,6,3,"div",10),s.qZA(),s._UZ(19,"mat-divider",14),s.TgZ(20,"div",9),s.TgZ(21,"div",1),s.TgZ(22,"h4",12),s._uU(23,"Channel ID"),s.qZA(),s.TgZ(24,"span",13),s._uU(25),s.qZA(),s.qZA(),s.qZA(),s._UZ(26,"mat-divider",14),s.TgZ(27,"div",9),s.TgZ(28,"div",1),s.TgZ(29,"h4",12),s._uU(30,"Peer Public Key"),s.qZA(),s.TgZ(31,"span",13),s._uU(32),s.qZA(),s.qZA(),s.qZA(),s._UZ(33,"mat-divider",14),s.TgZ(34,"div",9),s.TgZ(35,"div",11),s.TgZ(36,"h4",12),s._uU(37,"Private"),s.qZA(),s.TgZ(38,"span",15),s._uU(39),s.qZA(),s.qZA(),s.TgZ(40,"div",11),s.TgZ(41,"h4",12),s._uU(42,"Funder"),s.qZA(),s.TgZ(43,"span",15),s._uU(44),s.qZA(),s.qZA(),s.qZA(),s._UZ(45,"mat-divider",14),s.TgZ(46,"div",9),s.TgZ(47,"div",11),s.TgZ(48,"h4",12),s._uU(49,"State"),s.qZA(),s.TgZ(50,"span",15),s._uU(51),s.ALo(52,"titlecase"),s.qZA(),s.qZA(),s.TgZ(53,"div",11),s.TgZ(54,"h4",12),s._uU(55,"Buried"),s.qZA(),s.TgZ(56,"span",15),s._uU(57),s.qZA(),s.qZA(),s.qZA(),s._UZ(58,"mat-divider",14),s.YNc(59,fa,29,14,"div",16),s.TgZ(60,"div",17),s.YNc(61,ya,4,2,"button",18),s.YNc(62,Aa,2,1,"button",19),s.YNc(63,wa,2,1,"button",20),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(4),s.Q6J("icon",e.faReceipt),s.xp6(5),s.Q6J("ngClass",s.VKq(23,Ta,e.screenSize===e.screenSizeEnum.XS)),s.xp6(3),s.Q6J("ngIf","open"===e.channelsType),s.xp6(5),s.Oqu(e.channel.alias),s.xp6(1),s.Q6J("ngIf","open"!==e.channelsType),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(e.channel.channelId),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(e.channel.nodeId),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(0===e.channel.channelFlags?"Yes":"No"),s.xp6(5),s.Oqu(e.channel.isFunder?"Yes":"No"),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(s.lcZ(52,21,e.channel.state)),s.xp6(6),s.Oqu(e.channel.buried?"Yes":"No"),s.xp6(1),s.Q6J("inset",!0),s.xp6(1),s.Q6J("ngIf",e.showAdvanced&&"open"===e.channelsType),s.xp6(1),s.Q6J("ngClass",s.WLB(25,va,!e.showAdvanced,e.showAdvanced)),s.xp6(1),s.Q6J("ngIf","open"===e.channelsType),s.xp6(1),s.Q6J("ngIf","open"===e.channelsType),s.xp6(1),s.Q6J("ngIf","open"!==e.channelsType))},directives:[l.xw,l.Wh,l.yH,q.dk,T.BN,b.lW,q.dn,i.mk,L.oO,i.O5,J.d,ct.h,vi.y],pipes:[i.rS,i.JJ],styles:[""]}),t})();function Ca(t,e){1&t&&s._UZ(0,"mat-progress-bar",30)}function ba(t,e){1&t&&(s.TgZ(0,"th",31),s._uU(1," Short Channel ID "),s.qZA())}function Sa(t,e){if(1&t&&(s.TgZ(0,"span",37),s._UZ(1,"fa-icon",38),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("icon",t.faEyeSlash)}}function La(t,e){if(1&t&&(s.TgZ(0,"span",39),s._UZ(1,"fa-icon",38),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("icon",t.faEye)}}const Fa=function(t){return{"max-width":t}};function _a(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"div",33),s.YNc(2,Sa,2,1,"span",34),s.YNc(3,La,2,1,"span",35),s.TgZ(4,"span",36),s._uU(5),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(4,Fa,n.screenSize===n.screenSizeEnum.XS?"12rem":"22rem")),s.xp6(1),s.Q6J("ngIf",0===t.channelFlags),s.xp6(1),s.Q6J("ngIf",0!==t.channelFlags),s.xp6(2),s.Oqu(null==t?null:t.shortChannelId)}}function ka(t,e){1&t&&(s.TgZ(0,"th",31),s._uU(1," Alias "),s.qZA())}function Na(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"div",33),s.TgZ(2,"span",36),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(2,Fa,n.screenSize===n.screenSizeEnum.XS?"12rem":"22rem")),s.xp6(2),s.Oqu(t.alias)}}function Ua(t,e){1&t&&(s.TgZ(0,"th",40),s._uU(1," Base Fee (mSats) "),s.qZA())}function Da(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",41),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.feeBaseMsat,"1.0-0")," ")}}function Ia(t,e){1&t&&(s.TgZ(0,"th",40),s._uU(1," Fee Rate (mili mSats) "),s.qZA())}function Oa(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",41),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.feeProportionalMillionths,"1.0-0")," ")}}function Ja(t,e){1&t&&(s.TgZ(0,"th",40),s._uU(1," Local Balance (Sats) "),s.qZA())}function Ya(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",41),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.toLocal,"1.0-0")," ")}}function Pa(t,e){1&t&&(s.TgZ(0,"th",40),s._uU(1," Remote Balance (Sats) "),s.qZA())}function Ra(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",41),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.toRemote,"1.0-0")," ")}}function Ma(t,e){1&t&&(s.TgZ(0,"th",42),s._uU(1,"Balance Score "),s.qZA())}function Qa(t,e){if(1&t&&(s.TgZ(0,"td",43),s.TgZ(1,"div",44),s.TgZ(2,"mat-hint",45),s._uU(3),s.ALo(4,"number"),s.qZA(),s.qZA(),s._UZ(5,"mat-progress-bar",46),s.qZA()),2&t){const t=e.$implicit;s.xp6(3),s.Oqu(s.lcZ(4,2,(null==t?null:t.balancedness)||0)),s.xp6(2),s.s9C("value",t.toLocal&&t.toLocal>0?+t.toLocal/(+t.toLocal+ +t.toRemote)*100:0)}}function Ea(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",47),s.TgZ(1,"div",48),s.TgZ(2,"mat-select",49),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",50),s.NdJ("click",function(){return s.CHM(t),s.oxw().onChannelUpdate("all")}),s._uU(5,"Update Fee Policy"),s.qZA(),s.TgZ(6,"mat-option",50),s.NdJ("click",function(){return s.CHM(t),s.oxw().onDownloadCSV()}),s._uU(7,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Ba(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",51),s.TgZ(1,"div",52),s.TgZ(2,"mat-select",53),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",50),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw().onChannelClick(n,e)}),s._uU(5,"View Info"),s.qZA(),s.TgZ(6,"mat-option",50),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().onChannelUpdate(e)}),s._uU(7,"Update Fee Policy"),s.qZA(),s.TgZ(8,"mat-option",50),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().onChannelClose(e,!1)}),s._uU(9,"Close Channel"),s.qZA(),s.TgZ(10,"mat-option",50),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().onChannelClose(e,!0)}),s._uU(11,"Force Close"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Ha(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No peers connected. Add a peer in order to open a channel."),s.qZA())}function za(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No open channels available."),s.qZA())}function Va(t,e){if(1&t&&(s.TgZ(0,"td",54),s.YNc(1,Ha,2,0,"p",55),s.YNc(2,za,2,0,"p",55),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)),s.xp6(1),s.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1))}}const Ga=function(t){return{"display-none":t}};function $a(t,e){if(1&t&&s._UZ(0,"tr",56),2&t){const t=s.oxw();s.Q6J("ngClass",s.VKq(1,Ga,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Xa(t,e){1&t&&s._UZ(0,"tr",57)}function Wa(t,e){1&t&&s._UZ(0,"tr",58)}const Ka=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},ja=function(){return["no_peer"]};let to=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=i,this.commonService=a,this.faEye=g.Mdf,this.faEyeSlash=g.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.vn,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","toLocal","toRemote","actions"]):this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","actions"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.onchainBalance.total,this.activeChannels=t.activeChannels,this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable(),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.activeChannels),this.logger.info(t)})}ngAfterViewInit(){this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable()}onChannelUpdate(t){"all"!==t&&"NORMAL"!==t.state||(this.store.dispatch(new st.b_({data:{type:f.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"all"===t?"Update fee policy for selected/all channels":"Update fee policy for Channel: "+t.channelId,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:t&&t.feeBaseMsat?t.feeBaseMsat:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:t&&t.feeProportionalMillionths?t.feeProportionalMillionths:100,min:1,width:48,hintFunction:this.percentHintFunction}]}})),this.rtlEffects.closeConfirm.pipe((0,m.R)(this.unSubs[1])).subscribe(e=>{if(e){const n=e[0].inputValue,i=e[1].inputValue;let a=null,o="";"all"===t?(this.activeChannels.forEach(t=>{o=o+","+t.channelId}),o=o.substring(1),a={baseFeeMsat:n,feeRate:i,channelIds:o}):a={baseFeeMsat:n,feeRate:i,channelId:t.channelId},this.store.dispatch(new st.Fk("Updating Channel Policy...")),this.store.dispatch(new x.k(a))}}),this.applyFilter())}percentHintFunction(t){return(t/1e4).toString()+"%"}onChannelClose(t,e){this.store.dispatch(new st.b_({data:{type:f.n_.CONFIRM,alertTitle:e?"Force Close Channel":"Close Channel",titleMessage:e?"Force closing channel: "+t.channelId:"Closing channel: "+t.channelId,noBtnText:"Cancel",yesBtnText:e?"Force Close":"Close Channel"}})),this.rtlEffects.closeConfirm.pipe((0,m.R)(this.unSubs[3])).subscribe(n=>{n&&(this.store.dispatch(new st.Fk(e?"Force Closing Channel...":"Closing Channel...")),this.store.dispatch(new x.e8({channelId:t.channelId,force:e})))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,e){this.store.dispatch(new st.wu({data:{channel:t,channelsType:"open",component:qa}}))}loadChannelsTable(){this.activeChannels.sort(function(t,e){return t.alias===e.alias?0:e.alias?1:-1}),this.channels=new at.by([...this.activeChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.channels.filterPredicate=(t,e)=>JSON.stringify(t).toLowerCase().includes(e),this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"ActiveChannels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(fe.V),s.Y36(jt.o),s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","feeBaseMsat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","feeProportionalMillionths"],["matColumnDef","toLocal"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"div",2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"input",4),s.NdJ("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.YNc(6,Ca,1,0,"mat-progress-bar",6),s.TgZ(7,"table",7,8),s.ynx(9,9),s.YNc(10,ba,2,0,"th",10),s.YNc(11,_a,6,6,"td",11),s.BQk(),s.ynx(12,12),s.YNc(13,ka,2,0,"th",10),s.YNc(14,Na,4,4,"td",11),s.BQk(),s.ynx(15,13),s.YNc(16,Ua,2,0,"th",14),s.YNc(17,Da,4,4,"td",11),s.BQk(),s.ynx(18,15),s.YNc(19,Ia,2,0,"th",14),s.YNc(20,Oa,4,4,"td",11),s.BQk(),s.ynx(21,16),s.YNc(22,Ja,2,0,"th",14),s.YNc(23,Ya,4,4,"td",11),s.BQk(),s.ynx(24,17),s.YNc(25,Pa,2,0,"th",14),s.YNc(26,Ra,4,4,"td",11),s.BQk(),s.ynx(27,18),s.YNc(28,Ma,2,0,"th",19),s.YNc(29,Qa,6,4,"td",20),s.BQk(),s.ynx(30,21),s.YNc(31,Ea,8,0,"th",22),s.YNc(32,Ba,12,0,"td",23),s.BQk(),s.ynx(33,24),s.YNc(34,Va,3,2,"td",25),s.BQk(),s.YNc(35,$a,1,3,"tr",26),s.YNc(36,Xa,1,0,"tr",27),s.YNc(37,Wa,1,0,"tr",28),s.qZA(),s.qZA(),s._UZ(38,"mat-paginator",29),s.qZA()),2&t&&(s.xp6(4),s.Q6J("ngModel",e.selFilter),s.xp6(2),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.channels)("ngClass",s.VKq(11,Ka,"error"===e.flgLoading[0])),s.xp6(28),s.Q6J("matFooterRowDef",s.DdM(13,ja)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,I.KE,rt.Nt,lt.Fj,lt.JJ,lt.On,Y.$V,i.O5,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,r.pW,at.ge,it.nU,at.ev,i.PC,L.Zl,O.gM,T.BN,I.bx,dt.gD,dt.$L,mt.ey,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.JJ],styles:[".mat-column-shortChannelId[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-shortChannelId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{padding-left:1rem;flex:0 0 20%;width:20%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:2rem;flex:0 0 17%;width:17%}.mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width:37.5em){.mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width:56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 60%}}@media only screen and (max-width:37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),t})();function eo(t,e){1&t&&s._UZ(0,"mat-progress-bar",25)}function no(t,e){1&t&&(s.TgZ(0,"th",26),s._uU(1," State "),s.qZA())}function io(t,e){if(1&t&&(s.TgZ(0,"td",27),s._uU(1),s.ALo(2,"titlecase"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",s.lcZ(2,1,null==t?null:t.state),"")}}function ao(t,e){1&t&&(s.TgZ(0,"th",26),s._uU(1," Alias "),s.qZA())}function oo(t,e){if(1&t&&(s.TgZ(0,"td",27),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(null==t?null:t.alias)}}function so(t,e){1&t&&(s.TgZ(0,"th",28),s._uU(1," Local Balance (Sats) "),s.qZA())}function lo(t,e){if(1&t&&(s.TgZ(0,"td",27),s.TgZ(1,"span",29),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.toLocal,"1.0-0")," ")}}function ro(t,e){1&t&&(s.TgZ(0,"th",28),s._uU(1," Remote Balance (Sats) "),s.qZA())}function co(t,e){if(1&t&&(s.TgZ(0,"td",27),s.TgZ(1,"span",29),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.toRemote,"1.0-0")," ")}}function uo(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",30),s.TgZ(1,"div",31),s.TgZ(2,"mat-select",32),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",33),s.NdJ("click",function(){return s.CHM(t),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function mo(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",34),s.TgZ(1,"button",35),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw().onChannelClick(n,e)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function ho(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No pending channels available."),s.qZA())}function po(t,e){if(1&t&&(s.TgZ(0,"td",36),s.YNc(1,ho,2,0,"p",37),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngIf",!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)}}const go=function(t){return{"display-none":t}};function fo(t,e){if(1&t&&s._UZ(0,"tr",38),2&t){const t=s.oxw();s.Q6J("ngClass",s.VKq(1,go,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function xo(t,e){1&t&&s._UZ(0,"tr",39)}function Zo(t,e){1&t&&s._UZ(0,"tr",40)}const yo=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Ao=function(){return["no_channel"]};let wo=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=i,this.commonService=a,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.vn,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===f.cu.SM||this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","alias","toLocal","toRemote","actions"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.onchainBalance.total,this.pendingChannels=t.pendingChannels,this.loadChannelsTable(),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.pendingChannels),this.logger.info(t)})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,e){this.store.dispatch(new st.wu({data:{channel:t,channelsType:"pending",component:qa}}))}loadChannelsTable(){this.pendingChannels.sort(function(t,e){return t.alias===e.alias?0:e.alias?1:-1}),this.channels=new at.by([...this.pendingChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.channels.filterPredicate=(t,e)=>JSON.stringify(t).toLowerCase().includes(e),this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"PendingChannels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(fe.V),s.Y36(jt.o),s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Channels")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["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(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"div",2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"input",4),s.NdJ("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.YNc(6,eo,1,0,"mat-progress-bar",6),s.TgZ(7,"table",7,8),s.ynx(9,9),s.YNc(10,no,2,0,"th",10),s.YNc(11,io,3,3,"td",11),s.BQk(),s.ynx(12,12),s.YNc(13,ao,2,0,"th",10),s.YNc(14,oo,2,1,"td",11),s.BQk(),s.ynx(15,13),s.YNc(16,so,2,0,"th",14),s.YNc(17,lo,4,4,"td",11),s.BQk(),s.ynx(18,15),s.YNc(19,ro,2,0,"th",14),s.YNc(20,co,4,4,"td",11),s.BQk(),s.ynx(21,16),s.YNc(22,uo,6,0,"th",17),s.YNc(23,mo,3,0,"td",18),s.BQk(),s.ynx(24,19),s.YNc(25,po,2,1,"td",20),s.BQk(),s.YNc(26,fo,1,3,"tr",21),s.YNc(27,xo,1,0,"tr",22),s.YNc(28,Zo,1,0,"tr",23),s.qZA(),s.qZA(),s._UZ(29,"mat-paginator",24),s.qZA()),2&t&&(s.xp6(4),s.Q6J("ngModel",e.selFilter),s.xp6(2),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.channels)("ngClass",s.VKq(11,yo,"error"===e.flgLoading[0])),s.xp6(19),s.Q6J("matFooterRowDef",s.DdM(13,Ao)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,I.KE,rt.Nt,lt.Fj,lt.JJ,lt.On,Y.$V,i.O5,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,r.pW,at.ge,it.nU,at.ev,dt.gD,dt.$L,mt.ey,b.lW,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.rS,i.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();var To=n(7753);const vo=["peersForm"],qo=["stepper"];function Co(t,e){if(1&t&&s._uU(0),2&t){const t=s.oxw();s.Oqu(t.peerFormLabel)}}function bo(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Address is required."),s.qZA())}function So(t,e){if(1&t&&(s.TgZ(0,"div",33),s._UZ(1,"fa-icon",34),s.TgZ(2,"span"),s._uU(3),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faExclamationTriangle),s.xp6(2),s.Oqu(t.peerConnectionError)}}function Lo(t,e){if(1&t&&s._uU(0),2&t){const t=s.oxw();s.Oqu(t.channelFormLabel)}}function Fo(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function _o(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount must be a positive number."),s.qZA())}function ko(t,e){if(1&t&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function No(t,e){if(1&t&&(s.TgZ(0,"div",33),s._UZ(1,"fa-icon",34),s.TgZ(2,"span"),s._uU(3),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("icon",t.faExclamationTriangle),s.xp6(2),s.Oqu(t.channelConnectionError)}}let Uo=(()=>{class t{constructor(t,e,n,i,a,o,s){this.dialogRef=t,this.data=e,this.store=n,this.eclEffects=i,this.formBuilder=a,this.actions$=o,this.logger=s,this.faExclamationTriangle=g.eHv,this.peerAddress="",this.totalBalance=0,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new d.x,new d.x]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.nodeId&&this.data.message.peer.address?this.data.message.peer.nodeId+"@"+this.data.message.peer.address:this.data.message.peer&&this.data.message.peer.nodeId&&!this.data.message.peer.address?this.data.message.peer.nodeId:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[lt.kI.required]],peerAddress:[this.peerAddress,[lt.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[lt.kI.required,lt.kI.min(1),lt.kI.max(this.totalBalance)]],isPrivate:[!1],feeRate:[null],hiddenAmount:["",[lt.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.actions$.pipe((0,m.R)(this.unSubs[1]),(0,h.h)(t=>t.type===x.Ae||t.type===x.M8||t.type===x.Wz)).subscribe(t=>{t.type===x.Ae&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===x.M8&&this.dialogRef.close(),t.type===x.Wz&&("SaveNewPeer"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch(new st.Fk("Adding Peer...")),this.store.dispatch(new x.rF({id:this.peerFormGroup.controls.peerAddress.value}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0)return!0;this.channelConnectionError="",this.store.dispatch(new st.Fk("Opening Channel...")),this.store.dispatch(new x.nb({nodeId:this.newlyAddedPeer.nodeId,amount:this.channelFormGroup.controls.fundingAmount.value,private:this.channelFormGroup.controls.isPrivate.value,feeRate:this.channelFormGroup.controls.feeRate.value}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.selectedIndex){case 0:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 1:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.nodeId):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.nodeId):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)";break;default:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)"}t.selectedIndex<t.previouslySelectedIndex&&(0===t.selectedIndex?this.peerFormGroup.controls.hiddenAddress.setValue(""):1===t.selectedIndex&&this.channelFormGroup.controls.hiddenAmount.setValue(""))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(ot.so),s.Y36(ot.WI),s.Y36(y.yh),s.Y36(jt.o),s.Y36(lt.qu),s.Y36(A.eX),s.Y36(Z.mQ))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(t,e){if(1&t&&(s.Gf(vo,5),s.Gf(qo,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.form=t.first),s.iGM(t=s.CRH())&&(e.stepper=t.first)}},decls:50,vars:20,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","formControlName","feeRate","placeholder","Fee (Sats/vByte)","type","number","name","feeRate","tabindex","7",3,"step","min"],["mat-stroked-button","","color","primary","tabindex","8","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","12","type","button","default","",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Connect to a new peer"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s.NdJ("click",function(){return e.onClose()}),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"div",7),s.TgZ(10,"mat-vertical-stepper",8,9),s.NdJ("selectionChange",function(t){return e.stepSelectionChanged(t)}),s.TgZ(12,"mat-step",10),s.TgZ(13,"form",11),s.YNc(14,Co,1,1,"ng-template",12),s.TgZ(15,"mat-form-field",1),s._UZ(16,"input",13),s.YNc(17,bo,2,0,"mat-error",14),s.qZA(),s.YNc(18,So,4,2,"div",15),s.TgZ(19,"div",16),s.TgZ(20,"button",17),s.NdJ("click",function(){return e.onConnectPeer()}),s._uU(21),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(22,"mat-step",10),s.TgZ(23,"form",18),s.YNc(24,Lo,1,1,"ng-template",19),s.TgZ(25,"div",20),s.TgZ(26,"div",21),s.TgZ(27,"mat-form-field",22),s._UZ(28,"input",23),s.TgZ(29,"mat-hint"),s._uU(30),s.qZA(),s.TgZ(31,"span",24),s._uU(32," Sats "),s.qZA(),s.YNc(33,Fo,2,0,"mat-error",14),s.YNc(34,_o,2,0,"mat-error",14),s.YNc(35,ko,2,1,"mat-error",14),s.qZA(),s.TgZ(36,"div",25),s.TgZ(37,"mat-slide-toggle",26),s._uU(38,"Private Channel"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(39,"div",27),s.TgZ(40,"div",28),s.TgZ(41,"mat-form-field",1),s._UZ(42,"input",29),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(43,No,4,2,"div",15),s.TgZ(44,"div",16),s.TgZ(45,"button",30),s.NdJ("click",function(){return e.onOpenChannel()}),s._uU(46),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(47,"div",31),s.TgZ(48,"button",32),s.NdJ("click",function(){return e.onClose()}),s._uU(49),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(10),s.Q6J("linear",!0),s.xp6(2),s.Q6J("stepControl",e.peerFormGroup)("editable",e.flgEditable),s.xp6(1),s.Q6J("formGroup",e.peerFormGroup),s.xp6(4),s.Q6J("ngIf",null==e.peerFormGroup.controls.peerAddress.errors?null:e.peerFormGroup.controls.peerAddress.errors.required),s.xp6(1),s.Q6J("ngIf",""!==e.peerConnectionError),s.xp6(3),s.Oqu(""!==e.peerConnectionError?"Retry":"Add Peer"),s.xp6(1),s.Q6J("stepControl",e.channelFormGroup)("editable",e.flgEditable),s.xp6(1),s.Q6J("formGroup",e.channelFormGroup),s.xp6(5),s.Q6J("step",1e3),s.xp6(2),s.hij("Remaining Bal: ",e.totalBalance-(e.channelFormGroup.controls.fundingAmount.value?e.channelFormGroup.controls.fundingAmount.value:0),""),s.xp6(3),s.Q6J("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.required),s.xp6(1),s.Q6J("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.min),s.xp6(1),s.Q6J("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.max),s.xp6(7),s.Q6J("step",1)("min",0),s.xp6(1),s.Q6J("ngIf",""!==e.channelConnectionError),s.xp6(3),s.Oqu(""!==e.channelConnectionError?"Retry":"Open Channel"),s.xp6(3),s.Oqu(null!=e.newlyAddedPeer&&e.newlyAddedPeer.nodeId?"Do It Later":"Close"))},directives:[l.xw,l.yH,q.dk,l.Wh,b.lW,q.dn,To.Vq,To.C0,lt._Y,lt.JL,lt.sg,To.VY,I.KE,rt.Nt,lt.Fj,ct.h,lt.JJ,lt.u,lt.Q7,i.O5,lt.wV,I.bx,I.R9,$i.Rr,lt.qQ,ut.q,I.TO,T.BN],styles:[""]}),t})();function Do(t,e){1&t&&s._UZ(0,"mat-progress-bar",35)}function Io(t,e){1&t&&(s.TgZ(0,"th",36),s._uU(1," ID "),s.qZA())}const Oo=function(t){return{"max-width":t}};function Jo(t,e){if(1&t&&(s.TgZ(0,"td",37),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw();s.Q6J("ngStyle",s.VKq(2,Oo,n.screenSize===n.screenSizeEnum.XS?"10rem":"30rem")),s.xp6(1),s.hij(" ",null==t?null:t.nodeId," ")}}function Yo(t,e){1&t&&(s.TgZ(0,"th",38),s._uU(1," Alias "),s.qZA())}const Po=function(t){return{"mr-0":t}};function Ro(t,e){if(1&t&&s._UZ(0,"span",42),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Po,t.screenSize===t.screenSizeEnum.XS))}}function Mo(t,e){if(1&t&&s._UZ(0,"span",43),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Po,t.screenSize===t.screenSizeEnum.XS))}}function Qo(t,e){if(1&t&&(s.TgZ(0,"td",39),s.YNc(1,Ro,1,3,"span",40),s.YNc(2,Mo,1,3,"span",41),s._uU(3),s.qZA()),2&t){const t=e.$implicit,n=s.oxw();s.Q6J("ngStyle",s.VKq(4,Oo,n.screenSize===n.screenSizeEnum.XS?"10rem":"25rem")),s.xp6(1),s.Q6J("ngIf","CONNECTED"===t.state),s.xp6(1),s.Q6J("ngIf","DISCONNECTED"===t.state),s.xp6(1),s.hij(" ",null==t?null:t.alias," ")}}function Eo(t,e){1&t&&(s.TgZ(0,"th",36),s._uU(1," State "),s.qZA())}function Bo(t,e){if(1&t&&(s.TgZ(0,"td",44),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",null==t?null:t.state," ")}}function Ho(t,e){1&t&&(s.TgZ(0,"th",36),s._uU(1," Network Address "),s.qZA())}function zo(t,e){if(1&t&&(s.TgZ(0,"td",44),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",null==t?null:t.address," ")}}function Vo(t,e){1&t&&(s.TgZ(0,"th",36),s._uU(1," Channels "),s.qZA())}function Go(t,e){if(1&t&&(s.TgZ(0,"td",44),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",null==t?null:t.channels," ")}}function $o(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",45),s.TgZ(1,"div",46),s.TgZ(2,"mat-select",47),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",48),s.NdJ("click",function(){return s.CHM(t),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Xo(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-option",48),s.NdJ("click",function(){s.CHM(t);const e=s.oxw().$implicit;return s.oxw().onPeerDetach(e)}),s._uU(1,"Disconnect"),s.qZA()}}function Wo(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"mat-option",48),s.NdJ("click",function(){s.CHM(t);const e=s.oxw().$implicit;return s.oxw().onConnectPeer(e)}),s._uU(1,"Reconnect"),s.qZA()}}function Ko(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",49),s.TgZ(1,"div",46),s.TgZ(2,"mat-select",47),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",48),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw().onPeerClick(n,e)}),s._uU(5,"View Info"),s.qZA(),s.TgZ(6,"mat-option",48),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().onOpenChannel(e)}),s._uU(7,"Open Channel"),s.qZA(),s.YNc(8,Xo,2,0,"mat-option",50),s.YNc(9,Wo,2,0,"mat-option",50),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=e.$implicit;s.xp6(8),s.Q6J("ngIf","CONNECTED"===t.state),s.xp6(1),s.Q6J("ngIf","DISCONNECTED"===t.state)}}function jo(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No connected peers."),s.qZA())}function ts(t,e){if(1&t&&(s.TgZ(0,"td",51),s.YNc(1,jo,2,0,"p",52),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngIf",!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)}}const es=function(t){return{"display-none":t}};function ns(t,e){if(1&t&&s._UZ(0,"tr",53),2&t){const t=s.oxw();s.Q6J("ngClass",s.VKq(1,es,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function is(t,e){1&t&&s._UZ(0,"tr",54)}function as(t,e){if(1&t&&s._UZ(0,"tr",55),2&t){const t=e.$implicit,n=s.oxw();s.Q6J("@newlyAddedRowAnimation",t.pub_key===n.newlyAddedPeer&&n.flgAnimate?"added":"notAdded")}}const os=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},ss=function(){return["no_peer"]};let ls=(()=>{class t{constructor(t,e,n,i,a,o){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=i,this.actions$=a,this.commonService=o,this.faUsers=g.FVb,this.newlyAddedPeer="",this.flgAnimate=!0,this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","actions"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","channels","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","address","channels","actions"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchPeers"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.availableBalance=t.onchainBalance.total||0,this.peersData=t.peers,this.loadPeersTable(this.peersData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!1),setTimeout(()=>{this.flgAnimate=!1},3e3),this.logger.info(t)}),this.actions$.pipe((0,m.R)(this.unSubs[1]),(0,h.h)(t=>t.type===x.IH)).subscribe(t=>{this.peerAddress=void 0,this.flgAnimate=!0})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,e){const n=[[{key:"nodeId",value:t.nodeId,title:"Public Key",width:100}],[{key:"address",value:t.address,title:"Address",width:50},{key:"alias",value:t.alias,title:"Alias",width:50}],[{key:"state",value:this.commonService.titleCase(t.state),title:"State",width:50},{key:"channels",value:t.channels,title:"Channels",width:50}]];this.store.dispatch(new st.wu({data:{type:f.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.nodeId,message:n}}))}onConnectPeer(t){this.store.dispatch(new st.wu({data:{message:{peer:t.nodeId?t:null,information:this.information,balance:this.availableBalance},component:Uo}}))}onOpenChannel(t){this.store.dispatch(new st.wu({data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:ca}}))}onPeerDetach(t){this.store.dispatch(t.channels>0?new st.wu({data:{type:f.n_.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}):new st.b_({data:{type:f.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}})),this.rtlEffects.closeConfirm.pipe((0,m.R)(this.unSubs[3])).subscribe(e=>{e&&(this.store.dispatch(new st.Fk("Disconnecting Peer...")),this.store.dispatch(new x.hF({nodeId:t.nodeId})))})}applyFilter(t){this.peers.filter=t.value.trim().toLowerCase()}loadPeersTable(t){this.peers=new at.by(t?[...t]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.peers.filterPredicate=(t,e)=>JSON.stringify(t).toLowerCase().includes(e),this.peers.paginator=this.paginator}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(fe.V),s.Y36(jt.o),s.Y36(A.eX),s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-peers"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Peers")}])],decls:42,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","nodeId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","state"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","channels"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-cell",""],["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"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"form",1,2),s.TgZ(3,"button",3),s.NdJ("click",function(){return e.onConnectPeer({})}),s._uU(4,"Add Peer"),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"div",5),s.TgZ(7,"div",6),s._UZ(8,"fa-icon",7),s.TgZ(9,"span",8),s._uU(10,"Peers"),s.qZA(),s.qZA(),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"div",10),s.TgZ(13,"input",11),s.NdJ("keyup",function(t){return e.applyFilter(t.target)}),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(14,"div",12),s.YNc(15,Do,1,0,"mat-progress-bar",13),s.TgZ(16,"table",14,15),s.ynx(18,16),s.YNc(19,Io,2,0,"th",17),s.YNc(20,Jo,2,4,"td",18),s.BQk(),s.ynx(21,19),s.YNc(22,Yo,2,0,"th",20),s.YNc(23,Qo,4,6,"td",21),s.BQk(),s.ynx(24,22),s.YNc(25,Eo,2,0,"th",17),s.YNc(26,Bo,2,1,"td",23),s.BQk(),s.ynx(27,24),s.YNc(28,Ho,2,0,"th",17),s.YNc(29,zo,2,1,"td",23),s.BQk(),s.ynx(30,25),s.YNc(31,Vo,2,0,"th",17),s.YNc(32,Go,2,1,"td",23),s.BQk(),s.ynx(33,26),s.YNc(34,$o,6,0,"th",27),s.YNc(35,Ko,10,2,"td",28),s.BQk(),s.ynx(36,29),s.YNc(37,ts,2,1,"td",30),s.BQk(),s.YNc(38,ns,1,3,"tr",31),s.YNc(39,is,1,0,"tr",32),s.YNc(40,as,1,1,"tr",33),s.qZA(),s.qZA(),s._UZ(41,"mat-paginator",34),s.qZA(),s.qZA()),2&t&&(s.xp6(8),s.Q6J("icon",e.faUsers),s.xp6(7),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.peers)("ngClass",s.VKq(11,os,"error"===e.flgLoading[0])),s.xp6(22),s.Q6J("matFooterRowDef",s.DdM(13,ss)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[l.xw,l.yH,l.Wh,lt._Y,lt.JL,lt.F,b.lW,T.BN,I.KE,rt.Nt,Y.$V,i.O5,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,r.pW,at.ge,it.nU,at.ev,i.PC,L.Zl,O.gM,dt.gD,dt.$L,mt.ey,at.yh,at.Q2,at.XQ,at.Gk],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-nodeId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-nodeId[_ngcontent-%COMP%]{padding-right:2rem}.mat-column-address[_ngcontent-%COMP%]{flex:1 1 15%;width:15%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[yt.Q]}}),t})();const rs=["queryRoutesForm"];function cs(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Destination Node ID is required."),s.qZA())}function us(t,e){1&t&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function ds(t,e){1&t&&s._UZ(0,"mat-progress-bar",31)}function ms(t,e){1&t&&(s.TgZ(0,"th",32),s._uU(1," Alias "),s.qZA())}function hs(t,e){if(1&t&&(s.TgZ(0,"td",33),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",null==t?null:t.alias," ")}}function ps(t,e){1&t&&(s.TgZ(0,"th",32),s._uU(1," ID "),s.qZA())}function gs(t,e){if(1&t&&(s.TgZ(0,"td",33),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",null==t?null:t.nodeId," ")}}function fs(t,e){1&t&&(s.TgZ(0,"th",34),s.TgZ(1,"span",35),s._uU(2,"Actions"),s.qZA(),s.qZA())}function xs(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",36),s.TgZ(1,"button",37),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw().onHopClick(n,e)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function Zs(t,e){1&t&&s._UZ(0,"tr",38)}function ys(t,e){1&t&&s._UZ(0,"tr",39)}const As=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}};let ws=(()=>{class t{constructor(t,e,n){this.store=t,this.eclEffects=e,this.commonService=n,this.nodeId="",this.amount=0,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=g.FpQ,this.faExclamationTriangle=g.eHv,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===f.cu.SM||this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","actions"])}ngOnInit(){this.qrHops=new at.by([]),this.eclEffects.setQueryRoutes.pipe((0,m.R)(this.unSubs[1])).subscribe(t=>{this.qrHops.data=[],t?(this.flgLoading[0]=!1,this.qrHops=new at.by([...t]),this.qrHops.data=t):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null})}onQueryRoutes(){if(!this.nodeId||!this.amount)return!0;this.qrHops.data=[],this.flgLoading[0]=!0,this.store.dispatch(new x.bm({nodeId:this.nodeId,amount:1e3*this.amount}))}resetData(){this.nodeId="",this.amount=0,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,e){this.store.dispatch(new st.wu({data:{type:f.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:t.alias,title:"Alias",width:100,type:f.Gi.STRING}],[{key:"nodeId",value:t.nodeId,title:"Node ID",width:100,type:f.Gi.STRING}]]}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(y.yh),s.Y36(jt.o),s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(rs,7)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.form=t.first)}},decls:39,vars:16,consts:[["fxLayout","column","fxFlex","100"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Node ID","name","nodeId","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","nodeId"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-4","pr-3"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",0),s.TgZ(1,"form",1,2),s.NdJ("ngSubmit",function(){return s.CHM(t),s.MAs(2).form.valid&&e.onQueryRoutes()}),s.TgZ(3,"div",3),s._UZ(4,"fa-icon",4),s.TgZ(5,"span"),s._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),s.qZA(),s.qZA(),s.TgZ(7,"mat-form-field",5),s.TgZ(8,"input",6,7),s.NdJ("ngModelChange",function(t){return e.nodeId=t}),s.qZA(),s.YNc(10,cs,2,0,"mat-error",8),s.qZA(),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"input",10),s.NdJ("ngModelChange",function(t){return e.amount=t}),s.qZA(),s.YNc(13,us,2,0,"mat-error",8),s.qZA(),s.TgZ(14,"div",11),s.TgZ(15,"button",12),s.NdJ("click",function(){return e.resetData()}),s._uU(16,"Clear"),s.qZA(),s.TgZ(17,"button",13),s._uU(18,"Query Route"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(19,"div",14),s.TgZ(20,"div",15),s._UZ(21,"fa-icon",16),s.TgZ(22,"span",17),s._uU(23,"Transaction Route"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(24,"div",18),s.YNc(25,ds,1,0,"mat-progress-bar",19),s.TgZ(26,"table",20,21),s.ynx(28,22),s.YNc(29,ms,2,0,"th",23),s.YNc(30,hs,2,1,"td",24),s.BQk(),s.ynx(31,25),s.YNc(32,ps,2,0,"th",23),s.YNc(33,gs,2,1,"td",24),s.BQk(),s.ynx(34,26),s.YNc(35,fs,3,0,"th",27),s.YNc(36,xs,3,0,"td",28),s.BQk(),s.YNc(37,Zs,1,0,"tr",29),s.YNc(38,ys,1,0,"tr",30),s.qZA(),s.qZA(),s.qZA()}2&t&&(s.xp6(4),s.Q6J("icon",e.faExclamationTriangle),s.xp6(4),s.Q6J("ngModel",e.nodeId),s.xp6(2),s.Q6J("ngIf",!e.nodeId),s.xp6(2),s.Q6J("ngModel",e.amount)("step",1e3)("min",0),s.xp6(1),s.Q6J("ngIf",!e.amount),s.xp6(8),s.Q6J("icon",e.faRoute),s.xp6(4),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.qrHops)("ngClass",s.VKq(14,As,"error"===e.flgLoading[0])),s.xp6(11),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns))},directives:[l.xw,l.yH,lt._Y,lt.JL,lt.F,l.Wh,T.BN,I.KE,rt.Nt,lt.Fj,lt.Q7,lt.JJ,lt.On,i.O5,lt.wV,lt.qQ,ut.q,b.lW,Y.$V,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.as,at.nj,I.TO,r.pW,at.ge,it.nU,at.ev,at.XQ,at.Gk],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();function Ts(t,e){1&t&&s._UZ(0,"mat-progress-bar",29)}function vs(t,e){1&t&&(s.TgZ(0,"th",30),s._uU(1," State "),s.qZA())}function qs(t,e){if(1&t&&(s.TgZ(0,"span",36),s._UZ(1,"fa-icon",37),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("icon",t.faEyeSlash)}}function Cs(t,e){if(1&t&&(s.TgZ(0,"span",38),s._UZ(1,"fa-icon",37),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("icon",t.faEye)}}const bs=function(t){return{"max-width":t}};function Ss(t,e){if(1&t&&(s.TgZ(0,"td",31),s.TgZ(1,"div",32),s.YNc(2,qs,2,1,"span",33),s.YNc(3,Cs,2,1,"span",34),s.TgZ(4,"span",35),s._uU(5),s.ALo(6,"titlecase"),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(6,bs,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),s.xp6(1),s.Q6J("ngIf",0===t.channelFlags),s.xp6(1),s.Q6J("ngIf",0!==t.channelFlags),s.xp6(2),s.Oqu(s.lcZ(6,4,null==t?null:t.state))}}function Ls(t,e){1&t&&(s.TgZ(0,"th",30),s._uU(1," Short Channel ID "),s.qZA())}function Fs(t,e){if(1&t&&(s.TgZ(0,"td",31),s._uU(1),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(null==t?null:t.shortChannelId)}}function _s(t,e){1&t&&(s.TgZ(0,"th",30),s._uU(1," Alias "),s.qZA())}function ks(t,e){if(1&t&&(s.TgZ(0,"td",31),s.TgZ(1,"div",32),s.TgZ(2,"span",35),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&t){const t=e.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(2,bs,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),s.xp6(2),s.Oqu(t.alias)}}function Ns(t,e){1&t&&(s.TgZ(0,"th",39),s._uU(1," Local Balance (Sats) "),s.qZA())}function Us(t,e){if(1&t&&(s.TgZ(0,"td",31),s.TgZ(1,"span",40),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.toLocal,"1.0-0")," ")}}function Ds(t,e){1&t&&(s.TgZ(0,"th",39),s._uU(1," Remote Balance (Sats) "),s.qZA())}function Is(t,e){if(1&t&&(s.TgZ(0,"td",31),s.TgZ(1,"span",40),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,null==t?null:t.toRemote,"1.0-0")," ")}}function Os(t,e){1&t&&(s.TgZ(0,"th",41),s._uU(1,"Balance Score "),s.qZA())}function Js(t,e){if(1&t&&(s.TgZ(0,"td",42),s.TgZ(1,"div",43),s.TgZ(2,"mat-hint",44),s._uU(3),s.ALo(4,"number"),s.qZA(),s.qZA(),s._UZ(5,"mat-progress-bar",45),s.qZA()),2&t){const t=e.$implicit;s.xp6(3),s.Oqu(s.lcZ(4,2,(null==t?null:t.balancedness)||0)),s.xp6(2),s.s9C("value",t.toLocal&&t.toLocal>0?+t.toLocal/(+t.toLocal+ +t.toRemote)*100:0)}}function Ys(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",46),s.TgZ(1,"div",47),s.TgZ(2,"mat-select",48),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",49),s.NdJ("click",function(){return s.CHM(t),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Ps(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",50),s.TgZ(1,"div",51),s.TgZ(2,"mat-select",52),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",49),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw().onChannelClick(n,e)}),s._uU(5,"View Info"),s.qZA(),s.TgZ(6,"mat-option",49),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().onChannelClose(e,!0)}),s._uU(7,"Force Close"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Rs(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No inactive channels available."),s.qZA())}function Ms(t,e){if(1&t&&(s.TgZ(0,"td",53),s.YNc(1,Rs,2,0,"p",54),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngIf",!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)}}const Qs=function(t){return{"display-none":t}};function Es(t,e){if(1&t&&s._UZ(0,"tr",55),2&t){const t=s.oxw();s.Q6J("ngClass",s.VKq(1,Qs,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Bs(t,e){1&t&&s._UZ(0,"tr",56)}function Hs(t,e){1&t&&s._UZ(0,"tr",57)}const zs=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Vs=function(){return["no_channel"]};let Gs=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=i,this.commonService=a,this.faEye=g.Mdf,this.faEyeSlash=g.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.vn,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS||this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.onchainBalance.total,this.inactiveChannels=t.inactiveChannels,this.loadChannelsTable(),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.inactiveChannels),this.logger.info(t)})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}onChannelClose(t,e){this.store.dispatch(new st.b_({data:{type:f.n_.CONFIRM,alertTitle:e?"Force Close Channel":"Close Channel",titleMessage:e?"Force closing channel: "+t.channelId:"Closing channel: "+t.channelId,noBtnText:"Cancel",yesBtnText:e?"Force Close":"Close Channel"}})),this.rtlEffects.closeConfirm.pipe((0,m.R)(this.unSubs[1])).subscribe(n=>{n&&(this.store.dispatch(new st.Fk(e?"Force Closing Channel...":"Closing Channel...")),this.store.dispatch(new x.e8({channelId:t.channelId,force:e})))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLocaleLowerCase()}onChannelClick(t,e){this.store.dispatch(new st.wu({data:{channel:t,channelsType:"inactive",component:qa}}))}loadChannelsTable(){this.inactiveChannels.sort(function(t,e){return t.alias===e.alias?0:e.alias?1:-1}),this.channels=new at.by([...this.inactiveChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.channels.filterPredicate=(t,e)=>JSON.stringify(t).toLowerCase().includes(e),this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"InactiveChannels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(fe.V),s.Y36(jt.o),s.Y36(w.v))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Channels")}])],decls:36,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","shortChannelId"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"div",2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"input",4),s.NdJ("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.YNc(6,Ts,1,0,"mat-progress-bar",6),s.TgZ(7,"table",7,8),s.ynx(9,9),s.YNc(10,vs,2,0,"th",10),s.YNc(11,Ss,7,8,"td",11),s.BQk(),s.ynx(12,12),s.YNc(13,Ls,2,0,"th",10),s.YNc(14,Fs,2,1,"td",11),s.BQk(),s.ynx(15,13),s.YNc(16,_s,2,0,"th",10),s.YNc(17,ks,4,4,"td",11),s.BQk(),s.ynx(18,14),s.YNc(19,Ns,2,0,"th",15),s.YNc(20,Us,4,4,"td",11),s.BQk(),s.ynx(21,16),s.YNc(22,Ds,2,0,"th",15),s.YNc(23,Is,4,4,"td",11),s.BQk(),s.ynx(24,17),s.YNc(25,Os,2,0,"th",18),s.YNc(26,Js,6,4,"td",19),s.BQk(),s.ynx(27,20),s.YNc(28,Ys,6,0,"th",21),s.YNc(29,Ps,8,0,"td",22),s.BQk(),s.ynx(30,23),s.YNc(31,Ms,2,1,"td",24),s.BQk(),s.YNc(32,Es,1,3,"tr",25),s.YNc(33,Bs,1,0,"tr",26),s.YNc(34,Hs,1,0,"tr",27),s.qZA(),s.qZA(),s._UZ(35,"mat-paginator",28),s.qZA()),2&t&&(s.xp6(4),s.Q6J("ngModel",e.selFilter),s.xp6(2),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.channels)("ngClass",s.VKq(11,zs,"error"===e.flgLoading[0])),s.xp6(25),s.Q6J("matFooterRowDef",s.DdM(13,Vs)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,I.KE,rt.Nt,lt.Fj,lt.JJ,lt.On,Y.$V,i.O5,at.BZ,it.YE,i.mk,L.oO,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,r.pW,at.ge,it.nU,at.ev,i.PC,L.Zl,O.gM,T.BN,I.bx,dt.gD,dt.$L,mt.ey,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.rS,i.JJ],styles:[".mat-column-state[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-state[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 20%;width:20%}.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width:37.5em){.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width:37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),t})();function $s(t,e){if(1&t&&(s.TgZ(0,"div",5),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Oqu(t.errorMessage)}}function Xs(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",6),s._UZ(1,"div",7),s.TgZ(2,"mat-form-field",8),s.TgZ(3,"input",9),s.NdJ("ngModelChange",function(e){return s.CHM(t),s.oxw().filterValue=e})("input",function(){return s.CHM(t),s.oxw().applyFilter()})("keyup",function(){return s.CHM(t),s.oxw().applyFilter()}),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=s.oxw();s.xp6(3),s.Q6J("ngModel",t.filterValue)}}function Ws(t,e){1&t&&(s.TgZ(0,"th",31),s._uU(1,"Date/Time"),s.qZA())}function Ks(t,e){if(1&t&&(s.TgZ(0,"td",32),s._uU(1),s.ALo(2,"date"),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,null==t?null:t.timestamp,"dd/MMM/YYYY HH:mm"))}}function js(t,e){1&t&&(s.TgZ(0,"th",31),s._uU(1,"In Channel"),s.qZA())}const tl=function(t){return{"max-width":t}};function el(t,e){if(1&t&&(s.TgZ(0,"td",33),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("ngStyle",s.VKq(2,tl,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),s.xp6(1),s.Oqu(null==t?null:t.fromChannelAlias)}}function nl(t,e){1&t&&(s.TgZ(0,"th",31),s._uU(1,"Out Channel"),s.qZA())}function il(t,e){if(1&t&&(s.TgZ(0,"td",33),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("ngStyle",s.VKq(2,tl,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),s.xp6(1),s.Oqu(null==t?null:t.toChannelAlias)}}function al(t,e){1&t&&(s.TgZ(0,"th",34),s._uU(1,"Amount In (Sats)"),s.qZA())}function ol(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",35),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,null==t?null:t.amountIn))}}function sl(t,e){1&t&&(s.TgZ(0,"th",34),s._uU(1,"Amount Out (Sats)"),s.qZA())}function ll(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",35),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,null==t?null:t.amountOut))}}function rl(t,e){1&t&&(s.TgZ(0,"th",34),s._uU(1,"Fee Earned (Sats)"),s.qZA())}function cl(t,e){if(1&t&&(s.TgZ(0,"td",32),s.TgZ(1,"span",35),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,(null==t?null:t.amountIn)-(null==t?null:t.amountOut)))}}function ul(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"th",36),s.TgZ(1,"div",37),s.TgZ(2,"mat-select",38),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",39),s.NdJ("click",function(){return s.CHM(t),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function dl(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"td",40),s.TgZ(1,"button",41),s.NdJ("click",function(e){const n=s.CHM(t).$implicit;return s.oxw(2).onForwardingEventClick(n,e)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function ml(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No forwarding event available."),s.qZA())}function hl(t,e){if(1&t&&(s.TgZ(0,"td",42),s.YNc(1,ml,2,0,"p",43),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)}}const pl=function(t){return{"display-none":t}};function gl(t,e){if(1&t&&s._UZ(0,"tr",44),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,pl,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function fl(t,e){1&t&&s._UZ(0,"tr",45)}function xl(t,e){1&t&&s._UZ(0,"tr",46)}const Zl=function(){return["no_event"]};function yl(t,e){if(1&t&&(s.TgZ(0,"div",10),s.TgZ(1,"table",11,12),s.ynx(3,13),s.YNc(4,Ws,2,0,"th",14),s.YNc(5,Ks,3,4,"td",15),s.BQk(),s.ynx(6,16),s.YNc(7,js,2,0,"th",14),s.YNc(8,el,2,4,"td",17),s.BQk(),s.ynx(9,18),s.YNc(10,nl,2,0,"th",14),s.YNc(11,il,2,4,"td",17),s.BQk(),s.ynx(12,19),s.YNc(13,al,2,0,"th",20),s.YNc(14,ol,4,3,"td",15),s.BQk(),s.ynx(15,21),s.YNc(16,sl,2,0,"th",20),s.YNc(17,ll,4,3,"td",15),s.BQk(),s.ynx(18,22),s.YNc(19,rl,2,0,"th",20),s.YNc(20,cl,4,3,"td",15),s.BQk(),s.ynx(21,23),s.YNc(22,ul,6,0,"th",24),s.YNc(23,dl,3,0,"td",25),s.BQk(),s.ynx(24,26),s.YNc(25,hl,2,1,"td",27),s.BQk(),s.YNc(26,gl,1,3,"tr",28),s.YNc(27,fl,1,0,"tr",29),s.YNc(28,xl,1,0,"tr",30),s.qZA(),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("dataSource",t.forwardingHistoryEvents),s.xp6(25),s.Q6J("matFooterRowDef",s.DdM(5,Zl)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns)}}const Al=function(t){return{"error-border":t,"padding-gap-x":!0}};let wl=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.commonService=e,this.store=n,this.datePipe=i,this.eventsData=[],this.filterValue="",this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","actions"]):this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","fee","actions"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","amountOut","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","fromChannelAlias","toChannelAlias","amountIn","amountOut","fee","actions"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.eventsData=t.payments&&t.payments.relayed?t.payments.relayed:[],this.eventsData.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.eventsData),this.logger.info(this.eventsData))})}ngAfterViewInit(){this.eventsData.length>0&&this.loadForwardingEventsTable(this.eventsData)}ngOnChanges(t){t.eventsData&&(this.eventsData=t.eventsData.currentValue,t.eventsData.firstChange||this.loadForwardingEventsTable(this.eventsData)),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,e){const n=[[{key:"paymentHash",value:t.paymentHash,title:"Payment Hash",width:100,type:f.Gi.STRING}],[{key:"timestamp",value:Math.round(t.timestamp/1e3),title:"Date/Time",width:50,type:f.Gi.DATE_TIME},{key:"fee",value:t.amountIn-t.amountOut,title:"Fee Earned (Sats)",width:50,type:f.Gi.NUMBER}],[{key:"amountIn",value:t.amountIn,title:"Amount In (Sats)",width:50,type:f.Gi.NUMBER},{key:"amountOut",value:t.amountOut,title:"Amount Out (Sats)",width:50,type:f.Gi.NUMBER}],[{key:"fromChannelAlias",value:t.fromChannelAlias,title:"From Channel Alias",width:50,type:f.Gi.STRING},{key:"fromShortChannelId",value:t.fromShortChannelId,title:"From Short Channel ID",width:50,type:f.Gi.STRING}],[{key:"fromChannelId",value:t.fromChannelId,title:"From Channel Id",width:100,type:f.Gi.STRING}],[{key:"toChannelAlias",value:t.toChannelAlias,title:"To Channel Alias",width:50,type:f.Gi.STRING},{key:"toShortChannelId",value:t.toShortChannelId,title:"To Short Channel ID",width:50,type:f.Gi.STRING}],[{key:"toChannelId",value:t.toChannelId,title:"To Channel Id",width:100,type:f.Gi.STRING}]];this.store.dispatch(new st.wu({data:{type:f.n_.INFORMATION,alertTitle:"Event Information",message:n}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new at.by([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(t,e)=>{switch(e){case"fee":return t.amountIn-t.amountOut;default:return t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}},this.forwardingHistoryEvents.filterPredicate=(t,e)=>((t.timestamp?this.datePipe.transform(new Date(t.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(t).toLowerCase()).includes(e),this.forwardingHistoryEvents.paginator=this.paginator,this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(i.uU))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(nt.NW,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sort=t.first),s.iGM(t=s.CRH())&&(e.paginator=t.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Events")}]),s.TTD],decls:5,vars:9,consts:[["fxLayout","column","fxLayoutAlign","start stretch",3,"ngClass"],["class","p-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[1,"p-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromChannelAlias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","toChannelAlias"],["matColumnDef","amountIn"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amountOut"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["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"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["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(t,e){1&t&&(s.TgZ(0,"div",0),s.YNc(1,$s,2,1,"div",1),s.YNc(2,Xs,4,1,"div",2),s.YNc(3,yl,29,6,"div",3),s._UZ(4,"mat-paginator",4),s.qZA()),2&t&&(s.Q6J("ngClass",s.VKq(7,Al,""!==e.errorMessage)),s.xp6(1),s.Q6J("ngIf",""!==e.errorMessage),s.xp6(1),s.Q6J("ngIf",""===e.errorMessage),s.xp6(1),s.Q6J("ngIf",""===e.errorMessage),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[l.xw,l.Wh,i.mk,L.oO,i.O5,nt.NW,l.yH,I.KE,rt.Nt,lt.Fj,lt.JJ,lt.On,Y.$V,at.BZ,it.YE,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,at.ge,it.nU,at.ev,i.PC,L.Zl,dt.gD,dt.$L,mt.ey,b.lW,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.uU,i.JJ],styles:[".mat-column-fromAlias[_ngcontent-%COMP%]{padding-left:2rem}.mat-column-fromAlias[_ngcontent-%COMP%], .mat-column-toAlias[_ngcontent-%COMP%]{flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-toAlias[_ngcontent-%COMP%]{padding-left:1rem}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();const Tl=["tableOut"],vl=["paginatorIn"],ql=["paginatorOut"];function Cl(t,e){if(1&t&&(s.TgZ(0,"div",3),s._uU(1),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Oqu(t.errorMessage)}}function bl(t,e){1&t&&(s.TgZ(0,"th",35),s._uU(1,"Channel ID"),s.qZA())}const Sl=function(t){return{"max-width":t}};function Ll(t,e){if(1&t&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("ngStyle",s.VKq(2,Sl,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),s.xp6(1),s.Oqu(t.channelId)}}function Fl(t,e){1&t&&(s.TgZ(0,"th",35),s._uU(1,"Peer Alias"),s.qZA())}function _l(t,e){if(1&t&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("ngStyle",s.VKq(2,Sl,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),s.xp6(1),s.Oqu(t.alias)}}function kl(t,e){1&t&&(s.TgZ(0,"th",37),s._uU(1,"Events"),s.qZA())}function Nl(t,e){if(1&t&&(s.TgZ(0,"td",38),s.TgZ(1,"span",39),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.events))}}function Ul(t,e){1&t&&(s.TgZ(0,"th",37),s._uU(1,"Amount (Sats)"),s.qZA())}function Dl(t,e){if(1&t&&(s.TgZ(0,"td",38),s.TgZ(1,"span",39),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.totalAmount))}}function Il(t,e){1&t&&(s.TgZ(0,"th",37),s._uU(1,"Fee (Sats)"),s.qZA())}function Ol(t,e){if(1&t&&(s.TgZ(0,"td",38),s.TgZ(1,"span",39),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.totalFee))}}function Jl(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No incoming routing peer available."),s.qZA())}function Yl(t,e){if(1&t&&(s.TgZ(0,"td",40),s.YNc(1,Jl,2,0,"p",41),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)}}const Pl=function(t){return{"display-none":t}};function Rl(t,e){if(1&t&&s._UZ(0,"tr",42),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Pl,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function Ml(t,e){1&t&&s._UZ(0,"tr",43)}function Ql(t,e){1&t&&s._UZ(0,"tr",44)}function El(t,e){1&t&&(s.TgZ(0,"th",35),s._uU(1,"Channel ID"),s.qZA())}function Bl(t,e){if(1&t&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("ngStyle",s.VKq(2,Sl,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),s.xp6(1),s.Oqu(t.channelId)}}function Hl(t,e){1&t&&(s.TgZ(0,"th",35),s._uU(1,"Peer Alias"),s.qZA())}function zl(t,e){if(1&t&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&t){const t=e.$implicit,n=s.oxw(2);s.Q6J("ngStyle",s.VKq(2,Sl,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),s.xp6(1),s.Oqu(t.alias)}}function Vl(t,e){1&t&&(s.TgZ(0,"th",37),s._uU(1,"Events"),s.qZA())}function Gl(t,e){if(1&t&&(s.TgZ(0,"td",38),s.TgZ(1,"span",39),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.events))}}function $l(t,e){1&t&&(s.TgZ(0,"th",37),s._uU(1,"Amount (Sats)"),s.qZA())}function Xl(t,e){if(1&t&&(s.TgZ(0,"td",38),s.TgZ(1,"span",39),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.totalAmount))}}function Wl(t,e){1&t&&(s.TgZ(0,"th",37),s._uU(1,"Fee (Sats)"),s.qZA())}function Kl(t,e){if(1&t&&(s.TgZ(0,"td",38),s.TgZ(1,"span",39),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&t){const t=e.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,t.totalFee))}}function jl(t,e){1&t&&(s.TgZ(0,"p"),s._uU(1,"No outgoing routing peer available."),s.qZA())}function tr(t,e){if(1&t&&(s.TgZ(0,"td",40),s.YNc(1,jl,2,0,"p",41),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)}}function er(t,e){if(1&t&&s._UZ(0,"tr",42),2&t){const t=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Pl,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function nr(t,e){1&t&&s._UZ(0,"tr",43)}function ir(t,e){1&t&&s._UZ(0,"tr",44)}const ar=function(t,e){return{"mt-2":t,"mt-1":e}},or=function(){return["no_incoming_event"]},sr=function(t){return{"mt-2":t}},lr=function(){return["no_outgoing_event"]};function rr(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",4),s.TgZ(1,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"div",7),s._uU(4,"Incoming"),s.qZA(),s.TgZ(5,"mat-form-field",8),s.TgZ(6,"input",9),s.NdJ("keyup",function(e){return s.CHM(t),s.oxw().applyIncomingFilter(e.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",10),s.TgZ(8,"table",11,12),s.ynx(10,13),s.YNc(11,bl,2,0,"th",14),s.YNc(12,Ll,2,4,"td",15),s.BQk(),s.ynx(13,16),s.YNc(14,Fl,2,0,"th",14),s.YNc(15,_l,2,4,"td",15),s.BQk(),s.ynx(16,17),s.YNc(17,kl,2,0,"th",18),s.YNc(18,Nl,4,3,"td",19),s.BQk(),s.ynx(19,20),s.YNc(20,Ul,2,0,"th",18),s.YNc(21,Dl,4,3,"td",19),s.BQk(),s.ynx(22,21),s.YNc(23,Il,2,0,"th",18),s.YNc(24,Ol,4,3,"td",19),s.BQk(),s.ynx(25,22),s.YNc(26,Yl,2,1,"td",23),s.BQk(),s.YNc(27,Rl,1,3,"tr",24),s.YNc(28,Ml,1,0,"tr",25),s.YNc(29,Ql,1,0,"tr",26),s.qZA(),s.qZA(),s._UZ(30,"mat-paginator",27,28),s.qZA(),s.TgZ(32,"div",29),s.TgZ(33,"div",6),s.TgZ(34,"div",7),s._uU(35,"Outgoing"),s.qZA(),s.TgZ(36,"mat-form-field",8),s.TgZ(37,"input",9),s.NdJ("keyup",function(e){return s.CHM(t),s.oxw().applyOutgoingFilter(e.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(38,"div",30),s.TgZ(39,"table",31,32),s.ynx(41,13),s.YNc(42,El,2,0,"th",14),s.YNc(43,Bl,2,4,"td",15),s.BQk(),s.ynx(44,16),s.YNc(45,Hl,2,0,"th",14),s.YNc(46,zl,2,4,"td",15),s.BQk(),s.ynx(47,17),s.YNc(48,Vl,2,0,"th",18),s.YNc(49,Gl,4,3,"td",19),s.BQk(),s.ynx(50,20),s.YNc(51,$l,2,0,"th",18),s.YNc(52,Xl,4,3,"td",19),s.BQk(),s.ynx(53,21),s.YNc(54,Wl,2,0,"th",18),s.YNc(55,Kl,4,3,"td",19),s.BQk(),s.ynx(56,33),s.YNc(57,tr,2,1,"td",23),s.BQk(),s.YNc(58,er,1,3,"tr",24),s.YNc(59,nr,1,0,"tr",25),s.YNc(60,ir,1,0,"tr",26),s.qZA(),s._UZ(61,"mat-paginator",27,34),s.qZA(),s.qZA(),s.qZA()}if(2&t){const t=s.oxw();s.xp6(2),s.Q6J("ngClass",s.WLB(18,ar,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),s.xp6(6),s.Q6J("dataSource",t.RoutingPeersIncoming),s.xp6(19),s.Q6J("matFooterRowDef",s.DdM(21,or)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),s.xp6(3),s.Q6J("ngClass",s.VKq(22,sr,t.screenSize!==t.screenSizeEnum.LG)),s.xp6(6),s.Q6J("dataSource",t.RoutingPeersOutgoing),s.xp6(19),s.Q6J("matFooterRowDef",s.DdM(24,lr)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}const cr=function(t){return{"error-border":t,"padding-gap":!0}};let ur=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.commonService=e,this.store=n,this.actions$=i,this.routingPeersData=[],this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=f.IV,this.pageSizeOptions=f.TJ,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","totalFee"]):this.screenSize===f.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalFee"]):this.screenSize===f.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalAmount","totalFee"]):(this.flgSticky=!0,this.displayedColumns=["channelId","alias","events","totalAmount","totalFee"])}ngOnInit(){this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.routingPeersData=t.payments&&t.payments.relayed?t.payments.relayed:[],this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(t)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData)}loadRoutingPeersTable(t){if(t.length>0){const e=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new at.by(e[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(t,e)=>JSON.stringify(t).toLowerCase().includes(e),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new at.by(e[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(t,e)=>JSON.stringify(t).toLowerCase().includes(e),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new at.by([]),this.RoutingPeersOutgoing=new at.by([])}groupRoutingPeers(t){const e=[],n=[];return t.forEach(t=>{const i=e.find(e=>e.channelId===t.fromChannelId),a=n.find(e=>e.channelId===t.toChannelId);i?(i.events++,i.totalAmount=+i.totalAmount+ +t.amountIn,i.totalFee=t.amountIn-t.amountOut+ +i.totalFee):e.push({channelId:t.fromChannelId,alias:t.fromChannelAlias,events:1,totalAmount:+t.amountIn,totalFee:t.amountIn-t.amountOut}),a?(a.events++,a.totalAmount=+a.totalAmount+ +t.amountOut,a.totalFee=t.amountIn-t.amountOut+ +a.totalFee):n.push({channelId:t.toChannelId,alias:t.toChannelAlias,events:1,totalAmount:+t.amountOut,totalFee:t.amountIn-t.amountOut})}),[this.commonService.sortDescByKey(e,"totalFee"),this.commonService.sortDescByKey(n,"totalFee")]}applyIncomingFilter(t){this.RoutingPeersIncoming.filter=t.value.trim().toLowerCase()}applyOutgoingFilter(t){this.RoutingPeersOutgoing.filter=t.value.trim().toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(A.eX))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(t,e){if(1&t&&(s.Gf(it.YE,5),s.Gf(Tl,5,it.YE),s.Gf(vl,5),s.Gf(ql,5)),2&t){let t;s.iGM(t=s.CRH())&&(e.sortIn=t.first),s.iGM(t=s.CRH())&&(e.sortOut=t.first),s.iGM(t=s.CRH())&&(e.paginatorIn=t.first),s.iGM(t=s.CRH())&&(e.paginatorOut=t.first)}},features:[s._Bn([{provide:nt.ye,useValue:(0,f.pt)("Peers")}])],decls:3,vars:5,consts:[["fxLayout","column","fxLayoutAlign","start stretch",3,"ngClass"],["class","p-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container",4,"ngIf"],[1,"p-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start end",1,"mb-6"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start start","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","","fxFlex","100",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalAmount"],["matColumnDef","totalFee"],["matColumnDef","no_incoming_event"],["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"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start"],["fxLayout","row wrap","fxLayoutAlign","end start","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","","fxFlex","100",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.YNc(1,Cl,2,1,"div",1),s.YNc(2,rr,63,25,"div",2),s.qZA()),2&t&&(s.Q6J("ngClass",s.VKq(3,cr,""!==e.errorMessage)),s.xp6(1),s.Q6J("ngIf",""!==e.errorMessage),s.xp6(1),s.Q6J("ngIf",""===e.errorMessage))},directives:[l.xw,l.Wh,i.mk,L.oO,i.O5,l.yH,I.KE,rt.Nt,Y.$V,at.BZ,it.YE,at.w1,at.fO,at.Dz,at.mD,at.Ke,at.as,at.nj,nt.NW,at.ge,it.nU,at.ev,i.PC,L.Zl,at.yh,at.Q2,at.XQ,at.Gk],pipes:[i.JJ],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-channelId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();function dr(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",7),s.NdJ("click",function(){const e=s.CHM(t).$implicit;return s.oxw().activeLink=e.link}),s._uU(1),s.qZA()}if(2&t){const t=e.$implicit,n=s.oxw();s.s9C("routerLink",t.link),s.Q6J("active",n.activeLink===t.link),s.xp6(1),s.Oqu(t.name)}}let mr=(()=>{class t{constructor(t){this.router=t,this.faChartBar=g.koM,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,m.R)(this.unSubs[0]),(0,h.h)(t=>t instanceof a.Av)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.F0))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"Reports"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s.TgZ(7,"nav",5),s.YNc(8,dr,2,3,"div",6),s.qZA(),s._UZ(9,"router-outlet"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(1),s.Q6J("icon",e.faChartBar),s.xp6(7),s.Q6J("ngForOf",e.links))},directives:[l.xw,l.Wh,T.BN,q.a8,q.dn,et.BU,i.sg,a.lC,et.Nj,a.rH],styles:[""]}),t})();var hr=n(4833),pr=n(4018),gr=n(1905);function fr(t,e){if(1&t&&(s.TgZ(0,"div",8),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&t){const t=s.oxw();s.Q6J("@fadeIn",t.totalFeeSat),s.xp6(1),s.AsE("",s.xi3(2,3,t.totalFeeSat||0,"1.0-2")," Sats/",s.lcZ(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function xr(t,e){1&t&&(s.TgZ(0,"div",9),s._uU(1,"No fee report for the selected period"),s.qZA())}function Zr(t,e){if(1&t&&(s.TgZ(0,"span"),s.TgZ(1,"span",12),s._uU(2),s.ALo(3,"number"),s.qZA(),s.TgZ(4,"span",12),s._uU(5),s.ALo(6,"number"),s.qZA(),s.qZA()),2&t){const t=e.model;s.xp6(2),s.hij("Events: ",s.lcZ(3,2,t.extra.totalEvents||0),""),s.xp6(3),s.hij("Fee: ",s.xi3(6,4,t.value||0,"1.0-2"),"")}}function yr(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"ngx-charts-bar-vertical",10),s.NdJ("select",function(e){return s.CHM(t),s.oxw().onChartBarSelected(e)})("mouseup",function(e){return s.CHM(t),s.oxw().onChartMouseUp(e)}),s.YNc(1,Zr,7,7,"ng-template",null,11,s.W1O),s.qZA()}if(2&t){const t=s.oxw();s.Q6J("view",t.view)("results",t.feeReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function Ar(t,e){if(1&t&&s._UZ(0,"rtl-ecl-forwarding-history",13),2&t){const t=s.oxw();s.Q6J("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let wr=(()=>{class t{constructor(t,e,n){this.logger=t,this.commonService=e,this.store=n,this.reportPeriod=f.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.totalFeeSat=null,this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.feeReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Fee (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===f.cu.XS||this.screenSize===f.cu.SM),this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.events=t.payments&&t.payments.relayed?t.payments.relayed:[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(t)})}ngAfterViewInit(){const t=this.commonService.getContainerSize();switch(this.screenSize){case f.cu.MD:this.screenPaddingX=t.width/10;break;case f.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2]}filterForwardingEvents(t,e){const n=Math.round(t.getTime()/1e3),i=Math.round(e.getTime()/1e3);this.logger.info("Filtering Forwarding Events Starting at "+new Date(Date.now()).toLocaleString()+" From "+t.toLocaleString()+" To "+e.toLocaleString()),this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeSat=null,this.events&&this.events.length>0&&(this.events.forEach(t=>{Math.floor(t.timestamp/1e3)>=n&&Math.floor(t.timestamp/1e3)<i&&this.filteredEventsBySelectedPeriod.push(t)}),this.feeReportData=this.prepareFeeReport(t)),this.logger.info("Filtering Forwarding Events Finished at "+new Date(Date.now()).toLocaleString())}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===f.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+f.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const e=Math.round(t.getTime()/1e3);let n=[];if(this.logger.info("Fee Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+t.toLocaleString()),this.reportPeriod===f.op[1]){for(let t=0;t<12;t++)n.push({name:f.gg[t].name,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(t=>{let e=new Date(t.timestamp).getMonth();n[e].value=n[e].value+(t.amountIn-t.amountOut),n[e].extra.totalEvents=n[e].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(t.amountIn-t.amountOut)})}else{for(let e=0;e<this.getMonthDays(t.getMonth(),t.getFullYear());e++)n.push({name:e+1,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(t=>{let i=Math.floor((Math.floor(t.timestamp/1e3)-e)/this.secondsInADay);n[i].value=n[i].value+(t.amountIn-t.amountOut),n[i].extra.totalEvents=n[i].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(t.amountIn-t.amountOut)})}return this.logger.info("Fee Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),n}onSelectionChange(t){const e=t.selDate.getMonth(),n=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===f.op[1]?(this.startDate=new Date(n,0,1,0,0,0),this.endDate=new Date(n,11,31,23,59,59)):(this.startDate=new Date(n,e,1,0,0,0),this.endDate=new Date(n,e,this.getMonthDays(e,n),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,e){return 1===t&&e%4==0?f.gg[t].days+1:f.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-fee-report"]],hostBindings:function(t,e){1&t&&s.NdJ("mouseup",function(t){return e.onChartMouseUp(t)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"rtl-horizontal-scroller",1),s.NdJ("stepChanged",function(t){return e.onSelectionChange(t)}),s.qZA(),s.TgZ(2,"div",2),s.YNc(3,fr,4,8,"div",3),s.YNc(4,xr,2,0,"div",4),s.TgZ(5,"div",5),s.YNc(6,yr,3,11,"ngx-charts-bar-vertical",6),s.qZA(),s.TgZ(7,"div",5),s.YNc(8,Ar,1,2,"rtl-ecl-forwarding-history",7),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(3),s.Q6J("ngIf",e.feeReportData.length>0&&e.filteredEventsBySelectedPeriod.length>0),s.xp6(1),s.Q6J("ngIf",e.feeReportData.length<=0||e.filteredEventsBySelectedPeriod.length<=0),s.xp6(2),s.Q6J("ngIf",e.feeReportData.length>0&&e.filteredEventsBySelectedPeriod.length>0),s.xp6(2),s.Q6J("ngIf",e.filteredEventsBySelectedPeriod.length>0))},directives:[l.xw,l.Wh,l.yH,pr.D,i.O5,gr.K$,wl],pipes:[i.JJ],styles:[""],data:{animation:[hr.J]}}),t})();var Tr=n(6590);function vr(t,e){if(1&t&&(s.TgZ(0,"div",10),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.AsE(" Paid ",s.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-2")," Sats/",s.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function qr(t,e){if(1&t&&(s.TgZ(0,"div",10),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&t){const t=s.oxw(2);s.xp6(1),s.AsE(" Received ",s.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-2")," Sats/",s.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Cr(t,e){if(1&t&&(s.TgZ(0,"div",8),s.YNc(1,vr,4,7,"div",9),s.YNc(2,qr,4,7,"div",9),s.qZA()),2&t){const t=s.oxw();s.Q6J("@fadeIn",t.transactionsReportSummary),s.xp6(1),s.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),s.xp6(1),s.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function br(t,e){1&t&&(s.TgZ(0,"div",11),s._uU(1,"No transactions report for the selected period"),s.qZA())}function Sr(t,e){if(1&t&&(s.TgZ(0,"span",14),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&t){const t=e.model;s.xp6(1),s.HOy("",t.name,": ",s.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",s.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function Lr(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"ngx-charts-bar-vertical-2d",12),s.NdJ("select",function(e){return s.CHM(t),s.oxw().onChartBarSelected(e)})("mouseup",function(e){return s.CHM(t),s.oxw().onChartMouseUp(e)}),s.YNc(1,Sr,4,9,"ng-template",null,13,s.W1O),s.qZA()}if(2&t){const t=s.oxw();s.Q6J("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:8)}}function Fr(t,e){if(1&t&&s._UZ(0,"rtl-transactions-report-table",15),2&t){const t=s.oxw();s.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let _r=(()=>{class t{constructor(t,e){this.commonService=t,this.store=e,this.scrollRanges=f.op,this.reportPeriod=f.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=f.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===f.cu.XS||this.screenSize===f.cu.SM),this.store.select("ecl").pipe((0,m.R)(this.unSubs[0])).subscribe(t=>{this.payments=t.payments.sent?t.payments.sent:[],this.invoices=t.invoices?t.invoices:[],(this.payments.length>0||this.invoices.length>0)&&(this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData())})}ngAfterViewInit(){const t=this.commonService.getContainerSize();switch(this.screenSize){case f.cu.MD:this.screenPaddingX=t.width/10;break;case f.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2]}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===f.op[1]?t.series.toString()+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+f.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,e){const n=Math.round(t.getTime()/1e3),i=Math.round(e.getTime()/1e3);let a=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};let o=this.payments.filter(t=>Math.floor(t.firstPartTimestamp/1e3)>=n&&Math.floor(t.firstPartTimestamp/1e3)<i),s=this.invoices.filter(t=>"received"===t.status&&t.timestamp>=n&&t.timestamp<i);if(this.transactionsReportSummary.paymentsSelectedPeriod=o.length,this.transactionsReportSummary.invoicesSelectedPeriod=s.length,this.reportPeriod===f.op[1]){for(let e=0;e<12;e++)a.push({name:f.gg[e].name,date:new Date(t.getFullYear(),e,1,0,0,0,0),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});o.map(t=>{let e=new Date(t.firstPartTimestamp).getMonth();this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+t.recipientAmount,a[e].series[0].value=a[e].series[0].value+t.recipientAmount,a[e].series[0].extra.total=a[e].series[0].extra.total+1}),s.map(t=>{let e=new Date(1e3*t.timestamp).getMonth();this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+t.amountSettled,a[e].series[1].value=a[e].series[1].value+t.amountSettled,a[e].series[1].extra.total=a[e].series[1].extra.total+1})}else{for(let e=0;e<this.getMonthDays(t.getMonth(),t.getFullYear());e++)a.push({name:(e+1).toString(),date:new Date(1e3*(e*this.secondsInADay+n)),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});o.map(t=>{let e=Math.floor((Math.floor(t.firstPartTimestamp/1e3)-n)/this.secondsInADay);this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+t.recipientAmount,a[e].series[0].value=a[e].series[0].value+t.recipientAmount,a[e].series[0].extra.total=a[e].series[0].extra.total+1}),s.map(t=>{let e=Math.floor((t.timestamp-n)/this.secondsInADay);this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+t.amountSettled,a[e].series[1].value=a[e].series[1].value+t.amountSettled,a[e].series[1].extra.total=a[e].series[1].extra.total+1})}return a}prepareTableData(){return this.transactionsReportData.reduce((t,e)=>e.series[0].extra.total>0||e.series[1].extra.total>0?t.concat({date:e.date,amount_paid:e.series[0].value,num_payments:e.series[0].extra.total,amount_received:e.series[1].value,num_invoices:e.series[1].extra.total}):t,[])}onSelectionChange(t){const e=t.selDate.getMonth(),n=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===f.op[1]?(this.startDate=new Date(n,0,1,0,0,0),this.endDate=new Date(n,11,31,23,59,59)):(this.startDate=new Date(n,e,1,0,0,0),this.endDate=new Date(n,e,this.getMonthDays(e,n),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,e){return 1===t&&e%4==0?f.gg[t].days+1:f.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(w.v),s.Y36(y.yh))},t.\u0275cmp=s.Xpm({type:t,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(t,e){1&t&&s.NdJ("mouseup",function(t){return e.onChartMouseUp(t)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"rtl-horizontal-scroller",1),s.NdJ("stepChanged",function(t){return e.onSelectionChange(t)}),s.qZA(),s.TgZ(2,"div",2),s.YNc(3,Cr,3,3,"div",3),s.YNc(4,br,2,0,"div",4),s.TgZ(5,"div",5),s.YNc(6,Lr,3,13,"ngx-charts-bar-vertical-2d",6),s.qZA(),s.TgZ(7,"div",5),s.YNc(8,Fr,1,3,"rtl-transactions-report-table",7),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(3),s.Q6J("ngIf",e.transactionsNonZeroReportData.length>0),s.xp6(1),s.Q6J("ngIf",e.transactionsNonZeroReportData.length<=0),s.xp6(2),s.Q6J("ngIf",e.transactionsNonZeroReportData.length>0),s.xp6(2),s.Q6J("ngIf",e.transactionsNonZeroReportData.length>0))},directives:[l.xw,l.Wh,l.yH,pr.D,i.O5,gr.H5,Tr.g],pipes:[i.JJ],styles:[""],data:{animation:[hr.J]}}),t})();var kr=n(6013),Nr=n(8016);const Ur=a.Bz.forChild([{path:"",component:u,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:kn,canActivate:[kr.fY]},{path:"onchain",component:mi,canActivate:[kr.fY],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:Bi,canActivate:[kr.fY]},{path:"send",component:Hi,canActivate:[kr.fY]}]},{path:"connections",component:fi,canActivate:[kr.fY],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:ha,canActivate:[kr.fY],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:to,canActivate:[kr.fY]},{path:"pending",component:wo,canActivate:[kr.fY]},{path:"inactive",component:Gs,canActivate:[kr.fY]}]},{path:"peers",component:ls,data:{sweepAll:!1},canActivate:[kr.fY]}]},{path:"transactions",component:Zi,canActivate:[kr.fY],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:sn,canActivate:[kr.fY]},{path:"invoices",component:Wt,canActivate:[kr.fY]},{path:"queryroutes",component:ws,canActivate:[kr.fY]}]},{path:"routing",component:Ai,canActivate:[kr.fY],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:wl,canActivate:[kr.fY]},{path:"peers",component:ur,canActivate:[kr.fY]}]},{path:"reports",component:mr,canActivate:[kr.fY],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:wr,canActivate:[kr.fY]},{path:"transactions",component:_r,canActivate:[kr.fY]}]},{path:"lookups",component:Qi,canActivate:[kr.fY]},{path:"**",component:Nr.w}]}]);var Dr=n(253);let Ir=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t,bootstrap:[u]}),t.\u0275inj=s.cJS({providers:[kr.fY],imports:[[i.ez,Dr.m,Ur]]}),t})()}}]);