mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
22ab6d1154
* rm .DS_Store * Add watchfrontenddev command for npm * Fix toggle issues in sidenav (pinning and on page refresh) * Add copy-to-clipboard fallback if navigator.clipboard is not available (#1336) * add copy-to-clipboard fallback if navigator.clipboard is not available * amend copy fallback * clipboard copy lint fixes and frontend build * fix: add missing boltz state `transaction.lockupFailed` (#1349) * fix: boltzd docs link (#1354) * exit gracefully (#1356) * allow for eclair updated relayed audit format (#1363) * feat: add boltz service to cln (#1352) * lint fix * Request Params Cleanup * cln: Boltz auto-send (#1366) * Bug-fix (CLN Boltz): Hide claim tx id and routing fee for non-zero conf reverse swap * cln: Boltz auto-send - Added auto send option for Swap In - Checking compatiblity with v2.0.0 and above * Test import fixes * Update help.component.ts (#1379) Fixed broken link under "Help" -> "Node Settings" * Backend config fix (#1382) * Updating Common Application Configuration * Fixed get RTL Conf * Update Application Settings * application and settings case change * Unified config models * Default node update * 2FA and Password reset * Final application settings update * Config Settings and Authentication case fixed * Node Setting Fix * Fiat currency Symbol fix * CLN: Fiat symbol fix * All: Fiat symbol fix * Update node settings * Services UI fix * CLN: Removed child node settings * All: Removed child node settings * Test fixes * mempool links for onchain information (#1383) * Tests fix Tests fix * UI for Block Explorer Configuration (#1385) * Bump fee with mempool information (#1386) * Mempool openchannel minfee (#1388) Open channel model block if min fee is higher * Show error on login screen if rune is incorrect and getinfo throws error (#1391) * cln: Removed channel lookup call for update policy (#1392) * ECL: On-chain Transactions, Invoice and Payments pagination (#1393) Done most of the UI changes to accommodate pagination on transactions, payments and invoices tables but true pagination cannot be implemented till total number of records are missing from the API response. Once the issue https://github.com/ACINQ/eclair/issues/2855 is fixed, I will uncomment pagination changes in the frontend. * lnd: Onchain CPFP (#1394) - UTXO label bug fix - Warning on utxo label for "sweep" in text. * Bug fixes after testing * Testing bug fixes (#1401) * Bug fix 2: lnd: Link channel point to explorer and show fee on close channel too * lnd: explorer link on pending channels * Node lookup link on view channel peer pubkey * Testing bug fixes (#1402) * Bug fix 2: lnd: Link channel point to explorer and show fee on close channel too * lnd: explorer link on pending channels * Node lookup link on view channel peer pubkey * test fixes * ng update to v18.0.x * Updating install with --legacy-peer-deps --------- Co-authored-by: Grzegorz Kućmierz <gkucmierz@gmail.com> Co-authored-by: lacksfish <lacksfish@gmail.com> Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com> Co-authored-by: Kilian <19181985+kilrau@users.noreply.github.com> Co-authored-by: Taylor King <taylorbradleyking@gmail.com> Co-authored-by: Fishcake <128653975+fishcakeday@users.noreply.github.com> Co-authored-by: Ant <72945059+2140data@users.noreply.github.com>
1 line
424 KiB
JavaScript
1 line
424 KiB
JavaScript
"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[17],{9017:(vp,Et,_)=>{_.r(Et),_.d(Et,{ECLModule:()=>Sp});var p=_(177),b=_(1188),Ut=_(9881),t=_(4438),h=_(2920),V=_(7575);function zt(n,o){1&n&&t.nrm(0,"mat-progress-bar",3)}let xt=(()=>{class n{constructor(e){this.router=e,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof b.Z:this.loading=!0;break;case i instanceof b.wF:case i instanceof b.j5:case i instanceof b.L6:this.loading=!1}})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-root"]],decls:4,vars:1,consts:[["outlet","outlet"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["color","primary","mode","indeterminate"]],template:function(i,a){1&i&&(t.j41(0,"div",1),t.DNE(1,zt,1,0,"mat-progress-bar",2),t.nrm(2,"router-outlet",null,0),t.k0s()),2&i&&(t.R7$(),t.Y8G("ngIf",a.loading))},dependencies:[p.bT,h.DJ,h.sA,h.UI,V.HM,b.n3],data:{animation:[Ut.E]}})}return n})();var u=_(1413),f=_(6977),rt=_(3993),Lt=_(614),F=_(5383),l=_(4416),U=_(9647),C=_(2730),G=_(8570),R=_(9640),M=_(2571),w=_(60),L=_(6038),j=_(8834),E=_(5596),St=_(6195),ct=_(9213),mt=_(9115),D=_(6850);const vt=n=>({backgroundColor:n});function Jt(n,o){if(1&n&&t.nrm(0,"span",6),2&n){const e=t.XpG();t.Y8G("ngStyle",t.eq3(1,vt,null==e.information?null:e.information.color))}}function qt(n,o){if(1&n&&(t.j41(0,"div")(1,"h4",1),t.EFF(2,"Color"),t.k0s(),t.j41(3,"div",2),t.nrm(4,"span",7),t.EFF(5),t.nI1(6,"uppercase"),t.k0s()()),2&n){const e=t.XpG();t.R7$(4),t.Y8G("ngStyle",t.eq3(4,vt,null==e.information?null:e.information.color)),t.R7$(),t.SpI(" ",t.bMT(6,2,null==e.information?null:e.information.color)," ")}}function Qt(n,o){if(1&n&&(t.j41(0,"span",2),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(e)}}let Zt=(()=>{class n{constructor(e){this.commonService=e,this.chains=[""]}ngOnChanges(){this.chains=[],this.chains.push("Bitcoin "+(this.information.network?this.commonService.titleCase(this.information.network):"Testnet"))}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(M.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[t.OA$],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(i,a){1&i&&(t.j41(0,"div",0)(1,"div")(2,"h4",1),t.EFF(3,"Alias"),t.k0s(),t.j41(4,"div",2),t.EFF(5),t.DNE(6,Jt,1,3,"span",3),t.k0s()(),t.DNE(7,qt,7,6,"div",4),t.j41(8,"div")(9,"h4",1),t.EFF(10,"Implementation"),t.k0s(),t.j41(11,"div",2),t.EFF(12),t.k0s()(),t.j41(13,"div")(14,"h4",1),t.EFF(15,"Chain"),t.k0s(),t.DNE(16,Qt,2,1,"span",5),t.k0s()()),2&i&&(t.R7$(5),t.SpI(" ",null==a.information?null:a.information.alias," "),t.R7$(),t.Y8G("ngIf",!a.showColorFieldSeparately),t.R7$(),t.Y8G("ngIf",a.showColorFieldSeparately),t.R7$(5),t.JRh(null!=a.information&&a.information.lnImplementation||null!=a.information&&a.information.version?(null==a.information?null:a.information.lnImplementation)+" "+(null==a.information?null:a.information.version):""),t.R7$(4),t.Y8G("ngForOf",a.chains))},dependencies:[p.Sq,p.bT,p.B3,h.DJ,h.sA,h.UI,L.eI,p.Pc]})}return n})();function Wt(n,o){if(1&n&&(t.j41(0,"div",2)(1,"div")(2,"h4",3),t.EFF(3,"Lightning"),t.k0s(),t.j41(4,"div",4),t.EFF(5),t.nI1(6,"number"),t.k0s(),t.nrm(7,"mat-progress-bar",5),t.k0s(),t.j41(8,"div")(9,"h4",3),t.EFF(10,"On-chain"),t.k0s(),t.j41(11,"div",4),t.EFF(12),t.nI1(13,"number"),t.k0s(),t.nrm(14,"mat-progress-bar",5),t.k0s(),t.j41(15,"div")(16,"h4",3),t.EFF(17,"Total"),t.k0s(),t.j41(18,"div",4),t.EFF(19),t.nI1(20,"number"),t.k0s()()()),2&n){const e=t.XpG();t.R7$(5),t.SpI("",t.bMT(6,5,e.balances.lightning)," Sats"),t.R7$(2),t.FS9("value",e.balances.lightning/e.balances.total*100),t.R7$(5),t.SpI("",t.bMT(13,7,e.balances.onchain)," Sats"),t.R7$(2),t.FS9("value",e.balances.onchain/e.balances.total*100),t.R7$(5),t.SpI("",t.bMT(20,9,e.balances.total)," Sats")}}function Kt(n,o){if(1&n&&(t.j41(0,"div",6)(1,"p"),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.JRh(e.errorMessage)}}let te=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["errorBlock",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(i,a){if(1&i&&t.DNE(0,Wt,21,11,"div",1)(1,Kt,3,1,"ng-template",null,0,t.C5r),2&i){const s=t.sdS(2);t.Y8G("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",s)}},dependencies:[p.bT,h.DJ,h.sA,h.UI,V.HM,p.QX]})}return n})();function ee(n,o){if(1&n&&(t.j41(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),t.EFF(4,"Daily"),t.k0s(),t.j41(5,"div",5),t.EFF(6),t.nI1(7,"number"),t.k0s()(),t.j41(8,"div")(9,"h4",4),t.EFF(10,"Weekly"),t.k0s(),t.j41(11,"div",5),t.EFF(12),t.nI1(13,"number"),t.k0s()(),t.j41(14,"div")(15,"h4",4),t.EFF(16,"Monthly"),t.k0s(),t.j41(17,"div",5),t.EFF(18),t.nI1(19,"number"),t.k0s()()(),t.j41(20,"div",3)(21,"div")(22,"h4",4),t.EFF(23,"Transactions"),t.k0s(),t.j41(24,"div",5),t.EFF(25),t.nI1(26,"number"),t.k0s()(),t.j41(27,"div")(28,"h4",4),t.EFF(29,"Transactions"),t.k0s(),t.j41(30,"div",5),t.EFF(31),t.nI1(32,"number"),t.k0s()(),t.j41(33,"div")(34,"h4",4),t.EFF(35,"Transactions"),t.k0s(),t.j41(36,"div",5),t.EFF(37),t.nI1(38,"number"),t.k0s()()()()),2&n){const e=t.XpG();t.R7$(6),t.SpI("",t.bMT(7,6,null==e.fees?null:e.fees.daily_fee)," Sats"),t.R7$(6),t.SpI("",t.bMT(13,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),t.R7$(6),t.SpI("",t.bMT(19,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),t.R7$(7),t.JRh(t.bMT(26,12,null==e.fees?null:e.fees.daily_txs)),t.R7$(6),t.JRh(t.bMT(32,14,null==e.fees?null:e.fees.weekly_txs)),t.R7$(6),t.JRh(t.bMT(38,16,null==e.fees?null:e.fees.monthly_txs))}}function ne(n,o){if(1&n&&(t.j41(0,"div",6)(1,"p"),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.JRh(e.errorMessage)}}let ie=(()=>{class n{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){if(this.fees?.monthly_fee){this.totalFees=[{name:"Monthly",value:this.fees.monthly_fee},{name:"Weekly",value:this.fees.weekly_fee||0},{name:"Daily ",value:this.fees.daily_fee||0}];const i=10**(Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10)-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/i)*i/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[t.OA$],decls:3,vars:2,consts:[["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(i,a){if(1&i&&t.DNE(0,ee,39,18,"div",1)(1,ne,3,1,"ng-template",null,0,t.C5r),2&i){const s=t.sdS(2);t.Y8G("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",s)}},dependencies:[p.bT,h.DJ,h.sA,h.UI,p.QX]})}return n})();function ae(n,o){if(1&n&&(t.j41(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),t.EFF(4,"Active"),t.k0s(),t.j41(5,"div",5),t.nrm(6,"span",6),t.EFF(7),t.nI1(8,"number"),t.k0s()(),t.j41(9,"div")(10,"h4",4),t.EFF(11,"Pending"),t.k0s(),t.j41(12,"div",5),t.nrm(13,"span",7),t.EFF(14),t.nI1(15,"number"),t.k0s()(),t.j41(16,"div")(17,"h4",4),t.EFF(18,"Inactive"),t.k0s(),t.j41(19,"div",5),t.nrm(20,"span",8),t.EFF(21),t.nI1(22,"number"),t.k0s()()(),t.j41(23,"div",3)(24,"div")(25,"h4",4),t.EFF(26,"Capacity"),t.k0s(),t.j41(27,"div",5),t.EFF(28),t.nI1(29,"number"),t.k0s()(),t.j41(30,"div")(31,"h4",4),t.EFF(32,"Capacity"),t.k0s(),t.j41(33,"div",5),t.EFF(34),t.nI1(35,"number"),t.k0s()(),t.j41(36,"div")(37,"h4",4),t.EFF(38,"Capacity"),t.k0s(),t.j41(39,"div",5),t.EFF(40),t.nI1(41,"number"),t.k0s()()()()),2&n){const e=t.XpG();t.R7$(7),t.JRh(t.bMT(8,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),t.R7$(7),t.JRh(t.bMT(15,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),t.R7$(7),t.JRh(t.bMT(22,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),t.R7$(7),t.SpI("",t.bMT(29,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),t.R7$(6),t.SpI("",t.bMT(35,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),t.R7$(6),t.SpI("",t.bMT(41,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats")}}function oe(n,o){if(1&n&&(t.j41(0,"div",9)(1,"p"),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.JRh(e.errorMessage)}}let se=(()=>{class n{constructor(){this.channelsStatus={}}static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(i,a){if(1&i&&t.DNE(0,ae,42,18,"div",1)(1,oe,3,1,"ng-template",null,0,t.C5r),2&i){const s=t.sdS(2);t.Y8G("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",s)}},dependencies:[p.bT,h.DJ,h.sA,h.UI,p.QX]})}return n})();var g=_(6467),Z=_(1997),J=_(4823),A=_(497);const le=()=>["../connections/channels/open"],re=(n,o)=>({filterColumn:n,filterValue:o});function ce(n,o){if(1&n&&(t.j41(0,"div",19)(1,"a",20),t.EFF(2),t.nI1(3,"slice"),t.k0s(),t.j41(4,"div",6)(5,"mat-hint",21)(6,"strong",8),t.EFF(7,"Local:"),t.k0s(),t.EFF(8),t.nI1(9,"number"),t.k0s(),t.j41(10,"mat-hint",22),t.nrm(11,"fa-icon",23),t.EFF(12),t.nI1(13,"number"),t.k0s(),t.j41(14,"mat-hint",24)(15,"strong",8),t.EFF(16,"Remote:"),t.k0s(),t.EFF(17),t.nI1(18,"number"),t.k0s()(),t.nrm(19,"mat-progress-bar",25),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(3);t.R7$(),t.FS9("matTooltip",e.alias||e.shortChannelId),t.FS9("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.Y8G("routerLink",t.lJ4(23,le))("state",t.l_i(24,re,e.alias?"alias":"shortChannelId",e.alias||e.shortChannelId)),t.R7$(),t.Lme(" ",t.brH(3,11,(null==e?null:e.alias)||(null==e?null:e.shortChannelId),0,24),"",((null==e?null:e.alias)||(null==e?null:e.shortChannelId)).length>25?"...":""," "),t.R7$(6),t.SpI("",t.i5U(9,15,(null==e?null:e.toLocal)||0,"1.0-0")," Sats"),t.R7$(3),t.Y8G("icon",i.faBalanceScale),t.R7$(),t.SpI(" (",t.bMT(13,18,(null==e?null:e.balancedness)||0),") "),t.R7$(5),t.SpI("",t.i5U(18,20,(null==e?null:e.toRemote)||0,"1.0-0")," Sats"),t.R7$(2),t.FS9("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function me(n,o){if(1&n&&(t.j41(0,"div",17),t.DNE(1,ce,20,27,"div",18),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.allChannels)}}function pe(n,o){if(1&n&&(t.j41(0,"div",3)(1,"div",4)(2,"span",5),t.EFF(3,"Total Capacity"),t.k0s(),t.j41(4,"div",6)(5,"mat-hint",7)(6,"strong",8),t.EFF(7,"Local:"),t.k0s(),t.EFF(8),t.nI1(9,"number"),t.k0s(),t.j41(10,"mat-hint",9),t.nrm(11,"fa-icon",10),t.EFF(12),t.nI1(13,"number"),t.k0s(),t.j41(14,"mat-hint",11)(15,"strong",8),t.EFF(16,"Remote:"),t.k0s(),t.EFF(17),t.nI1(18,"number"),t.k0s()(),t.nrm(19,"mat-progress-bar",12),t.k0s(),t.j41(20,"div",13),t.nrm(21,"mat-divider",14),t.k0s(),t.j41(22,"div",15),t.DNE(23,me,2,1,"div",16),t.k0s()()),2&n){const e=t.XpG(),i=t.sdS(2);t.R7$(8),t.SpI("",t.i5U(9,7,(null==e.channelBalances?null:e.channelBalances.localBalance)||0,"1.0-0")," Sats"),t.R7$(3),t.Y8G("icon",e.faBalanceScale),t.R7$(),t.SpI(" (",t.bMT(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),t.R7$(5),t.SpI("",t.i5U(18,12,(null==e.channelBalances?null:e.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),t.R7$(2),t.FS9("value",null!=e.channelBalances&&e.channelBalances.localBalance&&(null==e.channelBalances?null:e.channelBalances.localBalance)>0?+(null==e.channelBalances?null:e.channelBalances.localBalance)/(+(null==e.channelBalances?null:e.channelBalances.localBalance)+ +(null==e.channelBalances?null:e.channelBalances.remoteBalance))*100:0),t.R7$(4),t.Y8G("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",i)}}function ue(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",26),t.EFF(1," No channels available. "),t.j41(2,"button",27),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.goToChannels())}),t.EFF(3,"Open Channel"),t.k0s()()}}function de(n,o){if(1&n&&(t.j41(0,"div",28)(1,"p"),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.JRh(e.errorMessage)}}let he=(()=>{class n{constructor(e){this.router=e,this.faBalanceScale=F.GR4,this.faDumbbell=F.VwO,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","8","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"],["fxLayout","column","fxFlex","100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"routerLink","state","matTooltip","matTooltipDisabled"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90","color-primary"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90","color-primary"],["matTooltip","Balance Score",1,"color-primary","mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90","color-primary"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",1,"mt-1","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(i,a){if(1&i&&t.DNE(0,pe,24,15,"div",2)(1,ue,4,0,"ng-template",null,0,t.C5r)(3,de,3,1,"ng-template",null,1,t.C5r),2&i){const s=t.sdS(4);t.Y8G("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",s)}},dependencies:[p.Sq,p.bT,w.aY,h.DJ,h.sA,h.UI,j.$z,g.MV,Z.q,V.HM,J.oV,A.Ld,b.Wk,p.P9,p.QX],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]})}return n})();const fe=(n,o,e)=>({"mb-4":n,"mb-2":o,"mb-1":e}),_e=()=>["../connections/channels/open"],ge=(n,o)=>({filterColumn:n,filterValue:o});function Ce(n,o){if(1&n&&(t.j41(0,"mat-hint",19)(1,"strong",20),t.EFF(2,"Capacity: "),t.k0s(),t.EFF(3),t.nI1(4,"number"),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(3),t.SpI("",t.i5U(4,1,e.toRemote||0,"1.0-0")," Sats")}}function ye(n,o){if(1&n&&(t.j41(0,"mat-hint",19)(1,"strong",20),t.EFF(2,"Capacity: "),t.k0s(),t.EFF(3),t.nI1(4,"number"),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(3),t.SpI("",t.i5U(4,1,e.toLocal||0,"1.0-0")," Sats")}}function be(n,o){if(1&n&&t.nrm(0,"mat-progress-bar",21),2&n){const e=t.XpG().$implicit,i=t.XpG(3);t.FS9("value",i.totalLiquidity>0?(+e.toRemote||0)/i.totalLiquidity*100:0)}}function Fe(n,o){if(1&n&&t.nrm(0,"mat-progress-bar",21),2&n){const e=t.XpG().$implicit,i=t.XpG(3);t.FS9("value",i.totalLiquidity>0?(+e.toLocal||0)/i.totalLiquidity*100:0)}}function Ee(n,o){if(1&n&&(t.j41(0,"div",14)(1,"a",15),t.EFF(2),t.nI1(3,"slice"),t.k0s(),t.j41(4,"div",16),t.DNE(5,Ce,5,4,"mat-hint",17)(6,ye,5,4,"mat-hint",17),t.k0s(),t.DNE(7,be,1,1,"mat-progress-bar",18)(8,Fe,1,1,"mat-progress-bar",18),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(3);t.R7$(),t.FS9("matTooltip",e.alias||e.shortChannelId),t.FS9("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.Y8G("routerLink",t.lJ4(14,_e))("state",t.l_i(15,ge,e.alias?"alias":"shortChannelId",e.alias||e.shortChannelId)),t.R7$(),t.Lme(" ",t.brH(3,10,e.alias||e.shortChannelId,0,24),"",(e.alias||e.shortChannelId).length>25?"...":""," "),t.R7$(3),t.Y8G("ngIf","In"===i.direction),t.R7$(),t.Y8G("ngIf","Out"===i.direction),t.R7$(),t.Y8G("ngIf","In"===i.direction),t.R7$(),t.Y8G("ngIf","Out"===i.direction)}}function xe(n,o){if(1&n&&(t.j41(0,"div",12),t.DNE(1,Ee,9,18,"div",13),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.allChannels)}}function Le(n,o){if(1&n&&(t.j41(0,"div",3)(1,"div",4)(2,"span",5),t.EFF(3,"Total Capacity"),t.k0s(),t.j41(4,"mat-hint",6),t.EFF(5),t.nI1(6,"number"),t.k0s(),t.nrm(7,"mat-progress-bar",7),t.k0s(),t.j41(8,"div",8),t.nrm(9,"mat-divider",9),t.k0s(),t.j41(10,"div",10),t.DNE(11,xe,2,1,"div",11),t.k0s()()),2&n){const e=t.XpG(),i=t.sdS(2);t.Y8G("ngClass",t.sMw(7,fe,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)),t.R7$(5),t.SpI("",t.i5U(6,4,e.totalLiquidity,"1.0-0")," Sats"),t.R7$(6),t.Y8G("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",i)}}function Se(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",24),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.goToChannels())}),t.EFF(1,"Open Channel"),t.k0s()}}function ve(n,o){if(1&n&&(t.j41(0,"div",22),t.EFF(1," No channels available. "),t.DNE(2,Se,2,0,"button",23),t.k0s()),2&n){const e=t.XpG();t.R7$(2),t.Y8G("ngIf","Out"===e.direction)}}function Re(n,o){if(1&n&&(t.j41(0,"div",25)(1,"p"),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.JRh(e.errorMessage)}}let Ie=(()=>{class n{constructor(e,i){this.router=e,this.commonService=i,this.screenSize="",this.screenSizeEnum=l.f7}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(b.Ix),t.rXU(M.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","8","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"],["fxLayout","column","fxFlex","100",1,"w-100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"routerLink","state","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 start",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","1",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(i,a){if(1&i&&t.DNE(0,Le,12,11,"div",2)(1,ve,3,1,"ng-template",null,0,t.C5r)(3,Re,3,1,"ng-template",null,1,t.C5r),2&i){const s=t.sdS(4);t.Y8G("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",s)}},dependencies:[p.YU,p.Sq,p.bT,h.DJ,h.sA,h.UI,L.PW,j.$z,g.MV,Z.q,V.HM,J.oV,A.Ld,b.Wk,p.P9,p.QX]})}return n})();var q=_(6697),I=_(6695),x=_(2042),c=_(9159),S=_(2798),H=_(5964),k=_(5428),B=_(5351),pt=_(3017),Q=_(4054),et=_(1534),d=_(9417),O=_(9631),W=_(9587);const ke=["paymentReq"];function Te(n,o){if(1&n&&(t.j41(0,"span",23),t.nrm(1,"fa-icon",24),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.convertedCurrency.symbol)}}function we(n,o){if(1&n&&t.nrm(0,"span",25),2&n){const e=t.XpG(2);t.Y8G("innerHTML",e.convertedCurrency.symbol,t.npT)}}function je(n,o){if(1&n&&(t.j41(0,"mat-hint",20),t.EFF(1),t.DNE(2,Te,2,1,"span",21)(3,we,1,1,"span",22),t.EFF(4),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",e.paymentDecodedHintPre," "),t.R7$(),t.Y8G("ngIf",e.convertedCurrency&&"FA"===e.convertedCurrency.iconType&&""!==e.paymentDecodedHintPre),t.R7$(),t.Y8G("ngIf",e.convertedCurrency&&"SVG"===e.convertedCurrency.iconType&&""!==e.paymentDecodedHintPre),t.R7$(),t.SpI(" ",e.paymentDecodedHintPost," ")}}function De(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Payment request is required."),t.k0s())}function Pe(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.JRh(e.paymentDecodedHint)}}function Ge(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Payment amount is required."),t.k0s())}function Ae(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-form-field",4)(1,"mat-label"),t.EFF(2,"Amount (Sats)"),t.k0s(),t.j41(3,"input",26,2),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.paymentAmount,a)||(s.paymentAmount=a),t.Njj(a)}),t.bIt("change",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onAmountChange(a))}),t.k0s(),t.j41(5,"mat-hint"),t.EFF(6,"It is a zero amount invoice, enter amount to be paid."),t.k0s(),t.DNE(7,Ge,2,0,"mat-error",14),t.k0s()}if(2&n){const e=t.XpG();t.R7$(3),t.R50("ngModel",e.paymentAmount),t.R7$(4),t.Y8G("ngIf",!e.paymentAmount)}}function Ne(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.paymentError)}}function Me(n,o){if(1&n&&(t.j41(0,"div",27),t.nrm(1,"fa-icon",28),t.DNE(2,Ne,2,1,"span",14),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faExclamationTriangle),t.R7$(),t.Y8G("ngIf",""!==e.paymentError)}}let Be=(()=>{class n{constructor(e,i,a,s,r,m,T,y){this.dialogRef=e,this.store=i,this.eclEffects=a,this.logger=s,this.commonService=r,this.decimalPipe=m,this.actions=T,this.dataService=y,this.faExclamationTriangle=F.zpE,this.convertedCurrency=null,this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHintPre="",this.paymentDecodedHintPost="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=l.nv[0],this.feeLimitTypes=l.nv,this.paymentError="",this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.activeChannels=e.activeChannels,this.logger.info(e)}),this.actions.pipe((0,f.Q)(this.unSubs[1]),(0,H.p)(e=>e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL||e.type===l.Uu.SEND_PAYMENT_STATUS_ECL)).subscribe(e=>{e.type===l.Uu.SEND_PAYMENT_STATUS_ECL&&this.dialogRef.close(),e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.wn.ERROR&&"SendPayment"===e.payload.action&&(delete this.paymentDecoded.amount,this.paymentError=e.payload.message)})}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():(this.paymentAmount=null,this.paymentError="",this.paymentDecodedHintPre="",this.paymentDecodedHintPost="",this.paymentReq.control.setErrors(null),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,q.s)(1)).subscribe({next:e=>{this.paymentDecoded=e,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHintPre="Zero Amount Invoice | Memo: "+this.paymentDecoded.description,this.paymentDecodedHintPost=""):(this.zeroAmtInvoice=!1,this.selNode&&this.selNode.settings.fiatConversion&&this.paymentDecoded.amount?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.BQ.SATS,l.BQ.OTHER,this.selNode.settings.currencyUnits&&this.selNode.settings.currencyUnits.length>2?this.selNode.settings.currencyUnits[2]:"",this.selNode.settings.fiatConversion).pipe((0,f.Q)(this.unSubs[2])).subscribe({next:i=>{this.convertedCurrency=i,this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats (",this.paymentDecodedHintPost=this.decimalPipe.transform(this.convertedCurrency.OTHER?this.convertedCurrency.OTHER:0,l.k.OTHER)+") | Memo: "+this.paymentDecoded.description},error:i=>{this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency.",this.paymentDecodedHintPost=""}}):(this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description,this.paymentDecodedHintPost=""))},error:e=>{this.logger.error(e),this.paymentDecodedHintPre="ERROR: "+(e.message?e.message:"string"==typeof e?e:JSON.stringify(e)),this.paymentDecodedHintPost="",this.paymentReq.control.setErrors({decodeError:!0})}}))}sendPayment(){this.store.dispatch((0,k.Fd)(this.zeroAmtInvoice&&this.paymentAmount?{payload:{invoice:this.paymentRequest,amountMsat:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{invoice:this.paymentRequest,fromDialog:!0}}))}onPaymentRequestEntry(e){this.paymentRequest=e&&"string"==typeof e?e.trim():e,this.paymentError="",this.paymentDecodedHintPre="",this.paymentDecodedHintPost="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,q.s)(1)).subscribe({next:i=>{this.paymentDecoded=i,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHintPre="Zero Amount Invoice | Memo: "+this.paymentDecoded.description,this.paymentDecodedHintPost=""):(this.zeroAmtInvoice=!1,this.selNode&&this.selNode.settings.fiatConversion&&this.paymentDecoded.amount?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.BQ.SATS,l.BQ.OTHER,this.selNode.settings.currencyUnits&&this.selNode.settings.currencyUnits.length>2?this.selNode.settings.currencyUnits[2]:"",this.selNode.settings.fiatConversion).pipe((0,f.Q)(this.unSubs[3])).subscribe({next:a=>{this.convertedCurrency=a,this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats (",this.paymentDecodedHintPost=this.decimalPipe.transform(this.convertedCurrency.OTHER?this.convertedCurrency.OTHER:0,l.k.OTHER)+") | Memo: "+this.paymentDecoded.description},error:a=>{this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency.",this.paymentDecodedHintPost=""}}):(this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description,this.paymentDecodedHintPost=""))},error:i=>{this.logger.error(i),this.paymentDecodedHintPre="ERROR: "+(i.message?i.message:"string"==typeof i?i:JSON.stringify(i)),this.paymentDecodedHintPost="",this.paymentReq.control.setErrors({decodeError:!0})}}))}onAmountChange(e){delete this.paymentDecoded.amount,this.paymentDecoded.amount=e}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=l.nv[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHintPre="",this.paymentDecodedHintPost="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(R.il),t.rXU(pt.B),t.rXU(G.gP),t.rXU(M.h),t.rXU(p.QX),t.rXU(Q.En),t.rXU(et.u))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(i,a){if(1&i&&t.GBs(ke,5),2&i){let s;t.mGM(s=t.lsd())&&(a.paymentReq=s.first)}},decls:26,vars:7,consts:[["sendPaymentForm","ngForm"],["paymentReq","ngModel"],["paymentAmt","ngModel"],["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["fxLayout","column","fxFlex","100"],["autoFocus","","matInput","","name","paymentRequest","rows","4","tabindex","1","required","",3,"ngModelChange","matTextareaAutosize","ngModel"],["fxLayout","row wrap","fxFlex","100",4,"ngIf"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row wrap","fxFlex","100"],["fxLayoutAlign","center center","class","mr-3px",4,"ngIf"],["fxLayoutAlign","center center","class","mr-3px",3,"innerHTML",4,"ngIf"],["fxLayoutAlign","center center",1,"mr-3px"],[3,"icon"],["fxLayoutAlign","center center",1,"mr-3px",3,"innerHTML"],["matInput","","name","amount","tabindex","2","required","",3,"ngModelChange","change","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",3)(1,"div",4)(2,"mat-card-header",5)(3,"div",6)(4,"span",7),t.EFF(5,"Send Payment"),t.k0s()(),t.j41(6,"button",8),t.EFF(7,"X"),t.k0s()(),t.j41(8,"mat-card-content",9)(9,"form",10,0)(11,"mat-form-field",11)(12,"mat-label"),t.EFF(13,"Payment Request"),t.k0s(),t.j41(14,"textarea",12,1),t.bIt("ngModelChange",function(m){return t.eBV(s),t.Njj(a.onPaymentRequestEntry(m))})("matTextareaAutosize",function(){return t.eBV(s),t.Njj(!0)}),t.k0s(),t.DNE(16,je,5,4,"mat-hint",13)(17,De,2,0,"mat-error",14)(18,Pe,2,1,"mat-error",14),t.k0s(),t.DNE(19,Ae,8,2,"mat-form-field",15)(20,Me,3,2,"div",16),t.j41(21,"div",17)(22,"button",18),t.bIt("click",function(){return t.eBV(s),t.Njj(a.resetData())}),t.EFF(23,"Clear Fields"),t.k0s(),t.j41(24,"button",19),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onSendPayment())}),t.EFF(25,"Send Payment"),t.k0s()()()()()()}if(2&i){const s=t.sdS(15);t.R7$(6),t.Y8G("mat-dialog-close",!1),t.R7$(8),t.Y8G("ngModel",a.paymentRequest),t.R7$(2),t.Y8G("ngIf",a.paymentRequest&&""!==a.paymentDecodedHintPre),t.R7$(),t.Y8G("ngIf",!a.paymentRequest),t.R7$(),t.Y8G("ngIf",null==s.errors?null:s.errors.decodeError),t.R7$(),t.Y8G("ngIf",a.zeroAmtInvoice),t.R7$(),t.Y8G("ngIf",""!==a.paymentError)}},dependencies:[p.bT,d.qT,d.me,d.BC,d.cb,d.YS,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,B.tx,j.$z,E.m2,E.MM,O.fg,g.rl,g.nJ,g.MV,g.TL,W.N]})}return n})();var Y=_(9454);const $e=["scrollContainer"];function Ve(n,o){if(1&n&&(t.j41(0,"div",9)(1,"div",2)(2,"h4",11),t.EFF(3,"Description"),t.k0s(),t.j41(4,"span",12),t.EFF(5),t.k0s()()()),2&n){const e=t.XpG();t.R7$(5),t.JRh(e.description)}}function Oe(n,o){1&n&&t.nrm(0,"mat-divider",14)}function He(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-expansion-panel",23),t.bIt("opened",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onExpansionOpen(!0))})("closed",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onExpansionOpen(!1))}),t.j41(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"h4",24),t.EFF(4),t.k0s(),t.j41(5,"h4",25),t.EFF(6),t.nI1(7,"number"),t.k0s()()(),t.j41(8,"div",8)(9,"div",9)(10,"div",26)(11,"h4",11),t.EFF(12,"Fees (mSats)"),t.k0s(),t.j41(13,"span",12),t.EFF(14),t.nI1(15,"number"),t.k0s()(),t.j41(16,"div",26)(17,"h4",11),t.EFF(18,"Date/Time"),t.k0s(),t.j41(19,"span",12),t.EFF(20),t.nI1(21,"date"),t.k0s()()(),t.nrm(22,"mat-divider",14),t.j41(23,"div",9)(24,"div",2)(25,"h4",11),t.EFF(26,"ID"),t.k0s(),t.j41(27,"span",27),t.EFF(28),t.k0s()()(),t.nrm(29,"mat-divider",14),t.j41(30,"div",9)(31,"div",2)(32,"h4",11),t.EFF(33,"To Channel"),t.k0s(),t.j41(34,"span",27),t.EFF(35),t.k0s()()()()()}if(2&n){const e=o.$implicit,i=o.index,a=t.XpG();t.Y8G("expanded",a.expansionOpen),t.R7$(4),t.SpI("Part ",i+1,""),t.R7$(2),t.SpI("",t.bMT(7,7,e.amount)," (Sats)"),t.R7$(8),t.JRh(t.bMT(15,9,e.feesPaid)),t.R7$(6),t.JRh(t.i5U(21,11,e.timestamp,"dd/MMM/y HH:mm")),t.R7$(8),t.JRh(e.id),t.R7$(7),t.JRh(e.toChannelAlias)}}let Ye=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,this.description=null,this.shouldScroll=!0,this.expansionOpen=!0}ngOnInit(){this.payment=this.data.payment,this.data.sentPaymentInfo.length>0&&this.data.sentPaymentInfo[0].paymentRequest&&this.data.sentPaymentInfo[0].paymentRequest.description&&""!==this.data.sentPaymentInfo[0].paymentRequest.description&&(this.description=this.data.sentPaymentInfo[0].paymentRequest.description)}ngAfterViewChecked(){this.shouldScroll=this.scrollContainer.nativeElement.classList.value.includes("ps--active-y")}onScrollDown(){this.scrollContainer.nativeElement.scrollTop=this.scrollContainer.nativeElement.scrollTop+62.6}onExpansionOpen(e){this.expansionOpen=e}onClose(){this.dialogRef.close(!1)}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(B.Vh))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(i,a){if(1&i&&t.GBs($e,5),2&i){let s;t.mGM(s=t.lsd())&&(a.scrollContainer=s.first)}},decls:66,vars:15,consts:[["scrollContainer",""],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"h-40","padding-gap-x-large",3,"perfectScrollbar"],["fxLayout","column"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],["fxFlex","70"],[1,"w-100","my-1"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["class","flat-expansion-panel my-1",3,"expanded","opened","closed",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start end",1,"btn-sticky-container","padding-gap-x-large"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"padding-gap-x-large","padding-gap-bottom-large"],["fxLayoutAlign","center center","tabindex","1","mat-button","","color","primary","type","button","default","",1,"mr-1",3,"mat-dialog-close"],[1,"flat-expansion-panel","my-1",3,"opened","closed","expanded"],["fxFlex","30","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","70","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"mat-card-header",3)(3,"div",4)(4,"span",5),t.EFF(5,"Payment Information"),t.k0s()(),t.j41(6,"button",6),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onClose())}),t.EFF(7,"X"),t.k0s()(),t.j41(8,"mat-card-content",7,0)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),t.EFF(14,"Amount (Sats)"),t.k0s(),t.j41(15,"span",12),t.EFF(16),t.nI1(17,"number"),t.k0s()(),t.j41(18,"div",13)(19,"h4",11),t.EFF(20,"Date/Time"),t.k0s(),t.j41(21,"span",12),t.EFF(22),t.nI1(23,"date"),t.k0s()()(),t.nrm(24,"mat-divider",14),t.j41(25,"div",9)(26,"div",2)(27,"h4",11),t.EFF(28,"ID"),t.k0s(),t.j41(29,"span",12),t.EFF(30),t.k0s()()(),t.nrm(31,"mat-divider",14),t.j41(32,"div",9)(33,"div",2)(34,"h4",11),t.EFF(35,"Payment Hash"),t.k0s(),t.j41(36,"span",12),t.EFF(37),t.k0s()()(),t.nrm(38,"mat-divider",14),t.j41(39,"div",9)(40,"div",2)(41,"h4",11),t.EFF(42,"Payment Preimage"),t.k0s(),t.j41(43,"span",12),t.EFF(44),t.k0s()()(),t.nrm(45,"mat-divider",14),t.j41(46,"div",9)(47,"div",2)(48,"h4",11),t.EFF(49,"Recipient Node"),t.k0s(),t.j41(50,"span",12),t.EFF(51),t.k0s()()(),t.nrm(52,"mat-divider",14),t.DNE(53,Ve,6,1,"div",15)(54,Oe,1,0,"mat-divider",16),t.j41(55,"div",9)(56,"div",2)(57,"mat-accordion"),t.DNE(58,He,36,14,"mat-expansion-panel",17),t.k0s()()()()(),t.j41(59,"div",18)(60,"button",19),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onScrollDown())}),t.j41(61,"mat-icon",20),t.EFF(62,"arrow_downward"),t.k0s()()(),t.j41(63,"div",21)(64,"button",22),t.EFF(65,"OK"),t.k0s()()()()}2&i&&(t.R7$(16),t.JRh(t.bMT(17,10,a.payment.recipientAmount)),t.R7$(6),t.JRh(t.i5U(23,12,a.payment.firstPartTimestamp,"dd/MMM/y HH:mm")),t.R7$(8),t.JRh(a.payment.id),t.R7$(7),t.JRh(a.payment.paymentHash),t.R7$(7),t.JRh(a.payment.paymentPreimage),t.R7$(7),t.JRh(a.payment.recipientNodeAlias),t.R7$(2),t.Y8G("ngIf",a.description),t.R7$(),t.Y8G("ngIf",a.description),t.R7$(4),t.Y8G("ngForOf",a.payment.parts),t.R7$(6),t.Y8G("mat-dialog-close",!1))},dependencies:[p.Sq,p.bT,h.DJ,h.sA,h.UI,B.tx,j.$z,j.$0,E.m2,E.MM,Y.BS,Y.GK,Y.Z2,Y.WN,ct.An,Z.q,A.Ld,p.QX,p.vh]})}return n})();var v=_(1771),at=_(7541),z=_(2929),X=_(6600);const Xe=["sendPaymentForm"],Ue=()=>["all"],ze=n=>({"error-border":n}),Je=()=>["no_payment"],$=n=>({width:n}),qe=n=>({"display-none":n});function Qe(n,o){if(1&n&&(t.j41(0,"span",18),t.nrm(1,"fa-icon",19),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Y8G("icon",e.convertedCurrency.symbol)}}function Ze(n,o){if(1&n&&t.nrm(0,"span",20),2&n){const e=t.XpG(3);t.Y8G("innerHTML",e.convertedCurrency.symbol,t.npT)}}function We(n,o){if(1&n&&(t.j41(0,"mat-hint",15),t.EFF(1),t.DNE(2,Qe,2,1,"span",16)(3,Ze,1,1,"span",17),t.EFF(4),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.SpI(" ",e.paymentDecodedHintPre," "),t.R7$(),t.Y8G("ngIf",e.convertedCurrency&&"FA"===e.convertedCurrency.iconType&&""!==e.paymentDecodedHintPre),t.R7$(),t.Y8G("ngIf",e.convertedCurrency&&"SVG"===e.convertedCurrency.iconType&&""!==e.paymentDecodedHintPre),t.R7$(),t.SpI(" ",e.paymentDecodedHintPost," ")}}function Ke(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Payment request is required."),t.k0s())}function tn(n,o){if(1&n){const e=t.RV6();t.j41(0,"form",7,0)(2,"mat-form-field",8)(3,"mat-label"),t.EFF(4,"Payment Request"),t.k0s(),t.j41(5,"textarea",9,1),t.bIt("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onPaymentRequestEntry(a))})("matTextareaAutosize",function(){return t.eBV(e),t.Njj(!0)}),t.k0s(),t.DNE(7,We,5,4,"mat-hint",10)(8,Ke,2,0,"mat-error",11),t.k0s(),t.j41(9,"div",12)(10,"button",13),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.resetData())}),t.EFF(11,"Clear Field"),t.k0s(),t.j41(12,"button",14),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onSendPayment())}),t.EFF(13,"Send Payment"),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(5),t.Y8G("ngModel",e.paymentRequest),t.R7$(2),t.Y8G("ngIf",e.paymentRequest&&""!==e.paymentDecodedHintPre),t.R7$(),t.Y8G("ngIf",!e.paymentRequest)}}function en(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",21)(1,"button",14),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.openSendPaymentModal())}),t.EFF(2,"Send Payment"),t.k0s()()}}function nn(n,o){if(1&n&&(t.j41(0,"mat-option",66),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function an(n,o){1&n&&t.nrm(0,"mat-progress-bar",67)}function on(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"Date/Time"),t.k0s())}function sn(n,o){if(1&n&&(t.j41(0,"td",69),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.i5U(2,1,null==e?null:e.firstPartTimestamp,"dd/MMM/y HH:mm"))}}function ln(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"ID"),t.k0s())}function rn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",70)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.id)}}function cn(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"Destination Node ID"),t.k0s())}function mn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",70)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.recipientNodeId)}}function pn(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"Destination"),t.k0s())}function un(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",70)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.recipientNodeAlias)}}function dn(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"Description"),t.k0s())}function hn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",70)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.description)}}function fn(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"Payment Hash"),t.k0s())}function _n(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",70)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.paymentHash)}}function gn(n,o){1&n&&(t.j41(0,"th",68),t.EFF(1,"Preimage"),t.k0s())}function Cn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",70)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.paymentPreimage)}}function yn(n,o){1&n&&(t.j41(0,"th",72),t.EFF(1,"Amount (Sats)"),t.k0s())}function bn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"span",73),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,null==e?null:e.recipientAmount))}}function Fn(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",74)(1,"div",75)(2,"mat-select",76),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",77),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function En(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",78)(1,"button",79),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2);return t.Njj(s.onPaymentClick(a))}),t.EFF(2,"View Info"),t.k0s()()}}function xn(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No payment available."),t.k0s())}function Ln(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting payments..."),t.k0s())}function Sn(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.JRh(e.errorMessage)}}function vn(n,o){if(1&n&&(t.j41(0,"td",80),t.DNE(1,xn,2,0,"p",11)(2,Ln,2,0,"p",11)(3,Sn,2,1,"p",11),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function Rn(n,o){if(1&n&&(t.j41(0,"span",81),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,e.timestamp,"dd/MMM/y HH:mm")," ")}}function In(n,o){if(1&n&&(t.qex(0),t.DNE(1,Rn,3,4,"span",82),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function kn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"span",81),t.EFF(2),t.k0s(),t.DNE(3,In,2,1,"ng-container",11),t.k0s()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" Total Attempts: ",(null==e||null==e.parts?null:e.parts.length)||0," "),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function Tn(n,o){if(1&n&&(t.j41(0,"span",81)(1,"span",83)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(4);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(e.id)}}function wn(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,Tn,4,4,"span",82),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function jn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",83)(2,"span",71),t.EFF(3),t.k0s()(),t.DNE(4,wn,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(3,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.id),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function Dn(n,o){if(1&n&&(t.j41(0,"span",81)(1,"span",83)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(4);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(e.toChannelId)}}function Pn(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,Dn,4,4,"span",82),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function Gn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",83)(2,"span",71),t.EFF(3),t.k0s()(),t.DNE(4,Pn,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(3,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.recipientNodeId),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function An(n,o){if(1&n&&(t.j41(0,"span",81)(1,"span",83)(2,"span",71),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(4);t.R7$(),t.Y8G("ngStyle",t.eq3(2,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(e.toChannelAlias)}}function Nn(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,An,4,4,"span",82),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function Mn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",83)(2,"span",71),t.EFF(3),t.k0s()(),t.DNE(4,Nn,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(3,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.recipientNodeAlias),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function Bn(n,o){if(1&n&&(t.j41(0,"span",84),t.EFF(1),t.nI1(2,"number"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,e.amount,"1.0-0")," ")}}function $n(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,Bn,3,4,"span",85),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function Vn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"span",84),t.EFF(2),t.nI1(3,"number"),t.k0s(),t.DNE(4,$n,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.i5U(3,2,null==e?null:e.recipientAmount,"1.0-0")),t.R7$(2),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function On(n,o){if(1&n&&(t.j41(0,"span",81)(1,"span",83)(2,"span",71),t.EFF(3),t.nI1(4,"number"),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(4);t.R7$(),t.Y8G("ngStyle",t.eq3(5,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.SpI("Fee Paid: ",t.i5U(4,2,e.feesPaid,"1.0-0")," (Sats)")}}function Hn(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,On,5,7,"span",82),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function Yn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",83)(2,"span",71),t.EFF(3),t.k0s()(),t.DNE(4,Hn,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(3,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.description),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function Xn(n,o){if(1&n&&(t.j41(0,"span",81)(1,"span",83)(2,"span",71),t.EFF(3),t.nI1(4,"number"),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(4);t.R7$(),t.Y8G("ngStyle",t.eq3(5,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.SpI("Fee Paid: ",t.i5U(4,2,e.feesPaid,"1.0-0")," (Sats)")}}function Un(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,Xn,5,7,"span",82),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function zn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",83)(2,"span",71),t.EFF(3),t.k0s()(),t.DNE(4,Un,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(3,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.paymentHash),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function Jn(n,o){if(1&n&&(t.j41(0,"span",81)(1,"span",83)(2,"span",71),t.EFF(3),t.nI1(4,"number"),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(4);t.R7$(),t.Y8G("ngStyle",t.eq3(5,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.SpI("Fee Paid: ",t.i5U(4,2,e.feesPaid,"1.0-0")," (Sats)")}}function qn(n,o){if(1&n&&(t.j41(0,"span"),t.DNE(1,Jn,5,7,"span",82),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function Qn(n,o){if(1&n&&(t.j41(0,"td",69)(1,"div",83)(2,"span",71),t.EFF(3),t.k0s()(),t.DNE(4,qn,2,1,"span",11),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(3,$,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.paymentPreimage),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function Zn(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",89)(1,"button",90),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2).$implicit,r=t.XpG(2);return t.Njj(r.onPartClick(a,s))}),t.EFF(2),t.k0s()()}if(2&n){const e=o.index;t.R7$(2),t.SpI("View ",e+1,"")}}function Wn(n,o){if(1&n&&(t.j41(0,"div"),t.DNE(1,Zn,3,1,"div",88),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.parts)}}function Kn(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",69)(1,"span",86)(2,"button",87),t.bIt("click",function(){const a=t.eBV(e).$implicit;return t.Njj(a.is_expanded=!a.is_expanded)}),t.EFF(3),t.k0s()(),t.DNE(4,Wn,2,1,"div",11),t.k0s()}if(2&n){const e=o.$implicit;t.R7$(3),t.JRh(null!=e&&e.is_expanded?"Hide":"Show"),t.R7$(),t.Y8G("ngIf",null==e?null:e.is_expanded)}}function ti(n,o){1&n&&t.nrm(0,"tr",91)}function ei(n,o){if(1&n&&t.nrm(0,"tr",92),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,qe,(null==e.payments||null==e.payments.data?null:e.payments.data.length)>0))}}function ni(n,o){1&n&&t.nrm(0,"tr",93)}function ii(n,o){1&n&&t.nrm(0,"tr",91)}function ai(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",22)(1,"div",23)(2,"div",24),t.nrm(3,"fa-icon",25),t.j41(4,"span",26),t.EFF(5,"Payments History"),t.k0s()(),t.j41(6,"div",27)(7,"mat-form-field",28)(8,"mat-label"),t.EFF(9,"Filter By"),t.k0s(),t.j41(10,"mat-select",29),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.selFilterBy,a)||(s.selFilterBy=a),t.Njj(a)}),t.bIt("selectionChange",function(){t.eBV(e);const a=t.XpG();return a.selFilter="",t.Njj(a.applyFilter())}),t.j41(11,"perfect-scrollbar"),t.DNE(12,nn,2,2,"mat-option",30),t.k0s()()(),t.j41(13,"mat-form-field",28)(14,"mat-label"),t.EFF(15,"Filter"),t.k0s(),t.j41(16,"input",31),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.selFilter,a)||(s.selFilter=a),t.Njj(a)}),t.bIt("input",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.applyFilter())})("keyup",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(17,"div",32)(18,"div",33),t.DNE(19,an,1,0,"mat-progress-bar",34),t.j41(20,"table",35,2),t.qex(22,36),t.DNE(23,on,2,0,"th",37)(24,sn,3,4,"td",38),t.bVm(),t.qex(25,39),t.DNE(26,ln,2,0,"th",37)(27,rn,4,4,"td",38),t.bVm(),t.qex(28,40),t.DNE(29,cn,2,0,"th",37)(30,mn,4,4,"td",38),t.bVm(),t.qex(31,41),t.DNE(32,pn,2,0,"th",37)(33,un,4,4,"td",38),t.bVm(),t.qex(34,42),t.DNE(35,dn,2,0,"th",37)(36,hn,4,4,"td",38),t.bVm(),t.qex(37,43),t.DNE(38,fn,2,0,"th",37)(39,_n,4,4,"td",38),t.bVm(),t.qex(40,44),t.DNE(41,gn,2,0,"th",37)(42,Cn,4,4,"td",38),t.bVm(),t.qex(43,45),t.DNE(44,yn,2,0,"th",46)(45,bn,4,3,"td",38),t.bVm(),t.qex(46,47),t.DNE(47,Fn,6,0,"th",48)(48,En,3,0,"td",49),t.bVm(),t.qex(49,50),t.DNE(50,vn,4,3,"td",51),t.bVm(),t.qex(51,52),t.DNE(52,kn,4,2,"td",38),t.bVm(),t.qex(53,53),t.DNE(54,jn,5,5,"td",38),t.bVm(),t.qex(55,54),t.DNE(56,Gn,5,5,"td",38),t.bVm(),t.qex(57,55),t.DNE(58,Mn,5,5,"td",38),t.bVm(),t.qex(59,56),t.DNE(60,Vn,5,5,"td",38),t.bVm(),t.qex(61,57),t.DNE(62,Yn,5,5,"td",38),t.bVm(),t.qex(63,58),t.DNE(64,zn,5,5,"td",38),t.bVm(),t.qex(65,59),t.DNE(66,Qn,5,5,"td",38),t.bVm(),t.qex(67,60),t.DNE(68,Kn,5,2,"td",38),t.bVm(),t.DNE(69,ti,1,0,"tr",61)(70,ei,1,3,"tr",62)(71,ni,1,0,"tr",63)(72,ii,1,0,"tr",64),t.k0s()()(),t.nrm(73,"mat-paginator",65),t.k0s()}if(2&n){const e=t.XpG();t.R7$(3),t.Y8G("icon",e.faHistory),t.R7$(7),t.R50("ngModel",e.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(17,Ue).concat(e.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",e.selFilter),t.R7$(3),t.Y8G("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",e.tableSetting.sortBy)("matSortDirection",e.tableSetting.sortOrder)("dataSource",e.payments)("ngClass",t.eq3(18,ze,""!==e.errorMessage)),t.R7$(49),t.Y8G("matRowDefColumns",e.partColumns)("matRowDefWhen",e.is_group),t.R7$(),t.Y8G("matFooterRowDef",t.lJ4(20,Je)),t.R7$(),t.Y8G("matHeaderRowDef",e.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",e.displayedColumns),t.R7$(),t.Y8G("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let Rt=(()=>{class n{constructor(e,i,a,s,r,m,T,y){this.logger=e,this.commonService=i,this.store=a,this.rtlEffects=s,this.decimalPipe=r,this.dataService=m,this.datePipe=T,this.camelCaseWithSpaces=y,this.calledFrom="transactions",this.convertedCurrency=null,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="transactions",this.tableSetting={tableId:"payments",recordsPerPage:l.md,sortBy:"firstPartTimestamp",sortOrder:l.oi.DESCENDING},this.faHistory=F.Int,this.newlyAddedPayment="",this.information={},this.payments=new c.I6([]),this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHintPre="",this.paymentDecodedHintPost="",this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.totalRecords=0,this.flgInit=!1,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.partColumns=[],this.displayedColumns.map(i=>this.partColumns.push("group_"+i)),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.flgInit||(this.flgInit=!0,this.store.dispatch((0,k.CK)({payload:{count:1e6,skip:0}}))),this.logger.info(this.displayedColumns)}),this.store.select(C.KT).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.paymentJSONArr=e.payments&&e.payments.sent&&e.payments.sent.length>0?e.payments.sent:[],this.paymentJSONArr&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(e)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):this.commonService.titleCase(e)}setFilterPredicate(){this.payments.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=(e.firstPartTimestamp?this.datePipe.transform(new Date(e.firstPartTimestamp),"dd/MMM/y HH:mm")?.toLowerCase():"")+JSON.stringify(e).toLowerCase();break;case"firstPartTimestamp":a=this.datePipe.transform(new Date(e.firstPartTimestamp||0),"dd/MMM/y HH:mm")?.toLowerCase()||"";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return a.includes(i)}}loadPaymentsTable(e){this.payments=new c.I6(e?[...e]:[]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,a)=>{switch(a){case"firstPartTimestamp":return this.commonService.sortByKey(i.parts,"timestamp","number",this.sort?.direction),i.firstPartTimestamp;case"id":return this.commonService.sortByKey(i.parts,"id","string",this.sort?.direction),i.id;case"recipientNodeAlias":return this.commonService.sortByKey(i.parts,"toChannelAlias","string",this.sort?.direction),i.recipientNodeAlias;case"recipientAmount":return this.commonService.sortByKey(i.parts,"amount","number",this.sort?.direction),i.recipientAmount;default:return i[a]&&isNaN(i[a])?i[a].toLocaleLowerCase():i[a]?+i[a]:null}},this.payments.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter()}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,q.s)(1)).subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.timestamp?(this.paymentDecoded.amount||(this.paymentDecoded.amount=0),this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.paymentHash||"",this.paymentDecoded.amount&&0!==this.paymentDecoded.amount?(this.store.dispatch((0,v.I1)({payload:{data:{type:l.A$.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:50,type:l.UN.DATE_TIME},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:l.UN.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.UN.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,q.s)(1)).subscribe(i=>{i&&(this.store.dispatch((0,k.Fd)({payload:{invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,v.I1)({payload:{data:{type:l.A$.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:40,type:l.UN.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.UN.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:l.UN.NUMBER,inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,q.s)(1)).subscribe(a=>{a&&(this.paymentDecoded.amount=a[0].inputValue,this.store.dispatch((0,k.Fd)({payload:{invoice:this.paymentRequest,amountMsat:1e3*a[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentDecodedHintPre="",this.paymentDecodedHintPost="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,q.s)(1)).subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.amount?this.selNode&&this.selNode.settings.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.BQ.SATS,l.BQ.OTHER,this.selNode.settings.currencyUnits&&this.selNode.settings.currencyUnits.length>2?this.selNode.settings.currencyUnits[2]:"",this.selNode.settings.fiatConversion).pipe((0,f.Q)(this.unSubs[4])).subscribe({next:a=>{this.convertedCurrency=a,this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats (",this.paymentDecodedHintPost=this.decimalPipe.transform(this.convertedCurrency.OTHER?this.convertedCurrency.OTHER:0,l.k.OTHER)+") | Memo: "+this.paymentDecoded.description},error:a=>{this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency.",this.paymentDecodedHintPost=""}}):(this.paymentDecodedHintPre="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description,this.paymentDecodedHintPost=""):(this.paymentDecodedHintPre="Zero Amount Invoice | Memo: "+this.paymentDecoded.description,this.paymentDecodedHintPost="")})}openSendPaymentModal(){this.store.dispatch((0,v.xO)({payload:{data:{component:Be}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}is_group(e,i){return i.parts&&i.parts.length>1}onPaymentClick(e){e.paymentHash&&""!==e.paymentHash.trim()?this.dataService.decodePayments(e.paymentHash).pipe((0,q.s)(1)).subscribe({next:i=>{setTimeout(()=>{this.showPaymentView(e,i.length&&i.length>0?i[0]:[])},0)},error:i=>{this.showPaymentView(e,[])}}):this.showPaymentView(e,[])}showPaymentView(e,i){this.store.dispatch((0,v.xO)({payload:{data:{sentPaymentInfo:i,payment:e,component:Ye}}}))}onPartClick(e,i){i.paymentHash&&""!==i.paymentHash.trim()?this.dataService.decodePayments(i.paymentHash).pipe((0,q.s)(1)).subscribe({next:a=>{setTimeout(()=>{this.showPartView(e,i,a.length&&a.length>0?a[0]:[])},0)},error:a=>{this.showPartView(e,i,[])}}):this.showPartView(e,i,[])}showPartView(e,i,a){const s=[[{key:"paymentHash",value:i.paymentHash,title:"Payment Hash",width:100,type:l.UN.STRING}],[{key:"paymentPreimage",value:i.paymentPreimage,title:"Payment Preimage",width:100,type:l.UN.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"Channel",width:100,type:l.UN.STRING}],[{key:"id",value:e.id,title:"Part ID",width:50,type:l.UN.STRING},{key:"timestamp",value:e.timestamp,title:"Time",width:50,type:l.UN.DATE_TIME}],[{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.UN.NUMBER},{key:"feesPaid",value:e.feesPaid,title:"Fee (Sats)",width:50,type:l.UN.NUMBER}]];a&&a.length>0&&a[0].paymentRequest&&a[0].paymentRequest.description&&""!==a[0].paymentRequest.description&&s.splice(3,0,[{key:"description",value:a[0].paymentRequest.description,title:"Description",width:100,type:l.UN.STRING}]),this.store.dispatch((0,v.xO)({payload:{data:{type:l.A$.INFORMATION,alertTitle:"Payment Part Information",message:s}}}))}onPageChange(e){this.store.dispatch((0,k.CK)({payload:{count:this.pageSize,skip:e.pageIndex*e.pageSize}}))}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const e=JSON.parse(JSON.stringify(this.payments.data)),i=e?.reduce((a,s)=>(s.paymentHash&&""!==s.paymentHash.trim()&&(a=""===a?s.paymentHash:a+","+s.paymentHash),a),"");this.dataService.decodePayments(i).pipe((0,f.Q)(this.unSubs[5])).subscribe(a=>{a.forEach((r,m)=>{r.length>0&&r[0].paymentRequest&&r[0].paymentRequest.description&&""!==r[0].paymentRequest.description&&(e[m].description=r[0].paymentRequest.description)});const s=e?.reduce((r,m)=>r.concat(m),[]);this.commonService.downloadFile(s,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il),t.rXU(at.H),t.rXU(p.QX),t.rXU(et.u),t.rXU(p.vh),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(i,a){if(1&i&&(t.GBs(Xe,5),t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.form=s.first),t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},inputs:{calledFrom:"calledFrom"},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Payments")}])],decls:4,vars:3,consts:[["sendPaymentForm","ngForm"],["paymentReq","ngModel"],["table",""],["fxLayout","column","fxFlex","colWidth","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxLayout","column","fxFlex","100"],["matInput","","name","paymentRequest","tabindex","1","required","",3,"ngModelChange","matTextareaAutosize","perfectScrollbar","ngModel"],["fxLayout","row wrap","fxFlex","100",4,"ngIf"],[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 wrap","fxFlex","100"],["fxLayoutAlign","center center","class","mr-3px",4,"ngIf"],["fxLayoutAlign","center center","class","mr-3px",3,"innerHTML",4,"ngIf"],["fxLayoutAlign","center center",1,"mr-3px"],[3,"icon"],["fxLayoutAlign","center center",1,"mr-3px",3,"innerHTML"],["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.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","colWidth",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","colWidth","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","firstPartTimestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","recipientNodeId"],["matColumnDef","recipientNodeAlias"],["matColumnDef","description"],["matColumnDef","paymentHash"],["matColumnDef","paymentPreimage"],["matColumnDef","recipientAmount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","group_firstPartTimestamp"],["matColumnDef","group_id"],["matColumnDef","group_recipientNodeId"],["matColumnDef","group_recipientNodeAlias"],["matColumnDef","group_recipientAmount"],["matColumnDef","group_description"],["matColumnDef","group_paymentHash"],["matColumnDef","group_paymentPreimage"],["matColumnDef","group_actions"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"part-row-span"],["fxLayoutAlign","start center","class","part-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"ellipsis-parent","part-row-span",3,"ngStyle"],["fxLayoutAlign","end center",1,"part-row-span"],["fxLayoutAlign","end center","class","part-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"part-group-head"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-part-expand",3,"click"],["class","part-group-details","fxLayoutAlign","end center",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"part-group-details"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-part-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(i,a){1&i&&(t.j41(0,"div",3),t.DNE(1,tn,14,3,"form",4)(2,en,3,0,"div",5)(3,ai,74,21,"div",6),t.k0s()),2&i&&(t.R7$(),t.Y8G("ngIf","home"===a.calledFrom),t.R7$(),t.Y8G("ngIf","transactions"===a.calledFrom),t.R7$(),t.Y8G("ngIf","transactions"===a.calledFrom))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.qT,d.me,d.BC,d.cb,d.YS,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,O.fg,g.rl,g.nJ,g.MV,g.TL,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,I.iy,A.ZF,A.Ld,p.QX,p.vh],styles:[".mat-column-group_actions[_ngcontent-%COMP%] .part-group-head[_ngcontent-%COMP%], .mat-column-group_actions[_ngcontent-%COMP%] .part-group-details[_ngcontent-%COMP%]{min-height:3rem}.mat-column-group_actions[_ngcontent-%COMP%] .btn-part-expand[_ngcontent-%COMP%]{min-width:8rem;width:8rem;margin:0}.mat-column-group_actions[_ngcontent-%COMP%] .btn-part-info[_ngcontent-%COMP%]{min-width:7rem;margin:0}.mat-column-group_firstPartTimestamp[_ngcontent-%COMP%] .part-row-span[_ngcontent-%COMP%]:not(:first-of-type){padding-left:2rem}.part-row-span[_ngcontent-%COMP%]{min-height:3rem}.mat-column-group_firstPartTimestamp[_ngcontent-%COMP%]{min-width:11rem}"]})}return n})();var K=_(6114);function oi(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Description is required."),t.k0s())}function si(n,o){1&n&&(t.j41(0,"span",29),t.EFF(1,"= "),t.k0s())}function li(n,o){if(1&n&&(t.j41(0,"span",30),t.nrm(1,"fa-icon",31),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.convertedCurrency.symbol)}}function ri(n,o){if(1&n&&t.nrm(0,"span",32),2&n){const e=t.XpG();t.Y8G("innerHTML",e.convertedCurrency.symbol,t.npT)}}function ci(n,o){if(1&n&&(t.j41(0,"mat-option",33),t.EFF(1),t.nI1(2,"titlecase"),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e),t.R7$(),t.JRh(t.bMT(2,2,e))}}function mi(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.invoiceError)}}function pi(n,o){if(1&n&&(t.j41(0,"div",34),t.nrm(1,"fa-icon",35),t.DNE(2,mi,2,1,"span",11),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faExclamationTriangle),t.R7$(),t.Y8G("ngIf",""!==e.invoiceError)}}let ui=(()=>{class n{constructor(e,i,a,s,r,m){this.dialogRef=e,this.data=i,this.store=a,this.decimalPipe=s,this.commonService=r,this.actions=m,this.faExclamationTriangle=F.zpE,this.convertedCurrency=null,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.md,this.timeUnitEnum=l.F7,this.timeUnits=l.SY,this.selTimeUnit=l.F7.SECS,this.invoiceError="",this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.actions.pipe((0,f.Q)(this.unSubs[2]),(0,H.p)(e=>e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL&&"CreateInvoice"===e.payload.action&&(e.payload.status===l.wn.ERROR&&(this.invoiceError=e.payload.message),e.payload.status===l.wn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(e){if(this.invoiceError="",!this.description)return!0;let i=this.expiry?this.expiry:l.It;this.expiry&&this.selTimeUnit!==l.F7.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.F7.SECS));let a=null;a=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,k.iO)({payload:a}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.F7.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.settings.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.BQ.SATS,l.BQ.OTHER,this.selNode.settings.currencyUnits&&this.selNode.settings.currencyUnits.length>2?this.selNode.settings.currencyUnits[2]:"",this.selNode.settings.fiatConversion).pipe((0,f.Q)(this.unSubs[3])).subscribe({next:e=>{this.convertedCurrency=e,this.invoiceValueHint=this.decimalPipe.transform(this.convertedCurrency.OTHER,l.k.OTHER)+" "+this.convertedCurrency.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}onTimeUnitChange(e){this.expiry&&this.selTimeUnit!==e.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,e.value)),this.selTimeUnit=e.value}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(B.Vh),t.rXU(R.il),t.rXU(p.QX),t.rXU(M.h),t.rXU(Q.En))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-create-invoices"]],decls:44,vars:19,consts:[["addInvoiceForm","ngForm"],["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","tabindex","2","name","description","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxLayout","column","fxFlex","40"],["matInput","","type","number","tabindex","3","name","invValue",3,"ngModelChange","keyup","step","min","ngModel"],["matSuffix",""],["fxLayout","row wrap","fxFlex","100"],["class","mr-3px",4,"ngIf"],["fxLayoutAlign","center center","class","mr-3px",4,"ngIf"],["fxLayoutAlign","center center","class","mr-3px",3,"innerHTML",4,"ngIf"],["fxLayout","column","fxFlex","30"],["matInput","","type","number","name","exp","tabindex","4",3,"ngModelChange","step","min","ngModel"],["fxLayout","column","fxFlex","26"],["tabindex","5","name","timeUnit",3,"selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[1,"mr-3px"],["fxLayoutAlign","center center",1,"mr-3px"],[3,"icon"],["fxLayoutAlign","center center",1,"mr-3px",3,"innerHTML"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"mat-card-header",3)(3,"div",4)(4,"span",5),t.EFF(5,"Create Invoice"),t.k0s()(),t.j41(6,"button",6),t.EFF(7,"X"),t.k0s()(),t.j41(8,"mat-card-content",7)(9,"form",8,0)(11,"mat-form-field",9)(12,"mat-label"),t.EFF(13,"Description"),t.k0s(),t.j41(14,"input",10),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.description,m)||(a.description=m),t.Njj(m)}),t.k0s(),t.DNE(15,oi,2,0,"mat-error",11),t.k0s(),t.j41(16,"div",12)(17,"mat-form-field",13)(18,"mat-label"),t.EFF(19,"Amount"),t.k0s(),t.j41(20,"input",14),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.invoiceValue,m)||(a.invoiceValue=m),t.Njj(m)}),t.bIt("keyup",function(){return t.eBV(s),t.Njj(a.onInvoiceValueChange())}),t.k0s(),t.j41(21,"span",15),t.EFF(22,"Sats "),t.k0s(),t.j41(23,"mat-hint",16),t.DNE(24,si,2,0,"span",17)(25,li,2,1,"span",18)(26,ri,1,1,"span",19),t.EFF(27),t.k0s()(),t.j41(28,"mat-form-field",20)(29,"mat-label"),t.EFF(30,"Expiry"),t.k0s(),t.j41(31,"input",21),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.expiry,m)||(a.expiry=m),t.Njj(m)}),t.k0s(),t.j41(32,"span",15),t.EFF(33),t.nI1(34,"titlecase"),t.k0s()(),t.j41(35,"mat-form-field",22)(36,"mat-select",23),t.bIt("selectionChange",function(m){return t.eBV(s),t.Njj(a.onTimeUnitChange(m))}),t.DNE(37,ci,3,4,"mat-option",24),t.k0s()()(),t.DNE(38,pi,3,2,"div",25),t.j41(39,"div",26)(40,"button",27),t.bIt("click",function(){return t.eBV(s),t.Njj(a.resetData())}),t.EFF(41,"Clear Field"),t.k0s(),t.j41(42,"button",28),t.bIt("click",function(){t.eBV(s);const m=t.sdS(10);return t.Njj(a.onAddInvoice(m))}),t.EFF(43,"Create Invoice"),t.k0s()()()()()()}2&i&&(t.R7$(6),t.Y8G("mat-dialog-close",!1),t.R7$(8),t.R50("ngModel",a.description),t.R7$(),t.Y8G("ngIf",!a.description),t.R7$(5),t.Y8G("step",100)("min",1),t.R50("ngModel",a.invoiceValue),t.R7$(4),t.Y8G("ngIf",""!==a.invoiceValueHint),t.R7$(),t.Y8G("ngIf",a.convertedCurrency&&"FA"===a.convertedCurrency.iconType&&""!==a.invoiceValueHint),t.R7$(),t.Y8G("ngIf",a.convertedCurrency&&"SVG"===a.convertedCurrency.iconType&&""!==a.invoiceValueHint),t.R7$(),t.SpI(" ",a.invoiceValueHint," "),t.R7$(4),t.Y8G("step",a.selTimeUnit===a.timeUnitEnum.SECS?300:a.selTimeUnit===a.timeUnitEnum.MINS?10:a.selTimeUnit===a.timeUnitEnum.HOURS?2:1)("min",1),t.R50("ngModel",a.expiry),t.R7$(2),t.SpI("",t.bMT(34,17,a.selTimeUnit)," "),t.R7$(3),t.Y8G("value",a.selTimeUnit),t.R7$(),t.Y8G("ngForOf",a.timeUnits),t.R7$(),t.Y8G("ngIf",""!==a.invoiceError))},dependencies:[p.Sq,p.bT,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.VZ,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,B.tx,j.$z,E.m2,E.MM,O.fg,g.rl,g.nJ,g.MV,g.TL,g.yw,S.VO,X.wT,W.N,K.V,p.PV]})}return n})();var di=_(6439);const hi=()=>["all"],fi=n=>({"error-border":n}),_i=()=>["no_invoice"],ut=n=>({"mr-0":n}),dt=n=>({width:n}),gi=n=>({"display-none":n});function Ci(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Description is required."),t.k0s())}function yi(n,o){1&n&&(t.j41(0,"span",21),t.EFF(1,"= "),t.k0s())}function bi(n,o){if(1&n&&(t.j41(0,"span",22),t.nrm(1,"fa-icon",23),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.convertedCurrency.symbol)}}function Fi(n,o){if(1&n&&t.nrm(0,"span",24),2&n){const e=t.XpG(2);t.Y8G("innerHTML",e.convertedCurrency.symbol,t.npT)}}function Ei(n,o){if(1&n){const e=t.RV6();t.j41(0,"form",7,0)(2,"mat-form-field",8)(3,"mat-label"),t.EFF(4,"Description"),t.k0s(),t.j41(5,"input",9),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.description,a)||(s.description=a),t.Njj(a)}),t.k0s(),t.DNE(6,Ci,2,0,"mat-error",10),t.k0s(),t.j41(7,"mat-form-field",11)(8,"mat-label"),t.EFF(9,"Amount"),t.k0s(),t.j41(10,"input",12,1),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.invoiceValue,a)||(s.invoiceValue=a),t.Njj(a)}),t.bIt("keyup",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onInvoiceValueChange())}),t.k0s(),t.j41(12,"span",13),t.EFF(13,"Sats "),t.k0s(),t.j41(14,"mat-hint",14),t.DNE(15,yi,2,0,"span",15)(16,bi,2,1,"span",16)(17,Fi,1,1,"span",17),t.EFF(18),t.k0s()(),t.j41(19,"div",18)(20,"button",19),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.resetData())}),t.EFF(21,"Clear Field"),t.k0s(),t.j41(22,"button",20),t.bIt("click",function(){t.eBV(e);const a=t.sdS(1),s=t.XpG();return t.Njj(s.onAddInvoice(a))}),t.EFF(23,"Create Invoice"),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(5),t.R50("ngModel",e.description),t.R7$(),t.Y8G("ngIf",!e.description),t.R7$(4),t.Y8G("step",100)("min",1),t.R50("ngModel",e.invoiceValue),t.R7$(5),t.Y8G("ngIf",""!==e.invoiceValueHint),t.R7$(),t.Y8G("ngIf",e.convertedCurrency&&"FA"===e.convertedCurrency.iconType&&""!==e.invoiceValueHint),t.R7$(),t.Y8G("ngIf",e.convertedCurrency&&"SVG"===e.convertedCurrency.iconType&&""!==e.invoiceValueHint),t.R7$(),t.SpI(" ",e.invoiceValueHint," ")}}function xi(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",25)(1,"button",26),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.openCreateInvoiceModal())}),t.EFF(2,"Create Invoice"),t.k0s()()}}function Li(n,o){if(1&n&&(t.j41(0,"mat-option",63),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function Si(n,o){1&n&&t.nrm(0,"mat-progress-bar",64)}function vi(n,o){1&n&&t.nrm(0,"th",65)}function Ri(n,o){if(1&n&&t.nrm(0,"span",70),2&n){const e=t.XpG(3);t.Y8G("ngClass",t.eq3(1,ut,e.screenSize===e.screenSizeEnum.XS))}}function Ii(n,o){if(1&n&&t.nrm(0,"span",71),2&n){const e=t.XpG(3);t.Y8G("ngClass",t.eq3(1,ut,e.screenSize===e.screenSizeEnum.XS))}}function ki(n,o){if(1&n&&t.nrm(0,"span",72),2&n){const e=t.XpG(3);t.Y8G("ngClass",t.eq3(1,ut,e.screenSize===e.screenSizeEnum.XS))}}function Ti(n,o){if(1&n&&(t.j41(0,"td",66),t.DNE(1,Ri,1,3,"span",67)(2,Ii,1,3,"span",68)(3,ki,1,3,"span",69),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf","received"===(null==e?null:e.status)),t.R7$(),t.Y8G("ngIf","unpaid"===(null==e?null:e.status)),t.R7$(),t.Y8G("ngIf",!(null!=e&&e.status)||"expired"===(null==e?null:e.status)||"unknown"===(null==e?null:e.status))}}function wi(n,o){1&n&&(t.j41(0,"th",73),t.EFF(1,"Date Created"),t.k0s())}function ji(n,o){if(1&n&&(t.j41(0,"td",66),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.i5U(2,1,1e3*(null==e?null:e.timestamp),"dd/MMM/y HH:mm"))}}function Di(n,o){1&n&&(t.j41(0,"th",73),t.EFF(1,"Date Expiry"),t.k0s())}function Pi(n,o){if(1&n&&(t.j41(0,"td",66),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.i5U(2,1,1e3*(null==e?null:e.expiresAt),"dd/MMM/y HH:mm")||"-")}}function Gi(n,o){1&n&&(t.j41(0,"th",73),t.EFF(1,"Date Settled"),t.k0s())}function Ai(n,o){if(1&n&&(t.j41(0,"td",66),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.i5U(2,1,1e3*(null==e?null:e.receivedAt),"dd/MMM/y HH:mm")||"-")}}function Ni(n,o){1&n&&(t.j41(0,"th",73),t.EFF(1,"Node ID"),t.k0s())}function Mi(n,o){if(1&n&&(t.j41(0,"td",66)(1,"div",74)(2,"span",75),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,dt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.nodeId)}}function Bi(n,o){1&n&&(t.j41(0,"th",73),t.EFF(1,"Description"),t.k0s())}function $i(n,o){if(1&n&&(t.j41(0,"td",66)(1,"div",74)(2,"span",75),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,dt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.description)}}function Vi(n,o){1&n&&(t.j41(0,"th",73),t.EFF(1,"Payment Hash"),t.k0s())}function Oi(n,o){if(1&n&&(t.j41(0,"td",66)(1,"div",74)(2,"span",75),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,dt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.paymentHash)}}function Hi(n,o){1&n&&(t.j41(0,"th",76),t.EFF(1,"Amount (Sats)"),t.k0s())}function Yi(n,o){if(1&n&&(t.j41(0,"td",66)(1,"span",77),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(null!=e&&e.amount?t.i5U(3,1,null==e?null:e.amount,"1.0-0"):"-")}}function Xi(n,o){1&n&&(t.j41(0,"th",78),t.EFF(1," Amount Settled (Sats)"),t.k0s())}function Ui(n,o){if(1&n&&(t.j41(0,"td",66)(1,"span",77),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(null!=e&&e.amountSettled?t.i5U(3,1,null==e?null:e.amountSettled,"1.0-0"):"-")}}function zi(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",79)(1,"div",80)(2,"mat-select",81),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",82),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function Ji(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",83)(1,"div",80)(2,"mat-select",84),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",82),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2);return t.Njj(s.onInvoiceClick(a))}),t.EFF(5,"View Info"),t.k0s(),t.j41(6,"mat-option",82),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2);return t.Njj(s.onRefreshInvoice(a))}),t.EFF(7,"Refresh"),t.k0s()()()()}}function qi(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No invoice available."),t.k0s())}function Qi(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting invoices..."),t.k0s())}function Zi(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.JRh(e.errorMessage)}}function Wi(n,o){if(1&n&&(t.j41(0,"td",85),t.DNE(1,qi,2,0,"p",10)(2,Qi,2,0,"p",10)(3,Zi,2,1,"p",10),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function Ki(n,o){if(1&n&&t.nrm(0,"tr",86),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,gi,(null==e.invoices?null:e.invoices.data)&&(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)>0))}}function ta(n,o){1&n&&t.nrm(0,"tr",87)}function ea(n,o){1&n&&t.nrm(0,"tr",88)}function na(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",27)(1,"div",28)(2,"div",29),t.nrm(3,"fa-icon",30),t.j41(4,"span",31),t.EFF(5,"Invoices History"),t.k0s()(),t.j41(6,"div",32)(7,"mat-form-field",33)(8,"mat-label"),t.EFF(9,"Filter By"),t.k0s(),t.j41(10,"mat-select",34),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.selFilterBy,a)||(s.selFilterBy=a),t.Njj(a)}),t.bIt("selectionChange",function(){t.eBV(e);const a=t.XpG();return a.selFilter="",t.Njj(a.applyFilter())}),t.j41(11,"perfect-scrollbar"),t.DNE(12,Li,2,2,"mat-option",35),t.k0s()()(),t.j41(13,"mat-form-field",33)(14,"mat-label"),t.EFF(15,"Filter"),t.k0s(),t.j41(16,"input",36),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.selFilter,a)||(s.selFilter=a),t.Njj(a)}),t.bIt("input",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.applyFilter())})("keyup",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(17,"div",37),t.DNE(18,Si,1,0,"mat-progress-bar",38),t.j41(19,"table",39,2),t.qex(21,40),t.DNE(22,vi,1,0,"th",41)(23,Ti,4,3,"td",42),t.bVm(),t.qex(24,43),t.DNE(25,wi,2,0,"th",44)(26,ji,3,4,"td",42),t.bVm(),t.qex(27,45),t.DNE(28,Di,2,0,"th",44)(29,Pi,3,4,"td",42),t.bVm(),t.qex(30,46),t.DNE(31,Gi,2,0,"th",44)(32,Ai,3,4,"td",42),t.bVm(),t.qex(33,47),t.DNE(34,Ni,2,0,"th",44)(35,Mi,4,4,"td",42),t.bVm(),t.qex(36,48),t.DNE(37,Bi,2,0,"th",44)(38,$i,4,4,"td",42),t.bVm(),t.qex(39,49),t.DNE(40,Vi,2,0,"th",44)(41,Oi,4,4,"td",42),t.bVm(),t.qex(42,50),t.DNE(43,Hi,2,0,"th",51)(44,Yi,4,4,"td",42),t.bVm(),t.qex(45,52),t.DNE(46,Xi,2,0,"th",53)(47,Ui,4,4,"td",42),t.bVm(),t.qex(48,54),t.DNE(49,zi,6,0,"th",55)(50,Ji,8,0,"td",56),t.bVm(),t.qex(51,57),t.DNE(52,Wi,4,3,"td",58),t.bVm(),t.DNE(53,Ki,1,3,"tr",59)(54,ta,1,0,"tr",60)(55,ea,1,0,"tr",61),t.k0s()(),t.nrm(56,"mat-paginator",62),t.k0s()}if(2&n){const e=t.XpG();t.R7$(3),t.Y8G("icon",e.faHistory),t.R7$(7),t.R50("ngModel",e.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(15,hi).concat(e.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",e.selFilter),t.R7$(2),t.Y8G("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",e.tableSetting.sortBy)("matSortDirection",e.tableSetting.sortOrder)("dataSource",e.invoices)("ngClass",t.eq3(16,fi,""!==e.errorMessage)),t.R7$(34),t.Y8G("matFooterRowDef",t.lJ4(18,_i)),t.R7$(),t.Y8G("matHeaderRowDef",e.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",e.displayedColumns),t.R7$(),t.Y8G("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let It=(()=>{class n{constructor(e,i,a,s,r,m,T){this.logger=e,this.store=i,this.decimalPipe=a,this.commonService=s,this.datePipe=r,this.actions=m,this.camelCaseWithSpaces=T,this.calledFrom="transactions",this.faHistory=F.Int,this.convertedCurrency=null,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="transactions",this.tableSetting={tableId:"invoices",recordsPerPage:l.md,sortBy:"expiresAt",sortOrder:l.oi.DESCENDING},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoices=new c.I6([]),this.invoiceJSONArr=[],this.information={},this.selFilter="",this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.totalRecords=0,this.flgInit=!1,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("status"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.flgInit||(this.flgInit=!0,this.store.dispatch((0,k.Do)({payload:{count:1e6,skip:0}}))),this.logger.info(this.displayedColumns)}),this.store.select(C.rN).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.invoiceJSONArr=e.invoices&&e.invoices.length>0?e.invoices:[],this.invoiceJSONArr&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(e)}),this.actions.pipe((0,f.Q)(this.unSubs[4]),(0,H.p)(e=>e.type===l.Uu.SET_LOOKUP_ECL||e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.Uu.SET_LOOKUP_ECL&&this.invoiceJSONArr&&this.sort&&this.paginator&&e.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(e.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,v.xO)({payload:{data:{pageSize:this.pageSize,component:ui}}}))}onAddInvoice(e){if(!this.description)return!0;const i=this.expiry?this.expiry:l.It;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let a=null;a=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,k.iO)({payload:a})),this.resetData()}onInvoiceClick(e){this.store.dispatch((0,v.xO)({payload:{data:{invoice:e,newlyAdded:!1,component:di.Z}}}))}onRefreshInvoice(e){this.store.dispatch((0,k.Yi)({payload:e.paymentHash}))}updateInvoicesData(e){this.invoiceJSONArr=this.invoiceJSONArr?.map(i=>i.paymentHash===e.paymentHash?e:i)}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):this.commonService.titleCase(e)}setFilterPredicate(){this.invoices.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=(e.timestamp?this.datePipe.transform(new Date(1e3*e.timestamp),"dd/MMM/y HH:mm")?.toLowerCase():"")+JSON.stringify(e).toLowerCase();break;case"status":a=e?.status&&"expired"!==e?.status&&"unknown"!==e?.status?e.status?.toLowerCase():"expired/unknown";break;case"timestamp":case"expiresAt":case"receivedAt":a=this.datePipe.transform(new Date(1e3*(e[this.selFilterBy]||0)),"dd/MMM/y HH:mm")?.toLowerCase()||"";break;case"amount":case"amountSettled":a=e[this.selFilterBy]?.toString()||"-";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return"status"===this.selFilterBy?0===a.indexOf(i):a.includes(i)}}loadInvoicesTable(e){this.invoices=new c.I6(e?[...e]:[]),this.invoices.sort=this.sort,this.invoices.sortingDataAccessor=(i,a)=>i[a]&&isNaN(i[a])?i[a].toLocaleLowerCase():i[a]?+i[a]:null,this.invoices.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter()}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}onInvoiceValueChange(){this.selNode&&this.selNode.settings.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.BQ.SATS,l.BQ.OTHER,this.selNode.settings.currencyUnits&&this.selNode.settings.currencyUnits.length>2?this.selNode.settings.currencyUnits[2]:"",this.selNode.settings.fiatConversion).pipe((0,f.Q)(this.unSubs[5])).subscribe({next:e=>{this.convertedCurrency=e,this.invoiceValueHint=this.decimalPipe.transform(this.convertedCurrency.OTHER,l.k.OTHER)+" "+this.convertedCurrency.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}onPageChange(e){this.store.dispatch((0,k.Do)({payload:{count:this.pageSize,skip:e.pageIndex*e.pageSize}}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(p.QX),t.rXU(M.h),t.rXU(p.vh),t.rXU(Q.En),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},inputs:{calledFrom:"calledFrom"},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Invoices")}])],decls:4,vars:3,consts:[["addInvoiceForm","ngForm"],["invcVal","ngModel"],["table",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","tabindex","2","name","description","required","true",3,"ngModelChange","ngModel"],[4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start end"],["matInput","","type","number","tabindex","3","name","invValue",3,"ngModelChange","keyup","step","min","ngModel"],["matSuffix",""],["fxLayout","row wrap","fxFlex","100"],["class","mr-3px",4,"ngIf"],["fxLayoutAlign","center center","class","mr-3px",4,"ngIf"],["fxLayoutAlign","center center","class","mr-3px",3,"innerHTML",4,"ngIf"],["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"],[1,"mr-3px"],["fxLayoutAlign","center center",1,"mr-3px"],[3,"icon"],["fxLayoutAlign","center center",1,"mr-3px",3,"innerHTML"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","matTooltip","Status",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","expiresAt"],["matColumnDef","receivedAt"],["matColumnDef","nodeId"],["matColumnDef","description"],["matColumnDef","paymentHash"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amountSettled"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","p1-3",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","matTooltip","Status"],["mat-cell",""],["class","dot green","matTooltip","Received","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired/Unknown","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Received","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unpaid","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Expired/Unknown","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","","mat-sort-header",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"p1-3"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,a){1&i&&(t.j41(0,"div",3),t.DNE(1,Ei,24,9,"form",4)(2,xi,3,0,"div",5)(3,na,57,19,"div",6),t.k0s()),2&i&&(t.R7$(),t.Y8G("ngIf","home"===a.calledFrom),t.R7$(),t.Y8G("ngIf","transactions"===a.calledFrom),t.R7$(),t.Y8G("ngIf","transactions"===a.calledFrom))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.VZ,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,O.fg,g.rl,g.nJ,g.MV,g.TL,g.yw,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,J.oV,I.iy,A.ZF,A.Ld,K.V,p.QX,p.vh],styles:[".mat-column-status[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}"]})}return n})();const kt=n=>({"dashboard-card-content":!0,"error-border":n}),ia=n=>({"p-0":n});function aa(n,o){if(1&n&&(t.j41(0,"button",28)(1,"mat-icon"),t.EFF(2,"more_vert"),t.k0s()()),2&n){t.XpG();const e=t.sdS(11);t.Y8G("matMenuTriggerFor",e)}}function oa(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",29),t.bIt("click",function(){const a=t.eBV(e).index,s=t.XpG().$implicit,r=t.XpG(2);return t.Njj(r.onNavigateTo(s.links[a]))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit;t.R7$(),t.JRh(e)}}function sa(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",29),t.bIt("click",function(){t.eBV(e);const a=t.XpG(3);return t.Njj(a.onsortChannelsBy())}),t.EFF(1),t.k0s()}if(2&n){const e=t.XpG(3);t.R7$(),t.SpI("Sort By ","Balance Score"===e.sortField?"Capacity":"Balance Score","")}}function la(n,o){1&n&&t.nrm(0,"mat-progress-bar",30)}function ra(n,o){if(1&n&&t.nrm(0,"rtl-ecl-node-info",31),2&n){const e=t.XpG(3);t.Y8G("information",e.information)("showColorFieldSeparately",!1)}}function ca(n,o){if(1&n&&t.nrm(0,"rtl-ecl-balances-info",32),2&n){const e=t.XpG(3);t.Y8G("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function ma(n,o){if(1&n&&t.nrm(0,"rtl-ecl-channel-capacity-info",33),2&n){const e=t.XpG(3);t.Y8G("sortBy",e.sortField)("channelBalances",e.channelBalances)("allChannels",e.allChannelsCapacity)("errorMessage",e.errorMessages[2])}}function pa(n,o){if(1&n&&t.nrm(0,"rtl-ecl-fee-info",34),2&n){const e=t.XpG(3);t.Y8G("fees",e.fees)("errorMessage",e.errorMessages[1])}}function ua(n,o){if(1&n&&t.nrm(0,"rtl-ecl-channel-status-info",35),2&n){const e=t.XpG(3);t.Y8G("channelsStatus",e.channelsStatus)("errorMessage",e.errorMessages[2])}}function da(n,o){1&n&&(t.j41(0,"h3"),t.EFF(1,"Error! Unable to find information!"),t.k0s())}function ha(n,o){if(1&n&&(t.j41(0,"mat-grid-tile",11)(1,"mat-card",12)(2,"mat-card-header")(3,"mat-card-title",13)(4,"div"),t.nrm(5,"fa-icon",14),t.j41(6,"span"),t.EFF(7),t.k0s()(),t.j41(8,"div"),t.DNE(9,aa,3,1,"button",15),t.j41(10,"mat-menu",16,1),t.DNE(12,oa,2,1,"button",17)(13,sa,2,1,"button",18),t.k0s()()()(),t.j41(14,"mat-card-content",19),t.DNE(15,la,1,0,"mat-progress-bar",20),t.j41(16,"div",21),t.DNE(17,ra,1,2,"rtl-ecl-node-info",22)(18,ca,1,2,"rtl-ecl-balances-info",23)(19,ma,1,4,"rtl-ecl-channel-capacity-info",24)(20,pa,1,2,"rtl-ecl-fee-info",25)(21,ua,1,2,"rtl-ecl-channel-status-info",26)(22,da,2,0,"h3",27),t.k0s()()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.Y8G("colspan",e.cols)("rowspan",e.rows),t.R7$(5),t.Y8G("icon",e.icon),t.R7$(2),t.JRh(e.title),t.R7$(2),t.Y8G("ngIf",e.links[0]),t.R7$(3),t.Y8G("ngForOf",e.goToOptions),t.R7$(),t.Y8G("ngIf","capacity"===e.id),t.R7$(),t.FS9("fxFlex","capacity"===e.id?90:70),t.Y8G("ngClass",t.eq3(16,kt,"node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.ERROR)||("capacity"===e.id||"status"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||"fee"===e.id&&i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR)),t.R7$(),t.Y8G("ngIf","node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.INITIATED)||("capacity"===e.id||"status"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||"fee"===e.id&&i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngSwitch",e.id),t.R7$(),t.Y8G("ngSwitchCase","node"),t.R7$(),t.Y8G("ngSwitchCase","balance"),t.R7$(),t.Y8G("ngSwitchCase","capacity"),t.R7$(),t.Y8G("ngSwitchCase","fee"),t.R7$(),t.Y8G("ngSwitchCase","status")}}function fa(n,o){if(1&n&&(t.j41(0,"div",5)(1,"div",6),t.nrm(2,"fa-icon",7),t.j41(3,"span",8),t.EFF(4),t.k0s()(),t.j41(5,"mat-grid-list",9),t.DNE(6,ha,23,18,"mat-grid-tile",10),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.Y8G("icon",e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.ERROR?e.faFrown:e.faSmile),t.R7$(2),t.JRh(e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.COMPLETED?"Welcome "+e.information.alias+"! Your node is up and running.":e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),t.R7$(),t.Y8G("rowHeight",e.operatorCardHeight),t.R7$(),t.Y8G("ngForOf",e.operatorCards)}}function _a(n,o){if(1&n&&(t.j41(0,"button",28)(1,"mat-icon"),t.EFF(2,"more_vert"),t.k0s()()),2&n){t.XpG();const e=t.sdS(9);t.Y8G("matMenuTriggerFor",e)}}function ga(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",29),t.bIt("click",function(){const a=t.eBV(e).index,s=t.XpG(2).$implicit,r=t.XpG(2);return t.Njj(r.onNavigateTo(s.links[a]))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit;t.R7$(),t.JRh(e)}}function Ca(n,o){if(1&n&&(t.j41(0,"mat-card-header")(1,"mat-card-title",13)(2,"div"),t.nrm(3,"fa-icon",14),t.j41(4,"span"),t.EFF(5),t.k0s()(),t.j41(6,"div"),t.DNE(7,_a,3,1,"button",15),t.j41(8,"mat-menu",16,2),t.DNE(10,ga,2,1,"button",17),t.k0s()()()()),2&n){const e=t.XpG().$implicit;t.R7$(3),t.Y8G("icon",e.icon),t.R7$(2),t.JRh(e.title),t.R7$(2),t.Y8G("ngIf",e.links[0]),t.R7$(3),t.Y8G("ngForOf",e.goToOptions)}}function ya(n,o){1&n&&t.nrm(0,"mat-progress-bar",30)}function ba(n,o){if(1&n&&t.nrm(0,"rtl-ecl-node-info",44),2&n){const e=t.XpG(3);t.Y8G("information",e.information)}}function Fa(n,o){if(1&n&&t.nrm(0,"rtl-ecl-balances-info",32),2&n){const e=t.XpG(3);t.Y8G("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function Ea(n,o){if(1&n&&t.nrm(0,"rtl-ecl-channel-liquidity-info",45),2&n){const e=t.XpG(3);t.Y8G("direction","In")("totalLiquidity",e.totalInboundLiquidity)("allChannels",e.allInboundChannels)("errorMessage",e.errorMessages[2])}}function xa(n,o){if(1&n&&t.nrm(0,"rtl-ecl-channel-liquidity-info",45),2&n){const e=t.XpG(3);t.Y8G("direction","Out")("totalLiquidity",e.totalOutboundLiquidity)("allChannels",e.allOutboundChannels)("errorMessage",e.errorMessages[2])}}function La(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",29),t.bIt("click",function(){const a=t.eBV(e).index,s=t.XpG(2).$implicit,r=t.XpG(2);return t.Njj(r.onNavigateTo(s.links[a]))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit;t.R7$(),t.JRh(e)}}function Sa(n,o){if(1&n&&(t.j41(0,"span",46)(1,"mat-tab-group",47)(2,"mat-tab",48),t.nrm(3,"rtl-ecl-lightning-invoices",49),t.k0s(),t.j41(4,"mat-tab",50),t.nrm(5,"rtl-ecl-lightning-payments",51),t.k0s()(),t.j41(6,"div",52)(7,"button",28)(8,"mat-icon"),t.EFF(9,"more_vert"),t.k0s()(),t.j41(10,"mat-menu",16,3),t.DNE(12,La,2,1,"button",17),t.k0s()()()),2&n){const e=t.sdS(11),i=t.XpG().$implicit;t.R7$(3),t.Y8G("calledFrom","home"),t.R7$(2),t.Y8G("calledFrom","home"),t.R7$(2),t.Y8G("matMenuTriggerFor",e),t.R7$(5),t.Y8G("ngForOf",i.goToOptions)}}function va(n,o){1&n&&(t.j41(0,"h3"),t.EFF(1,"Error! Unable to find information!"),t.k0s())}function Ra(n,o){if(1&n&&(t.j41(0,"mat-grid-tile",11)(1,"mat-card",38),t.DNE(2,Ca,11,4,"mat-card-header",39),t.j41(3,"mat-card-content",40),t.DNE(4,ya,1,0,"mat-progress-bar",20),t.j41(5,"div",21),t.DNE(6,ba,1,1,"rtl-ecl-node-info",41)(7,Fa,1,2,"rtl-ecl-balances-info",23)(8,Ea,1,4,"rtl-ecl-channel-liquidity-info",42)(9,xa,1,4,"rtl-ecl-channel-liquidity-info",42)(10,Sa,13,4,"span",43)(11,va,2,0,"h3",27),t.k0s()()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.Y8G("colspan",e.cols)("rowspan",e.rows),t.R7$(),t.Y8G("ngClass",t.eq3(13,ia,"transactions"===e.id)),t.R7$(),t.Y8G("ngIf","transactions"!==e.id),t.R7$(),t.FS9("fxFlex","transactions"===e.id?100:"balance"===e.id?70:90),t.Y8G("ngClass",t.eq3(15,kt,"node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.ERROR)||("inboundLiq"===e.id||"outboundLiq"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR)),t.R7$(),t.Y8G("ngIf","node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.INITIATED)||("inboundLiq"===e.id||"outboundLiq"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngSwitch",e.id),t.R7$(),t.Y8G("ngSwitchCase","node"),t.R7$(),t.Y8G("ngSwitchCase","balance"),t.R7$(),t.Y8G("ngSwitchCase","inboundLiq"),t.R7$(),t.Y8G("ngSwitchCase","outboundLiq"),t.R7$(),t.Y8G("ngSwitchCase","transactions")}}function Ia(n,o){if(1&n&&(t.j41(0,"div",36),t.nrm(1,"fa-icon",7),t.j41(2,"span",8),t.EFF(3),t.k0s()(),t.j41(4,"mat-grid-list",37),t.DNE(5,Ra,12,17,"mat-grid-tile",10),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faSmile),t.R7$(2),t.SpI("Welcome ",e.information.alias,"! Your node is up and running."),t.R7$(),t.Y8G("rowHeight",e.merchantCardHeight),t.R7$(),t.Y8G("ngForOf",e.merchantCards)}}let ka=(()=>{class n{constructor(e,i,a,s){this.logger=e,this.store=i,this.commonService=a,this.router=s,this.faSmile=Lt.Qpm,this.faFrown=Lt.wB1,this.faAngleDoubleDown=F.WxX,this.faAngleDoubleUp=F.$sC,this.faChartPie=F.W1p,this.faBolt=F.zm_,this.faServer=F.D6w,this.faNetworkWired=F.eGi,this.userPersonaEnum=l.HW,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.information={},this.channels=[],this.onchainBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="390px",this.merchantCardHeight="62px",this.sortField="Balance Score",this.errorMessages=["","","",""],this.apiCallStatusNodeInfo={status:l.wn.COMPLETED},this.apiCallStatusFees={status:l.wn.COMPLETED},this.apiCallStatusOCBal={status:l.wn.COMPLETED},this.apiCallStatusAllChannels={status:l.wn.COMPLETED},this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.f7.XS?(this.operatorCards=[{id:"node",goToOptions:[],links:[],icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goToOptions:["Routing","Fees Summary"],links:["routing","reports"],icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goToOptions:["Channels","Inactive Channels"],links:["connections","connections/channels/inactive"],icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goToOptions:["Channels"],links:["connections"],icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goToOptions:["Transactions","Transactions Summary"],links:["transactions","reports/transactions"],title:"",cols:6,rows:4},{id:"inboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===l.f7.SM||this.screenSize===l.f7.MD?(this.operatorCards=[{id:"node",goToOptions:[],links:[],icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goToOptions:["Routing","Fees Summary"],links:["routing","reports"],icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goToOptions:["Channels","Inactive Channels"],links:["connections","connections/channels/inactive"],icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goToOptions:["Channels"],links:["connections"],icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goToOptions:["Transactions","Transactions Summary"],links:["transactions","reports/transactions"],title:"",cols:3,rows:4},{id:"inboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCards=[{id:"node",goToOptions:[],links:[],icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goToOptions:["Channels"],links:["connections"],icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goToOptions:["Routing","Fees Summary"],links:["routing","reports"],icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goToOptions:["Channels","Inactive Channels"],links:["connections","connections/channels/inactive"],icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goToOptions:["Transactions","Transactions Summary"],links:["transactions","reports/transactions"],title:"",cols:2,rows:5}])}ngOnInit(){this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.b_).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=e.apiCallStatus,this.apiCallStatusNodeInfo.status===l.wn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message?this.apiCallStatusNodeInfo.message:""),this.information=e.information}),this.store.select(C.oR).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.errorMessages[1]="",this.apiCallStatusFees=e.apiCallStatus,this.apiCallStatusFees.status===l.wn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message?this.apiCallStatusFees.message:""),this.fees=e.fees}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[3]),(0,rt.E)(this.store.select(C.DW))).subscribe(([e,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusAllChannels=e.apiCallStatus,this.apiCallStatusOCBal=i.apiCallStatus,this.apiCallStatusAllChannels.status===l.wn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusAllChannels.message?JSON.stringify(this.apiCallStatusAllChannels.message):this.apiCallStatusAllChannels.message?this.apiCallStatusAllChannels.message:""),this.apiCallStatusOCBal.status===l.wn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusOCBal.message?JSON.stringify(this.apiCallStatusOCBal.message):this.apiCallStatusOCBal.message?this.apiCallStatusOCBal.message:""),this.channels=e.activeChannels,this.onchainBalance=i.onchainBalance,this.balances.onchain=this.onchainBalance.total||0,this.balances.lightning=e.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const a=e.lightningBalance.localBalance?+e.lightningBalance.localBalance:0,s=e.lightningBalance.remoteBalance?+e.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:a,remoteBalance:s,balancedness:+(1-Math.abs((a-s)/(a+s))).toFixed(3)},this.channelsStatus=e.channelsStatus,this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels?.filter(m=>(m.toRemote||0)>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels?.filter(m=>(m.toLocal||0)>0),"toLocal"))),this.channels.forEach(m=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(m.toRemote||0),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(m.toLocal||0)}),this.logger.info(e)})}onNavigateTo(e){this.router.navigateByUrl("/ecl/"+e)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.channels.sort((e,i)=>{const a=+(e.toLocal||0)+ +(e.toRemote||0),s=+(i.toLocal||0)+ +(i.toRemote||0);return a>s?-1:a<s?1:0})):(this.sortField="Balance Score",this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels,"balancedness"))))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(M.h),t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-home"]],decls:3,vars:2,consts:[["merchantDashboard",""],["menuOperator","matMenu"],["menuMerchant","matMenu"],["menuTransactions","matMenu"],["fxLayout","column",4,"ngIf","ngIfElse"],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-2"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10","gutterSize","20px",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",3,"colspan","rowspan",4,"ngFor","ngForOf"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card"],["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"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click",4,"ngIf"],["fxLayout","column",3,"fxFlex","ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"balances","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"balances","errorMessage"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-2"],["cols","6","gutterSize","20px",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start"],["mat-stretch-tabs","false","mat-align-tabs","start","fxLayout","column",1,"dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[1,"underline"]],template:function(i,a){if(1&i&&t.DNE(0,fa,7,4,"div",4)(1,Ia,6,4,"ng-template",null,0,t.C5r),2&i){const s=t.sdS(2);t.Y8G("ngIf",(null==a.selNode?null:a.selNode.settings.userPersona)===a.userPersonaEnum.OPERATOR)("ngIfElse",s)}},dependencies:[p.YU,p.Sq,p.bT,p.ux,p.e1,p.fG,w.aY,h.DJ,h.sA,h.UI,L.PW,j.iY,E.RN,E.m2,E.MM,E.dh,St.B_,St.NS,ct.An,mt.kk,mt.fb,mt.Cp,V.HM,D.mq,D.T8,Zt,te,ie,se,he,Ie,Rt,It]})}return n})();const Ta=["form"];function wa(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Bitcoin address is required."),t.k0s())}function ja(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.JRh(e.amountError)}}function Da(n,o){if(1&n&&(t.j41(0,"mat-option",29),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e),t.R7$(),t.JRh(e)}}function Pa(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Target Confirmation Blocks is required."),t.k0s())}function Ga(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.sendFundError)}}function Aa(n,o){if(1&n&&(t.j41(0,"div",30),t.nrm(1,"fa-icon",31),t.DNE(2,Ga,2,1,"span",14),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faExclamationTriangle),t.R7$(),t.Y8G("ngIf",""!==e.sendFundError)}}let Tt=(()=>{class n{constructor(e,i,a,s,r,m){this.dialogRef=e,this.logger=i,this.store=a,this.commonService=s,this.decimalPipe=r,this.actions=m,this.faExclamationTriangle=F.zpE,this.addressTypes=[],this.selectedAddress=l.Ld[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=l.A0,this.selAmountUnit=l.A0[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.k,this.amountError="Amount is Required.",this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.fiatConversion=e.settings.fiatConversion,this.amountUnits=e.settings.currencyUnits,this.logger.info(e)}),this.actions.pipe((0,f.Q)(this.unSubs[1]),(0,H.p)(e=>e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL||e.type===l.Uu.SEND_ONCHAIN_FUNDS_RES_ECL)).subscribe(e=>{e.type===l.Uu.SEND_ONCHAIN_FUNDS_RES_ECL&&(this.store.dispatch((0,v.UI)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.wn.ERROR&&"SendOnchainFunds"===e.payload.action&&(this.sendFundError=e.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.transaction.amount&&this.selAmountUnit!==l.BQ.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?l.BQ.OTHER:this.selAmountUnit,l.BQ.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,f.Q)(this.unSubs[2])).subscribe({next:e=>{this.transaction.amount=parseInt(e[l.BQ.SATS]),this.selAmountUnit=l.BQ.SATS,this.store.dispatch((0,k.Lz)({payload:this.transaction}))},error:e=>{this.selAmountUnit=l.BQ.SATS,this.amountError="Conversion Error: "+e}}):this.store.dispatch((0,k.Lz)({payload:this.transaction}))}get invalidValues(){return!this.transaction.address||""===this.transaction.address||!this.transaction.amount||this.transaction.amount<=0||!this.transaction.blocks||this.transaction.blocks<=0}resetData(){this.sendFundError="",this.transaction={}}onAmountUnitChange(e){const i=this,a=this.selAmountUnit===this.amountUnits[2]?l.BQ.OTHER:this.selAmountUnit;let s=e.value===this.amountUnits[2]?l.BQ.OTHER:e.value;this.transaction.amount&&this.selAmountUnit!==e.value&&this.commonService.convertCurrency(this.transaction.amount,a,s,this.amountUnits[2],this.fiatConversion).pipe((0,f.Q)(this.unSubs[3])).subscribe({next:r=>{this.selAmountUnit=e.value,i.transaction.amount=+i.decimalPipe.transform(r[s],i.currencyUnitFormats[s]).replace(/,/g,"")},error:r=>{this.amountError="Conversion Error: "+r,this.selAmountUnit=a,s=a}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(G.gP),t.rXU(R.il),t.rXU(M.h),t.rXU(p.QX),t.rXU(Q.En))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(i,a){if(1&i&&t.GBs(Ta,7),2&i){let s;t.mGM(s=t.lsd())&&(a.form=s.first)}},decls:42,vars:15,consts:[["form","ngForm"],["addrs","ngModel"],["amnt","ngModel"],["blocks","ngModel"],["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"overflow-x-hidden",3,"submit","reset"],["fxLayout","column","fxFlex","55"],["matInput","","autoFocus","","tabindex","1","name","addr","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["fxLayout","column","fxFlex","30"],["matInput","","name","amt","type","number","tabindex","2","required","",3,"ngModelChange","step","min","ngModel"],["matSuffix",""],["fxLayout","column","fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxLayout","column","fxFlex","48","fxLayoutAlign","start center"],["matInput","","type","number","name","blocks","tabindex","8","required","true",3,"ngModelChange","step","min","ngModel"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",4)(1,"div",5)(2,"mat-card-header",6)(3,"div",7)(4,"span",8),t.EFF(5,"Send Payment"),t.k0s()(),t.j41(6,"button",9),t.EFF(7,"X"),t.k0s()(),t.j41(8,"mat-card-content",10)(9,"form",11,0),t.bIt("submit",function(){return t.eBV(s),t.Njj(a.onSendFunds())})("reset",function(){return t.eBV(s),t.Njj(a.resetData())}),t.j41(11,"mat-form-field",12)(12,"mat-label"),t.EFF(13,"Bitcoin Address"),t.k0s(),t.j41(14,"input",13,1),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.transaction.address,m)||(a.transaction.address=m),t.Njj(m)}),t.k0s(),t.DNE(16,wa,2,0,"mat-error",14),t.k0s(),t.j41(17,"mat-form-field",15)(18,"mat-label"),t.EFF(19,"Amount"),t.k0s(),t.j41(20,"input",16,2),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.transaction.amount,m)||(a.transaction.amount=m),t.Njj(m)}),t.k0s(),t.j41(22,"span",17),t.EFF(23),t.k0s(),t.DNE(24,ja,2,1,"mat-error",14),t.k0s(),t.j41(25,"mat-form-field",18)(26,"mat-select",19),t.bIt("selectionChange",function(m){return t.eBV(s),t.Njj(a.onAmountUnitChange(m))}),t.DNE(27,Da,2,2,"mat-option",20),t.k0s()(),t.j41(28,"div",21)(29,"mat-form-field",22)(30,"mat-label"),t.EFF(31,"Target Confirmation Blocks"),t.k0s(),t.j41(32,"input",23,3),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.transaction.blocks,m)||(a.transaction.blocks=m),t.Njj(m)}),t.k0s(),t.DNE(34,Pa,2,0,"mat-error",14),t.k0s()(),t.nrm(35,"div",24),t.DNE(36,Aa,3,2,"div",25),t.j41(37,"div",26)(38,"button",27),t.EFF(39,"Clear Fields"),t.k0s(),t.j41(40,"button",28),t.EFF(41,"Send Funds"),t.k0s()()()()()()}2&i&&(t.R7$(6),t.Y8G("mat-dialog-close",!1),t.R7$(8),t.R50("ngModel",a.transaction.address),t.R7$(2),t.Y8G("ngIf",!a.transaction.address),t.R7$(4),t.Y8G("step",100)("min",0),t.R50("ngModel",a.transaction.amount),t.R7$(3),t.SpI("",a.selAmountUnit," "),t.R7$(),t.Y8G("ngIf",!a.transaction.amount),t.R7$(2),t.Y8G("value",a.selAmountUnit),t.R7$(),t.Y8G("ngForOf",a.amountUnits),t.R7$(5),t.Y8G("step",1)("min",0),t.R50("ngModel",a.transaction.blocks),t.R7$(2),t.Y8G("ngIf",!a.transaction.blocks),t.R7$(2),t.Y8G("ngIf",""!==a.sendFundError))},dependencies:[p.Sq,p.bT,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.VZ,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,B.tx,j.$z,E.m2,E.MM,O.fg,g.rl,g.nJ,g.TL,g.yw,S.VO,X.wT,W.N,K.V]})}return n})();var ht=_(5837);const Na=()=>["all"],Ma=n=>({"error-border":n}),Ba=()=>["no_transaction"],ft=n=>({width:n}),$a=n=>({"display-none":n});function Va(n,o){if(1&n&&(t.j41(0,"mat-option",34),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG();t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function Oa(n,o){1&n&&t.nrm(0,"mat-progress-bar",35)}function Ha(n,o){1&n&&(t.j41(0,"th",36),t.EFF(1,"Date/Time"),t.k0s())}function Ya(n,o){if(1&n&&(t.j41(0,"td",37),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.i5U(2,1,1e3*(null==e?null:e.timestamp),"dd/MMM/y HH:mm"))}}function Xa(n,o){1&n&&(t.j41(0,"th",36),t.EFF(1,"Address"),t.k0s())}function Ua(n,o){if(1&n&&(t.j41(0,"td",37)(1,"div",38)(2,"span",39),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,ft,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.address)}}function za(n,o){1&n&&(t.j41(0,"th",36),t.EFF(1,"Blockhash"),t.k0s())}function Ja(n,o){if(1&n&&(t.j41(0,"td",37)(1,"div",38)(2,"span",39),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,ft,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.blockHash)}}function qa(n,o){1&n&&(t.j41(0,"th",36),t.EFF(1,"Transaction ID"),t.k0s())}function Qa(n,o){if(1&n&&(t.j41(0,"td",37)(1,"div",38)(2,"span",39),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,ft,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.txid)}}function Za(n,o){1&n&&(t.j41(0,"th",40),t.EFF(1,"Amount (Sats)"),t.k0s())}function Wa(n,o){if(1&n&&(t.j41(0,"span",43),t.EFF(1),t.nI1(2,"number"),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(t.bMT(2,1,null==e?null:e.amount))}}function Ka(n,o){if(1&n&&(t.j41(0,"span",44),t.EFF(1),t.nI1(2,"number"),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI("(",t.bMT(2,1,-1*(null==e?null:e.amount)),")")}}function to(n,o){if(1&n&&(t.j41(0,"td",37),t.DNE(1,Wa,3,3,"span",41)(2,Ka,3,3,"span",42),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf",(null==e?null:e.amount)>0||0===(null==e?null:e.amount)),t.R7$(),t.Y8G("ngIf",(null==e?null:e.amount)<0)}}function eo(n,o){1&n&&(t.j41(0,"th",40),t.EFF(1,"Fees (Sats)"),t.k0s())}function no(n,o){if(1&n&&(t.j41(0,"td",37)(1,"span",43),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,null==e?null:e.fees))}}function io(n,o){1&n&&(t.j41(0,"th",40),t.EFF(1,"Confirmations"),t.k0s())}function ao(n,o){if(1&n&&(t.j41(0,"td",37)(1,"span",43),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,1,null==e?null:e.confirmations)," ")}}function oo(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",45)(1,"div",46)(2,"mat-select",47),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",48),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function so(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",49)(1,"button",50),t.bIt("click",function(a){const s=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.onTransactionClick(s,a))}),t.EFF(2,"View Info"),t.k0s()()}}function lo(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No transaction available."),t.k0s())}function ro(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting transactions..."),t.k0s())}function co(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.errorMessage)}}function mo(n,o){if(1&n&&(t.j41(0,"td",51),t.DNE(1,lo,2,0,"p",52)(2,ro,2,0,"p",52)(3,co,2,1,"p",52),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function po(n,o){if(1&n&&t.nrm(0,"tr",53),2&n){const e=t.XpG();t.Y8G("ngClass",t.eq3(1,$a,(null==e.listTransactions?null:e.listTransactions.data)&&(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)>0))}}function uo(n,o){1&n&&t.nrm(0,"tr",54)}function ho(n,o){1&n&&t.nrm(0,"tr",55)}let fo=(()=>{class n{constructor(e,i,a,s,r){this.logger=e,this.commonService=i,this.store=a,this.datePipe=s,this.camelCaseWithSpaces=r,this.faHistory=F.Int,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="on_chain",this.tableSetting={tableId:"transaction",recordsPerPage:l.md,sortBy:"timestamp",sortOrder:l.oi.DESCENDING},this.displayedColumns=[],this.listTransactions=new c.I6([]),this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.totalRecords=0,this.flgInit=!1,this.unSubs=[new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.apiCallStatus.status===l.wn.COMPLETED&&(this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.flgInit||(this.flgInit=!0,this.store.dispatch((0,k.mh)({payload:{count:1e3,skip:0}}))),this.logger.info(this.displayedColumns))}),this.store.select(C.gN).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),e.transactions&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadTransactionsTable(e.transactions),this.logger.info(e)})}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):this.commonService.titleCase(e)}setFilterPredicate(){this.listTransactions.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=(e.timestamp?this.datePipe.transform(new Date(1e3*e.timestamp),"dd/MMM/y HH:mm")?.toLowerCase():"")+JSON.stringify(e).toLowerCase();break;case"timestamp":a=this.datePipe.transform(new Date(1e3*(e[this.selFilterBy]||0)),"dd/MMM/y HH:mm")?.toLowerCase()||"";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return a.includes(i)}}onTransactionClick(e,i){this.store.dispatch((0,v.xO)({payload:{data:{type:l.A$.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:e.blockHash||e.blockId_opt,title:"Block Hash",width:100,explorerLink:"block"}],[{key:"txid",value:e.txid,title:"Transaction ID",width:100,explorerLink:"tx"}],[{key:"timestamp",value:e.timestamp,title:"Date/Time",width:50,type:l.UN.DATE_TIME},{key:"confirmations",value:e.confirmations,title:"Number of Confirmations",width:50,type:l.UN.NUMBER}],[{key:"fees",value:e.fees,title:"Fees (Sats)",width:50,type:l.UN.NUMBER},{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.UN.NUMBER}],[{key:"address",value:e.address,title:"Address",width:100,type:l.UN.STRING}]]}}}))}loadTransactionsTable(e){this.listTransactions=new c.I6([...e]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(i,a)=>i[a]&&isNaN(i[a])?i[a].toLocaleLowerCase():i[a]?+i[a]:null,this.listTransactions.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter(),this.logger.info(this.listTransactions)}onPageChange(e){this.store.dispatch((0,k.mh)({payload:{count:this.pageSize,skip:e.pageIndex*e.pageSize}}))}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il),t.rXU(p.vh),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Transactions")}])],decls:52,vars:19,consts:[["table",""],["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","blockHash"],["matColumnDef","txid"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","fees"],["matColumnDef","confirmations"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"div",3),t.nrm(3,"fa-icon",4),t.j41(4,"span",5),t.EFF(5,"Transaction History"),t.k0s()(),t.j41(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),t.EFF(9,"Filter By"),t.k0s(),t.j41(10,"mat-select",8),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilterBy,m)||(a.selFilterBy=m),t.Njj(m)}),t.bIt("selectionChange",function(){return t.eBV(s),a.selFilter="",t.Njj(a.applyFilter())}),t.j41(11,"perfect-scrollbar"),t.DNE(12,Va,2,2,"mat-option",9),t.k0s()()(),t.j41(13,"mat-form-field",7)(14,"mat-label"),t.EFF(15,"Filter"),t.k0s(),t.j41(16,"input",10),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilter,m)||(a.selFilter=m),t.Njj(m)}),t.bIt("input",function(){return t.eBV(s),t.Njj(a.applyFilter())})("keyup",function(){return t.eBV(s),t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(17,"div",11)(18,"div",12),t.DNE(19,Oa,1,0,"mat-progress-bar",13),t.j41(20,"table",14,0),t.qex(22,15),t.DNE(23,Ha,2,0,"th",16)(24,Ya,3,4,"td",17),t.bVm(),t.qex(25,18),t.DNE(26,Xa,2,0,"th",16)(27,Ua,4,4,"td",17),t.bVm(),t.qex(28,19),t.DNE(29,za,2,0,"th",16)(30,Ja,4,4,"td",17),t.bVm(),t.qex(31,20),t.DNE(32,qa,2,0,"th",16)(33,Qa,4,4,"td",17),t.bVm(),t.qex(34,21),t.DNE(35,Za,2,0,"th",22)(36,to,3,2,"td",17),t.bVm(),t.qex(37,23),t.DNE(38,eo,2,0,"th",22)(39,no,4,3,"td",17),t.bVm(),t.qex(40,24),t.DNE(41,io,2,0,"th",22)(42,ao,4,3,"td",17),t.bVm(),t.qex(43,25),t.DNE(44,oo,6,0,"th",26)(45,so,3,0,"td",27),t.bVm(),t.qex(46,28),t.DNE(47,mo,4,3,"td",29),t.bVm(),t.DNE(48,po,1,3,"tr",30)(49,uo,1,0,"tr",31)(50,ho,1,0,"tr",32),t.k0s(),t.nrm(51,"mat-paginator",33),t.k0s()()()}2&i&&(t.R7$(3),t.Y8G("icon",a.faHistory),t.R7$(7),t.R50("ngModel",a.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(15,Na).concat(a.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",a.selFilter),t.R7$(3),t.Y8G("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",a.tableSetting.sortBy)("matSortDirection",a.tableSetting.sortOrder)("dataSource",a.listTransactions)("ngClass",t.eq3(16,Ma,""!==a.errorMessage)),t.R7$(28),t.Y8G("matFooterRowDef",t.lJ4(18,Ba)),t.R7$(),t.Y8G("matHeaderRowDef",a.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",a.displayedColumns),t.R7$(),t.Y8G("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.me,d.BC,d.vS,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,O.fg,g.rl,g.nJ,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,I.iy,A.ZF,A.Ld,p.QX,p.vh]})}return n})();function _o(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",12),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.activeLink=a.link)}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG();t.FS9("routerLink",e.link),t.Y8G("active",i.activeLink===e.link),t.R7$(),t.JRh(e.name)}}let go=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.faExchangeAlt=F._qq,this.faChartPie=F.W1p,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"}],this.activeLink=this.links[0].link,this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(i=>i instanceof b.gx)).subscribe({next:i=>{const a=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=a?a.link:this.links[0].link}}),this.store.select(U._c).pipe((0,f.Q)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.onchainBalance.total||0},{title:"Confirmed",dataValue:i.onchainBalance.confirmed||0},{title:"Unconfirmed",dataValue:i.onchainBalance.unconfirmed||0}]})}openSendFundsModal(){this.store.dispatch((0,v.xO)({payload:{data:{component:Tt}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(R.il),t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-on-chain"]],decls:23,vars:5,consts:[["tabPanel",""],["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","","mat-stretch-tabs","false","mat-align-tabs","start",3,"tabPanel"],["tabindex","1","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"],["fxLayout","row","fxFlex","100"],["tabindex","1","mat-tab-link","",1,"mat-tab-label",3,"click","active","routerLink"]],template:function(i,a){if(1&i&&(t.j41(0,"div",1),t.nrm(1,"fa-icon",2),t.j41(2,"span",3),t.EFF(3,"On-chain Balance"),t.k0s()(),t.j41(4,"div",4)(5,"mat-card")(6,"mat-card-content",5),t.nrm(7,"rtl-currency-unit-converter",6),t.k0s()()(),t.j41(8,"div",1),t.nrm(9,"fa-icon",2),t.j41(10,"span",3),t.EFF(11,"On-chain Transactions"),t.k0s()(),t.j41(12,"div",7)(13,"mat-card")(14,"mat-card-content",5)(15,"nav",8),t.DNE(16,_o,2,3,"div",9),t.k0s(),t.nrm(17,"mat-tab-nav-panel",null,0),t.j41(19,"div",10),t.nrm(20,"router-outlet"),t.k0s(),t.j41(21,"div",10),t.nrm(22,"rtl-ecl-on-chain-transaction-history",11),t.k0s()()()()),2&i){const s=t.sdS(18);t.R7$(),t.Y8G("icon",a.faChartPie),t.R7$(6),t.Y8G("values",a.balances),t.R7$(2),t.Y8G("icon",a.faExchangeAlt),t.R7$(6),t.Y8G("tabPanel",s),t.R7$(),t.Y8G("ngForOf",a.links)}},dependencies:[p.Sq,w.aY,h.DJ,h.sA,h.UI,E.RN,E.m2,D.Bu,D.hQ,D.Ql,ht.f,b.n3,b.Wk,fo]})}return n})();var wt=_(1975);function Co(n,o){if(1&n&&(t.j41(0,"span",10),t.EFF(1,"Channels"),t.k0s()),2&n){const e=t.XpG();t.FS9("matBadge",e.activeChannels)}}function yo(n,o){if(1&n&&(t.j41(0,"span",10),t.EFF(1,"Peers"),t.k0s()),2&n){const e=t.XpG();t.FS9("matBadge",e.activePeers)}}let bo=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=F.gdJ,this.faChartPie=F.W1p,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 u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(e=>e instanceof b.gx)).subscribe({next:e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.os).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.activePeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.activeChannels=e.channelsStatus&&e.channelsStatus.active&&e.channelsStatus.active.channels?e.channelsStatus.active.channels:0}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.balances=[{title:"Total Balance",dataValue:e.onchainBalance.total||0},{title:"Confirmed",dataValue:e.onchainBalance.confirmed||0},{title:"Unconfirmed",dataValue:e.onchainBalance.unconfirmed||0}]})}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(R.il),t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange","selectedTabChange","selectedIndex"],["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(i,a){1&i&&(t.j41(0,"div",0),t.nrm(1,"fa-icon",1),t.j41(2,"span",2),t.EFF(3,"On-chain Balance"),t.k0s()(),t.j41(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t.nrm(7,"rtl-currency-unit-converter",5),t.k0s()()(),t.j41(8,"div",0),t.nrm(9,"fa-icon",1),t.j41(10,"span",2),t.EFF(11,"Connections"),t.k0s()(),t.j41(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),t.mxI("selectedIndexChange",function(r){return t.DH7(a.activeLink,r)||(a.activeLink=r),r}),t.bIt("selectedTabChange",function(r){return a.onSelectedTabChange(r)}),t.j41(16,"mat-tab"),t.DNE(17,Co,2,1,"ng-template",8),t.k0s(),t.j41(18,"mat-tab"),t.DNE(19,yo,2,1,"ng-template",8),t.k0s()(),t.j41(20,"div",9),t.nrm(21,"router-outlet"),t.k0s()()()()),2&i&&(t.R7$(),t.Y8G("icon",a.faChartPie),t.R7$(6),t.Y8G("values",a.balances),t.R7$(2),t.Y8G("icon",a.faUsers),t.R7$(6),t.R50("selectedIndex",a.activeLink))},dependencies:[w.aY,h.DJ,h.sA,h.UI,E.RN,E.m2,wt.k,D.ES,D.mq,D.T8,ht.f,b.n3]})}return n})();function Fo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",12),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.activeLink=a.link)}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG();t.FS9("routerLink",e.link),t.Y8G("active",i.activeLink===e.link),t.R7$(),t.JRh(e.name)}}let Eo=(()=>{class n{constructor(e,i,a){this.logger=e,this.store=i,this.router=a,this.faExchangeAlt=F._qq,this.faChartPie=F.W1p,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"}],this.activeLink=this.links[0].link,this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(i=>i instanceof b.gx)).subscribe({next:i=>{const a=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=a?a.link:this.links[0].link}}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[1]),(0,rt.E)(this.store.select(U._c))).subscribe(([i,a])=>{this.currencyUnits=a?.settings.currencyUnits||[],this.balances=a&&a.settings.userPersona===l.HW.OPERATOR?[{title:"Local Capacity",dataValue:i.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:i.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:i.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:i.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(i)})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-transactions"]],decls:21,vars:5,consts:[["tabPanel",""],["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","","mat-stretch-tabs","false","mat-align-tabs","start",3,"tabPanel"],["tabindex","1","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"],["tabindex","1","mat-tab-link","",1,"mat-tab-label",3,"click","active","routerLink"]],template:function(i,a){if(1&i&&(t.j41(0,"div",1),t.nrm(1,"fa-icon",2),t.j41(2,"span",3),t.EFF(3,"Lightning Balance"),t.k0s()(),t.j41(4,"div",4)(5,"mat-card")(6,"mat-card-content",5),t.nrm(7,"rtl-currency-unit-converter",6),t.k0s()()(),t.j41(8,"div",7),t.nrm(9,"fa-icon",2),t.j41(10,"span",3),t.EFF(11,"Lightning Transactions"),t.k0s()(),t.j41(12,"div",8)(13,"mat-card")(14,"mat-card-content",5)(15,"nav",9),t.DNE(16,Fo,2,3,"div",10),t.k0s(),t.nrm(17,"mat-tab-nav-panel",null,0),t.j41(19,"div",11),t.nrm(20,"router-outlet"),t.k0s()()()()),2&i){const s=t.sdS(18);t.R7$(),t.Y8G("icon",a.faChartPie),t.R7$(6),t.Y8G("values",a.balances),t.R7$(2),t.Y8G("icon",a.faExchangeAlt),t.R7$(6),t.Y8G("tabPanel",s),t.R7$(),t.Y8G("ngForOf",a.links)}},dependencies:[p.Sq,w.aY,h.DJ,h.sA,h.UI,E.RN,E.m2,D.Bu,D.hQ,D.Ql,ht.f,b.n3,b.Wk]})}return n})();function xo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",12),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.activeLink=a.link)}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG();t.FS9("routerLink",e.link),t.Y8G("active",i.activeLink===e.link),t.R7$(),t.JRh(e.name)}}let Lo=(()=>{class n{constructor(e){this.router=e,this.faMapSigns=F.knH,this.events=[],this.flgLoading=[!0],this.errorMessage="",this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new u.B,new u.B,new u.B]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(i=>i instanceof b.gx)).subscribe({next:i=>{const a=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=a?a.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-routing"]],decls:15,vars:3,consts:[["tabPanel",""],["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","","mat-stretch-tabs","false","mat-align-tabs","start","fxFlex","100",3,"tabPanel"],["tabindex","1","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"],["tabindex","1","mat-tab-link","",1,"mat-tab-label",3,"click","active","routerLink"]],template:function(i,a){if(1&i&&(t.j41(0,"div",1)(1,"div",2),t.nrm(2,"fa-icon",3),t.j41(3,"span",4),t.EFF(4,"Routing"),t.k0s()(),t.j41(5,"div",5)(6,"mat-card",6)(7,"mat-card-content",7)(8,"div",8)(9,"nav",9),t.DNE(10,xo,2,3,"div",10),t.k0s(),t.nrm(11,"mat-tab-nav-panel",null,0),t.k0s(),t.j41(13,"div",11),t.nrm(14,"router-outlet"),t.k0s()()()()()),2&i){const s=t.sdS(12);t.R7$(2),t.Y8G("icon",a.faMapSigns),t.R7$(7),t.Y8G("tabPanel",s),t.R7$(),t.Y8G("ngForOf",a.links)}},dependencies:[p.Sq,w.aY,h.DJ,h.sA,h.UI,E.RN,E.m2,D.Bu,D.hQ,D.Ql,b.n3,b.Wk]})}return n})();var ot=_(5951),jt=_(450),tt=_(6013);const So=["peersForm"],vo=["stepper"];function Ro(n,o){if(1&n&&t.EFF(0),2&n){const e=t.XpG();t.JRh(e.peerFormLabel)}}function Io(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Address is required."),t.k0s())}function ko(n,o){if(1&n&&(t.j41(0,"div",34),t.nrm(1,"fa-icon",35),t.j41(2,"span"),t.EFF(3),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faExclamationTriangle),t.R7$(2),t.JRh(e.peerConnectionError)}}function To(n,o){if(1&n&&t.EFF(0),2&n){const e=t.XpG();t.JRh(e.channelFormLabel)}}function wo(n,o){if(1&n&&(t.j41(0,"div",36),t.nrm(1,"fa-icon",35),t.j41(2,"span",13)(3,"div"),t.EFF(4,"Fee rates recommended by mempool (sat/vByte):"),t.k0s(),t.j41(5,"span",37)(6,"span"),t.EFF(7),t.k0s(),t.j41(8,"span"),t.EFF(9),t.k0s(),t.j41(10,"span"),t.EFF(11),t.k0s(),t.j41(12,"span"),t.EFF(13),t.k0s(),t.j41(14,"span"),t.EFF(15),t.k0s()()()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faInfoCircle),t.R7$(6),t.SpI("- High: ",e.recommendedFee.fastestFee||"Unknown",""),t.R7$(2),t.SpI("- Medium: ",e.recommendedFee.halfHourFee||"Unknown",""),t.R7$(2),t.SpI("- Low: ",e.recommendedFee.hourFee||"Unknown",""),t.R7$(2),t.SpI("- Economy: ",e.recommendedFee.economyFee||"Unknown",""),t.R7$(2),t.SpI("- Minimum: ",e.recommendedFee.minimumFee||"Unknown","")}}function jo(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Amount is required."),t.k0s())}function Do(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Amount must be a positive number."),t.k0s())}function Po(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI("Amount must be less than or equal to ",e.totalBalance,".")}}function Go(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI("Lower than min feerate ",e.recommendedFee.minimumFee," in the mempool.")}}function Ao(n,o){if(1&n&&(t.j41(0,"div",34),t.nrm(1,"fa-icon",35),t.j41(2,"span"),t.EFF(3),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faExclamationTriangle),t.R7$(2),t.JRh(e.channelConnectionError)}}let Dt=(()=>{class n{constructor(e,i,a,s,r,m,T){this.dialogRef=e,this.data=i,this.store=a,this.formBuilder=s,this.actions=r,this.logger=m,this.dataService=T,this.faExclamationTriangle=F.zpE,this.faInfoCircle=F.iW_,this.peerAddress="",this.totalBalance=0,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.recommendedFee={fastestFee:0,halfHourFee:0,hourFee:0},this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.data.message?(this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.nodeId&&this.data.message.peer.address?this.data.message.peer.nodeId+"@"+this.data.message.peer.address:this.data.message.peer&&this.data.message.peer.nodeId&&!this.data.message.peer.address?this.data.message.peer.nodeId:""):(this.totalBalance=0,this.peerAddress=""),this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[d.k0.required]],peerAddress:[this.peerAddress,[d.k0.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[d.k0.required,d.k0.min(1),d.k0.max(this.totalBalance)]],isPrivate:[!!this.selNode?.settings.unannouncedChannels],feeRate:[null],hiddenAmount:["",[d.k0.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.selNode=e,this.channelFormGroup.controls.isPrivate.setValue(!!e?.settings.unannouncedChannels)}),this.actions.pipe((0,f.Q)(this.unSubs[1]),(0,H.p)(e=>e.type===l.Uu.NEWLY_ADDED_PEER_ECL||e.type===l.Uu.FETCH_CHANNELS_ECL||e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.Uu.NEWLY_ADDED_PEER_ECL&&(this.logger.info(e.payload),this.flgEditable=!1,this.newlyAddedPeer=e.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),e.type===l.Uu.FETCH_CHANNELS_ECL&&this.dialogRef.close(),e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.wn.ERROR&&("SaveNewPeer"===e.payload.action?this.peerConnectionError=e.payload.message:"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message))}),this.dataService.getRecommendedFeeRates().pipe((0,f.Q)(this.unSubs[2])).subscribe({next:e=>{this.recommendedFee=e},error:e=>{this.logger.error(e)}})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,k.sq)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){return this.channelFormGroup.controls.feeRate.value&&this.recommendedFee.minimumFee>this.channelFormGroup.controls.feeRate.value?(this.channelFormGroup.controls.feeRate.setErrors({minimum:!0}),!0):!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||(this.channelConnectionError="",void this.store.dispatch((0,k.vL)({payload:{nodeId:this.newlyAddedPeer?.nodeId,amount:this.channelFormGroup.controls.fundingAmount.value,private:this.channelFormGroup.controls.isPrivate.value,feeRate:this.channelFormGroup.controls.feeRate.value}})))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(e){switch(e.selectedIndex){case 0:default:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 1:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer?.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer?.nodeId):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer?.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer?.nodeId):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}e.selectedIndex<e.previouslySelectedIndex&&(0===e.selectedIndex?this.peerFormGroup.controls.hiddenAddress.setValue(""):1===e.selectedIndex&&this.channelFormGroup.controls.hiddenAmount.setValue(""))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(B.Vh),t.rXU(R.il),t.rXU(d.ze),t.rXU(Q.En),t.rXU(G.gP),t.rXU(et.u))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(i,a){if(1&i&&(t.GBs(So,5),t.GBs(vo,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.form=s.first),t.mGM(s=t.lsd())&&(a.stepper=s.first)}},decls:59,vars:25,consts:[["stepper",""],["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"selectionChange","linear"],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["fxLayout","column","fxFlex","100"],["autoFocus","","matInput","","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-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"],["fxFlex","100","class","alert alert-info",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxLayout","column","fxFlex","35","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxLayout","column","fxFlex","40"],["matInput","","formControlName","feeRate","type","number","name","feeRate","tabindex","7",3,"step","min"],["fxFlex","20","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["mat-button","","color","primary","tabindex","8","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100",1,"alert","alert-info"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"pr-2"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"mat-card-header",3)(3,"div",4)(4,"span",5),t.EFF(5,"Connect to a new peer"),t.k0s()(),t.j41(6,"button",6),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onClose())}),t.EFF(7,"X"),t.k0s()(),t.j41(8,"mat-card-content",7)(9,"div",8)(10,"mat-vertical-stepper",9,0),t.bIt("selectionChange",function(m){return t.eBV(s),t.Njj(a.stepSelectionChanged(m))}),t.j41(12,"mat-step",10)(13,"form",11),t.DNE(14,Ro,1,1,"ng-template",12),t.j41(15,"mat-form-field",13)(16,"mat-label"),t.EFF(17,"Lightning Address (pubkey OR pubkey@ip:port)"),t.k0s(),t.nrm(18,"input",14),t.DNE(19,Io,2,0,"mat-error",15),t.k0s(),t.DNE(20,ko,4,2,"div",16),t.j41(21,"div",17)(22,"button",18),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onConnectPeer())}),t.EFF(23),t.k0s()()()(),t.j41(24,"mat-step",10)(25,"form",19),t.DNE(26,To,1,1,"ng-template",20),t.j41(27,"div",21),t.DNE(28,wo,16,6,"div",22),t.j41(29,"div",23)(30,"mat-form-field",24)(31,"mat-label"),t.EFF(32,"Amount"),t.k0s(),t.nrm(33,"input",25),t.j41(34,"mat-hint"),t.EFF(35),t.nI1(36,"number"),t.k0s(),t.j41(37,"span",26),t.EFF(38," Sats "),t.k0s(),t.DNE(39,jo,2,0,"mat-error",15)(40,Do,2,0,"mat-error",15)(41,Po,2,1,"mat-error",15),t.k0s(),t.j41(42,"mat-form-field",27)(43,"mat-label"),t.EFF(44,"Fee (Sats/vByte)"),t.k0s(),t.nrm(45,"input",28),t.j41(46,"mat-hint"),t.EFF(47),t.k0s(),t.DNE(48,Go,2,1,"mat-error",15),t.k0s(),t.j41(49,"div",29)(50,"mat-slide-toggle",30),t.EFF(51,"Private Channel"),t.k0s()()()(),t.DNE(52,Ao,4,2,"div",16),t.j41(53,"div",17)(54,"button",31),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onOpenChannel())}),t.EFF(55),t.k0s()()()()(),t.j41(56,"div",32)(57,"button",33),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onClose())}),t.EFF(58),t.k0s()()()()()()}2&i&&(t.R7$(10),t.Y8G("linear",!0),t.R7$(2),t.Y8G("stepControl",a.peerFormGroup)("editable",a.flgEditable),t.R7$(),t.Y8G("formGroup",a.peerFormGroup),t.R7$(6),t.Y8G("ngIf",null==a.peerFormGroup.controls.peerAddress.errors?null:a.peerFormGroup.controls.peerAddress.errors.required),t.R7$(),t.Y8G("ngIf",""!==a.peerConnectionError),t.R7$(3),t.JRh(""!==a.peerConnectionError?"Retry":"Add Peer"),t.R7$(),t.Y8G("stepControl",a.channelFormGroup)("editable",a.flgEditable),t.R7$(),t.Y8G("formGroup",a.channelFormGroup),t.R7$(3),t.Y8G("ngIf",a.recommendedFee.minimumFee),t.R7$(5),t.Y8G("step",1e3),t.R7$(2),t.SpI("Remaining: ",t.bMT(36,23,a.totalBalance-(a.channelFormGroup.controls.fundingAmount.value?a.channelFormGroup.controls.fundingAmount.value:0)),""),t.R7$(4),t.Y8G("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.required),t.R7$(),t.Y8G("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.min),t.R7$(),t.Y8G("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.max),t.R7$(4),t.Y8G("step",1)("min",a.recommendedFee.minimumFee||0),t.R7$(2),t.SpI("Mempool Min: ",a.recommendedFee.minimumFee," (Sats/vByte)"),t.R7$(),t.Y8G("ngIf",null==a.channelFormGroup.controls.feeRate.errors?null:a.channelFormGroup.controls.feeRate.errors.minimum),t.R7$(4),t.Y8G("ngIf",""!==a.channelConnectionError),t.R7$(3),t.JRh(""!==a.channelConnectionError?"Retry":"Open Channel"),t.R7$(3),t.JRh(null!=a.newlyAddedPeer&&a.newlyAddedPeer.nodeId?"Do It Later":"Close"))},dependencies:[p.bT,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.VZ,d.j4,d.JD,w.aY,h.DJ,h.sA,h.UI,j.$z,E.m2,E.MM,O.fg,g.rl,g.nJ,g.MV,g.TL,g.yw,jt.sG,tt.V5,tt.Ti,tt.M6,W.N,K.V,p.QX]})}return n})();var Pt=_(5416),Gt=_(9157);const No=n=>({"background-color":n});function Mo(n,o){if(1&n&&(t.j41(0,"span",10)(1,"div"),t.EFF(2),t.nI1(3,"titlecase"),t.k0s()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(2),t.Lme("",i.nodeFeaturesEnum[e.key]||e.key,": ",t.bMT(3,2,e.value),"")}}function Bo(n,o){1&n&&(t.j41(0,"th",24),t.EFF(1,"Address"),t.k0s())}function $o(n,o){if(1&n&&(t.j41(0,"td",25),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(e)}}function Vo(n,o){1&n&&(t.j41(0,"th",26)(1,"div",27),t.EFF(2,"Actions"),t.k0s()())}function Oo(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",28)(1,"div",29)(2,"mat-select",30),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",31),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2);return t.Njj(s.onConnectNode(a))}),t.EFF(5,"Connect"),t.k0s(),t.j41(6,"mat-option",32),t.bIt("copied",function(a){t.eBV(e);const s=t.XpG(2);return t.Njj(s.onCopyNodeURI(a))}),t.EFF(7,"Copy URI"),t.k0s()()()()}if(2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(6),t.Y8G("payload",(null==i.lookupResult?null:i.lookupResult.nodeId)+"@"+e)}}function Ho(n,o){1&n&&t.nrm(0,"tr",33)}function Yo(n,o){1&n&&t.nrm(0,"tr",34)}function Xo(n,o){if(1&n&&(t.j41(0,"div",2),t.nrm(1,"mat-divider",3),t.j41(2,"div",4)(3,"div",5)(4,"h4",6),t.EFF(5,"Alias"),t.k0s(),t.j41(6,"span",7),t.EFF(7),t.j41(8,"span",8),t.EFF(9),t.k0s()()(),t.j41(10,"div",9)(11,"h4",6),t.EFF(12,"Pub Key"),t.k0s(),t.j41(13,"span",10),t.EFF(14),t.k0s()()(),t.nrm(15,"mat-divider",3),t.j41(16,"div",4)(17,"div",5)(18,"h4",6),t.EFF(19,"Date/Time"),t.k0s(),t.j41(20,"span",7),t.EFF(21),t.nI1(22,"date"),t.k0s()(),t.j41(23,"div",9)(24,"h4",6),t.EFF(25,"Features"),t.k0s(),t.DNE(26,Mo,4,4,"span",11),t.nI1(27,"keyvalue"),t.k0s()(),t.nrm(28,"mat-divider",3),t.j41(29,"div",4)(30,"div",12)(31,"h4",6),t.EFF(32,"Signature"),t.k0s(),t.j41(33,"span",7),t.EFF(34),t.k0s()()(),t.nrm(35,"mat-divider",3),t.j41(36,"div",2)(37,"h4",13),t.EFF(38,"Addresses"),t.k0s(),t.j41(39,"div",14)(40,"table",15,0),t.qex(42,16),t.DNE(43,Bo,2,0,"th",17)(44,$o,2,1,"td",18),t.bVm(),t.qex(45,19),t.DNE(46,Vo,3,0,"th",20)(47,Oo,8,1,"td",21),t.bVm(),t.DNE(48,Ho,1,0,"tr",22)(49,Yo,1,0,"tr",23),t.k0s()()()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("inset",!0),t.R7$(6),t.JRh(null==e.lookupResult?null:e.lookupResult.alias),t.R7$(),t.Y8G("ngStyle",t.eq3(19,No,null==e.lookupResult?null:e.lookupResult.rgbColor)),t.R7$(),t.JRh(null!=e.lookupResult&&e.lookupResult.rgbColor?null==e.lookupResult?null:e.lookupResult.rgbColor:""),t.R7$(5),t.JRh(null==e.lookupResult?null:e.lookupResult.nodeId),t.R7$(),t.Y8G("inset",!0),t.R7$(6),t.JRh(t.i5U(22,14,1e3*(null==e.lookupResult?null:e.lookupResult.timestamp),"dd/MMM/y HH:mm")),t.R7$(5),t.Y8G("ngForOf",t.bMT(27,17,null==e.lookupResult?null:e.lookupResult.features.activated)),t.R7$(2),t.Y8G("inset",!0),t.R7$(6),t.JRh(null==e.lookupResult?null:e.lookupResult.signature),t.R7$(),t.Y8G("inset",!0),t.R7$(5),t.Y8G("dataSource",e.addresses),t.R7$(8),t.Y8G("matHeaderRowDef",e.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",e.displayedColumns)}}let Uo=(()=>{class n{constructor(e,i,a){this.logger=e,this.snackBar=i,this.store=a,this.lookupResult={},this.addresses=new c.I6([]),this.displayedColumns=["address","actions"],this.nodeFeaturesEnum=l.Uq,this.information={},this.availableBalance=0,this.unSubs=[new u.B,new u.B,new u.B]}ngOnInit(){this.addresses=new c.I6(this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.information=e}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.availableBalance=e.onchainBalance.total||0})}onConnectNode(e){this.store.dispatch((0,v.xO)({payload:{data:{message:{peer:this.lookupResult.nodeId?{nodeId:this.lookupResult.nodeId,address:e}:null,information:this.information,balance:this.availableBalance},component:Dt}}}))}onCopyNodeURI(e){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+e)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(Pt.UG),t.rXU(R.il))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(i,a){if(1&i&&t.GBs(x.B4,5),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["table",""],["fxLayout","column",4,"ngIf"],["fxLayout","column"],[1,"my-1",3,"inset"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxFlex","70"],[1,"foreground-secondary-text","w-100"],["class","foreground-secondary-text w-100",4,"ngFor","ngForOf"],["fxFlex","100"],["fxFlex","100","fxLayoutAlign","start",1,"font-bold-500","mb-1"],["fxLayout","row","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["matColumnDef","address"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select","btn-action"],["mat-cell","","fxLayoutAlign","end center"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["rtlClipboard","",3,"copied","payload"],["mat-header-row",""],["mat-row",""]],template:function(i,a){1&i&&t.DNE(0,Xo,50,21,"div",1),2&i&&t.Y8G("ngIf",a.lookupResult)},dependencies:[p.Sq,p.bT,p.B3,h.DJ,h.sA,h.UI,L.eI,Z.q,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.KS,c.$R,c.YZ,c.NB,A.Ld,Gt.U,p.PV,p.vh,p.lG]})}return n})();const zo=["form"],Jo=n=>({"mt-1":!0,"mt-2":n});function qo(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI("",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder," is required.")}}function Qo(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI("Invalid ",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder,".")}}function Zo(n,o){if(1&n&&(t.j41(0,"div"),t.nrm(1,"rtl-ecl-node-lookup",25),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Y8G("lookupResult",e.nodeLookupValue)}}function Wo(n,o){if(1&n&&(t.j41(0,"span",23),t.DNE(1,Zo,2,1,"div",24),t.k0s()),2&n){const e=t.XpG(2),i=t.sdS(23);t.R7$(),t.Y8G("ngIf",e.nodeLookupValue.nodeId)("ngIfElse",i)}}function Ko(n,o){1&n&&(t.j41(0,"span"),t.EFF(1,' fxFlex="100"'),t.j41(2,"h3"),t.EFF(3,"Error! Unable to find details!"),t.k0s()())}function ts(n,o){if(1&n&&(t.j41(0,"div",17)(1,"div",18)(2,"span",19),t.EFF(3),t.k0s()(),t.j41(4,"div",20),t.DNE(5,Wo,2,2,"span",21)(6,Ko,4,0,"span",22),t.k0s()()),2&n){const e=t.XpG();t.R7$(3),t.SpI("",e.lookupFields[e.selectedFieldId].name," Details"),t.R7$(),t.Y8G("ngSwitch",e.selectedFieldId),t.R7$(),t.Y8G("ngSwitchCase",0)}}function es(n,o){1&n&&(t.j41(0,"h3"),t.EFF(1,"Error! Unable to find details!"),t.k0s())}let ns=(()=>{class n{constructor(e,i,a,s){this.logger=e,this.commonService=i,this.store=a,this.actions=s,this.lookupKeyCtrl=new d.hs,this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Node ID"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=F.MjD,this.screenSize="",this.screenSizeEnum=l.f7,this.unSubs=[new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){window.history.state&&(window.history.state.lookupType||window.history.state.lookupValue)&&(this.selectedFieldId=+window.history.state.lookupType||0,this.lookupKeyCtrl.setValue(window.history.state.lookupValue||"")),this.actions.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(e=>e.type===l.Uu.SET_LOOKUP_ECL||e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{if(e.type===l.Uu.SET_LOOKUP_ECL){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue=e.payload[0]?JSON.parse(JSON.stringify(e.payload[0])):{nodeid:""};break;case 1:this.channelLookupValue=JSON.parse(JSON.stringify(e.payload))||[]}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}e.type===l.Uu.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.wn.ERROR&&"Lookup"===e.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1})}onLookup(){return this.lookupKeyCtrl.value?this.lookupKeyCtrl.value&&(this.lookupKeyCtrl.value.includes("@")||this.lookupKeyCtrl.value.includes(","))?(this.lookupKeyCtrl.setErrors({invalid:!0}),!0):void(0===(this.selectedFieldId||(this.selectedFieldId=0),this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.selectedFieldId)&&this.store.dispatch((0,k.zU)({payload:this.lookupKeyCtrl.value.trim()}))):(this.lookupKeyCtrl.setErrors({required:!0}),!0)}onSelectChange(e){this.resetData(),this.selectedFieldId=e.value}resetData(){this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.lookupKeyCtrl.setValue(""),this.lookupKeyCtrl.setErrors(null),this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il),t.rXU(Q.En))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-lookups"]],viewQuery:function(i,a){if(1&i&&t.GBs(zo,7),2&i){let s;t.mGM(s=t.lsd())&&(a.form=s.first)}},decls:24,vars:9,consts:[["form","ngForm"],["key",""],["errorBlock",""],["fxLayout","column"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start space-between",1,"w-100"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl"],[4,"ngIf"],["fxLayout","row","fxFlex","100",1,"mt-1"],["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"],["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"],[4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",3)(1,"div",4)(2,"mat-card-content",5)(3,"form",6,0)(5,"div",7)(6,"mat-radio-group",8)(7,"mat-radio-button",9),t.EFF(8,"Node"),t.k0s()()(),t.j41(9,"mat-form-field",10)(10,"mat-label"),t.EFF(11),t.k0s(),t.nrm(12,"input",11,1),t.DNE(14,qo,2,1,"mat-error",12)(15,Qo,2,1,"mat-error",12),t.k0s(),t.j41(16,"div",13)(17,"button",14),t.bIt("click",function(){return t.eBV(s),t.Njj(a.resetData())}),t.EFF(18,"Clear"),t.k0s(),t.j41(19,"button",15),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onLookup())}),t.EFF(20,"Lookup"),t.k0s()()(),t.DNE(21,ts,7,3,"div",16),t.k0s()()(),t.DNE(22,es,2,0,"ng-template",null,2,t.C5r)}2&i&&(t.R7$(7),t.Y8G("value",0),t.R7$(2),t.Y8G("ngClass",t.eq3(7,Jo,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),t.R7$(2),t.JRh((null==a.lookupFields[a.selectedFieldId]?null:a.lookupFields[a.selectedFieldId].placeholder)||"Lookup Key"),t.R7$(),t.Y8G("formControl",a.lookupKeyCtrl),t.R7$(2),t.Y8G("ngIf",null==a.lookupKeyCtrl.errors?null:a.lookupKeyCtrl.errors.required),t.R7$(),t.Y8G("ngIf",null==a.lookupKeyCtrl.errors?null:a.lookupKeyCtrl.errors.invalid),t.R7$(6),t.Y8G("ngIf",a.flgSetLookupValue))},dependencies:[p.YU,p.bT,p.ux,p.e1,p.fG,d.qT,d.me,d.BC,d.cb,d.YS,d.cV,d.l_,h.DJ,h.sA,h.UI,L.PW,j.$z,E.m2,O.fg,g.rl,g.nJ,g.TL,ot.VT,ot._g,Uo],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}"]})}return n})();var is=_(396);let as=(()=>{class n{constructor(e,i){this.store=e,this.eclEffects=i,this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,k.XT)()),this.eclEffects.setNewAddress.pipe((0,q.s)(1)).subscribe(e=>{this.newAddress=e,setTimeout(()=>{this.store.dispatch((0,v.xO)({payload:{data:{address:this.newAddress,addressType:"",component:is.f}}}))},0)})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(R.il),t.rXU(pt.B))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-on-chain-receive"]],decls:4,vars:0,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"]],template:function(i,a){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"button",2),t.bIt("click",function(){return a.onGenerateAddress()}),t.EFF(3,"Generate Address"),t.k0s()()())},dependencies:[h.DJ,h.sA,h.UI,j.$z]})}return n})(),os=(()=>{class n{constructor(e,i){this.store=e,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new u.B,new u.B]}ngOnInit(){this.activatedRoute.data.pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.sweepAll=e.sweepAll})}openSendFundsModal(){this.store.dispatch((0,v.xO)({payload:{data:{sweepAll:this.sweepAll,component:Tt}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(R.il),t.rXU(b.nX))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(i,a){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"button",2),t.bIt("click",function(){return a.openSendFundsModal()}),t.EFF(3),t.k0s()()()),2&i&&(t.R7$(3),t.JRh(a.sweepAll?"Sweep All":"Send Funds"))},dependencies:[h.DJ,h.sA,h.UI,j.$z]})}return n})();var _t=_(9172),At=_(6354),st=_(850),ss=_(92);const ls=["form"];function rs(n,o){if(1&n&&(t.j41(0,"mat-option",36),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e),t.R7$(),t.JRh(e.alias?e.alias:e.nodeId?e.nodeId:"")}}function cs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Peer alias is required."),t.k0s())}function ms(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Peer not found in the list."),t.k0s())}function ps(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-form-field",6)(1,"mat-label"),t.EFF(2,"Peer Alias"),t.k0s(),t.j41(3,"input",33),t.bIt("change",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onSelectedPeerChanged())}),t.k0s(),t.j41(4,"mat-autocomplete",34,4),t.bIt("optionSelected",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onSelectedPeerChanged())}),t.DNE(6,rs,2,2,"mat-option",35),t.nI1(7,"async"),t.k0s(),t.DNE(8,cs,2,0,"mat-error",20)(9,ms,2,0,"mat-error",20),t.k0s()}if(2&n){const e=t.sdS(5),i=t.XpG();t.R7$(3),t.Y8G("formControl",i.selectedPeer)("matAutocomplete",e),t.R7$(),t.Y8G("displayWith",i.displayFn),t.R7$(2),t.Y8G("ngForOf",t.bMT(7,6,i.filteredPeers)),t.R7$(2),t.Y8G("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),t.R7$(),t.Y8G("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function us(n,o){1&n&&t.eu8(0)}function ds(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Amount is required."),t.k0s())}function hs(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI("Amount must be less than or equal to ",e.totalBalance,".")}}function fs(n,o){if(1&n&&(t.j41(0,"div",37),t.nrm(1,"fa-icon",38),t.j41(2,"span",39)(3,"div"),t.EFF(4,"Fee rates recommended by mempool (sat/vByte):"),t.k0s(),t.j41(5,"span",40)(6,"span"),t.EFF(7),t.k0s(),t.j41(8,"span"),t.EFF(9),t.k0s(),t.j41(10,"span"),t.EFF(11),t.k0s(),t.j41(12,"span"),t.EFF(13),t.k0s(),t.j41(14,"span"),t.EFF(15),t.k0s()()()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faInfoCircle),t.R7$(6),t.SpI("- High: ",e.recommendedFee.fastestFee||"Unknown",""),t.R7$(2),t.SpI("- Medium: ",e.recommendedFee.halfHourFee||"Unknown",""),t.R7$(2),t.SpI("- Low: ",e.recommendedFee.hourFee||"Unknown",""),t.R7$(2),t.SpI("- Economy: ",e.recommendedFee.economyFee||"Unknown",""),t.R7$(2),t.SpI("- Minimum: ",e.recommendedFee.minimumFee||"Unknown","")}}function _s(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI("Lower than min feerate ",e.recommendedFee.minimumFee," in the mempool.")}}function gs(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.channelConnectionError)}}function Cs(n,o){if(1&n&&(t.j41(0,"div",41),t.nrm(1,"fa-icon",38),t.DNE(2,gs,2,1,"span",20),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("icon",e.faExclamationTriangle),t.R7$(),t.Y8G("ngIf",""!==e.channelConnectionError)}}function ys(n,o){if(1&n&&(t.j41(0,"mat-expansion-panel",43)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),t.EFF(4,"Peer: \xa0"),t.k0s(),t.j41(5,"strong",44),t.EFF(6),t.k0s()()(),t.j41(7,"div",13)(8,"div",5)(9,"div",6)(10,"h4",45),t.EFF(11,"Pubkey"),t.k0s(),t.j41(12,"span",46),t.EFF(13),t.k0s()()(),t.nrm(14,"mat-divider",47),t.j41(15,"div",5)(16,"div",48)(17,"h4",45),t.EFF(18,"Address"),t.k0s(),t.j41(19,"span",49),t.EFF(20),t.k0s()(),t.j41(21,"div",48)(22,"h4",45),t.EFF(23,"State"),t.k0s(),t.j41(24,"span",49),t.EFF(25),t.nI1(26,"titlecase"),t.k0s()()()()()),2&n){const e=t.XpG(2);t.R7$(6),t.JRh((null==e.peer?null:e.peer.alias)||(null==e.peer?null:e.peer.nodeId)),t.R7$(7),t.JRh(e.peer.nodeId),t.R7$(7),t.JRh(null==e.peer?null:e.peer.address),t.R7$(5),t.JRh(t.bMT(26,4,null==e.peer?null:e.peer.state))}}function bs(n,o){if(1&n&&t.DNE(0,ys,27,6,"mat-expansion-panel",42),2&n){const e=t.XpG();t.Y8G("ngIf",e.peer)}}let Nt=(()=>{class n{constructor(e,i,a,s,r,m){this.logger=e,this.dialogRef=i,this.data=a,this.store=s,this.actions=r,this.dataService=m,this.selectedPeer=new d.hs,this.faExclamationTriangle=F.zpE,this.faInfoCircle=F.iW_,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.recommendedFee={fastestFee:0,halfHourFee:0,hourFee:0},this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.data.message?(this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[]):(this.information={},this.totalBalance=0,this.peer=null,this.peers=[]),this.alertTitle=this.data.alertTitle||"Alert",this.store.select(U._c).pipe((0,f.Q)(this.unSubs[0])).subscribe(a=>{this.selNode=a,this.isPrivate=!!a?.settings.unannouncedChannels}),this.actions.pipe((0,f.Q)(this.unSubs[1]),(0,H.p)(a=>a.type===l.Uu.UPDATE_API_CALL_STATUS_ECL||a.type===l.Uu.FETCH_CHANNELS_ECL)).subscribe(a=>{a.type===l.Uu.UPDATE_API_CALL_STATUS_ECL&&a.payload.status===l.wn.ERROR&&"SaveNewChannel"===a.payload.action&&(this.channelConnectionError=a.payload.message),a.type===l.Uu.FETCH_CHANNELS_ECL&&this.dialogRef.close()});let e="",i="";this.sortedPeers=this.peers.sort((a,s)=>(e=a.alias?a.alias.toLowerCase():a.nodeId?a.nodeId.toLowerCase():"",i=s.alias?s.alias.toLowerCase():a.nodeId?a.nodeId.toLowerCase():"",e<i?-1:e>i?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,f.Q)(this.unSubs[2]),(0,_t.Z)(""),(0,At.T)(a=>"string"==typeof a?a:a.alias?a.alias:a.nodeId),(0,At.T)(a=>a?this.filterPeers(a):this.sortedPeers.slice()))}filterPeers(e){return this.sortedPeers?.filter(i=>0===i.alias?.toLowerCase().indexOf(e?e.toLowerCase():""))}displayFn(e){return e&&e.alias?e.alias:e&&e.nodeId?e.nodeId:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.nodeId?this.selectedPeer.value.nodeId:null,"string"==typeof this.selectedPeer.value){const e=this.peers?.filter(i=>i.alias?.length===this.selectedPeer.value.length&&0===i.alias?.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===e.length&&e[0].nodeId&&(this.selectedPubkey=e[0].nodeId)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.feeRate=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!!this.selNode?.settings.unannouncedChannels,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(e){this.advancedTitle="Advanced Options",e?this.feeRate&&this.feeRate>0&&(this.advancedTitle=this.advancedTitle+" | Fee (Sats/vByte): "+this.feeRate):this.dataService.getRecommendedFeeRates().pipe((0,f.Q)(this.unSubs[3])).subscribe({next:i=>{this.recommendedFee=i},error:i=>{this.logger.error(i)}})}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.feeRate&&this.recommendedFee.minimumFee>this.feeRate)return!0;const e={nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate};this.feeRate&&(e.feeRate=this.feeRate),this.store.dispatch((0,k.vL)({payload:e}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(B.CP),t.rXU(B.Vh),t.rXU(R.il),t.rXU(Q.En),t.rXU(et.u))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(i,a){if(1&i&&t.GBs(ls,7),2&i){let s;t.mGM(s=t.lsd())&&(a.form=s.first)}},decls:56,vars:21,consts:[["form","ngForm"],["amount","ngModel"],["fee","ngModel"],["peerDetailsExpansionBlock",""],["auto","matAutocomplete"],["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","11","fxFlex","5","fxLayoutAlign","center center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxLayout","column","fxFlex","70","fxLayoutAlign","start end"],["matInput","","type","number","tabindex","1","required","","name","amount",3,"ngModelChange","step","min","max","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModelChange","ngModel"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-info",4,"ngIf"],["fxFlex","100","fxLayout","row","fxLayoutAlign","space-between center"],["fxLayout","column","fxFlex","49"],["matInput","","type","number","name","fee","tabindex","7",3,"ngModelChange","step","min","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","9","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","10"],["type","text","aria-label","Peers","matInput","","tabindex","1","required","",3,"change","formControl","matAutocomplete"],[3,"optionSelected","displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"pr-2"],["fxFlex","100",1,"alert","alert-danger","mt-1"],["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(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",5)(1,"div",6)(2,"mat-card-header",7)(3,"div",8)(4,"span",9),t.EFF(5),t.k0s()(),t.j41(6,"button",10),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onClose())}),t.EFF(7,"X"),t.k0s()(),t.j41(8,"mat-card-content",11)(9,"form",12,0),t.bIt("submit",function(){return t.eBV(s),t.Njj(a.onOpenChannel())})("reset",function(){return t.eBV(s),t.Njj(a.resetData())}),t.j41(11,"div",13),t.DNE(12,ps,10,8,"mat-form-field",14),t.k0s(),t.DNE(13,us,1,0,"ng-container",15),t.j41(14,"div",13)(15,"div",16)(16,"mat-form-field",17)(17,"mat-label"),t.EFF(18,"Amount"),t.k0s(),t.j41(19,"input",18,1),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.fundingAmount,m)||(a.fundingAmount=m),t.Njj(m)}),t.k0s(),t.j41(21,"mat-hint"),t.EFF(22),t.nI1(23,"number"),t.k0s(),t.j41(24,"span",19),t.EFF(25,"Sats "),t.k0s(),t.DNE(26,ds,2,0,"mat-error",20)(27,hs,2,1,"mat-error",20),t.k0s(),t.j41(28,"div",21)(29,"mat-slide-toggle",22),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.isPrivate,m)||(a.isPrivate=m),t.Njj(m)}),t.EFF(30,"Private Channel"),t.k0s()()(),t.j41(31,"mat-expansion-panel",23),t.bIt("closed",function(){return t.eBV(s),t.Njj(a.onAdvancedPanelToggle(!0))})("opened",function(){return t.eBV(s),t.Njj(a.onAdvancedPanelToggle(!1))}),t.j41(32,"mat-expansion-panel-header")(33,"mat-panel-title")(34,"span"),t.EFF(35),t.k0s()()(),t.j41(36,"div",24),t.DNE(37,fs,16,6,"div",25),t.j41(38,"div",16)(39,"div",26)(40,"mat-form-field",27)(41,"mat-label"),t.EFF(42,"Fee (Sats/vByte)"),t.k0s(),t.j41(43,"input",28,2),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.feeRate,m)||(a.feeRate=m),t.Njj(m)}),t.k0s(),t.j41(45,"mat-hint"),t.EFF(46),t.k0s(),t.DNE(47,_s,2,1,"mat-error",20),t.k0s()()()()()(),t.DNE(48,Cs,3,2,"div",29),t.j41(49,"div",30)(50,"button",31),t.EFF(51,"Clear Fields"),t.k0s(),t.j41(52,"button",32),t.EFF(53,"Open Channel"),t.k0s()()()()()(),t.DNE(54,bs,1,1,"ng-template",null,3,t.C5r)}if(2&i){const s=t.sdS(20),r=t.sdS(55);t.R7$(5),t.JRh(a.alertTitle),t.R7$(7),t.Y8G("ngIf",!a.peer&&a.peers&&a.peers.length>0),t.R7$(),t.Y8G("ngTemplateOutlet",r),t.R7$(6),t.Y8G("step",1e3)("min",1)("max",a.totalBalance),t.R50("ngModel",a.fundingAmount),t.R7$(3),t.SpI("Remaining: ",t.bMT(23,19,a.totalBalance-(a.fundingAmount?a.fundingAmount:0)),""),t.R7$(4),t.Y8G("ngIf",null==s.errors?null:s.errors.required),t.R7$(),t.Y8G("ngIf",null==s.errors?null:s.errors.max),t.R7$(2),t.R50("ngModel",a.isPrivate),t.R7$(6),t.JRh(a.advancedTitle),t.R7$(2),t.Y8G("ngIf",a.recommendedFee.minimumFee),t.R7$(6),t.Y8G("step",1)("min",a.recommendedFee.minimumFee),t.R50("ngModel",a.feeRate),t.R7$(3),t.SpI("Mempool Min: ",a.recommendedFee.minimumFee," (Sats/vByte)"),t.R7$(),t.Y8G("ngIf",a.feeRate&&a.feeRate<a.recommendedFee.minimumFee),t.R7$(),t.Y8G("ngIf",""!==a.channelConnectionError)}},dependencies:[p.Sq,p.bT,p.T3,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.VZ,d.zX,d.vS,d.cV,d.l_,w.aY,h.DJ,h.sA,h.UI,j.$z,E.m2,E.MM,Y.GK,Y.Z2,Y.WN,O.fg,g.rl,g.nJ,g.MV,g.TL,g.yw,Z.q,X.wT,jt.sG,st.$3,st.pN,W.N,ss.z,K.V,p.Jj,p.QX,p.PV],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]})}return n})();function Fs(n,o){if(1&n&&(t.j41(0,"span",7),t.EFF(1,"Open"),t.k0s()),2&n){const e=t.XpG();t.FS9("matBadge",e.numOfOpenChannels)}}function Es(n,o){if(1&n&&(t.j41(0,"span",7),t.EFF(1,"Pending"),t.k0s()),2&n){const e=t.XpG();t.FS9("matBadge",e.numOfPendingChannels)}}function xs(n,o){if(1&n&&(t.j41(0,"span",7),t.EFF(1,"Inactive"),t.k0s()),2&n){const e=t.XpG();t.FS9("matBadge",e.numOfInactiveChannels)}}let Ls=(()=>{class n{constructor(e,i,a){this.logger=e,this.store=i,this.router=a,this.numOfOpenChannels=0,this.numOfPendingChannels=0,this.numOfInactiveChannels=0,this.information={},this.peers=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"inactive",name:"Inactive"}],this.activeLink=0,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(e=>e instanceof b.gx)).subscribe({next:e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.numOfOpenChannels=e.channelsStatus&&e.channelsStatus.active&&e.channelsStatus.active.channels?e.channelsStatus.active.channels:0,this.numOfPendingChannels=e.channelsStatus&&e.channelsStatus.pending&&e.channelsStatus.pending.channels?e.channelsStatus.pending.channels:0,this.numOfInactiveChannels=e.channelsStatus&&e.channelsStatus.inactive&&e.channelsStatus.inactive.channels?e.channelsStatus.inactive.channels:0,this.logger.info(e)}),this.store.select(U._c).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.selNode=e}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.information=e}),this.store.select(C.os).pipe((0,f.Q)(this.unSubs[4])).subscribe(e=>{this.peers=e.peers}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total||0})}onOpenChannel(){this.store.dispatch((0,v.xO)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:Nt}}}))}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channels-tables"]],decls:14,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"bordered-box"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange","selectedTabChange","selectedIndex"],["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(i,a){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"button",2),t.bIt("click",function(){return a.onOpenChannel()}),t.EFF(3,"Open Channel"),t.k0s()(),t.j41(4,"div",3)(5,"mat-tab-group",4),t.mxI("selectedIndexChange",function(r){return t.DH7(a.activeLink,r)||(a.activeLink=r),r}),t.bIt("selectedTabChange",function(r){return a.onSelectedTabChange(r)}),t.j41(6,"mat-tab"),t.DNE(7,Fs,2,1,"ng-template",5),t.k0s(),t.j41(8,"mat-tab"),t.DNE(9,Es,2,1,"ng-template",5),t.k0s(),t.j41(10,"mat-tab"),t.DNE(11,xs,2,1,"ng-template",5),t.k0s()(),t.j41(12,"div",6),t.nrm(13,"router-outlet"),t.k0s()()()),2&i&&(t.R7$(5),t.R50("selectedIndex",a.activeLink))},dependencies:[h.DJ,h.sA,h.UI,j.$z,wt.k,D.ES,D.mq,D.T8,b.n3]})}return n})();const Ss=n=>({"xs-scroll-y":n}),vs=(n,o)=>({"mt-2":n,"mt-1":o});function Rs(n,o){if(1&n&&(t.j41(0,"div",12)(1,"h4",13),t.EFF(2,"Short Channel ID"),t.k0s(),t.j41(3,"span",14),t.EFF(4),t.k0s()()),2&n){const e=t.XpG();t.R7$(4),t.JRh(e.channel.shortChannelId)}}function Is(n,o){if(1&n&&(t.j41(0,"div",12)(1,"h4",13),t.EFF(2,"State"),t.k0s(),t.j41(3,"span",17),t.EFF(4),t.nI1(5,"titlecase"),t.k0s()()),2&n){const e=t.XpG();t.R7$(4),t.JRh(t.bMT(5,1,e.channel.state))}}function ks(n,o){if(1&n&&(t.j41(0,"div")(1,"div",10)(2,"div",12)(3,"h4",13),t.EFF(4,"Local Balance (Sats)"),t.k0s(),t.j41(5,"span",17),t.EFF(6),t.nI1(7,"number"),t.k0s()(),t.j41(8,"div",12)(9,"h4",13),t.EFF(10,"Remote Balance (Sats)"),t.k0s(),t.j41(11,"span",17),t.EFF(12),t.nI1(13,"number"),t.k0s()()(),t.nrm(14,"mat-divider",15),t.j41(15,"div",10)(16,"div",12)(17,"h4",13),t.EFF(18,"Base Fee (mSats)"),t.k0s(),t.j41(19,"span",17),t.EFF(20),t.nI1(21,"number"),t.k0s()(),t.j41(22,"div",12)(23,"h4",13),t.EFF(24,"Fee Rate (mili mSats)"),t.k0s(),t.j41(25,"span",17),t.EFF(26),t.nI1(27,"number"),t.k0s()()(),t.nrm(28,"mat-divider",15),t.k0s()),2&n){const e=t.XpG();t.R7$(6),t.JRh(t.bMT(7,6,e.channel.toLocal)),t.R7$(6),t.JRh(t.bMT(13,8,e.channel.toRemote)),t.R7$(2),t.Y8G("inset",!0),t.R7$(6),t.JRh(t.bMT(21,10,e.channel.feeBaseMsat)),t.R7$(6),t.JRh(t.bMT(27,12,e.channel.feeProportionalMillionths)),t.R7$(2),t.Y8G("inset",!0)}}function Ts(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Show Advanced"),t.k0s())}function ws(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Hide Advanced"),t.k0s())}function js(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",23),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onShowAdvanced())}),t.DNE(1,Ts,2,0,"p",24)(2,ws,2,0,"ng-template",null,0,t.C5r),t.k0s()}if(2&n){const e=t.sdS(3),i=t.XpG();t.R7$(),t.Y8G("ngIf",!i.showAdvanced)("ngIfElse",e)}}function Ds(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",25),t.bIt("copied",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onCopyChanID(a))}),t.EFF(1,"Copy Short Channel ID"),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("payload",e.channel.shortChannelId)}}function Ps(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",26),t.bIt("copied",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onCopyChanID(a))}),t.EFF(1,"Copy Channel ID"),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("payload",e.channel.channelId)}}let gt=(()=>{class n{constructor(e,i,a,s,r,m){this.dialogRef=e,this.data=i,this.logger=a,this.commonService=s,this.snackBar=r,this.router=m,this.faReceipt=F.Mf0,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=l.f7}ngOnInit(){this.channel=this.data.channel,this.channelsType=this.data.channelsType||"",this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(e){this.snackBar.open("open"===this.channelsType?"Short channel ID "+e+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+e)}onGoToLink(e,i){this.router.navigateByUrl("/ecl/graph/lookups",{state:{lookupType:e,lookupValue:i}}),this.onClose()}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(B.Vh),t.rXU(G.gP),t.rXU(M.h),t.rXU(Pt.UG),t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-information"]],decls:59,vars:27,consts:[["hideAdvancedText",""],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50",4,"ngIf"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["tabindex","1","matTooltip","Go To Graph Lookup",1,"foreground-secondary-text","go-to-link",3,"click"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","2","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","4","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-button","","color","primary","type","reset","tabindex","2",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"copied","payload"],["autoFocus","","mat-button","","color","primary","tabindex","4","type","submit","rtlClipboard","",3,"copied","payload"]],template:function(i,a){1&i&&(t.j41(0,"div",1)(1,"div",2)(2,"mat-card-header",3)(3,"div",4),t.nrm(4,"fa-icon",5),t.j41(5,"span",6),t.EFF(6,"Channel Information"),t.k0s()(),t.j41(7,"button",7),t.bIt("click",function(){return a.onClose()}),t.EFF(8,"X"),t.k0s()(),t.j41(9,"mat-card-content",8)(10,"div",9)(11,"div",10),t.DNE(12,Rs,5,1,"div",11),t.j41(13,"div",12)(14,"h4",13),t.EFF(15,"Peer Alias"),t.k0s(),t.j41(16,"span",14),t.EFF(17),t.k0s()(),t.DNE(18,Is,6,3,"div",11),t.k0s(),t.nrm(19,"mat-divider",15),t.j41(20,"div",10)(21,"div",2)(22,"h4",13),t.EFF(23,"Channel ID"),t.k0s(),t.j41(24,"span",14),t.EFF(25),t.k0s()()(),t.nrm(26,"mat-divider",15),t.j41(27,"div",10)(28,"div",2)(29,"h4",13),t.EFF(30,"Peer Public Key"),t.k0s(),t.j41(31,"span",16),t.bIt("click",function(){return a.onGoToLink("0",a.channel.nodeId)}),t.EFF(32),t.k0s()()(),t.nrm(33,"mat-divider",15),t.j41(34,"div",10)(35,"div",2)(36,"h4",13),t.EFF(37,"State"),t.k0s(),t.j41(38,"span",17),t.EFF(39),t.nI1(40,"titlecase"),t.k0s()()(),t.nrm(41,"mat-divider",15),t.j41(42,"div",10)(43,"div",12)(44,"h4",13),t.EFF(45,"Private"),t.k0s(),t.j41(46,"span",17),t.EFF(47),t.k0s()(),t.j41(48,"div",12)(49,"h4",13),t.EFF(50,"Initiator"),t.k0s(),t.j41(51,"span",17),t.EFF(52),t.k0s()()(),t.nrm(53,"mat-divider",15),t.DNE(54,ks,29,14,"div",18),t.j41(55,"div",19),t.DNE(56,js,4,2,"button",20)(57,Ds,2,1,"button",21)(58,Ps,2,1,"button",22),t.k0s()()()()()),2&i&&(t.R7$(4),t.Y8G("icon",a.faReceipt),t.R7$(5),t.Y8G("ngClass",t.eq3(22,Ss,a.screenSize===a.screenSizeEnum.XS)),t.R7$(3),t.Y8G("ngIf","open"===a.channelsType),t.R7$(5),t.JRh(a.channel.alias),t.R7$(),t.Y8G("ngIf","open"!==a.channelsType),t.R7$(),t.Y8G("inset",!0),t.R7$(6),t.JRh(a.channel.channelId),t.R7$(),t.Y8G("inset",!0),t.R7$(6),t.SpI(" ",a.channel.nodeId," "),t.R7$(),t.Y8G("inset",!0),t.R7$(6),t.JRh(t.bMT(40,20,a.channel.state)),t.R7$(2),t.Y8G("inset",!0),t.R7$(6),t.JRh(a.channel.announceChannel?"No":"Yes"),t.R7$(5),t.JRh(a.channel.isInitiator?"Yes":"No"),t.R7$(),t.Y8G("inset",!0),t.R7$(),t.Y8G("ngIf",a.showAdvanced&&"open"===a.channelsType),t.R7$(),t.Y8G("ngClass",t.l_i(24,vs,!a.showAdvanced,a.showAdvanced)),t.R7$(),t.Y8G("ngIf","open"===a.channelsType),t.R7$(),t.Y8G("ngIf","open"===a.channelsType),t.R7$(),t.Y8G("ngIf","open"!==a.channelsType))},dependencies:[p.YU,p.bT,w.aY,h.DJ,h.sA,h.UI,L.PW,j.$z,E.m2,E.MM,Z.q,J.oV,Gt.U,W.N,p.QX,p.PV]})}return n})();var Ct=_(7673),yt=_(1001),Gs=_(6949);const nt=(n,o)=>({"small-svg":n,"large-svg":o});function As(n,o){1&n&&t.eu8(0)}function Ns(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",6),t.bIt("swipe",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onSwipe(a))}),t.qSk(),t.j41(1,"svg",7),t.nrm(2,"path",8)(3,"path",9)(4,"path",10)(5,"path",11)(6,"path",12)(7,"path",13)(8,"path",14)(9,"path",15)(10,"path",16)(11,"path",17)(12,"path",18)(13,"path",19)(14,"path",20)(15,"path",21)(16,"path",22)(17,"path",23)(18,"path",24)(19,"path",25)(20,"path",26)(21,"path",27)(22,"path",28)(23,"path",29)(24,"path",30)(25,"path",31)(26,"path",32)(27,"path",33)(28,"path",34)(29,"path",35)(30,"path",36)(31,"path",37)(32,"path",38)(33,"path",39)(34,"path",40)(35,"path",41)(36,"path",42)(37,"path",43)(38,"path",44)(39,"path",45)(40,"path",46),t.k0s(),t.joV(),t.j41(41,"div",47)(42,"mat-card-title"),t.EFF(43,"Circular rebalancing explained."),t.k0s()(),t.j41(44,"div",48)(45,"mat-card-subtitle",49),t.EFF(46," Circular payments are a completely off-chain rebalancing strategy where a node makes a payment to itself across a circular path of chained payment channels. "),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("@sliderAnimation",e.animationDirection),t.R7$(),t.Y8G("ngClass",t.l_i(2,nt,e.screenSize===e.screenSizeEnum.XS,e.screenSize!==e.screenSizeEnum.XS))}}function Ms(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",50),t.bIt("swipe",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onSwipe(a))}),t.qSk(),t.j41(1,"svg",51),t.nrm(2,"path",52)(3,"path",53)(4,"path",54)(5,"path",55)(6,"path",56)(7,"path",57)(8,"path",58)(9,"path",59)(10,"path",60)(11,"path",61)(12,"path",62)(13,"path",63)(14,"path",64)(15,"path",65)(16,"path",66)(17,"path",67)(18,"path",68)(19,"path",69)(20,"path",70)(21,"path",71)(22,"path",72)(23,"path",73)(24,"path",74)(25,"path",75)(26,"path",76)(27,"path",77)(28,"path",78)(29,"path",79)(30,"path",80)(31,"path",81)(32,"path",82)(33,"path",52)(34,"path",53)(35,"path",54)(36,"path",55)(37,"path",56)(38,"path",57)(39,"path",58)(40,"path",59)(41,"path",60)(42,"path",83)(43,"path",84)(44,"path",63)(45,"path",85)(46,"path",86)(47,"path",87)(48,"path",67)(49,"path",68)(50,"path",69)(51,"path",70)(52,"path",71)(53,"path",72)(54,"path",73)(55,"path",74)(56,"path",75)(57,"path",76)(58,"path",77)(59,"path",78)(60,"path",79)(61,"path",80)(62,"path",88)(63,"path",82)(64,"path",89),t.j41(65,"defs")(66,"linearGradient",90),t.nrm(67,"stop",91)(68,"stop",92)(69,"stop",93),t.k0s(),t.j41(70,"linearGradient",94),t.nrm(71,"stop",91)(72,"stop",92)(73,"stop",93),t.k0s(),t.j41(74,"linearGradient",95),t.nrm(75,"stop",91)(76,"stop",92)(77,"stop",93),t.k0s(),t.j41(78,"linearGradient",96),t.nrm(79,"stop",91)(80,"stop",92)(81,"stop",93),t.k0s(),t.j41(82,"linearGradient",97),t.nrm(83,"stop",91)(84,"stop",92)(85,"stop",93),t.k0s(),t.j41(86,"linearGradient",98),t.nrm(87,"stop",91)(88,"stop",92)(89,"stop",93),t.k0s()()(),t.joV(),t.j41(90,"div",47)(91,"mat-card-title"),t.EFF(92,"Step 1: Unbalanced channel"),t.k0s()(),t.j41(93,"div",48)(94,"mat-card-subtitle",49),t.EFF(95," It starts with an unbalanced channel, that needs to be rebalanced in order to continue to route payments. "),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("@sliderAnimation",e.animationDirection),t.R7$(),t.Y8G("ngClass",t.l_i(2,nt,e.screenSize===e.screenSizeEnum.XS,e.screenSize!==e.screenSizeEnum.XS))}}function Bs(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",50),t.bIt("swipe",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onSwipe(a))}),t.qSk(),t.j41(1,"svg",99),t.nrm(2,"path",100)(3,"path",101)(4,"path",102)(5,"path",103)(6,"path",104)(7,"path",105)(8,"path",106)(9,"path",107)(10,"path",108)(11,"path",109)(12,"path",110)(13,"path",111)(14,"path",112)(15,"path",113)(16,"path",114)(17,"path",52)(18,"path",115)(19,"path",116)(20,"path",117)(21,"path",118)(22,"path",119)(23,"path",120)(24,"path",121)(25,"path",122)(26,"path",83)(27,"path",84)(28,"path",123)(29,"path",124)(30,"path",125)(31,"path",126)(32,"path",67)(33,"path",127)(34,"path",128)(35,"path",129)(36,"path",130)(37,"path",131)(38,"path",132)(39,"path",74)(40,"path",75)(41,"path",133)(42,"path",77)(43,"path",78)(44,"path",79)(45,"path",80)(46,"path",134)(47,"path",135)(48,"path",136),t.j41(49,"defs")(50,"linearGradient",137),t.nrm(51,"stop",91)(52,"stop",92)(53,"stop",93),t.k0s(),t.j41(54,"linearGradient",138),t.nrm(55,"stop",91)(56,"stop",92)(57,"stop",93),t.k0s(),t.j41(58,"linearGradient",139),t.nrm(59,"stop",91)(60,"stop",92)(61,"stop",93),t.k0s()()(),t.joV(),t.j41(62,"div",47)(63,"mat-card-title"),t.EFF(64,"Step 2: Invoice/Payment"),t.k0s()(),t.j41(65,"div",48)(66,"mat-card-subtitle",49),t.EFF(67," All you have to do is make a payment to yourself in a favorable direction by generating and paying an invoice. This is taken care automatically by your node. "),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("@sliderAnimation",e.animationDirection),t.R7$(),t.Y8G("ngClass",t.l_i(2,nt,e.screenSize===e.screenSizeEnum.XS,e.screenSize!==e.screenSizeEnum.XS))}}function $s(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",50),t.bIt("swipe",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onSwipe(a))}),t.qSk(),t.j41(1,"svg",140),t.nrm(2,"path",141)(3,"path",142)(4,"path",143)(5,"path",144)(6,"path",145)(7,"path",146)(8,"path",147)(9,"path",148)(10,"path",149)(11,"path",150)(12,"path",151)(13,"path",152)(14,"path",153)(15,"path",154)(16,"path",155)(17,"path",156)(18,"path",157)(19,"path",158)(20,"path",159)(21,"path",160)(22,"path",161)(23,"path",162)(24,"path",163)(25,"path",164)(26,"path",163)(27,"path",165)(28,"path",166)(29,"path",167)(30,"path",168)(31,"path",169)(32,"path",170)(33,"path",171)(34,"path",172)(35,"path",173)(36,"path",174)(37,"path",175)(38,"path",176)(39,"path",177)(40,"path",178)(41,"path",179),t.j41(42,"defs")(43,"linearGradient",180),t.nrm(44,"stop",91)(45,"stop",92)(46,"stop",93),t.k0s()()(),t.joV(),t.j41(47,"div",47)(48,"mat-card-title"),t.EFF(49,"Step 3: Rebalance amount"),t.k0s()(),t.j41(50,"div",48)(51,"mat-card-subtitle",49),t.EFF(52," You will be moving part or all of the local balance to the remote side. For the route to be circular, there should be at least 3 nodes involved. "),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("@sliderAnimation",e.animationDirection),t.R7$(),t.Y8G("ngClass",t.l_i(2,nt,e.screenSize===e.screenSizeEnum.XS,e.screenSize!==e.screenSizeEnum.XS))}}function Vs(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",50),t.bIt("swipe",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onSwipe(a))}),t.qSk(),t.j41(1,"svg",140),t.nrm(2,"path",181)(3,"path",143)(4,"path",182)(5,"path",145)(6,"path",146)(7,"path",183)(8,"path",148)(9,"path",184)(10,"path",185)(11,"path",186)(12,"path",187)(13,"path",188)(14,"path",189)(15,"path",190)(16,"path",191)(17,"path",192)(18,"path",158)(19,"path",193)(20,"path",194)(21,"path",179)(22,"path",160)(23,"path",161)(24,"path",195)(25,"path",163)(26,"path",164)(27,"path",163)(28,"path",165)(29,"path",166)(30,"path",167)(31,"path",168)(32,"path",196)(33,"path",170)(34,"path",197)(35,"path",172)(36,"path",173)(37,"path",174)(38,"path",175)(39,"path",176)(40,"path",198),t.j41(41,"defs")(42,"linearGradient",199),t.nrm(43,"stop",91)(44,"stop",92)(45,"stop",93),t.k0s()()(),t.joV(),t.j41(46,"div",47)(47,"mat-card-title"),t.EFF(48,"Rebalance successful!"),t.k0s()(),t.j41(49,"div",48)(50,"mat-card-subtitle",49),t.EFF(51," Your channel is successfully rebalanced and is able to continue to route payments. "),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("@sliderAnimation",e.animationDirection),t.R7$(),t.Y8G("ngClass",t.l_i(2,nt,e.screenSize===e.screenSizeEnum.XS,e.screenSize!==e.screenSizeEnum.XS))}}let Os=(()=>{class n{constructor(e){this.commonService=e,this.animationDirection="forward",this.stepNumber=1,this.stepNumberChange=new t.bkB,this.screenSize="",this.screenSizeEnum=l.f7}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}onSwipe(e){2===e.direction&&this.stepNumber<5?(this.stepNumber++,this.animationDirection="forward",this.stepNumberChange.emit(this.stepNumber)):4===e.direction&&this.stepNumber>1&&(this.stepNumber--,this.animationDirection="backward",this.stepNumberChange.emit(this.stepNumber))}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(M.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-rebalance-infographics"]],inputs:{animationDirection:"animationDirection",stepNumber:"stepNumber"},outputs:{stepNumberChange:"stepNumberChange"},decls:11,vars:1,consts:[["infoStepBlock1",""],["infoStepBlock2",""],["infoStepBlock3",""],["infoStepBlock4",""],["infoStepBlock5",""],[4,"ngTemplateOutlet"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between starts",3,"swipe"],["fxFlex","30","viewBox","0 0 246 154","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/2000/svg",3,"ngClass"],["fill-rule","evenodd","clip-rule","evenodd","d","M187.8 136C203.043 136 215.4 133.493 215.4 130.4C215.4 127.307 203.043 124.8 187.8 124.8C172.557 124.8 160.2 127.307 160.2 130.4C160.2 133.493 172.557 136 187.8 136Z","stroke-width","0.8","stroke-dasharray","4 4",1,"fill-color-1","stroke-color-primary"],["fill-rule","evenodd","clip-rule","evenodd","d","M128.6 148.8C143.843 148.8 156.2 146.293 156.2 143.2C156.2 140.107 143.843 137.6 128.6 137.6C113.357 137.6 101 140.107 101 143.2C101 146.293 113.357 148.8 128.6 148.8Z","stroke-width","0.8","stroke-dasharray","4 4",1,"fill-color-1","stroke-color-primary"],["opacity","0.1","d","M100.2 117.421C100.2 117.421 99.0633 117.494 99.4998 117.722C99.9363 117.95 100.2 117.421 100.2 117.421Z","fill","black"],["opacity","0.1","d","M101 118.4C100.986 118.471 98.1102 119.483 98.673 119.933C99.2358 120.384 101 118.4 101 118.4Z","fill","black"],["opacity","0.1","d","M97.8 128.98C98.0492 128.966 100.509 128.241 101 128.89L97.8 128.98Z","fill","black"],["opacity","0.1","d","M100.2 129.709C100.2 129.709 100.563 129.362 100.926 129.543C101.289 129.725 100.2 129.709 100.2 129.709Z","fill","black"],["opacity","0.1","d","M101.8 132C101.8 132 101.641 133.198 101 133.6L101.8 132Z","fill","black"],["d","M119.223 21.4239L123.102 22.0818L118.209 50.9111L114.33 50.2532L119.223 21.4239Z",1,"fill-color-primary-darker"],["d","M127.4 137.844L128.262 144L129 137.6L127.4 137.844Z",1,"fill-color-29"],["d","M100.2 134.349V138.226L101 141.6H101.571L102.258 137.976L102.6 133.6L100.2 134.349Z",1,"fill-color-28"],["d","M110.75 50.4L104.806 87.6521C104.806 87.6521 96.0162 127.358 99.3581 135.2H103.57L116.2 58.9791L110.75 50.4Z",1,"fill-color-29"],["d","M125.308 45.6L129.979 83.02C129.979 83.02 133.381 130.691 129.656 138.4H125.976L119.4 53.9698L125.308 45.6Z",1,"fill-color-29"],["d","M110.017 36.2213C110.634 34.1443 112.565 32.7417 114.724 32.8019C118.318 32.893 123.873 33.5496 126.77 36.5268C131.261 41.1521 123.736 56.731 123.736 56.731C123.736 56.731 116.69 69.7545 110.267 53.2022C110.258 53.2159 107.595 44.3527 110.017 36.2213Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M110.017 36.2213C110.634 34.1443 112.565 32.7417 114.724 32.8019C118.318 32.893 123.873 33.5496 126.77 36.5268C131.261 41.1521 123.736 56.731 123.736 56.731C123.736 56.731 116.69 69.7545 110.267 53.2022C110.258 53.2159 107.595 44.3527 110.017 36.2213Z","fill","black"],["d","M112.922 39.2661C113.364 37.7699 114.731 36.7605 116.259 36.8012C118.804 36.8682 122.74 37.3423 124.787 39.4927C127.969 42.8316 122.638 54.0832 122.638 54.0832C122.638 54.0832 117.661 63.4872 113.092 51.5396C113.092 51.5327 111.203 45.1393 112.922 39.2661Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M131.383 131.52C131.69 131.628 131.968 131.791 132.2 132C131.813 131.613 130.708 131.42 130.166 131.24C129.495 131.019 128.764 130.793 128.2 130.4C129.29 130.705 130.354 131.079 131.383 131.52Z","fill","black"],["opacity","0.1","d","M94.2 24.8C96.1882 24.8 97.8 23.1882 97.8 21.2C97.8 19.2118 96.1882 17.6 94.2 17.6C92.2117 17.6 90.6 19.2118 90.6 21.2C90.6 23.1882 92.2117 24.8 94.2 24.8Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M107 12C110.314 12 113 9.31371 113 6C113 2.68629 110.314 0 107 0C103.686 0 101 2.68629 101 6C101 9.31371 103.686 12 107 12Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M99 40.8C102.314 40.8 105 38.1137 105 34.8C105 31.4863 102.314 28.8 99 28.8C95.6863 28.8 93 31.4863 93 34.8C93 38.1137 95.6863 40.8 99 40.8Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M223 67.2C224.988 67.2 226.6 65.5882 226.6 63.6C226.6 61.6118 224.988 60 223 60C221.012 60 219.4 61.6118 219.4 63.6C219.4 65.5882 221.012 67.2 223 67.2Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M210.2 54.4C213.514 54.4 216.2 51.7137 216.2 48.4C216.2 45.0863 213.514 42.4 210.2 42.4C206.886 42.4 204.2 45.0863 204.2 48.4C204.2 51.7137 206.886 54.4 210.2 54.4Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M218.2 83.2C221.514 83.2 224.2 80.5137 224.2 77.2C224.2 73.8863 221.514 71.2 218.2 71.2C214.886 71.2 212.2 73.8863 212.2 77.2C212.2 80.5137 214.886 83.2 218.2 83.2Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M23.8 72C24.9046 72 25.8 71.1046 25.8 70C25.8 68.8954 24.9046 68 23.8 68C22.6954 68 21.8 68.8954 21.8 70C21.8 71.1046 22.6954 72 23.8 72Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M33 65.6C34.7673 65.6 36.2 64.1673 36.2 62.4C36.2 60.6327 34.7673 59.2 33 59.2C31.2327 59.2 29.8 60.6327 29.8 62.4C29.8 64.1673 31.2327 65.6 33 65.6Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M17 71.2C18.7673 71.2 20.2 69.7673 20.2 68C20.2 66.2327 18.7673 64.8 17 64.8C15.2327 64.8 13.8 66.2327 13.8 68C13.8 69.7673 15.2327 71.2 17 71.2Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M171.8 60C172.905 60 173.8 59.1046 173.8 58C173.8 56.8954 172.905 56 171.8 56C170.695 56 169.8 56.8954 169.8 58C169.8 59.1046 170.695 60 171.8 60Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M180.2 53.6C181.967 53.6 183.4 52.1673 183.4 50.4C183.4 48.6327 181.967 47.2 180.2 47.2C178.433 47.2 177 48.6327 177 50.4C177 52.1673 178.433 53.6 180.2 53.6Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M164.2 59.2C165.967 59.2 167.4 57.7673 167.4 56C167.4 54.2327 165.967 52.8 164.2 52.8C162.433 52.8 161 54.2327 161 56C161 57.7673 162.433 59.2 164.2 59.2Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M51 40.8C55.6392 40.8 59.4 37.0392 59.4 32.4C59.4 27.7608 55.6392 24 51 24C46.3608 24 42.6 27.7608 42.6 32.4C42.6 37.0392 46.3608 40.8 51 40.8Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M98.6 64.8C101.251 64.8 103.4 62.651 103.4 60C103.4 57.349 101.251 55.2 98.6 55.2C95.949 55.2 93.8 57.349 93.8 60C93.8 62.651 95.949 64.8 98.6 64.8Z",1,"fill-color-primary-darker"],["opacity","0.1","d","M145.8 96.8C148.451 96.8 150.6 94.651 150.6 92C150.6 89.349 148.451 87.2 145.8 87.2C143.149 87.2 141 89.349 141 92C141 94.651 143.149 96.8 145.8 96.8Z",1,"fill-color-primary-darker"],["fill-rule","evenodd","clip-rule","evenodd","d","M59.8 136.8C75.0431 136.8 87.4 134.293 87.4 131.2C87.4 128.107 75.0431 125.6 59.8 125.6C44.557 125.6 32.2 128.107 32.2 131.2C32.2 134.293 44.557 136.8 59.8 136.8Z","stroke-width","0.8","stroke-dasharray","4 4",1,"fill-color-1","stroke-color-primary"],["fill-rule","evenodd","clip-rule","evenodd","d","M217.4 152.8C232.643 152.8 245 150.293 245 147.2C245 144.107 232.643 141.6 217.4 141.6C202.157 141.6 189.8 144.107 189.8 147.2C189.8 150.293 202.157 152.8 217.4 152.8Z","stroke-width","0.8","stroke-dasharray","4 4",1,"fill-color-1","stroke-color-primary"],["fill-rule","evenodd","clip-rule","evenodd","d","M28.6 152.8C43.8431 152.8 56.2 150.293 56.2 147.2C56.2 144.107 43.8431 141.6 28.6 141.6C13.3569 141.6 1 144.107 1 147.2C1 150.293 13.3569 152.8 28.6 152.8Z","stroke-width","0.8","stroke-dasharray","4 4",1,"fill-color-1","stroke-color-primary"],["d","M122.425 44.7H119.162L120.372 41.0719C120.484 40.6219 120.147 40.2 119.725 40.2H115.675C115.337 40.2 115.028 40.4531 115 40.7906L114.1 47.5406C114.044 47.9625 114.353 48.3 114.775 48.3H118.094L116.8 53.7844C116.716 54.2063 117.025 54.6 117.447 54.6C117.7 54.6 117.925 54.4875 118.037 54.2625L122.987 45.7125C123.269 45.2906 122.931 44.7 122.425 44.7Z","fill","white"],["d","M23.5204 123.2C23.0498 123.2 22.6141 123.375 22.2807 123.669C21.9491 123.96 21.7189 124.369 21.6565 124.837L20.2164 135.712C20.1423 136.278 20.3237 136.811 20.6643 137.203C21.0076 137.598 21.5119 137.85 22.0804 137.85H26.4117L24.5687 145.68C24.4289 146.274 24.5836 146.851 24.9204 147.28C25.2626 147.716 25.7931 148 26.3959 148C26.7289 148 27.0539 147.911 27.3385 147.746C27.616 147.585 27.8553 147.351 28.0254 147.055L35.9453 133.28C36.3068 132.658 36.2644 131.95 35.9495 131.398C35.7868 131.113 35.551 130.871 35.2622 130.703C34.9905 130.544 34.6717 130.45 34.3203 130.45H30.1609L31.7043 124.49C31.5476 124.305 31.4051 124.176 31.278 124.085C31.004 123.89 30.5348 123.687 29.7238 123.539C28.6009 123.335 26.6977 123.2 23.5204 123.2Z","stroke-width","1.6",1,"stroke-color-primary","fill-color-17"],["d","M185.5 109.6C185.075 109.6 184.682 109.757 184.381 110.02C184.08 110.284 183.872 110.652 183.815 111.073L182.615 120.074C182.548 120.585 182.712 121.066 183.021 121.419C183.331 121.774 183.787 122 184.3 122H187.74L186.244 128.309C186.117 128.846 186.258 129.366 186.564 129.753C186.873 130.145 187.352 130.4 187.897 130.4C188.505 130.4 189.084 130.074 189.391 129.512L195.745 115.6H191.208L192.467 110.771C192.308 110.576 192.165 110.445 192.04 110.357C191.803 110.189 191.397 110.01 190.693 109.883C189.753 109.713 188.16 109.6 185.5 109.6Z","stroke-width","1.6",1,"stroke-color-primary","fill-color-17"],["d","M215.1 128C214.675 128 214.282 128.157 213.981 128.42C213.68 128.683 213.472 129.052 213.415 129.473L212.215 138.474C212.148 138.985 212.312 139.466 212.621 139.819C212.931 140.174 213.387 140.4 213.9 140.4H217.34L215.844 146.709C215.717 147.246 215.858 147.766 216.164 148.153C216.473 148.545 216.952 148.8 217.497 148.8C218.105 148.8 218.684 148.474 218.991 147.912L225.345 134H220.808L222.067 129.171C221.908 128.976 221.765 128.845 221.64 128.757C221.403 128.589 220.997 128.41 220.293 128.283C219.353 128.113 217.76 128 215.1 128Z","stroke-width","1.6",1,"stroke-color-primary","fill-color-17"],["d","M55.9003 111.2C55.4754 111.2 55.0822 111.357 54.7812 111.62C54.4802 111.883 54.2716 112.252 54.215 112.673L53.0149 121.674C52.9475 122.185 53.112 122.666 53.4214 123.019C53.7314 123.374 54.1868 123.6 54.7004 123.6H58.1398L56.6444 129.909C56.5174 130.446 56.6576 130.966 56.9637 131.353C57.2728 131.745 57.7518 132 58.2966 132C58.9052 132 59.4843 131.674 59.7907 131.112L66.1452 117.2H61.6081L62.8674 112.371C62.7082 112.176 62.5651 112.045 62.4402 111.957C62.2025 111.789 61.7969 111.61 61.0927 111.483C60.1529 111.313 58.5599 111.2 55.9003 111.2Z","stroke-width","1.6",1,"stroke-color-primary","fill-color-17"],["fxFlex","20","fxLayoutAlign","center end"],["fxFlex","40"],[1,"font-size-120"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",3,"swipe"],["fxFlex","30","viewBox","0 0 210 124","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/2000/svg",3,"ngClass"],["d","M90.1491 0H0V100.616H90.1491V0Z",1,"fill-color-10"],["d","M88.6575 67.1775H1.48926V98.4248H88.6575V67.1775Z","fill","white"],["d","M59.844 74.5891H8.64404V90.6009H59.844V74.5891Z",1,"fill-color-primary-darker"],["d","M76.3172 90.6426C80.8187 90.6426 84.4679 86.9934 84.4679 82.4919C84.4679 77.9904 80.8187 74.3412 76.3172 74.3412C71.8157 74.3412 68.1665 77.9904 68.1665 82.4919C68.1665 86.9934 71.8157 90.6426 76.3172 90.6426Z",1,"fill-color-primary-darker"],["d","M88.6575 34.7129H1.48926V65.9602H88.6575V34.7129Z","fill","white"],["d","M59.844 42.1244H8.64404V58.1363H59.844V42.1244Z",1,"fill-color-primary-darker"],["d","M76.3172 58.1801C80.8187 58.1801 84.4679 54.5309 84.4679 50.0294C84.4679 45.5279 80.8187 41.8787 76.3172 41.8787C71.8157 41.8787 68.1665 45.5279 68.1665 50.0294C68.1665 54.5309 71.8157 58.1801 76.3172 58.1801Z",1,"fill-color-primary-darker"],["d","M88.6575 2.24823H1.48926V33.4955H88.6575V2.24823Z","fill","white"],["d","M59.844 9.66199H8.64404V25.6739H59.844V9.66199Z",1,"fill-color-primary-darker"],["d","M32.644 74.5891H8.64404V90.6009H32.644V74.5891Z",1,"fill-color-17"],["d","M45.444 42.1244H8.64404V58.1363H45.444V42.1244Z",1,"fill-color-17"],["d","M59.644 9.66199H8.64404V25.662H59.644V9.66199Z",1,"fill-color-17"],["d","M76.3176 26.3516C81.1704 26.3516 85.1044 22.4176 85.1044 17.5648C85.1044 12.712 81.1704 8.77802 76.3176 8.77802C71.4648 8.77802 67.5308 12.712 67.5308 17.5648C67.5308 22.4176 71.4648 26.3516 76.3176 26.3516Z","fill","url(#paint0_linear)"],["d","M76.3176 59.0334C81.1704 59.0334 85.1044 55.0994 85.1044 50.2466C85.1044 45.3938 81.1704 41.4598 76.3176 41.4598C71.4648 41.4598 67.5308 45.3938 67.5308 50.2466C67.5308 55.0994 71.4648 59.0334 76.3176 59.0334Z","fill","url(#paint1_linear)"],["d","M76.3176 91.4958C81.1704 91.4958 85.1044 87.5618 85.1044 82.709C85.1044 77.8562 81.1704 73.9222 76.3176 73.9222C71.4648 73.9222 67.5308 77.8562 67.5308 82.709C67.5308 87.5618 71.4648 91.4958 76.3176 91.4958Z","fill","url(#paint2_linear)"],["d","M76.1507 25.3014C80.6522 25.3014 84.3014 21.6522 84.3014 17.1507C84.3014 12.6492 80.6522 9 76.1507 9C71.6492 9 68 12.6492 68 17.1507C68 21.6522 71.6492 25.3014 76.1507 25.3014Z",1,"fill-color-17"],["d","M193.435 36.7899H142.709V35.7444H119.709V36.7899H68.7744C67.8644 36.7899 66.9917 37.1514 66.3482 37.7949C65.7048 38.4384 65.3433 39.3111 65.3433 40.2211V109.679C65.3433 110.589 65.7048 111.462 66.3482 112.106C66.9917 112.749 67.8644 113.111 68.7744 113.111H193.435C195.33 113.111 196.866 111.574 196.866 109.679V40.2211C196.866 39.3111 196.504 38.4384 195.861 37.7949C195.217 37.1514 194.345 36.7899 193.435 36.7899Z",1,"fill-color-19"],["d","M192.266 42.8538H69.9434V111.856H192.266V42.8538Z",1,"fill-color-22"],["opacity","0.1","d","M157.284 111.856H69.9434V42.8538L157.284 111.856Z","fill","black"],["d","M89.0832 106.693C95.577 106.693 100.841 101.428 100.841 94.9346C100.841 88.4408 95.577 83.1766 89.0832 83.1766C82.5894 83.1766 77.3252 88.4408 77.3252 94.9346C77.3252 101.428 82.5894 106.693 89.0832 106.693Z",1,"fill-color-25"],["d","M91.7005 103.772C85.7849 103.772 80.4518 100.208 78.188 94.7431C75.9242 89.2778 77.1755 82.987 81.3584 78.8041C85.5414 74.6211 91.8322 73.3698 97.2975 75.6336C102.763 77.8974 106.326 83.2305 106.326 89.1461C106.317 97.2199 99.7743 103.763 91.7005 103.772ZM91.7005 74.7115C83.7284 74.7115 77.2658 81.174 77.2658 89.1461C77.2658 97.1181 83.7284 103.581 91.7005 103.581C99.6725 103.581 106.135 97.1181 106.135 89.1461C106.126 81.1778 99.6687 74.7205 91.7005 74.7115Z",1,"fill-color-28"],["d","M170.967 80.0673H159.541V82.4548H170.967V80.0673Z",1,"fill-color-19"],["d","M184.781 61.4783H145.727V62.5015H184.781V61.4783Z",1,"fill-color-19"],["d","M184.781 64.7186H145.727V65.7418H184.781V64.7186Z",1,"fill-color-19"],["d","M184.781 67.9589H145.727V68.9821H184.781V67.9589Z",1,"fill-color-19"],["d","M184.781 71.1991H145.727V72.2224H184.781V71.1991Z",1,"fill-color-19"],["d","M184.781 74.4394H145.727V75.4626H184.781V74.4394Z",1,"fill-color-19"],["d","M184.781 44.2537H180.006V49.0288H184.781V44.2537Z",1,"fill-color-25"],["d","M186.998 51.2458H181.2V45.4474H186.998V51.2458ZM181.452 50.9937H186.746V45.6996H181.452V50.9937Z",1,"fill-color-19"],["d","M200.3 110.601H188.362V109.741C188.362 109.696 188.344 109.653 188.312 109.621C188.28 109.589 188.237 109.571 188.192 109.571H184.099C184.054 109.571 184.01 109.589 183.978 109.621C183.946 109.653 183.928 109.696 183.928 109.741V110.601H181.37V109.741C181.37 109.696 181.352 109.653 181.32 109.621C181.288 109.589 181.245 109.571 181.2 109.571H177.107C177.061 109.571 177.018 109.589 176.986 109.621C176.954 109.653 176.936 109.696 176.936 109.741V110.601H174.378V109.741C174.378 109.696 174.36 109.653 174.328 109.621C174.296 109.589 174.253 109.571 174.207 109.571H170.115C170.069 109.571 170.026 109.589 169.994 109.621C169.962 109.653 169.944 109.696 169.944 109.741V110.601H167.386V109.741C167.386 109.696 167.368 109.653 167.336 109.621C167.304 109.589 167.261 109.571 167.215 109.571H163.122C163.077 109.571 163.034 109.589 163.002 109.621C162.97 109.653 162.952 109.696 162.952 109.741V110.601H160.394V109.741C160.394 109.696 160.376 109.653 160.344 109.621C160.312 109.589 160.268 109.571 160.223 109.571H156.13C156.085 109.571 156.042 109.589 156.01 109.621C155.978 109.653 155.96 109.696 155.96 109.741V110.601H153.402V109.741C153.402 109.696 153.384 109.653 153.352 109.621C153.32 109.589 153.276 109.571 153.231 109.571H149.138C149.093 109.571 149.049 109.589 149.017 109.621C148.985 109.653 148.967 109.696 148.967 109.741V110.601H146.409V109.741C146.409 109.696 146.391 109.653 146.359 109.621C146.327 109.589 146.284 109.571 146.239 109.571H114.177C114.132 109.571 114.089 109.589 114.057 109.621C114.025 109.653 114.007 109.696 114.007 109.741V110.601H111.449V109.741C111.449 109.696 111.431 109.653 111.399 109.621C111.367 109.589 111.323 109.571 111.278 109.571H107.185C107.14 109.571 107.096 109.589 107.064 109.621C107.032 109.653 107.014 109.696 107.014 109.741V110.601H104.456V109.741C104.456 109.696 104.438 109.653 104.406 109.621C104.374 109.589 104.331 109.571 104.286 109.571H100.193C100.148 109.571 100.104 109.589 100.072 109.621C100.04 109.653 100.022 109.696 100.022 109.741V110.601H97.4642V109.741C97.4642 109.696 97.4462 109.653 97.4142 109.621C97.3822 109.589 97.3388 109.571 97.2936 109.571H93.2006C93.1554 109.571 93.112 109.589 93.08 109.621C93.048 109.653 93.0301 109.696 93.0301 109.741V110.601H90.472V109.741C90.472 109.696 90.454 109.653 90.422 109.621C90.39 109.589 90.3467 109.571 90.3014 109.571H86.2085C86.1632 109.571 86.1198 109.589 86.0879 109.621C86.0559 109.653 86.0379 109.696 86.0379 109.741V110.601H83.4798V109.741C83.4798 109.696 83.4618 109.653 83.4299 109.621C83.3979 109.589 83.3545 109.571 83.3093 109.571H79.2163C79.171 109.571 79.1277 109.589 79.0957 109.621C79.0637 109.653 79.0457 109.696 79.0457 109.741V110.601H76.4876V109.741C76.4876 109.696 76.4697 109.653 76.4377 109.621C76.4057 109.589 76.3623 109.571 76.3171 109.571H72.2241C72.1789 109.571 72.1355 109.589 72.1035 109.621C72.0715 109.653 72.0536 109.696 72.0536 109.741V110.601H64.2087C61.9482 110.601 60.1157 112.434 60.1157 114.694V116.545C60.1157 118.806 61.9482 120.638 64.2087 120.638H200.3C202.561 120.638 204.393 118.806 204.393 116.545V114.694C204.393 112.434 202.561 110.601 200.3 110.601Z",1,"fill-color-19"],["d","M86.1131 103.322C86.3717 103.386 86.6518 103.312 86.8456 103.112L94.5986 95.1027C95.007 94.6845 94.8072 93.9773 94.2376 93.8353L90.6843 92.9494L92.9925 89.2798C93.2324 88.8425 92.9934 88.2924 92.51 88.1718L88.0762 87.0663C87.7067 86.9742 87.3243 87.17 87.1837 87.5241L84.3559 94.6682C84.1868 95.097 84.4334 95.5771 84.8799 95.6884L88.5347 96.5996L85.6221 102.235C85.3946 102.675 85.642 103.204 86.1131 103.322Z",1,"fill-color-21"],["d","M42 75H9V91H42V75Z",1,"fill-color-17"],["d","M42 42H9V58H42V42Z",1,"fill-color-17"],["d","M76.3176 26.3516C81.1704 26.3516 85.1044 22.4176 85.1044 17.5648C85.1044 12.712 81.1704 8.77802 76.3176 8.77802C71.4648 8.77802 67.5308 12.712 67.5308 17.5648C67.5308 22.4176 71.4648 26.3516 76.3176 26.3516Z","fill","url(#paint3_linear)"],["d","M76.3176 59.0334C81.1704 59.0334 85.1044 55.0994 85.1044 50.2466C85.1044 45.3938 81.1704 41.4598 76.3176 41.4598C71.4648 41.4598 67.5308 45.3938 67.5308 50.2466C67.5308 55.0994 71.4648 59.0334 76.3176 59.0334Z","fill","url(#paint4_linear)"],["d","M76.3176 91.4958C81.1704 91.4958 85.1044 87.5618 85.1044 82.709C85.1044 77.8562 81.1704 73.9222 76.3176 73.9222C71.4648 73.9222 67.5308 77.8562 67.5308 82.709C67.5308 87.5618 71.4648 91.4958 76.3176 91.4958Z","fill","url(#paint5_linear)"],["d","M205.185 113.031H193.247V112.171C193.247 112.125 193.229 112.082 193.197 112.05C193.165 112.018 193.121 112 193.076 112H188.983C188.938 112 188.895 112.018 188.863 112.05C188.831 112.082 188.813 112.125 188.813 112.171V113.031H186.254V112.171C186.254 112.125 186.237 112.082 186.205 112.05C186.173 112.018 186.129 112 186.084 112H181.991C181.946 112 181.902 112.018 181.87 112.05C181.838 112.082 181.82 112.125 181.82 112.171V113.031H179.262V112.171C179.262 112.125 179.244 112.082 179.212 112.05C179.18 112.018 179.137 112 179.092 112H174.999C174.954 112 174.91 112.018 174.878 112.05C174.846 112.082 174.828 112.125 174.828 112.171V113.031H172.27V112.171C172.27 112.125 172.252 112.082 172.22 112.05C172.188 112.018 172.145 112 172.1 112H168.007C167.961 112 167.918 112.018 167.886 112.05C167.854 112.082 167.836 112.125 167.836 112.171V113.031H165.278V112.171C165.278 112.125 165.26 112.082 165.228 112.05C165.196 112.018 165.153 112 165.107 112H161.014C160.969 112 160.926 112.018 160.894 112.05C160.862 112.082 160.844 112.125 160.844 112.171V113.031H158.286V112.171C158.286 112.125 158.268 112.082 158.236 112.05C158.204 112.018 158.16 112 158.115 112H154.022C153.977 112 153.934 112.018 153.902 112.05C153.87 112.082 153.852 112.125 153.852 112.171V113.031H151.294V112.171C151.294 112.125 151.276 112.082 151.244 112.05C151.212 112.018 151.168 112 151.123 112H119.061C119.016 112 118.973 112.018 118.941 112.05C118.909 112.082 118.891 112.125 118.891 112.171V113.031H116.333V112.171C116.333 112.125 116.315 112.082 116.283 112.05C116.251 112.018 116.207 112 116.162 112H112.069C112.024 112 111.981 112.018 111.949 112.05C111.917 112.082 111.899 112.125 111.899 112.171V113.031H109.341V112.171C109.341 112.125 109.323 112.082 109.291 112.05C109.259 112.018 109.215 112 109.17 112H105.077C105.032 112 104.988 112.018 104.956 112.05C104.924 112.082 104.907 112.125 104.907 112.171V113.031H102.348V112.171C102.348 112.125 102.33 112.082 102.298 112.05C102.266 112.018 102.223 112 102.178 112H98.0849C98.0397 112 97.9963 112.018 97.9643 112.05C97.9323 112.082 97.9144 112.125 97.9144 112.171V113.031H95.3563V112.171C95.3563 112.125 95.3383 112.082 95.3063 112.05C95.2743 112.018 95.2309 112 95.1857 112H91.0927C91.0475 112 91.0041 112.018 90.9721 112.05C90.9402 112.082 90.9222 112.125 90.9222 112.171V113.031H88.3641V112.171C88.3641 112.125 88.3461 112.082 88.3141 112.05C88.2822 112.018 88.2388 112 88.1935 112H84.1006C84.0553 112 84.0119 112.018 83.98 112.05C83.948 112.082 83.93 112.125 83.93 112.171V113.031H81.3719V112.171C81.3719 112.125 81.3539 112.082 81.322 112.05C81.29 112.018 81.2466 112 81.2014 112H77.1084C77.0632 112 77.0198 112.018 76.9878 112.05C76.9558 112.082 76.9378 112.125 76.9379 112.171V113.031H69.093C66.8325 113.031 65 114.863 65 117.124V118.974C65 121.235 66.8325 123.067 69.093 123.067H205.185C207.445 123.067 209.277 121.235 209.277 118.974V117.124C209.277 114.863 207.445 113.031 205.185 113.031Z",1,"fill-color-19"],["d","M78.375 20.625C78.375 19.5938 77.5312 18.75 76.5 18.75C75.4453 18.75 74.625 19.5938 74.625 20.625C74.625 21.6797 75.4453 22.5 76.5 22.5C77.5312 22.5 78.375 21.6797 78.375 20.625ZM74.8359 11.1094L75.1406 17.4844C75.1641 17.7656 75.4219 18 75.7031 18H77.2734C77.5547 18 77.8125 17.7656 77.8359 17.4844L78.1406 11.1094C78.1641 10.7812 77.9062 10.5 77.5781 10.5H75.3984C75.0703 10.5 74.8125 10.7812 74.8359 11.1094Z","fill","white"],["id","paint0_linear","x1","76.3176","y1","26.3516","x2","76.3176","y2","8.77802","gradientUnits","userSpaceOnUse"],["stop-color","#808080","stop-opacity","0.25"],["offset","0.54","stop-color","#808080","stop-opacity","0.12"],["offset","1","stop-color","#808080","stop-opacity","0.1"],["id","paint1_linear","x1","76.3176","y1","59.0334","x2","76.3176","y2","41.4598","gradientUnits","userSpaceOnUse"],["id","paint2_linear","x1","76.3176","y1","91.4958","x2","76.3176","y2","73.9222","gradientUnits","userSpaceOnUse"],["id","paint3_linear","x1","76.3176","y1","26.3516","x2","76.3176","y2","8.77802","gradientUnits","userSpaceOnUse"],["id","paint4_linear","x1","76.3176","y1","59.0334","x2","76.3176","y2","41.4598","gradientUnits","userSpaceOnUse"],["id","paint5_linear","x1","76.3176","y1","91.4958","x2","76.3176","y2","73.9222","gradientUnits","userSpaceOnUse"],["fxFlex","30","viewBox","0 0 370 121","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/2000/svg",3,"ngClass"],["d","M327.488 99.9755C350.953 99.9755 369.975 80.9531 369.975 57.4877C369.975 34.0224 350.953 15 327.488 15C304.022 15 285 34.0224 285 57.4877C285 80.9531 304.022 99.9755 327.488 99.9755Z",1,"fill-color-25"],["d","M115.068 85.6077H349.8V86.5722H113L115.068 85.6077Z",1,"fill-color-19"],["d","M236.776 84.376H226.024V91.544H236.776V84.376Z",1,"fill-color-primary-lighter"],["d","M218.856 87.96H233.192V79H218.856V87.96ZM232.569 87.5704H219.479V79.3896H232.569V87.5704Z",1,"fill-color-19"],["d","M265 57.3624H357.392V120.307H265V57.3624Z",1,"fill-color-22"],["d","M362.545 50H271.626C271.016 50.0009 270.521 50.495 270.521 51.1048V112.577C270.521 112.87 270.638 113.151 270.845 113.358C271.052 113.565 271.333 113.681 271.626 113.681H362.545C362.838 113.681 363.119 113.565 363.326 113.358C363.533 113.151 363.65 112.87 363.65 112.577V51.1048C363.65 50.495 363.155 50.0009 362.545 50ZM362.913 112.577C362.913 112.674 362.875 112.768 362.806 112.837C362.736 112.907 362.643 112.945 362.545 112.945H271.626C271.528 112.945 271.434 112.907 271.365 112.837C271.296 112.768 271.258 112.674 271.258 112.577V51.1048C271.258 50.9015 271.423 50.7365 271.626 50.7365H362.545C362.748 50.7365 362.913 50.9015 362.913 51.1048V112.577Z",1,"fill-color-19"],["d","M316.364 93.4359H275.844C275.547 93.4359 275.307 93.6766 275.307 93.9735V97.6835C275.307 97.9804 275.547 98.2211 275.844 98.2211H316.364C316.661 98.2211 316.901 97.9804 316.901 97.6835V93.9735C316.901 93.6766 316.661 93.4359 316.364 93.4359Z",1,"fill-color-19"],["d","M354.814 89.3873H341.565C341.272 89.3873 340.991 89.5036 340.784 89.7108C340.577 89.918 340.46 90.199 340.46 90.492V100.798C340.46 101.091 340.577 101.372 340.784 101.579C340.991 101.786 341.272 101.903 341.565 101.903H354.814C355.107 101.903 355.388 101.786 355.595 101.579C355.803 101.372 355.919 101.091 355.919 100.798V90.492C355.919 90.199 355.803 89.918 355.595 89.7108C355.388 89.5036 355.107 89.3873 354.814 89.3873ZM355.182 100.798C355.182 101.001 355.017 101.166 354.814 101.166H341.565C341.362 101.166 341.197 101.001 341.197 100.798V90.492C341.196 90.3943 341.235 90.3004 341.304 90.2313C341.373 90.1622 341.467 90.1235 341.565 90.1238H354.814C354.912 90.1235 355.006 90.1622 355.075 90.2313C355.144 90.3004 355.183 90.3943 355.182 90.492V100.798Z",1,"fill-color-19"],["d","M352.168 91.7653H344.211C343.914 91.7653 343.673 92.006 343.673 92.3029V93.0965C343.673 93.3934 343.914 93.6341 344.211 93.6341H352.168C352.465 93.6341 352.706 93.3934 352.706 93.0965V92.3029C352.706 92.006 352.465 91.7653 352.168 91.7653Z",1,"fill-color-19"],["d","M352.168 94.71H344.211C343.914 94.71 343.673 94.9507 343.673 95.2476V96.0412C343.673 96.3381 343.914 96.5788 344.211 96.5788H352.168C352.465 96.5788 352.706 96.3381 352.706 96.0412V95.2476C352.706 94.9507 352.465 94.71 352.168 94.71Z",1,"fill-color-19"],["d","M352.168 97.6548H344.211C343.914 97.6548 343.673 97.8955 343.673 98.1924V98.986C343.673 99.2829 343.914 99.5236 344.211 99.5236H352.168C352.465 99.5236 352.706 99.2829 352.706 98.986V98.1924C352.706 97.8955 352.465 97.6548 352.168 97.6548Z",1,"fill-color-19"],["d","M295.014 54.4177H276.949C276.652 54.4177 276.411 54.6584 276.411 54.9553V61.9782C276.411 62.2752 276.652 62.5158 276.949 62.5158H295.014C295.311 62.5158 295.552 62.2752 295.552 61.9782V54.9553C295.552 54.6584 295.311 54.4177 295.014 54.4177Z",1,"fill-color-19"],["d","M312.293 105.198C319.455 105.198 325.261 99.3917 325.261 92.2295C325.261 85.0672 319.455 79.2611 312.293 79.2611C305.131 79.2611 299.325 85.0672 299.325 92.2295C299.325 99.3917 305.131 105.198 312.293 105.198Z",1,"fill-color-25"],["d","M315.18 101.976C308.655 101.976 302.773 98.0462 300.276 92.0183C297.78 85.9904 299.16 79.052 303.773 74.4384C308.387 69.8249 315.325 68.4448 321.353 70.9416C327.381 73.4384 331.311 79.3205 331.311 85.8451C331.301 94.75 324.085 101.966 315.18 101.976ZM315.18 69.9245C306.387 69.9245 299.259 77.0524 299.259 85.8451C299.259 94.6377 306.387 101.766 315.18 101.766C323.973 101.766 331.1 94.6377 331.1 85.8451C331.09 77.0565 323.968 69.9345 315.18 69.9245Z",1,"fill-color-19"],["d","M309.677 100.883C309.936 100.948 310.216 100.873 310.41 100.673L318.163 92.664C318.571 92.2458 318.371 91.5387 317.802 91.3966L314.249 90.5107L316.557 86.8411C316.797 86.4038 316.558 85.8537 316.074 85.7332L311.64 84.6277C311.271 84.5355 310.888 84.7313 310.748 85.0854L307.92 92.2295C307.751 92.6583 307.998 93.1384 308.444 93.2497L312.099 94.161L309.186 99.7958C308.959 100.236 309.206 100.766 309.677 100.883Z",1,"fill-color-21"],["d","M88.6576 67.1775H1.48938V98.4248H88.6576V67.1775Z","fill","white"],["d","M59.8442 74.589H8.64417V90.6009H59.8442V74.589Z",1,"fill-color-primary-darker"],["d","M76.3175 90.6426C80.819 90.6426 84.4682 86.9934 84.4682 82.4919C84.4682 77.9904 80.819 74.3412 76.3175 74.3412C71.8159 74.3412 68.1667 77.9904 68.1667 82.4919C68.1667 86.9934 71.8159 90.6426 76.3175 90.6426Z",1,"fill-color-primary-darker"],["d","M88.6576 34.7129H1.48938V65.9602H88.6576V34.7129Z","fill","white"],["d","M59.8442 42.1244H8.64417V58.1363H59.8442V42.1244Z",1,"fill-color-primary-darker"],["d","M76.3175 58.1801C80.819 58.1801 84.4682 54.531 84.4682 50.0294C84.4682 45.5279 80.819 41.8787 76.3175 41.8787C71.8159 41.8787 68.1667 45.5279 68.1667 50.0294C68.1667 54.531 71.8159 58.1801 76.3175 58.1801Z",1,"fill-color-primary-darker"],["d","M88.6576 2.24824H1.48938V33.4955H88.6576V2.24824Z","fill","white"],["d","M59.8442 9.66196H8.64417V25.6738H59.8442V9.66196Z",1,"fill-color-primary-darker"],["d","M59.8442 9.66196H8.64417V25.6738H59.8442V9.66196Z",1,"fill-color-17"],["d","M76.7868 26.5736C81.6396 26.5736 85.5736 22.6396 85.5736 17.7868C85.5736 12.934 81.6396 9 76.7868 9C71.934 9 68 12.934 68 17.7868C68 22.6396 71.934 26.5736 76.7868 26.5736Z","fill","url(#paint0_linear)"],["d","M76.3174 59.0334C81.1702 59.0334 85.1042 55.0994 85.1042 50.2466C85.1042 45.3938 81.1702 41.4598 76.3174 41.4598C71.4646 41.4598 67.5306 45.3938 67.5306 50.2466C67.5306 55.0994 71.4646 59.0334 76.3174 59.0334Z","fill","url(#paint1_linear)"],["d","M76.3174 91.4958C81.1702 91.4958 85.1042 87.5618 85.1042 82.709C85.1042 77.8562 81.1702 73.9222 76.3174 73.9222C71.4646 73.9222 67.5306 77.8562 67.5306 82.709C67.5306 87.5618 71.4646 91.4958 76.3174 91.4958Z","fill","url(#paint2_linear)"],["d","M193.434 36.7899H142.709V35.7444H119.708V36.7899H68.7742C67.8642 36.7899 66.9915 37.1514 66.348 37.7949C65.7045 38.4384 65.343 39.3111 65.343 40.2211V109.679C65.343 110.589 65.7045 111.462 66.348 112.106C66.9915 112.749 67.8642 113.111 68.7742 113.111H193.434C195.329 113.111 196.866 111.574 196.866 109.679V40.2211C196.866 39.3111 196.504 38.4384 195.861 37.7949C195.217 37.1514 194.344 36.7899 193.434 36.7899Z",1,"fill-color-19"],["d","M192.265 42.8538H69.9432V111.856H192.265V42.8538Z",1,"fill-color-22"],["opacity","0.1","d","M157.283 111.856H69.9432V42.8538L157.283 111.856Z","fill","black"],["d","M89.0829 106.693C95.5767 106.693 100.841 101.428 100.841 94.9346C100.841 88.4408 95.5767 83.1766 89.0829 83.1766C82.5892 83.1766 77.325 88.4408 77.325 94.9346C77.325 101.428 82.5892 106.693 89.0829 106.693Z",1,"fill-color-25"],["d","M91.7004 103.772C85.7849 103.772 80.4518 100.208 78.188 94.7431C75.9242 89.2778 77.1755 82.987 81.3584 78.8041C85.5414 74.6211 91.8322 73.3698 97.2975 75.6336C102.763 77.8974 106.326 83.2305 106.326 89.1461C106.317 97.2199 99.7743 103.763 91.7004 103.772ZM91.7004 74.7115C83.7284 74.7115 77.2658 81.174 77.2658 89.1461C77.2658 97.1181 83.7284 103.581 91.7004 103.581C99.6725 103.581 106.135 97.1181 106.135 89.1461C106.126 81.1778 99.6687 74.7205 91.7004 74.7115Z",1,"fill-color-28"],["d","M170.967 80.0672H159.541V82.4548H170.967V80.0672Z",1,"fill-color-19"],["d","M184.781 67.9588H145.727V68.9821H184.781V67.9588Z",1,"fill-color-19"],["d","M200.3 110.601H188.362V109.741C188.362 109.696 188.344 109.653 188.312 109.621C188.28 109.589 188.237 109.571 188.192 109.571H184.099C184.054 109.571 184.01 109.589 183.978 109.621C183.946 109.653 183.928 109.696 183.928 109.741V110.601H181.37V109.741C181.37 109.696 181.352 109.653 181.32 109.621C181.288 109.589 181.245 109.571 181.2 109.571H177.107C177.061 109.571 177.018 109.589 176.986 109.621C176.954 109.653 176.936 109.696 176.936 109.741V110.601H174.378V109.741C174.378 109.696 174.36 109.653 174.328 109.621C174.296 109.589 174.253 109.571 174.207 109.571H170.114C170.069 109.571 170.026 109.589 169.994 109.621C169.962 109.653 169.944 109.696 169.944 109.741V110.601H167.386V109.741C167.386 109.696 167.368 109.653 167.336 109.621C167.304 109.589 167.26 109.571 167.215 109.571H163.122C163.077 109.571 163.034 109.589 163.002 109.621C162.97 109.653 162.952 109.696 162.952 109.741V110.601H160.394V109.741C160.394 109.696 160.376 109.653 160.344 109.621C160.312 109.589 160.268 109.571 160.223 109.571H156.13C156.085 109.571 156.041 109.589 156.009 109.621C155.977 109.653 155.96 109.696 155.96 109.741V110.601H153.401V109.741C153.401 109.696 153.383 109.653 153.351 109.621C153.319 109.589 153.276 109.571 153.231 109.571H149.138C149.093 109.571 149.049 109.589 149.017 109.621C148.985 109.653 148.967 109.696 148.967 109.741V110.601H146.409V109.741C146.409 109.696 146.391 109.653 146.359 109.621C146.327 109.589 146.284 109.571 146.239 109.571H114.177C114.132 109.571 114.088 109.589 114.056 109.621C114.024 109.653 114.006 109.696 114.006 109.741V110.601H111.448V109.741C111.448 109.696 111.43 109.653 111.398 109.621C111.366 109.589 111.323 109.571 111.278 109.571H107.185C107.14 109.571 107.096 109.589 107.064 109.621C107.032 109.653 107.014 109.696 107.014 109.741V110.601H104.456V109.741C104.456 109.696 104.438 109.653 104.406 109.621C104.374 109.589 104.331 109.571 104.286 109.571H100.193C100.147 109.571 100.104 109.589 100.072 109.621C100.04 109.653 100.022 109.696 100.022 109.741V110.601H97.464V109.741C97.464 109.696 97.4461 109.653 97.4141 109.621C97.3821 109.589 97.3387 109.571 97.2935 109.571H93.2005C93.1553 109.571 93.1119 109.589 93.0799 109.621C93.0479 109.653 93.03 109.696 93.03 109.741V110.601H90.4719V109.741C90.4719 109.696 90.4539 109.653 90.4219 109.621C90.3899 109.589 90.3465 109.571 90.3013 109.571H86.2083C86.1631 109.571 86.1197 109.589 86.0877 109.621C86.0558 109.653 86.0378 109.696 86.0378 109.741V110.601H83.4797V109.741C83.4797 109.696 83.4617 109.653 83.4297 109.621C83.3978 109.589 83.3544 109.571 83.3091 109.571H79.2162C79.1709 109.571 79.1276 109.589 79.0956 109.621C79.0636 109.653 79.0456 109.696 79.0456 109.741V110.601H76.4875V109.741C76.4875 109.696 76.4695 109.653 76.4376 109.621C76.4056 109.589 76.3622 109.571 76.317 109.571H72.224C72.1788 109.571 72.1354 109.589 72.1034 109.621C72.0714 109.653 72.0535 109.696 72.0535 109.741V110.601H64.2086C61.9481 110.601 60.1156 112.434 60.1156 114.694V116.545C60.1156 118.806 61.9481 120.638 64.2086 120.638H200.3C202.561 120.638 204.393 118.806 204.393 116.545V114.694C204.393 112.434 202.561 110.601 200.3 110.601Z",1,"fill-color-19"],["d","M86.1131 103.322C86.3717 103.386 86.6518 103.312 86.8457 103.112L94.5986 95.1027C95.007 94.6845 94.8072 93.9774 94.2376 93.8353L90.6843 92.9494L92.9925 89.2798C93.2324 88.8425 92.9934 88.2924 92.51 88.1719L88.0762 87.0664C87.7067 86.9742 87.3243 87.17 87.1837 87.5241L84.3559 94.6682C84.1868 95.097 84.4334 95.5771 84.8799 95.6884L88.5348 96.5997L85.6221 102.235C85.3946 102.675 85.642 103.204 86.1131 103.322Z",1,"fill-color-21"],["d","M78.125 21.625C78.125 20.5938 77.2812 19.75 76.25 19.75C75.1953 19.75 74.375 20.5938 74.375 21.625C74.375 22.6797 75.1953 23.5 76.25 23.5C77.2812 23.5 78.125 22.6797 78.125 21.625ZM74.5859 12.1094L74.8906 18.4844C74.9141 18.7656 75.1719 19 75.4531 19H77.0234C77.3047 19 77.5625 18.7656 77.5859 18.4844L77.8906 12.1094C77.9141 11.7812 77.6562 11.5 77.3281 11.5H75.1484C74.8203 11.5 74.5625 11.7812 74.5859 12.1094Z","fill","white"],["id","paint0_linear","x1","76.7868","y1","26.5736","x2","76.7868","y2","9","gradientUnits","userSpaceOnUse"],["id","paint1_linear","x1","76.3174","y1","59.0334","x2","76.3174","y2","41.4598","gradientUnits","userSpaceOnUse"],["id","paint2_linear","x1","76.3174","y1","91.4958","x2","76.3174","y2","73.9222","gradientUnits","userSpaceOnUse"],["fxFlex","30","viewBox","0 0 153 200","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/2000/svg",3,"ngClass"],["fill-rule","evenodd","clip-rule","evenodd","d","M76.25 191C114.91 191 146.25 158.541 146.25 118.5C146.25 78.4594 114.91 46 76.25 46C37.5901 46 6.25 78.4594 6.25 118.5C6.25 158.541 37.5901 191 76.25 191Z","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7",1,"fill-color-0","stroke-color-primary-lighter"],["d","M76.25 191C114.91 191 146.25 158.541 146.25 118.5C146.25 78.4594 114.91 46 76.25 46","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7",1,"fill-color-0","stroke-color-primary"],["d","M122.399 37H32.25V137.616H122.399V37Z",1,"fill-color-10"],["d","M120.908 104.178H33.7394V135.425H120.908V104.178Z","fill","white"],["d","M92.0943 111.589H40.8943V127.601H92.0943V111.589Z",1,"fill-color-primary-darker"],["d","M108.567 127.643C113.069 127.643 116.718 123.993 116.718 119.492C116.718 114.99 113.069 111.341 108.567 111.341C104.066 111.341 100.417 114.99 100.417 119.492C100.417 123.993 104.066 127.643 108.567 127.643Z",1,"fill-color-primary-darker"],["d","M120.908 71.7129H33.7394V102.96H120.908V71.7129Z","fill","white"],["d","M92.0943 79.1244H40.8943V95.1363H92.0943V79.1244Z",1,"fill-color-primary-darker"],["d","M108.567 95.1801C113.069 95.1801 116.718 91.531 116.718 87.0294C116.718 82.5279 113.069 78.8787 108.567 78.8787C104.066 78.8787 100.417 82.5279 100.417 87.0294C100.417 91.531 104.066 95.1801 108.567 95.1801Z",1,"fill-color-primary-darker"],["d","M120.908 39.2482H33.7394V70.4955H120.908V39.2482Z","fill","white"],["d","M92.0943 46.662H40.8943V62.6738H92.0943V46.662Z",1,"fill-color-primary-darker"],["d","M74.5 112H40.5V128H74.5V112Z",1,"fill-color-17"],["d","M74.5 79H40.5V95H74.5V79Z",1,"fill-color-17"],["d","M91.8943 46.662H40.8943V62.662H91.8943V46.662Z",1,"fill-color-17"],["d","M108.567 63.3516C113.42 63.3516 117.354 59.4176 117.354 54.5648C117.354 49.712 113.42 45.778 108.567 45.778C103.715 45.778 99.7806 49.712 99.7806 54.5648C99.7806 59.4176 103.715 63.3516 108.567 63.3516Z","fill","url(#paint0_linear)"],["d","M108.567 96.0334C113.42 96.0334 117.354 92.0994 117.354 87.2466C117.354 82.3938 113.42 78.4598 108.567 78.4598C103.715 78.4598 99.7806 82.3938 99.7806 87.2466C99.7806 92.0994 103.715 96.0334 108.567 96.0334Z",1,"fill-color-17"],["d","M108.567 128.496C113.42 128.496 117.354 124.562 117.354 119.709C117.354 114.856 113.42 110.922 108.567 110.922C103.715 110.922 99.7806 114.856 99.7806 119.709C99.7806 124.562 103.715 128.496 108.567 128.496Z",1,"fill-color-17"],["d","M108.401 62.3014C112.902 62.3014 116.551 58.6522 116.551 54.1507C116.551 49.6492 112.902 46 108.401 46C103.899 46 100.25 49.6492 100.25 54.1507C100.25 58.6522 103.899 62.3014 108.401 62.3014Z",1,"fill-color-17"],["d","M110.625 57.625C110.625 56.5938 109.781 55.75 108.75 55.75C107.695 55.75 106.875 56.5938 106.875 57.625C106.875 58.6797 107.695 59.5 108.75 59.5C109.781 59.5 110.625 58.6797 110.625 57.625ZM107.086 48.1094L107.391 54.4844C107.414 54.7656 107.672 55 107.953 55H109.523C109.805 55 110.062 54.7656 110.086 54.4844L110.391 48.1094C110.414 47.7812 110.156 47.5 109.828 47.5H107.648C107.32 47.5 107.062 47.7812 107.086 48.1094Z","fill","white"],["d","M141.711 111C141.008 111 140.656 111.859 141.164 112.367L146.164 117.367C146.477 117.68 146.984 117.68 147.297 117.367L152.297 112.367C152.805 111.859 152.453 111 151.75 111H141.711Z",1,"fill-color-17"],["d","M84.25 185.461C84.25 184.758 83.3906 184.406 82.8828 184.914L77.8828 189.914C77.5703 190.227 77.5703 190.734 77.8828 191.047L82.8828 196.047C83.3906 196.555 84.25 196.203 84.25 195.5V185.461Z",1,"fill-color-primary-darker"],["d","M11.7891 120C12.4922 120 12.8437 119.141 12.3359 118.633L7.33593 113.633C7.02343 113.32 6.51562 113.32 6.20312 113.633L1.20312 118.633C0.695303 119.141 1.04687 120 1.74999 120H11.7891Z",1,"fill-color-primary-darker"],["d","M133.75 174C142.31 174 149.25 167.06 149.25 158.5C149.25 149.94 142.31 143 133.75 143C125.19 143 118.25 149.94 118.25 158.5C118.25 167.06 125.19 174 133.75 174Z",1,"fill-color-25"],["d","M129.872 169.64C130.214 169.726 130.584 169.628 130.84 169.363L141.093 158.771C141.633 158.218 141.369 157.283 140.616 157.095L135.917 155.924L138.969 151.071C139.286 150.493 138.97 149.765 138.331 149.606L132.468 148.144C131.979 148.022 131.473 148.281 131.287 148.749L127.548 158.197C127.324 158.764 127.65 159.399 128.241 159.546L133.074 160.751L129.222 168.203C128.921 168.785 129.249 169.485 129.872 169.64Z",1,"fill-color-21"],["d","M19.75 174C28.3104 174 35.25 167.06 35.25 158.5C35.25 149.94 28.3104 143 19.75 143C11.1896 143 4.25 149.94 4.25 158.5C4.25 167.06 11.1896 174 19.75 174Z",1,"fill-color-25"],["d","M19.3208 167.769C23.2973 167.769 26.5208 164.545 26.5208 160.569C26.5208 156.592 23.2973 153.369 19.3208 153.369C15.3444 153.369 12.1208 156.592 12.1208 160.569C12.1208 164.545 15.3444 167.769 19.3208 167.769Z",1,"fill-color-22"],["d","M13.7656 153.188L12.4676 152.716C12.4676 152.716 15.1815 150.002 18.9572 150.238L17.8953 149.177C17.8953 149.177 20.4911 148.233 22.851 150.71C24.0915 152.013 25.5268 153.544 26.4216 155.269H27.8116L27.2314 156.429L29.2619 157.589L27.1778 157.381C27.3752 158.383 27.3073 159.418 26.9807 160.386L26.5087 161.684C26.5087 161.684 24.6208 157.908 24.6208 157.436V158.616C24.6208 158.616 23.3229 157.554 23.3229 156.846L22.615 157.672L22.261 156.374L17.8953 157.672L18.6032 156.61L15.8894 156.964L16.9514 155.666C16.9514 155.666 13.8836 157.2 13.7656 158.498C13.6476 159.796 12.1137 161.448 12.1137 161.448L11.4058 160.268C11.4058 160.268 10.3438 154.958 13.7656 153.188Z",1,"fill-color-21"],["d","M76.75 31C68.1896 31 61.25 24.0604 61.25 15.5C61.25 6.93959 68.1896 0 76.75 0C85.3104 0 92.25 6.93959 92.25 15.5C92.25 24.0604 85.3104 31 76.75 31Z",1,"fill-color-25"],["d","M77.1792 24.7687C73.2027 24.7687 69.9792 21.5452 69.9792 17.5687C69.9792 13.5923 73.2027 10.3687 77.1792 10.3687C81.1556 10.3687 84.3792 13.5923 84.3792 17.5687C84.3792 21.5452 81.1556 24.7687 77.1792 24.7687Z",1,"fill-color-22"],["d","M82.7344 10.1883L84.0324 9.71628C84.0324 9.71628 81.3185 7.00246 77.5428 7.23845L78.6047 6.17651C78.6047 6.17651 76.0089 5.23258 73.649 7.71041C72.4085 9.01295 70.9732 10.544 70.0784 12.2687H68.6884L69.2686 13.429L67.2381 14.5893L69.3222 14.3808C69.1248 15.3825 69.1927 16.4184 69.5193 17.3858L69.9913 18.6837C69.9913 18.6837 71.8792 14.9079 71.8792 14.4359V15.6159C71.8792 15.6159 73.1771 14.5539 73.1771 13.846L73.885 14.6719L74.239 13.374L78.6047 14.6719L77.8968 13.61L80.6106 13.964L79.5486 12.6661C79.5486 12.6661 82.6164 14.2 82.7344 15.4979C82.8524 16.7958 84.3863 18.4477 84.3863 18.4477L85.0942 17.2678C85.0942 17.2678 86.1562 11.9581 82.7344 10.1883Z",1,"fill-color-21"],["d","M141.365 153.936C139.147 150.189 134.759 150.014 134.759 150.014C134.759 150.014 130.483 149.467 127.74 155.175C125.183 160.495 121.655 165.632 127.172 166.877L128.168 163.776L128.786 167.108C129.571 167.165 130.359 167.178 131.146 167.149C137.055 166.958 142.681 167.204 142.5 165.084C142.259 162.266 143.499 157.542 141.365 153.936Z",1,"fill-color-21"],["d","M140.968 160.376C141.521 160.376 141.968 159.928 141.968 159.376C141.968 158.823 141.521 158.376 140.968 158.376C140.416 158.376 139.968 158.823 139.968 159.376C139.968 159.928 140.416 160.376 140.968 160.376Z",1,"fill-color-22"],["d","M129.168 160.376C129.721 160.376 130.168 159.928 130.168 159.376C130.168 158.823 129.721 158.376 129.168 158.376C128.616 158.376 128.168 158.823 128.168 159.376C128.168 159.928 128.616 160.376 129.168 160.376Z",1,"fill-color-22"],["d","M135.068 165.276C138.272 165.276 140.868 162.679 140.868 159.476C140.868 156.272 138.272 153.676 135.068 153.676C131.865 153.676 129.268 156.272 129.268 159.476C129.268 162.679 131.865 165.276 135.068 165.276Z",1,"fill-color-22"],["d","M140.384 153.575L136.049 151.304L130.062 152.233L128.824 157.704L131.907 157.585L132.768 155.576V157.552L134.191 157.498L135.017 154.298L135.533 157.704L140.591 157.601L140.384 153.575Z",1,"fill-color-21"],["d","M79.4007 199.301C83.9022 199.301 87.5514 195.652 87.5514 191.151C87.5514 186.649 83.9022 183 79.4007 183C74.8992 183 71.25 186.649 71.25 191.151C71.25 195.652 74.8992 199.301 79.4007 199.301Z",1,"fill-color-17"],["d","M82.9375 189.25H80.2188L81.2266 186.227C81.3203 185.852 81.0391 185.5 80.6875 185.5H77.3125C77.0313 185.5 76.7735 185.711 76.75 185.992L76 191.617C75.9531 191.969 76.211 192.25 76.5625 192.25H79.3281L78.25 196.82C78.1797 197.172 78.4375 197.5 78.7891 197.5C79 197.5 79.1875 197.406 79.2813 197.219L83.4063 190.094C83.6406 189.742 83.3594 189.25 82.9375 189.25Z","fill","white"],["d","M106.555 91.8125C106.789 92.0469 107.188 92.0469 107.422 91.8125L114.312 84.9219C114.547 84.6875 114.547 84.2891 114.312 84.0547L113.469 83.2109C113.234 82.9766 112.859 82.9766 112.625 83.2109L107 88.8359L104.352 86.2109C104.117 85.9766 103.742 85.9766 103.508 86.2109L102.664 87.0547C102.43 87.2891 102.43 87.6875 102.664 87.9219L106.555 91.8125Z","fill","white"],["d","M106.555 124.812C106.789 125.047 107.188 125.047 107.422 124.812L114.312 117.922C114.547 117.688 114.547 117.289 114.312 117.055L113.469 116.211C113.234 115.977 112.859 115.977 112.625 116.211L107 121.836L104.352 119.211C104.117 118.977 103.742 118.977 103.508 119.211L102.664 120.055C102.43 120.289 102.43 120.688 102.664 120.922L106.555 124.812Z","fill","white"],["id","paint0_linear","x1","108.567","y1","63.3516","x2","108.567","y2","45.778","gradientUnits","userSpaceOnUse"],["fill-rule","evenodd","clip-rule","evenodd","d","M76.25 191C114.91 191 146.25 158.541 146.25 118.5C146.25 78.4594 114.91 46 76.25 46C37.5901 46 6.25 78.4594 6.25 118.5C6.25 158.541 37.5901 191 76.25 191Z","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7",1,"fill-color-0","stroke-color-primary"],["d","M120.908 104.177H33.7393V135.425H120.908V104.177Z","fill","white"],["d","M120.908 71.7129H33.7393V102.96H120.908V71.7129Z","fill","white"],["d","M108.567 95.1801C113.069 95.1801 116.718 91.5309 116.718 87.0294C116.718 82.5279 113.069 78.8787 108.567 78.8787C104.066 78.8787 100.417 82.5279 100.417 87.0294C100.417 91.5309 104.066 95.1801 108.567 95.1801Z",1,"fill-color-primary-darker"],["d","M120.908 39.2482H33.7393V70.4955H120.908V39.2482Z","fill","white"],["d","M92.0943 46.662H40.8943V62.6739H92.0943V46.662Z",1,"fill-color-primary-darker"],["d","M76 112H41V128H76V112Z",1,"fill-color-17"],["d","M70 79H41V95H70V79Z",1,"fill-color-17"],["d","M70 47H41V63H70V47Z",1,"fill-color-17"],["d","M108.568 63.3516C113.42 63.3516 117.354 59.4176 117.354 54.5648C117.354 49.712 113.42 45.778 108.568 45.778C103.715 45.778 99.7808 49.712 99.7808 54.5648C99.7808 59.4176 103.715 63.3516 108.568 63.3516Z","fill","url(#paint0_linear)"],["d","M108.568 96.0334C113.42 96.0334 117.354 92.0994 117.354 87.2466C117.354 82.3938 113.42 78.4598 108.568 78.4598C103.715 78.4598 99.7808 82.3938 99.7808 87.2466C99.7808 92.0994 103.715 96.0334 108.568 96.0334Z",1,"fill-color-17"],["d","M108.568 129.496C113.42 129.496 117.354 125.562 117.354 120.709C117.354 115.856 113.42 111.922 108.568 111.922C103.715 111.922 99.7808 115.856 99.7808 120.709C99.7808 125.562 103.715 129.496 108.568 129.496Z",1,"fill-color-17"],["d","M106.805 91.8125C107.039 92.0469 107.438 92.0469 107.672 91.8125L114.562 84.9219C114.797 84.6875 114.797 84.2891 114.562 84.0547L113.719 83.2109C113.484 82.9766 113.109 82.9766 112.875 83.2109L107.25 88.8359L104.602 86.2109C104.367 85.9766 103.992 85.9766 103.758 86.2109L102.914 87.0547C102.68 87.2891 102.68 87.6875 102.914 87.9219L106.805 91.8125Z","fill","white"],["d","M106.805 58.8125C107.039 59.0469 107.438 59.0469 107.672 58.8125L114.562 51.9219C114.797 51.6875 114.797 51.2891 114.562 51.0547L113.719 50.2109C113.484 49.9766 113.109 49.9766 112.875 50.2109L107.25 55.8359L104.602 53.2109C104.367 52.9766 103.992 52.9766 103.758 53.2109L102.914 54.0547C102.68 54.2891 102.68 54.6875 102.914 54.9219L106.805 58.8125Z","fill","white"],["d","M11.7891 120C12.4922 120 12.8437 119.141 12.3359 118.633L7.33593 113.633C7.02343 113.32 6.51562 113.32 6.20312 113.633L1.20312 118.633C0.695303 119.141 1.04687 120 1.74999 120H11.7891Z",1,"fill-color-17"],["d","M77.1792 24.7688C73.2027 24.7688 69.9792 21.5452 69.9792 17.5688C69.9792 13.5923 73.2027 10.3688 77.1792 10.3688C81.1556 10.3688 84.3792 13.5923 84.3792 17.5688C84.3792 21.5452 81.1556 24.7688 77.1792 24.7688Z",1,"fill-color-22"],["d","M141.365 153.936C139.147 150.189 134.759 150.014 134.759 150.014C134.759 150.014 130.483 149.467 127.74 155.175C125.183 160.495 121.655 165.632 127.172 166.877L128.168 163.776L128.785 167.108C129.571 167.165 130.359 167.178 131.146 167.149C137.055 166.958 142.681 167.204 142.5 165.084C142.259 162.266 143.499 157.543 141.365 153.936Z",1,"fill-color-21"],["d","M82.9374 189.25H80.2186L81.2265 186.227C81.3202 185.852 81.039 185.5 80.6874 185.5H77.3124C77.0311 185.5 76.7733 185.711 76.7499 185.992L75.9999 191.617C75.953 191.969 76.2108 192.25 76.5624 192.25H79.328L78.2499 196.82C78.1796 197.172 78.4374 197.5 78.789 197.5C78.9999 197.5 79.1874 197.406 79.2811 197.219L83.4061 190.094C83.6405 189.742 83.3593 189.25 82.9374 189.25Z","fill","white"],["id","paint0_linear","x1","108.568","y1","63.3516","x2","108.568","y2","45.778","gradientUnits","userSpaceOnUse"]],template:function(i,a){if(1&i&&t.DNE(0,As,1,0,"ng-container",5)(1,Ns,47,5,"ng-template",null,0,t.C5r)(3,Ms,96,5,"ng-template",null,1,t.C5r)(5,Bs,68,5,"ng-template",null,2,t.C5r)(7,$s,53,5,"ng-template",null,3,t.C5r)(9,Vs,52,5,"ng-template",null,4,t.C5r),2&i){const s=t.sdS(2),r=t.sdS(4),m=t.sdS(6),T=t.sdS(8),y=t.sdS(10);t.Y8G("ngTemplateOutlet",1===a.stepNumber?s:2===a.stepNumber?r:3===a.stepNumber?m:4===a.stepNumber?T:y)}},dependencies:[p.YU,p.T3,h.DJ,h.sA,h.UI,L.PW,E.Lc,E.dh],styles:["svg.small-svg[_ngcontent-%COMP%]{height:10%;min-height:10%;max-width:50%;margin:auto}svg.large-svg[_ngcontent-%COMP%]{height:60%;min-height:60%;max-width:50%;margin:auto}"],data:{animation:[Gs.k]}})}return n})();const Hs=["stepper"],Ys=()=>[1,2,3,4,5],Xs=(n,o)=>({"dot-primary":n,"dot-primary-lighter":o});function Us(n,o){if(1&n&&t.EFF(0),2&n){const e=t.XpG(2);t.JRh(e.inputFormLabel)}}function zs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Amount is required."),t.k0s())}function Js(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Amount must be a positive number."),t.k0s())}function qs(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.SpI("Amount must be less than or equal to ",null==e.selChannel?null:e.selChannel.toLocal,".")}}function Qs(n,o){if(1&n&&(t.j41(0,"mat-option",50),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e),t.R7$(),t.Lme("",e.alias," - ",e.shortChannelId,"")}}function Zs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Receive from Peer is required."),t.k0s())}function Ws(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Receive from Peer not found in the list."),t.k0s())}function Ks(n,o){1&n&&t.EFF(0,"Status")}function tl(n,o){1&n&&t.nrm(0,"mat-progress-bar",51)}function el(n,o){if(1&n&&(t.j41(0,"mat-icon",52),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(""!==e.rebalanceStatus.invoice?"check":"close")}}function nl(n,o){1&n&&t.nrm(0,"mat-progress-bar",51)}function il(n,o){if(1&n&&(t.j41(0,"mat-icon",52),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.rebalanceStatus.paymentRoute?"check":"close")}}function al(n,o){if(1&n&&(t.j41(0,"span",42),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",e," ")}}function ol(n,o){if(1&n&&(t.j41(0,"div",7),t.DNE(1,al,2,1,"span",53),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.rebalanceStatus.paymentRoute.split(","))}}function sl(n,o){1&n&&t.nrm(0,"mat-progress-bar",51)}function ll(n,o){if(1&n&&(t.j41(0,"mat-icon",52),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(!e.rebalanceStatus.paymentStatus||null!=e.rebalanceStatus.paymentStatus&&e.rebalanceStatus.paymentStatus.error?"close":"check")}}function rl(n,o){1&n&&t.nrm(0,"div",7)}function cl(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",54),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onRestart())}),t.EFF(1,"Start Again"),t.k0s()}}function ml(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",7)(1,"mat-card-header",8)(2,"div",9)(3,"div",10)(4,"span",11),t.EFF(5,"Channel Rebalance"),t.k0s()(),t.j41(6,"div",12)(7,"button",13),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.showInfo())}),t.EFF(8,"?"),t.k0s(),t.j41(9,"button",14),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onClose())}),t.EFF(10,"X"),t.k0s()()()(),t.j41(11,"mat-card-content",15)(12,"div",7)(13,"div",16)(14,"div",17),t.nrm(15,"fa-icon",18),t.j41(16,"span"),t.EFF(17,"Circular Rebalance is a payment you make to *yourself* to affect a relative change in the balances of two channels. This is accomplished by sending payment out from the selected channel and receiving it back on the channel with the selected peer. Please note, you will be paying routing fee to balance the channels in this manner."),t.k0s()()(),t.j41(18,"div",19)(19,"p",20)(20,"strong"),t.EFF(21,"Channel Peer:\xa0"),t.k0s(),t.EFF(22),t.nI1(23,"titlecase"),t.k0s(),t.j41(24,"p",20)(25,"strong"),t.EFF(26,"Channel ID:\xa0"),t.k0s(),t.EFF(27),t.k0s()(),t.j41(28,"mat-vertical-stepper",21,3)(30,"mat-step",22)(31,"form",23),t.DNE(32,Us,1,1,"ng-template",24),t.j41(33,"div",25)(34,"mat-form-field",26)(35,"mat-label"),t.EFF(36,"Amount"),t.k0s(),t.nrm(37,"input",27),t.j41(38,"mat-hint"),t.EFF(39),t.k0s(),t.j41(40,"span",28),t.EFF(41,"Sats"),t.k0s(),t.DNE(42,zs,2,0,"mat-error",29)(43,Js,2,0,"mat-error",29)(44,qs,2,1,"mat-error",29),t.k0s(),t.j41(45,"mat-form-field",30)(46,"mat-label"),t.EFF(47,"Receive from Peer"),t.k0s(),t.j41(48,"input",31),t.bIt("change",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onSelectedPeerChanged())}),t.k0s(),t.j41(49,"mat-autocomplete",32,4),t.bIt("optionSelected",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onSelectedPeerChanged())}),t.DNE(51,Qs,2,3,"mat-option",33),t.nI1(52,"async"),t.k0s(),t.DNE(53,Zs,2,0,"mat-error",29)(54,Ws,2,0,"mat-error",29),t.k0s()(),t.j41(55,"div",34)(56,"button",35),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onRebalance())}),t.EFF(57,"Rebalance"),t.k0s()()()(),t.j41(58,"mat-step",36)(59,"form",23),t.DNE(60,Ks,1,0,"ng-template",24),t.j41(61,"div",37),t.DNE(62,tl,1,0,"mat-progress-bar",38),t.j41(63,"mat-expansion-panel",39)(64,"mat-expansion-panel-header")(65,"mat-panel-title")(66,"span",40),t.EFF(67),t.DNE(68,el,2,1,"mat-icon",41),t.k0s()()(),t.j41(69,"div",7)(70,"span",42),t.EFF(71),t.k0s()()(),t.DNE(72,nl,1,0,"mat-progress-bar",38),t.j41(73,"mat-expansion-panel",39)(74,"mat-expansion-panel-header")(75,"mat-panel-title")(76,"span",40),t.EFF(77),t.DNE(78,il,2,1,"mat-icon",41),t.k0s()()(),t.DNE(79,ol,2,1,"div",5),t.k0s(),t.DNE(80,sl,1,0,"mat-progress-bar",38),t.j41(81,"mat-expansion-panel",43)(82,"mat-expansion-panel-header")(83,"mat-panel-title")(84,"span",40),t.EFF(85),t.DNE(86,ll,2,1,"mat-icon",41),t.k0s()()(),t.DNE(87,rl,1,0,"div",44),t.k0s()(),t.j41(88,"h4",45),t.EFF(89),t.k0s(),t.j41(90,"div",46),t.DNE(91,cl,2,0,"button",47),t.k0s()()()(),t.j41(92,"div",48)(93,"button",49),t.EFF(94,"Close"),t.k0s()()()()()}if(2&n){const e=t.sdS(50),i=t.XpG(),a=t.sdS(2);t.Y8G("@opacityAnimation",void 0),t.R7$(15),t.Y8G("icon",i.faInfoCircle),t.R7$(7),t.JRh(t.bMT(23,38,i.selChannel.alias)),t.R7$(5),t.JRh(i.selChannel.shortChannelId),t.R7$(),t.Y8G("linear",!0),t.R7$(2),t.Y8G("stepControl",i.inputFormGroup)("editable",i.flgEditable),t.R7$(),t.Y8G("formGroup",i.inputFormGroup),t.R7$(6),t.Y8G("step",100),t.R7$(2),t.Lme("(Local Bal: ",null==i.selChannel?null:i.selChannel.toLocal,", Remaining: ",(null==i.selChannel?null:i.selChannel.toLocal)-(i.inputFormGroup.controls.rebalanceAmount.value?i.inputFormGroup.controls.rebalanceAmount.value:0),")"),t.R7$(3),t.Y8G("ngIf",null==i.inputFormGroup.controls.rebalanceAmount.errors?null:i.inputFormGroup.controls.rebalanceAmount.errors.required),t.R7$(),t.Y8G("ngIf",null==i.inputFormGroup.controls.rebalanceAmount.errors?null:i.inputFormGroup.controls.rebalanceAmount.errors.min),t.R7$(),t.Y8G("ngIf",null==i.inputFormGroup.controls.rebalanceAmount.errors?null:i.inputFormGroup.controls.rebalanceAmount.errors.max),t.R7$(4),t.Y8G("matAutocomplete",e),t.R7$(),t.Y8G("displayWith",i.displayFn),t.R7$(2),t.Y8G("ngForOf",t.bMT(52,40,i.filteredActiveChannels)),t.R7$(2),t.Y8G("ngIf",null==i.inputFormGroup.controls.selRebalancePeer.errors?null:i.inputFormGroup.controls.selRebalancePeer.errors.required),t.R7$(),t.Y8G("ngIf",null==i.inputFormGroup.controls.selRebalancePeer.errors?null:i.inputFormGroup.controls.selRebalancePeer.errors.notfound),t.R7$(4),t.Y8G("stepControl",i.statusFormGroup),t.R7$(),t.Y8G("formGroup",i.statusFormGroup),t.R7$(3),t.Y8G("ngIf",""===i.rebalanceStatus.invoice),t.R7$(5),t.JRh(""===i.rebalanceStatus.invoice?"Searching invoice...":i.rebalanceStatus.flgReusingInvoice?"Invoice re-used":"Invoice generated"),t.R7$(),t.Y8G("ngIf",""!==i.rebalanceStatus.invoice),t.R7$(3),t.JRh(i.rebalanceStatus.invoice),t.R7$(),t.Y8G("ngIf",!(null!=i.rebalanceStatus.paymentStatus&&i.rebalanceStatus.paymentStatus.error||i.rebalanceStatus.paymentRoute||"pending"===(null==i.rebalanceStatus.paymentStatus?null:i.rebalanceStatus.paymentStatus.type))),t.R7$(5),t.JRh(null!=i.rebalanceStatus.paymentStatus&&i.rebalanceStatus.paymentStatus.error?"Route failed":i.rebalanceStatus.paymentRoute?"Route used":"Searching route..."),t.R7$(),t.Y8G("ngIf",i.rebalanceStatus.paymentStatus),t.R7$(),t.Y8G("ngIf",""!==i.rebalanceStatus.paymentRoute),t.R7$(),t.Y8G("ngIf",!i.rebalanceStatus.paymentStatus),t.R7$(),t.Y8G("expanded",!!i.rebalanceStatus.paymentStatus),t.R7$(4),t.JRh(i.rebalanceStatus.paymentStatus&&"pending"!==(null==i.rebalanceStatus.paymentStatus?null:i.rebalanceStatus.paymentStatus.type)?null!=i.rebalanceStatus.paymentStatus&&i.rebalanceStatus.paymentStatus.error?"Payment failed":"sent"===(null==i.rebalanceStatus.paymentStatus?null:i.rebalanceStatus.paymentStatus.type)?"Payment successful":"":"Payment status pending..."),t.R7$(),t.Y8G("ngIf",i.rebalanceStatus.paymentStatus&&"pending"!==(null==i.rebalanceStatus.paymentStatus?null:i.rebalanceStatus.paymentStatus.type)),t.R7$(),t.Y8G("ngIf",!i.rebalanceStatus.paymentStatus)("ngIfElse",a),t.R7$(2),t.JRh(i.rebalanceStatus.paymentStatus?i.rebalanceStatus.paymentStatus&&null!=i.rebalanceStatus.paymentStatus&&i.rebalanceStatus.paymentStatus.error?"Rebalance Failed.":"Rebalance Successful.":""),t.R7$(2),t.Y8G("ngIf",i.rebalanceStatus.paymentStatus&&i.rebalanceStatus.paymentStatus.error),t.R7$(2),t.Y8G("mat-dialog-close",!1)}}function pl(n,o){1&n&&t.eu8(0)}function ul(n,o){if(1&n&&t.DNE(0,pl,1,0,"ng-container",55),2&n){const e=t.XpG(),i=t.sdS(4),a=t.sdS(6);t.Y8G("ngTemplateOutlet",e.rebalanceStatus.paymentStatus.error?i:a)}}function dl(n,o){if(1&n&&(t.j41(0,"div",7)(1,"span",42),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI("Error: ",e.rebalanceStatus.paymentStatus.error,"")}}function hl(n,o){if(1&n&&(t.j41(0,"div",7)(1,"div",56)(2,"div",57)(3,"h4",58),t.EFF(4,"Total Fees (Sats)"),t.k0s(),t.j41(5,"span",42),t.EFF(6),t.k0s()(),t.j41(7,"div",57)(8,"h4",58),t.EFF(9,"Number of Hops"),t.k0s(),t.j41(10,"span",42),t.EFF(11),t.k0s()()(),t.nrm(12,"mat-divider",59),t.j41(13,"div",56)(14,"div",60)(15,"h4",58),t.EFF(16,"Payment Hash"),t.k0s(),t.j41(17,"span",42),t.EFF(18),t.k0s()()(),t.nrm(19,"mat-divider",59),t.j41(20,"div",56)(21,"div",60)(22,"h4",58),t.EFF(23,"Payment ID"),t.k0s(),t.j41(24,"span",42),t.EFF(25),t.k0s()()(),t.nrm(26,"mat-divider",59),t.j41(27,"div",56)(28,"div",60)(29,"h4",58),t.EFF(30,"Parent ID"),t.k0s(),t.j41(31,"span",42),t.EFF(32),t.k0s()()()()),2&n){let e;const i=t.XpG();t.R7$(6),t.JRh(i.rebalanceStatus.paymentStatus.feesPaid?i.rebalanceStatus.paymentStatus.feesPaid/1e3:0),t.R7$(5),t.JRh(i.rebalanceStatus.paymentRoute&&""!==i.rebalanceStatus.paymentRoute?null==(e=i.rebalanceStatus.paymentRoute.split(","))?null:e.length:0),t.R7$(7),t.JRh(i.rebalanceStatus.paymentHash),t.R7$(7),t.JRh(i.rebalanceStatus.paymentDetails.paymentId),t.R7$(7),t.JRh(i.rebalanceStatus.paymentDetails.parentId)}}function fl(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",76),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2);return t.Njj(s.onStepChanged(a))}),t.nrm(1,"p",77),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngClass",t.l_i(1,Xs,i.stepNumber===e,i.stepNumber!==e))}}function _l(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",78),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onStepChanged(4))}),t.EFF(1,"Back"),t.k0s()}}function gl(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",79),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return a.flgShowInfo=!1,t.Njj(a.stepNumber=1)}),t.EFF(1,"Close"),t.k0s()}}function Cl(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",80),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return a.flgShowInfo=!1,t.Njj(a.stepNumber=1)}),t.EFF(1,"Close"),t.k0s()}}function yl(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",81),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onStepChanged(a.stepNumber-1))}),t.EFF(1,"Back"),t.k0s()}}function bl(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",82),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onStepChanged(a.stepNumber+1))}),t.EFF(1,"Next"),t.k0s()}}function Fl(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",61)(1,"div",62)(2,"mat-card-header",63)(3,"div",64),t.nrm(4,"span",11),t.k0s(),t.j41(5,"div",65)(6,"button",14),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return a.flgShowInfo=!1,t.Njj(a.stepNumber=1)}),t.EFF(7,"X"),t.k0s()()(),t.j41(8,"mat-card-content",66)(9,"rtl-ecl-channel-rebalance-infographics",67),t.mxI("stepNumberChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.stepNumber,a)||(s.stepNumber=a),t.Njj(a)}),t.k0s()(),t.j41(10,"div",68),t.DNE(11,fl,2,4,"span",69),t.k0s(),t.j41(12,"div",70),t.DNE(13,_l,2,0,"button",71)(14,gl,2,0,"button",72)(15,Cl,2,0,"button",73)(16,yl,2,0,"button",74)(17,bl,2,0,"button",75),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("@opacityAnimation",void 0),t.R7$(9),t.Y8G("animationDirection",e.animationDirection),t.R50("stepNumber",e.stepNumber),t.R7$(2),t.Y8G("ngForOf",t.lJ4(9,Ys)),t.R7$(2),t.Y8G("ngIf",5===e.stepNumber),t.R7$(),t.Y8G("ngIf",5===e.stepNumber),t.R7$(),t.Y8G("ngIf",e.stepNumber<5),t.R7$(),t.Y8G("ngIf",e.stepNumber>1&&e.stepNumber<5),t.R7$(),t.Y8G("ngIf",e.stepNumber<5)}}let El=(()=>{class n{constructor(e,i,a,s,r,m,T){this.dialogRef=e,this.data=i,this.logger=a,this.dataService=s,this.formBuilder=r,this.store=m,this.decimalPipe=T,this.faInfoCircle=F.iW_,this.information={},this.selChannel={},this.activeChannels=[],this.rebalanceStatus={flgReusingInvoice:!1,invoice:"",paymentRoute:"",paymentHash:"",paymentDetails:null,paymentStatus:null},this.inputFormLabel="Amount to rebalance",this.flgEditable=!0,this.flgShowInfo=!1,this.stepNumber=1,this.animationDirection="forward",this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){let e="",i="";this.information=this.data.message?.information||{},this.selChannel=this.data.message?.selChannel||{},this.activeChannels=this.data.message?.channels?.filter(a=>a.channelId!==this.selChannel.channelId&&a.toRemote&&a.toRemote>0)||[],this.activeChannels=this.activeChannels.sort((a,s)=>(e=a.alias?a.alias.toLowerCase():a.shortChannelId?a.shortChannelId.toLowerCase():"",i=s.alias?s.alias.toLowerCase():a.shortChannelId?a.shortChannelId.toLowerCase():"",e<i?-1:e>i?1:0)),this.inputFormGroup=this.formBuilder.group({rebalanceAmount:["",[d.k0.required,d.k0.min(1),d.k0.max(this.selChannel.toLocal||0)]],selRebalancePeer:[null,d.k0.required]}),this.statusFormGroup=this.formBuilder.group({}),this.inputFormGroup.get("rebalanceAmount")?.valueChanges.pipe((0,f.Q)(this.unSubs[0]),(0,_t.Z)(0)).subscribe(a=>{this.inputFormGroup.controls.selRebalancePeer.setValue(""),this.inputFormGroup.controls.selRebalancePeer.setErrors(null),this.filteredActiveChannels=(0,Ct.of)(a?this.filterActiveChannels():this.activeChannels.slice())}),this.inputFormGroup.get("selRebalancePeer")?.valueChanges.pipe((0,f.Q)(this.unSubs[1]),(0,_t.Z)("")).subscribe(a=>{"string"==typeof a&&(this.filteredActiveChannels=(0,Ct.of)(this.filterActiveChannels()))})}stepSelectionChanged(e){switch(e.selectedIndex){case 0:default:this.inputFormLabel="Amount to rebalance";break;case 1:this.inputFormLabel=this.inputFormGroup.controls.rebalanceAmount.value||this.inputFormGroup.controls.selRebalancePeer.value.alias?"Rebalancing Amount: "+this.decimalPipe.transform(this.inputFormGroup.controls.rebalanceAmount.value?this.inputFormGroup.controls.rebalanceAmount.value:0)+" Sats | Peer: "+(this.inputFormGroup.controls.selRebalancePeer.value.alias?this.inputFormGroup.controls.selRebalancePeer.value.alias:this.inputFormGroup.controls.selRebalancePeer.value.nodeId.substring(0,15)+"..."):"Amount to rebalance"}}onRebalance(){if(!this.inputFormGroup.controls.rebalanceAmount.value||this.inputFormGroup.controls.rebalanceAmount.value<=0||this.selChannel.toLocal&&this.inputFormGroup.controls.rebalanceAmount.value>+this.selChannel.toLocal||!this.inputFormGroup.controls.selRebalancePeer.value.nodeId)return this.inputFormGroup.controls.selRebalancePeer.value.nodeId||this.inputFormGroup.controls.selRebalancePeer.setErrors({required:!0}),!0;this.stepper.next(),this.flgEditable=!1,this.rebalanceStatus={flgReusingInvoice:!1,invoice:"",paymentRoute:"",paymentHash:"",paymentDetails:null,paymentStatus:null},this.dataService.circularRebalance(1e3*this.inputFormGroup.controls.rebalanceAmount.value,this.selChannel.shortChannelId,this.selChannel.nodeId,this.inputFormGroup.controls.selRebalancePeer.value.shortChannelId,this.inputFormGroup.controls.selRebalancePeer.value.nodeId,[this.information.nodeId||""]).pipe((0,f.Q)(this.unSubs[2])).subscribe({next:e=>{this.logger.info(e),this.rebalanceStatus=e,this.flgEditable=!0,this.store.dispatch((0,k.$Q)())},error:e=>{this.logger.error(e),this.rebalanceStatus=e,this.flgEditable=!0}})}filterActiveChannels(){return this.activeChannels?.filter(e=>e.toRemote&&e.toRemote>=this.inputFormGroup.controls.rebalanceAmount.value&&e.channelId!==this.selChannel.channelId&&(0===e.alias?.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():"")||0===e.channelId?.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():"")))}onSelectedPeerChanged(){if(this.inputFormGroup.controls.selRebalancePeer.value&&this.inputFormGroup.controls.selRebalancePeer.value.length>0&&"string"==typeof this.inputFormGroup.controls.selRebalancePeer.value){const e=this.activeChannels?.filter(i=>i.alias?.length===this.inputFormGroup.controls.selRebalancePeer.value.length&&0===i.alias?.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():""));e&&e.length>0?(this.inputFormGroup.controls.selRebalancePeer.setValue(e[0]),this.inputFormGroup.controls.selRebalancePeer.setErrors(null)):this.inputFormGroup.controls.selRebalancePeer.setErrors({notfound:!0})}}displayFn(e){return e&&e.alias?e.alias:e&&e.shortChannelId?e.shortChannelId:""}showInfo(){this.flgShowInfo=!0}onStepChanged(e){this.animationDirection=e<this.stepNumber?"backward":"forward",this.stepNumber=e}onClose(){this.dialogRef.close(!1)}onRestart(){this.flgEditable=!0,this.stepper.reset(),this.inputFormGroup.reset(),this.statusFormGroup.reset(),this.inputFormGroup.controls.rebalanceAmount.setValue(""),this.inputFormGroup.controls.rebalanceAmount.setErrors(null),this.inputFormGroup.controls.selRebalancePeer.setValue(""),this.inputFormGroup.controls.selRebalancePeer.setErrors(null),this.filteredActiveChannels=(0,Ct.of)(this.activeChannels)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(B.CP),t.rXU(B.Vh),t.rXU(G.gP),t.rXU(et.u),t.rXU(d.ok),t.rXU(R.il),t.rXU(p.QX))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-rebalance"]],viewQuery:function(i,a){if(1&i&&t.GBs(Hs,5),2&i){let s;t.mGM(s=t.lsd())&&(a.stepper=s.first)}},decls:8,vars:2,consts:[["paymentStatusBlock",""],["paymentFailedBlock",""],["paymentSuccessfulBlock",""],["stepper",""],["auto","matAutocomplete"],["fxLayout","column",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch","class","info-graphics-container",4,"ngIf"],["fxLayout","column"],[1,"modal-info-header"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxLayoutAlign","start center"],[1,"page-title"],["fxLayoutAlign","end center"],["tabindex","21","mat-button","",1,"btn-close-x","p-0",3,"click"],["tabindex","22","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","space-between stretch",1,"padding-gap-large"],["fxFlex","46"],[3,"linear"],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","48"],["autoFocus","","matInput","","type","number","tabindex","1","formControlName","rebalanceAmount","required","",3,"step"],["matSuffix",""],[4,"ngIf"],["fxLayout","column","fxFlex","48","fxLayoutAlign","start end"],["type","text","aria-label","Receive from Peer","matInput","","formControlName","selRebalancePeer","tabindex","2","required","",3,"change","matAutocomplete"],[3,"optionSelected","displayWith"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","submit",3,"click"],[3,"stepControl"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100","color","primary","mode","indeterminate",4,"ngIf"],["fxFlex","100",1,"flat-expansion-panel","mb-2"],["fxLayoutAlign","start center","fxFlex","100"],["class","ml-1 icon-small",4,"ngIf"],[1,"foreground-secondary-text"],["fxFlex","100",1,"flat-expansion-panel",3,"expanded"],["fxLayout","column",4,"ngIf","ngIfElse"],["fxLayoutAlign","start",1,"font-bold-500","mt-1"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-1"],["mat-button","","color","primary","tabindex","11","type","button",3,"click",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],[3,"value"],["fxFlex","100","color","primary","mode","indeterminate"],[1,"ml-1","icon-small"],["class","foreground-secondary-text",4,"ngFor","ngForOf"],["mat-button","","color","primary","tabindex","11","type","button",3,"click"],[4,"ngTemplateOutlet"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"w-100","my-1"],["fxFlex","100"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"info-graphics-container"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","8","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],["fxFlex","5","fxLayoutAlign","end center"],["fxLayout","column","fxFlex","70","fxLayoutAlign","space-between center",1,"padding-gap-x-large"],["fxFlex","100",3,"stepNumberChange","animationDirection","stepNumber"],["fxLayout","row","fxFlex","10","fxLayoutAlign","center end",1,"padding-gap-x-large","padding-gap-bottom-large"],["tabindex","21","fxLayoutAlign","center center","class","dots-stepper-block",3,"click",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","10","fxLayoutAlign","end end",1,"padding-gap-x-large","padding-gap-bottom-large"],["mat-button","","class","mr-1","color","primary","tabindex","16","type","button",3,"click",4,"ngIf"],["mat-button","","color","primary","tabindex","17","type","button",3,"click",4,"ngIf"],["mat-button","","class","mr-1","color","primary","tabindex","18","type","button",3,"click",4,"ngIf"],["mat-button","","class","mr-1","color","primary","tabindex","19","type","button",3,"click",4,"ngIf"],["mat-button","","color","primary","tabindex","20","type","button",3,"click",4,"ngIf"],["tabindex","21","fxLayoutAlign","center center",1,"dots-stepper-block",3,"click"],[1,"dot","tiny-dot","mr-0",3,"ngClass"],["mat-button","","color","primary","tabindex","16","type","button",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","17","type","button",3,"click"],["mat-button","","color","primary","tabindex","18","type","button",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","19","type","button",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","20","type","button",3,"click"]],template:function(i,a){1&i&&t.DNE(0,ml,95,42,"div",5)(1,ul,1,1,"ng-template",null,0,t.C5r)(3,dl,3,1,"ng-template",null,1,t.C5r)(5,hl,33,5,"ng-template",null,2,t.C5r)(7,Fl,18,10,"div",6),2&i&&(t.Y8G("ngIf",!a.flgShowInfo),t.R7$(7),t.Y8G("ngIf",a.flgShowInfo))},dependencies:[p.YU,p.Sq,p.bT,p.T3,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.j4,d.JD,w.aY,h.DJ,h.sA,h.UI,L.PW,B.tx,j.$z,E.m2,E.MM,Y.GK,Y.Z2,Y.WN,ct.An,O.fg,g.rl,g.nJ,g.MV,g.TL,g.yw,Z.q,V.HM,X.wT,tt.V5,tt.Ti,tt.M6,st.$3,st.pN,W.N,Os,p.Jj,p.PV],styles:[".dots-stepper-block[_ngcontent-%COMP%]{width:3rem}.info-graphics-container[_ngcontent-%COMP%]{max-height:30rem;min-height:30rem;overflow-x:hidden}"],data:{animation:[yt.C]}})}return n})();const xl=()=>["all"],Ll=n=>({"error-border":n}),Sl=()=>["no_peer"],bt=n=>({width:n}),vl=n=>({"display-none":n});function Rl(n,o){if(1&n&&(t.j41(0,"mat-option",36),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG();t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function Il(n,o){1&n&&t.nrm(0,"mat-progress-bar",37)}function kl(n,o){1&n&&t.nrm(0,"th",38)}function Tl(n,o){if(1&n&&(t.j41(0,"span",42),t.nrm(1,"fa-icon",43),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.faEyeSlash)}}function wl(n,o){if(1&n&&(t.j41(0,"span",44),t.nrm(1,"fa-icon",43),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.faEye)}}function jl(n,o){if(1&n&&(t.j41(0,"td",39),t.DNE(1,Tl,2,1,"span",40)(2,wl,2,1,"span",41),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf",!(null!=e&&e.announceChannel)),t.R7$(),t.Y8G("ngIf",null==e?null:e.announceChannel)}}function Dl(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Short Channel ID"),t.k0s())}function Pl(n,o){if(1&n&&(t.j41(0,"td",39),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null==e?null:e.shortChannelId)}}function Gl(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Channel ID"),t.k0s())}function Al(n,o){if(1&n&&(t.j41(0,"td",39)(1,"div",46)(2,"span",47),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,bt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.channelId)}}function Nl(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Alias"),t.k0s())}function Ml(n,o){if(1&n&&(t.j41(0,"td",39)(1,"div",46)(2,"span",47),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,bt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.alias)}}function Bl(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Node ID"),t.k0s())}function $l(n,o){if(1&n&&(t.j41(0,"td",39)(1,"div",46)(2,"span",47),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,bt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.nodeId)}}function Vl(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Initiator"),t.k0s())}function Ol(n,o){if(1&n&&(t.j41(0,"td",39),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null!=e&&e.isInitiator?"Yes":"No")}}function Hl(n,o){1&n&&(t.j41(0,"th",48),t.EFF(1,"Base Fee (mSats)"),t.k0s())}function Yl(n,o){if(1&n&&(t.j41(0,"td",39)(1,"span",49),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.feeBaseMsat,"1.0-0")," ")}}function Xl(n,o){1&n&&(t.j41(0,"th",48),t.EFF(1,"Fee Rate (mili mSats)"),t.k0s())}function Ul(n,o){if(1&n&&(t.j41(0,"td",39)(1,"span",49),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.feeProportionalMillionths,"1.0-0")," ")}}function zl(n,o){1&n&&(t.j41(0,"th",48),t.EFF(1,"Local Balance (Sats)"),t.k0s())}function Jl(n,o){if(1&n&&(t.j41(0,"td",39)(1,"span",49),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function ql(n,o){1&n&&(t.j41(0,"th",48),t.EFF(1,"Remote Balance (Sats)"),t.k0s())}function Ql(n,o){if(1&n&&(t.j41(0,"td",39)(1,"span",49),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Zl(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Balance Score"),t.k0s())}function Wl(n,o){if(1&n&&(t.j41(0,"td",39)(1,"div",50)(2,"mat-hint",51),t.EFF(3),t.nI1(4,"number"),t.k0s()(),t.nrm(5,"mat-progress-bar",52),t.k0s()),2&n){const e=o.$implicit;t.R7$(3),t.JRh(t.bMT(4,2,(null==e?null:e.balancedness)||0)),t.R7$(2),t.FS9("value",null!=e&&e.toLocal&&(null==e?null:e.toLocal)>0?+(null==e?null:e.toLocal)/(+(null==e?null:e.toLocal)+ +(null==e?null:e.toRemote))*100:0)}}function Kl(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",53)(1,"div",54)(2,"mat-select",55),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",56),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onChannelUpdate("all"))}),t.EFF(5,"Update Fee Policy"),t.k0s(),t.j41(6,"mat-option",56),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onDownloadCSV())}),t.EFF(7,"Download CSV"),t.k0s()()()()}}function tr(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",57)(1,"div",54)(2,"mat-select",58),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",56),t.bIt("click",function(a){const s=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.onChannelClick(s,a))}),t.EFF(5,"View Info"),t.k0s(),t.j41(6,"mat-option",56),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.onChannelUpdate(a))}),t.EFF(7,"Update Fee Policy"),t.k0s(),t.j41(8,"mat-option",56),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.onCircularRebalance(a))}),t.EFF(9,"Circular Rebalance"),t.k0s(),t.j41(10,"mat-option",56),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.onChannelClose(a,!1))}),t.EFF(11,"Close Channel"),t.k0s(),t.j41(12,"mat-option",56),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.onChannelClose(a,!0))}),t.EFF(13,"Force Close"),t.k0s()()()()}}function er(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No peers connected. Add a peer in order to open a channel."),t.k0s())}function nr(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No channel available."),t.k0s())}function ir(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting channels..."),t.k0s())}function ar(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.errorMessage)}}function or(n,o){if(1&n&&(t.j41(0,"td",59),t.DNE(1,er,2,0,"p",60)(2,nr,2,0,"p",60)(3,ir,2,0,"p",60)(4,ar,2,1,"p",60),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf",e.numPeers<1&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",e.numPeers>0&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function sr(n,o){if(1&n&&t.nrm(0,"tr",61),2&n){const e=t.XpG();t.Y8G("ngClass",t.eq3(1,vl,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function lr(n,o){1&n&&t.nrm(0,"tr",62)}function rr(n,o){1&n&&t.nrm(0,"tr",63)}let cr=(()=>{class n{constructor(e,i,a,s,r,m){this.logger=e,this.store=i,this.rtlEffects=a,this.commonService=s,this.router=r,this.camelCaseWithSpaces=m,this.faEye=F.pS3,this.faEyeSlash=F.k6j,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="peers_channels",this.tableSetting={tableId:"open_channels",recordsPerPage:l.md,sortBy:"alias",sortOrder:l.oi.DESCENDING},this.totalBalance=0,this.displayedColumns=[],this.channels=new c.I6([]),this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.G,this.selFilter="",this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){window.history.state&&(window.history.state.filterColumn||window.history.state.filterValue)&&(this.selFilterBy=window.history.state.filterColumn||"all",this.selFilter=window.history.state.filterValue||""),this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("announceChannel"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.activeChannels=e.activeChannels,this.activeChannels&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadChannelsTable(),this.logger.info(e)}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.information=e}),this.store.select(C.os).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[4])).subscribe(e=>{this.totalBalance=e.onchainBalance.total||0})}ngAfterViewInit(){this.activeChannels&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadChannelsTable()}onCircularRebalance(e){this.store.dispatch((0,v.xO)({payload:{data:{message:{channels:this.activeChannels,selChannel:e,information:this.information},component:El}}}))}onChannelUpdate(e){"all"!==e&&e?.state&&"NORMAL"!==e?.state||(this.store.dispatch((0,v.I1)({payload:{data:{type:l.A$.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"string"==typeof e&&"all"===e?"Update fee policy for all channels":"Update fee policy for Channel: "+(e?.alias||e?.shortChannelId?e?.alias&&e?.shortChannelId?e?.alias+" ("+e?.shortChannelId+")":e?.alias?e?.alias:e?.shortChannelId:e?.channelId),flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:l.UN.NUMBER,inputValue:e&&typeof e?.feeBaseMsat<"u"?e?.feeBaseMsat:1e3,step:100,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:l.UN.NUMBER,inputValue:e&&typeof e?.feeProportionalMillionths<"u"?e?.feeProportionalMillionths:100,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,f.Q)(this.unSubs[5])).subscribe(s=>{if(s){const r=s[0].inputValue,m=s[1].inputValue;let T=null;if(this.commonService.isVersionCompatible(this.information.version,"0.6.2")){let y="";"all"===e?(this.activeChannels.forEach(P=>{y=y+","+P.nodeId}),y=y.substring(1),T={baseFeeMsat:r,feeRate:m,nodeIds:y}):T={baseFeeMsat:r,feeRate:m,nodeId:e?.nodeId}}else{let y="";"all"===e?(this.activeChannels.forEach(P=>{y=y+","+P.channelId}),y=y.substring(1),T={baseFeeMsat:r,feeRate:m,channelIds:y}):T={baseFeeMsat:r,feeRate:m,channelId:e?.channelId}}this.store.dispatch((0,k.fy)({payload:T}))}}),this.applyFilter())}percentHintFunction(e){return(e/1e4).toString()+"%"}onChannelClose(e,i){this.store.dispatch((0,v.I1)({payload:{data:{type:l.A$.CONFIRM,alertTitle:i?"Force Close Channel":"Close Channel",titleMessage:i?"Force closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId):"Closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),noBtnText:"Cancel",yesBtnText:i?"Force Close":"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,f.Q)(this.unSubs[6])).subscribe(m=>{m&&this.store.dispatch((0,k.w0)({payload:{channelId:e.channelId,force:i}}))})}onChannelClick(e,i){this.store.dispatch((0,v.xO)({payload:{data:{channel:e,channelsType:"open",component:gt}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):"announceChannel"===e?"Private":this.commonService.titleCase(e)}setFilterPredicate(){this.channels.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=JSON.stringify(e).toLowerCase();break;case"announceChannel":a=e?.announceChannel?"public":"private";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return a.includes(i)}}loadChannelsTable(){this.channels=new c.I6([...this.activeChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"ActiveChannels")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(at.H),t.rXU(M.h),t.rXU(b.Ix),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Channels")}])],decls:60,vars:18,consts:[["table",""],["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","announceChannel"],["mat-header-cell","","mat-sort-header","","matTooltip","Private",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","channelId"],["matColumnDef","alias"],["matColumnDef","nodeId"],["matColumnDef","isInitiator"],["matColumnDef","feeBaseMsat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","feeProportionalMillionths"],["matColumnDef","toLocal"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","5",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header","","matTooltip","Private"],["mat-cell",""],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","5"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2),t.nrm(2,"div",3),t.j41(3,"div",4)(4,"mat-form-field",5)(5,"mat-label"),t.EFF(6,"Filter By"),t.k0s(),t.j41(7,"mat-select",6),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilterBy,m)||(a.selFilterBy=m),t.Njj(m)}),t.bIt("selectionChange",function(){return t.eBV(s),a.selFilter="",t.Njj(a.applyFilter())}),t.j41(8,"perfect-scrollbar"),t.DNE(9,Rl,2,2,"mat-option",7),t.k0s()()(),t.j41(10,"mat-form-field",5)(11,"mat-label"),t.EFF(12,"Filter"),t.k0s(),t.j41(13,"input",8),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilter,m)||(a.selFilter=m),t.Njj(m)}),t.bIt("input",function(){return t.eBV(s),t.Njj(a.applyFilter())})("keyup",function(){return t.eBV(s),t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(14,"div",9),t.DNE(15,Il,1,0,"mat-progress-bar",10),t.j41(16,"table",11,0),t.qex(18,12),t.DNE(19,kl,1,0,"th",13)(20,jl,3,2,"td",14),t.bVm(),t.qex(21,15),t.DNE(22,Dl,2,0,"th",16)(23,Pl,2,1,"td",14),t.bVm(),t.qex(24,17),t.DNE(25,Gl,2,0,"th",16)(26,Al,4,4,"td",14),t.bVm(),t.qex(27,18),t.DNE(28,Nl,2,0,"th",16)(29,Ml,4,4,"td",14),t.bVm(),t.qex(30,19),t.DNE(31,Bl,2,0,"th",16)(32,$l,4,4,"td",14),t.bVm(),t.qex(33,20),t.DNE(34,Vl,2,0,"th",16)(35,Ol,2,1,"td",14),t.bVm(),t.qex(36,21),t.DNE(37,Hl,2,0,"th",22)(38,Yl,4,4,"td",14),t.bVm(),t.qex(39,23),t.DNE(40,Xl,2,0,"th",22)(41,Ul,4,4,"td",14),t.bVm(),t.qex(42,24),t.DNE(43,zl,2,0,"th",22)(44,Jl,4,4,"td",14),t.bVm(),t.qex(45,25),t.DNE(46,ql,2,0,"th",22)(47,Ql,4,4,"td",14),t.bVm(),t.qex(48,26),t.DNE(49,Zl,2,0,"th",16)(50,Wl,6,4,"td",14),t.bVm(),t.qex(51,27),t.DNE(52,Kl,8,0,"th",28)(53,tr,14,0,"td",29),t.bVm(),t.qex(54,30),t.DNE(55,or,5,4,"td",31),t.bVm(),t.DNE(56,sr,1,3,"tr",32)(57,lr,1,0,"tr",33)(58,rr,1,0,"tr",34),t.k0s()(),t.nrm(59,"mat-paginator",35),t.k0s()}2&i&&(t.R7$(7),t.R50("ngModel",a.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(14,xl).concat(a.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",a.selFilter),t.R7$(2),t.Y8G("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",a.tableSetting.sortBy)("matSortDirection",a.tableSetting.sortOrder)("dataSource",a.channels)("ngClass",t.eq3(15,Ll,""!==a.errorMessage)),t.R7$(40),t.Y8G("matFooterRowDef",t.lJ4(17,Sl)),t.R7$(),t.Y8G("matHeaderRowDef",a.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",a.displayedColumns),t.R7$(),t.Y8G("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.me,d.BC,d.vS,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,O.fg,g.rl,g.nJ,g.MV,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,J.oV,I.iy,A.ZF,A.Ld,p.QX],styles:[".mat-column-announceChannel[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:2rem;min-width:15rem;max-width:30rem}"]})}return n})();const mr=()=>["all"],pr=n=>({"error-border":n}),ur=()=>["no_channel"],Mt=n=>({width:n}),dr=n=>({"display-none":n});function hr(n,o){if(1&n&&(t.j41(0,"mat-option",33),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG();t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function fr(n,o){1&n&&t.nrm(0,"mat-progress-bar",34)}function _r(n,o){1&n&&t.nrm(0,"th",35)}function gr(n,o){if(1&n&&(t.j41(0,"span",39),t.nrm(1,"fa-icon",40),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.faEyeSlash)}}function Cr(n,o){if(1&n&&(t.j41(0,"span",41),t.nrm(1,"fa-icon",40),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.faEye)}}function yr(n,o){if(1&n&&(t.j41(0,"td",36),t.DNE(1,gr,2,1,"span",37)(2,Cr,2,1,"span",38),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf",!(null!=e&&e.announceChannel)),t.R7$(),t.Y8G("ngIf",null==e?null:e.announceChannel)}}function br(n,o){1&n&&(t.j41(0,"th",42),t.EFF(1,"State"),t.k0s())}function Fr(n,o){if(1&n&&(t.j41(0,"td",36),t.EFF(1),t.nI1(2,"titlecase"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.bMT(2,1,null==e?null:e.state))}}function Er(n,o){1&n&&(t.j41(0,"th",42),t.EFF(1,"Channel ID"),t.k0s())}function xr(n,o){if(1&n&&(t.j41(0,"td",36)(1,"div",43)(2,"span",44),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,Mt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.channelId)}}function Lr(n,o){1&n&&(t.j41(0,"th",42),t.EFF(1,"Alias"),t.k0s())}function Sr(n,o){if(1&n&&(t.j41(0,"td",36),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null==e?null:e.alias)}}function vr(n,o){1&n&&(t.j41(0,"th",42),t.EFF(1,"Node ID"),t.k0s())}function Rr(n,o){if(1&n&&(t.j41(0,"td",36)(1,"div",43)(2,"span",44),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,Mt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.nodeId)}}function Ir(n,o){1&n&&(t.j41(0,"th",42),t.EFF(1,"Initiator"),t.k0s())}function kr(n,o){if(1&n&&(t.j41(0,"td",36),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null!=e&&e.isInitiator?"Yes":"No")}}function Tr(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Local Balance (Sats)"),t.k0s())}function wr(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",46),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function jr(n,o){1&n&&(t.j41(0,"th",45),t.EFF(1,"Remote Balance (Sats)"),t.k0s())}function Dr(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",46),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Pr(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",47)(1,"div",48)(2,"mat-select",49),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",50),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function Gr(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",51)(1,"button",52),t.bIt("click",function(a){const s=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.onChannelClick(s,a))}),t.EFF(2,"View Info"),t.k0s()()}}function Ar(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No pending channel available."),t.k0s())}function Nr(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting pending channels..."),t.k0s())}function Mr(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.errorMessage)}}function Br(n,o){if(1&n&&(t.j41(0,"td",53),t.DNE(1,Ar,2,0,"p",54)(2,Nr,2,0,"p",54)(3,Mr,2,1,"p",54),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function $r(n,o){if(1&n&&t.nrm(0,"tr",55),2&n){const e=t.XpG();t.Y8G("ngClass",t.eq3(1,dr,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Vr(n,o){1&n&&t.nrm(0,"tr",56)}function Or(n,o){1&n&&t.nrm(0,"tr",57)}let Hr=(()=>{class n{constructor(e,i,a,s){this.logger=e,this.store=i,this.commonService=a,this.camelCaseWithSpaces=s,this.faEye=F.pS3,this.faEyeSlash=F.k6j,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="peers_channels",this.tableSetting={tableId:"pending_channels",recordsPerPage:l.md,sortBy:"alias",sortOrder:l.oi.DESCENDING},this.totalBalance=0,this.displayedColumns=[],this.channels=new c.I6([]),this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.G,this.selFilter="",this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("announceChannel"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.pendingChannels=e.pendingChannels,this.loadChannelsTable(),this.logger.info(e)}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.information=e}),this.store.select(C.os).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[4])).subscribe(e=>{this.totalBalance=e.onchainBalance.total||0})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}onChannelClick(e,i){this.store.dispatch((0,v.xO)({payload:{data:{channel:e,channelsType:"pending",component:gt}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):"announceChannel"===e?"Private":this.commonService.titleCase(e)}setFilterPredicate(){this.channels.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=JSON.stringify(e).toLowerCase();break;case"announceChannel":a=e?.announceChannel?"public":"private";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return a.includes(i)}}loadChannelsTable(){this.channels=new c.I6([...this.pendingChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"PendingChannels")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(M.h),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Channels")}])],decls:51,vars:18,consts:[["table",""],["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","announceChannel"],["mat-header-cell","","mat-sort-header","","matTooltip","Private",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","channelId"],["matColumnDef","alias"],["matColumnDef","nodeId"],["matColumnDef","isInitiator"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header","","matTooltip","Private"],["mat-cell",""],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2),t.nrm(2,"div",3),t.j41(3,"div",4)(4,"mat-form-field",5)(5,"mat-label"),t.EFF(6,"Filter By"),t.k0s(),t.j41(7,"mat-select",6),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilterBy,m)||(a.selFilterBy=m),t.Njj(m)}),t.bIt("selectionChange",function(){return t.eBV(s),a.selFilter="",t.Njj(a.applyFilter())}),t.j41(8,"perfect-scrollbar"),t.DNE(9,hr,2,2,"mat-option",7),t.k0s()()(),t.j41(10,"mat-form-field",5)(11,"mat-label"),t.EFF(12,"Filter"),t.k0s(),t.j41(13,"input",8),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilter,m)||(a.selFilter=m),t.Njj(m)}),t.bIt("input",function(){return t.eBV(s),t.Njj(a.applyFilter())})("keyup",function(){return t.eBV(s),t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(14,"div",9),t.DNE(15,fr,1,0,"mat-progress-bar",10),t.j41(16,"table",11,0),t.qex(18,12),t.DNE(19,_r,1,0,"th",13)(20,yr,3,2,"td",14),t.bVm(),t.qex(21,15),t.DNE(22,br,2,0,"th",16)(23,Fr,3,3,"td",14),t.bVm(),t.qex(24,17),t.DNE(25,Er,2,0,"th",16)(26,xr,4,4,"td",14),t.bVm(),t.qex(27,18),t.DNE(28,Lr,2,0,"th",16)(29,Sr,2,1,"td",14),t.bVm(),t.qex(30,19),t.DNE(31,vr,2,0,"th",16)(32,Rr,4,4,"td",14),t.bVm(),t.qex(33,20),t.DNE(34,Ir,2,0,"th",16)(35,kr,2,1,"td",14),t.bVm(),t.qex(36,21),t.DNE(37,Tr,2,0,"th",22)(38,wr,4,4,"td",14),t.bVm(),t.qex(39,23),t.DNE(40,jr,2,0,"th",22)(41,Dr,4,4,"td",14),t.bVm(),t.qex(42,24),t.DNE(43,Pr,6,0,"th",25)(44,Gr,3,0,"td",26),t.bVm(),t.qex(45,27),t.DNE(46,Br,4,3,"td",28),t.bVm(),t.DNE(47,$r,1,3,"tr",29)(48,Vr,1,0,"tr",30)(49,Or,1,0,"tr",31),t.k0s()(),t.nrm(50,"mat-paginator",32),t.k0s()}2&i&&(t.R7$(7),t.R50("ngModel",a.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(14,mr).concat(a.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",a.selFilter),t.R7$(2),t.Y8G("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",a.tableSetting.sortBy)("matSortDirection",a.tableSetting.sortOrder)("dataSource",a.channels)("ngClass",t.eq3(15,pr,""!==a.errorMessage)),t.R7$(31),t.Y8G("matFooterRowDef",t.lJ4(17,ur)),t.R7$(),t.Y8G("matHeaderRowDef",a.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",a.displayedColumns),t.R7$(),t.Y8G("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.me,d.BC,d.vS,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,O.fg,g.rl,g.nJ,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,J.oV,I.iy,A.ZF,A.Ld,p.QX,p.PV],styles:[".mat-column-announceChannel[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}"]})}return n})();const Yr=()=>["all"],Xr=n=>({"error-border":n}),Ur=()=>["no_peer"],Bt=n=>({"mr-0":n}),$t=n=>({width:n}),zr=n=>({"display-none":n});function Jr(n,o){if(1&n&&(t.j41(0,"mat-option",35),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG();t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function qr(n,o){1&n&&t.nrm(0,"mat-progress-bar",36)}function Qr(n,o){1&n&&t.nrm(0,"th",37)}function Zr(n,o){if(1&n&&t.nrm(0,"span",41),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,Bt,e.screenSize===e.screenSizeEnum.XS))}}function Wr(n,o){if(1&n&&t.nrm(0,"span",42),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,Bt,e.screenSize===e.screenSizeEnum.XS))}}function Kr(n,o){if(1&n&&(t.j41(0,"td",38),t.DNE(1,Zr,1,3,"span",39)(2,Wr,1,3,"span",40),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf","CONNECTED"===e.state),t.R7$(),t.Y8G("ngIf","DISCONNECTED"===e.state)}}function t1(n,o){1&n&&(t.j41(0,"th",43),t.EFF(1,"Alias"),t.k0s())}function e1(n,o){if(1&n&&(t.j41(0,"td",38)(1,"div",44)(2,"span",45),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,$t,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.alias)}}function n1(n,o){1&n&&(t.j41(0,"th",43),t.EFF(1,"Node ID"),t.k0s())}function i1(n,o){if(1&n&&(t.j41(0,"td",38)(1,"div",44)(2,"span",45),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,$t,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.nodeId)}}function a1(n,o){1&n&&(t.j41(0,"th",43),t.EFF(1,"Network Address"),t.k0s())}function o1(n,o){if(1&n&&(t.j41(0,"td",38),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",null==e?null:e.address," ")}}function s1(n,o){1&n&&(t.j41(0,"th",43),t.EFF(1,"Channels"),t.k0s())}function l1(n,o){if(1&n&&(t.j41(0,"td",38),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null==e?null:e.channels)}}function r1(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",46)(1,"div",47)(2,"mat-select",48),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",49),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function c1(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-option",49),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return t.Njj(s.onPeerDetach(a))}),t.EFF(1,"Disconnect"),t.k0s()}}function m1(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-option",49),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return t.Njj(s.onConnectPeer(a))}),t.EFF(1,"Reconnect"),t.k0s()}}function p1(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",50)(1,"div",47)(2,"mat-select",48),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",49),t.bIt("click",function(a){const s=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.onPeerClick(s,a))}),t.EFF(5,"View Info"),t.k0s(),t.j41(6,"mat-option",49),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.onOpenChannel(a))}),t.EFF(7,"Open Channel"),t.k0s(),t.DNE(8,c1,2,0,"mat-option",51)(9,m1,2,0,"mat-option",51),t.k0s()()()}if(2&n){const e=o.$implicit;t.R7$(8),t.Y8G("ngIf","CONNECTED"===e.state),t.R7$(),t.Y8G("ngIf","DISCONNECTED"===e.state)}}function u1(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No connected peer."),t.k0s())}function d1(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting peers..."),t.k0s())}function h1(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.errorMessage)}}function f1(n,o){if(1&n&&(t.j41(0,"td",52),t.DNE(1,u1,2,0,"p",53)(2,d1,2,0,"p",53)(3,h1,2,1,"p",53),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function _1(n,o){if(1&n&&t.nrm(0,"tr",54),2&n){const e=t.XpG();t.Y8G("ngClass",t.eq3(1,zr,(null==e.peers?null:e.peers.data)&&(null==e.peers||null==e.peers.data?null:e.peers.data.length)>0))}}function g1(n,o){1&n&&t.nrm(0,"tr",55)}function C1(n,o){1&n&&t.nrm(0,"tr",56)}let y1=(()=>{class n{constructor(e,i,a,s,r,m){this.logger=e,this.store=i,this.rtlEffects=a,this.actions=s,this.commonService=r,this.camelCaseWithSpaces=m,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="peers_channels",this.tableSetting={tableId:"peers",recordsPerPage:l.md,sortBy:"alias",sortOrder:l.oi.DESCENDING},this.faUsers=F.gdJ,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.peers=new c.I6([]),this.information={},this.availableBalance=0,this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.information=e}),this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("state"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.os).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.peersData=e.peers,this.loadPeersTable(this.peersData),this.logger.info(e)}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.availableBalance=e.onchainBalance.total||0}),this.actions.pipe((0,f.Q)(this.unSubs[4]),(0,H.p)(e=>e.type===l.Uu.SET_PEERS_ECL)).subscribe(e=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(e,i){const a=[[{key:"nodeId",value:e.nodeId,title:"Public Key",width:100}],[{key:"address",value:e.address,title:"Address",width:50},{key:"alias",value:e.alias,title:"Alias",width:50}],[{key:"state",value:this.commonService.titleCase(e.state||""),title:"State",width:50},{key:"channels",value:e.channels,title:"Channels",width:50}]];this.store.dispatch((0,v.xO)({payload:{data:{type:l.A$.INFORMATION,alertTitle:"Peer Information",goToFieldValue:e.nodeId,goToName:"Graph lookup",goToLink:"/ecl/graph/lookups",showQRName:"Public Key",showQRField:e.nodeId,message:a}}}))}onConnectPeer(e){this.store.dispatch((0,v.xO)({payload:{data:{message:{peer:e.nodeId?e:null,information:this.information,balance:this.availableBalance},component:Dt}}}))}onOpenChannel(e){this.store.dispatch((0,v.xO)({payload:{data:{alertTitle:"Open Channel",message:{peer:e,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:Nt}}}))}onPeerDetach(e){this.store.dispatch(e&&e.channels&&e.channels>0?(0,v.xO)({payload:{data:{type:l.A$.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}}):(0,v.I1)({payload:{data:{type:l.A$.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(e.alias?e.alias:e.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,f.Q)(this.unSubs[5])).subscribe(i=>{i&&this.store.dispatch((0,k.Lc)({payload:{nodeId:e.nodeId||""}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):this.commonService.titleCase(e)}setFilterPredicate(){this.peers.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=JSON.stringify(e).toLowerCase();break;case"state":a=e?.state?.toLowerCase()||"";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return"state"===this.selFilterBy?0===a.indexOf(i):a.includes(i)}}loadPeersTable(e){this.peers=new c.I6(e?[...e]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(i,a)=>i[a]&&isNaN(i[a])?i[a].toLocaleLowerCase():i[a]?+i[a]:null,this.peers.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(at.H),t.rXU(Q.En),t.rXU(M.h),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-peers"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Peers")}])],decls:50,vars:19,consts:[["peersForm","ngForm"],["table",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","matTooltip","State",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","nodeId"],["matColumnDef","address"],["matColumnDef","channels"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","matTooltip","State"],["mat-cell",""],["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,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",2)(1,"form",3,0)(3,"button",4),t.bIt("click",function(){return t.eBV(s),t.Njj(a.onConnectPeer({}))}),t.EFF(4,"Add Peer"),t.k0s()(),t.j41(5,"div",5)(6,"div",6)(7,"div",7),t.nrm(8,"fa-icon",8),t.j41(9,"span",9),t.EFF(10,"Peers"),t.k0s()(),t.j41(11,"div",10)(12,"mat-form-field",11)(13,"mat-label"),t.EFF(14,"Filter By"),t.k0s(),t.j41(15,"mat-select",12),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilterBy,m)||(a.selFilterBy=m),t.Njj(m)}),t.bIt("selectionChange",function(){return t.eBV(s),a.selFilter="",t.Njj(a.applyFilter())}),t.j41(16,"perfect-scrollbar"),t.DNE(17,Jr,2,2,"mat-option",13),t.k0s()()(),t.j41(18,"mat-form-field",11)(19,"mat-label"),t.EFF(20,"Filter"),t.k0s(),t.j41(21,"input",14),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilter,m)||(a.selFilter=m),t.Njj(m)}),t.bIt("input",function(){return t.eBV(s),t.Njj(a.applyFilter())})("keyup",function(){return t.eBV(s),t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(22,"div",15),t.DNE(23,qr,1,0,"mat-progress-bar",16),t.j41(24,"table",17,1),t.qex(26,18),t.DNE(27,Qr,1,0,"th",19)(28,Kr,3,2,"td",20),t.bVm(),t.qex(29,21),t.DNE(30,t1,2,0,"th",22)(31,e1,4,4,"td",20),t.bVm(),t.qex(32,23),t.DNE(33,n1,2,0,"th",22)(34,i1,4,4,"td",20),t.bVm(),t.qex(35,24),t.DNE(36,a1,2,0,"th",22)(37,o1,2,1,"td",20),t.bVm(),t.qex(38,25),t.DNE(39,s1,2,0,"th",22)(40,l1,2,1,"td",20),t.bVm(),t.qex(41,26),t.DNE(42,r1,6,0,"th",27)(43,p1,10,2,"td",28),t.bVm(),t.qex(44,29),t.DNE(45,f1,4,3,"td",30),t.bVm(),t.DNE(46,_1,1,3,"tr",31)(47,g1,1,0,"tr",32)(48,C1,1,0,"tr",33),t.k0s()(),t.nrm(49,"mat-paginator",34),t.k0s()()}2&i&&(t.R7$(8),t.Y8G("icon",a.faUsers),t.R7$(7),t.R50("ngModel",a.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(15,Yr).concat(a.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",a.selFilter),t.R7$(2),t.Y8G("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",a.tableSetting.sortBy)("matSortDirection",a.tableSetting.sortOrder)("dataSource",a.peers)("ngClass",t.eq3(16,Xr,""!==a.errorMessage)),t.R7$(22),t.Y8G("matFooterRowDef",t.lJ4(18,Ur)),t.R7$(),t.Y8G("matHeaderRowDef",a.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",a.displayedColumns),t.R7$(),t.Y8G("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.qT,d.me,d.BC,d.cb,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,O.fg,g.rl,g.nJ,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,J.oV,I.iy,A.ZF,A.Ld],styles:[".mat-column-state[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}"]})}return n})();const b1=["queryRoutesForm"],F1=n=>({"overflow-auto error-border":n,"overflow-auto":!0}),Vt=n=>({"max-width":n});function E1(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Destination Node ID is required."),t.k0s())}function x1(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"Amount is required."),t.k0s())}function L1(n,o){1&n&&t.nrm(0,"mat-progress-bar",23)}function S1(n,o){1&n&&(t.j41(0,"th",40),t.EFF(1," Alias"),t.k0s())}function v1(n,o){if(1&n&&(t.j41(0,"td",41)(1,"span",42)(2,"span",43),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,Vt,i.screenSize===i.screenSizeEnum.XS?"6rem":"30rem")),t.R7$(2),t.JRh(null==e?null:e.alias)}}function R1(n,o){1&n&&(t.j41(0,"th",40),t.EFF(1," ID"),t.k0s())}function I1(n,o){if(1&n&&(t.j41(0,"td",41)(1,"span",42)(2,"span",43),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,Vt,i.screenSize===i.screenSizeEnum.XS?"6rem":"30rem")),t.R7$(2),t.JRh(null==e?null:e.nodeId)}}function k1(n,o){1&n&&(t.j41(0,"th",40)(1,"div",44),t.EFF(2,"Actions"),t.k0s()())}function T1(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",45)(1,"button",46),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(2);return t.Njj(s.onHopClick(a))}),t.EFF(2,"View Info"),t.k0s()()}}function w1(n,o){1&n&&t.nrm(0,"tr",47)}function j1(n,o){1&n&&t.nrm(0,"tr",48)}function D1(n,o){if(1&n&&(t.j41(0,"div",24)(1,"mat-expansion-panel",25)(2,"mat-expansion-panel-header")(3,"mat-panel-title",26)(4,"span",27),t.EFF(5),t.k0s(),t.j41(6,"span",28),t.EFF(7),t.nI1(8,"number"),t.k0s()()(),t.j41(9,"mat-panel-description",29)(10,"div",30)(11,"table",31,2),t.qex(13,32),t.DNE(14,S1,2,0,"th",33)(15,v1,4,4,"td",34),t.bVm(),t.qex(16,35),t.DNE(17,R1,2,0,"th",33)(18,I1,4,4,"td",34),t.bVm(),t.qex(19,36),t.DNE(20,k1,3,0,"th",33)(21,T1,3,0,"td",37),t.bVm(),t.DNE(22,w1,1,0,"tr",38)(23,j1,1,0,"tr",39),t.k0s()()()()()),2&n){const e=o.$implicit,i=o.index,a=t.XpG();t.R7$(5),t.SpI("Route ",i+1,""),t.R7$(2),t.JRh(t.bMT(8,6,e.amount/1e3)),t.R7$(4),t.Y8G("dataSource",a.qrHops[i])("ngClass",t.eq3(8,F1,"error"===a.flgLoading[0])),t.R7$(11),t.Y8G("matHeaderRowDef",a.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",a.displayedColumns)}}let P1=(()=>{class n{constructor(e,i,a){this.store=e,this.eclEffects=i,this.commonService=a,this.allQRoutes=[],this.nodeId="",this.amount=0,this.qrHops=[],this.displayedColumns=["alias","nodeId","actions"],this.flgLoading=[!1],this.faRoute=F.TBz,this.faExclamationTriangle=F.zpE,this.screenSize="",this.screenSizeEnum=l.f7,this.unSubs=[new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.qrHops[0]=new c.I6([]),this.qrHops[0].data=[],this.eclEffects.setQueryRoutes.pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{e&&e.routes&&e.routes.length?(this.flgLoading[0]=!1,this.allQRoutes=e.routes,this.allQRoutes.forEach((i,a)=>{this.qrHops[a]=new c.I6([...i.nodeIds])})):(this.flgLoading[0]="error",this.allQRoutes=[],this.qrHops=[])})}onQueryRoutes(){if(!this.nodeId||!this.amount)return!0;this.qrHops=[],this.flgLoading[0]=!0,this.store.dispatch((0,k.T4)({payload:{nodeId:this.nodeId,amount:1e3*this.amount}}))}resetData(){this.allQRoutes=[],this.nodeId="",this.amount=0,this.flgLoading[0]=!1,this.qrHops=[],this.form.resetForm()}onHopClick(e){this.store.dispatch((0,v.xO)({payload:{data:{type:l.A$.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:e.alias,title:"Alias",width:100,type:l.UN.STRING}],[{key:"nodeId",value:e.nodeId,title:"Node ID",width:100,type:l.UN.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(R.il),t.rXU(pt.B),t.rXU(M.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(i,a){if(1&i&&t.GBs(b1,7),2&i){let s;t.mGM(s=t.lsd())&&(a.form=s.first)}},decls:32,vars:10,consts:[["queryRoutesForm","ngForm"],["destPubkey","ngModel"],["table[i]",""],["fxLayout","column"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","69","fxLayoutAlign","start end"],["matInput","","name","nodeId","tabindex","1","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["fxLayout","column","fxFlex","29","fxLayoutAlign","start end"],["matInput","","name","amount","tabindex","2","type","number","required","",3,"ngModelChange","step","min","ngModel"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-3","mb-1"],["fxFlex","70","fxLayoutAlign","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","column","fxFlex","100"],["fxFlex","100",4,"ngFor","ngForOf"],["mode","indeterminate"],["fxFlex","100"],[1,"flat-expansion-panel","help-expansion","mb-2px"],["fxLayout","row","fxLayoutAlign","space-between start"],["fxFlex","50","fxLayoutAlign","start start"],["fxFlex","50","fxLayoutAlign","end end"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"table-container","mb-2",3,"perfectScrollbar"],["mat-table","",3,"dataSource","ngClass"],["matColumnDef","alias"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","nodeId"],["matColumnDef","actions"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["fxLayout.gt-xs","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",3)(1,"form",4,0),t.bIt("ngSubmit",function(){t.eBV(s);const m=t.sdS(2);return t.Njj(m.form.valid&&a.onQueryRoutes())}),t.j41(3,"div",5),t.nrm(4,"fa-icon",6),t.j41(5,"span"),t.EFF(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),t.k0s()(),t.j41(7,"mat-form-field",7)(8,"mat-label"),t.EFF(9,"Destination Node ID"),t.k0s(),t.j41(10,"input",8,1),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.nodeId,m)||(a.nodeId=m),t.Njj(m)}),t.k0s(),t.DNE(12,E1,2,0,"mat-error",9),t.k0s(),t.j41(13,"mat-form-field",10)(14,"mat-label"),t.EFF(15,"Amount (Sats)"),t.k0s(),t.j41(16,"input",11),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.amount,m)||(a.amount=m),t.Njj(m)}),t.k0s(),t.DNE(17,x1,2,0,"mat-error",9),t.k0s(),t.j41(18,"div",12)(19,"button",13),t.bIt("click",function(){return t.eBV(s),t.Njj(a.resetData())}),t.EFF(20,"Clear"),t.k0s(),t.j41(21,"button",14),t.EFF(22,"Query Route"),t.k0s()()(),t.j41(23,"div",15)(24,"div",16),t.nrm(25,"fa-icon",17),t.j41(26,"span",18),t.EFF(27,"Transaction Route"),t.k0s()()(),t.DNE(28,L1,1,0,"mat-progress-bar",19),t.j41(29,"div",20)(30,"div",21),t.DNE(31,D1,24,10,"div",22),t.k0s()()()}2&i&&(t.R7$(4),t.Y8G("icon",a.faExclamationTriangle),t.R7$(6),t.R50("ngModel",a.nodeId),t.R7$(2),t.Y8G("ngIf",!a.nodeId),t.R7$(4),t.Y8G("step",1e3)("min",0),t.R50("ngModel",a.amount),t.R7$(),t.Y8G("ngIf",!a.amount),t.R7$(8),t.Y8G("icon",a.faRoute),t.R7$(3),t.Y8G("ngIf",!0===a.flgLoading[0]),t.R7$(3),t.Y8G("ngForOf",a.allQRoutes))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.qT,d.me,d.Q0,d.BC,d.cb,d.YS,d.VZ,d.vS,d.cV,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,Y.GK,Y.Z2,Y.WN,Y.Q6,O.fg,g.rl,g.nJ,g.TL,V.HM,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.KS,c.$R,c.YZ,c.NB,A.Ld,K.V,p.QX]})}return n})();const G1=()=>["all"],A1=n=>({"error-border":n}),N1=()=>["no_channel"],Ft=n=>({width:n}),M1=n=>({"display-none":n});function B1(n,o){if(1&n&&(t.j41(0,"mat-option",35),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG();t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function $1(n,o){1&n&&t.nrm(0,"mat-progress-bar",36)}function V1(n,o){1&n&&t.nrm(0,"th",37)}function O1(n,o){if(1&n&&(t.j41(0,"span",41),t.nrm(1,"fa-icon",42),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.faEyeSlash)}}function H1(n,o){if(1&n&&(t.j41(0,"span",43),t.nrm(1,"fa-icon",42),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("icon",e.faEye)}}function Y1(n,o){if(1&n&&(t.j41(0,"td",38),t.DNE(1,O1,2,1,"span",39)(2,H1,2,1,"span",40),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf",!e.announceChannel),t.R7$(),t.Y8G("ngIf",e.announceChannel)}}function X1(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"State"),t.k0s())}function U1(n,o){if(1&n&&(t.j41(0,"td",38),t.EFF(1),t.nI1(2,"titlecase"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(t.bMT(2,1,null==e?null:e.state))}}function z1(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"Short Channel ID"),t.k0s())}function J1(n,o){if(1&n&&(t.j41(0,"td",38),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null==e?null:e.shortChannelId)}}function q1(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"Channel ID"),t.k0s())}function Q1(n,o){if(1&n&&(t.j41(0,"td",38)(1,"div",45)(2,"span",46),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,Ft,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.channelId)}}function Z1(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"Alias"),t.k0s())}function W1(n,o){if(1&n&&(t.j41(0,"td",38)(1,"div",45)(2,"span",46),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,Ft,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(e.alias)}}function K1(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"Node ID"),t.k0s())}function tc(n,o){if(1&n&&(t.j41(0,"td",38)(1,"div",45)(2,"span",46),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("ngStyle",t.eq3(2,Ft,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.nodeId)}}function ec(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"Initiator"),t.k0s())}function nc(n,o){if(1&n&&(t.j41(0,"td",38),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null!=e&&e.isInitiator?"Yes":"No")}}function ic(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Local Balance (Sats)"),t.k0s())}function ac(n,o){if(1&n&&(t.j41(0,"td",38)(1,"span",48),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function oc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Remote Balance (Sats)"),t.k0s())}function sc(n,o){if(1&n&&(t.j41(0,"td",38)(1,"span",48),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",t.i5U(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function lc(n,o){1&n&&(t.j41(0,"th",44),t.EFF(1,"Balance Score"),t.k0s())}function rc(n,o){if(1&n&&(t.j41(0,"td",38)(1,"div",49)(2,"mat-hint",50),t.EFF(3),t.nI1(4,"number"),t.k0s()(),t.nrm(5,"mat-progress-bar",51),t.k0s()),2&n){const e=o.$implicit;t.R7$(3),t.JRh(t.bMT(4,2,(null==e?null:e.balancedness)||0)),t.R7$(2),t.FS9("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function cc(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",52)(1,"div",53)(2,"mat-select",54),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",55),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function mc(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",56)(1,"div",53)(2,"mat-select",57),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",55),t.bIt("click",function(a){const s=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.onChannelClick(s,a))}),t.EFF(5,"View Info"),t.k0s(),t.j41(6,"mat-option",55),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.onChannelClose(a,!0))}),t.EFF(7,"Force Close"),t.k0s()()()()}}function pc(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No inactive channel available."),t.k0s())}function uc(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting inactive channels..."),t.k0s())}function dc(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.errorMessage)}}function hc(n,o){if(1&n&&(t.j41(0,"td",58),t.DNE(1,pc,2,0,"p",59)(2,uc,2,0,"p",59)(3,dc,2,1,"p",59),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function fc(n,o){if(1&n&&t.nrm(0,"tr",60),2&n){const e=t.XpG();t.Y8G("ngClass",t.eq3(1,M1,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function _c(n,o){1&n&&t.nrm(0,"tr",61)}function gc(n,o){1&n&&t.nrm(0,"tr",62)}let Cc=(()=>{class n{constructor(e,i,a,s,r){this.logger=e,this.store=i,this.rtlEffects=a,this.commonService=s,this.camelCaseWithSpaces=r,this.faEye=F.pS3,this.faEyeSlash=F.k6j,this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.PAGE_ID="peers_channels",this.tableSetting={tableId:"inactive_channels",recordsPerPage:l.md,sortBy:"alias",sortOrder:l.oi.DESCENDING},this.totalBalance=0,this.displayedColumns=[],this.channels=new c.I6([]),this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.G,this.selFilter="",this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("announceChannel"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.Ou).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.inactiveChannels=e.inactiveChannels,this.loadChannelsTable(),this.logger.info(e)}),this.store.select(C.p3).pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{this.information=e}),this.store.select(C.os).pipe((0,f.Q)(this.unSubs[3])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.DW).pipe((0,f.Q)(this.unSubs[4])).subscribe(e=>{this.totalBalance=e.onchainBalance.total||0})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}onChannelClose(e,i){this.store.dispatch((0,v.I1)({payload:{data:{type:l.A$.CONFIRM,alertTitle:i?"Force Close Channel":"Close Channel",titleMessage:i?"Force closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId):"Closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),noBtnText:"Cancel",yesBtnText:i?"Force Close":"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,f.Q)(this.unSubs[5])).subscribe(m=>{m&&this.store.dispatch((0,k.w0)({payload:{channelId:e.channelId||"",force:i}}))})}onChannelClick(e,i){this.store.dispatch((0,v.xO)({payload:{data:{channel:e,channelsType:"inactive",component:gt}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLocaleLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):"announceChannel"===e?"Private":this.commonService.titleCase(e)}setFilterPredicate(){this.channels.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=JSON.stringify(e).toLowerCase();break;case"announceChannel":a=e?.announceChannel?"public":"private";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return a.includes(i)}}loadChannelsTable(){this.channels=new c.I6([...this.inactiveChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"InactiveChannels")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(R.il),t.rXU(at.H),t.rXU(M.h),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Channels")}])],decls:57,vars:18,consts:[["table",""],["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"matSortActive","matSortDirection","dataSource","ngClass"],["matColumnDef","announceChannel"],["mat-header-cell","","mat-sort-header","","matTooltip","Private",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","shortChannelId"],["matColumnDef","channelId"],["matColumnDef","alias"],["matColumnDef","nodeId"],["matColumnDef","isInitiator"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[3,"value"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header","","matTooltip","Private"],["mat-cell",""],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["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(i,a){if(1&i){const s=t.RV6();t.j41(0,"div",1)(1,"div",2),t.nrm(2,"div",3),t.j41(3,"div",4)(4,"mat-form-field",5)(5,"mat-label"),t.EFF(6,"Filter By"),t.k0s(),t.j41(7,"mat-select",6),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilterBy,m)||(a.selFilterBy=m),t.Njj(m)}),t.bIt("selectionChange",function(){return t.eBV(s),a.selFilter="",t.Njj(a.applyFilter())}),t.j41(8,"perfect-scrollbar"),t.DNE(9,B1,2,2,"mat-option",7),t.k0s()()(),t.j41(10,"mat-form-field",5)(11,"mat-label"),t.EFF(12,"Filter"),t.k0s(),t.j41(13,"input",8),t.mxI("ngModelChange",function(m){return t.eBV(s),t.DH7(a.selFilter,m)||(a.selFilter=m),t.Njj(m)}),t.bIt("input",function(){return t.eBV(s),t.Njj(a.applyFilter())})("keyup",function(){return t.eBV(s),t.Njj(a.applyFilter())}),t.k0s()()()(),t.j41(14,"div",9),t.DNE(15,$1,1,0,"mat-progress-bar",10),t.j41(16,"table",11,0),t.qex(18,12),t.DNE(19,V1,1,0,"th",13)(20,Y1,3,2,"td",14),t.bVm(),t.qex(21,15),t.DNE(22,X1,2,0,"th",16)(23,U1,3,3,"td",14),t.bVm(),t.qex(24,17),t.DNE(25,z1,2,0,"th",16)(26,J1,2,1,"td",14),t.bVm(),t.qex(27,18),t.DNE(28,q1,2,0,"th",16)(29,Q1,4,4,"td",14),t.bVm(),t.qex(30,19),t.DNE(31,Z1,2,0,"th",16)(32,W1,4,4,"td",14),t.bVm(),t.qex(33,20),t.DNE(34,K1,2,0,"th",16)(35,tc,4,4,"td",14),t.bVm(),t.qex(36,21),t.DNE(37,ec,2,0,"th",16)(38,nc,2,1,"td",14),t.bVm(),t.qex(39,22),t.DNE(40,ic,2,0,"th",23)(41,ac,4,4,"td",14),t.bVm(),t.qex(42,24),t.DNE(43,oc,2,0,"th",23)(44,sc,4,4,"td",14),t.bVm(),t.qex(45,25),t.DNE(46,lc,2,0,"th",16)(47,rc,6,4,"td",14),t.bVm(),t.qex(48,26),t.DNE(49,cc,6,0,"th",27)(50,mc,8,0,"td",28),t.bVm(),t.qex(51,29),t.DNE(52,hc,4,3,"td",30),t.bVm(),t.DNE(53,fc,1,3,"tr",31)(54,_c,1,0,"tr",32)(55,gc,1,0,"tr",33),t.k0s()(),t.nrm(56,"mat-paginator",34),t.k0s()}2&i&&(t.R7$(7),t.R50("ngModel",a.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(14,G1).concat(a.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",a.selFilter),t.R7$(2),t.Y8G("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",a.tableSetting.sortBy)("matSortDirection",a.tableSetting.sortOrder)("dataSource",a.channels)("ngClass",t.eq3(15,A1,""!==a.errorMessage)),t.R7$(37),t.Y8G("matFooterRowDef",t.lJ4(17,N1)),t.R7$(),t.Y8G("matHeaderRowDef",a.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",a.displayedColumns),t.R7$(),t.Y8G("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.me,d.BC,d.vS,w.aY,h.DJ,h.sA,h.UI,L.PW,L.eI,O.fg,g.rl,g.nJ,g.MV,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,J.oV,I.iy,A.ZF,A.Ld,p.QX,p.PV],styles:[".mat-column-announceChannel[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;min-width:15rem;max-width:30rem}"]})}return n})();const yc=()=>["all"],bc=()=>["no_event"],Fc=n=>({"ml-0":n}),it=n=>({width:n}),Ec=n=>({"display-none":n});function xc(n,o){if(1&n&&(t.j41(0,"div",6),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.JRh(e.errorMessage)}}function Lc(n,o){if(1&n&&(t.j41(0,"mat-option",14),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.Y8G("value",e),t.R7$(),t.JRh(i.getLabel(e))}}function Sc(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",7),t.nrm(1,"div",8),t.j41(2,"div",9)(3,"mat-form-field",10)(4,"mat-label"),t.EFF(5,"Filter By"),t.k0s(),t.j41(6,"mat-select",11),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.selFilterBy,a)||(s.selFilterBy=a),t.Njj(a)}),t.bIt("selectionChange",function(){t.eBV(e);const a=t.XpG();return a.selFilter="",t.Njj(a.applyFilter())}),t.j41(7,"perfect-scrollbar"),t.DNE(8,Lc,2,2,"mat-option",12),t.k0s()()(),t.j41(9,"mat-form-field",10)(10,"mat-label"),t.EFF(11,"Filter"),t.k0s(),t.j41(12,"input",13),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.selFilter,a)||(s.selFilter=a),t.Njj(a)}),t.bIt("input",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.applyFilter())})("keyup",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.applyFilter())}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(6),t.R50("ngModel",e.selFilterBy),t.R7$(2),t.Y8G("ngForOf",t.lJ4(3,yc).concat(e.displayedColumns.slice(0,-1))),t.R7$(4),t.R50("ngModel",e.selFilter)}}function vc(n,o){1&n&&t.nrm(0,"mat-progress-bar",42)}function Rc(n,o){1&n&&t.nrm(0,"th",43)}function Ic(n,o){if(1&n&&(t.nrm(0,"span",46),t.nI1(1,"camelcase")),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.FS9("matTooltip",t.bMT(1,2,null==e?null:e.type)),t.Y8G("ngClass",t.eq3(4,Fc,i.screenSize===i.screenSizeEnum.XS))}}function kc(n,o){if(1&n&&(t.j41(0,"td",44),t.DNE(1,Ic,2,6,"span",45),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf","payment-relayed"!==(null==e?null:e.type))}}function Tc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Date/Time"),t.k0s())}function wc(n,o){if(1&n&&(t.j41(0,"td",44),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,null==e?null:e.timestamp,"dd/MMM/y HH:mm")," ")}}function jc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"In Channel ID"),t.k0s())}function Dc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"div",48)(2,"span",49),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,it,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.fromChannelId)}}function Pc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"In Channel Short ID"),t.k0s())}function Gc(n,o){if(1&n&&(t.j41(0,"td",44),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null==e?null:e.fromShortChannelId)}}function Ac(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"In Channel"),t.k0s())}function Nc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"div",48)(2,"span",49),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,it,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.fromChannelAlias)}}function Mc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Out Channel ID"),t.k0s())}function Bc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"div",48)(2,"span",49),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,it,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.toChannelId)}}function $c(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Out Channel Short ID"),t.k0s())}function Vc(n,o){if(1&n&&(t.j41(0,"td",44),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.JRh(null==e?null:e.toShortChannelId)}}function Oc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Out Channel"),t.k0s())}function Hc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"div",48)(2,"span",49),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,it,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.toChannelAlias)}}function Yc(n,o){1&n&&(t.j41(0,"th",47),t.EFF(1,"Payment Hash"),t.k0s())}function Xc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"div",48)(2,"span",49),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,it,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.paymentHash)}}function Uc(n,o){1&n&&(t.j41(0,"th",50),t.EFF(1,"Amount In (Sats)"),t.k0s())}function zc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"span",51),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,null==e?null:e.amountIn))}}function Jc(n,o){1&n&&(t.j41(0,"th",50),t.EFF(1,"Amount Out (Sats)"),t.k0s())}function qc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"span",51),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,null==e?null:e.amountOut))}}function Qc(n,o){1&n&&(t.j41(0,"th",50),t.EFF(1,"Fee Earned (Sats)"),t.k0s())}function Zc(n,o){if(1&n&&(t.j41(0,"td",44)(1,"span",51),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,(null==e?null:e.amountIn)-(null==e?null:e.amountOut)))}}function Wc(n,o){if(1&n){const e=t.RV6();t.j41(0,"th",52)(1,"div",53)(2,"mat-select",54),t.nrm(3,"mat-select-trigger"),t.j41(4,"mat-option",55),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.onDownloadCSV())}),t.EFF(5,"Download CSV"),t.k0s()()()()}}function Kc(n,o){if(1&n){const e=t.RV6();t.j41(0,"td",56)(1,"button",57),t.bIt("click",function(a){const s=t.eBV(e).$implicit,r=t.XpG(2);return t.Njj(r.onForwardingEventClick(s,a))}),t.EFF(2,"View Info"),t.k0s()()}}function tm(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No forwarding history available."),t.k0s())}function em(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting forwarding history..."),t.k0s())}function nm(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.JRh(e.errorMessage)}}function im(n,o){if(1&n&&(t.j41(0,"td",58),t.DNE(1,tm,2,0,"p",59)(2,em,2,0,"p",59)(3,nm,2,1,"p",59),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function am(n,o){if(1&n&&t.nrm(0,"tr",60),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,Ec,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function om(n,o){1&n&&t.nrm(0,"tr",61)}function sm(n,o){1&n&&t.nrm(0,"tr",62)}function lm(n,o){if(1&n&&(t.j41(0,"div",15),t.DNE(1,vc,1,0,"mat-progress-bar",16),t.j41(2,"table",17,0),t.qex(4,18),t.DNE(5,Rc,1,0,"th",19)(6,kc,2,1,"td",20),t.bVm(),t.qex(7,21),t.DNE(8,Tc,2,0,"th",22)(9,wc,3,4,"td",20),t.bVm(),t.qex(10,23),t.DNE(11,jc,2,0,"th",22)(12,Dc,4,4,"td",20),t.bVm(),t.qex(13,24),t.DNE(14,Pc,2,0,"th",22)(15,Gc,2,1,"td",20),t.bVm(),t.qex(16,25),t.DNE(17,Ac,2,0,"th",22)(18,Nc,4,4,"td",20),t.bVm(),t.qex(19,26),t.DNE(20,Mc,2,0,"th",22)(21,Bc,4,4,"td",20),t.bVm(),t.qex(22,27),t.DNE(23,$c,2,0,"th",22)(24,Vc,2,1,"td",20),t.bVm(),t.qex(25,28),t.DNE(26,Oc,2,0,"th",22)(27,Hc,4,4,"td",20),t.bVm(),t.qex(28,29),t.DNE(29,Yc,2,0,"th",22)(30,Xc,4,4,"td",20),t.bVm(),t.qex(31,30),t.DNE(32,Uc,2,0,"th",31)(33,zc,4,3,"td",20),t.bVm(),t.qex(34,32),t.DNE(35,Jc,2,0,"th",31)(36,qc,4,3,"td",20),t.bVm(),t.qex(37,33),t.DNE(38,Qc,2,0,"th",31)(39,Zc,4,3,"td",20),t.bVm(),t.qex(40,34),t.DNE(41,Wc,6,0,"th",35)(42,Kc,3,0,"td",36),t.bVm(),t.qex(43,37),t.DNE(44,im,4,3,"td",38),t.bVm(),t.DNE(45,am,1,3,"tr",39)(46,om,1,0,"tr",40)(47,sm,1,0,"tr",41),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",e.tableSetting.sortBy)("matSortDirection",e.tableSetting.sortOrder)("dataSource",e.forwardingHistoryEvents),t.R7$(43),t.Y8G("matFooterRowDef",t.lJ4(7,bc)),t.R7$(),t.Y8G("matHeaderRowDef",e.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",e.displayedColumns)}}function rm(n,o){if(1&n&&t.nrm(0,"mat-paginator",63),2&n){const e=t.XpG();t.Y8G("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let Ot=(()=>{class n{constructor(e,i,a,s,r){this.logger=e,this.commonService=i,this.store=a,this.datePipe=s,this.camelCaseWithSpaces=r,this.pageId="routing",this.tableId="forwarding_history",this.eventsData=[],this.selFilter="",this.nodePageDefs=l.WW,this.selFilterBy="all",this.colWidth="20rem",this.tableSetting={tableId:"forwarding_history",recordsPerPage:l.md,sortBy:"timestamp",sortOrder:l.oi.DESCENDING},this.displayedColumns=[],this.forwardingHistoryEvents=new c.I6([]),this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnChanges(e){e.eventsData&&(this.apiCallStatus={status:l.wn.COMPLETED,action:"FetchPayments"},this.eventsData=e.eventsData.currentValue,e.eventsData.firstChange||this.loadForwardingEventsTable(this.eventsData)),e.selFilter&&!e.selFilter.firstChange&&(this.selFilterBy="all",this.applyFilter())}ngOnInit(){this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting.tableId=this.tableId,this.tableSetting=e.pageSettings.find(i=>i.pageId===this.pageId)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.pageId)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("type"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.KT).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.eventsData=e.payments&&e.payments.relayed?e.payments.relayed:[],this.eventsData&&this.sort&&this.paginator&&this.displayedColumns.length>0&&this.loadForwardingEventsTable(this.eventsData),this.logger.info(this.eventsData)})}ngAfterViewInit(){setTimeout(()=>{this.eventsData.length>0&&this.loadForwardingEventsTable(this.eventsData)},0)}onForwardingEventClick(e,i){const a=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:l.UN.STRING}],[{key:"timestamp",value:Math.round((e.timestamp||0)/1e3),title:"Date/Time",width:50,type:l.UN.DATE_TIME},{key:"fee",value:(e.amountIn||0)-(e.amountOut||0),title:"Fee Earned (Sats)",width:50,type:l.UN.NUMBER}],[{key:"amountIn",value:e.amountIn,title:"Amount In (Sats)",width:50,type:l.UN.NUMBER},{key:"amountOut",value:e.amountOut,title:"Amount Out (Sats)",width:50,type:l.UN.NUMBER}],[{key:"fromChannelAlias",value:e.fromChannelAlias,title:"From Channel Alias",width:50,type:l.UN.STRING},{key:"fromShortChannelId",value:e.fromShortChannelId,title:"From Short Channel ID",width:50,type:l.UN.STRING}],[{key:"fromChannelId",value:e.fromChannelId,title:"From Channel ID",width:100,type:l.UN.STRING}],[{key:"toChannelAlias",value:e.toChannelAlias,title:"To Channel Alias",width:50,type:l.UN.STRING},{key:"toShortChannelId",value:e.toShortChannelId,title:"To Short Channel ID",width:50,type:l.UN.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"To Channel ID",width:100,type:l.UN.STRING}]];"payment-relayed"!==e.type&&a?.unshift([{key:"type",value:this.commonService.camelCase(e.type),title:"Relay Type",width:100,type:l.UN.STRING}]),this.store.dispatch((0,v.xO)({payload:{data:{type:l.A$.INFORMATION,alertTitle:"Event Information",message:a}}}))}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.selFilter.trim().toLowerCase())}getLabel(e){const i=this.nodePageDefs[this.pageId][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column):this.commonService.titleCase(e)}setFilterPredicate(){this.forwardingHistoryEvents.filterPredicate=(e,i)=>{let a="";switch(this.selFilterBy){case"all":a=(e.timestamp?this.datePipe.transform(new Date(e.timestamp),"dd/MMM/y HH:mm")?.toLowerCase():"")+JSON.stringify(e).toLowerCase();break;case"timestamp":a=this.datePipe.transform(new Date(e.timestamp||0),"dd/MMM/y HH:mm")?.toLowerCase()||"";break;case"fee":a=(e.amountIn-e.amountOut).toString()||"0";break;default:a=typeof e[this.selFilterBy]>"u"?"":"string"==typeof e[this.selFilterBy]?e[this.selFilterBy].toLowerCase():"boolean"==typeof e[this.selFilterBy]?e[this.selFilterBy]?"yes":"no":e[this.selFilterBy].toString()}return a.includes(i)}}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new c.I6([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,a)=>"fee"===a?i.amountIn-i.amountOut:i[a]&&isNaN(i[a])?i[a].toLocaleLowerCase():i[a]?+i[a]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.setFilterPredicate(),this.applyFilter(),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il),t.rXU(p.vh),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(i,a){if(1&i&&(t.GBs(x.B4,5),t.GBs(I.iy,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sort=s.first),t.mGM(s=t.lsd())&&(a.paginator=s.first)}},inputs:{pageId:"pageId",tableId:"tableId",eventsData:"eventsData",selFilter:"selFilter"},features:[t.Jv_([{provide:S.JO,useValue:{overlayPanelClass:"rtl-select-overlay"}},{provide:I.xX,useValue:(0,l.on)("Events")}]),t.OA$],decls:5,vars:4,consts:[["table",""],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","49"],["tabindex","1","name","filterBy",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","filter",3,"ngModelChange","input","keyup","ngModel"],[3,"value"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"matSortActive","matSortDirection","dataSource"],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","matTooltip","Type (if not payment relayed)",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","fromChannelId"],["matColumnDef","fromShortChannelId"],["matColumnDef","fromChannelAlias"],["matColumnDef","toChannelId"],["matColumnDef","toShortChannelId"],["matColumnDef","toChannelAlias"],["matColumnDef","paymentHash"],["matColumnDef","amountIn"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amountOut"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","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"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","matTooltip","Type (if not payment relayed)"],["mat-cell",""],["class","dot yellow","matTooltipPosition","right",3,"matTooltip","ngClass",4,"ngIf"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip","ngClass"],["mat-header-cell","","mat-sort-header",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell",""],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(i,a){1&i&&(t.j41(0,"div",1),t.DNE(1,xc,2,1,"div",2)(2,Sc,13,4,"div",3)(3,lm,48,8,"div",4)(4,rm,1,3,"mat-paginator",5),t.k0s()),2&i&&(t.R7$(),t.Y8G("ngIf",""!==a.errorMessage),t.R7$(),t.Y8G("ngIf",""===a.errorMessage),t.R7$(),t.Y8G("ngIf",""===a.errorMessage),t.R7$(),t.Y8G("ngIf",""===a.errorMessage))},dependencies:[p.YU,p.Sq,p.bT,p.B3,d.me,d.BC,d.vS,h.DJ,h.sA,h.UI,L.PW,L.eI,j.$z,O.fg,g.rl,g.nJ,V.HM,S.VO,S.$2,X.wT,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,J.oV,I.iy,A.ZF,A.Ld,p.QX,p.vh,z.ZE],styles:[".mat-column-type[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}.mat-column-type[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{max-width:2.2rem;width:2.2rem;text-overflow:unset}.mat-column-actions[_ngcontent-%COMP%]{min-height:3.55rem}"]})}return n})();const cm=["tableIn"],mm=["tableOut"],pm=["paginatorIn"],um=["paginatorOut"],dm=(n,o)=>({"mt-2":n,"mt-1":o}),hm=()=>["no_incoming_event"],fm=n=>({"mt-2":n}),_m=()=>["no_outgoing_event"],lt=n=>({width:n}),Ht=n=>({"display-none":n});function gm(n,o){if(1&n&&(t.j41(0,"div",7),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.JRh(e.errorMessage)}}function Cm(n,o){1&n&&t.nrm(0,"mat-progress-bar",34)}function ym(n,o){1&n&&(t.j41(0,"th",35),t.EFF(1,"Channel ID"),t.k0s())}function bm(n,o){if(1&n&&(t.j41(0,"td",36)(1,"div",37)(2,"span",38),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,lt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.channelId)}}function Fm(n,o){1&n&&(t.j41(0,"th",35),t.EFF(1,"Peer Alias"),t.k0s())}function Em(n,o){if(1&n&&(t.j41(0,"td",36)(1,"div",37)(2,"span",38),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,lt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.alias)}}function xm(n,o){1&n&&(t.j41(0,"th",39),t.EFF(1,"Events"),t.k0s())}function Lm(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",40),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,e.events))}}function Sm(n,o){1&n&&(t.j41(0,"th",39),t.EFF(1,"Amount (Sats)"),t.k0s())}function vm(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",40),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,e.totalAmount))}}function Rm(n,o){1&n&&(t.j41(0,"th",39),t.EFF(1,"Fee (Sats)"),t.k0s())}function Im(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",40),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,e.totalFee))}}function km(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No incoming routing peer available."),t.k0s())}function Tm(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting incoming routing peers..."),t.k0s())}function wm(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.JRh(e.errorMessage)}}function jm(n,o){if(1&n&&(t.j41(0,"td",41),t.DNE(1,km,2,0,"p",42)(2,Tm,2,0,"p",42)(3,wm,2,1,"p",42),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",(!(null!=e.routingPeersIncoming&&e.routingPeersIncoming.data)||(null==e.routingPeersIncoming||null==e.routingPeersIncoming.data?null:e.routingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.routingPeersIncoming&&e.routingPeersIncoming.data)||(null==e.routingPeersIncoming||null==e.routingPeersIncoming.data?null:e.routingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.routingPeersIncoming&&e.routingPeersIncoming.data)||(null==e.routingPeersIncoming||null==e.routingPeersIncoming.data?null:e.routingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function Dm(n,o){if(1&n&&t.nrm(0,"tr",43),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,Ht,(null==e.routingPeersIncoming?null:e.routingPeersIncoming.data)&&(null==e.routingPeersIncoming||null==e.routingPeersIncoming.data?null:e.routingPeersIncoming.data.length)>0))}}function Pm(n,o){1&n&&t.nrm(0,"tr",44)}function Gm(n,o){1&n&&t.nrm(0,"tr",45)}function Am(n,o){1&n&&t.nrm(0,"mat-progress-bar",34)}function Nm(n,o){1&n&&(t.j41(0,"th",35),t.EFF(1,"Channel ID"),t.k0s())}function Mm(n,o){if(1&n&&(t.j41(0,"td",36)(1,"div",37)(2,"span",38),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,lt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.channelId)}}function Bm(n,o){1&n&&(t.j41(0,"th",35),t.EFF(1,"Peer Alias"),t.k0s())}function $m(n,o){if(1&n&&(t.j41(0,"td",36)(1,"div",37)(2,"span",38),t.EFF(3),t.k0s()()()),2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("ngStyle",t.eq3(2,lt,i.screenSize===i.screenSizeEnum.XS?"6rem":i.colWidth)),t.R7$(2),t.JRh(null==e?null:e.alias)}}function Vm(n,o){1&n&&(t.j41(0,"th",39),t.EFF(1,"Events"),t.k0s())}function Om(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",40),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,e.events))}}function Hm(n,o){1&n&&(t.j41(0,"th",39),t.EFF(1,"Amount (Sats)"),t.k0s())}function Ym(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",40),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,e.totalAmount))}}function Xm(n,o){1&n&&(t.j41(0,"th",39),t.EFF(1,"Fee (Sats)"),t.k0s())}function Um(n,o){if(1&n&&(t.j41(0,"td",36)(1,"span",40),t.EFF(2),t.nI1(3,"number"),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(t.bMT(3,1,e.totalFee))}}function zm(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"No outgoing routing peer available."),t.k0s())}function Jm(n,o){1&n&&(t.j41(0,"p"),t.EFF(1,"Getting outgoing routing peers..."),t.k0s())}function qm(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.JRh(e.errorMessage)}}function Qm(n,o){if(1&n&&(t.j41(0,"td",41),t.DNE(1,zm,2,0,"p",42)(2,Jm,2,0,"p",42)(3,qm,2,1,"p",42),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",(!(null!=e.routingPeersOutgoing&&e.routingPeersOutgoing.data)||(null==e.routingPeersOutgoing||null==e.routingPeersOutgoing.data?null:e.routingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.R7$(),t.Y8G("ngIf",(!(null!=e.routingPeersOutgoing&&e.routingPeersOutgoing.data)||(null==e.routingPeersOutgoing||null==e.routingPeersOutgoing.data?null:e.routingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("ngIf",(!(null!=e.routingPeersOutgoing&&e.routingPeersOutgoing.data)||(null==e.routingPeersOutgoing||null==e.routingPeersOutgoing.data?null:e.routingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function Zm(n,o){if(1&n&&t.nrm(0,"tr",43),2&n){const e=t.XpG(2);t.Y8G("ngClass",t.eq3(1,Ht,(null==e.routingPeersOutgoing?null:e.routingPeersOutgoing.data)&&(null==e.routingPeersOutgoing||null==e.routingPeersOutgoing.data?null:e.routingPeersOutgoing.data.length)>0))}}function Wm(n,o){1&n&&t.nrm(0,"tr",44)}function Km(n,o){1&n&&t.nrm(0,"tr",45)}function tp(n,o){if(1&n&&(t.j41(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11),t.EFF(4,"Incoming"),t.k0s(),t.nrm(5,"div",12),t.k0s(),t.j41(6,"div",13),t.DNE(7,Cm,1,0,"mat-progress-bar",14),t.j41(8,"table",15,0),t.qex(10,16),t.DNE(11,ym,2,0,"th",17)(12,bm,4,4,"td",18),t.bVm(),t.qex(13,19),t.DNE(14,Fm,2,0,"th",17)(15,Em,4,4,"td",18),t.bVm(),t.qex(16,20),t.DNE(17,xm,2,0,"th",21)(18,Lm,4,3,"td",18),t.bVm(),t.qex(19,22),t.DNE(20,Sm,2,0,"th",21)(21,vm,4,3,"td",18),t.bVm(),t.qex(22,23),t.DNE(23,Rm,2,0,"th",21)(24,Im,4,3,"td",18),t.bVm(),t.qex(25,24),t.DNE(26,jm,4,3,"td",25),t.bVm(),t.DNE(27,Dm,1,3,"tr",26)(28,Pm,1,0,"tr",27)(29,Gm,1,0,"tr",28),t.k0s()(),t.nrm(30,"mat-paginator",29,1),t.k0s(),t.j41(32,"div",30)(33,"div",10)(34,"div",11),t.EFF(35,"Outgoing"),t.k0s(),t.nrm(36,"div",12),t.k0s(),t.j41(37,"div",31),t.DNE(38,Am,1,0,"mat-progress-bar",14),t.j41(39,"table",32,2),t.qex(41,16),t.DNE(42,Nm,2,0,"th",17)(43,Mm,4,4,"td",18),t.bVm(),t.qex(44,19),t.DNE(45,Bm,2,0,"th",17)(46,$m,4,4,"td",18),t.bVm(),t.qex(47,20),t.DNE(48,Vm,2,0,"th",21)(49,Om,4,3,"td",18),t.bVm(),t.qex(50,22),t.DNE(51,Hm,2,0,"th",21)(52,Ym,4,3,"td",18),t.bVm(),t.qex(53,23),t.DNE(54,Xm,2,0,"th",21)(55,Um,4,3,"td",18),t.bVm(),t.qex(56,33),t.DNE(57,Qm,4,3,"td",25),t.bVm(),t.DNE(58,Zm,1,3,"tr",26)(59,Wm,1,0,"tr",27)(60,Km,1,0,"tr",28),t.k0s(),t.nrm(61,"mat-paginator",29,3),t.k0s()()()),2&n){const e=t.XpG();t.R7$(2),t.Y8G("ngClass",t.l_i(22,dm,e.screenSize===e.screenSizeEnum.XS,e.screenSize===e.screenSizeEnum.SM)),t.R7$(5),t.Y8G("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",e.tableSetting.sortBy)("matSortDirection",e.tableSetting.sortOrder)("dataSource",e.routingPeersIncoming),t.R7$(19),t.Y8G("matFooterRowDef",t.lJ4(25,hm)),t.R7$(),t.Y8G("matHeaderRowDef",e.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",e.displayedColumns),t.R7$(),t.Y8G("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS),t.R7$(3),t.Y8G("ngClass",t.eq3(26,fm,e.screenSize!==e.screenSizeEnum.LG)),t.R7$(5),t.Y8G("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.R7$(),t.Y8G("matSortActive",e.tableSetting.sortBy)("matSortDirection",e.tableSetting.sortOrder)("dataSource",e.routingPeersOutgoing),t.R7$(19),t.Y8G("matFooterRowDef",t.lJ4(28,_m)),t.R7$(),t.Y8G("matHeaderRowDef",e.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",e.displayedColumns),t.R7$(),t.Y8G("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let ep=(()=>{class n{constructor(e,i,a,s){this.logger=e,this.commonService=i,this.store=a,this.camelCaseWithSpaces=s,this.nodePageDefs=l.WW,this.selFilterByIn="all",this.selFilterByOut="all",this.colWidth="20rem",this.PAGE_ID="routing",this.tableSetting={tableId:"routing_peers",recordsPerPage:l.md,sortBy:"totalFee",sortOrder:l.oi.DESCENDING},this.routingPeersData=[],this.displayedColumns=[],this.routingPeersIncoming=new c.I6([]),this.routingPeersOutgoing=new c.I6([]),this.pageSize=l.md,this.pageSizeOptions=l.xp,this.screenSize="",this.screenSizeEnum=l.f7,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.wn,this.unSubs=[new u.B,new u.B,new u.B],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:l.md,this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/(2*this.displayedColumns.length)/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.KT).pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.wn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.routingPeersData=e.payments&&e.payments.relayed?e.payments.relayed:[],this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(e)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData)}applyFilterIncoming(){this.routingPeersIncoming.filter=this.filterIn.trim().toLowerCase()}applyFilterOutgoing(){this.routingPeersOutgoing.filter=this.filterOut.trim().toLowerCase()}getLabel(e){const i=this.nodePageDefs[this.PAGE_ID][this.tableSetting.tableId].allowedColumns.find(a=>a.column===e);return i?i.label?i.label:this.camelCaseWithSpaces.transform(i.column,"_"):this.commonService.titleCase(e)}setFilterPredicate(){this.routingPeersIncoming.filterPredicate=(e,i)=>{let a="";return a="all"===this.selFilterByIn?JSON.stringify(e).toLowerCase():"string"==typeof e[this.selFilterByIn]?e[this.selFilterByIn].toLowerCase():"boolean"==typeof e[this.selFilterByIn]?e[this.selFilterByIn]?"yes":"no":e[this.selFilterByIn].toString(),a.includes(i)},this.routingPeersOutgoing.filterPredicate=(e,i)=>{let a="";switch(this.selFilterByOut){case"all":a=JSON.stringify(e).toLowerCase();break;case"total_amount":case"total_fee":a=(+(e[this.selFilterByOut]||0)/1e3).toString()||"";break;default:a="string"==typeof e[this.selFilterByOut]?e[this.selFilterByOut].toLowerCase():"boolean"==typeof e[this.selFilterByOut]?e[this.selFilterByOut]?"yes":"no":e[this.selFilterByOut].toString()}return a.includes(i)}}loadRoutingPeersTable(e){if(e.length>0){const i=this.groupRoutingPeers(e);this.routingPeersIncoming=new c.I6(i[0]),this.routingPeersIncoming.sort=this.sortIn,this.routingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.routingPeersIncoming),this.routingPeersOutgoing=new c.I6(i[1]),this.routingPeersOutgoing.sort=this.sortOut,this.routingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.routingPeersOutgoing)}else this.routingPeersIncoming=new c.I6([]),this.routingPeersOutgoing=new c.I6([]);this.setFilterPredicate(),this.applyFilterIncoming(),this.applyFilterOutgoing()}groupRoutingPeers(e){const i=[],a=[];return e.forEach(s=>{const r=i.find(T=>T.channelId===s.fromChannelId),m=a.find(T=>T.channelId===s.toChannelId);r?(r.events++,r.totalAmount=+r.totalAmount+ +s.amountIn,r.totalFee=s.amountIn-s.amountOut+ +r.totalFee):i.push({channelId:s.fromChannelId,alias:s.fromChannelAlias,events:1,totalAmount:+s.amountIn,totalFee:s.amountIn-s.amountOut}),m?(m.events++,m.totalAmount=+m.totalAmount+ +s.amountOut,m.totalFee=s.amountIn-s.amountOut+ +m.totalFee):a.push({channelId:s.toChannelId,alias:s.toChannelAlias,events:1,totalAmount:+s.amountOut,totalFee:s.amountIn-s.amountOut})}),[this.commonService.sortDescByKey(i,"totalFee"),this.commonService.sortDescByKey(a,"totalFee")]}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il),t.rXU(z.Qu))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(i,a){if(1&i&&(t.GBs(cm,5,x.B4),t.GBs(mm,5,x.B4),t.GBs(pm,5),t.GBs(um,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.sortIn=s.first),t.mGM(s=t.lsd())&&(a.sortOut=s.first),t.mGM(s=t.lsd())&&(a.paginatorIn=s.first),t.mGM(s=t.lsd())&&(a.paginatorOut=s.first)}},features:[t.Jv_([{provide:I.xX,useValue:(0,l.on)("Peers")}])],decls:3,vars:2,consts:[["tableIn",""],["paginatorIn",""],["tableOut",""],["paginatorOut",""],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container mt-2",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container","mt-2"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch",1,"mb-4"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex.gt-xs","30","fxLayoutAlign.gt-xs","space-between center","fxLayout","row","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","start start","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto","incoming-table",3,"matSortActive","matSortDirection","dataSource"],["matColumnDef","channelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","totalAmount"],["matColumnDef","totalFee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch",1,"mb-4"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"matSortActive","matSortDirection","dataSource"],["matColumnDef","no_outgoing_event"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(i,a){1&i&&(t.j41(0,"div",4),t.DNE(1,gm,2,1,"div",5)(2,tp,63,29,"div",6),t.k0s()),2&i&&(t.R7$(),t.Y8G("ngIf",""!==a.errorMessage),t.R7$(),t.Y8G("ngIf",""===a.errorMessage))},dependencies:[p.YU,p.bT,p.B3,h.DJ,h.sA,h.UI,L.PW,L.eI,V.HM,x.B4,x.aE,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.Zq,c.xW,c.KS,c.$R,c.Qo,c.YZ,c.NB,c.iF,I.iy,A.Ld,p.QX]})}return n})();function np(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",8),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.activeLink=a.link)}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG();t.FS9("routerLink",e.link),t.Y8G("active",i.activeLink===e.link),t.R7$(),t.JRh(e.name)}}let ip=(()=>{class n{constructor(e){this.router=e,this.faChartBar=F.$Fj,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(i=>i instanceof b.gx)).subscribe({next:i=>{const a=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=a?a.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-reports"]],decls:12,vars:3,consts:[["tabPanel",""],["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","","mat-stretch-tabs","false","mat-align-tabs","start",3,"tabPanel"],["tabindex","1","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["tabindex","1","mat-tab-link","",1,"mat-tab-label",3,"click","active","routerLink"]],template:function(i,a){if(1&i&&(t.j41(0,"div",1),t.nrm(1,"fa-icon",2),t.j41(2,"span",3),t.EFF(3,"Reports"),t.k0s()(),t.j41(4,"div",4)(5,"mat-card")(6,"mat-card-content",5)(7,"nav",6),t.DNE(8,np,2,3,"div",7),t.k0s(),t.nrm(9,"mat-tab-nav-panel",null,0)(11,"router-outlet"),t.k0s()()()),2&i){const s=t.sdS(10);t.R7$(),t.Y8G("icon",a.faChartBar),t.R7$(6),t.Y8G("tabPanel",s),t.R7$(),t.Y8G("ngForOf",a.links)}},dependencies:[p.Sq,w.aY,h.DJ,h.sA,E.RN,E.m2,D.Bu,D.hQ,D.Ql,b.n3,b.Wk]})}return n})();var Yt=_(6064),Xt=_(4655);function ap(n,o){if(1&n&&(t.j41(0,"div",14),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"number"),t.k0s()),2&n){const e=t.XpG();t.Y8G("@fadeIn",e.totalFeeSat),t.R7$(),t.Lme("",t.i5U(2,3,e.totalFeeSat||0,"1.0-2")," Sats/",t.bMT(3,6,e.filteredEventsBySelectedPeriod.length||0)," Events")}}function op(n,o){1&n&&(t.j41(0,"div",15),t.EFF(1,"No routing report for the selected period"),t.k0s())}function sp(n,o){if(1&n&&(t.j41(0,"span")(1,"span",17),t.EFF(2),t.nI1(3,"number"),t.k0s(),t.j41(4,"span",17),t.EFF(5),t.nI1(6,"number"),t.k0s()()),2&n){const e=o.model,i=t.XpG(2);t.R7$(2),t.SpI("Events: ",t.bMT(3,2,(i.selReportBy===i.reportBy.EVENTS?e.value:e.extra.totalEvents)||0),""),t.R7$(3),t.SpI("Fee: ",t.i5U(6,4,(i.selReportBy===i.reportBy.EVENTS?e.extra.totalFees:e.value)||0,"1.0-2"),"")}}function lp(n,o){if(1&n){const e=t.RV6();t.j41(0,"ngx-charts-bar-vertical",16),t.bIt("select",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onChartBarSelected(a))})("mouseup",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onChartMouseUp(a))}),t.DNE(1,sp,7,7,"ng-template",null,0,t.C5r),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("view",e.view)("results",e.routingReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function rp(n,o){if(1&n&&t.nrm(0,"rtl-ecl-forwarding-history",18),2&n){const e=t.XpG();t.Y8G("pageId","reports")("tableId","routing")("eventsData",e.filteredEventsBySelectedPeriod)("selFilter",e.eventFilterValue)}}let cp=(()=>{class n{constructor(e,i,a){this.logger=e,this.commonService=i,this.store=a,this.reportPeriod=l.rs[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.reportBy=l.aR,this.selReportBy=l.aR.FEES,this.totalFeeSat=null,this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.routingReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Fee (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=l.f7,this.unSubs=[new u.B,new u.B]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.f7.XS||this.screenSize===l.f7.SM),this.store.select(C.KT).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.events=e.payments&&e.payments.relayed?e.payments.relayed:[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(e)}),this.commonService.containerSizeUpdated.pipe((0,f.Q)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.f7.MD:this.screenPaddingX=e.width/10;break;case l.f7.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2],this.logger.info("Container Size: "+JSON.stringify(e)),this.logger.info("View: "+JSON.stringify(this.view))})}filterForwardingEvents(e,i){const a=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3);this.logger.info("Filtering Forwarding Events Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()+" To "+i.toLocaleString()),this.filteredEventsBySelectedPeriod=[],this.routingReportData=[],this.totalFeeSat=null,this.events&&this.events.length>0&&(this.events.forEach(r=>{Math.floor((r.timestamp||0)/1e3)>=a&&Math.floor((r.timestamp||0)/1e3)<s&&this.filteredEventsBySelectedPeriod.push(r)}),this.routingReportData=this.selReportBy===this.reportBy.EVENTS?this.prepareEventsReport(e):this.prepareFeeReport(e)),this.logger.info("Filtering Forwarding Events Finished at "+new Date(Date.now()).toLocaleString())}onChartMouseUp(e){"svg"===e.srcElement.tagName&&e.srcElement.classList.length>0&&"ngx-charts"===e.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(e){this.eventFilterValue=this.reportPeriod===l.rs[1]?e.name+"/"+this.startDate.getFullYear():e.name.toString().padStart(2,"0")+"/"+l.KR[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(e){const i=Math.round(e.getTime()/1e3),a=[];if(this.totalFeeSat=0,this.logger.info("Fee Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.rs[1]){for(let s=0;s<12;s++)a.push({name:l.KR[s].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod?.map(s=>{const r=new Date(s.timestamp||0).getMonth();return a[r].value=a[r].value+((s.amountIn||0)-(s.amountOut||0)),a[r].extra.totalEvents=a[r].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+((s.amountIn||0)-(s.amountOut||0)),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s<this.getMonthDays(e.getMonth(),e.getFullYear());s++)a.push({name:s+1,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod?.map(s=>{const r=Math.floor((Math.floor((s.timestamp||0)/1e3)-i)/this.secondsInADay);return a[r].value=a[r].value+((s.amountIn||0)-(s.amountOut||0)),a[r].extra.totalEvents=a[r].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+((s.amountIn||0)-(s.amountOut||0)),this.filteredEventsBySelectedPeriod})}return this.logger.info("Fee Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),a}prepareEventsReport(e){const i=Math.round(e.getTime()/1e3),a=[];if(this.totalFeeSat=0,this.logger.info("Events Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.rs[1]){for(let s=0;s<12;s++)a.push({name:l.KR[s].name,value:0,extra:{totalFees:0}});this.filteredEventsBySelectedPeriod?.map(s=>{const r=new Date(s.timestamp||0).getMonth();return a[r].value=a[r].value+1,a[r].extra.totalFees=a[r].extra.totalFees+((s.amountIn||0)-(s.amountOut||0)),this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+((s.amountIn||0)-(s.amountOut||0)),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s<this.getMonthDays(e.getMonth(),e.getFullYear());s++)a.push({name:s+1,value:0,extra:{totalFees:0}});this.filteredEventsBySelectedPeriod?.map(s=>{const r=Math.floor((Math.floor((s.timestamp||0)/1e3)-i)/this.secondsInADay);return a[r].value=a[r].value+1,a[r].extra.totalFees=a[r].extra.totalFees+((s.amountIn||0)-(s.amountOut||0)),this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+((s.amountIn||0)-(s.amountOut||0)),this.filteredEventsBySelectedPeriod})}return this.logger.info("Events Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),a}onSelectionChange(e){const i=e.selDate.getMonth(),a=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.rs[1]?(this.startDate=new Date(a,0,1,0,0,0),this.endDate=new Date(a,11,31,23,59,59)):(this.startDate=new Date(a,i,1,0,0,0),this.endDate=new Date(a,i,this.getMonthDays(i,a),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.KR[e].days+1:l.KR[e].days}onSelReportByChange(){this.yAxisLabel=this.selReportBy===this.reportBy.EVENTS?"Events":"Fee (Sats)",this.routingReportData=this.selReportBy===this.reportBy.EVENTS?this.prepareEventsReport(this.startDate):this.prepareFeeReport(this.startDate)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-routing-report"]],hostBindings:function(i,a){1&i&&t.bIt("mouseup",function(r){return a.onChartMouseUp(r)})},decls:17,vars:7,consts:[["tooltipTemplate",""],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","center center",1,"padding-gap-x"],["color","primary","name","selReportBy","fxFlex","100","fxLayoutAlign","start center",1,"my-1",3,"ngModelChange","change","ngModel"],[1,"mr-2"],["tabindex","1",1,"mr-2",3,"value"],["tabindex","2",3,"value"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"pageId","tableId","eventsData","selFilter",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"one-color",3,"select","mouseup","view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel"],[1,"tooltip-label"],[3,"pageId","tableId","eventsData","selFilter"]],template:function(i,a){1&i&&(t.j41(0,"div",1)(1,"rtl-horizontal-scroller",2),t.bIt("stepChanged",function(r){return a.onSelectionChange(r)}),t.k0s(),t.j41(2,"div",3)(3,"mat-radio-group",4),t.mxI("ngModelChange",function(r){return t.DH7(a.selReportBy,r)||(a.selReportBy=r),r}),t.bIt("change",function(){return a.onSelReportByChange()}),t.j41(4,"span",5),t.EFF(5,"Report By: "),t.k0s(),t.j41(6,"mat-radio-button",6),t.EFF(7,"Fees"),t.k0s(),t.j41(8,"mat-radio-button",7),t.EFF(9,"Events"),t.k0s()()(),t.j41(10,"div",8),t.DNE(11,ap,4,8,"div",9)(12,op,2,0,"div",10),t.j41(13,"div",11),t.DNE(14,lp,3,11,"ngx-charts-bar-vertical",12),t.k0s(),t.j41(15,"div",11),t.DNE(16,rp,1,4,"rtl-ecl-forwarding-history",13),t.k0s()()()),2&i&&(t.R7$(3),t.R50("ngModel",a.selReportBy),t.R7$(3),t.FS9("value",a.reportBy.FEES),t.R7$(2),t.FS9("value",a.reportBy.EVENTS),t.R7$(3),t.Y8G("ngIf",a.routingReportData.length>0&&a.filteredEventsBySelectedPeriod.length>0),t.R7$(),t.Y8G("ngIf",a.routingReportData.length<=0||a.filteredEventsBySelectedPeriod.length<=0),t.R7$(2),t.Y8G("ngIf",a.routingReportData.length>0&&a.filteredEventsBySelectedPeriod.length>0),t.R7$(2),t.Y8G("ngIf",a.filteredEventsBySelectedPeriod.length>0))},dependencies:[p.bT,d.BC,d.vS,h.DJ,h.sA,h.UI,ot.VT,ot._g,Yt.L8,Xt.m,Ot,p.QX],data:{animation:[yt.q]}})}return n})();var mp=_(5085);function pp(n,o){if(1&n&&(t.j41(0,"div",11),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"number"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" Paid ",t.i5U(2,2,e.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-2")," Sats/",t.bMT(3,5,e.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function up(n,o){if(1&n&&(t.j41(0,"div",11),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"number"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" Received ",t.i5U(2,2,e.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-2")," Sats/",t.bMT(3,5,e.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function dp(n,o){if(1&n&&(t.j41(0,"div",9),t.DNE(1,pp,4,7,"div",10)(2,up,4,7,"div",10),t.k0s()),2&n){const e=t.XpG();t.Y8G("@fadeIn",e.transactionsReportSummary),t.R7$(),t.Y8G("ngIf",e.transactionsReportSummary.paymentsSelectedPeriod),t.R7$(),t.Y8G("ngIf",e.transactionsReportSummary.invoicesSelectedPeriod)}}function hp(n,o){1&n&&(t.j41(0,"div",12),t.EFF(1,"No transactions report for the selected period"),t.k0s())}function fp(n,o){if(1&n&&(t.j41(0,"span",14),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"number"),t.k0s()),2&n){const e=o.model;t.R7$(),t.LHq("",e.name,": ",t.i5U(2,4,e.value||0,"1.0-2"),"/# ","Paid"===e.name?"Payments":"Invoices",": ",t.bMT(3,7,(null==e.extra?null:e.extra.total)||0),"")}}function _p(n,o){if(1&n){const e=t.RV6();t.j41(0,"ngx-charts-bar-vertical-2d",13),t.bIt("select",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onChartBarSelected(a))})("mouseup",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.onChartMouseUp(a))}),t.DNE(1,fp,4,9,"ng-template",null,0,t.C5r),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("view",e.view)("results",e.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",e.reportPeriod===e.scrollRanges[0]?2:8)}}function gp(n,o){if(1&n&&t.nrm(0,"rtl-transactions-report-table",15),2&n){const e=t.XpG();t.Y8G("displayedColumns",e.displayedColumns)("tableSetting",e.tableSetting)("dataList",e.transactionsNonZeroReportData)("dataRange",e.reportPeriod)("selFilter",e.transactionFilterValue)}}let Cp=(()=>{class n{constructor(e,i,a){this.logger=e,this.commonService=i,this.store=a,this.scrollRanges=l.rs,this.reportPeriod=l.rs[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.colWidth="20rem",this.PAGE_ID="reports",this.tableSetting={tableId:"transactions",recordsPerPage:l.md,sortBy:"date",sortOrder:l.oi.DESCENDING},this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices"],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=l.f7,this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.f7.XS||this.screenSize===l.f7.SM),this.store.select(C.jZ).pipe((0,f.Q)(this.unSubs[0])).subscribe(e=>{this.tableSetting=e.pageSettings.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId)||l.X8.find(i=>i.pageId===this.PAGE_ID)?.tables.find(i=>i.tableId===this.tableSetting.tableId),this.displayedColumns=this.screenSize===l.f7.XS||this.screenSize===l.f7.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.colWidth=this.displayedColumns.length?this.commonService.getContainerSize().width/this.displayedColumns.length/14+"rem":"20rem",this.logger.info(this.displayedColumns)}),this.store.select(C.KT).pipe((0,f.Q)(this.unSubs[1]),(0,rt.E)(this.store.select(C.rN))).subscribe(([e,i])=>{this.payments=e.payments.sent?e.payments.sent:[],this.invoices=i.invoices?i.invoices:[],(this.payments.length>0||this.invoices.length>0)&&(this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData())}),this.commonService.containerSizeUpdated.pipe((0,f.Q)(this.unSubs[2])).subscribe(e=>{switch(this.screenSize){case l.f7.MD:this.screenPaddingX=e.width/10;break;case l.f7.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2],this.logger.info("Container Size: "+JSON.stringify(e)),this.logger.info("View: "+JSON.stringify(this.view))})}onChartMouseUp(e){"svg"===e.srcElement.tagName&&e.srcElement.classList.length>0&&"ngx-charts"===e.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(e){this.transactionFilterValue=this.reportPeriod===l.rs[1]?e.series.toString()+"/"+this.startDate.getFullYear():e.series.toString().padStart(2,"0")+"/"+l.KR[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(e,i){const a=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3),r=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const m=this.payments?.filter(y=>y.firstPartTimestamp&&Math.floor(y.firstPartTimestamp/1e3)>=a&&Math.floor(y.firstPartTimestamp/1e3)<s),T=this.invoices?.filter(y=>"received"===y.status&&y.timestamp&&y.timestamp>=a&&y.timestamp<s);if(this.transactionsReportSummary.paymentsSelectedPeriod=m.length,this.transactionsReportSummary.invoicesSelectedPeriod=T.length,this.reportPeriod===l.rs[1]){for(let y=0;y<12;y++)r.push({name:l.KR[y].name,date:new Date(e.getFullYear(),y,1,0,0,0,0),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});m?.map(y=>{const P=new Date(y.firstPartTimestamp||0).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+(y.recipientAmount||0),r[P].series[0].value=r[P].series[0].value+y.recipientAmount,r[P].series[0].extra.total=r[P].series[0].extra.total+1,this.transactionsReportSummary}),T?.map(y=>{const P=new Date(1e3*(y.timestamp||0)).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+(y.amountSettled||0),r[P].series[1].value=r[P].series[1].value+y.amountSettled,r[P].series[1].extra.total=r[P].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let y=0;y<this.getMonthDays(e.getMonth(),e.getFullYear());y++)r.push({name:(y+1).toString(),date:new Date(1e3*(y*this.secondsInADay+a)),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});m?.map(y=>{const P=Math.floor((Math.floor((y.firstPartTimestamp||0)/1e3)-a)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+(y.recipientAmount||0),r[P].series[0].value=r[P].series[0].value+y.recipientAmount,r[P].series[0].extra.total=r[P].series[0].extra.total+1,this.transactionsReportSummary}),T?.map(y=>{const P=Math.floor(((y.timestamp||0)-a)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+(y.amountSettled||0),r[P].series[1].value=r[P].series[1].value+y.amountSettled,r[P].series[1].extra.total=r[P].series[1].extra.total+1,this.transactionsReportSummary})}return r}prepareTableData(){return this.transactionsReportData?.reduce((e,i)=>i.series[0].extra.total>0||i.series[1].extra.total>0?e.concat({date:i.date,amount_paid:i.series[0].value,num_payments:i.series[0].extra.total,amount_received:i.series[1].value,num_invoices:i.series[1].extra.total}):e,[])}onSelectionChange(e){const i=e.selDate.getMonth(),a=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.rs[1]?(this.startDate=new Date(a,0,1,0,0,0),this.endDate=new Date(a,11,31,23,59,59)):(this.startDate=new Date(a,i,1,0,0,0),this.endDate=new Date(a,i,this.getMonthDays(i,a),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.KR[e].days+1:l.KR[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(G.gP),t.rXU(M.h),t.rXU(R.il))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(i,a){1&i&&t.bIt("mouseup",function(r){return a.onChartMouseUp(r)})},decls:9,vars:4,consts:[["tooltipTemplate",""],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"displayedColumns","tableSetting","dataList","dataRange","selFilter",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"select","mouseup","view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding"],[1,"tooltip-label"],[3,"displayedColumns","tableSetting","dataList","dataRange","selFilter"]],template:function(i,a){1&i&&(t.j41(0,"div",1)(1,"rtl-horizontal-scroller",2),t.bIt("stepChanged",function(r){return a.onSelectionChange(r)}),t.k0s(),t.j41(2,"div",3),t.DNE(3,dp,3,3,"div",4)(4,hp,2,0,"div",5),t.j41(5,"div",6),t.DNE(6,_p,3,13,"ngx-charts-bar-vertical-2d",7),t.k0s(),t.j41(7,"div",6),t.DNE(8,gp,1,5,"rtl-transactions-report-table",8),t.k0s()()()),2&i&&(t.R7$(3),t.Y8G("ngIf",a.transactionsNonZeroReportData.length>0),t.R7$(),t.Y8G("ngIf",a.transactionsNonZeroReportData.length<=0),t.R7$(2),t.Y8G("ngIf",a.transactionsNonZeroReportData.length>0),t.R7$(2),t.Y8G("ngIf",a.transactionsNonZeroReportData.length>0))},dependencies:[p.bT,h.DJ,h.sA,h.UI,Yt.Dl,Xt.m,mp.T,p.QX],data:{animation:[yt.q]}})}return n})();var N=_(7186),yp=_(13);function bp(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",9),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.activeLink=a.link)}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG();t.FS9("routerLink",e.link),t.Y8G("active",i.activeLink===e.link),t.R7$(),t.JRh(e.name)}}let Fp=(()=>{class n{constructor(e){this.router=e,this.faSearch=F.MjD,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new u.B,new u.B,new u.B,new u.B]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,f.Q)(this.unSubs[0]),(0,H.p)(i=>i instanceof b.gx)).subscribe({next:i=>{const a=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=a?a.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}static#t=this.\u0275fac=function(i){return new(i||n)(t.rXU(b.Ix))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["rtl-ecl-graph"]],decls:13,vars:3,consts:[["tabPanel",""],["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"],["fxLayout","column"],["mat-tab-nav-bar","","mat-stretch-tabs","false","mat-align-tabs","start",3,"tabPanel"],["tabindex","1","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"],["tabindex","1","mat-tab-link","",1,"mat-tab-label",3,"click","active","routerLink"]],template:function(i,a){if(1&i&&(t.j41(0,"div",1),t.nrm(1,"fa-icon",2),t.j41(2,"span",3),t.EFF(3,"Graph Lookups"),t.k0s()(),t.j41(4,"div",4)(5,"mat-card")(6,"mat-card-content",5)(7,"nav",6),t.DNE(8,bp,2,3,"div",7),t.k0s(),t.nrm(9,"mat-tab-nav-panel",null,0),t.j41(11,"div",8),t.nrm(12,"router-outlet"),t.k0s()()()()),2&i){const s=t.sdS(10);t.R7$(),t.Y8G("icon",a.faSearch),t.R7$(6),t.Y8G("tabPanel",s),t.R7$(),t.Y8G("ngForOf",a.links)}},dependencies:[p.Sq,w.aY,h.DJ,h.sA,h.UI,E.RN,E.m2,D.Bu,D.hQ,D.Ql,b.n3,b.Wk]})}return n})();const Ep=[{path:"",component:xt,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:ka,canActivate:[(0,N.fe)()]},{path:"onchain",component:go,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:as,canActivate:[(0,N.fe)()]},{path:"send",component:os,canActivate:[(0,N.fe)()]}]},{path:"connections",component:bo,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Ls,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:cr,canActivate:[(0,N.fe)()]},{path:"pending",component:Hr,canActivate:[(0,N.fe)()]},{path:"inactive",component:Cc,canActivate:[(0,N.fe)()]}]},{path:"peers",component:y1,data:{sweepAll:!1},canActivate:[(0,N.fe)()]}]},{path:"transactions",component:Eo,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:Rt,canActivate:[(0,N.fe)()]},{path:"invoices",component:It,canActivate:[(0,N.fe)()]}]},{path:"routing",component:Lo,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Ot,canActivate:[(0,N.fe)()]},{path:"peers",component:ep,canActivate:[(0,N.fe)()]}]},{path:"reports",component:ip,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:cp,canActivate:[(0,N.fe)()]},{path:"transactions",component:Cp,canActivate:[(0,N.fe)()]}]},{path:"graph",component:Fp,canActivate:[(0,N.fe)()],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:ns,canActivate:[(0,N.fe)()]},{path:"queryroutes",component:P1,canActivate:[(0,N.fe)()]}]},{path:"**",component:yp.X}]}],xp=b.iI.forChild(Ep);var Lp=_(9029);let Sp=(()=>{class n{static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275mod=t.$C({type:n,bootstrap:[xt]});static#n=this.\u0275inj=t.G2t({imports:[p.MD,Lp.G,xp]})}return n})()}}]); |