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/5.3593974ed7a18cef9807.js

1 line
309 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{Ssnv:function(t,e,n){"use strict";n.r(e),n.d(e,"CLModule",function(){return Qr});var i=n("SVse"),a=n("iInd"),o=n("8Y7J"),s=n("BTe0");function c(t,e){1&t&&o.Qb(0,"mat-progress-bar",2)}function l(t,e){1&t&&o.Qb(0,"router-outlet")}let r=(()=>{class t{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(t=>{switch(!0){case t instanceof a.e:this.loading=!0;break;case t instanceof a.c:case t instanceof a.b:case t instanceof a.d:this.loading=!1}})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-root"]],decls:2,vars:2,consts:[["color","primary","mode","indeterminate",4,"ngIf"],[4,"ngIf"],["color","primary","mode","indeterminate"]],template:function(t,e){1&t&&(o.Ic(0,c,1,0,"mat-progress-bar",0),o.Ic(1,l,1,0,"router-outlet",1)),2&t&&(o.oc("ngIf",e.loading),o.Db(1),o.oc("ngIf",!e.loading))},directives:[i.o,s.a,a.l],styles:[""]}),t})();var b=n("XNiG"),d=n("1G5W"),u=n("pLZG"),h=n("twK/"),m=n("wHSu"),f=n("7nzP"),p=n("LvnZ"),g=n("cpEJ"),y=n("tqRt"),v=n("7bNT"),x=n("7o2P"),w=n("VDRc"),V=n("Nv++"),U=n("40+f"),D=n("PDjf"),C=n("rJgo"),S=n("Dxy4"),L=n("Tj54"),I=n("ura0");const F=function(t){return{backgroundColor:t}};function k(t,e){if(1&t&&o.Qb(0,"span",6),2&t){const t=o.hc();o.oc("ngStyle",o.sc(1,F,"#"+t.information.color))}}function A(t,e){if(1&t&&(o.Vb(0,"div"),o.Vb(1,"h4",1),o.Kc(2,"Color"),o.Ub(),o.Vb(3,"div",2),o.Qb(4,"span",7),o.Kc(5),o.ic(6,"uppercase"),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(4),o.oc("ngStyle",o.sc(4,F,"#"+t.information.color)),o.Db(1),o.Mc(" ",o.jc(6,2,t.information.color)," ")}}function _(t,e){if(1&t&&(o.Vb(0,"span",2),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t)}}let P=(()=>{class t{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain)+" "+this.commonService.titleCase(t.network))}))}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[o.Bb],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&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Alias"),o.Ub(),o.Vb(4,"div",2),o.Kc(5),o.Ic(6,k,1,3,"span",3),o.Ub(),o.Ub(),o.Ic(7,A,7,6,"div",4),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"Implementation"),o.Ub(),o.Vb(11,"div",2),o.Kc(12),o.Ub(),o.Ub(),o.Vb(13,"div"),o.Vb(14,"h4",1),o.Kc(15,"Chain"),o.Ub(),o.Ic(16,_,2,1,"span",5),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.Mc(" ",e.information.alias," "),o.Db(1),o.oc("ngIf",!e.showColorFieldSeparately),o.Db(1),o.oc("ngIf",e.showColorFieldSeparately),o.Db(5),o.Lc(e.information.lnImplementation||e.information.version?e.information.lnImplementation+" "+e.information.version:""),o.Db(4),o.oc("ngForOf",e.chains))},directives:[w.c,w.a,w.b,i.o,i.n,i.p,I.b],pipes:[i.y],styles:[""]}),t})(),T=(()=>{class t{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Lightning"),o.Ub(),o.Vb(4,"div",2),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Qb(7,"mat-progress-bar",3),o.Ub(),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"On-chain"),o.Ub(),o.Vb(11,"div",2),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Qb(14,"mat-progress-bar",3),o.Ub(),o.Vb(15,"div"),o.Vb(16,"h4",1),o.Kc(17,"Total"),o.Ub(),o.Vb(18,"div",2),o.Kc(19),o.ic(20,"number"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.Mc("",o.jc(6,5,e.balances.lightning)," Sats"),o.Db(2),o.pc("value",e.balances.lightning/e.balances.total*100),o.Db(5),o.Mc("",o.jc(13,7,e.balances.onchain)," Sats"),o.Db(2),o.pc("value",e.balances.onchain/e.balances.total*100),o.Db(5),o.Mc("",o.jc(20,9,e.balances.total)," Sats"))},directives:[w.c,w.a,w.b,s.a],pipes:[i.f],styles:[""]}),t})();var K=n("Q2Ze"),R=n("ZFy/"),M=n("BSbQ"),O=n("aLe/");function E(t,e){if(1&t&&(o.Vb(0,"div",17),o.Vb(1,"span",18),o.Kc(2),o.ic(3,"slice"),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-hint",19),o.Vb(6,"strong",5),o.Kc(7,"Local:"),o.Ub(),o.Kc(8),o.ic(9,"number"),o.Ub(),o.Vb(10,"mat-hint",20),o.Qb(11,"fa-icon",21),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Vb(14,"mat-hint",22),o.Vb(15,"strong",5),o.Kc(16,"Remote:"),o.Ub(),o.Kc(17),o.ic(18,"number"),o.Ub(),o.Ub(),o.Qb(19,"mat-progress-bar",23),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.pc("matTooltip",t.alias||t.id),o.pc("matTooltipDisabled",(t.alias||t.id).length<26),o.Db(1),o.Nc("",o.lc(3,9,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":"",""),o.Db(6),o.Mc("",o.kc(9,13,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),o.Db(3),o.oc("icon",n.faBalanceScale),o.Db(1),o.Mc(" (",o.jc(13,16,t.balancedness||0),") "),o.Db(5),o.Mc("",o.kc(18,18,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),o.Db(2),o.pc("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function z(t,e){if(1&t&&(o.Vb(0,"div",15),o.Ic(1,E,20,21,"div",16),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngForOf",t.allChannels)}}function B(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",24),o.Kc(1," No channels available. "),o.Vb(2,"button",25),o.dc("click",function(){return o.zc(t),o.hc().goToChannels()}),o.Kc(3,"Open Channel"),o.Ub(),o.Ub()}}let N=(()=>{class t{constructor(t){this.router=t,this.faBalanceScale=m.d,this.faDumbbell=m.l,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"span",2),o.Kc(3,"Total Capacity"),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-hint",4),o.Vb(6,"strong",5),o.Kc(7,"Local:"),o.Ub(),o.Kc(8),o.ic(9,"number"),o.Ub(),o.Vb(10,"mat-hint",6),o.Qb(11,"fa-icon",7),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Vb(14,"mat-hint",8),o.Vb(15,"strong",5),o.Kc(16,"Remote:"),o.Ub(),o.Kc(17),o.ic(18,"number"),o.Ub(),o.Ub(),o.Qb(19,"mat-progress-bar",9),o.Ub(),o.Vb(20,"div",10),o.Qb(21,"mat-divider",11),o.Ub(),o.Vb(22,"div",12),o.Ic(23,z,2,1,"div",13),o.Ub(),o.Ub(),o.Ic(24,B,4,0,"ng-template",null,14,o.Jc)),2&t){const t=o.wc(25);o.Db(8),o.Mc("",o.kc(9,7,e.channelBalances.localBalance||0,"1.0-0")," Sats"),o.Db(3),o.oc("icon",e.faBalanceScale),o.Db(1),o.Mc(" (",o.jc(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),o.Db(5),o.Mc("",o.kc(18,12,e.channelBalances.remoteBalance||0,"1.0-0")," Sats"),o.Db(2),o.pc("value",e.channelBalances.localBalance&&e.channelBalances.localBalance>0?+e.channelBalances.localBalance/(+e.channelBalances.localBalance+ +e.channelBalances.remoteBalance)*100:0),o.Db(4),o.oc("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",t)}},directives:[w.c,w.b,w.a,K.f,V.a,R.a,s.a,M.a,O.b,i.o,i.n,S.a],pipes:[i.f,i.w],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),t})(),q=(()=>{class t{constructor(){this.totalFees=[{name:"Total",value:0}]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-fee-info"]],inputs:{fees:"fees"},decls:14,vars:6,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&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Total"),o.Ub(),o.Vb(4,"div",2),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Ub(),o.Ub(),o.Vb(7,"div",0),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"Transactions"),o.Ub(),o.Vb(11,"div",2),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.Mc("",o.jc(6,2,(null==e.fees?null:e.fees.feeCollected)/1e3)," Sats"),o.Db(7),o.Lc(o.jc(13,4,null==e.fees?null:e.fees.totalTxCount)))},directives:[w.c,w.a,w.b],pipes:[i.f],styles:[""]}),t})(),Q=(()=>{class t{constructor(){this.channelsStatus={}}ngOnChanges(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus"},features:[o.Bb],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&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Active"),o.Ub(),o.Vb(4,"div",2),o.Qb(5,"span",3),o.Kc(6),o.ic(7,"number"),o.Ub(),o.Ub(),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"Pending"),o.Ub(),o.Vb(11,"div",2),o.Qb(12,"span",4),o.Kc(13),o.ic(14,"number"),o.Ub(),o.Ub(),o.Vb(15,"div"),o.Vb(16,"h4",1),o.Kc(17,"Inactive"),o.Ub(),o.Vb(18,"div",2),o.Qb(19,"span",5),o.Kc(20),o.ic(21,"number"),o.Ub(),o.Ub(),o.Ub(),o.Vb(22,"div",0),o.Vb(23,"div"),o.Vb(24,"h4",1),o.Kc(25,"Capacity"),o.Ub(),o.Vb(26,"div",2),o.Kc(27),o.ic(28,"number"),o.Ub(),o.Ub(),o.Vb(29,"div"),o.Vb(30,"h4",1),o.Kc(31,"Capacity"),o.Ub(),o.Vb(32,"div",2),o.Kc(33),o.ic(34,"number"),o.Ub(),o.Ub(),o.Vb(35,"div"),o.Vb(36,"h4",1),o.Kc(37,"Capacity"),o.Ub(),o.Vb(38,"div",2),o.Kc(39),o.ic(40,"number"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(6),o.Lc(o.jc(7,6,e.channelsStatus.active.channels||0)),o.Db(7),o.Lc(o.jc(14,8,e.channelsStatus.pending.channels||0)),o.Db(7),o.Lc(o.jc(21,10,e.channelsStatus.inactive.channels||0)),o.Db(7),o.Mc("",o.jc(28,12,e.channelsStatus.active.capacity||0)," Sats"),o.Db(6),o.Mc("",o.jc(34,14,e.channelsStatus.pending.capacity||0)," Sats"),o.Db(6),o.Mc("",o.jc(40,16,e.channelsStatus.inactive.capacity||0)," Sats"))},directives:[w.c,w.a,w.b],pipes:[i.f],styles:[""]}),t})();function H(t,e){if(1&t&&(o.Vb(0,"mat-hint",17),o.Vb(1,"strong",18),o.Kc(2,"Capacity: "),o.Ub(),o.Kc(3),o.ic(4,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(3),o.Mc("",o.kc(4,1,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function j(t,e){if(1&t&&(o.Vb(0,"mat-hint",17),o.Vb(1,"strong",18),o.Kc(2,"Capacity: "),o.Ub(),o.Kc(3),o.ic(4,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(3),o.Mc("",o.kc(4,1,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function $(t,e){if(1&t&&o.Qb(0,"mat-progress-bar",19),2&t){const t=o.hc().$implicit,e=o.hc(2);o.pc("value",e.totalLiquidity>0?(+t.msatoshi_to_them/1e3||0)/e.totalLiquidity*100:0)}}function G(t,e){if(1&t&&o.Qb(0,"mat-progress-bar",19),2&t){const t=o.hc().$implicit,e=o.hc(2);o.pc("value",e.totalLiquidity>0?(+t.msatoshi_to_us/1e3||0)/e.totalLiquidity*100:0)}}function X(t,e){if(1&t&&(o.Vb(0,"div",12),o.Vb(1,"span",13),o.Kc(2),o.ic(3,"slice"),o.Ub(),o.Vb(4,"div",14),o.Ic(5,H,5,4,"mat-hint",15),o.Ic(6,j,5,4,"mat-hint",15),o.Ub(),o.Ic(7,$,1,1,"mat-progress-bar",16),o.Ic(8,G,1,1,"mat-progress-bar",16),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.pc("matTooltip",t.alias||t.id),o.pc("matTooltipDisabled",(t.alias||t.id).length<26),o.Db(1),o.Nc("",o.lc(3,8,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":"",""),o.Db(3),o.oc("ngIf","In"===n.direction),o.Db(1),o.oc("ngIf","Out"===n.direction),o.Db(1),o.oc("ngIf","In"===n.direction),o.Db(1),o.oc("ngIf","Out"===n.direction)}}function W(t,e){if(1&t&&(o.Vb(0,"div",10),o.Ic(1,X,9,12,"div",11),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngForOf",t.allChannels)}}function J(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",22),o.dc("click",function(){return o.zc(t),o.hc(2).goToChannels()}),o.Kc(1,"Open Channel"),o.Ub()}}function Y(t,e){if(1&t&&(o.Vb(0,"div",20),o.Kc(1," No channels available. "),o.Ic(2,J,2,0,"button",21),o.Ub()),2&t){const t=o.hc();o.Db(2),o.oc("ngIf","Out"===t.direction)}}const Z=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.q}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(a.g),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"span",2),o.Kc(3,"Total Capacity"),o.Ub(),o.Vb(4,"mat-hint",3),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Qb(7,"mat-progress-bar",4),o.Ub(),o.Vb(8,"div",5),o.Qb(9,"mat-divider",6),o.Ub(),o.Vb(10,"div",7),o.Ic(11,W,2,1,"div",8),o.Ub(),o.Ub(),o.Ic(12,Y,3,1,"ng-template",null,9,o.Jc)),2&t){const t=o.wc(13);o.oc("ngClass",o.uc(7,Z,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)),o.Db(5),o.Mc("",o.kc(6,4,e.totalLiquidity,"1.0-0")," Sats"),o.Db(6),o.oc("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",t)}},directives:[w.c,w.b,w.a,i.m,I.a,K.f,s.a,M.a,O.b,i.o,i.n,R.a,S.a],pipes:[i.f,i.w],styles:[""]}),t})();var et=n("M9ds"),nt=n("5QHs"),it=n("LUZP"),at=n("OaSA"),ot=n("iELJ"),st=n("/uX3"),ct=n("s7LF"),lt=n("e6WT"),rt=n("O4ig"),bt=n("B0X+"),dt=n("ZTz/"),ut=n("jMqV"),ht=n("UhP/");function mt(t,e){if(1&t&&(o.Vb(0,"mat-option",26),o.Kc(1),o.ic(2,"titlecase"),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Lc(o.jc(2,2,t))}}function ft(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.invoiceError)}}function pt(t,e){if(1&t&&(o.Vb(0,"div",27),o.Qb(1,"fa-icon",28),o.Ic(2,ft,2,1,"span",29),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.invoiceError)}}let gt=(()=>{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=m.o,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=f.n,this.timeUnitEnum=f.v,this.timeUnits=f.t,this.selTimeUnit=f.v.SECS,this.invoiceError="",this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.o||t.type===p.v)).subscribe(t=>{t.type===p.v&&this.dialogRef.close(),t.type===p.o&&"SaveNewInvoice"===t.payload.action&&(this.invoiceError=t.payload.message)})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let e=this.expiry?this.expiry:3600;this.selTimeUnit!==f.v.SECS&&(e=this.commonService.convertTime(this.expiry,this.selTimeUnit,f.v.SECS)),this.store.dispatch(new st.F("Adding Invoice...")),this.store.dispatch(new p.xb({label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:e,private:this.private}))}resetData(){this.description="",this.invoiceValue=void 0,this.private=!1,this.expiry=void 0,this.invoiceValueHint="",this.selTimeUnit=f.v.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[2])).subscribe(t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,f.f.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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(y.h),o.Pb(i.f),o.Pb(x.a),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-create-invoices"]],decls:37,vars:18,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["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,"mt-5px"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","matTooltip","Include routing hints for private channels","name","private",3,"ngModel","matTooltipPosition","ngModelChange"],["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"],[4,"ngIf"]],template:function(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Create Invoice"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"form",7,8),o.Vb(11,"mat-form-field",9),o.Vb(12,"input",10),o.dc("ngModelChange",function(t){return e.description=t}),o.Ub(),o.Ub(),o.Vb(13,"div",11),o.Vb(14,"mat-form-field",12),o.Vb(15,"input",13),o.dc("ngModelChange",function(t){return e.invoiceValue=t})("keyup",function(){return e.onInvoiceValueChange()}),o.Ub(),o.Vb(16,"span",14),o.Kc(17),o.Ub(),o.Vb(18,"mat-hint"),o.Kc(19),o.Ub(),o.Ub(),o.Vb(20,"mat-form-field",15),o.Vb(21,"input",16),o.dc("ngModelChange",function(t){return e.expiry=t}),o.Ub(),o.Vb(22,"span",14),o.Kc(23),o.ic(24,"titlecase"),o.Ub(),o.Ub(),o.Vb(25,"mat-form-field",17),o.Vb(26,"mat-select",18),o.dc("selectionChange",function(t){return e.onTimeUnitChange(t)}),o.Ic(27,mt,3,4,"mat-option",19),o.Ub(),o.Ub(),o.Ub(),o.Vb(28,"div",20),o.Vb(29,"mat-slide-toggle",21),o.dc("ngModelChange",function(t){return e.private=t}),o.Kc(30,"Private Routing Hints"),o.Ub(),o.Ub(),o.Ic(31,pt,3,2,"div",22),o.Vb(32,"div",23),o.Vb(33,"button",24),o.dc("click",function(){return e.resetData()}),o.Kc(34,"Clear Field"),o.Ub(),o.Vb(35,"button",25),o.dc("click",function(){o.zc(t);const n=o.wc(10);return e.onAddInvoice(n)}),o.Kc(36,"Create Invoice"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()}2&t&&(o.Db(6),o.oc("mat-dialog-close",!1),o.Db(6),o.oc("ngModel",e.description),o.Db(3),o.oc("ngModel",e.invoiceValue)("step",100)("min",1),o.Db(2),o.Mc(" ",null==e.information?null:e.information.smaller_currency_unit," "),o.Db(2),o.Lc(e.invoiceValueHint),o.Db(2),o.oc("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),o.Db(2),o.Mc(" ",o.jc(24,16,e.selTimeUnit)," "),o.Db(3),o.oc("value",e.selTimeUnit),o.Db(1),o.oc("ngForOf",e.timeUnits),o.Db(2),o.oc("ngModel",e.private)("matTooltipPosition","above"),o.Db(2),o.oc("ngIf",""!==e.invoiceError))},directives:[w.c,w.a,D.c,w.b,S.a,ot.d,D.b,ct.u,ct.n,ct.o,K.c,lt.b,ct.c,rt.a,ct.m,ct.p,ct.q,bt.a,K.g,K.f,dt.a,i.n,ut.a,R.a,i.o,ht.m,V.a],pipes:[i.x],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();var yt=n("4r19"),vt=n("mNcL"),xt=n("X9mX");function wt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"form",4,5),o.Vb(2,"mat-form-field",6),o.Vb(3,"input",7),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().description=e}),o.Ub(),o.Ub(),o.Vb(4,"mat-form-field",8),o.Vb(5,"input",9),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().invoiceValue=e})("keyup",function(){return o.zc(t),o.hc().onInvoiceValueChange()}),o.Ub(),o.Vb(6,"span",10),o.Kc(7),o.Ub(),o.Vb(8,"mat-hint"),o.Kc(9),o.Ub(),o.Ub(),o.Vb(10,"div",11),o.Vb(11,"button",12),o.dc("click",function(){return o.zc(t),o.hc().resetData()}),o.Kc(12,"Clear Field"),o.Ub(),o.Vb(13,"button",13),o.dc("click",function(){o.zc(t);const e=o.wc(1);return o.hc().onAddInvoice(e)}),o.Kc(14,"Create Invoice"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.description),o.Db(2),o.oc("ngModel",t.invoiceValue)("step",100)("min",1),o.Db(2),o.Mc(" ",null==t.information?null:t.information.smaller_currency_unit," "),o.Db(2),o.Lc(t.invoiceValueHint)}}function Vt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",14),o.Vb(1,"button",15),o.dc("click",function(){return o.zc(t),o.hc().onDeleteExpiredInvoices()}),o.Kc(2,"Delete Expired"),o.Ub(),o.Vb(3,"button",16),o.dc("click",function(){return o.zc(t),o.hc().openCreateInvoiceModal()}),o.Kc(4,"Create Invoice"),o.Ub(),o.Ub()}}function Ut(t,e){1&t&&o.Qb(0,"mat-progress-bar",45)}function Dt(t,e){1&t&&(o.Vb(0,"th",46),o.Kc(1," Expiry Date "),o.Ub())}const Ct=function(t){return{"mr-0":t}};function St(t,e){if(1&t&&o.Qb(0,"span",50),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ct,t.screenSize===t.screenSizeEnum.XS))}}function Lt(t,e){if(1&t&&o.Qb(0,"span",51),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ct,t.screenSize===t.screenSizeEnum.XS))}}function It(t,e){if(1&t&&(o.Vb(0,"td",47),o.Ic(1,St,1,3,"span",48),o.Ic(2,Lt,1,3,"span",49),o.Kc(3),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.oc("ngIf","paid"===t.status),o.Db(1),o.oc("ngIf","paid"!==t.status),o.Db(1),o.Mc(" ",t.expires_at_str," ")}}function Ft(t,e){1&t&&(o.Vb(0,"th",46),o.Kc(1," Date Settled "),o.Ub())}function kt(t,e){if(1&t&&(o.Vb(0,"td",47),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t.paid_at_str||"-")}}function At(t,e){1&t&&(o.Vb(0,"th",46),o.Kc(1," Description "),o.Ub())}const _t=function(t){return{"max-width":t}};function Pt(t,e){if(1&t&&(o.Vb(0,"td",47),o.Vb(1,"div",52),o.Vb(2,"span",53),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.oc("ngStyle",o.sc(2,_t,n.screenSize===n.screenSizeEnum.XS?"10rem":"32rem")),o.Db(2),o.Lc(t.description)}}function Tt(t,e){1&t&&(o.Vb(0,"th",54),o.Kc(1," Amount (Sats) "),o.Ub())}function Kt(t,e){if(1&t&&(o.Vb(0,"td",47),o.Vb(1,"span",55),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0"),"")}}function Rt(t,e){1&t&&(o.Vb(0,"th",54),o.Kc(1," Amount Settled (Sats) "),o.Ub())}function Mt(t,e){if(1&t&&(o.Vb(0,"td",47),o.Vb(1,"span",55),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,t.msatoshi_received/1e3,t.msatoshi_received<1e3?"1.0-4":"1.0-0"),"")}}function Ot(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",56),o.Vb(1,"div",57),o.Vb(2,"mat-select",58),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",59),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}const Et=function(t){return{"px-3":t}};function zt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",60),o.Vb(1,"button",61),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc(2).onInvoiceClick(i,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}if(2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Et,t.screenSize!==t.screenSizeEnum.XS))}}function Bt(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No invoices available."),o.Ub())}function Nt(t,e){if(1&t&&(o.Vb(0,"td",62),o.Ic(1,Bt,2,0,"p",63),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)}}const qt=function(t){return{"display-none":t}};function Qt(t,e){if(1&t&&o.Qb(0,"tr",64),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,qt,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function Ht(t,e){1&t&&o.Qb(0,"tr",65)}function jt(t,e){if(1&t&&o.Qb(0,"tr",66),2&t){const t=e.$implicit,n=o.hc(2);o.oc("@newlyAddedRowAnimation",t.label==n.newlyAddedInvoiceMemo&&t.value==n.newlyAddedInvoiceValue&&n.flgAnimate?"added":"notAdded")}}const $t=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Gt=function(){return["no_invoice"]};function Xt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",17),o.Vb(1,"div",18),o.Vb(2,"div",19),o.Qb(3,"fa-icon",20),o.Vb(4,"span",21),o.Kc(5,"Invoices History"),o.Ub(),o.Ub(),o.Vb(6,"mat-form-field",22),o.Vb(7,"input",23),o.dc("keyup",function(e){return o.zc(t),o.hc().applyFilter(e.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",24),o.Ic(9,Ut,1,0,"mat-progress-bar",25),o.Vb(10,"table",26,27),o.Tb(12,28),o.Ic(13,Dt,2,0,"th",29),o.Ic(14,It,4,3,"td",30),o.Sb(),o.Tb(15,31),o.Ic(16,Ft,2,0,"th",29),o.Ic(17,kt,2,1,"td",30),o.Sb(),o.Tb(18,32),o.Ic(19,At,2,0,"th",29),o.Ic(20,Pt,4,4,"td",30),o.Sb(),o.Tb(21,33),o.Ic(22,Tt,2,0,"th",34),o.Ic(23,Kt,4,4,"td",30),o.Sb(),o.Tb(24,35),o.Ic(25,Rt,2,0,"th",34),o.Ic(26,Mt,4,4,"td",30),o.Sb(),o.Tb(27,36),o.Ic(28,Ot,6,0,"th",37),o.Ic(29,zt,3,3,"td",38),o.Sb(),o.Tb(30,39),o.Ic(31,Nt,2,1,"td",40),o.Sb(),o.Ic(32,Qt,1,3,"tr",41),o.Ic(33,Ht,1,0,"tr",42),o.Ic(34,jt,1,1,"tr",43),o.Ub(),o.Ub(),o.Qb(35,"mat-paginator",44),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("icon",t.faHistory),o.Db(6),o.oc("ngIf",!0===t.flgLoading[0]),o.Db(1),o.oc("dataSource",t.invoices)("ngClass",o.sc(11,$t,"error"===t.flgLoading[0])),o.Db(22),o.oc("matFooterRowDef",o.rc(13,Gt)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns),o.Db(1),o.oc("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.rtlEffects=a,this.calledFrom="transactions",this.faHistory=m.r,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.private=!1,this.expiryStep=100,this.totalInvoices=100,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["expires_at","msatoshi","actions"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","actions"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","msatoshi_received","actions"]):(this.flgSticky=!0,this.displayedColumns=["expires_at","paid_at","description","msatoshi","msatoshi_received","actions"])}ngOnInit(){this.store.dispatch(new p.F({num_max_invoices:100,index_offset:0,reversed:!1})),this.store.select("cl").pipe(Object(d.a)(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.totalInvoices=t.totalInvoices,this.logger.info(t),this.invoiceJSONArr=t.invoices.invoices&&t.invoices.invoices.length>0?t.invoices.invoices:[],this.invoices=new at.o(t.invoices.invoices?[]:[...this.invoiceJSONArr]),this.invoices.data=this.invoiceJSONArr,this.invoices.sort=this.sort,this.invoices.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.invoices.paginator=this.paginator,setTimeout(()=>{this.flgAnimate=!1},5e3),this.logger.info(this.invoices),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.invoices)})}openCreateInvoiceModal(){this.store.dispatch(new st.C({data:{pageSize:this.pageSize,component:gt}}))}onAddInvoice(t){this.invoiceValue||(this.invoiceValue=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,this.store.dispatch(new st.F("Adding Invoice...")),this.store.dispatch(new p.xb({label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:e,private:this.private})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch(new st.D({data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{t&&(this.store.dispatch(new st.F("Deleting Invoices...")),this.store.dispatch(new p.m))})}onInvoiceClick(t,e){this.store.dispatch(new st.C({data:{invoice:{msatoshi:t.msatoshi,label:t.label,expires_at_str:t.expires_at_str,paid_at_str:t.paid_at_str,bolt11:t.bolt11,payment_hash:t.payment_hash,description:t.description,status:t.status,msatoshi_received:t.msatoshi_received},newlyAdded:!1,component:yt.a}}))}resetData(){this.description="",this.invoiceValue=void 0,this.private=!1,this.expiry=void 0,this.invoiceValueHint=""}applyFilter(t){this.invoices.filter=t.value}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,f.f.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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(i.f),o.Pb(x.a),o.Pb(xt.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-lightning-invoices"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},inputs:{calledFrom:"calledFrom"},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["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",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["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-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["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","expires_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","paid_at"],["matColumnDef","description"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["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-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Settled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unsettled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Settled","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unsettled","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],[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",3,"ngClass"],["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&&(o.Vb(0,"div",0),o.Ic(1,wt,15,6,"form",1),o.Ic(2,Vt,5,0,"div",2),o.Ic(3,Xt,36,14,"div",3),o.Ub()),2&t&&(o.Db(1),o.oc("ngIf","home"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom))},directives:[w.c,w.a,w.b,i.o,ct.u,ct.n,ct.o,K.c,lt.b,ct.c,ct.m,ct.p,ct.q,bt.a,K.g,K.f,S.a,V.a,O.b,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,nt.a,s.a,at.h,it.b,at.a,R.a,i.p,I.b,dt.a,dt.c,ht.m,at.d,at.f,at.j,at.l],pipes:[i.f],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:[vt.a]}}),t})();var Jt=n("IzEk"),Yt=n("W7oF"),Zt=n("zQhy");const te=["paymentReq"];function ee(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-radio-group",17),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().paymentType=e})("change",function(){return o.zc(t),o.hc().onPaymentTypeChange()}),o.Vb(1,"mat-radio-button",18),o.Kc(2,"Invoice Payment"),o.Ub(),o.Vb(3,"mat-radio-button",19),o.Kc(4,"Keysend Payment"),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.oc("ngModel",t.paymentType)}}function ne(t,e){1&t&&o.Rb(0)}function ie(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.paymentError)}}function ae(t,e){if(1&t&&(o.Vb(0,"div",20),o.Qb(1,"fa-icon",21),o.Ic(2,ie,2,1,"span",22),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.paymentError)}}function oe(t,e){if(1&t&&(o.Vb(0,"mat-hint"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.paymentDecodedHint)}}function se(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Payment request is required."),o.Ub())}function ce(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.paymentDecodedHint)}}function le(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Payment amount is required."),o.Ub())}function re(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-form-field",23),o.Vb(1,"input",27,28),o.dc("ngModelChange",function(e){return o.zc(t),o.hc(2).paymentAmount=e})("change",function(e){return o.zc(t),o.hc(2).onAmountChange(e)}),o.Ub(),o.Vb(3,"mat-hint"),o.Kc(4,"It is a zero amount invoice, enter amount to be paid."),o.Ub(),o.Ic(5,le,2,0,"mat-error",22),o.Ub()}if(2&t){const t=o.hc(2);o.Db(1),o.oc("ngModel",t.paymentAmount),o.Db(4),o.oc("ngIf",!t.paymentAmount)}}function be(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-form-field",23),o.Vb(1,"textarea",24,25),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().onPaymentRequestEntry(e)})("matTextareaAutosize",function(){return!0}),o.Ub(),o.Ic(3,oe,2,1,"mat-hint",22),o.Ic(4,se,2,0,"mat-error",22),o.Ic(5,ce,2,1,"mat-error",22),o.Ub(),o.Ic(6,re,6,2,"mat-form-field",26)}if(2&t){const t=o.wc(2),e=o.hc();o.Db(1),o.oc("ngModel",e.paymentRequest),o.Db(2),o.oc("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),o.Db(1),o.oc("ngIf",!e.paymentRequest),o.Db(1),o.oc("ngIf",null==t.errors?null:t.errors.decodeError),o.Db(1),o.oc("ngIf",e.zeroAmtInvoice)}}function de(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Pubkey is required."),o.Ub())}function ue(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Keysend amount is required."),o.Ub())}function he(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-form-field",23),o.Vb(1,"input",29),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().pubkey=e}),o.Ub(),o.Ic(2,de,2,0,"mat-error",22),o.Ub(),o.Vb(3,"mat-form-field",23),o.Vb(4,"input",30,31),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().keysendAmount=e}),o.Ub(),o.Ic(6,ue,2,0,"mat-error",22),o.Ub()}if(2&t){const t=o.hc();o.Db(1),o.oc("ngModel",t.pubkey),o.Db(1),o.oc("ngIf",!t.pubkey),o.Db(2),o.oc("ngModel",t.keysendAmount),o.Db(2),o.oc("ngIf",!t.keysendAmount)}}let me=(()=>{class t{constructor(t,e,n,i,a,o,s,c){this.dialogRef=t,this.store=e,this.clEffects=n,this.logger=i,this.commonService=a,this.decimalPipe=o,this.actions$=s,this.rtlEffects=c,this.faExclamationTriangle=m.o,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentType="invoice",this.pubkey="",this.keysendAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=f.i[0],this.feeLimitTypes=f.i,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}set payReq(t){t&&(this.paymentReq=t)}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.selNode=t.nodeSettings,this.activeChannels=t.allChannels.filter(t=>"CHANNELD_NORMAL"===t.state&&t.connected),this.isCompatibleVersion=this.commonService.isVersionCompatible(t.information.version,"0.9.0")&&this.commonService.isVersionCompatible(t.information.api_version,"0.4.0"),this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.o||t.type===p.cb)).subscribe(t=>{t.type===p.cb&&this.dialogRef.close(),t.type===p.o&&("SendPayment"===t.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=t.payload.message),"DecodePayment"===t.payload.action&&(this.paymentDecodedHint="ERROR: "+t.payload.message,this.paymentReq.control.setErrors({decodeError:!0})))})}onSendPayment(){if("invoice"===this.paymentType&&!this.paymentRequest||"keysend"===this.paymentType&&(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0))return!0;"keysend"===this.paymentType?this.keysendPayment():this.paymentDecoded.created_at_str?this.sendPayment():(this.paymentAmount=null,this.paymentError="",this.paymentDecodedHint="",this.paymentReq.control.setErrors(null),this.store.dispatch(new st.F("Decoding Payment...")),this.store.dispatch(new p.l({routeParam:this.paymentRequest,fromDialog:!0})),this.clEffects.setDecodedPaymentCL.pipe(Object(Jt.a)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at_str&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[2])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.f.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description}))}))}keysendPayment(){this.store.dispatch(new st.F("Sending Keysend Payment...")),this.store.dispatch(new p.zb({pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}))}sendPayment(){this.store.dispatch(new st.F("Sending Payment...")),this.store.dispatch(new p.zb(this.zeroAmtInvoice?{invoice:this.paymentRequest,amount: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.store.dispatch(new st.F("Decoding Payment...")),this.store.dispatch(new p.l({routeParam:this.paymentRequest,fromDialog:!0})),this.clEffects.setDecodedPaymentCL.subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at_str&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[3])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.f.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description}))}))}onAmountChange(t){delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=t}onPaymentTypeChange(){this.paymentError=""}resetData(){"keysend"===this.paymentType?(this.pubkey="",this.keysendAmount=null):(this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=f.i[0],this.paymentReq.control.setErrors(null),this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null),this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(y.h),o.Pb(Yt.a),o.Pb(g.b),o.Pb(x.a),o.Pb(i.f),o.Pb(v.a),o.Pb(xt.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-lightning-send-payments"]],viewQuery:function(t,e){if(1&t&&o.Pc(te,!0),2&t){let t;o.vc(t=o.ec())&&(e.payReq=t.first)}},decls:23,vars:4,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"mt-5px"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start stretch",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","8","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","7",3,"click"],["invoiceBlock",""],["keysendBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start stretch",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","25","tabindex","1","value","invoice",1,"mr-2"],["fxFlex","25","tabindex","2","value","keysend"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["fxFlex","100"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","3","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","4","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","5","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","6","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Send Payment"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Ic(9,ee,5,1,"mat-radio-group",7),o.Vb(10,"form",8,9),o.Ic(12,ne,1,0,"ng-container",10),o.Ic(13,ae,3,2,"div",11),o.Vb(14,"div",12),o.Vb(15,"button",13),o.dc("click",function(){return e.resetData()}),o.Kc(16,"Clear Fields"),o.Ub(),o.Vb(17,"button",14),o.dc("click",function(){return e.onSendPayment()}),o.Kc(18,"Send Payment"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(19,be,7,5,"ng-template",null,15,o.Jc),o.Ic(21,he,7,4,"ng-template",null,16,o.Jc)),2&t){const t=o.wc(20),n=o.wc(22);o.Db(6),o.oc("mat-dialog-close",!1),o.Db(3),o.oc("ngIf",e.isCompatibleVersion),o.Db(3),o.oc("ngTemplateOutlet","keysend"===e.paymentType?n:t),o.Db(1),o.oc("ngIf",""!==e.paymentError)}},directives:[w.c,w.a,D.c,w.b,S.a,ot.d,D.b,i.o,ct.u,ct.n,ct.o,i.t,Zt.b,ct.m,ct.p,Zt.a,V.a,K.c,lt.b,ct.c,lt.d,rt.a,ct.s,K.f,K.b],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})();const fe=["sendPaymentForm"];function pe(t,e){if(1&t&&(o.Vb(0,"mat-hint"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.paymentDecodedHint)}}function ge(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Payment request is required."),o.Ub())}function ye(t,e){if(1&t){const t=o.Wb();o.Vb(0,"form",4,5),o.Vb(2,"mat-form-field",6),o.Vb(3,"textarea",7,8),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().onPaymentRequestEntry(e)})("matTextareaAutosize",function(){return!0}),o.Ub(),o.Ic(5,pe,2,1,"mat-hint",9),o.Ic(6,ge,2,0,"mat-error",9),o.Ub(),o.Vb(7,"div",10),o.Vb(8,"button",11),o.dc("click",function(){return o.zc(t),o.hc().resetData()}),o.Kc(9,"Clear Field"),o.Ub(),o.Vb(10,"button",12),o.dc("click",function(){return o.zc(t),o.hc().onSendPayment()}),o.Kc(11,"Send Payment"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.paymentRequest),o.Db(2),o.oc("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),o.Db(1),o.oc("ngIf",!t.paymentRequest)}}function ve(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",13),o.Vb(1,"button",12),o.dc("click",function(){return o.zc(t),o.hc().openSendPaymentModal()}),o.Kc(2,"Send Payment"),o.Ub(),o.Ub()}}function xe(t,e){1&t&&o.Qb(0,"mat-progress-bar",47)}function we(t,e){1&t&&(o.Vb(0,"th",48),o.Kc(1,"Created At"),o.Ub())}const Ve=function(t){return{"mr-0":t}};function Ue(t,e){if(1&t&&o.Qb(0,"span",52),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ve,t.screenSize===t.screenSizeEnum.XS))}}function De(t,e){if(1&t&&o.Qb(0,"span",53),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ve,t.screenSize===t.screenSizeEnum.XS))}}function Ce(t,e){if(1&t&&(o.Vb(0,"td",49),o.Ic(1,Ue,1,3,"span",50),o.Ic(2,De,1,3,"span",51),o.Kc(3),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.oc("ngIf","complete"===t.status),o.Db(1),o.oc("ngIf","complete"!==t.status),o.Db(1),o.Mc(" ",null==t?null:t.created_at_str," ")}}function Se(t,e){1&t&&(o.Vb(0,"th",48),o.Kc(1,"Payment Hash"),o.Ub())}function Le(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"div"),o.Kc(2),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(null==t?null:t.payment_hash)}}function Ie(t,e){1&t&&(o.Vb(0,"th",54),o.Kc(1,"Sats Sent"),o.Ub())}function Fe(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"span",55),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,1,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function ke(t,e){1&t&&(o.Vb(0,"th",54),o.Kc(1,"Sats Received"),o.Ub())}function Ae(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"span",55),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function _e(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",56),o.Vb(1,"div",57),o.Vb(2,"mat-select",58),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",59),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function Pe(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",60),o.Vb(1,"button",61),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc(2).onPaymentClick(n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function Te(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No payments available."),o.Ub())}function Ke(t,e){if(1&t&&(o.Vb(0,"td",62),o.Ic(1,Te,2,0,"p",9),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)}}function Re(t,e){if(1&t&&o.Qb(0,"span",66),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ve,t.screenSize===t.screenSizeEnum.XS))}}function Me(t,e){if(1&t&&o.Qb(0,"span",67),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ve,t.screenSize===t.screenSizeEnum.XS))}}function Oe(t,e){if(1&t&&o.Qb(0,"span",66),2&t){const t=o.hc(5);o.oc("ngClass",o.sc(1,Ve,t.screenSize===t.screenSizeEnum.XS))}}function Ee(t,e){if(1&t&&o.Qb(0,"span",67),2&t){const t=o.hc(5);o.oc("ngClass",o.sc(1,Ve,t.screenSize===t.screenSizeEnum.XS))}}function ze(t,e){if(1&t&&(o.Vb(0,"span",69),o.Ic(1,Oe,1,3,"span",64),o.Ic(2,Ee,1,3,"span",65),o.Kc(3),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.oc("ngIf","complete"===t.status),o.Db(1),o.oc("ngIf","complete"!==t.status),o.Db(1),o.Mc(" ",t.created_at_str," ")}}function Be(t,e){if(1&t&&(o.Tb(0),o.Ic(1,ze,4,3,"span",68),o.Sb()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.mpps)}}function Ne(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"span",63),o.Ic(2,Re,1,3,"span",64),o.Ic(3,Me,1,3,"span",65),o.Kc(4),o.Ub(),o.Ic(5,Be,2,1,"ng-container",9),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.oc("ngIf","complete"===t.status),o.Db(1),o.oc("ngIf","complete"!==t.status),o.Db(1),o.Mc(" Total Attempts: ",null==t?null:t.total_parts," "),o.Db(1),o.oc("ngIf",t.is_expanded)}}function qe(t,e){if(1&t&&(o.Vb(0,"span",63),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" Part ID ",t.partid?t.partid:0," ")}}function Qe(t,e){if(1&t&&(o.Vb(0,"span"),o.Ic(1,qe,2,1,"span",70),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.mpps)}}function He(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"span",63),o.Kc(2),o.Ub(),o.Ic(3,Qe,2,1,"span",9),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(null==t?null:t.payment_hash),o.Db(1),o.oc("ngIf",t.is_expanded)}}function je(t,e){if(1&t&&(o.Vb(0,"span",71),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",o.kc(2,1,t.msatoshi_sent/1e3,t.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function $e(t,e){if(1&t&&(o.Vb(0,"span"),o.Ic(1,je,3,4,"span",72),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.mpps)}}function Ge(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"span",71),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ic(4,$e,2,1,"span",9),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,2,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),o.Db(2),o.oc("ngIf",t.is_expanded)}}function Xe(t,e){if(1&t&&(o.Vb(0,"span",71),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",o.kc(2,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function We(t,e){if(1&t&&(o.Vb(0,"span"),o.Ic(1,Xe,3,4,"span",72),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.mpps)}}function Je(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"span",71),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ic(4,We,2,1,"span",9),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,2,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0")),o.Db(2),o.oc("ngIf",t.is_expanded)}}function Ye(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",55),o.Vb(1,"button",76),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc(4).onPaymentClick(n)}),o.Kc(2),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit;o.Db(2),o.Mc("View ",t.partid?t.partid:0,"")}}function Ze(t,e){if(1&t&&(o.Vb(0,"div"),o.Ic(1,Ye,3,1,"div",75),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.mpps)}}function tn(t,e){if(1&t&&(o.Vb(0,"td",73),o.Vb(1,"span",55),o.Vb(2,"button",74),o.dc("click",function(){const t=e.$implicit;return t.is_expanded=!t.is_expanded}),o.Kc(3),o.Ub(),o.Ub(),o.Ic(4,Ze,2,1,"div",9),o.Ub()),2&t){const t=e.$implicit;o.Db(3),o.Lc(t.is_expanded?"Hide":"Show"),o.Db(1),o.oc("ngIf",t.is_expanded)}}function en(t,e){if(1&t&&o.Qb(0,"tr",77),2&t){const t=e.$implicit,n=o.hc(2);o.oc("@newlyAddedRowAnimation",t.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const nn=function(t){return{"display-none":t}};function an(t,e){if(1&t&&o.Qb(0,"tr",78),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,nn,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function on(t,e){1&t&&o.Qb(0,"tr",79)}function sn(t,e){if(1&t&&o.Qb(0,"tr",77),2&t){const t=e.$implicit,n=o.hc(2);o.oc("@newlyAddedRowAnimation",t.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const cn=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},ln=function(){return["no_payment"]};function rn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",14),o.Vb(1,"div",15),o.Vb(2,"div",16),o.Qb(3,"fa-icon",17),o.Vb(4,"span",18),o.Kc(5,"Payments History"),o.Ub(),o.Ub(),o.Vb(6,"mat-form-field",19),o.Vb(7,"input",20),o.dc("keyup",function(e){return o.zc(t),o.hc().applyFilter(e.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",21),o.Ic(9,xe,1,0,"mat-progress-bar",22),o.Vb(10,"table",23,24),o.Tb(12,25),o.Ic(13,we,2,0,"th",26),o.Ic(14,Ce,4,3,"td",27),o.Sb(),o.Tb(15,28),o.Ic(16,Se,2,0,"th",26),o.Ic(17,Le,3,1,"td",27),o.Sb(),o.Tb(18,29),o.Ic(19,Ie,2,0,"th",30),o.Ic(20,Fe,4,4,"td",27),o.Sb(),o.Tb(21,31),o.Ic(22,ke,2,0,"th",30),o.Ic(23,Ae,4,4,"td",27),o.Sb(),o.Tb(24,32),o.Ic(25,_e,6,0,"th",33),o.Ic(26,Pe,3,0,"td",34),o.Sb(),o.Tb(27,35),o.Ic(28,Ke,2,1,"td",36),o.Sb(),o.Tb(29,37),o.Ic(30,Ne,6,4,"td",27),o.Sb(),o.Tb(31,38),o.Ic(32,He,4,2,"td",27),o.Sb(),o.Tb(33,39),o.Ic(34,Ge,5,5,"td",27),o.Sb(),o.Tb(35,40),o.Ic(36,Je,5,5,"td",27),o.Sb(),o.Tb(37,41),o.Ic(38,tn,5,2,"td",42),o.Sb(),o.Ic(39,en,1,1,"tr",43),o.Ic(40,an,1,3,"tr",44),o.Ic(41,on,1,0,"tr",45),o.Ic(42,sn,1,1,"tr",43),o.Ub(),o.Ub(),o.Qb(43,"mat-paginator",46),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("icon",t.faHistory),o.Db(6),o.oc("ngIf",!0===t.flgLoading[0]),o.Db(1),o.oc("dataSource",t.payments)("ngClass",o.sc(14,cn,"error"===t.flgLoading[0])),o.Db(29),o.oc("matRowDefColumns",t.mppColumns)("matRowDefWhen",t.is_group),o.Db(1),o.oc("matFooterRowDef",o.rc(16,ln)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)("matRowDefWhen",!t.is_group),o.Db(1),o.oc("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let bn=(()=>{class t{constructor(t,e,n,i,a,o,s){this.logger=t,this.commonService=e,this.store=n,this.rtlEffects=i,this.clEffects=a,this.decimalPipe=o,this.titleCasePipe=s,this.calledFrom="transactions",this.faHistory=m.r,this.newlyAddedPayment="",this.flgAnimate=!0,this.selNode={},this.flgLoading=[!0],this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["created_at","actions"],this.mppColumns=["groupTotal","groupAction"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtRecv","groupAction"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtSent","groupAmtRecv","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["created_at","payment_hash","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupHash","groupAmtSent","groupAmtRecv","groupAction"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.selNode=t.nodeSettings,this.paymentJSONArr=t.payments&&t.payments.length>0?t.payments:[],this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr),setTimeout(()=>{this.flgAnimate=!1},3e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(t,e){return e.is_group}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at_str?this.sendPayment():(this.store.dispatch(new st.F("Decoding Payment...")),this.store.dispatch(new p.l({routeParam:this.paymentRequest,fromDialog:!1})),this.clEffects.setDecodedPaymentCL.pipe(Object(Jt.a)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at_str?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()}))}sendPayment(){this.flgAnimate=!0,this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at_str",value:this.paymentDecoded.created_at_str,title:"Creation Date",width:50},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:f.h.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:f.h.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}})),this.rtlEffects.closeConfirm.pipe(Object(Jt.a)(1)).subscribe(t=>{t&&(this.store.dispatch(new st.F("Sending Payment...")),this.store.dispatch(new p.zb({invoice:this.paymentRequest,fromDialog:!1})),this.resetData())})):(this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at_str",value:this.paymentDecoded.created_at_str,title:"Creation Date",width:40},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:f.h.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,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.h.NUMBER.toLowerCase(),inputValue:"",width:30}]}})),this.rtlEffects.closeConfirm.pipe(Object(Jt.a)(1)).subscribe(t=>{t&&(this.paymentDecoded.msatoshi=t[0].inputValue,this.store.dispatch(new st.F("Sending Payment...")),this.store.dispatch(new p.zb({invoice:this.paymentRequest,amount:1e3*t[0].inputValue,fromDialog:!1})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&(this.store.dispatch(new st.F("Decoding Payment...")),this.store.dispatch(new p.l({routeParam:this.paymentRequest,fromDialog:!1})),this.clEffects.setDecodedPaymentCL.subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.msatoshi?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.f.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description}):this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description}))}openSendPaymentModal(){this.store.dispatch(new st.C({data:{component:me}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(t){const e=[[{key:"bolt11",value:t.bolt11,title:"Bolt 11",width:100,type:f.h.STRING}],[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:f.h.STRING}],[{key:"id",value:t.id,title:"ID",width:20,type:f.h.STRING},{key:"destination",value:t.destination,title:"Destination",width:80,type:f.h.STRING}],[{key:"created_at_str",value:t.created_at_str,title:"Creation Date",width:50,type:f.h.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(t.status),title:"Status",width:50,type:f.h.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"Amount (mSats)",width:50,type:f.h.NUMBER},{key:"msatoshi_sent",value:t.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:f.h.NUMBER}]];t.memo&&""!==t.memo&&e.splice(2,0,[{key:"memo",value:t.memo,title:"Memo",width:100,type:f.h.STRING}]),t.hasOwnProperty("partid")?e.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:80,type:f.h.STRING},{key:"partid",value:t.partid,title:"Part ID",width:20,type:f.h.STRING}]):e.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:f.h.STRING}]),this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Payment Information",message:e}}))}applyFilter(t){this.payments.filter=t.value}loadPaymentsTable(t){this.payments=new at.o(t?[...t]:[]),this.payments.data=this.paymentJSONArr,this.payments.sort=this.sort,this.payments.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.payments.paginator=this.paginator}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){let t=JSON.parse(JSON.stringify(this.payments.data)).reduce((t,e)=>e.mpps?t.concat(e.mpps):(delete e.is_group,delete e.is_expanded,delete e.total_parts,t.concat(e)),[]);this.commonService.downloadFile(t,"Payments")}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(x.a),o.Pb(y.h),o.Pb(xt.a),o.Pb(Yt.a),o.Pb(i.f),o.Pb(i.x))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-lightning-payments"]],viewQuery:function(t,e){if(1&t&&(o.Pc(fe,!0),o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first),o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},inputs:{calledFrom:"calledFrom"},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["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","created_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","payment_hash"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["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","groupHash"],["matColumnDef","groupAmtSent"],["matColumnDef","groupAmtRecv"],["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"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["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,"mpp-row-span"],["class","dot green mt-0","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow mt-0","matTooltip","Incomplete/Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green","mt-0",3,"ngClass"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow","mt-0",3,"ngClass"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Ic(1,ye,12,3,"form",1),o.Ic(2,ve,3,0,"div",2),o.Ic(3,rn,44,17,"div",3),o.Ub()),2&t&&(o.Db(1),o.oc("ngIf","home"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom))},directives:[w.c,w.a,w.b,i.o,ct.u,ct.n,ct.o,K.c,lt.b,ct.c,lt.d,ct.s,O.b,ct.m,ct.p,S.a,K.f,K.b,V.a,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.e,at.m,at.g,at.k,nt.a,s.a,at.h,it.b,at.a,R.a,dt.a,dt.c,ht.m,at.d,i.n,at.l,at.f,at.j],pipes:[i.f],styles:[".mat-column-bolt11[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"],data:{animation:[vt.a]}}),t})();function dn(t,e){if(1&t&&(o.Vb(0,"button",25),o.Vb(1,"mat-icon"),o.Kc(2,"more_vert"),o.Ub(),o.Ub()),2&t){o.hc();const t=o.wc(11);o.oc("matMenuTriggerFor",t)}}function un(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",15),o.dc("click",function(){return o.zc(t),o.hc(3).onNavigateTo("/cl/reports")}),o.Kc(1,"Fees Summary"),o.Ub()}}function hn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",15),o.dc("click",function(){return o.zc(t),o.hc(3).onsortChannelsBy()}),o.Kc(1),o.Ub()}if(2&t){const t=o.hc(3);o.Db(1),o.Mc("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}const mn=function(t){return{"error-border":t}};function fn(t,e){if(1&t&&o.Qb(0,"rtl-cl-node-info",26),2&t){const t=o.hc(3);o.oc("information",t.information)("showColorFieldSeparately",!1)("ngClass",o.sc(3,mn,"error"===t.flgLoading[0]))}}function pn(t,e){if(1&t&&o.Qb(0,"rtl-cl-balances-info",27),2&t){const t=o.hc(3);o.oc("balances",t.balances)("ngClass",o.sc(2,mn,"error"===t.flgLoading[2]))}}function gn(t,e){if(1&t&&o.Qb(0,"rtl-cl-channel-capacity-info",28),2&t){const t=o.hc(3);o.oc("sortBy",t.sortField)("channelBalances",t.channelBalances)("allChannels",t.allChannelsCapacity)("ngClass",o.sc(4,mn,"error"===t.flgLoading[5]))}}function yn(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-info",29),2&t){const t=o.hc(3);o.oc("fees",t.fees)("ngClass",o.sc(2,mn,"error"===t.flgLoading[1]))}}function vn(t,e){if(1&t&&o.Qb(0,"rtl-cl-channel-status-info",30),2&t){const t=o.hc(3);o.oc("channelsStatus",t.channelsStatus)("ngClass",o.sc(2,mn,"error"===t.flgLoading[0]))}}function xn(t,e){1&t&&(o.Vb(0,"h3"),o.Kc(1,"Error! Unable to find information!"),o.Ub())}function wn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-grid-tile",8),o.Vb(1,"mat-card",9),o.Vb(2,"mat-card-header"),o.Vb(3,"mat-card-title",10),o.Vb(4,"div"),o.Qb(5,"fa-icon",11),o.Vb(6,"span"),o.Kc(7),o.Ub(),o.Ub(),o.Vb(8,"div"),o.Ic(9,dn,3,1,"button",12),o.Vb(10,"mat-menu",13,14),o.Vb(12,"button",15),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc(2).onNavigateTo(n.link)}),o.Kc(13),o.Ub(),o.Ic(14,un,2,0,"button",16),o.Ic(15,hn,2,1,"button",16),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(16,"mat-card-content",17),o.Vb(17,"div",18),o.Ic(18,fn,1,5,"rtl-cl-node-info",19),o.Ic(19,pn,1,4,"rtl-cl-balances-info",20),o.Ic(20,gn,1,6,"rtl-cl-channel-capacity-info",21),o.Ic(21,yn,1,4,"rtl-cl-fee-info",22),o.Ic(22,vn,1,4,"rtl-cl-channel-status-info",23),o.Ic(23,xn,2,0,"h3",24),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit;o.oc("colspan",t.cols)("rowspan",t.rows),o.Db(5),o.oc("icon",t.icon),o.Db(2),o.Lc(t.title),o.Db(2),o.oc("ngIf",t.link),o.Db(4),o.Mc("Go To ",t.goTo,""),o.Db(1),o.oc("ngIf","fee"===t.id),o.Db(1),o.oc("ngIf","capacity"===t.id),o.Db(1),o.pc("fxFlex","capacity"===t.id?90:70),o.Db(1),o.oc("ngSwitch",t.id),o.Db(1),o.oc("ngSwitchCase","node"),o.Db(1),o.oc("ngSwitchCase","balance"),o.Db(1),o.oc("ngSwitchCase","capacity"),o.Db(1),o.oc("ngSwitchCase","fee"),o.Db(1),o.oc("ngSwitchCase","status")}}function Vn(t,e){if(1&t&&(o.Vb(0,"div",2),o.Vb(1,"div",3),o.Qb(2,"fa-icon",4),o.Vb(3,"span",5),o.Kc(4),o.Ub(),o.Ub(),o.Vb(5,"mat-grid-list",6),o.Ic(6,wn,24,15,"mat-grid-tile",7),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(2),o.oc("icon",t.flgLoading[0]?t.faFrown:t.faSmile),o.Db(2),o.Lc(t.flgLoading[0]?"Error! Please check the server connection.":"Welcome "+t.information.alias+"! Your node is up and running."),o.Db(1),o.oc("rowHeight",t.operatorCardHeight),o.Db(1),o.oc("ngForOf",t.operatorCards)}}function Un(t,e){if(1&t&&(o.Vb(0,"button",25),o.Vb(1,"mat-icon"),o.Kc(2,"more_vert"),o.Ub(),o.Ub()),2&t){o.hc();const t=o.wc(9);o.oc("matMenuTriggerFor",t)}}function Dn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-card-header"),o.Vb(1,"mat-card-title",10),o.Vb(2,"div"),o.Qb(3,"fa-icon",11),o.Vb(4,"span"),o.Kc(5),o.Ub(),o.Ub(),o.Vb(6,"div"),o.Ic(7,Un,3,1,"button",12),o.Vb(8,"mat-menu",13,39),o.Vb(10,"button",15),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc(2).onNavigateTo(e.link)}),o.Kc(11),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc().$implicit;o.Db(3),o.oc("icon",t.icon),o.Db(2),o.Lc(t.title),o.Db(2),o.oc("ngIf",t.link),o.Db(4),o.Mc("Go To ",t.goTo,"")}}function Cn(t,e){if(1&t&&o.Qb(0,"rtl-cl-node-info",40),2&t){const t=o.hc(3);o.oc("information",t.information)("ngClass",o.sc(2,mn,"error"===t.flgLoading[0]))}}function Sn(t,e){if(1&t&&o.Qb(0,"rtl-cl-balances-info",27),2&t){const t=o.hc(3);o.oc("balances",t.balances)("ngClass",o.sc(2,mn,"error"===t.flgLoading[2]))}}function Ln(t,e){if(1&t&&o.Qb(0,"rtl-cl-channel-liquidity-info",41),2&t){const t=o.hc(3);o.oc("direction","In")("totalLiquidity",t.totalInboundLiquidity)("allChannels",t.allInboundChannels)("ngClass",o.sc(4,mn,"error"===t.flgLoading[5]))}}function In(t,e){if(1&t&&o.Qb(0,"rtl-cl-channel-liquidity-info",41),2&t){const t=o.hc(3);o.oc("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("allChannels",t.allOutboundChannels)("ngClass",o.sc(4,mn,"error"===t.flgLoading[5]))}}function Fn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",50),o.Vb(1,"mat-icon"),o.Kc(2,"more_vert"),o.Ub(),o.Ub(),o.Vb(3,"mat-menu",13,51),o.Vb(5,"button",15),o.dc("click",function(){o.zc(t);const e=o.hc(2).$implicit;return o.hc(2).onNavigateTo(e.link)}),o.Kc(6),o.Ub(),o.Vb(7,"button",15),o.dc("click",function(){return o.zc(t),o.hc(4).onNavigateTo("/cl/reports/transactions")}),o.Kc(8,"Transactions Summary"),o.Ub(),o.Ub()}if(2&t){const t=o.wc(4),e=o.hc(2).$implicit;o.oc("matMenuTriggerFor",t),o.Db(6),o.Mc("Go To ",e.goTo,"")}}function kn(t,e){1&t&&(o.Vb(0,"span",42),o.Vb(1,"mat-tab-group",43),o.Vb(2,"mat-tab",44),o.Qb(3,"rtl-cl-lightning-invoices",45),o.Ub(),o.Vb(4,"mat-tab",46),o.Qb(5,"rtl-cl-lightning-payments",47),o.Ub(),o.Vb(6,"mat-tab",48),o.Ic(7,Fn,9,2,"ng-template",49),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("calledFrom","home"),o.Db(2),o.oc("calledFrom","home"),o.Db(1),o.oc("disabled",!0))}function An(t,e){1&t&&(o.Vb(0,"h3"),o.Kc(1,"Error! Unable to find information!"),o.Ub())}const _n=function(t){return{"p-0":t}};function Pn(t,e){if(1&t&&(o.Vb(0,"mat-grid-tile",8),o.Vb(1,"mat-card",33),o.Ic(2,Dn,12,4,"mat-card-header",34),o.Vb(3,"mat-card-content",35),o.Vb(4,"div",18),o.Ic(5,Cn,1,4,"rtl-cl-node-info",36),o.Ic(6,Sn,1,4,"rtl-cl-balances-info",20),o.Ic(7,Ln,1,6,"rtl-cl-channel-liquidity-info",37),o.Ic(8,In,1,6,"rtl-cl-channel-liquidity-info",37),o.Ic(9,kn,8,3,"span",38),o.Ic(10,An,2,0,"h3",24),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.oc("colspan",t.cols)("rowspan",t.rows),o.Db(1),o.oc("ngClass",o.sc(11,_n,"transactions"===t.id)),o.Db(1),o.oc("ngIf","transactions"!==t.id),o.Db(1),o.pc("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),o.Db(1),o.oc("ngSwitch",t.id),o.Db(1),o.oc("ngSwitchCase","node"),o.Db(1),o.oc("ngSwitchCase","balance"),o.Db(1),o.oc("ngSwitchCase","inboundLiq"),o.Db(1),o.oc("ngSwitchCase","outboundLiq"),o.Db(1),o.oc("ngSwitchCase","transactions")}}function Tn(t,e){if(1&t&&(o.Vb(0,"div",31),o.Qb(1,"fa-icon",4),o.Vb(2,"span",5),o.Kc(3),o.Ub(),o.Ub(),o.Vb(4,"mat-grid-list",32),o.Ic(5,Pn,11,13,"mat-grid-tile",7),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faSmile),o.Db(2),o.Mc("Welcome ",t.information.alias,"! Your node is up and running."),o.Db(1),o.oc("rowHeight",t.merchantCardHeight),o.Db(1),o.oc("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=h.b,this.faFrown=h.a,this.faAngleDoubleDown=m.a,this.faAngleDoubleUp=m.b,this.faChartPie=m.g,this.faBolt=m.e,this.faServer=m.G,this.faNetworkWired=m.y,this.flgChildInfoUpdated=!1,this.userPersonaEnum=f.w,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.allChannels=[],this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.feeRatesPerKB={},this.feeRatesPerKW={},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 b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:6,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:3,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCardHeight=.77*window.screen.height/2+"px",this.merchantCardHeight=.76*window.screen.height/10+"px",this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:2,rows:5}])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(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"),"FetchBalance"===t.action&&(this.flgLoading[2]="error"),"FetchLocalRemoteBalance"===t.action&&(this.flgLoading[3]="error"),"FetchFeeRates"===t.action&&(this.flgLoading[4]="error"),"FetchChannels"===t.action&&(this.flgLoading[5]="error")}),this.selNode=t.nodeSettings,this.information=t.information,"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.information.id),this.fees=t.fees,"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!this.fees.feeCollected),this.totalBalance=t.balance,this.balances.onchain=t.balance.totalBalance,this.balances.lightning=t.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances),"error"!==this.flgLoading[2]&&(this.flgLoading[2]=""===this.totalBalance);let e=t.localRemoteBalance.localBalance?+t.localRemoteBalance.localBalance:0,n=t.localRemoteBalance.remoteBalance?+t.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:e,remoteBalance:n,balancedness:+(1-Math.abs((e-n)/(e+n))).toFixed(3)},"error"!==this.flgLoading[3]&&(this.flgLoading[3]=!t.localRemoteBalance.localBalance),this.feeRatesPerKB=t.feeRatesPerKB,this.feeRatesPerKW=t.feeRatesPerKW,"error"!==this.flgLoading[4]&&(this.flgLoading[4]=!this.feeRatesPerKB||!this.feeRatesPerKW),this.channelsStatus={active:{channels:t.information.num_active_channels,capacity:t.localRemoteBalance.localBalance},pending:{channels:t.information.num_pending_channels,capacity:0|t.localRemoteBalance.pendingBalance},inactive:{channels:t.information.num_inactive_channels,capacity:0|t.localRemoteBalance.inactiveBalance}},this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannels=t.allChannels.filter(t=>"CHANNELD_NORMAL"===t.state&&t.connected),this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(t=>t.msatoshi_to_them>0),"msatoshi_to_them"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(t=>t.msatoshi_to_us>0),"msatoshi_to_us"))),this.allChannels.forEach(t=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(t.msatoshi_to_them/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(t.msatoshi_to_us/1e3)}),"error"!==this.flgLoading[5]&&(this.flgLoading[5]=!this.allChannels||!this.allChannels.length),this.flgChildInfoUpdated=this.balances.lightning>=0&&this.balances.onchain>=0&&this.fees.feeCollected>=0,this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[2]),Object(u.a)(t=>t.type===p.s||t.type===p.jb)).subscribe(t=>{t.type===p.s&&(this.flgChildInfoUpdated=!1),t.type===p.jb&&(this.flgChildInfoUpdated=!0)})}onNavigateTo(t){this.router.navigateByUrl(t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.allChannels.sort(function(t,e){const n=+t.msatoshi_to_us+ +t.msatoshi_to_them,i=+e.msatoshi_to_them+ +e.msatoshi_to_them;return n>i?-1:n<i?1:0})):(this.sortField="Balance Score",this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels,"balancedness"))))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(v.a),o.Pb(x.a),o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Ic(0,Vn,7,4,"div",0),o.Ic(1,Tn,6,4,"ng-template",null,1,o.Jc)),2&t){const t=o.wc(2);o.oc("ngIf",e.selNode.userPersona===e.userPersonaEnum.OPERATOR)("ngIfElse",t)}},directives:[i.o,w.c,w.b,V.a,U.a,i.n,U.c,D.a,w.a,D.c,D.f,C.a,C.b,D.b,i.q,i.r,i.s,S.a,C.d,L.a,P,i.m,I.a,T,N,q,Q,tt,et.b,et.a,Wt,bn,et.c],styles:[""]}),t})();var Rn=n("itXk"),Mn=n("Cyaj"),On=n("zHaW"),En=n("pMoy"),zn=n("o4Yh"),Bn=n("hzfI");const Nn=["form"],qn=["formSweepAll"],Qn=["stepper"];function Hn(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Bitcoin address is required."),o.Ub())}function jn(t,e){1&t&&(o.Vb(0,"mat-hint"),o.Kc(1,"Amount replaced by UTXO balance"),o.Ub())}function $n(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function Gn(t,e){if(1&t&&(o.Vb(0,"mat-option",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Lc(t)}}function Xn(t,e){if(1&t&&(o.Vb(0,"mat-option",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t.feeRateId),o.Db(1),o.Mc(" ",t.feeRateType," ")}}function Wn(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Min Confirmation Blocks is required."),o.Ub())}function Jn(t,e){if(1&t&&(o.Vb(0,"mat-option",36),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Mc("",o.jc(2,2,t.value)," Sats")}}function Yn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",37),o.Vb(1,"mat-expansion-panel",38),o.dc("closed",function(){return o.zc(t),o.hc(2).onAdvancedPanelToggle(!0)})("opened",function(){return o.zc(t),o.hc(2).onAdvancedPanelToggle(!1)}),o.Vb(2,"mat-expansion-panel-header"),o.Vb(3,"mat-panel-title"),o.Vb(4,"span"),o.Kc(5),o.Ub(),o.Ub(),o.Ub(),o.Vb(6,"div",31),o.Vb(7,"div",39),o.Vb(8,"mat-form-field",40),o.Vb(9,"mat-select",41),o.dc("selectionChange",function(e){return o.zc(t),o.hc(2).onUTXOSelectionChange(e)})("valueChange",function(e){return o.zc(t),o.hc(2).selUTXOs=e}),o.Vb(10,"mat-select-trigger"),o.Kc(11),o.ic(12,"number"),o.Ub(),o.Ic(13,Jn,3,4,"mat-option",21),o.Ub(),o.Ub(),o.Vb(14,"mat-slide-toggle",42),o.dc("ngModelChange",function(e){return o.zc(t),o.hc(2).flgUseAllBalance=e})("change",function(){return o.zc(t),o.hc(2).onUTXOAllBalanceChange()}),o.Kc(15," Use selected UTXOs balance "),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc(2);o.Db(5),o.Lc(t.advancedTitle),o.Db(4),o.oc("value",t.selUTXOs),o.Db(2),o.Nc("",o.jc(12,7,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),o.Db(2),o.oc("ngForOf",t.transactions),o.Db(1),o.oc("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function Zn(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(3);o.Db(1),o.Lc(t.sendFundError)}}function ti(t,e){if(1&t&&(o.Vb(0,"div",43),o.Qb(1,"fa-icon",44),o.Ic(2,Zn,2,1,"span",14),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.sendFundError)}}function ei(t,e){if(1&t){const t=o.Wb();o.Vb(0,"form",9,10),o.dc("submit",function(){return o.zc(t),o.hc().onSendFunds()})("reset",function(){return o.zc(t),o.hc().resetData()}),o.Vb(2,"mat-form-field",11),o.Vb(3,"input",12,13),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().transaction.address=e}),o.Ub(),o.Ic(5,Hn,2,0,"mat-error",14),o.Ub(),o.Vb(6,"mat-form-field",15),o.Vb(7,"input",16,17),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().transaction.satoshis=e}),o.Ub(),o.Ic(9,jn,2,0,"mat-hint",14),o.Vb(10,"span",18),o.Kc(11),o.Ub(),o.Ic(12,$n,2,0,"mat-error",14),o.Ub(),o.Vb(13,"mat-form-field",19),o.Vb(14,"mat-select",20),o.dc("selectionChange",function(e){return o.zc(t),o.hc().onAmountUnitChange(e)}),o.Ic(15,Gn,2,2,"mat-option",21),o.Ub(),o.Ub(),o.Vb(16,"div",22),o.Vb(17,"mat-form-field",23),o.Vb(18,"mat-select",24),o.dc("valueChange",function(e){return o.zc(t),o.hc().transaction.feeRate=e}),o.Ic(19,Xn,2,2,"mat-option",21),o.Ub(),o.Ub(),o.Vb(20,"div",25),o.Vb(21,"mat-checkbox",26),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().flgMinConf=e})("change",function(){o.zc(t);const e=o.hc();return e.flgMinConf?e.transaction.feeRate=null:e.transaction.minconf=null}),o.Ub(),o.Vb(22,"mat-form-field",27),o.Vb(23,"input",28,29),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().transaction.minconf=e}),o.Ub(),o.Ic(25,Wn,2,0,"mat-error",14),o.Ub(),o.Ub(),o.Ub(),o.Ic(26,Yn,16,9,"div",30),o.Qb(27,"div",31),o.Ic(28,ti,3,2,"div",32),o.Vb(29,"div",33),o.Vb(30,"button",34),o.Kc(31,"Clear Fields"),o.Ub(),o.Vb(32,"button",35),o.Kc(33,"Send Funds"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.transaction.address),o.Db(2),o.oc("ngIf",!t.transaction.address),o.Db(2),o.oc("ngModel",t.transaction.satoshis)("type",t.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",t.flgUseAllBalance),o.Db(2),o.oc("ngIf",t.flgUseAllBalance),o.Db(2),o.Mc(" ",t.selAmountUnit," "),o.Db(1),o.oc("ngIf",!t.transaction.satoshis),o.Db(2),o.oc("value",t.selAmountUnit)("disabled",t.flgUseAllBalance),o.Db(1),o.oc("ngForOf",t.amountUnits),o.Db(3),o.oc("value",t.transaction.feeRate)("disabled",t.flgMinConf),o.Db(1),o.oc("ngForOf",t.feeRateTypes),o.Db(2),o.oc("ngModel",t.flgMinConf),o.Db(2),o.oc("ngModel",t.transaction.minconf)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),o.Db(2),o.oc("ngIf",t.flgMinConf&&!t.transaction.minconf),o.Db(1),o.oc("ngIf",t.isCompatibleVersion),o.Db(2),o.oc("ngIf",""!==t.sendFundError)}}function ni(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc(3);o.Lc(t.passwordFormLabel)}}function ii(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Password is required."),o.Ub())}function ai(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-step",49),o.Vb(1,"form",70),o.Ic(2,ni,1,1,"ng-template",64),o.Vb(3,"div",0),o.Vb(4,"mat-form-field",52),o.Qb(5,"input",71),o.Ic(6,ii,2,0,"mat-error",14),o.Ub(),o.Ub(),o.Vb(7,"div",72),o.Vb(8,"button",73),o.dc("click",function(){return o.zc(t),o.hc(2).onAuthenticate()}),o.Kc(9,"Confirm"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc(2);o.oc("stepControl",t.passwordFormGroup)("editable",t.flgEditable),o.Db(1),o.oc("formGroup",t.passwordFormGroup),o.Db(5),o.oc("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function oi(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc(2);o.Lc(t.sendFundFormLabel)}}function si(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Bitcoin address is required."),o.Ub())}function ci(t,e){if(1&t&&(o.Vb(0,"mat-option",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t.feeRateId),o.Db(1),o.Mc(" ",t.feeRateType," ")}}function li(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Fees Rate is required."),o.Ub())}function ri(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Min confirmation blocks is required."),o.Ub())}function bi(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc(2);o.Lc(t.confirmFormLabel)}}function di(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(3);o.Db(1),o.Lc(t.sendFundError)}}function ui(t,e){if(1&t&&(o.Vb(0,"div",43),o.Qb(1,"fa-icon",44),o.Ic(2,di,2,1,"span",14),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.sendFundError)}}function hi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",45),o.Vb(1,"mat-vertical-stepper",46,47),o.dc("selectionChange",function(e){return o.zc(t),o.hc().stepSelectionChanged(e)}),o.Ic(3,ai,10,4,"mat-step",48),o.Vb(4,"mat-step",49),o.Vb(5,"form",50),o.Ic(6,oi,1,1,"ng-template",51),o.Vb(7,"div",31),o.Vb(8,"mat-form-field",52),o.Qb(9,"input",53),o.Ic(10,si,2,0,"mat-error",14),o.Ub(),o.Vb(11,"div",54),o.Vb(12,"mat-form-field",55),o.Vb(13,"mat-select",56),o.Ic(14,ci,2,2,"mat-option",21),o.Ub(),o.Ic(15,li,2,0,"mat-error",14),o.Ub(),o.Vb(16,"div",57),o.Qb(17,"mat-checkbox",58),o.Vb(18,"mat-form-field",27),o.Qb(19,"input",59),o.Ic(20,ri,2,0,"mat-error",14),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(21,"div",60),o.Vb(22,"button",61),o.Kc(23,"Next"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(24,"mat-step",62),o.Vb(25,"form",63),o.Ic(26,bi,1,1,"ng-template",64),o.Vb(27,"div",45),o.Vb(28,"div",65),o.Qb(29,"fa-icon",66),o.Vb(30,"span"),o.Kc(31,"You are about to sweep all funds from RTL. Are you sure?"),o.Ub(),o.Ub(),o.Ic(32,ui,3,2,"div",32),o.Vb(33,"div",60),o.Vb(34,"button",67),o.dc("click",function(){return o.zc(t),o.hc().onSendFunds()}),o.Kc(35,"Sweep All Funds"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(36,"div",68),o.Vb(37,"button",69),o.Kc(38),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(1),o.oc("linear",!0),o.Db(2),o.oc("ngIf",!t.appConfig.sso.rtlSSO),o.Db(1),o.oc("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),o.Db(1),o.oc("formGroup",t.sendFundFormGroup),o.Db(5),o.oc("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),o.Db(4),o.oc("ngForOf",t.feeRateTypes),o.Db(1),o.oc("ngIf",null==t.sendFundFormGroup.controls.transactionFeeRate.errors?null:t.sendFundFormGroup.controls.transactionFeeRate.errors.required),o.Db(4),o.oc("step",1)("min",0),o.Db(1),o.oc("ngIf",null==t.sendFundFormGroup.controls.transactionBlocks.errors?null:t.sendFundFormGroup.controls.transactionBlocks.errors.required),o.Db(4),o.oc("stepControl",t.confirmFormGroup),o.Db(1),o.oc("formGroup",t.confirmFormGroup),o.Db(4),o.oc("icon",t.faExclamationTriangle),o.Db(3),o.oc("ngIf",""!==t.sendFundError),o.Db(5),o.oc("mat-dialog-close",!1),o.Db(1),o.Lc(t.flgValidated?"Close":"Cancel")}}let mi=(()=>{class t{constructor(t,e,n,i,a,o,s,c,l,r){this.dialogRef=t,this.data=e,this.logger=n,this.store=i,this.commonService=a,this.decimalPipe=o,this.actions$=s,this.formBuilder=c,this.rtlEffects=l,this.snackBar=r,this.faExclamationTriangle=m.o,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.transactions=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.flgLoadingWallet=!0,this.selectedAddress=f.a[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=f.j,this.flgMinConf=!1,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=f.e,this.selAmountUnit=f.e[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=f.f,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[ct.t.required]],password:["",[ct.t.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",ct.t.required],transactionFeeRate:[null],flgMinConf:[!1],transactionBlocks:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe(Object(d.a)(this.unSubs[4])).subscribe(t=>{t?(this.sendFundFormGroup.controls.transactionBlocks.enable(),this.sendFundFormGroup.controls.transactionBlocks.setValidators([ct.t.required]),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionFeeRate.disable(),this.sendFundFormGroup.controls.transactionFeeRate.setValue(null)):(this.sendFundFormGroup.controls.transactionBlocks.disable(),this.sendFundFormGroup.controls.transactionBlocks.setValidators(null),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionBlocks.setErrors(null),this.sendFundFormGroup.controls.transactionFeeRate.enable(),this.sendFundFormGroup.controls.transactionFeeRate.setValue(null))}),Object(Rn.b)(this.store.select("root"),this.store.select("cl")).pipe(Object(d.a)(this.unSubs[0])).subscribe(([t,e])=>{this.fiatConversion=t.selNode.settings.fiatConversion,this.amountUnits=t.selNode.settings.currencyUnits,this.appConfig=t.appConfig,this.nodeData=t.nodeData,this.information=e.information,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0"),this.transactions=this.commonService.sortAscByKey(e.transactions.filter(t=>"confirmed"===t.status),"value"),this.logger.info(t),this.logger.info(e)}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.o||t.type===p.gb)).subscribe(t=>{t.type===p.gb&&(this.store.dispatch(new st.E("Fund Sent Successfully!")),this.dialogRef.close()),t.type===p.o&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch(new st.t(Mn(this.passwordFormGroup.controls.password.value))),this.rtlEffects.isAuthorizedRes.pipe(Object(Jt.a)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(t=>this.transaction.utxos.push(t.txid+":"+t.output))),this.store.dispatch(new st.F("Sending Funds...")),this.sweepAll?(this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.transactionBlocks.value):(delete this.transaction.minconf,this.sendFundFormGroup.controls.transactionFeeRate.value?this.transaction.feeRate=this.sendFundFormGroup.controls.transactionFeeRate.value:delete this.transaction.feeRate),delete this.transaction.utxos,this.store.dispatch(new p.Ab(this.transaction))):this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==f.g.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?f.g.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe(Object(d.a)(this.unSubs[2])).subscribe(t=>{this.transaction.satoshis=t[f.g.SATS],this.selAmountUnit=f.g.SATS,this.store.dispatch(new p.Ab(this.transaction))}):this.store.dispatch(new p.Ab(this.transaction))}get invalidValues(){return this.sweepAll?!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.transactionBlocks.value||this.sendFundFormGroup.controls.transactionBlocks.value<=0):!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=f.e[0]}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){case 0:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.transactionBlocks.value:this.sendFundFormGroup.controls.transactionFeeRate.value?" | Fee Rate: "+this.feeRateTypes.find(t=>t.feeRateId===this.sendFundFormGroup.controls.transactionFeeRate.value).feeRateType:"");break;default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds"}t.selectedIndex<t.previouslySelectedIndex&&0===t.selectedIndex&&this.passwordFormGroup.controls.hiddenPassword.setValue("")}onUTXOSelectionChange(t){let e={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((t,n)=>(e.value=t.value+n.value,e)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=f.e[0]):this.transaction.satoshis=null}onAmountUnitChange(t){let e=this,n=t.value===this.amountUnits[2]?f.g.OTHER:t.value;this.transaction.satoshis&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?f.g.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe(Object(d.a)(this.unSubs[3])).subscribe(t=>{e.transaction.satoshis=e.decimalPipe.transform(t[n],e.currencyUnitFormats[n]).replace(/,/g,"")}),this.selAmountUnit=t.value}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(g.b),o.Pb(y.h),o.Pb(x.a),o.Pb(i.f),o.Pb(v.a),o.Pb(ct.d),o.Pb(xt.a),o.Pb(On.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-on-chain-send-modal"]],viewQuery:function(t,e){if(1&t&&(o.Ec(Nn,!0),o.Pc(qn,!0),o.Pc(Qn,!0)),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first),o.vc(t=o.ec())&&(e.formSweepAll=t.first),o.vc(t=o.ec())&&(e.stepper=t.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["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,"mt-5px"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","padding-gap overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"padding-gap","overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxFlex","48","fxLayoutAlign","start end"],["tabindex","6","placeholder","Fee Rate",3,"value","disabled","valueChange"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","7","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",1,"mr-2",3,"ngModel","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["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"],["mat-flat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","tabindex","9","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxFlex","100"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex.gt-sm","48","fxLayoutAlign","start end"],["tabindex","5","placeholder","Fee Rate","formControlName","transactionFeeRate"],["fxFlex.gt-sm","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","6","color","primary","formControlName","flgMinConf","name","flgMinCon",1,"mr-2"],["matInput","","formControlName","transactionBlocks","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","7","required","",3,"step","min"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-stroked-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","default",3,"click"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Ic(9,ei,34,25,"form",7),o.Ub(),o.Ub(),o.Ub(),o.Ic(10,hi,39,17,"ng-template",null,8,o.Jc)),2&t){const t=o.wc(11);o.Db(5),o.Lc(e.sweepAll?"Sweep All Funds":"Send Funds"),o.Db(1),o.oc("mat-dialog-close",!1),o.Db(3),o.oc("ngIf",!e.sweepAll)("ngIfElse",t)}},directives:[w.c,w.a,D.c,w.b,S.a,ot.d,D.b,i.o,ct.u,ct.n,ct.o,K.c,lt.b,ct.c,rt.a,ct.s,ct.m,ct.p,bt.a,K.g,dt.a,i.n,En.a,ct.q,K.b,K.f,ht.m,zn.c,zn.e,zn.f,dt.c,ut.a,R.a,V.a,Bn.h,Bn.a,ct.h,Bn.b,ct.g,Bn.f],pipes:[i.f],styles:[""]}),t})();var fi=n("qmev");function pi(t,e){1&t&&o.Qb(0,"mat-progress-bar",28)}function gi(t,e){1&t&&(o.Vb(0,"th",29),o.Kc(1," Transaction ID "),o.Ub())}function yi(t,e){1&t&&o.Qb(0,"span",35)}function vi(t,e){if(1&t&&(o.Qb(0,"span",36),o.ic(1,"titlecase")),2&t){const t=o.hc().$implicit;o.pc("matTooltip",o.jc(1,1,t.status))}}const xi=function(t){return{"max-width":t}};function wi(t,e){if(1&t&&(o.Vb(0,"td",30),o.Vb(1,"div",31),o.Ic(2,yi,1,0,"span",32),o.Ic(3,vi,2,3,"span",33),o.Vb(4,"span",34),o.Kc(5),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.Db(1),o.oc("ngStyle",o.sc(4,xi,n.screenSize===n.screenSizeEnum.XS?"10rem":"50rem")),o.Db(1),o.oc("ngIf","confirmed"===t.status),o.Db(1),o.oc("ngIf","confirmed"!==t.status),o.Db(2),o.Lc(t.txid)}}function Vi(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1," Output "),o.Ub())}function Ui(t,e){if(1&t&&(o.Vb(0,"td",30),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.output)," ")}}function Di(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1," Value (Sats) "),o.Ub())}function Ci(t,e){if(1&t&&(o.Vb(0,"span",38),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.Lc(o.jc(2,1,t.value))}}function Si(t,e){if(1&t&&(o.Vb(0,"span",41),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.Mc("(",o.jc(2,1,-1*t.value),")")}}function Li(t,e){if(1&t&&(o.Vb(0,"td",30),o.Ic(1,Ci,3,3,"span",39),o.Ic(2,Si,3,3,"span",40),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.oc("ngIf",t.value>0||0===t.value),o.Db(1),o.oc("ngIf",t.value<0)}}function Ii(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1," Blockheight "),o.Ub())}function Fi(t,e){if(1&t&&(o.Vb(0,"td",30),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.blockheight)," ")}}function ki(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",42),o.Vb(1,"div",43),o.Vb(2,"mat-select",44),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",45),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function Ai(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",46),o.Vb(1,"button",47),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc().onTransactionClick(i,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function _i(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No transactions available."),o.Ub())}function Pi(t,e){if(1&t&&(o.Vb(0,"td",48),o.Ic(1,_i,2,0,"p",49),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)}}const Ti=function(t){return{"display-none":t}};function Ki(t,e){if(1&t&&o.Qb(0,"tr",50),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,Ti,(null==t.listTransactions?null:t.listTransactions.data)&&(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)>0))}}function Ri(t,e){1&t&&o.Qb(0,"tr",51)}function Mi(t,e){1&t&&o.Qb(0,"tr",52)}const Oi=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Ei=function(){return["no_transaction"]};let zi=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.commonService=e,this.store=n,this.actions$=i,this.faMoneyBillWave=m.x,this.displayedColumns=[],this.transactionsData=[],this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unsub=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["txid","value","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["txid","output","value","blockheight","actions"]):(this.flgSticky=!0,this.displayedColumns=["txid","output","value","blockheight","actions"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unsub[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchTransactions"===t.action&&(this.flgLoading[0]="error")}),this.transactionsData=t.transactions,this.transactionsData.length>0&&this.loadTransactionsTable(this.transactionsData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.transactions),this.logger.info(t)})}ngAfterViewInit(){this.transactionsData.length>0&&this.loadTransactionsTable(this.transactionsData)}applyFilter(t){this.listTransactions.filter=t.value}onTransactionClick(t,e){const n=[[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"output",value:t.output,title:"Output",width:50,type:f.h.NUMBER},{key:"value",value:t.value,title:"Value (Sats)",width:50,type:f.h.NUMBER}],[{key:"status",value:this.commonService.titleCase(t.status),title:"Status",width:50,type:f.h.STRING},{key:"blockheight",value:t.blockheight,title:"Blockheight",width:50,type:f.h.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100}]];this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Transaction Information",message:n}}))}loadTransactionsTable(t){this.listTransactions=new at.o([...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.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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(x.a),o.Pb(y.h),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-on-chain-transaction-history"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Transactions")}])],decls:34,vars:14,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch",1,"padding-gap-x-large"],["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","txid"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["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-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"div",2),o.Qb(3,"fa-icon",3),o.Vb(4,"span",4),o.Kc(5,"UTXOs"),o.Ub(),o.Ub(),o.Vb(6,"mat-form-field",5),o.Vb(7,"input",6),o.dc("keyup",function(t){return e.applyFilter(t.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",7),o.Vb(9,"div",8),o.Ic(10,pi,1,0,"mat-progress-bar",9),o.Vb(11,"table",10,11),o.Tb(13,12),o.Ic(14,gi,2,0,"th",13),o.Ic(15,wi,6,6,"td",14),o.Sb(),o.Tb(16,15),o.Ic(17,Vi,2,0,"th",16),o.Ic(18,Ui,4,3,"td",14),o.Sb(),o.Tb(19,17),o.Ic(20,Di,2,0,"th",16),o.Ic(21,Li,3,2,"td",14),o.Sb(),o.Tb(22,18),o.Ic(23,Ii,2,0,"th",16),o.Ic(24,Fi,4,3,"td",14),o.Sb(),o.Tb(25,19),o.Ic(26,ki,6,0,"th",20),o.Ic(27,Ai,3,0,"td",21),o.Sb(),o.Tb(28,22),o.Ic(29,Pi,2,1,"td",23),o.Sb(),o.Ic(30,Ki,1,3,"tr",24),o.Ic(31,Ri,1,0,"tr",25),o.Ic(32,Mi,1,0,"tr",26),o.Ub(),o.Qb(33,"mat-paginator",27),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("icon",e.faMoneyBillWave),o.Db(7),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.listTransactions)("ngClass",o.sc(11,Oi,"error"===e.flgLoading[0])),o.Db(19),o.oc("matFooterRowDef",o.rc(13,Ei)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[w.c,w.b,w.a,V.a,K.c,lt.b,O.b,i.o,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,nt.a,s.a,at.h,it.b,at.a,i.p,I.b,R.a,dt.a,dt.c,ht.m,S.a,at.d,at.f,at.j,at.l],pipes:[i.x,i.f],styles:[".mat-column-txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function Bi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",12),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let Ni=(()=>{class t{constructor(t,e){this.store=t,this.router=e,this.selNode={},this.faExchangeAlt=m.n,this.faChartPie=m.g,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"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}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(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).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("cl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance},{title:"Unconfirmed",dataValue:t.balance.unconfBalance}]})}openSendFundsModal(t){this.store.dispatch(new st.C({data:{sweepAll:t,component:mi}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"On-chain Balance"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Qb(7,"rtl-currency-unit-converter",5),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",0),o.Qb(9,"fa-icon",1),o.Vb(10,"span",2),o.Kc(11,"On-chain Transactions"),o.Ub(),o.Ub(),o.Vb(12,"div",6),o.Vb(13,"mat-card"),o.Vb(14,"mat-card-content",4),o.Vb(15,"nav",7),o.Ic(16,Bi,2,3,"div",8),o.Ub(),o.Vb(17,"div",9),o.Qb(18,"router-outlet"),o.Ub(),o.Vb(19,"div",10),o.Qb(20,"rtl-cl-on-chain-transaction-history",11),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartPie),o.Db(6),o.oc("values",e.balances),o.Db(2),o.oc("icon",e.faExchangeAlt),o.Db(7),o.oc("ngForOf",e.links))},directives:[w.c,w.b,V.a,D.a,D.b,fi.a,et.e,i.n,w.a,a.l,zi,et.d,a.h],styles:[""]}),t})();var qi=n("8Qe2");function Qi(t,e){if(1&t&&(o.Vb(0,"span",10),o.Kc(1,"Channels"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.activeChannels)}}function Hi(t,e){if(1&t&&(o.Vb(0,"span",10),o.Kc(1,"Peers"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.activePeers)}}let ji=(()=>{class t{constructor(t,e,n,i){this.store=t,this.logger=e,this.commonService=n,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=m.O,this.faChartPie=m.g,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 b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).subscribe(t=>{this.activeLink=this.links.findIndex(e=>e.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("cl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.activeChannels=t.information.num_active_channels,this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance},{title:"Unconfirmed",dataValue:t.balance.unconfBalance}],this.logger.info(t)})}onSelectedTabChange(t){this.router.navigateByUrl("/cl/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(g.b),o.Pb(x.a),o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"On-chain Balance"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Qb(7,"rtl-currency-unit-converter",5),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",0),o.Qb(9,"fa-icon",1),o.Vb(10,"span",2),o.Kc(11,"Connections"),o.Ub(),o.Ub(),o.Vb(12,"div",6),o.Vb(13,"mat-card"),o.Vb(14,"mat-card-content",4),o.Vb(15,"mat-tab-group",7),o.dc("selectedIndexChange",function(t){return e.activeLink=t})("selectedTabChange",function(t){return e.onSelectedTabChange(t)}),o.Vb(16,"mat-tab"),o.Ic(17,Qi,2,1,"ng-template",8),o.Ub(),o.Vb(18,"mat-tab"),o.Ic(19,Hi,2,1,"ng-template",8),o.Ub(),o.Ub(),o.Vb(20,"div",9),o.Qb(21,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartPie),o.Db(6),o.oc("values",e.balances),o.Db(2),o.oc("icon",e.faUsers),o.Db(6),o.oc("selectedIndex",e.activeLink))},directives:[w.c,w.b,V.a,D.a,D.b,fi.a,et.b,et.a,et.c,w.a,a.l,qi.a],styles:[""]}),t})();function $i(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",11),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let Gi=(()=>{class t{constructor(t,e,n){this.logger=t,this.store=e,this.router=n,this.faExchangeAlt=m.n,this.faChartPie=m.g,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 b.a,new b.a,new b.a,new b.a]}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(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).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("cl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.currencyUnits=t.nodeSettings.currencyUnits,this.balances=t.nodeSettings.userPersona===f.w.OPERATOR?[{title:"Local Capacity",dataValue:t.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:t.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:t.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:t.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(t)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"Lightning Balance"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Qb(7,"rtl-currency-unit-converter",5),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",6),o.Qb(9,"fa-icon",1),o.Vb(10,"span",2),o.Kc(11,"Lightning Transactions"),o.Ub(),o.Ub(),o.Vb(12,"div",7),o.Vb(13,"mat-card"),o.Vb(14,"mat-card-content",4),o.Vb(15,"nav",8),o.Ic(16,$i,2,3,"div",9),o.Ub(),o.Vb(17,"div",10),o.Qb(18,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartPie),o.Db(6),o.oc("values",e.balances),o.Db(2),o.oc("icon",e.faExchangeAlt),o.Db(7),o.oc("ngForOf",e.links))},directives:[w.c,w.b,V.a,D.a,D.b,fi.a,et.e,i.n,w.a,a.l,et.d,a.h],styles:[""]}),t})();function Xi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",11),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let Wi=(()=>{class t{constructor(t,e){this.store=t,this.router=e,this.faMapSigns=m.w,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"failedtransactions",name:"Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a]}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(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link})}ngOnDestroy(){this.store.dispatch(new p.Db({})),this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"fa-icon",2),o.Vb(3,"span",3),o.Kc(4,"Routing"),o.Ub(),o.Ub(),o.Vb(5,"div",4),o.Vb(6,"mat-card",5),o.Vb(7,"mat-card-content",6),o.Vb(8,"div",7),o.Vb(9,"nav",8),o.Ic(10,Xi,2,3,"div",9),o.Ub(),o.Ub(),o.Vb(11,"div",10),o.Qb(12,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(2),o.oc("icon",e.faMapSigns),o.Db(8),o.oc("ngForOf",e.links))},directives:[w.c,w.b,V.a,w.a,D.a,D.b,et.e,i.n,a.l,et.d,a.h],styles:[""]}),t})();var Ji=n("dEYt");function Yi(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1,"Type"),o.Ub())}function Zi(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.type," ")}}function ta(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1,"Address"),o.Ub())}function ea(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.address," ")}}function na(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1,"Port"),o.Ub())}function ia(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.port," ")}}function aa(t,e){1&t&&(o.Vb(0,"th",28),o.Vb(1,"span",29),o.Kc(2,"Actions"),o.Ub(),o.Ub())}function oa(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",30),o.Vb(1,"span",29),o.Vb(2,"button",31),o.dc("copied",function(e){return o.zc(t),o.hc(2).onCopyNodeURI(e)}),o.Kc(3,"Copy Node URI"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc(2);o.Db(2),o.oc("payload",n.lookupResult.nodeid+"@"+t.address+":"+t.port)}}function sa(t,e){1&t&&o.Qb(0,"tr",32)}function ca(t,e){1&t&&o.Qb(0,"tr",33)}const la=function(t){return{"background-color":t}};function ra(t,e){if(1&t&&(o.Vb(0,"div",1),o.Qb(1,"mat-divider",2),o.Vb(2,"div",3),o.Vb(3,"h4",4),o.Kc(4,"Pub Key"),o.Ub(),o.Vb(5,"span",5),o.Kc(6),o.Ub(),o.Ub(),o.Qb(7,"mat-divider",6),o.Vb(8,"div",7),o.Vb(9,"div",3),o.Vb(10,"h4",4),o.Kc(11,"Alias"),o.Ub(),o.Vb(12,"span",8),o.Kc(13),o.Vb(14,"span",9),o.Kc(15),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Qb(16,"mat-divider",6),o.Vb(17,"div",7),o.Vb(18,"div",10),o.Vb(19,"h4",4),o.Kc(20,"Last Update"),o.Ub(),o.Vb(21,"span",8),o.Kc(22),o.Ub(),o.Ub(),o.Vb(23,"div",10),o.Vb(24,"h4",4),o.Kc(25,"Features"),o.Ub(),o.Vb(26,"span",8),o.Kc(27),o.Ub(),o.Ub(),o.Ub(),o.Qb(28,"mat-divider",6),o.Vb(29,"div",11),o.Vb(30,"h4",12),o.Kc(31,"Addresses"),o.Ub(),o.Vb(32,"div",13),o.Vb(33,"table",14,15),o.Tb(35,16),o.Ic(36,Yi,2,0,"th",17),o.Ic(37,Zi,2,1,"td",18),o.Sb(),o.Tb(38,19),o.Ic(39,ta,2,0,"th",17),o.Ic(40,ea,2,1,"td",18),o.Sb(),o.Tb(41,20),o.Ic(42,na,2,0,"th",17),o.Ic(43,ia,2,1,"td",18),o.Sb(),o.Tb(44,21),o.Ic(45,aa,3,0,"th",22),o.Ic(46,oa,4,1,"td",23),o.Sb(),o.Ic(47,sa,1,0,"tr",24),o.Ic(48,ca,1,0,"tr",25),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult.nodeid),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(t.lookupResult.alias),o.Db(1),o.oc("ngStyle",o.sc(13,la,"#"+t.lookupResult.color)),o.Db(1),o.Lc(t.lookupResult.color?"#"+t.lookupResult.color:""),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(t.lookupResult.last_timestamp_str),o.Db(5),o.Lc(t.lookupResult.features),o.Db(1),o.oc("inset",!0),o.Db(5),o.oc("dataSource",t.addresses),o.Db(14),o.oc("matHeaderRowDef",t.displayedColumns),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)}}let ba=(()=>{class t{constructor(t,e){this.logger=t,this.snackBar=e,this.displayedColumns=["type","address","port","actions"]}ngOnInit(){this.addresses=new at.o(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)(o.Pb(g.b),o.Pb(On.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-node-lookup"]],viewQuery:function(t,e){if(1&t&&o.Pc(it.a,!0),2&t){let t;o.vc(t=o.ec())&&(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","column","fxFlex","100","fxLayoutAlign","end start",1,"my-1"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text","w-100"],[1,"my-1",3,"inset"],["fxLayout","row"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxLayout","column","fxFlex","50","fxLayoutAlign","end start",1,"my-1"],["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","type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","port"],["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&&o.Ic(0,ra,49,15,"div",0),2&t&&o.oc("ngIf",e.lookupResult)},directives:[i.o,w.c,M.a,w.a,w.b,i.p,I.b,O.b,at.n,it.a,at.c,at.i,at.b,at.k,at.m,at.h,it.b,at.a,S.a,Ji.a,at.j,at.l],styles:[""]}),t})();function da(t,e){1&t&&(o.Vb(0,"h3",11),o.Kc(1,"Node 1"),o.Ub())}function ua(t,e){1&t&&(o.Vb(0,"h3",11),o.Kc(1,"Node 1 (Your Node)"),o.Ub())}function ha(t,e){1&t&&(o.Vb(0,"h3",11),o.Kc(1,"Node 2"),o.Ub())}function ma(t,e){1&t&&(o.Vb(0,"h3",11),o.Kc(1,"Node 2 (Your Node)"),o.Ub())}function fa(t,e){if(1&t&&(o.Vb(0,"div",1),o.Qb(1,"mat-divider"),o.Vb(2,"div",2),o.Vb(3,"div",3),o.Vb(4,"div",4),o.Ic(5,da,2,0,"h3",5),o.Ic(6,ua,2,0,"h3",5),o.Ub(),o.Qb(7,"mat-divider",6),o.Vb(8,"div",7),o.Vb(9,"h4",8),o.Kc(10,"Short Channel Id"),o.Ub(),o.Vb(11,"span",9),o.Kc(12),o.Ub(),o.Ub(),o.Qb(13,"mat-divider",6),o.Vb(14,"div",10),o.Vb(15,"h4",8),o.Kc(16,"Active"),o.Ub(),o.Vb(17,"span",9),o.Kc(18),o.Ub(),o.Ub(),o.Qb(19,"mat-divider",6),o.Vb(20,"div",10),o.Vb(21,"h4",8),o.Kc(22,"Last Update"),o.Ub(),o.Vb(23,"span",9),o.Kc(24),o.Ub(),o.Ub(),o.Qb(25,"mat-divider",6),o.Vb(26,"div",10),o.Vb(27,"h4",8),o.Kc(28,"Amount (mSats)"),o.Ub(),o.Vb(29,"span",9),o.Kc(30),o.Ub(),o.Ub(),o.Qb(31,"mat-divider",6),o.Vb(32,"div",10),o.Vb(33,"h4",8),o.Kc(34,"Base Fee (mSats)"),o.Ub(),o.Vb(35,"span",9),o.Kc(36),o.ic(37,"number"),o.Ub(),o.Ub(),o.Qb(38,"mat-divider",6),o.Vb(39,"div",10),o.Vb(40,"h4",8),o.Kc(41,"Channel Flags"),o.Ub(),o.Vb(42,"span",9),o.Kc(43),o.ic(44,"number"),o.Ub(),o.Ub(),o.Qb(45,"mat-divider",6),o.Vb(46,"div",10),o.Vb(47,"h4",8),o.Kc(48,"Delay"),o.Ub(),o.Vb(49,"span",9),o.Kc(50),o.ic(51,"number"),o.Ub(),o.Ub(),o.Qb(52,"mat-divider",6),o.Vb(53,"div",10),o.Vb(54,"h4",8),o.Kc(55,"Destination"),o.Ub(),o.Vb(56,"span",9),o.Kc(57),o.Ub(),o.Ub(),o.Qb(58,"mat-divider",6),o.Vb(59,"div",10),o.Vb(60,"h4",8),o.Kc(61,"Fee/Millionth"),o.Ub(),o.Vb(62,"span",9),o.Kc(63),o.ic(64,"number"),o.Ub(),o.Ub(),o.Qb(65,"mat-divider",6),o.Vb(66,"div",10),o.Vb(67,"h4",8),o.Kc(68,"Max Htlc (mSat)"),o.Ub(),o.Vb(69,"span",9),o.Kc(70),o.Ub(),o.Ub(),o.Qb(71,"mat-divider",6),o.Vb(72,"div",10),o.Vb(73,"h4",8),o.Kc(74,"Min Htlc (mSat)"),o.Ub(),o.Vb(75,"span",9),o.Kc(76),o.Ub(),o.Ub(),o.Qb(77,"mat-divider",6),o.Vb(78,"div",10),o.Vb(79,"h4",8),o.Kc(80,"Message Flags"),o.Ub(),o.Vb(81,"span",9),o.Kc(82),o.ic(83,"number"),o.Ub(),o.Ub(),o.Qb(84,"mat-divider",6),o.Vb(85,"div",10),o.Vb(86,"h4",8),o.Kc(87,"Public"),o.Ub(),o.Vb(88,"span",9),o.Kc(89),o.Ub(),o.Ub(),o.Qb(90,"mat-divider",6),o.Vb(91,"div",10),o.Vb(92,"h4",8),o.Kc(93,"Satoshis"),o.Ub(),o.Vb(94,"span",9),o.Kc(95),o.ic(96,"number"),o.Ub(),o.Ub(),o.Qb(97,"mat-divider",6),o.Vb(98,"div",10),o.Vb(99,"h4",8),o.Kc(100,"Source"),o.Ub(),o.Vb(101,"span",9),o.Kc(102),o.Ub(),o.Ub(),o.Ub(),o.Vb(103,"div",3),o.Vb(104,"div"),o.Ic(105,ha,2,0,"h3",5),o.Ic(106,ma,2,0,"h3",5),o.Ub(),o.Qb(107,"mat-divider",6),o.Vb(108,"div",7),o.Vb(109,"h4",8),o.Kc(110,"Short Channel Id"),o.Ub(),o.Vb(111,"span",9),o.Kc(112),o.Ub(),o.Ub(),o.Qb(113,"mat-divider",6),o.Vb(114,"div",10),o.Vb(115,"h4",8),o.Kc(116,"Active"),o.Ub(),o.Vb(117,"span",9),o.Kc(118),o.Ub(),o.Ub(),o.Qb(119,"mat-divider",6),o.Vb(120,"div",10),o.Vb(121,"h4",8),o.Kc(122,"Last Update"),o.Ub(),o.Vb(123,"span",9),o.Kc(124),o.Ub(),o.Ub(),o.Qb(125,"mat-divider",6),o.Vb(126,"div",10),o.Vb(127,"h4",8),o.Kc(128,"Amount (mSats)"),o.Ub(),o.Vb(129,"span",9),o.Kc(130),o.Ub(),o.Ub(),o.Qb(131,"mat-divider",6),o.Vb(132,"div",10),o.Vb(133,"h4",8),o.Kc(134,"Base Fee (mSats)"),o.Ub(),o.Vb(135,"span",9),o.Kc(136),o.ic(137,"number"),o.Ub(),o.Ub(),o.Qb(138,"mat-divider",6),o.Vb(139,"div",10),o.Vb(140,"h4",8),o.Kc(141,"Channel Flags"),o.Ub(),o.Vb(142,"span",9),o.Kc(143),o.ic(144,"number"),o.Ub(),o.Ub(),o.Qb(145,"mat-divider",6),o.Vb(146,"div",10),o.Vb(147,"h4",8),o.Kc(148,"Delay"),o.Ub(),o.Vb(149,"span",9),o.Kc(150),o.ic(151,"number"),o.Ub(),o.Ub(),o.Qb(152,"mat-divider",6),o.Vb(153,"div",10),o.Vb(154,"h4",8),o.Kc(155,"Destination"),o.Ub(),o.Vb(156,"span",9),o.Kc(157),o.Ub(),o.Ub(),o.Qb(158,"mat-divider",6),o.Vb(159,"div",10),o.Vb(160,"h4",8),o.Kc(161,"Fee/Millionth"),o.Ub(),o.Vb(162,"span",9),o.Kc(163),o.ic(164,"number"),o.Ub(),o.Ub(),o.Qb(165,"mat-divider",6),o.Vb(166,"div",10),o.Vb(167,"h4",8),o.Kc(168,"Max Htlc (mSat)"),o.Ub(),o.Vb(169,"span",9),o.Kc(170),o.Ub(),o.Ub(),o.Qb(171,"mat-divider",6),o.Vb(172,"div",10),o.Vb(173,"h4",8),o.Kc(174,"Min Htlc (mSat)"),o.Ub(),o.Vb(175,"span",9),o.Kc(176),o.Ub(),o.Ub(),o.Qb(177,"mat-divider",6),o.Vb(178,"div",10),o.Vb(179,"h4",8),o.Kc(180,"Message Flags"),o.Ub(),o.Vb(181,"span",9),o.Kc(182),o.ic(183,"number"),o.Ub(),o.Ub(),o.Qb(184,"mat-divider",6),o.Vb(185,"div",10),o.Vb(186,"h4",8),o.Kc(187,"Public"),o.Ub(),o.Vb(188,"span",9),o.Kc(189),o.Ub(),o.Ub(),o.Qb(190,"mat-divider",6),o.Vb(191,"div",10),o.Vb(192,"h4",8),o.Kc(193,"Satoshis"),o.Ub(),o.Vb(194,"span",9),o.Kc(195),o.ic(196,"number"),o.Ub(),o.Ub(),o.Qb(197,"mat-divider",6),o.Vb(198,"div",10),o.Vb(199,"h4",8),o.Kc(200,"Source"),o.Ub(),o.Vb(201,"span",9),o.Kc(202),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(5),o.oc("ngIf",!t.node1_match),o.Db(1),o.oc("ngIf",t.node1_match),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].short_channel_id),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].active?"True":"False"),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].last_update_str),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].amount_msat),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(37,64,t.lookupResult[0].base_fee_millisatoshi)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(44,66,t.lookupResult[0].channel_flags)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(51,68,t.lookupResult[0].delay)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].destination),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(64,70,t.lookupResult[0].fee_per_millionth)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].htlc_maximum_msat),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].htlc_minimum_msat),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(83,72,t.lookupResult[0].message_flags)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].public?"Yes":"No"),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(96,74,t.lookupResult[0].satoshis)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[0].source),o.Db(3),o.oc("ngIf",!t.node2_match),o.Db(1),o.oc("ngIf",t.node2_match),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].short_channel_id),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].active?"True":"False"),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].last_update_str),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].amount_msat),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(137,76,t.lookupResult[1].base_fee_millisatoshi)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(144,78,t.lookupResult[1].channel_flags)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(151,80,t.lookupResult[1].delay)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].destination),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(164,82,t.lookupResult[1].fee_per_millionth)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].htlc_maximum_msat),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].htlc_minimum_msat),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(183,84,t.lookupResult[1].message_flags)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].public?"Yes":"No"),o.Db(1),o.oc("inset",!0),o.Db(5),o.Lc(o.jc(196,86,t.lookupResult[1].satoshis)),o.Db(2),o.oc("inset",!0),o.Db(5),o.Lc(t.lookupResult[1].source)}}let pa=(()=>{class t{constructor(t){this.store=t,this.node1_match=!1,this.node2_match=!1,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.lookupResult.length>0&&this.lookupResult[0].source===t.information.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===t.information.id&&(this.node2_match=!0)})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(t,e){1&t&&o.Ic(0,fa,203,88,"div",0),2&t&&o.oc("ngIf",e.lookupResult)},directives:[i.o,w.c,M.a,w.b,w.a],pipes:[i.f],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),t})();const ga=["form"];function ya(t,e){if(1&t&&(o.Vb(0,"mat-radio-button",21),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.oc("value",t.id)("checked",n.selectedFieldId===t.id),o.Db(1),o.Mc(" ",t.name," ")}}function va(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function xa(t,e){if(1&t&&(o.Vb(0,"div"),o.Qb(1,"rtl-cl-node-lookup",30),o.Ub()),2&t){const t=o.hc(3);o.Db(1),o.oc("lookupResult",t.nodeLookupValue)}}function wa(t,e){if(1&t&&(o.Vb(0,"span",28),o.Ic(1,xa,2,1,"div",29),o.Ub()),2&t){const t=o.hc(2),e=o.wc(24);o.Db(1),o.oc("ngIf",""!==t.nodeLookupValue.nodeid)("ngIfElse",e)}}function Va(t,e){if(1&t&&(o.Vb(0,"div"),o.Qb(1,"rtl-cl-channel-lookup",30),o.Ub()),2&t){const t=o.hc(3);o.Db(1),o.oc("lookupResult",t.channelLookupValue)}}function Ua(t,e){if(1&t&&(o.Vb(0,"span",28),o.Ic(1,Va,2,1,"div",29),o.Ub()),2&t){const t=o.hc(2),e=o.wc(24);o.Db(1),o.oc("ngIf",t.channelLookupValue.length>0)("ngIfElse",e)}}function Da(t,e){1&t&&(o.Vb(0,"span",28),o.Vb(1,"h3"),o.Kc(2,"Error! Unable to find details!"),o.Ub(),o.Ub())}function Ca(t,e){if(1&t&&(o.Vb(0,"div",22),o.Vb(1,"div",23),o.Vb(2,"span",24),o.Kc(3),o.Ub(),o.Ub(),o.Vb(4,"div",25),o.Ic(5,wa,2,2,"span",26),o.Ic(6,Ua,2,2,"span",26),o.Ic(7,Da,3,0,"span",27),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(3),o.Mc("",t.lookupFields[t.selectedFieldId].name," Details"),o.Db(1),o.oc("ngSwitch",t.selectedFieldId),o.Db(1),o.oc("ngSwitchCase",0),o.Db(1),o.oc("ngSwitchCase",1)}}function Sa(t,e){1&t&&(o.Vb(0,"h3"),o.Kc(1,"Error! Unable to find details!"),o.Ub())}const La=function(t){return{"mt-2":t}};let Ia=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.commonService=e,this.store=n,this.actions$=i,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=m.F,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions$.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t.type===p.pb||t.type===p.o)).subscribe(t=>{if(t.type===p.pb){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===p.o&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.store.dispatch(new st.F("Searching "+this.lookupFields[this.selectedFieldId].name+"...")),this.selectedFieldId){case 0:this.store.dispatch(new p.T(this.lookupKey.trim()));break;case 1:this.store.dispatch(new p.f({shortChannelID:this.lookupKey.trim(),showError:!1}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(x.a),o.Pb(y.h),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-lookups"]],viewQuery:function(t,e){if(1&t&&o.Ec(ga,!0),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first)}},decls:25,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","35","fxFlex.gt-md","25","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","65","fxFlex.gt-md","75","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["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",""],[1,"mr-4",3,"value","checked"],["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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"fa-icon",2),o.Vb(3,"span",3),o.Kc(4,"Graph Lookups"),o.Ub(),o.Ub(),o.Vb(5,"div",4),o.Vb(6,"mat-card",5),o.Vb(7,"mat-card-content",6),o.Vb(8,"form",7,8),o.Vb(10,"div",9),o.Vb(11,"mat-radio-group",10),o.dc("ngModelChange",function(t){return e.selectedFieldId=t})("change",function(t){return e.onSelectChange(t)}),o.Ic(12,ya,2,3,"mat-radio-button",11),o.Ub(),o.Ub(),o.Vb(13,"mat-form-field",12),o.Vb(14,"input",13,14),o.dc("change",function(){return e.clearLookupValue()})("ngModelChange",function(t){return e.lookupKey=t}),o.Ub(),o.Ic(16,va,2,1,"mat-error",15),o.Ub(),o.Vb(17,"div",16),o.Vb(18,"button",17),o.dc("click",function(){return e.resetData()}),o.Kc(19,"Clear"),o.Ub(),o.Vb(20,"button",18),o.dc("click",function(){return e.onLookup()}),o.Kc(21,"Lookup"),o.Ub(),o.Ub(),o.Ub(),o.Ic(22,Ca,8,4,"div",19),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(23,Sa,2,0,"ng-template",null,20,o.Jc)),2&t&&(o.Db(2),o.oc("icon",e.faSearch),o.Db(9),o.oc("ngModel",e.selectedFieldId),o.Db(1),o.oc("ngForOf",e.lookupFields),o.Db(1),o.oc("ngClass",o.sc(8,La,e.screenSize===e.screenSizeEnum.XS||e.screenSize===e.screenSizeEnum.SM)),o.Db(1),o.oc("placeholder",(null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder)||"Lookup Key")("ngModel",e.lookupKey),o.Db(2),o.oc("ngIf",!e.lookupKey),o.Db(6),o.oc("ngIf",e.flgSetLookupValue))},directives:[w.c,w.b,V.a,w.a,D.a,D.b,ct.u,ct.n,ct.o,Zt.b,ct.m,ct.p,i.n,K.c,i.m,I.a,lt.b,ct.c,ct.s,i.o,S.a,Zt.a,K.b,i.q,i.r,i.s,ba,pa],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 Fa=function(t){return t.KB="KB",t.KW="KW",t}({});let ka=(()=>{class t{constructor(){this.perkbw={}}ngOnInit(){}ngAfterContentChecked(){this.feeRateStyle===Fa.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===Fa.KW&&(this.perkbw=this.feeRates.perkw)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",flgLoading:"flgLoading"},decls:51,vars:24,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"div"),o.Vb(3,"h4",2),o.Kc(4,"Urgent"),o.Ub(),o.Vb(5,"div",3),o.Kc(6),o.ic(7,"number"),o.Ub(),o.Ub(),o.Vb(8,"div"),o.Vb(9,"h4",2),o.Kc(10,"Normal"),o.Ub(),o.Vb(11,"div",3),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Ub(),o.Vb(14,"div"),o.Vb(15,"h4",2),o.Kc(16,"Slow"),o.Ub(),o.Vb(17,"div",3),o.Kc(18),o.ic(19,"number"),o.Ub(),o.Ub(),o.Vb(20,"div"),o.Vb(21,"h4",2),o.Kc(22,"Opening Channel"),o.Ub(),o.Vb(23,"div",3),o.Kc(24),o.ic(25,"number"),o.Ub(),o.Ub(),o.Ub(),o.Vb(26,"div",1),o.Vb(27,"div"),o.Vb(28,"h4",2),o.Kc(29,"Min Acceptable"),o.Ub(),o.Vb(30,"div",3),o.Kc(31),o.ic(32,"number"),o.Ub(),o.Ub(),o.Vb(33,"div"),o.Vb(34,"h4",2),o.Kc(35,"Max Acceptable"),o.Ub(),o.Vb(36,"div",3),o.Kc(37),o.ic(38,"number"),o.Ub(),o.Ub(),o.Vb(39,"div"),o.Vb(40,"h4",2),o.Kc(41,"Mutual Close"),o.Ub(),o.Vb(42,"div",3),o.Kc(43),o.ic(44,"number"),o.Ub(),o.Ub(),o.Vb(45,"div"),o.Vb(46,"h4",2),o.Kc(47,"Unilateral Close"),o.Ub(),o.Vb(48,"div",3),o.Kc(49),o.ic(50,"number"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(6),o.Lc(o.jc(7,8,null==e.perkbw?null:e.perkbw.urgent)),o.Db(6),o.Lc(o.jc(13,10,null==e.perkbw?null:e.perkbw.normal)),o.Db(6),o.Lc(o.jc(19,12,null==e.perkbw?null:e.perkbw.slow)),o.Db(6),o.Lc(o.jc(25,14,null==e.feeRates||null==e.feeRates.onchain_fee_estimates?null:e.feeRates.onchain_fee_estimates.opening_channel_satoshis)),o.Db(7),o.Lc(o.jc(32,16,null==e.perkbw?null:e.perkbw.min_acceptable)),o.Db(6),o.Lc(o.jc(38,18,null==e.perkbw?null:e.perkbw.max_acceptable)),o.Db(6),o.Lc(o.jc(44,20,null==e.feeRates||null==e.feeRates.onchain_fee_estimates?null:e.feeRates.onchain_fee_estimates.mutual_close_satoshis)),o.Db(6),o.Lc(o.jc(50,22,null==e.feeRates||null==e.feeRates.onchain_fee_estimates?null:e.feeRates.onchain_fee_estimates.unilateral_close_satoshis)))},directives:[w.c,w.a,w.b],pipes:[i.f],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),t})();const Aa=function(t){return{"error-border":t}};function _a(t,e){if(1&t&&o.Qb(0,"rtl-cl-node-info",17),2&t){const t=o.hc(3);o.oc("information",t.information)("showColorFieldSeparately",!1)("ngClass",o.sc(3,Aa,"error"===t.flgLoading[0]))}}function Pa(t,e){if(1&t&&o.Qb(0,"rtl-cl-channel-status-info",18),2&t){const t=o.hc(3);o.oc("channelsStatus",t.channelsStatus)("ngClass",o.sc(2,Aa,"error"===t.flgLoading[0]))}}function Ta(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-info",19),2&t){const t=o.hc(3);o.oc("fees",t.fees)("ngClass",o.sc(2,Aa,"error"===t.flgLoading[1]))}}function Ka(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-rates",20),2&t){const t=o.hc(3);o.oc("flgLoading",t.flgLoading[2])("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")}}function Ra(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-rates",20),2&t){const t=o.hc(3);o.oc("flgLoading",t.flgLoading[2])("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")}}function Ma(t,e){if(1&t&&(o.Vb(0,"mat-grid-tile",4),o.Vb(1,"div",5),o.Vb(2,"div",6),o.Vb(3,"div",7),o.Qb(4,"fa-icon",8),o.Vb(5,"span"),o.Kc(6),o.Ub(),o.Ub(),o.Ub(),o.Vb(7,"div",9),o.Vb(8,"mat-card",10),o.Vb(9,"mat-card-content",11),o.Vb(10,"div",12),o.Ic(11,_a,1,5,"rtl-cl-node-info",13),o.Ic(12,Pa,1,4,"rtl-cl-channel-status-info",14),o.Ic(13,Ta,1,4,"rtl-cl-fee-info",15),o.Ic(14,Ka,1,3,"rtl-cl-fee-rates",16),o.Ic(15,Ra,1,3,"rtl-cl-fee-rates",16),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.oc("colspan",t.cols)("rowspan",t.rows),o.Db(4),o.oc("icon",t.icon),o.Db(2),o.Lc(t.title),o.Db(4),o.oc("ngSwitch",t.id),o.Db(1),o.oc("ngSwitchCase","node"),o.Db(1),o.oc("ngSwitchCase","status"),o.Db(1),o.oc("ngSwitchCase","fee"),o.Db(1),o.oc("ngSwitchCase","feeRatesKB"),o.Db(1),o.oc("ngSwitchCase","feeRatesKW")}}function Oa(t,e){if(1&t&&(o.Vb(0,"mat-grid-list",2),o.Ic(1,Ma,16,10,"mat-grid-tile",3),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngForOf",t.nodeCardsOperator)}}function Ea(t,e){if(1&t&&o.Qb(0,"rtl-cl-node-info",17),2&t){const t=o.hc(3);o.oc("information",t.information)("showColorFieldSeparately",!1)("ngClass",o.sc(3,Aa,"error"===t.flgLoading[0]))}}function za(t,e){if(1&t&&o.Qb(0,"rtl-cl-channel-status-info",18),2&t){const t=o.hc(3);o.oc("channelsStatus",t.channelsStatus)("ngClass",o.sc(2,Aa,"error"===t.flgLoading[0]))}}function Ba(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-info",19),2&t){const t=o.hc(3);o.oc("fees",t.fees)("ngClass",o.sc(2,Aa,"error"===t.flgLoading[1]))}}function Na(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-rates",20),2&t){const t=o.hc(3);o.oc("flgLoading",t.flgLoading[2])("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")}}function qa(t,e){if(1&t&&o.Qb(0,"rtl-cl-fee-rates",20),2&t){const t=o.hc(3);o.oc("flgLoading",t.flgLoading[2])("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")}}function Qa(t,e){if(1&t&&(o.Vb(0,"mat-grid-tile",4),o.Vb(1,"div",5),o.Vb(2,"div",6),o.Vb(3,"div",21),o.Qb(4,"fa-icon",8),o.Vb(5,"span"),o.Kc(6),o.Ub(),o.Ub(),o.Ub(),o.Vb(7,"div",9),o.Vb(8,"mat-card",10),o.Vb(9,"mat-card-content",11),o.Vb(10,"div",12),o.Ic(11,Ea,1,5,"rtl-cl-node-info",13),o.Ic(12,za,1,4,"rtl-cl-channel-status-info",14),o.Ic(13,Ba,1,4,"rtl-cl-fee-info",15),o.Ic(14,Na,1,3,"rtl-cl-fee-rates",16),o.Ic(15,qa,1,3,"rtl-cl-fee-rates",16),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.oc("colspan",t.cols)("rowspan",t.rows),o.Db(4),o.oc("icon",t.icon),o.Db(2),o.Lc(t.title),o.Db(4),o.oc("ngSwitch",t.id),o.Db(1),o.oc("ngSwitchCase","node"),o.Db(1),o.oc("ngSwitchCase","status"),o.Db(1),o.oc("ngSwitchCase","fee"),o.Db(1),o.oc("ngSwitchCase","feeRatesKB"),o.Db(1),o.oc("ngSwitchCase","feeRatesKW")}}function Ha(t,e){if(1&t&&(o.Vb(0,"mat-grid-list",2),o.Ic(1,Qa,16,10,"mat-grid-tile",3),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngForOf",t.nodeCardsMerchant)}}let ja=(()=>{class t{constructor(t,e,n){this.logger=t,this.commonService=e,this.store=n,this.faBolt=m.e,this.faServer=m.G,this.faNetworkWired=m.y,this.selNode={},this.information={},this.channelsStatus={},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=f.q,this.userPersonaEnum=f.w,this.flgLoading=[!0,!0,!0],this.unSubs=[new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:6,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:6,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:6,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:6,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:3,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:3,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:3,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:3,rows:4}])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchInfo"===t.action&&(this.flgLoading[0]="error"),"FetchFees"===t.action&&(this.flgLoading[1]="error"),"FetchFeeRates"===t.action&&(this.flgLoading[2]="error")}),this.selNode=t.nodeSettings,this.information=t.information,"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.information.id),this.fees=t.fees,this.fees.totalTxCount=0,t.forwardingHistory&&t.forwardingHistory.forwarding_events&&t.forwardingHistory.forwarding_events.length&&(this.fees.totalTxCount=t.forwardingHistory.forwarding_events.filter(t=>"settled"===t.status).length),"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!this.fees.feeCollected),this.channelsStatus={active:{channels:t.information.num_active_channels,capacity:0},inactive:{channels:t.information.num_inactive_channels,capacity:0},pending:{channels:t.information.num_pending_channels,capacity:0}},this.feeRatesPerKB=t.feeRatesPerKB,this.feeRatesPerKW=t.feeRatesPerKW,"error"!==this.flgLoading[2]&&(this.flgLoading[2]=!this.feeRatesPerKB||!this.feeRatesPerKW),this.logger.info(t)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(x.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","110px",4,"ngIf"],["cols","6","rowHeight","110px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxFlex","100",1,"dashboard-card-content"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"fees","ngClass",4,"ngSwitchCase"],["class","h-100",3,"flgLoading","feeRates","feeRateStyle",4,"ngSwitchCase"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass"],["fxFlex","100",3,"channelsStatus","ngClass"],["fxFlex","100",3,"fees","ngClass"],[1,"h-100",3,"flgLoading","feeRates","feeRateStyle"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Ic(1,Oa,2,1,"mat-grid-list",1),o.Ic(2,Ha,2,1,"mat-grid-list",1),o.Ub()),2&t&&(o.Db(1),o.oc("ngIf",e.selNode.userPersona===e.userPersonaEnum.OPERATOR),o.Db(1),o.oc("ngIf",e.selNode.userPersona===e.userPersonaEnum.MERCHANT))},directives:[w.c,w.b,i.o,U.a,i.n,U.c,w.a,V.a,D.a,D.b,i.q,i.r,P,i.m,I.a,Q,q,ka],styles:[""]}),t})();function $a(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",8),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let Ga=(()=>{class t{constructor(t){this.router=t,this.faUserCheck=m.L,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a]}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(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-sign-verify-message"]],decls:11,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"],["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&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"Sign/Verify Message"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Vb(7,"nav",5),o.Ic(8,$a,2,3,"div",6),o.Ub(),o.Vb(9,"div",7),o.Qb(10,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faUserCheck),o.Db(7),o.oc("ngForOf",e.links))},directives:[w.c,w.b,V.a,D.a,D.b,et.e,i.n,w.a,a.l,et.d,a.h],styles:[""]}),t})();var Xa=n("Ysfc");function Wa(t,e){if(1&t&&(o.Vb(0,"mat-option",7),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Mc(" ",t.addressTp," ")}}let Ja=(()=>{class t{constructor(t,e){this.store=t,this.clEffects=e,this.addressTypes=f.a,this.selectedAddressType=f.a[0],this.newAddress=""}ngOnInit(){}onGenerateAddress(){this.store.dispatch(new st.F("Getting New Address...")),this.store.dispatch(new p.O(this.selectedAddressType)),this.clEffects.setNewAddressCL.pipe(Object(Jt.a)(1)).subscribe(t=>{this.newAddress=t,this.store.dispatch(new st.C({width:"58%",data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:Xa.a}}))})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(Yt.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x-large"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-form-field",2),o.Vb(3,"mat-select",3),o.dc("ngModelChange",function(t){return e.selectedAddressType=t}),o.Ic(4,Wa,2,2,"mat-option",4),o.Ub(),o.Ub(),o.Vb(5,"div",5),o.Vb(6,"button",6),o.dc("click",function(){return e.onGenerateAddress()}),o.Kc(7,"Generate Address"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("ngModel",e.selectedAddressType),o.Db(1),o.oc("ngForOf",e.addressTypes))},directives:[w.c,w.b,K.c,w.a,dt.a,ct.m,ct.p,i.n,S.a,ht.m],styles:[""]}),t})(),Ya=(()=>{class t{constructor(t,e){this.store=t,this.activatedRoute=e,this.sweepAll=!1,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.activatedRoute.data.pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>this.sweepAll=t.sweepAll)}openSendFundsModal(){this.store.dispatch(new st.C({data:{sweepAll:this.sweepAll,component:mi}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(a.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"button",2),o.dc("click",function(){return e.openSendFundsModal()}),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.Lc(e.sweepAll?"Sweep All":"Send Funds"))},directives:[w.c,w.a,w.b,S.a],styles:[""]}),t})();var Za=n("JX91"),to=n("lJxs"),eo=n("hNFU"),no=n("vrAh");const io=["form"];function ao(t,e){if(1&t&&(o.Vb(0,"mat-option",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Lc(t.alias?t.alias:t.id?t.id:"")}}function oo(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Peer alias is required."),o.Ub())}function so(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Peer not found in the list."),o.Ub())}function co(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-form-field",36),o.Vb(1,"input",37),o.dc("change",function(){return o.zc(t),o.hc().onSelectedPeerChanged()}),o.Ub(),o.Vb(2,"mat-autocomplete",38,39),o.dc("optionSelected",function(){return o.zc(t),o.hc().onSelectedPeerChanged()}),o.Ic(4,ao,2,2,"mat-option",24),o.ic(5,"async"),o.Ub(),o.Ic(6,oo,2,0,"mat-error",17),o.Ic(7,so,2,0,"mat-error",17),o.Ub()}if(2&t){const t=o.wc(3),e=o.hc();o.Db(1),o.oc("formControl",e.selectedPeer)("matAutocomplete",t),o.Db(1),o.oc("displayWith",e.displayFn),o.Db(2),o.oc("ngForOf",o.jc(5,6,e.filteredPeers)),o.Db(2),o.oc("ngIf",null==e.selectedPeer.errors?null:e.selectedPeer.errors.required),o.Db(1),o.oc("ngIf",null==e.selectedPeer.errors?null:e.selectedPeer.errors.notfound)}}function lo(t,e){1&t&&o.Rb(0)}function ro(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function bo(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("Amount must be less than or equal to ",t.totalBalance,".")}}function uo(t,e){if(1&t&&(o.Vb(0,"mat-option",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t.feeRateId),o.Db(1),o.Mc(" ",t.feeRateType," ")}}function ho(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Min Confirmation Blocks is required."),o.Ub())}function mo(t,e){if(1&t&&(o.Vb(0,"mat-option",40),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Mc("",o.jc(2,2,t.value)," Sats")}}function fo(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",12),o.Vb(1,"mat-form-field",22),o.Vb(2,"mat-select",41),o.dc("selectionChange",function(e){return o.zc(t),o.hc().onUTXOSelectionChange(e)})("valueChange",function(e){return o.zc(t),o.hc().selUTXOs=e}),o.Vb(3,"mat-select-trigger"),o.Kc(4),o.ic(5,"number"),o.Ub(),o.Ic(6,mo,3,4,"mat-option",24),o.Ub(),o.Ub(),o.Vb(7,"mat-slide-toggle",42),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().flgUseAllBalance=e})("change",function(){return o.zc(t),o.hc().onUTXOAllBalanceChange()}),o.Kc(8," Use selected UTXOs balance "),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(2),o.oc("value",t.selUTXOs),o.Db(2),o.Nc("",o.jc(5,6,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),o.Db(2),o.oc("ngForOf",t.transactions),o.Db(1),o.oc("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function po(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.channelConnectionError)}}function go(t,e){if(1&t&&(o.Vb(0,"div",43),o.Qb(1,"fa-icon",44),o.Ic(2,po,2,1,"span",17),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.channelConnectionError)}}function yo(t,e){if(1&t&&(o.Vb(0,"mat-expansion-panel",46),o.Vb(1,"mat-expansion-panel-header"),o.Vb(2,"mat-panel-title"),o.Vb(3,"span"),o.Kc(4,"Peer: \xa0"),o.Ub(),o.Vb(5,"strong",47),o.Kc(6),o.Ub(),o.Ub(),o.Ub(),o.Vb(7,"div",9),o.Vb(8,"div",0),o.Vb(9,"div",36),o.Vb(10,"h4",48),o.Kc(11,"Pubkey"),o.Ub(),o.Vb(12,"span",49),o.Kc(13),o.Ub(),o.Ub(),o.Ub(),o.Qb(14,"mat-divider",50),o.Vb(15,"div",0),o.Vb(16,"div",51),o.Vb(17,"h4",48),o.Kc(18,"Address"),o.Ub(),o.Vb(19,"span",52),o.Kc(20),o.Ub(),o.Ub(),o.Vb(21,"div",51),o.Vb(22,"h4",48),o.Kc(23,"Connected"),o.Ub(),o.Vb(24,"span",52),o.Kc(25),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.hc(2);o.Db(6),o.Lc((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.id)),o.Db(7),o.Lc(t.peer.id),o.Db(7),o.Lc(null==t.peer?null:t.peer.netaddr),o.Db(5),o.Lc(t.peer.connected?"True":"False")}}function vo(t,e){if(1&t&&o.Ic(0,yo,26,4,"mat-expansion-panel",45),2&t){const t=o.hc();o.oc("ngIf",t.peer)}}let xo=(()=>{class t{constructor(t,e,n,i,a){this.dialogRef=t,this.data=e,this.store=n,this.actions$=i,this.decimalPipe=a,this.selectedPeer=new ct.e,this.faExclamationTriangle=m.o,this.isCompatibleVersion=!1,this.transactions=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=f.j,this.selFeeRate="",this.flgMinConf=!1,this.minConfValue=null,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.transactions=this.data.message.transactions,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(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t.type===p.o||t.type===p.r)).subscribe(t=>{t.type===p.o&&"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message),t.type===p.r&&this.dialogRef.close()});let t="",e="";this.sortedPeers=this.peers.sort((n,i)=>(t=n.alias?n.alias.toLowerCase():n.id?n.id.toLowerCase():"",e=i.alias?i.alias.toLowerCase():n.id.toLowerCase(),t<e?-1:t>e?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe(Object(d.a)(this.unSubs[1]),Object(Za.a)(""),Object(to.a)(t=>"string"==typeof t?t:t.alias?t.alias:t.id),Object(to.a)(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.id?t.id:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id: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].id&&(this.selectedPubkey=t[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){t&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+this.feeRateTypes.find(t=>t.feeRateId===this.selFeeRate).feeRateType),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(t){let e={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((t,n)=>(e.value=t.value+n.value,e)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue)return!0;let t={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,feeRate:this.selFeeRate,minconf:this.flgMinConf?this.minConfValue:null};this.selUTXOs.length&&this.selUTXOs.length>0&&(t.utxos=[],this.selUTXOs.forEach(e=>t.utxos.push(e.txid+":"+e.output))),this.store.dispatch(new st.F("Opening Channel...")),this.store.dispatch(new p.wb(t))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(y.h),o.Pb(v.a),o.Pb(i.f))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-open-channel"]],viewQuery:function(t,e){if(1&t&&o.Ec(io,!0),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first)}},decls:54,vars:29,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["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,"mt-5px"],["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","disabled","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","fxLayoutAlign","start end"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",1,"mr-2",3,"ngModel","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",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","7","type","reset",1,"mr-1"],["autoFocus","","mat-flat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["fxFlex","100"],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","48","tabindex","7","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.dc("click",function(){return e.onClose()}),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"form",7,8),o.dc("submit",function(){return e.onOpenChannel()})("reset",function(){return e.resetData()}),o.Vb(11,"div",9),o.Ic(12,co,8,8,"mat-form-field",10),o.Ub(),o.Ic(13,lo,1,0,"ng-container",11),o.Vb(14,"div",9),o.Vb(15,"div",12),o.Vb(16,"mat-form-field",13),o.Vb(17,"input",14,15),o.dc("ngModelChange",function(t){return e.fundingAmount=t}),o.Ub(),o.Vb(19,"mat-hint"),o.Kc(20),o.ic(21,"number"),o.Ub(),o.Vb(22,"span",16),o.Kc(23),o.Ub(),o.Ic(24,ro,2,0,"mat-error",17),o.Ic(25,bo,2,1,"mat-error",17),o.Ub(),o.Vb(26,"div",18),o.Vb(27,"mat-slide-toggle",19),o.dc("ngModelChange",function(t){return e.isPrivate=t}),o.Kc(28,"Private Channel"),o.Ub(),o.Ub(),o.Ub(),o.Vb(29,"mat-expansion-panel",20),o.dc("closed",function(){return e.onAdvancedPanelToggle(!0)})("opened",function(){return e.onAdvancedPanelToggle(!1)}),o.Vb(30,"mat-expansion-panel-header"),o.Vb(31,"mat-panel-title"),o.Vb(32,"span"),o.Kc(33),o.Ub(),o.Ub(),o.Ub(),o.Vb(34,"div",21),o.Vb(35,"div",12),o.Vb(36,"mat-form-field",22),o.Vb(37,"mat-select",23),o.dc("valueChange",function(t){return e.selFeeRate=t}),o.Ic(38,uo,2,2,"mat-option",24),o.Ub(),o.Ub(),o.Vb(39,"div",25),o.Vb(40,"mat-checkbox",26),o.dc("ngModelChange",function(t){return e.flgMinConf=t})("change",function(){return e.flgMinConf?e.selFeeRate=null:e.minConfValue=null}),o.Ub(),o.Vb(41,"mat-form-field",27),o.Vb(42,"input",28,29),o.dc("ngModelChange",function(t){return e.minConfValue=t}),o.Ub(),o.Ic(44,ho,2,0,"mat-error",17),o.Ub(),o.Ub(),o.Ub(),o.Ic(45,fo,9,8,"div",30),o.Ub(),o.Ub(),o.Ub(),o.Ic(46,go,3,2,"div",31),o.Vb(47,"div",32),o.Vb(48,"button",33),o.Kc(49,"Clear Fields"),o.Ub(),o.Vb(50,"button",34),o.Kc(51,"Open Channel"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(52,vo,1,1,"ng-template",null,35,o.Jc)),2&t){const t=o.wc(18),n=o.wc(53);o.Db(5),o.Lc(e.alertTitle),o.Db(7),o.oc("ngIf",!e.peer&&e.peers&&e.peers.length>0),o.Db(1),o.oc("ngTemplateOutlet",n),o.Db(4),o.oc("ngModel",e.fundingAmount)("step",1e3)("min",1)("max",e.totalBalance)("disabled",e.flgUseAllBalance),o.Db(3),o.Nc("Remaining Bal: ",o.jc(21,27,e.totalBalance-(e.fundingAmount?e.fundingAmount:0)),"",e.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),o.Db(3),o.Mc(" ",null==e.information?null:e.information.smaller_currency_unit," "),o.Db(1),o.oc("ngIf",(null==t.errors?null:t.errors.required)||!e.fundingAmount),o.Db(1),o.oc("ngIf",null==t.errors?null:t.errors.max),o.Db(2),o.oc("ngModel",e.isPrivate),o.Db(6),o.Lc(e.advancedTitle),o.Db(4),o.oc("value",e.selFeeRate)("disabled",e.flgMinConf),o.Db(1),o.oc("ngForOf",e.feeRateTypes),o.Db(2),o.oc("ngModel",e.flgMinConf),o.Db(2),o.oc("ngModel",e.minConfValue)("step",1)("min",0)("required",e.flgMinConf)("disabled",!e.flgMinConf),o.Db(2),o.oc("ngIf",e.flgMinConf&&!e.minConfValue),o.Db(1),o.oc("ngIf",e.isCompatibleVersion),o.Db(1),o.oc("ngIf",""!==e.channelConnectionError)}},directives:[w.c,w.a,D.c,w.b,S.a,D.b,ct.u,ct.n,ct.o,i.o,i.t,K.c,lt.b,ct.q,ct.c,bt.a,eo.a,ct.s,ct.m,ct.p,K.f,K.g,ut.a,zn.c,zn.e,zn.f,dt.a,i.n,En.a,rt.a,no.c,ct.f,no.a,ht.m,K.b,dt.c,R.a,V.a,M.a],pipes:[i.f,i.b],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),t})();function wo(t,e){if(1&t&&(o.Vb(0,"span",7),o.Kc(1,"Open"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.openChannels)}}function Vo(t,e){if(1&t&&(o.Vb(0,"span",7),o.Kc(1,"Pending/Inactive"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.pendingChannels)}}let Uo=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.store=e,this.commonService=n,this.router=i,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.transactions=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).subscribe(t=>{this.activeLink=this.links.findIndex(e=>e.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("cl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{t.allChannels&&t.allChannels.length?(this.openChannels=0,this.pendingChannels=0,t.allChannels.forEach(t=>{"CHANNELD_NORMAL"===t.state&&t.connected?this.openChannels++:this.pendingChannels++})):(this.openChannels=0,this.pendingChannels=0),this.selNode=t.nodeSettings,this.information=t.information,this.peers=t.peers,this.transactions=this.commonService.sortAscByKey(t.transactions.filter(t=>"confirmed"===t.status),"value"),this.totalBalance=t.balance.totalBalance,this.logger.info(t)})}onOpenChannel(){const t={peers:this.peers,information:this.information,balance:this.totalBalance,transactions:this.transactions,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch(new st.C({data:{alertTitle:"Open Channel",message:t,component:xo}}))}onSelectedTabChange(t){this.router.navigateByUrl("/cl/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(x.a),o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"mt-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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"button",2),o.dc("click",function(){return e.onOpenChannel()}),o.Kc(3,"Open Channel"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-tab-group",4),o.dc("selectedIndexChange",function(t){return e.activeLink=t})("selectedTabChange",function(t){return e.onSelectedTabChange(t)}),o.Vb(6,"mat-tab"),o.Ic(7,wo,2,1,"ng-template",5),o.Ub(),o.Vb(8,"mat-tab"),o.Ic(9,Vo,2,1,"ng-template",5),o.Ub(),o.Ub(),o.Vb(10,"div",6),o.Qb(11,"router-outlet"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.oc("selectedIndex",e.activeLink))},directives:[w.c,w.a,w.b,S.a,et.b,et.a,et.c,a.l,qi.a],styles:[""]}),t})();function Do(t,e){if(1&t&&(o.Vb(0,"div"),o.Qb(1,"mat-divider",13),o.Vb(2,"div",9),o.Vb(3,"div",14),o.Vb(4,"h4",11),o.Kc(5,"Funding Transaction Id"),o.Ub(),o.Vb(6,"span",12),o.Kc(7),o.Ub(),o.Ub(),o.Ub(),o.Qb(8,"mat-divider",13),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(t.channel.funding_txid),o.Db(1),o.oc("inset",!0)}}function Co(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"Show Advanced"),o.Ub())}function So(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"Hide Advanced"),o.Ub())}function Lo(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",24),o.dc("copied",function(e){return o.zc(t),o.hc().onCopyChanID(e)}),o.Kc(1,"Copy Short Channel ID"),o.Ub()}if(2&t){const t=o.hc();o.oc("payload",t.channel.short_channel_id)}}function Io(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",25),o.dc("click",function(){return o.zc(t),o.hc().onClose()}),o.Kc(1,"OK"),o.Ub()}}const Fo=function(t){return{"xs-scroll-y":t}},ko=function(t,e){return{"mt-2":t,"mt-1":e}};let Ao=(()=>{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=m.D,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=f.q}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Short channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(g.b),o.Pb(x.a),o.Pb(On.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-channel-information"]],decls:93,vars:39,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"padding-gap-large","pl-3"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header","mb-1"],["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"],[3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","100"],["fxFlex","25"],[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",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Qb(4,"fa-icon",4),o.Vb(5,"span",5),o.Kc(6,"Channel Information"),o.Ub(),o.Ub(),o.Vb(7,"button",6),o.dc("click",function(){return e.onClose()}),o.Kc(8,"X"),o.Ub(),o.Ub(),o.Vb(9,"mat-card-content",7),o.Vb(10,"div",8),o.Vb(11,"div",9),o.Vb(12,"div",10),o.Vb(13,"h4",11),o.Kc(14,"Short Channel ID"),o.Ub(),o.Vb(15,"span",12),o.Kc(16),o.Ub(),o.Ub(),o.Vb(17,"div",10),o.Vb(18,"h4",11),o.Kc(19,"Peer Alias"),o.Ub(),o.Vb(20,"span",12),o.Kc(21),o.Ub(),o.Ub(),o.Ub(),o.Qb(22,"mat-divider",13),o.Vb(23,"div",9),o.Vb(24,"div",14),o.Vb(25,"h4",11),o.Kc(26,"Channel ID"),o.Ub(),o.Vb(27,"span",12),o.Kc(28),o.Ub(),o.Ub(),o.Ub(),o.Qb(29,"mat-divider",13),o.Vb(30,"div",9),o.Vb(31,"div",14),o.Vb(32,"h4",11),o.Kc(33,"Peer Public Key"),o.Ub(),o.Vb(34,"span",12),o.Kc(35),o.Ub(),o.Ub(),o.Ub(),o.Qb(36,"mat-divider",13),o.Vb(37,"div",9),o.Vb(38,"div",15),o.Vb(39,"h4",11),o.Kc(40,"mSatoshi to Us"),o.Ub(),o.Vb(41,"span",16),o.Kc(42),o.ic(43,"number"),o.Ub(),o.Ub(),o.Vb(44,"div",15),o.Vb(45,"h4",11),o.Kc(46,"Spendable (mSats)"),o.Ub(),o.Vb(47,"span",16),o.Kc(48),o.ic(49,"number"),o.Ub(),o.Ub(),o.Vb(50,"div",15),o.Vb(51,"h4",11),o.Kc(52,"Total (mSats)"),o.Ub(),o.Vb(53,"span",16),o.Kc(54),o.ic(55,"number"),o.Ub(),o.Ub(),o.Vb(56,"div",15),o.Vb(57,"h4",11),o.Kc(58,"State"),o.Ub(),o.Vb(59,"span",16),o.Kc(60),o.Ub(),o.Ub(),o.Ub(),o.Qb(61,"mat-divider",13),o.Vb(62,"div",9),o.Vb(63,"div",15),o.Vb(64,"h4",11),o.Kc(65,"Our Reserve (Sats)"),o.Ub(),o.Vb(66,"span",16),o.Kc(67),o.ic(68,"number"),o.Ub(),o.Ub(),o.Vb(69,"div",15),o.Vb(70,"h4",11),o.Kc(71,"Their Reserve (Sats)"),o.Ub(),o.Vb(72,"span",16),o.Kc(73),o.ic(74,"number"),o.Ub(),o.Ub(),o.Vb(75,"div",15),o.Vb(76,"h4",11),o.Kc(77,"Connected"),o.Ub(),o.Vb(78,"span",16),o.Kc(79),o.Ub(),o.Ub(),o.Vb(80,"div",15),o.Vb(81,"h4",11),o.Kc(82,"Private"),o.Ub(),o.Vb(83,"span",16),o.Kc(84),o.Ub(),o.Ub(),o.Ub(),o.Ic(85,Do,9,3,"div",17),o.Vb(86,"div",18),o.Vb(87,"button",19),o.dc("click",function(){return e.onShowAdvanced()}),o.Ic(88,Co,2,0,"p",20),o.Ic(89,So,2,0,"ng-template",null,21,o.Jc),o.Ub(),o.Ic(91,Lo,2,1,"button",22),o.Ic(92,Io,2,0,"button",23),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.wc(90);o.Db(4),o.oc("icon",e.faReceipt),o.Db(5),o.oc("ngClass",o.sc(34,Fo,e.screenSize===e.screenSizeEnum.XS)),o.Db(7),o.Lc(e.channel.short_channel_id),o.Db(5),o.Lc(e.channel.alias),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(e.channel.channel_id),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(e.channel.id),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(o.jc(43,24,e.channel.msatoshi_to_us)),o.Db(6),o.Lc(o.jc(49,26,e.channel.spendable_msatoshi)),o.Db(6),o.Lc(o.jc(55,28,e.channel.msatoshi_total)),o.Db(6),o.Lc(e.channel.state),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(o.jc(68,30,e.channel.our_channel_reserve_satoshis)),o.Db(6),o.Lc(o.jc(74,32,e.channel.their_channel_reserve_satoshis)),o.Db(6),o.Lc(e.channel.connected?"Yes":"No"),o.Db(5),o.Lc(e.channel.private?"Yes":"No"),o.Db(1),o.oc("ngIf",e.showAdvanced),o.Db(1),o.oc("ngClass",o.tc(36,ko,!e.showAdvanced,e.showAdvanced)),o.Db(2),o.oc("ngIf",!e.showAdvanced)("ngIfElse",t),o.Db(3),o.oc("ngIf",e.showCopy),o.Db(1),o.oc("ngIf",!e.showCopy)}},directives:[w.c,w.b,w.a,D.c,V.a,S.a,D.b,i.m,I.a,M.a,i.o,rt.a,Ji.a],pipes:[i.f],styles:[""]}),t})();function _o(t,e){1&t&&o.Qb(0,"mat-progress-bar",33)}function Po(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," Short Channel ID "),o.Ub())}function To(t,e){if(1&t&&(o.Vb(0,"span",40),o.Qb(1,"fa-icon",41),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("icon",t.faEyeSlash)}}function Ko(t,e){if(1&t&&(o.Vb(0,"span",42),o.Qb(1,"fa-icon",41),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("icon",t.faEye)}}const Ro=function(t){return{"max-width":t}};function Mo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Vb(1,"div",36),o.Ic(2,To,2,1,"span",37),o.Ic(3,Ko,2,1,"span",38),o.Vb(4,"span",39),o.Kc(5),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.Db(1),o.oc("ngStyle",o.sc(4,Ro,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(1),o.oc("ngIf",t.private),o.Db(1),o.oc("ngIf",!t.private),o.Db(2),o.Lc(null==t?null:t.short_channel_id)}}function Oo(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," Alias "),o.Ub())}function Eo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.alias)}}function zo(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," Connected "),o.Ub())}function Bo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function No(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," Private "),o.Ub())}function qo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null!=t&&t.private?"Private":"Public"," ")}}function Qo(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," State "),o.Ub())}function Ho(t,e){if(1&t&&(o.Vb(0,"td",35),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.state,"")}}function jo(t,e){1&t&&(o.Vb(0,"th",43),o.Kc(1," Local Balance (Sats) "),o.Ub())}function $o(t,e){if(1&t&&(o.Vb(0,"td",35),o.Vb(1,"span",44),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function Go(t,e){1&t&&(o.Vb(0,"th",43),o.Kc(1," Remote Balance (Sats) "),o.Ub())}function Xo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Vb(1,"span",44),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function Wo(t,e){1&t&&(o.Vb(0,"th",43),o.Kc(1," Total mSatoshis "),o.Ub())}function Jo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Vb(1,"span",44),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.msatoshi_total)," ")}}function Yo(t,e){1&t&&(o.Vb(0,"th",43),o.Kc(1," Spendable Satoshi "),o.Ub())}function Zo(t,e){if(1&t&&(o.Vb(0,"td",35),o.Vb(1,"span",44),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.spendable_msatoshi)," ")}}function ts(t,e){1&t&&(o.Vb(0,"th",45),o.Kc(1,"Balance Score "),o.Ub())}function es(t,e){if(1&t&&(o.Vb(0,"td",46),o.Vb(1,"div",47),o.Vb(2,"mat-hint",48),o.Kc(3),o.ic(4,"number"),o.Ub(),o.Ub(),o.Qb(5,"mat-progress-bar",49),o.Ub()),2&t){const t=e.$implicit;o.Db(3),o.Lc(o.jc(4,2,t.balancedness||0)),o.Db(2),o.pc("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function ns(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",50),o.Vb(1,"div",51),o.Vb(2,"mat-select",52),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",53),o.dc("click",function(){return o.zc(t),o.hc().onChannelUpdate("all")}),o.Kc(5,"Update Fee Policy"),o.Ub(),o.Vb(6,"mat-option",53),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(7,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function is(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",54),o.Vb(1,"div",55),o.Vb(2,"mat-select",56),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",53),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc().onChannelClick(i,n)}),o.Kc(5,"View Info"),o.Ub(),o.Vb(6,"mat-option",53),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onViewRemotePolicy(n)}),o.Kc(7,"View Remote Fee"),o.Ub(),o.Vb(8,"mat-option",53),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onChannelUpdate(n)}),o.Kc(9,"Update Fee Policy"),o.Ub(),o.Vb(10,"mat-option",53),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onChannelClose(n)}),o.Kc(11,"Close Channel"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function as(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No peers connected. Add a peer in order to open a channel."),o.Ub())}function os(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No channels available."),o.Ub())}function ss(t,e){if(1&t&&(o.Vb(0,"td",57),o.Ic(1,as,2,0,"p",58),o.Ic(2,os,2,0,"p",58),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)),o.Db(1),o.oc("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1))}}const cs=function(t){return{"display-none":t}};function ls(t,e){if(1&t&&o.Qb(0,"tr",59),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,cs,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function rs(t,e){1&t&&o.Qb(0,"tr",60)}function bs(t,e){1&t&&o.Qb(0,"tr",61)}const ds=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},us=function(){return["no_peer"]};let hs=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.rtlEffects=n,this.clEffects=i,this.commonService=a,this.faEye=m.p,this.faEyeSlash=m.q,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.j,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","actions"]):(this.flgSticky=!0,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","balancedness","actions"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(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.balance.totalBalance,this.channelsData=t.allChannels.filter(t=>"CHANNELD_NORMAL"===t.state&&t.connected),this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.allChannels),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch(new p.f({shortChannelID:t.short_channel_id,showError:!0})),this.clEffects.setLookupCL.pipe(Object(Jt.a)(1)).subscribe(t=>{if(0===t.length)return!1;let e={};e=t[0].source!==this.information.id?t[0]:t[1],this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Remote Channel Policy",message:[[{key:"base_fee_millisatoshi",value:e.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:f.h.NUMBER},{key:"fee_per_millionth",value:e.fee_per_millionth,title:"Fee/Millionth",width:33,type:f.h.NUMBER},{key:"delay",value:e.delay,title:"Delay",width:33,type:f.h.NUMBER}]]}}))})}onChannelUpdate(t){"all"!==t&&"ONCHAIN"===t.state||("all"===t?(this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48}]}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{if(t){const e=t[0].inputValue,n=t[1].inputValue;this.store.dispatch(new st.F("Updating Channel Policy...")),this.store.dispatch(new p.Jb({baseFeeMsat:e,feeRate:n,channelId:"all"}))}})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch(new st.F("Fetching Channel Policy...")),this.store.dispatch(new p.f({shortChannelID:t.short_channel_id,showError:!1})),this.clEffects.setLookupCL.pipe(Object(Jt.a)(1)).subscribe(e=>{this.myChanPolicy=e.length>0&&e[0].destination===this.information.id?{fee_base_msat:e[0].base_fee_millisatoshi,fee_rate_milli_msat:e[0].fee_per_millionth}:e.length>1&&e[1].destination===this.information.id?{fee_base_msat:e[1].base_fee_millisatoshi,fee_rate_milli_msat:e[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy),this.store.dispatch(new st.i),this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"Update fee policy for Channel: "+t.channel_id,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48}]}}))}),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[2])).subscribe(e=>{if(e){const n=e[0].inputValue,i=e[1].inputValue;this.store.dispatch(new st.F("Updating Channel Policy...")),this.store.dispatch(new p.Jb({baseFeeMsat:n,feeRate:i,channelId:t.channel_id}))}})),this.applyFilter())}onChannelClose(t){this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+t.channel_id,noBtnText:"Cancel",yesBtnText:"Close Channel"}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[3])).subscribe(e=>{e&&(this.store.dispatch(new st.F("Closing Channel...")),this.store.dispatch(new p.h({channelId:t.channel_id,force:!1})))})}applyFilter(){this.channels.filter=this.selFilter}onChannelClick(t,e){this.store.dispatch(new st.C({data:{channel:t,showCopy:!0,component:Ao}}))}loadChannelsTable(t){t.sort(function(t,e){return t.active===e.active?0:e.active?1:-1}),this.channels=new at.o([...t]),this.channels.filterPredicate=(t,e)=>((t.connected?"connected":"disconnected")+(t.channel_id?t.channel_id:"")+(t.short_channel_id?t.short_channel_id:"")+(t.id?t.id:"")+(t.alias?t.alias:"")+(t.private?"private":"public")+(t.state?t.state.toLowerCase():"")+(t.funding_txid?t.funding_txid:"")+(t.msatoshi_to_us?t.msatoshi_to_us:"")+(t.msatoshi_total?t.msatoshi_total:"")+(t.their_channel_reserve_satoshis?t.their_channel_reserve_satoshis:"")+(t.our_channel_reserve_satoshis?t.our_channel_reserve_satoshis:"")+(t.spendable_msatoshi?t.spendable_msatoshi:"")).includes(e.toLowerCase()),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.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(xt.a),o.Pb(Yt.a),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-channel-open-table"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Channels")}])],decls:48,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","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","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_to_them"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["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-4",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"],["fxFlex","100","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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"div",2),o.Vb(3,"mat-form-field",3),o.Vb(4,"input",4),o.dc("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),o.Ub(),o.Ub(),o.Ub(),o.Vb(5,"div",5),o.Ic(6,_o,1,0,"mat-progress-bar",6),o.Vb(7,"table",7,8),o.Tb(9,9),o.Ic(10,Po,2,0,"th",10),o.Ic(11,Mo,6,6,"td",11),o.Sb(),o.Tb(12,12),o.Ic(13,Oo,2,0,"th",10),o.Ic(14,Eo,2,1,"td",11),o.Sb(),o.Tb(15,13),o.Ic(16,zo,2,0,"th",10),o.Ic(17,Bo,2,1,"td",11),o.Sb(),o.Tb(18,14),o.Ic(19,No,2,0,"th",10),o.Ic(20,qo,2,1,"td",11),o.Sb(),o.Tb(21,15),o.Ic(22,Qo,2,0,"th",10),o.Ic(23,Ho,2,1,"td",11),o.Sb(),o.Tb(24,16),o.Ic(25,jo,2,0,"th",17),o.Ic(26,$o,4,4,"td",11),o.Sb(),o.Tb(27,18),o.Ic(28,Go,2,0,"th",17),o.Ic(29,Xo,4,4,"td",11),o.Sb(),o.Tb(30,19),o.Ic(31,Wo,2,0,"th",17),o.Ic(32,Jo,4,3,"td",11),o.Sb(),o.Tb(33,20),o.Ic(34,Yo,2,0,"th",17),o.Ic(35,Zo,4,3,"td",11),o.Sb(),o.Tb(36,21),o.Ic(37,ts,2,0,"th",22),o.Ic(38,es,6,4,"td",23),o.Sb(),o.Tb(39,24),o.Ic(40,ns,8,0,"th",25),o.Ic(41,is,12,0,"td",26),o.Sb(),o.Tb(42,27),o.Ic(43,ss,3,2,"td",28),o.Sb(),o.Ic(44,ls,1,3,"tr",29),o.Ic(45,rs,1,0,"tr",30),o.Ic(46,bs,1,0,"tr",31),o.Ub(),o.Ub(),o.Qb(47,"mat-paginator",32),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.selFilter),o.Db(2),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.channels)("ngClass",o.sc(11,ds,"error"===e.flgLoading[0])),o.Db(37),o.oc("matFooterRowDef",o.rc(13,us)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[w.c,w.b,w.a,K.c,lt.b,ct.c,ct.m,ct.p,O.b,i.o,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,nt.a,s.a,at.h,it.b,at.a,i.p,I.b,R.a,V.a,K.f,dt.a,dt.c,ht.m,at.d,at.f,at.j,at.l],pipes:[i.f],styles:[".mat-column-short_channel_id[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 22%;width:22%}.mat-column-msatoshi_to_them[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{flex:0 0 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function ms(t,e){1&t&&o.Qb(0,"mat-progress-bar",29)}function fs(t,e){1&t&&(o.Vb(0,"th",30),o.Kc(1," Short Channel ID "),o.Ub())}function ps(t,e){if(1&t&&(o.Vb(0,"td",31),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.short_channel_id,"")}}function gs(t,e){1&t&&(o.Vb(0,"th",30),o.Kc(1," Alias "),o.Ub())}function ys(t,e){if(1&t&&(o.Vb(0,"td",31),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.alias)}}function vs(t,e){1&t&&(o.Vb(0,"th",30),o.Kc(1," Connected "),o.Ub())}function xs(t,e){if(1&t&&(o.Vb(0,"td",31),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function ws(t,e){1&t&&(o.Vb(0,"th",30),o.Kc(1," Private "),o.Ub())}function Vs(t,e){if(1&t&&(o.Vb(0,"td",31),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null!=t&&t.private?"Private":"Public"," ")}}function Us(t,e){1&t&&(o.Vb(0,"th",30),o.Kc(1," State "),o.Ub())}function Ds(t,e){if(1&t&&(o.Vb(0,"td",31),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.state,"")}}function Cs(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," mSatoshi To Us "),o.Ub())}function Ss(t,e){if(1&t&&(o.Vb(0,"td",31),o.Vb(1,"span",33),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.msatoshi_to_us)," ")}}function Ls(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," Total (Sats) "),o.Ub())}function Is(t,e){if(1&t&&(o.Vb(0,"td",31),o.Vb(1,"span",33),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,(null==t?null:t.msatoshi_total)/1e3)," ")}}function Fs(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," Spendable Satoshi "),o.Ub())}function ks(t,e){if(1&t&&(o.Vb(0,"td",31),o.Vb(1,"span",33),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.spendable_msatoshi)," ")}}function As(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",34),o.Vb(1,"div",35),o.Vb(2,"mat-select",36),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",37),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function _s(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-option",37),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc().onChannelClose(e)}),o.Kc(1,"Close Channel"),o.Ub()}}function Ps(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",38),o.Vb(1,"div",35),o.Vb(2,"mat-select",39),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",37),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc().onChannelClick(i,n)}),o.Kc(5,"View Info"),o.Ub(),o.Ic(6,_s,2,0,"mat-option",40),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.Db(6),o.oc("ngIf",n.isCompatibleVersion&&!t.connected&&"CHANNELD_NORMAL"===t.state)}}function Ts(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No peers connected. Add a peer in order to open a channel."),o.Ub())}function Ks(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No channels available."),o.Ub())}function Rs(t,e){if(1&t&&(o.Vb(0,"td",41),o.Ic(1,Ts,2,0,"p",42),o.Ic(2,Ks,2,0,"p",42),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)),o.Db(1),o.oc("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1))}}const Ms=function(t){return{"display-none":t}};function Os(t,e){if(1&t&&o.Qb(0,"tr",43),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,Ms,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Es(t,e){1&t&&o.Qb(0,"tr",44)}function zs(t,e){1&t&&o.Qb(0,"tr",45)}const Bs=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Ns=function(){return["no_peer"]};let qs=(()=>{class t{constructor(t,e,n,i,a){this.logger=t,this.store=e,this.rtlEffects=n,this.clEffects=i,this.commonService=a,this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.j,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["alias","state","actions"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","actions"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.balance.totalBalance,this.channelsData=t.allChannels.filter(t=>!("CHANNELD_NORMAL"===t.state&&t.connected)),this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.allChannels),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter}onChannelClick(t,e){this.store.dispatch(new st.C({data:{channel:t,showCopy:!0,component:Ao}}))}onChannelClose(t){this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+t.channel_id,noBtnText:"Cancel",yesBtnText:"Force Close"}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[3])).subscribe(e=>{e&&(this.store.dispatch(new st.F("Force Closing Channel...")),this.store.dispatch(new p.h({channelId:t.channel_id,force:!0})))})}loadChannelsTable(t){t.sort(function(t,e){return t.active===e.active?0:e.active?1:-1}),this.channels=new at.o([...t]),this.channels.filterPredicate=(t,e)=>((t.connected?"connected":"disconnected")+(t.channel_id?t.channel_id:"")+(t.short_channel_id?t.short_channel_id:"")+(t.id?t.id:"")+(t.alias?t.alias:"")+(t.private?"private":"public")+(t.state?t.state.toLowerCase():"")+(t.funding_txid?t.funding_txid:"")+(t.msatoshi_to_us?t.msatoshi_to_us:"")+(t.msatoshi_total?t.msatoshi_total:"")+(t.their_channel_reserve_satoshis?t.their_channel_reserve_satoshis:"")+(t.our_channel_reserve_satoshis?t.our_channel_reserve_satoshis:"")+(t.spendable_msatoshi?t.spendable_msatoshi:"")).includes(e.toLowerCase()),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.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(xt.a),o.Pb(Yt.a),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-channel-pending-table"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Channels")}])],decls:42,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","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","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pr-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-4",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,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["placeholder","Actions","tabindex","4",1,"mr-0"],[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&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"div",2),o.Vb(3,"mat-form-field",3),o.Vb(4,"input",4),o.dc("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),o.Ub(),o.Ub(),o.Ub(),o.Vb(5,"div",5),o.Ic(6,ms,1,0,"mat-progress-bar",6),o.Vb(7,"table",7,8),o.Tb(9,9),o.Ic(10,fs,2,0,"th",10),o.Ic(11,ps,2,1,"td",11),o.Sb(),o.Tb(12,12),o.Ic(13,gs,2,0,"th",10),o.Ic(14,ys,2,1,"td",11),o.Sb(),o.Tb(15,13),o.Ic(16,vs,2,0,"th",10),o.Ic(17,xs,2,1,"td",11),o.Sb(),o.Tb(18,14),o.Ic(19,ws,2,0,"th",10),o.Ic(20,Vs,2,1,"td",11),o.Sb(),o.Tb(21,15),o.Ic(22,Us,2,0,"th",10),o.Ic(23,Ds,2,1,"td",11),o.Sb(),o.Tb(24,16),o.Ic(25,Cs,2,0,"th",17),o.Ic(26,Ss,4,3,"td",11),o.Sb(),o.Tb(27,18),o.Ic(28,Ls,2,0,"th",17),o.Ic(29,Is,4,3,"td",11),o.Sb(),o.Tb(30,19),o.Ic(31,Fs,2,0,"th",17),o.Ic(32,ks,4,3,"td",11),o.Sb(),o.Tb(33,20),o.Ic(34,As,6,0,"th",21),o.Ic(35,Ps,7,1,"td",22),o.Sb(),o.Tb(36,23),o.Ic(37,Rs,3,2,"td",24),o.Sb(),o.Ic(38,Os,1,3,"tr",25),o.Ic(39,Es,1,0,"tr",26),o.Ic(40,zs,1,0,"tr",27),o.Ub(),o.Ub(),o.Qb(41,"mat-paginator",28),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.selFilter),o.Db(2),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.channels)("ngClass",o.sc(11,Bs,"error"===e.flgLoading[0])),o.Db(31),o.oc("matFooterRowDef",o.rc(13,Ns)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[w.c,w.b,w.a,K.c,lt.b,ct.c,ct.m,ct.p,O.b,i.o,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,nt.a,s.a,at.h,it.b,at.a,dt.a,dt.c,ht.m,at.d,at.f,at.j,at.l],pipes:[i.f],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();const Qs=["peersForm"],Hs=["stepper"];function js(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc();o.Lc(t.peerFormLabel)}}function $s(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Address is required."),o.Ub())}function Gs(t,e){if(1&t&&(o.Vb(0,"div",39),o.Qb(1,"fa-icon",40),o.Vb(2,"span"),o.Kc(3),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(2),o.Lc(t.peerConnectionError)}}function Xs(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc();o.Lc(t.channelFormLabel)}}function Ws(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function Js(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount must be a positive number."),o.Ub())}function Ys(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("Amount must be less than or equal to ",t.totalBalance,".")}}function Zs(t,e){if(1&t&&(o.Vb(0,"mat-option",41),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t.feeRateId),o.Db(1),o.Mc(" ",t.feeRateType," ")}}function tc(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Min Confirmation Blocks is required."),o.Ub())}function ec(t,e){if(1&t&&(o.Vb(0,"div",39),o.Qb(1,"fa-icon",40),o.Vb(2,"span"),o.Kc(3),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(2),o.Lc(t.channelConnectionError)}}let nc=(()=>{class t{constructor(t,e,n,i,a,o,s){this.dialogRef=t,this.data=e,this.store=n,this.clEffects=i,this.formBuilder=a,this.actions$=o,this.logger=s,this.faExclamationTriangle=m.o,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=f.j,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 b.a,new b.a]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[ct.t.required]],peerAddress:[this.peerAddress,[ct.t.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[ct.t.required,ct.t.min(1),ct.t.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],flgMinConf:[!1],minConfValue:[null],hiddenAmount:["",[ct.t.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([ct.t.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.R||t.type===p.r||t.type===p.o)).subscribe(t=>{t.type===p.R&&(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===p.r&&this.dialogRef.close(),t.type===p.o&&("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.F("Adding Peer...")),this.store.dispatch(new p.yb({id:this.peerFormGroup.controls.peerAddress.value}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch(new st.F("Opening Channel...")),this.store.dispatch(new p.wb({peerId:this.newlyAddedPeer.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}))}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.id):"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.id):"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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(y.h),o.Pb(Yt.a),o.Pb(ct.d),o.Pb(v.a),o.Pb(g.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-connect-peer"]],viewQuery:function(t,e){if(1&t&&(o.Pc(Qs,!0),o.Pc(Hs,!0)),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first),o.vc(t=o.ec())&&(e.stepper=t.first)}},decls:55,vars:24,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["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,"mt-5px"],["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",""],["fxFlex","100"],["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","fxLayoutAlign","start end"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","name","flgMinConf","fxLayoutAlign","stretch start",1,"mr-2"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["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,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Connect to a new peer"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.dc("click",function(){return e.onClose()}),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"div",7),o.Vb(10,"mat-vertical-stepper",8,9),o.dc("selectionChange",function(t){return e.stepSelectionChanged(t)}),o.Vb(12,"mat-step",10),o.Vb(13,"form",11),o.Ic(14,js,1,1,"ng-template",12),o.Vb(15,"mat-form-field",13),o.Qb(16,"input",14),o.Ic(17,$s,2,0,"mat-error",15),o.Ub(),o.Ic(18,Gs,4,2,"div",16),o.Vb(19,"div",17),o.Vb(20,"button",18),o.dc("click",function(){return e.onConnectPeer()}),o.Kc(21),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(22,"mat-step",10),o.Vb(23,"form",19),o.Ic(24,Xs,1,1,"ng-template",20),o.Vb(25,"div",21),o.Vb(26,"div",22),o.Vb(27,"mat-form-field",23),o.Qb(28,"input",24),o.Vb(29,"mat-hint"),o.Kc(30),o.Ub(),o.Vb(31,"span",25),o.Kc(32," Sats "),o.Ub(),o.Ic(33,Ws,2,0,"mat-error",15),o.Ic(34,Js,2,0,"mat-error",15),o.Ic(35,Ys,2,1,"mat-error",15),o.Ub(),o.Vb(36,"div",26),o.Vb(37,"mat-slide-toggle",27),o.Kc(38,"Private Channel"),o.Ub(),o.Ub(),o.Ub(),o.Vb(39,"div",28),o.Vb(40,"mat-form-field",29),o.Vb(41,"mat-select",30),o.Ic(42,Zs,2,2,"mat-option",31),o.Ub(),o.Ub(),o.Vb(43,"div",32),o.Qb(44,"mat-checkbox",33),o.Vb(45,"mat-form-field",34),o.Qb(46,"input",35),o.Ic(47,tc,2,0,"mat-error",15),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(48,ec,4,2,"div",16),o.Vb(49,"div",17),o.Vb(50,"button",36),o.dc("click",function(){return e.onOpenChannel()}),o.Kc(51),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(52,"div",37),o.Vb(53,"button",38),o.Kc(54),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(10),o.oc("linear",!0),o.Db(2),o.oc("stepControl",e.peerFormGroup)("editable",e.flgEditable),o.Db(1),o.oc("formGroup",e.peerFormGroup),o.Db(4),o.oc("ngIf",null==e.peerFormGroup.controls.peerAddress.errors?null:e.peerFormGroup.controls.peerAddress.errors.required),o.Db(1),o.oc("ngIf",""!==e.peerConnectionError),o.Db(3),o.Lc(""!==e.peerConnectionError?"Retry":"Add Peer"),o.Db(1),o.oc("stepControl",e.channelFormGroup)("editable",e.flgEditable),o.Db(1),o.oc("formGroup",e.channelFormGroup),o.Db(5),o.oc("step",1e3),o.Db(2),o.Mc("Remaining Bal: ",e.totalBalance-(e.channelFormGroup.controls.fundingAmount.value?e.channelFormGroup.controls.fundingAmount.value:0),""),o.Db(3),o.oc("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.required),o.Db(1),o.oc("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.min),o.Db(1),o.oc("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.max),o.Db(7),o.oc("ngForOf",e.feeRateTypes),o.Db(4),o.oc("step",1)("min",0)("required",e.channelFormGroup.controls.flgMinConf.value),o.Db(1),o.oc("ngIf",e.channelFormGroup.controls.flgMinConf.value&&!e.channelFormGroup.controls.minConfValue.value),o.Db(1),o.oc("ngIf",""!==e.channelConnectionError),o.Db(3),o.Lc(""!==e.channelConnectionError?"Retry":"Open Channel"),o.Db(2),o.oc("mat-dialog-close",!1),o.Db(1),o.Lc(null!=e.newlyAddedPeer&&e.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[w.c,w.a,D.c,w.b,S.a,D.b,Bn.h,Bn.a,ct.u,ct.n,ct.h,Bn.b,K.c,lt.b,ct.c,rt.a,ct.m,ct.g,ct.s,i.o,ct.q,K.f,K.g,ut.a,dt.a,i.n,En.a,bt.a,ot.d,K.b,V.a,ht.m],styles:[""]}),t})();function ic(t,e){1&t&&o.Qb(0,"mat-progress-bar",32)}function ac(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1," Alias "),o.Ub())}const oc=function(t){return{"mr-0":t}};function sc(t,e){if(1&t&&o.Qb(0,"span",37),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,oc,t.screenSize===t.screenSizeEnum.XS))}}function cc(t,e){if(1&t&&o.Qb(0,"span",38),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,oc,t.screenSize===t.screenSizeEnum.XS))}}const lc=function(t){return{"max-width":t}};function rc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Ic(1,sc,1,3,"span",35),o.Ic(2,cc,1,3,"span",36),o.Kc(3),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.oc("ngStyle",o.sc(4,lc,n.screenSize===n.screenSizeEnum.XS?"10rem":"40rem")),o.Db(1),o.oc("ngIf",null==t?null:t.connected),o.Db(1),o.oc("ngIf",!(null!=t&&t.connected)),o.Db(1),o.Mc(" ",null==t?null:t.alias," ")}}function bc(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1," ID "),o.Ub())}function dc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.oc("ngStyle",o.sc(2,lc,n.screenSize===n.screenSizeEnum.XS?"10rem":"40rem")),o.Db(1),o.Mc(" ",null==t?null:t.id," ")}}function uc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1," Network Address "),o.Ub())}function hc(t,e){1&t&&(o.Vb(0,"span"),o.Kc(1,","),o.Qb(2,"br"),o.Ub())}function mc(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ic(2,hc,3,0,"span",42),o.Ub()),2&t){const t=e.$implicit,n=e.last;o.Db(1),o.Lc(t),o.Db(1),o.oc("ngIf",!n)}}function fc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Ic(1,mc,3,2,"span",41),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.oc("ngStyle",o.sc(2,lc,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),o.Db(1),o.oc("ngForOf",null==t?null:t.netaddr)}}function pc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",43),o.Vb(1,"div",44),o.Vb(2,"mat-select",45),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",46),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function gc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-option",46),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc().onPeerDetach(e)}),o.Kc(1,"Disconnect"),o.Ub()}}function yc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-option",46),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc().onConnectPeer(e)}),o.Kc(1,"Reconnect"),o.Ub()}}function vc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",47),o.Vb(1,"div",48),o.Vb(2,"mat-select",45),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",46),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc().onPeerClick(i,n)}),o.Kc(5,"View Info"),o.Ub(),o.Vb(6,"mat-option",46),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onOpenChannel(n)}),o.Kc(7,"Open Channel"),o.Ub(),o.Ic(8,gc,2,0,"mat-option",49),o.Ic(9,yc,2,0,"mat-option",49),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit;o.Db(8),o.oc("ngIf",t.connected),o.Db(1),o.oc("ngIf",!t.connected)}}function xc(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No connected peers."),o.Ub())}function wc(t,e){if(1&t&&(o.Vb(0,"td",50),o.Ic(1,xc,2,0,"p",42),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)}}const Vc=function(t){return{"display-none":t}};function Uc(t,e){if(1&t&&o.Qb(0,"tr",51),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,Vc,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function Dc(t,e){1&t&&o.Qb(0,"tr",52)}function Cc(t,e){if(1&t&&o.Qb(0,"tr",53),2&t){const t=e.$implicit,n=o.hc();o.oc("@newlyAddedRowAnimation",t.pub_key===n.newlyAddedPeer&&n.flgAnimate?"added":"notAdded")}}const Sc=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Lc=function(){return["no_peer"]};let Ic=(()=>{class t{constructor(t,e,n,i,a,o){this.logger=t,this.store=e,this.rtlEffects=n,this.clEffects=i,this.actions$=a,this.commonService=o,this.faUsers=m.O,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.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["alias","id","netaddr","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","id","netaddr","actions"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchPeers"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.availableBalance=t.balance.totalBalance||0,this.peersData=t.peers?t.peers:[],this.peersData.length>0&&this.loadPeersTable(this.peersData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!1),this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.sb)).subscribe(t=>{this.peerAddress=void 0,this.flgAnimate=!0})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.id,message:[[{key:"id",value:t.id,title:"Public Key",width:100}],[{key:"netaddr",value:t.netaddr,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:50},{key:"connected",value:t.connected?"True":"False",title:"Connected",width:50}]]}}))}onConnectPeer(t){this.store.dispatch(new st.C({data:{message:{peer:t.id?t:null,information:this.information,balance:this.availableBalance},component:nc}}))}onOpenChannel(t){this.store.dispatch(new st.C({data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:xo}}))}onPeerDetach(t){this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[3])).subscribe(e=>{e&&(this.store.dispatch(new st.F("Disconnecting Peer...")),this.store.dispatch(new p.n({id:t.id,force:!1})))})}applyFilter(t){this.peers.filter=t.value}loadPeersTable(t){this.peers=new at.o([...t]),this.peers.sortingDataAccessor=(t,e)=>{switch(e){case"netaddr":if(t.netaddr&&t.netaddr[0]){let e=t.netaddr[0].toString().split(".");return e[0]?+e[0]:t.netaddr[0]}return"";default:return t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}},this.peers.sort=this.sort,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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(xt.a),o.Pb(Yt.a),o.Pb(v.a),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-peers"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Peers")}])],decls:36,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["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,"padding-gap-x","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","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","id"],["mat-header-cell","","class","px-3","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","netaddr"],["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-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",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-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["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"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"form",1,2),o.Vb(3,"button",3),o.dc("click",function(){return e.onConnectPeer({})}),o.Kc(4,"Add Peer"),o.Ub(),o.Ub(),o.Vb(5,"div",4),o.Vb(6,"div",5),o.Vb(7,"div",6),o.Qb(8,"fa-icon",7),o.Vb(9,"span",8),o.Kc(10,"Connected Peers"),o.Ub(),o.Ub(),o.Vb(11,"mat-form-field",9),o.Vb(12,"div",10),o.Vb(13,"input",11),o.dc("keyup",function(t){return e.applyFilter(t.target)}),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(14,"div",12),o.Ic(15,ic,1,0,"mat-progress-bar",13),o.Vb(16,"table",14,15),o.Tb(18,16),o.Ic(19,ac,2,0,"th",17),o.Ic(20,rc,4,6,"td",18),o.Sb(),o.Tb(21,19),o.Ic(22,bc,2,0,"th",20),o.Ic(23,dc,2,4,"td",21),o.Sb(),o.Tb(24,22),o.Ic(25,uc,2,0,"th",17),o.Ic(26,fc,2,4,"td",18),o.Sb(),o.Tb(27,23),o.Ic(28,pc,6,0,"th",24),o.Ic(29,vc,10,2,"td",25),o.Sb(),o.Tb(30,26),o.Ic(31,wc,2,1,"td",27),o.Sb(),o.Ic(32,Uc,1,3,"tr",28),o.Ic(33,Dc,1,0,"tr",29),o.Ic(34,Cc,1,1,"tr",30),o.Ub(),o.Ub(),o.Qb(35,"mat-paginator",31),o.Ub(),o.Ub()),2&t&&(o.Db(8),o.oc("icon",e.faUsers),o.Db(7),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.peers)("ngClass",o.sc(11,Sc,"error"===e.flgLoading[0])),o.Db(16),o.oc("matFooterRowDef",o.rc(13,Lc)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[w.c,w.a,w.b,ct.u,ct.n,ct.o,S.a,V.a,K.c,lt.b,O.b,i.o,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,nt.a,s.a,at.h,it.b,at.a,i.p,I.b,R.a,i.n,dt.a,dt.c,ht.m,at.d,at.f,at.j,at.l],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-id[_ngcontent-%COMP%]{padding-left:2rem}.mat-column-netaddr[_ngcontent-%COMP%]{flex:1 1 25%;width:25%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[vt.a]}}),t})();const Fc=["queryRoutesForm"];function kc(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Destination pubkey is required."),o.Ub())}function Ac(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function _c(t,e){1&t&&o.Qb(0,"mat-progress-bar",38)}function Pc(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1," ID "),o.Ub())}function Tc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.id," ")}}function Kc(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1," Alias "),o.Ub())}function Rc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.alias," ")}}function Mc(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1," Channel "),o.Ub())}function Oc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.channel," ")}}function Ec(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1," Direction "),o.Ub())}function zc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.direction," ")}}function Bc(t,e){1&t&&(o.Vb(0,"th",41),o.Kc(1," Delay "),o.Ub())}function Nc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Vb(1,"span",42),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.delay)," ")}}function qc(t,e){1&t&&(o.Vb(0,"th",41),o.Kc(1," Amount (Sats) "),o.Ub())}function Qc(t,e){if(1&t&&(o.Vb(0,"td",40),o.Vb(1,"span",42),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,(null==t?null:t.msatoshi)/1e3)," ")}}function Hc(t,e){1&t&&(o.Vb(0,"th",43),o.Kc(1," Amount mSat "),o.Ub())}function jc(t,e){if(1&t&&(o.Vb(0,"td",44),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.amount_msat," ")}}function $c(t,e){1&t&&(o.Vb(0,"th",45),o.Vb(1,"span",42),o.Kc(2,"Actions"),o.Ub(),o.Ub())}function Gc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",44),o.Vb(1,"button",46),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc().onHopClick(i,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function Xc(t,e){1&t&&o.Qb(0,"tr",47)}function Wc(t,e){1&t&&o.Qb(0,"tr",48)}const Jc=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}};let Yc=(()=>{class t{constructor(t,e,n){this.store=t,this.clEffects=e,this.commonService=n,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=m.E,this.faExclamationTriangle=m.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi","actions"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["alias","direction","msatoshi","actions"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["alias","direction","delay","msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","channel","direction","delay","msatoshi","actions"])}ngOnInit(){this.clEffects.setQueryRoutesCL.pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.qrHops=new at.o([]),this.qrHops.data=[],t.routes?(this.flgLoading[0]=!1,this.qrHops=new at.o([...t.routes]),this.qrHops.data=t.routes):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.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch(new p.P({destPubkey:this.destinationPubkey,amount:1e3*this.amount}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:t.id,title:"ID",width:100,type:f.h.STRING}],[{key:"channel",value:t.channel,title:"Channel",width:50,type:f.h.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:f.h.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"mSatoshi",width:50,type:f.h.NUMBER},{key:"amount_msat",value:t.amount_msat,title:"Amount mSat",width:50,type:f.h.STRING}],[{key:"direction",value:t.direction,title:"Direction",width:50,type:f.h.STRING},{key:"delay",value:t.delay,title:"Delay",width:50,type:f.h.NUMBER}]]}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(Yt.a),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-query-routes"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Ec(Fc,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.form=t.first)}},decls:54,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["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 Pubkey","name","destinationPubkey","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,"padding-gap-x","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","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","amount_msat"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"pl-4","pr-3"],["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=o.Wb();o.Vb(0,"div",0),o.Vb(1,"form",1,2),o.dc("ngSubmit",function(){return o.zc(t),o.wc(2).form.valid&&e.onQueryRoutes()}),o.Vb(3,"div",3),o.Qb(4,"fa-icon",4),o.Vb(5,"span"),o.Kc(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),o.Ub(),o.Ub(),o.Vb(7,"mat-form-field",5),o.Vb(8,"input",6,7),o.dc("ngModelChange",function(t){return e.destinationPubkey=t}),o.Ub(),o.Ic(10,kc,2,0,"mat-error",8),o.Ub(),o.Vb(11,"mat-form-field",9),o.Vb(12,"input",10),o.dc("ngModelChange",function(t){return e.amount=t}),o.Ub(),o.Ic(13,Ac,2,0,"mat-error",8),o.Ub(),o.Vb(14,"div",11),o.Vb(15,"button",12),o.dc("click",function(){return e.resetData()}),o.Kc(16,"Clear"),o.Ub(),o.Vb(17,"button",13),o.Kc(18,"Query Route"),o.Ub(),o.Ub(),o.Ub(),o.Vb(19,"div",14),o.Vb(20,"div",15),o.Qb(21,"fa-icon",16),o.Vb(22,"span",17),o.Kc(23,"Transaction Route"),o.Ub(),o.Ub(),o.Ub(),o.Vb(24,"div",18),o.Ic(25,_c,1,0,"mat-progress-bar",19),o.Vb(26,"table",20,21),o.Tb(28,22),o.Ic(29,Pc,2,0,"th",23),o.Ic(30,Tc,2,1,"td",24),o.Sb(),o.Tb(31,25),o.Ic(32,Kc,2,0,"th",23),o.Ic(33,Rc,2,1,"td",24),o.Sb(),o.Tb(34,26),o.Ic(35,Mc,2,0,"th",23),o.Ic(36,Oc,2,1,"td",24),o.Sb(),o.Tb(37,27),o.Ic(38,Ec,2,0,"th",23),o.Ic(39,zc,2,1,"td",24),o.Sb(),o.Tb(40,28),o.Ic(41,Bc,2,0,"th",29),o.Ic(42,Nc,4,3,"td",24),o.Sb(),o.Tb(43,30),o.Ic(44,qc,2,0,"th",29),o.Ic(45,Qc,4,3,"td",24),o.Sb(),o.Tb(46,31),o.Ic(47,Hc,2,0,"th",32),o.Ic(48,jc,2,1,"td",33),o.Sb(),o.Tb(49,34),o.Ic(50,$c,3,0,"th",35),o.Ic(51,Gc,3,0,"td",33),o.Sb(),o.Ic(52,Xc,1,0,"tr",36),o.Ic(53,Wc,1,0,"tr",37),o.Ub(),o.Ub(),o.Ub()}2&t&&(o.Db(4),o.oc("icon",e.faExclamationTriangle),o.Db(4),o.oc("ngModel",e.destinationPubkey),o.Db(2),o.oc("ngIf",!e.destinationPubkey),o.Db(2),o.oc("ngModel",e.amount)("step",1e3)("min",0),o.Db(1),o.oc("ngIf",!e.amount),o.Db(8),o.oc("icon",e.faRoute),o.Db(4),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.qrHops)("ngClass",o.sc(14,Jc,"error"===e.flgLoading[0])),o.Db(26),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns))},directives:[w.c,w.a,ct.u,ct.n,ct.o,w.b,V.a,K.c,lt.b,ct.c,ct.s,ct.m,ct.p,i.o,ct.q,bt.a,S.a,O.b,at.n,it.a,i.m,I.a,at.c,at.i,at.b,at.k,at.m,K.b,s.a,at.h,it.b,at.a,at.j,at.l],pipes:[i.f],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})();var Zc=n("iiaH");function tl(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Message is required."),o.Ub())}let el=(()=>{class t{constructor(t,e,n){this.dataService=t,this.snackBar=e,this.logger=n,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new b.a,new b.a]}ngOnInit(){}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(Zc.a),o.Pb(On.b),o.Pb(g.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"form",1,2),o.Vb(3,"mat-form-field",3),o.Vb(4,"textarea",4),o.dc("ngModelChange",function(t){return e.message=t})("keyup",function(){return e.onMessageChange()}),o.Ub(),o.Ic(5,tl,2,0,"mat-error",5),o.Ub(),o.Vb(6,"div",6),o.Vb(7,"button",7),o.dc("click",function(){return e.resetData()}),o.Kc(8,"Clear Field"),o.Ub(),o.Vb(9,"button",8),o.dc("click",function(){return e.onSign()}),o.Kc(10,"Sign"),o.Ub(),o.Ub(),o.Qb(11,"mat-divider",9),o.Vb(12,"div",10),o.Vb(13,"p"),o.Kc(14,"Generated Signature"),o.Ub(),o.Ub(),o.Vb(15,"div",11),o.Kc(16),o.Ub(),o.Vb(17,"div",12),o.Vb(18,"button",13),o.dc("copied",function(t){return e.onCopyField(t)}),o.Kc(19,"Copy Signature"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.message),o.Db(1),o.oc("ngIf",!e.message),o.Db(6),o.oc("inset",!0),o.Db(5),o.Lc(e.signature),o.Db(2),o.oc("payload",e.signature))},directives:[w.c,w.a,w.b,ct.u,ct.n,ct.o,K.c,lt.b,ct.c,rt.a,ct.s,ct.m,ct.p,i.o,S.a,M.a,Ji.a,K.b],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();function nl(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Message is required."),o.Ub())}function il(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Signature is required."),o.Ub())}function al(t,e){1&t&&(o.Vb(0,"p",13),o.Vb(1,"mat-icon",14),o.Kc(2,"close"),o.Ub(),o.Kc(3,"Verification failed, please double check message and signature"),o.Ub())}function ol(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"Pubkey Used"),o.Ub())}function sl(t,e){if(1&t&&(o.Vb(0,"div",20),o.Vb(1,"p"),o.Kc(2),o.Ub(),o.Ub()),2&t){const t=o.hc(2);o.Db(2),o.Lc(null==t.verifyRes?null:t.verifyRes.pubkey)}}function cl(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",21),o.Vb(1,"button",22),o.dc("copied",function(e){return o.zc(t),o.hc(2).onCopyField(e)}),o.Kc(2,"Copy Pubkey"),o.Ub(),o.Ub()}if(2&t){const t=o.hc(2);o.Db(1),o.oc("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function ll(t,e){if(1&t&&(o.Vb(0,"div",15),o.Qb(1,"mat-divider",16),o.Vb(2,"div",17),o.Ic(3,ol,2,0,"p",5),o.Ub(),o.Ic(4,sl,3,1,"div",18),o.Ic(5,cl,3,1,"div",19),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("inset",!0),o.Db(2),o.oc("ngIf",t.verifyRes.verified),o.Db(1),o.oc("ngIf",t.verifyRes.verified),o.Db(1),o.oc("ngIf",t.verifyRes.verified)}}let rl=(()=>{class t{constructor(t,e,n){this.dataService=t,this.snackBar=e,this.logger=n,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new b.a,new b.a]}ngOnInit(){}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){this.verifiedMessage===this.message&&this.verifiedSignature===this.signature||(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(Zc.a),o.Pb(On.b),o.Pb(g.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"form",1,2),o.Vb(3,"mat-form-field",3),o.Vb(4,"textarea",4),o.dc("ngModelChange",function(t){return e.message=t})("keyup",function(){return e.onChange()}),o.Ub(),o.Ic(5,nl,2,0,"mat-error",5),o.Ub(),o.Vb(6,"mat-form-field",3),o.Vb(7,"input",6,7),o.dc("ngModelChange",function(t){return e.signature=t})("keyup",function(){return e.onChange()}),o.Ub(),o.Ic(9,il,2,0,"mat-error",5),o.Ub(),o.Ic(10,al,4,0,"p",8),o.Vb(11,"div",9),o.Vb(12,"button",10),o.dc("click",function(){return e.resetData()}),o.Kc(13,"Clear Fields"),o.Ub(),o.Vb(14,"button",11),o.dc("click",function(){return e.onVerify()}),o.Kc(15,"Verify"),o.Ub(),o.Ub(),o.Ic(16,ll,6,4,"div",12),o.Ub(),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.message),o.Db(1),o.oc("ngIf",!e.message),o.Db(2),o.oc("ngModel",e.signature),o.Db(2),o.oc("ngIf",!e.signature),o.Db(1),o.oc("ngIf",e.showVerifyStatus&&!e.verifyRes.verified),o.Db(6),o.oc("ngIf",e.showVerifyStatus&&e.verifyRes.verified))},directives:[w.c,w.a,w.b,ct.u,ct.n,ct.o,K.c,lt.b,ct.c,rt.a,ct.s,ct.m,ct.p,i.o,S.a,K.b,L.a,M.a,Ji.a],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();function bl(t,e){if(1&t&&(o.Vb(0,"div",5),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Lc(t.errorMessage)}}function dl(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",6),o.Qb(1,"div",7),o.Vb(2,"mat-form-field",8),o.Vb(3,"input",9),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().filterValue=e})("input",function(){return o.zc(t),o.hc().applyFilter()})("keyup",function(){return o.zc(t),o.hc().applyFilter()}),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.filterValue)}}function ul(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Status"),o.Ub())}function hl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.status)}}function ml(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Received Time"),o.Ub())}function fl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.received_time_str)}}function pl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Resolved Time"),o.Ub())}function gl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.resolved_time_str)}}function yl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"In Channel"),o.Ub())}function vl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc((null==t?null:t.in_channel_alias)||(null==t?null:t.in_channel))}}function xl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Out Channel"),o.Ub())}function wl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc((null==t?null:t.out_channel_alias)||(null==t?null:t.out_channel))}}function Vl(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1,"Amount In (Sats)"),o.Ub())}function Ul(t,e){if(1&t&&(o.Vb(0,"td",36),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Dl(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1,"Amount Out (Sats)"),o.Ub())}function Cl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Sl(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1,"Fee (mSat)"),o.Ub())}function Ll(t,e){if(1&t&&(o.Vb(0,"td",36),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,null==t?null:t.fee))}}function Il(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1,"Payment Hash"),o.Ub())}function Fl(t,e){if(1&t&&(o.Vb(0,"td",40),o.Vb(1,"div"),o.Kc(2),o.ic(3,"slice"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc("",o.lc(3,1,null==t?null:t.payment_hash,0,10),"...")}}function kl(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",41),o.Vb(1,"div",42),o.Vb(2,"mat-select",43),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",44),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function Al(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",45),o.Vb(1,"button",46),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc(2).onForwardingEventClick(i,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function _l(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No forwarding event available."),o.Ub())}function Pl(t,e){if(1&t&&(o.Vb(0,"td",47),o.Ic(1,_l,2,0,"p",48),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)}}const Tl=function(t){return{"display-none":t}};function Kl(t,e){if(1&t&&o.Qb(0,"tr",49),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Tl,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function Rl(t,e){1&t&&o.Qb(0,"tr",50)}function Ml(t,e){1&t&&o.Qb(0,"tr",51)}const Ol=function(){return["no_event"]};function El(t,e){if(1&t&&(o.Vb(0,"div",10),o.Vb(1,"table",11,12),o.Tb(3,13),o.Ic(4,ul,2,0,"th",14),o.Ic(5,hl,2,1,"td",15),o.Sb(),o.Tb(6,16),o.Ic(7,ml,2,0,"th",14),o.Ic(8,fl,2,1,"td",15),o.Sb(),o.Tb(9,17),o.Ic(10,pl,2,0,"th",14),o.Ic(11,gl,2,1,"td",15),o.Sb(),o.Tb(12,18),o.Ic(13,yl,2,0,"th",14),o.Ic(14,vl,2,1,"td",15),o.Sb(),o.Tb(15,19),o.Ic(16,xl,2,0,"th",14),o.Ic(17,wl,2,1,"td",15),o.Sb(),o.Tb(18,20),o.Ic(19,Vl,2,0,"th",21),o.Ic(20,Ul,4,4,"td",15),o.Sb(),o.Tb(21,22),o.Ic(22,Dl,2,0,"th",21),o.Ic(23,Cl,4,4,"td",15),o.Sb(),o.Tb(24,23),o.Ic(25,Sl,2,0,"th",21),o.Ic(26,Ll,4,3,"td",15),o.Sb(),o.Tb(27,24),o.Ic(28,Il,2,0,"th",25),o.Ic(29,Fl,4,5,"td",26),o.Sb(),o.Tb(30,27),o.Ic(31,kl,6,0,"th",28),o.Ic(32,Al,3,0,"td",29),o.Sb(),o.Tb(33,30),o.Ic(34,Pl,2,1,"td",31),o.Sb(),o.Ic(35,Kl,1,3,"tr",32),o.Ic(36,Rl,1,0,"tr",33),o.Ic(37,Ml,1,0,"tr",34),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("dataSource",t.forwardingHistoryEvents),o.Db(34),o.oc("matFooterRowDef",o.rc(5,Ol)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)}}const zl=function(t){return{"error-border":t,"padding-gap-x":!0}};let Bl=(()=>{class t{constructor(t,e,n){this.logger=t,this.commonService=e,this.store=n,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["in_msatoshi","out_msatoshi","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",t.effectErrors.forEach(t=>{"GetForwardingHistory"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.successfulEvents=t.forwardingHistory&&t.forwardingHistory.forwarding_events&&t.forwardingHistory.forwarding_events.length>0?this.filterSuccessfulEvents(t.forwardingHistory.forwarding_events):[],this.loadForwardingEventsTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,this.loadForwardingEventsTable(this.successfulEvents)),t.filterValue&&this.applyFilter()}filterSuccessfulEvents(t){return t.filter(t=>"settled"===t.status)}onForwardingEventClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:f.h.STRING}],[{key:"received_time_str",value:t.received_time_str,title:"Received Time",width:50,type:f.h.DATE_TIME},{key:"resolved_time_str",value:t.resolved_time_str,title:"Resolved Time",width:50,type:f.h.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias?t.in_channel_alias:t.in_channel,title:"Inbound Channel",width:50,type:f.h.STRING},{key:"out_channel",value:t.out_channel_alias?t.out_channel_alias:t.out_channel,title:"Outbound Channel",width:50,type:f.h.STRING}],[{key:"status",value:"settled"===t.status?"Settled":"Failed",title:"Status",width:50,type:f.h.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:f.h.NUMBER}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:f.h.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:f.h.NUMBER}]]}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new at.o([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.forwardingHistoryEvents.filterPredicate=(t,e)=>(t.received_time_str.toLowerCase()+t.resolved_time_str.toLowerCase()+t.in_channel+t.out_channel+t.in_msatoshi/1e3+t.out_msatoshi/1e3+t.fee).includes(e.toLowerCase()),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents.filter=this.filterValue}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(x.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-forwarding-history"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Events")}]),o.Bb],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","padding-gap-x page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[1,"p-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","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","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","payment_hash"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["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-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["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&&(o.Vb(0,"div",0),o.Ic(1,bl,2,1,"div",1),o.Ic(2,dl,4,1,"div",2),o.Ic(3,El,38,6,"div",3),o.Qb(4,"mat-paginator",4),o.Ub()),2&t&&(o.oc("ngClass",o.sc(7,zl,""!==e.errorMessage)),o.Db(1),o.oc("ngIf",""!==e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[w.c,w.b,i.m,I.a,i.o,nt.a,w.a,K.c,lt.b,ct.c,ct.m,ct.p,O.b,at.n,it.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,at.h,it.b,at.a,dt.a,dt.c,ht.m,S.a,at.d,at.f,at.j,at.l],pipes:[i.f,i.w],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function Nl(t,e){if(1&t&&(o.Vb(0,"div",5),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Lc(t.errorMessage)}}function ql(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",6),o.Qb(1,"div",7),o.Vb(2,"mat-form-field",8),o.Vb(3,"input",9),o.dc("keyup",function(e){return o.zc(t),o.hc().applyFilter(e.target)}),o.Ub(),o.Ub(),o.Ub()}}function Ql(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Status"),o.Ub())}function Hl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.ic(2,"titlecase"),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(o.jc(2,1,null==t?null:t.status))}}function jl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Received Time"),o.Ub())}function $l(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.received_time_str)}}function Gl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Resolved Time"),o.Ub())}function Xl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.resolved_time_str)}}function Wl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"In Channel"),o.Ub())}function Jl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc((null==t?null:t.in_channel_alias)||(null==t?null:t.in_channel))}}function Yl(t,e){1&t&&(o.Vb(0,"th",35),o.Kc(1,"Out Channel"),o.Ub())}function Zl(t,e){if(1&t&&(o.Vb(0,"td",36),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc((null==t?null:t.out_channel_alias)||(null==t?null:t.out_channel))}}function tr(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1,"Amount In (Sats)"),o.Ub())}function er(t,e){if(1&t&&(o.Vb(0,"td",36),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function nr(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1,"Amount Out (Sats)"),o.Ub())}function ir(t,e){if(1&t&&(o.Vb(0,"td",36),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function ar(t,e){1&t&&(o.Vb(0,"th",37),o.Kc(1,"Fee mSat"),o.Ub())}function or(t,e){if(1&t&&(o.Vb(0,"td",36),o.Vb(1,"span",38),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,null==t?null:t.fee))}}function sr(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1,"Payment Hash"),o.Ub())}function cr(t,e){if(1&t&&(o.Vb(0,"td",40),o.Vb(1,"div"),o.Kc(2),o.ic(3,"slice"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc("",o.lc(3,1,null==t?null:t.payment_hash,0,10),"...")}}function lr(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",41),o.Vb(1,"div",42),o.Vb(2,"mat-select",43),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",44),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function rr(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",45),o.Vb(1,"button",46),o.dc("click",function(n){o.zc(t);const i=e.$implicit;return o.hc(2).onForwardingEventClick(i,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function br(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No forwarding event available."),o.Ub())}function dr(t,e){if(1&t&&(o.Vb(0,"td",47),o.Ic(1,br,2,0,"p",48),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)}}const ur=function(t){return{"display-none":t}};function hr(t,e){if(1&t&&o.Qb(0,"tr",49),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,ur,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function mr(t,e){1&t&&o.Qb(0,"tr",50)}function fr(t,e){1&t&&o.Qb(0,"tr",51)}const pr=function(){return["no_event"]};function gr(t,e){if(1&t&&(o.Vb(0,"div",10),o.Vb(1,"table",11,12),o.Tb(3,13),o.Ic(4,Ql,2,0,"th",14),o.Ic(5,Hl,3,3,"td",15),o.Sb(),o.Tb(6,16),o.Ic(7,jl,2,0,"th",14),o.Ic(8,$l,2,1,"td",15),o.Sb(),o.Tb(9,17),o.Ic(10,Gl,2,0,"th",14),o.Ic(11,Xl,2,1,"td",15),o.Sb(),o.Tb(12,18),o.Ic(13,Wl,2,0,"th",14),o.Ic(14,Jl,2,1,"td",15),o.Sb(),o.Tb(15,19),o.Ic(16,Yl,2,0,"th",14),o.Ic(17,Zl,2,1,"td",15),o.Sb(),o.Tb(18,20),o.Ic(19,tr,2,0,"th",21),o.Ic(20,er,4,4,"td",15),o.Sb(),o.Tb(21,22),o.Ic(22,nr,2,0,"th",21),o.Ic(23,ir,4,4,"td",15),o.Sb(),o.Tb(24,23),o.Ic(25,ar,2,0,"th",21),o.Ic(26,or,4,3,"td",15),o.Sb(),o.Tb(27,24),o.Ic(28,sr,2,0,"th",25),o.Ic(29,cr,4,5,"td",26),o.Sb(),o.Tb(30,27),o.Ic(31,lr,6,0,"th",28),o.Ic(32,rr,3,0,"td",29),o.Sb(),o.Tb(33,30),o.Ic(34,dr,2,1,"td",31),o.Sb(),o.Ic(35,hr,1,3,"tr",32),o.Ic(36,mr,1,0,"tr",33),o.Ic(37,fr,1,0,"tr",34),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("dataSource",t.forwardingHistoryEvents),o.Db(34),o.oc("matFooterRowDef",o.rc(5,pr)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)}}const yr=function(t){return{"error-border":t,"padding-gap-x":!0}};let vr=(()=>{class t{constructor(t,e,n){this.logger=t,this.commonService=e,this.store=n,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["status","in_msatoshi","out_msatoshi","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["status","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["status","received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",t.effectErrors.forEach(t=>{"GetForwardingHistory"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.failedEvents=t.forwardingHistory&&t.forwardingHistory.forwarding_events&&t.forwardingHistory.forwarding_events.length>0?this.filterFailedEvents(t.forwardingHistory.forwarding_events):[],this.loadForwardingEventsTable(this.failedEvents),this.logger.info(t)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadForwardingEventsTable(this.failedEvents)}filterFailedEvents(t){return t.filter(t=>"settled"!==t.status)}onForwardingEventClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:f.h.STRING}],[{key:"received_time_str",value:t.received_time_str,title:"Received Time",width:50,type:f.h.DATE_TIME},{key:"resolved_time_str",value:t.resolved_time_str,title:"Resolved Time",width:50,type:f.h.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias?t.in_channel_alias:t.in_channel,title:"Inbound Channel",width:50,type:f.h.STRING},{key:"out_channel",value:t.out_channel_alias?t.out_channel_alias:t.out_channel,title:"Outbound Channel",width:50,type:f.h.STRING}],[{key:"status",value:"settled"===t.status?"Settled":"Unsettled",title:"Status",width:50,type:f.h.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:f.h.NUMBER}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:f.h.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:f.h.NUMBER}]]}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new at.o([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.forwardingHistoryEvents.filterPredicate=(t,e)=>(t.status+t.received_time_str+t.resolved_time_str+t.in_channel+t.out_channel+t.in_msatoshi/1e3+t.out_msatoshi/1e3+t.fee).includes(e.toLowerCase()),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Failed-transactions")}applyFilter(t){this.forwardingHistoryEvents.filter=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(x.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-failed-history"]],viewQuery:function(t,e){if(1&t&&(o.Pc(it.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Events")}])],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","padding-gap-x page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[1,"p-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"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","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","payment_hash"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["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-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["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&&(o.Vb(0,"div",0),o.Ic(1,Nl,2,1,"div",1),o.Ic(2,ql,4,0,"div",2),o.Ic(3,gr,38,6,"div",3),o.Qb(4,"mat-paginator",4),o.Ub()),2&t&&(o.oc("ngClass",o.sc(7,yr,""!==e.errorMessage)),o.Db(1),o.oc("ngIf",""!==e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[w.c,w.b,i.m,I.a,i.o,nt.a,w.a,K.c,lt.b,O.b,at.n,it.a,at.c,at.i,at.b,at.e,at.g,at.k,at.m,at.h,it.b,at.a,dt.a,dt.c,ht.m,S.a,at.d,at.f,at.j,at.l],pipes:[i.x,i.f,i.w],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function xr(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",7),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let wr=(()=>{class t{constructor(t){this.router=t,this.faChartBar=m.f,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}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(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof a.f)).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(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(a.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-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&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"Reports"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Vb(7,"nav",5),o.Ic(8,xr,2,3,"div",6),o.Ub(),o.Qb(9,"router-outlet"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartBar),o.Db(7),o.oc("ngForOf",e.links))},directives:[w.c,w.b,V.a,D.a,D.b,et.e,i.n,a.l,et.d,a.h],styles:[""]}),t})();var Vr=n("2yzq"),Ur=n("LQLF"),Dr=n("Lnru");function Cr(t,e){if(1&t&&(o.Vb(0,"div",8),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=o.hc();o.oc("@fadeIn",t.totalFeeMsat),o.Db(1),o.Nc("",o.kc(2,3,t.totalFeeMsat/1e3||0,"1.0-0")," Sats/",o.jc(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function Sr(t,e){1&t&&(o.Vb(0,"div",9),o.Kc(1,"No fee report for the selected period"),o.Ub())}function Lr(t,e){if(1&t&&(o.Vb(0,"span"),o.Vb(1,"span",12),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Vb(4,"span",12),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Ub()),2&t){const t=e.model;o.Db(2),o.Mc("Events: ",o.jc(3,2,t.extra.totalEvents||0),""),o.Db(3),o.Mc("Fee: ",o.kc(6,4,t.value||0,"1.0-0"),"")}}function Ir(t,e){if(1&t){const t=o.Wb();o.Vb(0,"ngx-charts-bar-vertical",10),o.dc("select",function(e){return o.zc(t),o.hc().onChartBarSelected(e)})("mouseup",function(e){return o.zc(t),o.hc().onChartMouseUp(e)}),o.Ic(1,Lr,7,7,"ng-template",null,11,o.Jc),o.Ub()}if(2&t){const t=o.hc();o.oc("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 Fr(t,e){if(1&t&&o.Qb(0,"rtl-cl-forwarding-history",13),2&t){const t=o.hc();o.oc("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let kr=(()=>{class t{constructor(t,e,n,i){this.logger=t,this.dataService=e,this.commonService=n,this.store=i,this.reportPeriod=f.p[0],this.secondsInADay=86400,this.events={},this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.errorMessage="",this.totalFeeMsat=null,this.today=new Date(Date.now()),this.timezoneOffset=60*this.today.getTimezoneOffset(),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.q,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===f.q.XS||this.screenSize===f.q.SM),this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",t.effectErrors.forEach(t=>{"GetForwardingHistory"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.events=t.forwardingHistory&&t.forwardingHistory.forwarding_events?t.forwardingHistory:{},this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(t)})}ngAfterViewInit(){const t=this.commonService.getContainerSize();switch(this.screenSize){case f.q.MD:this.screenPaddingX=t.width/10;break;case f.q.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)-this.timezoneOffset,i=Math.round(e.getTime()/1e3)-this.timezoneOffset;this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeMsat=null,this.events&&this.events.forwarding_events&&this.events.forwarding_events.length>0&&(this.events.forwarding_events.forEach(t=>{"settled"===t.status&&t.received_time>=n&&t.received_time<i&&this.filteredEventsBySelectedPeriod.push(t)}),this.feeReportData=this.prepareFeeReport(t))}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.p[1]?t.name.toUpperCase()+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+f.l[this.startDate.getMonth()].name.toUpperCase()+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const e=Math.round(t.getTime()/1e3)-this.timezoneOffset;let n=[];if(this.reportPeriod===f.p[1]){for(let t=0;t<12;t++)n.push({name:f.l[t].name,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(t=>{let e=new Date(1e3*(+t.received_time+this.timezoneOffset)).getMonth();n[e].value=n[e].value+ +t.fee/1e3,n[e].extra.totalEvents=n[e].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +t.fee})}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((+t.received_time-e)/this.secondsInADay);n[i].value=n[i].value+ +t.fee/1e3,n[i].extra.totalEvents=n[i].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +t.fee})}return n}onSelectionChange(t){const e=t.selDate.getMonth(),n=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===f.p[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.l[t].days+1:f.l[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(Zc.a),o.Pb(x.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-fee-report"]],hostBindings:function(t,e){1&t&&o.dc("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"],[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"],[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&&(o.Vb(0,"div",0),o.Vb(1,"rtl-horizontal-scroller",1),o.dc("stepChanged",function(t){return e.onSelectionChange(t)}),o.Ub(),o.Vb(2,"div",2),o.Ic(3,Cr,4,8,"div",3),o.Ic(4,Sr,2,0,"div",4),o.Vb(5,"div",5),o.Ic(6,Ir,3,11,"ngx-charts-bar-vertical",6),o.Ub(),o.Vb(7,"div",5),o.Ic(8,Fr,1,2,"rtl-cl-forwarding-history",7),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("ngIf",e.feeReportData.length>0&&e.filteredEventsBySelectedPeriod.length>0),o.Db(1),o.oc("ngIf",e.feeReportData.length<=0||e.filteredEventsBySelectedPeriod.length<=0),o.Db(2),o.oc("ngIf",e.feeReportData.length>0&&e.filteredEventsBySelectedPeriod.length>0),o.Db(2),o.oc("ngIf",e.filteredEventsBySelectedPeriod&&e.filteredEventsBySelectedPeriod.length>0))},directives:[w.c,w.b,w.a,Ur.a,i.o,Dr.b,Bl],pipes:[i.f],styles:[""],data:{animation:[Vr.a]}}),t})();var Ar=n("d4ms");function _r(t,e){if(1&t&&(o.Vb(0,"div",10),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Nc(" Paid ",o.kc(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-0")," Sats/",o.jc(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Pr(t,e){if(1&t&&(o.Vb(0,"div",10),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Nc(" Received ",o.kc(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-0")," Sats/",o.jc(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Tr(t,e){if(1&t&&(o.Vb(0,"div",8),o.Ic(1,_r,4,7,"div",9),o.Ic(2,Pr,4,7,"div",9),o.Ub()),2&t){const t=o.hc();o.oc("@fadeIn",t.transactionsReportSummary),o.Db(1),o.oc("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),o.Db(1),o.oc("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function Kr(t,e){1&t&&(o.Vb(0,"div",11),o.Kc(1,"No transactions report for the selected period"),o.Ub())}function Rr(t,e){if(1&t&&(o.Vb(0,"span",14),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=e.model;o.Db(1),o.Oc("",t.name,": ",o.kc(2,4,t.value||0,"1.0-0"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",o.jc(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function Mr(t,e){if(1&t){const t=o.Wb();o.Vb(0,"ngx-charts-bar-vertical-2d",12),o.dc("select",function(e){return o.zc(t),o.hc().onChartBarSelected(e)})("mouseup",function(e){return o.zc(t),o.hc().onChartMouseUp(e)}),o.Ic(1,Rr,4,9,"ng-template",null,13,o.Jc),o.Ub()}if(2&t){const t=o.hc();o.oc("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:4)}}function Or(t,e){if(1&t&&o.Qb(0,"rtl-transactions-report-table",15),2&t){const t=o.hc();o.oc("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let Er=(()=>{class t{constructor(t,e,n){this.dataService=t,this.commonService=e,this.store=n,this.scrollRanges=f.p,this.reportPeriod=f.p[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.timezoneOffset=60*this.today.getTimezoneOffset(),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.q,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===f.q.XS||this.screenSize===f.q.SM),this.store.select("cl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{"COMPLETE"===t.initialAPIResponseStatus[0]&&this.dataService.getTransactionsForReport().pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.payments=t.payments,this.invoices=t.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()})})}ngAfterViewInit(){const t=this.commonService.getContainerSize();switch(this.screenSize){case f.q.MD:this.screenPaddingX=t.width/10;break;case f.q.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.p[1]?t.series.toUpperCase()+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+f.l[this.startDate.getMonth()].name.toUpperCase()+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,e){const n=Math.round(t.getTime()/1e3)-this.timezoneOffset,i=Math.round(e.getTime()/1e3)-this.timezoneOffset;let a=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};let o=this.payments.filter(t=>"complete"===t.status&&t.created_at>=n&&t.created_at<i),s=this.invoices.filter(t=>"paid"===t.status&&t.paid_at>=n&&t.paid_at<i);if(this.transactionsReportSummary.paymentsSelectedPeriod=o.length,this.transactionsReportSummary.invoicesSelectedPeriod=s.length,this.reportPeriod===f.p[1]){for(let e=0;e<12;e++)a.push({name:f.l[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(1e3*(t.created_at+this.timezoneOffset)).getMonth();this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+t.msatoshi_sent,a[e].series[0].value=a[e].series[0].value+t.msatoshi_sent/1e3,a[e].series[0].extra.total=a[e].series[0].extra.total+1}),s.map(t=>{let e=new Date(1e3*(+t.paid_at+this.timezoneOffset)).getMonth();this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+t.msatoshi_received,a[e].series[1].value=a[e].series[1].value+t.msatoshi_received/1e3,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+1)*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((+t.created_at-n)/this.secondsInADay);this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+t.msatoshi_sent,a[e].series[0].value=a[e].series[0].value+t.msatoshi_sent/1e3,a[e].series[0].extra.total=a[e].series[0].extra.total+1}),s.map(t=>{let e=Math.floor((+t.paid_at-n)/this.secondsInADay);this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+t.msatoshi_received,a[e].series[1].value=a[e].series[1].value+t.msatoshi_received/1e3,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].value>0||e.series[1].value>0?t.concat({date:e.date,date_str:this.commonService.convertTimestampToDate(e.date.getTime()/1e3),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.p[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.l[t].days+1:f.l[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(Zc.a),o.Pb(x.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-cl-transactions-report"]],hostBindings:function(t,e){1&t&&o.dc("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"],[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"],[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&&(o.Vb(0,"div",0),o.Vb(1,"rtl-horizontal-scroller",1),o.dc("stepChanged",function(t){return e.onSelectionChange(t)}),o.Ub(),o.Vb(2,"div",2),o.Ic(3,Tr,3,3,"div",3),o.Ic(4,Kr,2,0,"div",4),o.Vb(5,"div",5),o.Ic(6,Mr,3,13,"ngx-charts-bar-vertical-2d",6),o.Ub(),o.Vb(7,"div",5),o.Ic(8,Or,1,3,"rtl-transactions-report-table",7),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("ngIf",e.transactionsNonZeroReportData.length>0),o.Db(1),o.oc("ngIf",e.transactionsNonZeroReportData.length<=0),o.Db(2),o.oc("ngIf",e.transactionsNonZeroReportData.length>0),o.Db(2),o.oc("ngIf",e.transactionsNonZeroReportData.length>0))},directives:[w.c,w.b,w.a,Ur.a,i.o,Dr.a,Ar.a],pipes:[i.f],styles:[""],data:{animation:[Vr.a]}}),t})();var zr=n("2h+y"),Br=n("0dfH");const Nr=a.k.forChild([{path:"",component:r,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Kn,canActivate:[zr.b]},{path:"onchain",component:Ni,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:Ja,canActivate:[zr.b]},{path:"send",component:Ya,data:{sweepAll:!1},canActivate:[zr.b]},{path:"sweep",component:Ya,data:{sweepAll:!0},canActivate:[zr.b]}]},{path:"connections",component:ji,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Uo,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:hs,canActivate:[zr.b]},{path:"pending",component:qs,canActivate:[zr.b]}]},{path:"peers",component:Ic,data:{sweepAll:!1},canActivate:[zr.b]}]},{path:"transactions",component:Gi,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:bn,canActivate:[zr.b]},{path:"invoices",component:Wt,canActivate:[zr.b]},{path:"queryroutes",component:Yc,canActivate:[zr.b]}]},{path:"messages",component:Ga,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:el,canActivate:[zr.b]},{path:"verify",component:rl,canActivate:[zr.b]}]},{path:"routing",component:Wi,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Bl,canActivate:[zr.b]},{path:"failedtransactions",component:vr,canActivate:[zr.b]}]},{path:"reports",component:wr,canActivate:[zr.b],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:kr,canActivate:[zr.b]},{path:"transactions",component:Er,canActivate:[zr.b]}]},{path:"lookups",component:Ia,canActivate:[zr.b]},{path:"rates",component:ja,canActivate:[zr.b]},{path:"**",component:Br.a},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var qr=n("PCNd");let Qr=(()=>{class t{}return t.\u0275mod=o.Nb({type:t,bootstrap:[r]}),t.\u0275inj=o.Mb({factory:function(e){return new(e||t)},providers:[zr.b],imports:[[i.c,qr.a,Nr]]}),t})()}}]);